Make WordPress Core

Ticket #23118: 23118.diff

File 23118.diff, 9.8 KB (added by evansolomon, 12 years ago)
  • wp-admin/includes/dashboard.php

     
    232232
    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">';
    238238        echo "\n\t".'<p class="sub">' . __('Content') . '</p>'."\n\t".'<table>';
  • wp-admin/includes/theme-install.php

     
    2828 *
    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 );
    3434
    3535        if ( $cache )
    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;
    4141
     
    100100<form method="get" action="">
    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
    106106        foreach ( (array) $feature_list as $feature_name => $features ) {
  • wp-admin/includes/theme.php

     
    216216                return $features;
    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;
    225225        }
  • wp-admin/includes/upgrade.php

     
    218218        update_option( 'widget_archives', array ( 2 => array ( 'title' => '', 'count' => 0, 'dropdown' => 0 ), '_multiwidget' => 1 ) );
    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() )
    224224                update_user_meta( $user_id, 'show_welcome_panel', 1 );
  • wp-includes/comment.php

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

     
    1212 *
    1313 * @since 3.0.0
    1414 */
    15 function wp_initial_constants( ) {
     15function wp_initial_constants() {
    1616        global $blog_id;
    1717
    1818        // set memory limits
     
    8989 *
    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
    9595
     
    150150 * Defines constants after multisite is loaded. Cookie-related constants may be overridden in ms_network_cookies().
    151151 * @since 3.0.0
    152152 */
    153 function wp_cookie_constants( ) {
     153function wp_cookie_constants() {
    154154        /**
    155155         * Used to guarantee unique hash cookies
    156156         * @since 1.5
     
    235235 *
    236236 * @since 3.0.0
    237237 */
    238 function wp_ssl_constants( ) {
     238function wp_ssl_constants() {
    239239        /**
    240240         * @since 2.6.0
    241241         */
     
    256256 *
    257257 * @since 3.0.0
    258258 */
    259 function wp_functionality_constants( ) {
     259function wp_functionality_constants() {
    260260        /**
    261261         * @since 2.5.0
    262262         */
     
    284284 *
    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
    290290         * @since 1.5.0
  • wp-includes/formatting.php

     
    29772977 * @return string The formatted string.
    29782978 */
    29792979function wp_sprintf( $pattern ) {
    2980         $args = func_get_args( );
     2980        $args = func_get_args();
    29812981        $len = strlen($pattern);
    29822982        $start = 0;
    29832983        $result = '';
  • wp-includes/post.php

     
    861861 *
    862862 * @return array List of post statuses.
    863863 */
    864 function get_post_statuses( ) {
     864function get_post_statuses() {
    865865        $status = array(
    866866                'draft'                 => __('Draft'),
    867867                'pending'               => __('Pending Review'),
     
    882882 *
    883883 * @return array List of page statuses.
    884884 */
    885 function get_page_statuses( ) {
     885function get_page_statuses() {
    886886        $status = array(
    887887                'draft'                 => __('Draft'),
    888888                'private'               => __('Private'),
     
    21732173        $and = wp_post_mime_type_where( $mime_type );
    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'];
    21792179        }
  • wp-includes/update.php

     
    5151        else
    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;
    6363                $num_blogs = 1;
     
    274274                        $timeout = 12 * HOUR_IN_SECONDS;
    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 ) {
    280280                $theme_changed = false;
     
    313313                return false;
    314314
    315315        $new_update = new stdClass;
    316         $new_update->last_checked = time( );
     316        $new_update->last_checked = time();
    317317        $new_update->checked = $checked;
    318318
    319319        $response = maybe_unserialize( wp_remote_retrieve_body( $raw_response ) );
     
    404404 * @since 2.7.0
    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
    412412        wp_update_themes();
  • wp-settings.php

     
    2323require( ABSPATH . WPINC . '/version.php' );
    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.
    2929wp_check_php_mysql_versions();
     
    152152
    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.
    158158foreach ( wp_get_mu_plugins() as $mu_plugin ) {
     
    174174        ms_cookie_constants(  );
    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.
    183183require( ABSPATH . WPINC . '/vars.php' );
     
    209209do_action( 'plugins_loaded' );
    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 )
    215215wp_magic_quotes();