Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../public_h.../wp-conte.../plugins/wordpres.../src/presente...
File: meta-description-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
/**
[6] Fix | Delete
* Presenter class for the meta description.
[7] Fix | Delete
*/
[8] Fix | Delete
class Meta_Description_Presenter extends Abstract_Indexable_Tag_Presenter {
[9] Fix | Delete
[10] Fix | Delete
/**
[11] Fix | Delete
* The tag key name.
[12] Fix | Delete
*
[13] Fix | Delete
* @var string
[14] Fix | Delete
*/
[15] Fix | Delete
protected $key = 'description';
[16] Fix | Delete
[17] Fix | Delete
/**
[18] Fix | Delete
* Returns the meta description for a post.
[19] Fix | Delete
*
[20] Fix | Delete
* @return string The meta description tag.
[21] Fix | Delete
*/
[22] Fix | Delete
public function present() {
[23] Fix | Delete
$output = parent::present();
[24] Fix | Delete
[25] Fix | Delete
if ( ! empty( $output ) ) {
[26] Fix | Delete
return $output;
[27] Fix | Delete
}
[28] Fix | Delete
[29] Fix | Delete
if ( \current_user_can( 'wpseo_manage_options' ) ) {
[30] Fix | Delete
return '<!-- '
[31] Fix | Delete
. \sprintf(
[32] Fix | Delete
/* translators: %1$s resolves to Yoast SEO, %2$s resolves to the Settings submenu item. */
[33] Fix | Delete
\esc_html__( 'Admin only notice: this page does not show a meta description because it does not have one, either write it for this page specifically or go into the [%1$s - %2$s] menu and set up a template.', 'wordpress-seo' ),
[34] Fix | Delete
\esc_html__( 'Yoast SEO', 'wordpress-seo' ),
[35] Fix | Delete
\esc_html__( 'Settings', 'wordpress-seo' )
[36] Fix | Delete
)
[37] Fix | Delete
. ' -->';
[38] Fix | Delete
}
[39] Fix | Delete
[40] Fix | Delete
return '';
[41] Fix | Delete
}
[42] Fix | Delete
[43] Fix | Delete
/**
[44] Fix | Delete
* Run the meta description content through replace vars, the `wpseo_metadesc` filter and sanitization.
[45] Fix | Delete
*
[46] Fix | Delete
* @return string The filtered meta description.
[47] Fix | Delete
*/
[48] Fix | Delete
public function get() {
[49] Fix | Delete
$meta_description = $this->replace_vars( $this->presentation->meta_description );
[50] Fix | Delete
[51] Fix | Delete
/**
[52] Fix | Delete
* Filter: 'wpseo_metadesc' - Allow changing the Yoast SEO meta description sentence.
[53] Fix | Delete
*
[54] Fix | Delete
* @param string $meta_description The description sentence.
[55] Fix | Delete
* @param Indexable_Presentation $presentation The presentation of an indexable.
[56] Fix | Delete
*/
[57] Fix | Delete
$meta_description = \apply_filters( 'wpseo_metadesc', $meta_description, $this->presentation );
[58] Fix | Delete
$meta_description = $this->helpers->string->strip_all_tags( \stripslashes( $meta_description ) );
[59] Fix | Delete
return \trim( $meta_description );
[60] Fix | Delete
}
[61] Fix | Delete
}
[62] Fix | Delete
[63] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function