Tighten our braces. Fixes #23118 props evansolomon.

git-svn-id: http://core.svn.wordpress.org/trunk@23265 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Peter Westwood 2013-01-04 10:13:51 +00:00
parent 2428b370a2
commit f683fc7677
10 changed files with 32 additions and 32 deletions

View File

@ -232,7 +232,7 @@ function wp_dashboard_right_now() {
$num_tags = wp_count_terms('post_tag');
$num_comm = wp_count_comments( );
$num_comm = wp_count_comments();
echo "\n\t".'<div class="table table_content">';
echo "\n\t".'<p class="sub">' . __('Content') . '</p>'."\n\t".'<table>';

View File

@ -28,14 +28,14 @@ $theme_field_defaults = array( 'description' => true, 'sections' => false, 'test
*
* @return array
*/
function install_themes_feature_list( ) {
function install_themes_feature_list() {
if ( !$cache = get_transient( 'wporg_theme_feature_list' ) )
set_transient( 'wporg_theme_feature_list', array(), 3 * HOUR_IN_SECONDS );
if ( $cache )
return $cache;
$feature_list = themes_api( 'feature_list', array( ) );
$feature_list = themes_api( 'feature_list', array() );
if ( is_wp_error( $feature_list ) )
return $features;
@ -100,7 +100,7 @@ function install_themes_dashboard() {
<form method="get" action="">
<input type="hidden" name="tab" value="search" />
<?php
$feature_list = get_theme_feature_list( );
$feature_list = get_theme_feature_list();
echo '<div class="feature-filter">';
foreach ( (array) $feature_list as $feature_name => $features ) {

View File

@ -216,10 +216,10 @@ function get_theme_feature_list( $api = true ) {
return $features;
if ( !$feature_list = get_site_transient( 'wporg_theme_feature_list' ) )
set_site_transient( 'wporg_theme_feature_list', array( ), 10800);
set_site_transient( 'wporg_theme_feature_list', array(), 10800);
if ( !$feature_list ) {
$feature_list = themes_api( 'feature_list', array( ) );
$feature_list = themes_api( 'feature_list', array() );
if ( is_wp_error( $feature_list ) )
return $features;
}

View File

@ -218,7 +218,7 @@ As a new WordPress user, you should go to <a href=\"%s\">your dashboard</a> to d
update_option( 'widget_archives', array ( 2 => array ( 'title' => '', 'count' => 0, 'dropdown' => 0 ), '_multiwidget' => 1 ) );
update_option( 'widget_categories', array ( 2 => array ( 'title' => '', 'count' => 0, 'hierarchical' => 0, 'dropdown' => 0 ), '_multiwidget' => 1 ) );
update_option( 'widget_meta', array ( 2 => array ( 'title' => '' ), '_multiwidget' => 1 ) );
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 ) );
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 ) );
if ( ! is_multisite() )
update_user_meta( $user_id, 'show_welcome_panel', 1 );

View File

@ -415,7 +415,7 @@ class WP_Comment_Query {
*
* @return array List of comment statuses.
*/
function get_comment_statuses( ) {
function get_comment_statuses() {
$status = array(
'hold' => __('Unapproved'),
/* translators: comment status */

View File

@ -12,7 +12,7 @@
*
* @since 3.0.0
*/
function wp_initial_constants( ) {
function wp_initial_constants() {
global $blog_id;
// set memory limits
@ -89,7 +89,7 @@ function wp_initial_constants( ) {
*
* @since 3.0.0
*/
function wp_plugin_directory_constants( ) {
function wp_plugin_directory_constants() {
if ( !defined('WP_CONTENT_URL') )
define( 'WP_CONTENT_URL', get_option('siteurl') . '/wp-content'); // full url - WP_CONTENT_DIR is defined further up
@ -150,7 +150,7 @@ function wp_plugin_directory_constants( ) {
* Defines constants after multisite is loaded. Cookie-related constants may be overridden in ms_network_cookies().
* @since 3.0.0
*/
function wp_cookie_constants( ) {
function wp_cookie_constants() {
/**
* Used to guarantee unique hash cookies
* @since 1.5
@ -235,7 +235,7 @@ function wp_cookie_constants( ) {
*
* @since 3.0.0
*/
function wp_ssl_constants( ) {
function wp_ssl_constants() {
/**
* @since 2.6.0
*/
@ -256,7 +256,7 @@ function wp_ssl_constants( ) {
*
* @since 3.0.0
*/
function wp_functionality_constants( ) {
function wp_functionality_constants() {
/**
* @since 2.5.0
*/
@ -284,7 +284,7 @@ function wp_functionality_constants( ) {
*
* @since 3.0.0
*/
function wp_templating_constants( ) {
function wp_templating_constants() {
/**
* Filesystem path to the current active template directory
* @since 1.5.0

View File

@ -2977,7 +2977,7 @@ function wp_pre_kses_less_than_callback( $matches ) {
* @return string The formatted string.
*/
function wp_sprintf( $pattern ) {
$args = func_get_args( );
$args = func_get_args();
$len = strlen($pattern);
$start = 0;
$result = '';

View File

@ -861,7 +861,7 @@ function get_post_status($ID = '') {
*
* @return array List of post statuses.
*/
function get_post_statuses( ) {
function get_post_statuses() {
$status = array(
'draft' => __('Draft'),
'pending' => __('Pending Review'),
@ -882,7 +882,7 @@ function get_post_statuses( ) {
*
* @return array List of page statuses.
*/
function get_page_statuses( ) {
function get_page_statuses() {
$status = array(
'draft' => __('Draft'),
'private' => __('Private'),
@ -2173,7 +2173,7 @@ function wp_count_attachments( $mime_type = '' ) {
$and = wp_post_mime_type_where( $mime_type );
$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 );
$stats = array( );
$stats = array();
foreach( (array) $count as $row ) {
$stats[$row['post_mime_type']] = $row['num_posts'];
}

View File

@ -51,13 +51,13 @@ function wp_version_check() {
else
$mysql_version = 'N/A';
if ( is_multisite( ) ) {
$user_count = get_user_count( );
$num_blogs = get_blog_count( );
$wp_install = network_site_url( );
if ( is_multisite() ) {
$user_count = get_user_count();
$num_blogs = get_blog_count();
$wp_install = network_site_url();
$multisite_enabled = 1;
} else {
$user_count = count_users( );
$user_count = count_users();
$user_count = $user_count['total_users'];
$multisite_enabled = 0;
$num_blogs = 1;
@ -274,7 +274,7 @@ function wp_update_themes() {
$timeout = 12 * HOUR_IN_SECONDS;
}
$time_not_changed = isset( $last_update->last_checked ) && $timeout > ( time( ) - $last_update->last_checked );
$time_not_changed = isset( $last_update->last_checked ) && $timeout > ( time() - $last_update->last_checked );
if ( $time_not_changed ) {
$theme_changed = false;
@ -313,7 +313,7 @@ function wp_update_themes() {
return false;
$new_update = new stdClass;
$new_update->last_checked = time( );
$new_update->last_checked = time();
$new_update->checked = $checked;
$response = maybe_unserialize( wp_remote_retrieve_body( $raw_response ) );
@ -404,9 +404,9 @@ function _maybe_update_plugins() {
* @since 2.7.0
* @access private
*/
function _maybe_update_themes( ) {
function _maybe_update_themes() {
$current = get_site_transient( 'update_themes' );
if ( isset( $current->last_checked ) && 12 * HOUR_IN_SECONDS > ( time( ) - $current->last_checked ) )
if ( isset( $current->last_checked ) && 12 * HOUR_IN_SECONDS > ( time() - $current->last_checked ) )
return;
wp_update_themes();

View File

@ -23,7 +23,7 @@ require( ABSPATH . WPINC . '/default-constants.php' );
require( ABSPATH . WPINC . '/version.php' );
// Set initial default constants including WP_MEMORY_LIMIT, WP_MAX_MEMORY_LIMIT, WP_DEBUG, WP_CONTENT_DIR and WP_CACHE.
wp_initial_constants( );
wp_initial_constants();
// Check for the required PHP version and for the MySQL extension or a database drop-in.
wp_check_php_mysql_versions();
@ -152,7 +152,7 @@ if ( is_multisite() ) {
// Define constants that rely on the API to obtain the default value.
// Define must-use plugin directory constants, which may be overridden in the sunrise.php drop-in.
wp_plugin_directory_constants( );
wp_plugin_directory_constants();
// Load must-use plugins.
foreach ( wp_get_mu_plugins() as $mu_plugin ) {
@ -174,10 +174,10 @@ if ( is_multisite() )
ms_cookie_constants( );
// Define constants after multisite is loaded. Cookie-related constants may be overridden in ms_network_cookies().
wp_cookie_constants( );
wp_cookie_constants();
// Define and enforce our SSL constants
wp_ssl_constants( );
wp_ssl_constants();
// Create common globals.
require( ABSPATH . WPINC . '/vars.php' );
@ -209,7 +209,7 @@ if ( WP_CACHE && function_exists( 'wp_cache_postload' ) )
do_action( 'plugins_loaded' );
// Define constants which affect functionality if not already defined.
wp_functionality_constants( );
wp_functionality_constants();
// Add magic quotes and set up $_REQUEST ( $_GET + $_POST )
wp_magic_quotes();