diff --git a/wp-admin/includes/dashboard.php b/wp-admin/includes/dashboard.php index 0df8109f58..ee41d53e7b 100644 --- a/wp-admin/includes/dashboard.php +++ b/wp-admin/includes/dashboard.php @@ -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".'
'; echo "\n\t".'

' . __('Content') . '

'."\n\t".''; diff --git a/wp-admin/includes/theme-install.php b/wp-admin/includes/theme-install.php index d0a18a78f8..5654f05e3c 100644 --- a/wp-admin/includes/theme-install.php +++ b/wp-admin/includes/theme-install.php @@ -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() { '; foreach ( (array) $feature_list as $feature_name => $features ) { diff --git a/wp-admin/includes/theme.php b/wp-admin/includes/theme.php index 1e26c0bac9..43cb8cf409 100644 --- a/wp-admin/includes/theme.php +++ b/wp-admin/includes/theme.php @@ -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; } diff --git a/wp-admin/includes/upgrade.php b/wp-admin/includes/upgrade.php index c192cf3aae..7ba271a38d 100644 --- a/wp-admin/includes/upgrade.php +++ b/wp-admin/includes/upgrade.php @@ -218,7 +218,7 @@ As a new WordPress user, you should go to your dashboard 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 ); diff --git a/wp-includes/comment.php b/wp-includes/comment.php index 09bad3c9ce..4f602066ea 100644 --- a/wp-includes/comment.php +++ b/wp-includes/comment.php @@ -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 */ diff --git a/wp-includes/default-constants.php b/wp-includes/default-constants.php index bc537a5e06..b252f43863 100644 --- a/wp-includes/default-constants.php +++ b/wp-includes/default-constants.php @@ -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 diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index a0e999404f..b5ac55bdf7 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -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 = ''; diff --git a/wp-includes/post.php b/wp-includes/post.php index 6e575ea949..80b5bfaf45 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -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']; } diff --git a/wp-includes/update.php b/wp-includes/update.php index b6205063f9..61d163aaf4 100644 --- a/wp-includes/update.php +++ b/wp-includes/update.php @@ -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(); diff --git a/wp-settings.php b/wp-settings.php index 65485a8410..17700b5b69 100644 --- a/wp-settings.php +++ b/wp-settings.php @@ -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();