403Webshell
Server IP : 162.0.217.223  /  Your IP : 216.73.216.153
Web Server : LiteSpeed
System : Linux premium269.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : mypckeys ( 1539)
PHP Version : 8.1.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/mypckeys/yeslicense.org/wp-content/plugins/squirrly-seo/models/services/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/mypckeys/yeslicense.org/wp-content/plugins/squirrly-seo/models/services/Llms.php
<?php
defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );

class SQ_Models_Services_Llms extends SQ_Models_Abstract_Seo {


	public function __construct() {
		parent::__construct();
		add_filter( 'sq_llms', array( $this, 'generateLlms' ) );
		add_filter( 'sq_llms', array( $this, 'showLlms' ), 11 );
	}

	public function generateLlms( $llms = '' ) {
		$llms .= "\n# " . esc_html__( "Squirrly SEO LLMs", 'squirrly-seo' ) . "\n\n";

		$llms_permission = (array) SQ_Classes_Helpers_Tools::getOption( 'sq_llms_permission' );
		$llms_permission = array_filter( $llms_permission );

		if( empty($llms_permission) ){
			// If no custom robots permissions are set, use the default rules
			$llms_permission = array(
				'User-agent: *',
				'Allow: /',
				'Disallow: /wp-admin/',
				'Disallow: /wp-login.php',
				'Disallow: /wp-includes/',
				'Disallow: /xmlrpc.php',
				);
		}


		foreach (  $llms_permission as $row ) {
			if (is_string($row)){
				$llms .= $row . "\n";
			}
		}

		$llms .= "\n\n";

		return apply_filters( 'sq_custom_llms', $llms );
	}

	public function showLlms( $robots = '' ) {
		/**
		 *
		 * display llms.txt
		 */
		header( 'Status: 200 OK', true, 200 );
		header( 'Content-type: text/plain; charset=' . get_bloginfo( 'charset' ) );

		echo esc_textarea( sanitize_textarea_field( $robots ) );
		exit();
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit