Fix usage of undeclared variables.
* the_weekday_date() needs the global $currentday * ms_site_check() needs the global $current_site * media list table does not need to check for $total_orphans * upgrader has no $feedback variable, appears to be copypasta from other upgrade APIs * install_themes_feature_list() has no $features variable, return array() instead of a new return type of WP_Error see #24210. git-svn-id: http://core.svn.wordpress.org/trunk@24189 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
3b4a087007
commit
a518fb0c94
|
@ -47,8 +47,7 @@ class WP_Media_List_Table extends WP_List_Table {
|
|||
$type_links = array();
|
||||
$_num_posts = (array) wp_count_attachments();
|
||||
$_total_posts = array_sum($_num_posts) - $_num_posts['trash'];
|
||||
if ( !isset( $total_orphans ) )
|
||||
$total_orphans = $wpdb->get_var( "SELECT COUNT( * ) FROM $wpdb->posts WHERE post_type = 'attachment' AND post_status != 'trash' AND post_parent < 1" );
|
||||
$total_orphans = $wpdb->get_var( "SELECT COUNT( * ) FROM $wpdb->posts WHERE post_type = 'attachment' AND post_status != 'trash' AND post_parent < 1" );
|
||||
$matches = wp_match_mime_types(array_keys($post_mime_types), array_keys($_num_posts));
|
||||
foreach ( $matches as $type => $reals )
|
||||
foreach ( $reals as $real )
|
||||
|
|
|
@ -1029,9 +1029,6 @@ class Core_Upgrader extends WP_Upgrader {
|
|||
$this->init();
|
||||
$this->upgrade_strings();
|
||||
|
||||
if ( !empty($feedback) )
|
||||
add_filter('update_feedback', $feedback);
|
||||
|
||||
// Is an update available?
|
||||
if ( !isset( $current->response ) || $current->response == 'latest' )
|
||||
return new WP_Error('up_to_date', $this->strings['up_to_date']);
|
||||
|
|
|
@ -29,6 +29,8 @@ $theme_field_defaults = array( 'description' => true, 'sections' => false, 'test
|
|||
* @return array
|
||||
*/
|
||||
function install_themes_feature_list() {
|
||||
_deprecated_function( __FUNCTION__, '3.1', 'get_theme_feature_list()' );
|
||||
|
||||
if ( !$cache = get_transient( 'wporg_theme_feature_list' ) )
|
||||
set_transient( 'wporg_theme_feature_list', array(), 3 * HOUR_IN_SECONDS );
|
||||
|
||||
|
@ -37,7 +39,7 @@ function install_themes_feature_list() {
|
|||
|
||||
$feature_list = themes_api( 'feature_list', array() );
|
||||
if ( is_wp_error( $feature_list ) )
|
||||
return $features;
|
||||
return array();
|
||||
|
||||
set_transient( 'wporg_theme_feature_list', $feature_list, 3 * HOUR_IN_SECONDS );
|
||||
|
||||
|
|
|
@ -1579,7 +1579,7 @@ function the_weekday() {
|
|||
* @param string $after Optional Output after the date.
|
||||
*/
|
||||
function the_weekday_date($before='',$after='') {
|
||||
global $wp_locale, $day, $previousweekday;
|
||||
global $wp_locale, $currentday, $previousweekday;
|
||||
$the_weekday_date = '';
|
||||
if ( $currentday != $previousweekday ) {
|
||||
$the_weekday_date .= $before;
|
||||
|
|
|
@ -69,7 +69,7 @@ function wp_get_active_network_plugins() {
|
|||
* @return bool|string Returns true on success, or drop-in file to include.
|
||||
*/
|
||||
function ms_site_check() {
|
||||
global $wpdb;
|
||||
global $wpdb, $current_site;
|
||||
|
||||
$blog = get_blog_details();
|
||||
|
||||
|
|
Loading…
Reference in New Issue