Yoast\WP\SEO\Conditionals\Admin
Estimated_Reading_Time_Conditional::is_met()
Returns whether or not this conditional is met.
Метод класса: Estimated_Reading_Time_Conditional{}
Хуков нет.
Возвращает
true|false
. Whether or not the conditional is met.
Использование
$Estimated_Reading_Time_Conditional = new Estimated_Reading_Time_Conditional(); $Estimated_Reading_Time_Conditional->is_met();
Код Estimated_Reading_Time_Conditional::is_met() Estimated Reading Time Conditional::is met Yoast 20.0
public function is_met() { // Check if we are in our Elementor ajax request (for saving). if ( \wp_doing_ajax() ) { // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged -- This deprecation will be addressed later. $post_action = $this->input_helper->filter( \INPUT_POST, 'action', @\FILTER_SANITIZE_STRING ); if ( $post_action === 'wpseo_elementor_save' ) { return true; } } if ( ! $this->post_conditional->is_met() ) { return false; } // We don't support Estimated Reading Time on the attachment post type. $post_id = (int) $this->input_helper->filter( \INPUT_GET, 'post', \FILTER_SANITIZE_NUMBER_INT ); if ( \get_post_type( $post_id ) === 'attachment' ) { return false; } return true; }