Yoast\WP\SEO\Bulk_Editor\User_Interface
Bulk_Editor_Integration::has_update_package
Checks whether WordPress has an update package ready to install for Yoast WooCommerce SEO, for a version that fills the products "Image alt text" tab.
An update cached before that version came out would install an older one, after which the modal reopens.
Метод класса: Bulk_Editor_Integration{}
Хуков нет.
Возвращает
bool. Whether update.php can install a version that fills the tab.
Использование
// private - только в коде основоного (родительского) класса $result = $this->has_update_package( $plugin_file ): bool;
- $plugin_file(строка) (обязательный)
- The plugin file, relative to the plugins directory.
Код Bulk_Editor_Integration::has_update_package() Bulk Editor Integration::has update package Yoast 28.9
private function has_update_package( string $plugin_file ): bool {
$updates = \get_site_transient( 'update_plugins' );
if ( ! \is_object( $updates ) || ! isset( $updates->response[ $plugin_file ] ) ) {
return false;
}
$update = $updates->response[ $plugin_file ];
return ! empty( $update->package )
&& isset( $update->new_version )
&& \version_compare( $update->new_version, self::LAST_UNSUPPORTED_WOO_SEO_VERSION, '>' );
}