WordPress开发者和主题制作者的搜索引擎



get_plugin_updates ›

Since2.9.0
已弃用n/a
get_plugin_updates ( 没有参数 )
返回:
  • (array)
定义在:
文档:

暂无描述



源码

function get_plugin_updates() {
	$all_plugins     = get_plugins();
	$upgrade_plugins = array();
	$current         = get_site_transient( 'update_plugins' );
	foreach ( (array) $all_plugins as $plugin_file => $plugin_data ) {
		if ( isset( $current->response[ $plugin_file ] ) ) {
			$upgrade_plugins[ $plugin_file ]         = (object) $plugin_data;
			$upgrade_plugins[ $plugin_file ]->update = $current->response[ $plugin_file ];
		}
	}

	return $upgrade_plugins;
}