wp_update_core() - WordPress 函数参考中文文档

返回介绍

wp_update_core()

发布于 2017-09-11 字数 1374 浏览 942 评论 0

Warning: This function has been deprecated. Use Core_Upgrader() instead.

wp_update_core( $current,  $feedback = '' )

This was once used to kick-off the Core Updater.


描述

Deprecated in favor of instantating a Core_Upgrader instance directly, and calling the ‘upgrade’ method.


源代码

File: wp-admin/includes/deprecated.php

function wp_update_core($current, $feedback = '') {
	_deprecated_function( __FUNCTION__, '3.7.0', 'new Core_Upgrader();' );

	if ( !empty($feedback) )
		add_filter('update_feedback', $feedback);

	include( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
	$upgrader = new Core_Upgrader();
	return $upgrader->upgrade($current);

}

更新日志

Version 描述
3.7.0 Use Core_Upgrader
2.7.0 Introduced.

相关函数

Uses

  • wp-includes/functions.php:
    _deprecated_function()
  • wp-includes/plugin.php:
    add_filter()

User Contributed Notes

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

目前还没有任何评论,快来抢沙发吧!