Edit File by line
/home/barbar84/www/wp-conte.../plugins/wordpres.../src/presente...
File: googlebot-presenter.php
<?php
[0] Fix | Delete
[1] Fix | Delete
namespace Yoast\WP\SEO\Presenters;
[2] Fix | Delete
[3] Fix | Delete
use Yoast\WP\SEO\Presentations\Indexable_Presentation;
[4] Fix | Delete
[5] Fix | Delete
\_deprecated_file( \basename( __FILE__ ), 'WPSEO 14.9' );
[6] Fix | Delete
[7] Fix | Delete
/**
[8] Fix | Delete
* Presenter class for the googlebot output.
[9] Fix | Delete
*/
[10] Fix | Delete
class Googlebot_Presenter extends Abstract_Indexable_Presenter {
[11] Fix | Delete
[12] Fix | Delete
/**
[13] Fix | Delete
* Returns the googlebot output.
[14] Fix | Delete
*
[15] Fix | Delete
* @deprecated 14.9 Values merged into the robots meta tag.
[16] Fix | Delete
* @codeCoverageIgnore
[17] Fix | Delete
*
[18] Fix | Delete
* @return string The googlebot output tag.
[19] Fix | Delete
*/
[20] Fix | Delete
public function present() {
[21] Fix | Delete
\_deprecated_function( __METHOD__, 'WPSEO 14.9' );
[22] Fix | Delete
[23] Fix | Delete
$googlebot = \implode( ', ', $this->get() );
[24] Fix | Delete
$googlebot = $this->filter( $googlebot );
[25] Fix | Delete
[26] Fix | Delete
if ( \is_string( $googlebot ) && $googlebot !== '' ) {
[27] Fix | Delete
return \sprintf( '<meta name="googlebot" content="%s" />', \esc_attr( $googlebot ) );
[28] Fix | Delete
}
[29] Fix | Delete
[30] Fix | Delete
return '';
[31] Fix | Delete
}
[32] Fix | Delete
[33] Fix | Delete
/**
[34] Fix | Delete
* Gets the raw value of a presentation.
[35] Fix | Delete
*
[36] Fix | Delete
* @deprecated 14.9 Values merged into the robots meta tag.
[37] Fix | Delete
* @codeCoverageIgnore
[38] Fix | Delete
*
[39] Fix | Delete
* @return array The raw value.
[40] Fix | Delete
*/
[41] Fix | Delete
public function get() {
[42] Fix | Delete
\_deprecated_function( __METHOD__, 'WPSEO 14.9' );
[43] Fix | Delete
[44] Fix | Delete
return $this->presentation->googlebot;
[45] Fix | Delete
}
[46] Fix | Delete
[47] Fix | Delete
/**
[48] Fix | Delete
* Run the googlebot output content through the `wpseo_googlebot` filter.
[49] Fix | Delete
*
[50] Fix | Delete
* @param string $googlebot The meta googlebot output to filter.
[51] Fix | Delete
*
[52] Fix | Delete
* @return string The filtered meta googlebot output.
[53] Fix | Delete
*/
[54] Fix | Delete
private function filter( $googlebot ) {
[55] Fix | Delete
/**
[56] Fix | Delete
* Filter: 'wpseo_googlebot' - Allows filtering of the meta googlebot output of Yoast SEO.
[57] Fix | Delete
*
[58] Fix | Delete
* @api string $googlebot The meta googlebot directives to be echoed.
[59] Fix | Delete
*
[60] Fix | Delete
* @param Indexable_Presentation $presentation The presentation of an indexable.
[61] Fix | Delete
*/
[62] Fix | Delete
return (string) \apply_filters( 'wpseo_googlebot', $googlebot, $this->presentation );
[63] Fix | Delete
}
[64] Fix | Delete
}
[65] Fix | Delete
[66] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function