WPSEO_Addon_Manager::get_site_information_transient()
Retrieves the transient value with the site information.
Метод класса: WPSEO_Addon_Manager{}
Хуков нет.
Возвращает
stdClass|false
. The transient value.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->get_site_information_transient();
Код WPSEO_Addon_Manager::get_site_information_transient() WPSEO Addon Manager::get site information transient Yoast 22.3
protected function get_site_information_transient() { global $pagenow; // Force re-check on license & dashboard pages. $current_page = null; // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Reason: We are not processing form information. if ( isset( $_GET['page'] ) && is_string( $_GET['page'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended,WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason: We are not processing form information, We are only strictly comparing and thus no need to sanitize. $current_page = wp_unslash( $_GET['page'] ); } // Check whether the licenses are valid or whether we need to show notifications. $quick = ( $current_page === 'wpseo_licenses' || $current_page === 'wpseo_dashboard' ); // Also do a fresh request on Plugins & Core Update pages. $quick = $quick || $pagenow === 'plugins.php'; $quick = $quick || $pagenow === 'update-core.php'; if ( $quick ) { return get_transient( self::SITE_INFORMATION_TRANSIENT_QUICK ); } return get_transient( self::SITE_INFORMATION_TRANSIENT ); }