WPSEO_Upgrade::upgrade_125()
Performs the 12.5 upgrade.
Метод класса: WPSEO_Upgrade{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$WPSEO_Upgrade = new WPSEO_Upgrade(); $WPSEO_Upgrade->upgrade_125();
Код WPSEO_Upgrade::upgrade_125() WPSEO Upgrade::upgrade 125 Yoast 24.9
public function upgrade_125() { // Disables the force rewrite title when the theme supports it through WordPress. if ( WPSEO_Options::get( 'forcerewritetitle', false ) && current_theme_supports( 'title-tag' ) ) { WPSEO_Options::set( 'forcerewritetitle', false ); } global $wpdb; // phpcs:disable WordPress.DB.DirectDatabaseQuery.NoCaching -- Reason: No relevant caches. // phpcs:disable WordPress.DB.DirectDatabaseQuery.DirectQuery -- Reason: Most performant way. $wpdb->query( $wpdb->prepare( 'DELETE FROM %i WHERE %i = %s', [ $wpdb->usermeta, 'meta_key', 'wp_yoast_promo_hide_premium_upsell_admin_block' ] ) ); // Removes the WordPress update notification, because it is no longer necessary when WordPress 5.3 is released. $center = Yoast_Notification_Center::get(); $center->remove_notification_by_id( 'wpseo-dismiss-wordpress-upgrade' ); }