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.../httpdocs/wp-conte.../plugins/wordpres.../src/presente...
File: meta-author-presenter.php
<?php
[0] Fix | Delete
[1] Fix | Delete
namespace Yoast\WP\SEO\Presenters;
[2] Fix | Delete
[3] Fix | Delete
use WP_User;
[4] Fix | Delete
use Yoast\WP\SEO\Presentations\Indexable_Presentation;
[5] Fix | Delete
[6] Fix | Delete
/**
[7] Fix | Delete
* Presenter class for the meta author tag.
[8] Fix | Delete
*/
[9] Fix | Delete
class Meta_Author_Presenter extends Abstract_Indexable_Tag_Presenter {
[10] Fix | Delete
[11] Fix | Delete
/**
[12] Fix | Delete
* The tag key name.
[13] Fix | Delete
*
[14] Fix | Delete
* @var string
[15] Fix | Delete
*/
[16] Fix | Delete
protected $key = 'author';
[17] Fix | Delete
[18] Fix | Delete
/**
[19] Fix | Delete
* Returns the author for a post in a meta author tag.
[20] Fix | Delete
*
[21] Fix | Delete
* @return string The meta author tag.
[22] Fix | Delete
*/
[23] Fix | Delete
public function present() {
[24] Fix | Delete
$output = parent::present();
[25] Fix | Delete
[26] Fix | Delete
if ( ! empty( $output ) ) {
[27] Fix | Delete
return $output;
[28] Fix | Delete
}
[29] Fix | Delete
[30] Fix | Delete
return '';
[31] Fix | Delete
}
[32] Fix | Delete
[33] Fix | Delete
/**
[34] Fix | Delete
* Get the author's display name.
[35] Fix | Delete
*
[36] Fix | Delete
* @return string The author's display name.
[37] Fix | Delete
*/
[38] Fix | Delete
public function get() {
[39] Fix | Delete
if ( $this->presentation->model->object_sub_type !== 'post' ) {
[40] Fix | Delete
return '';
[41] Fix | Delete
}
[42] Fix | Delete
[43] Fix | Delete
$user_data = \get_userdata( $this->presentation->context->post->post_author );
[44] Fix | Delete
[45] Fix | Delete
if ( ! $user_data instanceof WP_User ) {
[46] Fix | Delete
return '';
[47] Fix | Delete
}
[48] Fix | Delete
[49] Fix | Delete
/**
[50] Fix | Delete
* Filter: 'wpseo_meta_author' - Allow developers to filter the article's author meta tag.
[51] Fix | Delete
*
[52] Fix | Delete
* @param string $author_name The article author's display name. Return empty to disable the tag.
[53] Fix | Delete
* @param Indexable_Presentation $presentation The presentation of an indexable.
[54] Fix | Delete
*/
[55] Fix | Delete
return \trim( $this->helpers->schema->html->smart_strip_tags( \apply_filters( 'wpseo_meta_author', $user_data->display_name, $this->presentation ) ) );
[56] Fix | Delete
}
[57] Fix | Delete
}
[58] Fix | Delete
[59] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function