Ticket #23118: 23118.diff
File 23118.diff, 9.8 KB (added by , 12 years ago) |
---|
-
wp-admin/includes/dashboard.php
232 232 233 233 $num_tags = wp_count_terms('post_tag'); 234 234 235 $num_comm = wp_count_comments( 235 $num_comm = wp_count_comments(); 236 236 237 237 echo "\n\t".'<div class="table table_content">'; 238 238 echo "\n\t".'<p class="sub">' . __('Content') . '</p>'."\n\t".'<table>'; -
wp-admin/includes/theme-install.php
28 28 * 29 29 * @return array 30 30 */ 31 function install_themes_feature_list( 31 function install_themes_feature_list() { 32 32 if ( !$cache = get_transient( 'wporg_theme_feature_list' ) ) 33 33 set_transient( 'wporg_theme_feature_list', array(), 3 * HOUR_IN_SECONDS ); 34 34 35 35 if ( $cache ) 36 36 return $cache; 37 37 38 $feature_list = themes_api( 'feature_list', array( 38 $feature_list = themes_api( 'feature_list', array() ); 39 39 if ( is_wp_error( $feature_list ) ) 40 40 return $features; 41 41 … … 100 100 <form method="get" action=""> 101 101 <input type="hidden" name="tab" value="search" /> 102 102 <?php 103 $feature_list = get_theme_feature_list( 103 $feature_list = get_theme_feature_list(); 104 104 echo '<div class="feature-filter">'; 105 105 106 106 foreach ( (array) $feature_list as $feature_name => $features ) { -
wp-admin/includes/theme.php
216 216 return $features; 217 217 218 218 if ( !$feature_list = get_site_transient( 'wporg_theme_feature_list' ) ) 219 set_site_transient( 'wporg_theme_feature_list', array( 219 set_site_transient( 'wporg_theme_feature_list', array(), 10800); 220 220 221 221 if ( !$feature_list ) { 222 $feature_list = themes_api( 'feature_list', array( 222 $feature_list = themes_api( 'feature_list', array() ); 223 223 if ( is_wp_error( $feature_list ) ) 224 224 return $features; 225 225 } -
wp-admin/includes/upgrade.php
218 218 update_option( 'widget_archives', array ( 2 => array ( 'title' => '', 'count' => 0, 'dropdown' => 0 ), '_multiwidget' => 1 ) ); 219 219 update_option( 'widget_categories', array ( 2 => array ( 'title' => '', 'count' => 0, 'hierarchical' => 0, 'dropdown' => 0 ), '_multiwidget' => 1 ) ); 220 220 update_option( 'widget_meta', array ( 2 => array ( 'title' => '' ), '_multiwidget' => 1 ) ); 221 update_option( 'sidebars_widgets', array ( 'wp_inactive_widgets' => array ( ), 'sidebar-1' => array ( 0 => 'search-2', 1 => 'recent-posts-2', 2 => 'recent-comments-2', 3 => 'archives-2', 4 => 'categories-2', 5 => 'meta-2', ), 'sidebar-2' => array ( ), 'sidebar-3' => array (), 'array_version' => 3 ) );221 update_option( 'sidebars_widgets', array ( 'wp_inactive_widgets' => array (), 'sidebar-1' => array ( 0 => 'search-2', 1 => 'recent-posts-2', 2 => 'recent-comments-2', 3 => 'archives-2', 4 => 'categories-2', 5 => 'meta-2', ), 'sidebar-2' => array (), 'sidebar-3' => array (), 'array_version' => 3 ) ); 222 222 223 223 if ( ! is_multisite() ) 224 224 update_user_meta( $user_id, 'show_welcome_panel', 1 ); -
wp-includes/comment.php
415 415 * 416 416 * @return array List of comment statuses. 417 417 */ 418 function get_comment_statuses( 418 function get_comment_statuses() { 419 419 $status = array( 420 420 'hold' => __('Unapproved'), 421 421 /* translators: comment status */ -
wp-includes/default-constants.php
12 12 * 13 13 * @since 3.0.0 14 14 */ 15 function wp_initial_constants( 15 function wp_initial_constants() { 16 16 global $blog_id; 17 17 18 18 // set memory limits … … 89 89 * 90 90 * @since 3.0.0 91 91 */ 92 function wp_plugin_directory_constants( 92 function wp_plugin_directory_constants() { 93 93 if ( !defined('WP_CONTENT_URL') ) 94 94 define( 'WP_CONTENT_URL', get_option('siteurl') . '/wp-content'); // full url - WP_CONTENT_DIR is defined further up 95 95 … … 150 150 * Defines constants after multisite is loaded. Cookie-related constants may be overridden in ms_network_cookies(). 151 151 * @since 3.0.0 152 152 */ 153 function wp_cookie_constants( 153 function wp_cookie_constants() { 154 154 /** 155 155 * Used to guarantee unique hash cookies 156 156 * @since 1.5 … … 235 235 * 236 236 * @since 3.0.0 237 237 */ 238 function wp_ssl_constants( 238 function wp_ssl_constants() { 239 239 /** 240 240 * @since 2.6.0 241 241 */ … … 256 256 * 257 257 * @since 3.0.0 258 258 */ 259 function wp_functionality_constants( 259 function wp_functionality_constants() { 260 260 /** 261 261 * @since 2.5.0 262 262 */ … … 284 284 * 285 285 * @since 3.0.0 286 286 */ 287 function wp_templating_constants( 287 function wp_templating_constants() { 288 288 /** 289 289 * Filesystem path to the current active template directory 290 290 * @since 1.5.0 -
wp-includes/formatting.php
2977 2977 * @return string The formatted string. 2978 2978 */ 2979 2979 function wp_sprintf( $pattern ) { 2980 $args = func_get_args( 2980 $args = func_get_args(); 2981 2981 $len = strlen($pattern); 2982 2982 $start = 0; 2983 2983 $result = ''; -
wp-includes/post.php
861 861 * 862 862 * @return array List of post statuses. 863 863 */ 864 function get_post_statuses( 864 function get_post_statuses() { 865 865 $status = array( 866 866 'draft' => __('Draft'), 867 867 'pending' => __('Pending Review'), … … 882 882 * 883 883 * @return array List of page statuses. 884 884 */ 885 function get_page_statuses( 885 function get_page_statuses() { 886 886 $status = array( 887 887 'draft' => __('Draft'), 888 888 'private' => __('Private'), … … 2173 2173 $and = wp_post_mime_type_where( $mime_type ); 2174 2174 $count = $wpdb->get_results( "SELECT post_mime_type, COUNT( * ) AS num_posts FROM $wpdb->posts WHERE post_type = 'attachment' AND post_status != 'trash' $and GROUP BY post_mime_type", ARRAY_A ); 2175 2175 2176 $stats = array( 2176 $stats = array(); 2177 2177 foreach( (array) $count as $row ) { 2178 2178 $stats[$row['post_mime_type']] = $row['num_posts']; 2179 2179 } -
wp-includes/update.php
51 51 else 52 52 $mysql_version = 'N/A'; 53 53 54 if ( is_multisite( 55 $user_count = get_user_count( 56 $num_blogs = get_blog_count( 57 $wp_install = network_site_url( 54 if ( is_multisite() ) { 55 $user_count = get_user_count(); 56 $num_blogs = get_blog_count(); 57 $wp_install = network_site_url(); 58 58 $multisite_enabled = 1; 59 59 } else { 60 $user_count = count_users( 60 $user_count = count_users(); 61 61 $user_count = $user_count['total_users']; 62 62 $multisite_enabled = 0; 63 63 $num_blogs = 1; … … 274 274 $timeout = 12 * HOUR_IN_SECONDS; 275 275 } 276 276 277 $time_not_changed = isset( $last_update->last_checked ) && $timeout > ( time( 277 $time_not_changed = isset( $last_update->last_checked ) && $timeout > ( time() - $last_update->last_checked ); 278 278 279 279 if ( $time_not_changed ) { 280 280 $theme_changed = false; … … 313 313 return false; 314 314 315 315 $new_update = new stdClass; 316 $new_update->last_checked = time( 316 $new_update->last_checked = time(); 317 317 $new_update->checked = $checked; 318 318 319 319 $response = maybe_unserialize( wp_remote_retrieve_body( $raw_response ) ); … … 404 404 * @since 2.7.0 405 405 * @access private 406 406 */ 407 function _maybe_update_themes( 407 function _maybe_update_themes() { 408 408 $current = get_site_transient( 'update_themes' ); 409 if ( isset( $current->last_checked ) && 12 * HOUR_IN_SECONDS > ( time( 409 if ( isset( $current->last_checked ) && 12 * HOUR_IN_SECONDS > ( time() - $current->last_checked ) ) 410 410 return; 411 411 412 412 wp_update_themes(); -
wp-settings.php
23 23 require( ABSPATH . WPINC . '/version.php' ); 24 24 25 25 // Set initial default constants including WP_MEMORY_LIMIT, WP_MAX_MEMORY_LIMIT, WP_DEBUG, WP_CONTENT_DIR and WP_CACHE. 26 wp_initial_constants( 26 wp_initial_constants(); 27 27 28 28 // Check for the required PHP version and for the MySQL extension or a database drop-in. 29 29 wp_check_php_mysql_versions(); … … 152 152 153 153 // Define constants that rely on the API to obtain the default value. 154 154 // Define must-use plugin directory constants, which may be overridden in the sunrise.php drop-in. 155 wp_plugin_directory_constants( 155 wp_plugin_directory_constants(); 156 156 157 157 // Load must-use plugins. 158 158 foreach ( wp_get_mu_plugins() as $mu_plugin ) { … … 174 174 ms_cookie_constants( ); 175 175 176 176 // Define constants after multisite is loaded. Cookie-related constants may be overridden in ms_network_cookies(). 177 wp_cookie_constants( 177 wp_cookie_constants(); 178 178 179 179 // Define and enforce our SSL constants 180 wp_ssl_constants( 180 wp_ssl_constants(); 181 181 182 182 // Create common globals. 183 183 require( ABSPATH . WPINC . '/vars.php' ); … … 209 209 do_action( 'plugins_loaded' ); 210 210 211 211 // Define constants which affect functionality if not already defined. 212 wp_functionality_constants( 212 wp_functionality_constants(); 213 213 214 214 // Add magic quotes and set up $_REQUEST ( $_GET + $_POST ) 215 215 wp_magic_quotes();