| Server IP : 213.186.33.4 / Your IP : 216.73.216.146 Web Server : Apache System : Linux webm005.cluster103.gra.hosting.ovh.net 6.18.39-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Tue Jul 21 12:03:15 CEST 2026 x86_64 User : karinebmkh ( 644538) PHP Version : 8.4.22 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/karinebmkh/www/wp-content/plugins/seo-by-rank-math/includes/frontend/paper/ |
Upload File : |
<?php
/**
* The Search Results paper.
*
* @since 1.0.22
* @package RankMath
* @subpackage RankMath\Paper
* @author Rank Math <support@rankmath.com>
*/
namespace RankMath\Paper;
use RankMath\Helper;
defined( 'ABSPATH' ) || exit;
/**
* Search results.
*/
class Search implements IPaper {
/**
* Retrieves the SEO title.
*
* @return string
*/
public function title() {
return Paper::get_from_options( 'search_title', [], 'Searched for %search_query% %page% %sep% %sitename%' );
}
/**
* Retrieves the SEO description.
*
* @return string
*/
public function description() {
return '';
}
/**
* Retrieves the robots.
*
* @return string
*/
public function robots() {
return Helper::get_settings( 'titles.noindex_search' ) ? [ 'index' => 'noindex' ] : [];
}
/**
* Retrieves the advanced robots.
*
* @return array
*/
public function advanced_robots() {
return [];
}
/**
* Retrieves the canonical URL.
*
* @return array
*/
public function canonical() {
$search_query = get_search_query();
return [ 'canonical' => ! empty( $search_query ) && ! preg_match( '|^page/\d+$|', $search_query ) ? get_search_link() : '' ];
}
/**
* Retrieves meta keywords.
*
* @return string
*/
public function keywords() {
return '';
}
}