$GLOBALS['post']; return $this->post; } return null; } /** * Checks whether or not the metabox related scripts should be loaded. * * @return bool True when it should be loaded. */ protected function load_metabox() { // When the current page isn't a post related one. if ( WPSEO_Metabox::is_post_edit( $this->get_current_page() ) ) { return WPSEO_Post_Type::has_metabox_enabled( $this->current_page_helper->get_current_post_type() ); } // Make sure ajax integrations are loaded. return \wp_doing_ajax(); } /** * Retrieves the value of the pagenow variable. * * @codeCoverageIgnore * * @return string The value of pagenow. */ protected function get_current_page() { global $pagenow; return $pagenow; } /** * Returns whether or not we need to index more posts for correct link suggestion functionality. * * @return bool Whether or not we need to index more posts. */ protected function is_prominent_words_indexing_completed() { $is_indexing_completed = $this->prominent_words_helper->is_indexing_completed(); if ( $is_indexing_completed === null ) { $indexation_integration = \YoastSEOPremium()->classes->get( Indexing_Integration::class ); $is_indexing_completed = $indexation_integration->get_unindexed_count( 0 ) === 0; $this->prominent_words_helper->set_indexing_completed( $is_indexing_completed ); } return $is_indexing_completed; } /** * Returns the number of prominent words to store for content written in the given language. * * @param string $language The current language. * * @return int The number of words to store. */ protected function per_indexable_limit( $language ) { if ( \YoastSEO()->helpers->language->has_function_word_support( $language ) ) { return Indexing_Integration::PER_INDEXABLE_LIMIT; } return Indexing_Integration::PER_INDEXABLE_LIMIT_NO_FUNCTION_WORD_SUPPORT; } }
No account yet?
Create an Account