WordPress.org

Make WordPress Core

Changeset 23265


Ignore:
Timestamp:
01/04/13 10:13:51 (16 months ago)
Author:
westi
Message:

Tighten our braces. Fixes #23118 props evansolomon.

Location:
trunk
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/dashboard.php

    r23082 r23265  
    233233    $num_tags = wp_count_terms('post_tag'); 
    234234 
    235     $num_comm = wp_count_comments( ); 
     235    $num_comm = wp_count_comments(); 
    236236 
    237237    echo "\n\t".'<div class="table table_content">'; 
  • trunk/wp-admin/includes/theme-install.php

    r23175 r23265  
    2929 * @return array 
    3030 */ 
    31 function install_themes_feature_list( ) { 
     31function install_themes_feature_list() { 
    3232    if ( !$cache = get_transient( 'wporg_theme_feature_list' ) ) 
    3333        set_transient( 'wporg_theme_feature_list', array(), 3 * HOUR_IN_SECONDS ); 
     
    3636        return $cache; 
    3737 
    38     $feature_list = themes_api( 'feature_list', array( ) ); 
     38    $feature_list = themes_api( 'feature_list', array() ); 
    3939    if ( is_wp_error( $feature_list ) ) 
    4040        return $features; 
     
    101101    <input type="hidden" name="tab" value="search" /> 
    102102    <?php 
    103     $feature_list = get_theme_feature_list( ); 
     103    $feature_list = get_theme_feature_list(); 
    104104    echo '<div class="feature-filter">'; 
    105105 
  • trunk/wp-admin/includes/theme.php

    r21755 r23265  
    217217 
    218218    if ( !$feature_list = get_site_transient( 'wporg_theme_feature_list' ) ) 
    219         set_site_transient( 'wporg_theme_feature_list', array( ), 10800); 
     219        set_site_transient( 'wporg_theme_feature_list', array(), 10800); 
    220220 
    221221    if ( !$feature_list ) { 
    222         $feature_list = themes_api( 'feature_list', array( ) ); 
     222        $feature_list = themes_api( 'feature_list', array() ); 
    223223        if ( is_wp_error( $feature_list ) ) 
    224224            return $features; 
  • trunk/wp-admin/includes/upgrade.php

    r22911 r23265  
    219219    update_option( 'widget_categories', array ( 2 => array ( 'title' => '', 'count' => 0, 'hierarchical' => 0, 'dropdown' => 0 ), '_multiwidget' => 1 ) ); 
    220220    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 ) ); 
    222222 
    223223    if ( ! is_multisite() ) 
  • trunk/wp-includes/comment.php

    r23191 r23265  
    416416 * @return array List of comment statuses. 
    417417 */ 
    418 function get_comment_statuses( ) { 
     418function get_comment_statuses() { 
    419419    $status = array( 
    420420        'hold'      => __('Unapproved'), 
  • trunk/wp-includes/default-constants.php

    r22531 r23265  
    1313 * @since 3.0.0 
    1414 */ 
    15 function wp_initial_constants( ) { 
     15function wp_initial_constants() { 
    1616    global $blog_id; 
    1717 
     
    9090 * @since 3.0.0 
    9191 */ 
    92 function wp_plugin_directory_constants( ) { 
     92function wp_plugin_directory_constants() { 
    9393    if ( !defined('WP_CONTENT_URL') ) 
    9494        define( 'WP_CONTENT_URL', get_option('siteurl') . '/wp-content'); // full url - WP_CONTENT_DIR is defined further up 
     
    151151 * @since 3.0.0 
    152152 */ 
    153 function wp_cookie_constants( ) { 
     153function wp_cookie_constants() { 
    154154    /** 
    155155     * Used to guarantee unique hash cookies 
     
    236236 * @since 3.0.0 
    237237 */ 
    238 function wp_ssl_constants( ) { 
     238function wp_ssl_constants() { 
    239239    /** 
    240240     * @since 2.6.0 
     
    257257 * @since 3.0.0 
    258258 */ 
    259 function wp_functionality_constants( ) { 
     259function wp_functionality_constants() { 
    260260    /** 
    261261     * @since 2.5.0 
     
    285285 * @since 3.0.0 
    286286 */ 
    287 function wp_templating_constants( ) { 
     287function wp_templating_constants() { 
    288288    /** 
    289289     * Filesystem path to the current active template directory 
  • trunk/wp-includes/formatting.php

    r23189 r23265  
    29782978 */ 
    29792979function wp_sprintf( $pattern ) { 
    2980     $args = func_get_args( ); 
     2980    $args = func_get_args(); 
    29812981    $len = strlen($pattern); 
    29822982    $start = 0; 
  • trunk/wp-includes/post.php

    r23212 r23265  
    862862 * @return array List of post statuses. 
    863863 */ 
    864 function get_post_statuses( ) { 
     864function get_post_statuses() { 
    865865    $status = array( 
    866866        'draft'         => __('Draft'), 
     
    883883 * @return array List of page statuses. 
    884884 */ 
    885 function get_page_statuses( ) { 
     885function get_page_statuses() { 
    886886    $status = array( 
    887887        'draft'         => __('Draft'), 
     
    21742174    $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 ); 
    21752175 
    2176     $stats = array( ); 
     2176    $stats = array(); 
    21772177    foreach( (array) $count as $row ) { 
    21782178        $stats[$row['post_mime_type']] = $row['num_posts']; 
  • trunk/wp-includes/update.php

    r21996 r23265  
    5252        $mysql_version = 'N/A'; 
    5353 
    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(); 
    5858        $multisite_enabled = 1; 
    5959    } else { 
    60         $user_count = count_users( ); 
     60        $user_count = count_users(); 
    6161        $user_count = $user_count['total_users']; 
    6262        $multisite_enabled = 0; 
     
    275275    } 
    276276 
    277     $time_not_changed = isset( $last_update->last_checked ) && $timeout > ( time( ) - $last_update->last_checked ); 
     277    $time_not_changed = isset( $last_update->last_checked ) && $timeout > ( time() - $last_update->last_checked ); 
    278278 
    279279    if ( $time_not_changed ) { 
     
    314314 
    315315    $new_update = new stdClass; 
    316     $new_update->last_checked = time( ); 
     316    $new_update->last_checked = time(); 
    317317    $new_update->checked = $checked; 
    318318 
     
    405405 * @access private 
    406406 */ 
    407 function _maybe_update_themes( ) { 
     407function _maybe_update_themes() { 
    408408    $current = get_site_transient( 'update_themes' ); 
    409     if ( isset( $current->last_checked ) && 12 * HOUR_IN_SECONDS > ( time( ) - $current->last_checked ) ) 
     409    if ( isset( $current->last_checked ) && 12 * HOUR_IN_SECONDS > ( time() - $current->last_checked ) ) 
    410410        return; 
    411411 
  • trunk/wp-settings.php

    r22817 r23265  
    2424 
    2525// Set initial default constants including WP_MEMORY_LIMIT, WP_MAX_MEMORY_LIMIT, WP_DEBUG, WP_CONTENT_DIR and WP_CACHE. 
    26 wp_initial_constants( ); 
     26wp_initial_constants(); 
    2727 
    2828// Check for the required PHP version and for the MySQL extension or a database drop-in. 
     
    153153// Define constants that rely on the API to obtain the default value. 
    154154// Define must-use plugin directory constants, which may be overridden in the sunrise.php drop-in. 
    155 wp_plugin_directory_constants( ); 
     155wp_plugin_directory_constants(); 
    156156 
    157157// Load must-use plugins. 
     
    175175 
    176176// Define constants after multisite is loaded. Cookie-related constants may be overridden in ms_network_cookies(). 
    177 wp_cookie_constants( ); 
     177wp_cookie_constants(); 
    178178 
    179179// Define and enforce our SSL constants 
    180 wp_ssl_constants( ); 
     180wp_ssl_constants(); 
    181181 
    182182// Create common globals. 
     
    210210 
    211211// Define constants which affect functionality if not already defined. 
    212 wp_functionality_constants( ); 
     212wp_functionality_constants(); 
    213213 
    214214// Add magic quotes and set up $_REQUEST ( $_GET + $_POST ) 
Note: See TracChangeset for help on using the changeset viewer.