upgrade_460()WP 4.6.0

Executes changes made in WordPress 4.6.0.

Хуков нет.

Возвращает

null. Ничего (null).

Использование

upgrade_460();

Заметки

  • Global. int. $wp_current_db_version The old (current) database version.

Список изменений

С версии 4.6.0 Введена.

Код upgrade_460() WP 6.5.2

function upgrade_460() {
	global $wp_current_db_version;

	// Remove unused post meta.
	if ( $wp_current_db_version < 37854 ) {
		delete_post_meta_by_key( '_post_restored_from' );
	}

	// Remove plugins with callback as an array object/method as the uninstall hook, see #13786.
	if ( $wp_current_db_version < 37965 ) {
		$uninstall_plugins = get_option( 'uninstall_plugins', array() );

		if ( ! empty( $uninstall_plugins ) ) {
			foreach ( $uninstall_plugins as $basename => $callback ) {
				if ( is_array( $callback ) && is_object( $callback[0] ) ) {
					unset( $uninstall_plugins[ $basename ] );
				}
			}

			update_option( 'uninstall_plugins', $uninstall_plugins );
		}
	}
}