Ticket #25467: 25467-4.diff
File 25467-4.diff, 2.6 KB (added by , 12 years ago) |
---|
-
src/wp-includes/update.php
42 42 if ( $time_not_changed ) 43 43 return false; 44 44 45 $locale = apply_filters( 'core_version_check_locale', get_locale() ); 45 $locale = get_locale(); 46 /** 47 * Filter the locale requested for WordPress core translations. 48 * 49 * @since 2.8.0 50 * 51 * @param string $locale Defaults to the current locale of the site. 52 */ 53 $locale = apply_filters( 'core_version_check_locale', $locale ); 46 54 47 55 // Update last_checked for current to prevent multiple blocking requests if request hangs 48 56 $current->last_checked = time(); … … 212 220 213 221 $to_send = compact( 'plugins', 'active' ); 214 222 223 $locales = array( get_locale() ); 215 224 /** 216 225 * Filter the locales requested for plugin translations. 217 226 * … … 219 228 * 220 229 * @param array $locales Defaults to the current locale of the site. 221 230 */ 222 $locales = apply_filters( 'plugins_update_check_locales', array( get_locale() ));231 $locales = apply_filters( 'plugins_update_check_locales', $locales ); 223 232 224 233 $options = array( 225 234 'timeout' => ( ( defined('DOING_CRON') && DOING_CRON ) ? 30 : 3), … … 347 356 348 357 $request['themes'] = $themes; 349 358 359 $locales = array( get_locale() ); 350 360 /** 351 361 * Filter the locales requested for theme translations. 352 362 * … … 354 364 * 355 365 * @param array $locales Defaults to the current locale of the site. 356 366 */ 357 $locales = apply_filters( 'themes_update_check_locales', array( get_locale() ));367 $locales = apply_filters( 'themes_update_check_locales', $locales ); 358 368 359 369 $options = array( 360 370 'timeout' => ( ( defined('DOING_CRON') && DOING_CRON ) ? 30 : 3), … … 443 453 444 454 $update_title = $titles ? esc_attr( implode( ', ', $titles ) ) : ''; 445 455 446 return apply_filters( 'wp_get_update_data', array( 'counts' => $counts, 'title' => $update_title ), $titles ); 456 $updates_counts_title = array( 'counts' => $counts, 'title' => $update_title ); 457 /** 458 * Filter the array of counts and titles of update data of plugins, themes and WordPress core. 459 * 460 * @since 3.5.0 461 * 462 * @param array $updates_counts_title { 463 * Fetched update data. 464 * 465 * @type array $counts How many updates are available for plugins, themes and WordPress. 466 * @type string $update_title Titles of available updates. 467 * } 468 * @param array $titles Array of the titles of available updates. 469 */ 470 return apply_filters( 'wp_get_update_data', $updates_counts_title, $titles ); 447 471 } 448 472 449 473 function _maybe_update_core() {