From 2df887bd07b7136f2e384d63fa49d743abc91f05 Mon Sep 17 00:00:00 2001 From: ryan Date: Sun, 24 May 2009 23:47:49 +0000 Subject: [PATCH] Trim tailing whitespace git-svn-id: http://svn.automattic.com/wordpress/trunk@11450 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/admin-ajax.php | 6 +-- wp-admin/cache-manifest.php | 2 +- wp-admin/css/widgets.css | 2 +- wp-admin/import/dotclear.php | 2 +- wp-admin/includes/class-wp-upgrader.php | 12 ++--- wp-admin/includes/dashboard.php | 2 +- wp-admin/includes/file.php | 4 +- wp-admin/includes/media.php | 4 +- wp-admin/includes/misc.php | 62 ++++++++++++------------- wp-admin/includes/plugin.php | 6 +-- wp-admin/includes/post.php | 8 ++-- wp-admin/includes/schema.php | 2 +- wp-admin/includes/template.php | 46 +++++++++--------- wp-admin/includes/update.php | 6 +-- wp-admin/includes/user.php | 6 +-- wp-admin/js/common.dev.js | 2 +- wp-admin/js/custom-fields.dev.js | 2 +- wp-admin/js/edit-comments.dev.js | 12 ++--- wp-admin/js/inline-edit-post.dev.js | 2 +- wp-admin/js/inline-edit-tax.dev.js | 2 +- wp-admin/js/media-upload.dev.js | 2 +- wp-admin/js/page.dev.js | 2 +- wp-admin/js/post.dev.js | 8 ++-- wp-admin/js/tags.dev.js | 2 +- wp-admin/js/theme-preview.dev.js | 4 +- wp-admin/js/utils.dev.js | 4 +- wp-admin/link-manager.php | 6 +-- wp-admin/menu.php | 6 +-- wp-admin/options-permalink.php | 4 +- wp-admin/plugin-editor.php | 8 ++-- wp-admin/plugins.php | 2 +- wp-admin/widgets.php | 8 ++-- wp-includes/author-template.php | 22 ++++----- wp-includes/category-template.php | 4 +- wp-includes/class.wp-dependencies.php | 2 +- wp-includes/comment.php | 2 +- wp-includes/default-widgets.php | 8 ++-- wp-includes/deprecated.php | 6 +-- wp-includes/formatting.php | 30 ++++++------ wp-includes/functions.php | 22 ++++----- wp-includes/general-template.php | 2 +- wp-includes/http.php | 2 +- wp-includes/link-template.php | 8 ++-- wp-includes/media.php | 4 +- wp-includes/pluggable.php | 2 +- wp-includes/post-template.php | 2 +- wp-includes/post.php | 8 ++-- wp-includes/query.php | 4 +- wp-includes/rewrite.php | 12 ++--- wp-includes/script-loader.php | 2 +- wp-includes/taxonomy.php | 18 +++---- wp-includes/theme.php | 2 +- wp-includes/widgets.php | 18 +++---- wp-login.php | 10 ++-- 54 files changed, 218 insertions(+), 218 deletions(-) diff --git a/wp-admin/admin-ajax.php b/wp-admin/admin-ajax.php index 31ee3282dc..d671583350 100644 --- a/wp-admin/admin-ajax.php +++ b/wp-admin/admin-ajax.php @@ -1064,10 +1064,10 @@ case 'inline-save': } $data = &$_POST; - + $post = get_post( $post_ID, ARRAY_A ); $post = add_magic_quotes($post); //since it is from db - + $data['content'] = $post['post_content']; $data['excerpt'] = $post['post_excerpt']; @@ -1323,7 +1323,7 @@ case 'save-widget' : echo "deleted:$widget_id"; die(); } - + die('1'); break; default : diff --git a/wp-admin/cache-manifest.php b/wp-admin/cache-manifest.php index cb5d41226b..669a110f72 100644 --- a/wp-admin/cache-manifest.php +++ b/wp-admin/cache-manifest.php @@ -24,7 +24,7 @@ header( 'Expires: Wed, 11 Jan 1984 05:00:00 GMT' ); header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' ); header( 'Cache-Control: no-cache, must-revalidate, max-age=0' ); header( 'Pragma: no-cache' ); -header( 'Content-Type: text/cache-manifest; charset=UTF-8' ); +header( 'Content-Type: text/cache-manifest; charset=UTF-8' ); ?> CACHE MANIFEST # diff --git a/wp-admin/css/widgets.css b/wp-admin/css/widgets.css index 8a47158005..f34b7d5b58 100644 --- a/wp-admin/css/widgets.css +++ b/wp-admin/css/widgets.css @@ -193,7 +193,7 @@ a.widget-action { line-height: 16px; } -.widget-inside, +.widget-inside, .widget-description { display: none; } diff --git a/wp-admin/import/dotclear.php b/wp-admin/import/dotclear.php index a35ccba220..d6552f76e9 100644 --- a/wp-admin/import/dotclear.php +++ b/wp-admin/import/dotclear.php @@ -50,7 +50,7 @@ if(!function_exists('link_exists')) /** * Convert from dotclear charset to utf8 if required - * + * * @package WordPress * @subpackage Dotclear_Import * diff --git a/wp-admin/includes/class-wp-upgrader.php b/wp-admin/includes/class-wp-upgrader.php index 9d3bb660c2..6954e85834 100644 --- a/wp-admin/includes/class-wp-upgrader.php +++ b/wp-admin/includes/class-wp-upgrader.php @@ -34,7 +34,7 @@ class WP_Upgrader { else $this->skin = $skin; } - + function init() { $this->skin->set_upgrader($this); $this->generic_strings(); @@ -521,7 +521,7 @@ class Theme_Upgrader extends WP_Upgrader { } function install($package) { - + $this->init(); $this->install_strings(); @@ -786,7 +786,7 @@ class WP_Upgrader_Skin { } /** - * Plugin Upgrader Skin for WordPress Plugin Upgrades. + * Plugin Upgrader Skin for WordPress Plugin Upgrades. * * @TODO More Detailed docs, for methods as well. * @@ -835,7 +835,7 @@ class Plugin_Upgrader_Skin extends WP_Upgrader_Skin { } /** - * Plugin Installer Skin for WordPress Plugin Installer. + * Plugin Installer Skin for WordPress Plugin Installer. * * @TODO More Detailed docs, for methods as well. * @@ -890,7 +890,7 @@ class Plugin_Installer_Skin extends WP_Upgrader_Skin { } /** - * Theme Installer Skin for the WordPress Theme Installer. + * Theme Installer Skin for the WordPress Theme Installer. * * @TODO More Detailed docs, for methods as well. * @@ -955,7 +955,7 @@ class Theme_Installer_Skin extends WP_Upgrader_Skin { } /** - * Theme Upgrader Skin for WordPress Theme Upgrades. + * Theme Upgrader Skin for WordPress Theme Upgrades. * * @TODO More Detailed docs, for methods as well. * diff --git a/wp-admin/includes/dashboard.php b/wp-admin/includes/dashboard.php index 30f8a0293b..ec93fb0d09 100644 --- a/wp-admin/includes/dashboard.php +++ b/wp-admin/includes/dashboard.php @@ -317,7 +317,7 @@ function wp_dashboard_right_now() { echo "\n\t".'
'; $ct = current_theme_info(); - + echo "\n\t

"; if ( !empty($wp_registered_sidebars) ) { $sidebars_widgets = wp_get_sidebars_widgets(); diff --git a/wp-admin/includes/file.php b/wp-admin/includes/file.php index 36ff1fec37..0b7d2289e6 100644 --- a/wp-admin/includes/file.php +++ b/wp-admin/includes/file.php @@ -71,7 +71,7 @@ function get_home_path() { if ( $home != '' && $home != $siteurl ) { $wp_path_rel_to_home = str_replace($home, '', $siteurl); /* $siteurl - $home */ $pos = strpos($_SERVER["SCRIPT_FILENAME"], $wp_path_rel_to_home); - $home_path = substr($_SERVER["SCRIPT_FILENAME"], 0, $pos); + $home_path = substr($_SERVER["SCRIPT_FILENAME"], 0, $pos); $home_path = trailingslashit( $home_path ); } else { $home_path = ABSPATH; @@ -687,7 +687,7 @@ function request_filesystem_credentials($form_post, $type = '', $error = false) else if ( !isset($credentials['connection_type']) || (isset($_POST['connection_type']) && 'ftp' == $_POST['connection_type']) ) $credentials['connection_type'] = 'ftp'; - if ( ! $error && + if ( ! $error && ( ( !empty($credentials['password']) && !empty($credentials['username']) && !empty($credentials['hostname']) ) || ( 'ssh' == $credentials['connection_type'] && !empty($credentials['public_key']) && !empty($credentials['private_key']) ) diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php index 77200f576b..37de525a66 100644 --- a/wp-admin/includes/media.php +++ b/wp-admin/includes/media.php @@ -194,7 +194,7 @@ function media_handle_upload($file_id, $post_id, $post_data = array()) { if ( isset($file['error']) ) return new WP_Error( 'upload_error', $file['error'] ); - + $name_parts = pathinfo($name); $name = trim( substr( $name, 0, -(1 + strlen($name_parts['extension'])) ) ); @@ -327,7 +327,7 @@ if ( is_string($content_func) ) $args = func_get_args(); $args = array_slice($args, 1); call_user_func_array($content_func, $args); - + do_action('admin_print_footer_scripts'); ?> diff --git a/wp-admin/includes/misc.php b/wp-admin/includes/misc.php index ace5d3ff0c..59544d04e3 100644 --- a/wp-admin/includes/misc.php +++ b/wp-admin/includes/misc.php @@ -138,18 +138,18 @@ function save_mod_rewrite_rules() { /** * Updates the IIS web.config file with the current rules if it is writable. * If the permalinks do not require rewrite rules then the rules are deleted from the web.config file. - * + * * @since 2.8.0 - * + * * @return bool True if web.config was updated successfully */ function iis7_save_url_rewrite_rules(){ global $wp_rewrite; - + $home_path = get_home_path(); $web_config_file = $home_path . 'web.config'; - // Using win_is_writable() instead of is_writable() because of a bug in Windows PHP + // Using win_is_writable() instead of is_writable() because of a bug in Windows PHP if ( ( ! file_exists($web_config_file) && win_is_writable($home_path) && $wp_rewrite->using_mod_rewrite_permalinks() ) || win_is_writable($web_config_file) ) { if ( iis7_supports_permalinks() ) { $rule = $wp_rewrite->iis7_url_rewrite_rules(); @@ -401,15 +401,15 @@ function wp_menu_unfold() { /** * Check if IIS 7 supports pretty permalinks - * + * * @since 2.8.0 - * + * * @return bool */ function iis7_supports_permalinks() { global $is_iis7; - $supports_permalinks = false; + $supports_permalinks = false; if ( $is_iis7 ) { /* First we check if the DOMDocument class exists. If it does not exist, * which is the case for PHP 4.X, then we cannot easily update the xml configuration file, @@ -418,29 +418,29 @@ function iis7_supports_permalinks() { * is recommended to use PHP 5.X NTS. * Next we check if the URL Rewrite Module 1.1 is loaded and enabled for the web site. When * URL Rewrite 1.1 is loaded it always sets a server variable called 'IIS_UrlRewriteModule'. - * Lastly we make sure that PHP is running via FastCGI. This is important because if it runs + * Lastly we make sure that PHP is running via FastCGI. This is important because if it runs * via ISAPI then pretty permalinks will not work. */ $supports_permalinks = class_exists('DOMDocument') && isset($_SERVER['IIS_UrlRewriteModule']) && ( php_sapi_name() == 'cgi-fcgi' ); } - + return apply_filters('iis7_supports_permalinks', $supports_permalinks); } /** * Check if rewrite rule for WordPress already exists in the IIS 7 configuration file - * + * * @since 2.8.0 - * + * * @return bool * @param string $filename The file path to the configuration file */ -function iis7_rewrite_rule_exists($filename) { +function iis7_rewrite_rule_exists($filename) { if ( ! file_exists($filename) ) - return false; + return false; if ( ! class_exists('DOMDocument') ) return false; - + $doc = new DOMDocument(); if ( $doc->load($filename) === false ) return false; @@ -449,25 +449,25 @@ function iis7_rewrite_rule_exists($filename) { if ( $rules->length == 0 ) return false; else - return true; + return true; } /** * Delete WordPress rewrite rule from web.config file if it exists there * - * @since 2.8.0 + * @since 2.8.0 * * @param string $filename Name of the configuration file * @return bool */ -function iis7_delete_rewrite_rule($filename) { +function iis7_delete_rewrite_rule($filename) { // If configuration file does not exist then rules also do not exist so there is nothing to delete if ( ! file_exists($filename) ) return true; - + if ( ! class_exists('DOMDocument') ) return false; - + $doc = new DOMDocument(); $doc->preserveWhiteSpace = false; @@ -487,30 +487,30 @@ function iis7_delete_rewrite_rule($filename) { /** * Add WordPress rewrite rule to the IIS 7 configuration file. - * + * * @since 2.8.0 - * + * * @param string $filename The file path to the configuration file * @param string $rewrite_rule The XML fragment with URL Rewrite rule * @return bool */ -function iis7_add_rewrite_rule($filename, $rewrite_rule) { +function iis7_add_rewrite_rule($filename, $rewrite_rule) { if ( ! class_exists('DOMDocument') ) return false; - + // If configuration file does not exist then we create one. if ( ! file_exists($filename) ) { $fp = fopen( $filename, 'w'); fwrite($fp, ''); fclose($fp); } - + $doc = new DOMDocument(); $doc->preserveWhiteSpace = false; if ( $doc->load($filename) === false ) return false; - + $xpath = new DOMXPath($doc); // First check if the rule already exists as in that case there is no need to re-add it @@ -524,7 +524,7 @@ function iis7_add_rewrite_rule($filename, $rewrite_rule) { $rules_node = $xmlnodes->item(0); } else { $rules_node = $doc->createElement('rules'); - + $xmlnodes = $xpath->query('/configuration/system.webServer/rewrite'); if ( $xmlnodes->length > 0 ) { $rewrite_node = $xmlnodes->item(0); @@ -540,7 +540,7 @@ function iis7_add_rewrite_rule($filename, $rewrite_rule) { } else { $system_webServer_node = $doc->createElement('system.webServer'); $system_webServer_node->appendChild($rewrite_node); - + $xmlnodes = $xpath->query('/configuration'); if ( $xmlnodes->length > 0 ) { $config_node = $xmlnodes->item(0); @@ -553,20 +553,20 @@ function iis7_add_rewrite_rule($filename, $rewrite_rule) { } } } - + $rule_fragment = $doc->createDocumentFragment(); $rule_fragment->appendXML($rewrite_rule); $rules_node->appendChild($rule_fragment); - $doc->formatOutput = true; + $doc->formatOutput = true; saveDomDocument($doc, $filename); - return true; + return true; } /** * Saves the XML document into a file - * + * * @since 2.8.0 * * @param DOMDocument $doc diff --git a/wp-admin/includes/plugin.php b/wp-admin/includes/plugin.php index b72e7627e0..4f469c9611 100644 --- a/wp-admin/includes/plugin.php +++ b/wp-admin/includes/plugin.php @@ -468,7 +468,7 @@ function delete_plugins($plugins, $redirect = '' ) { return new WP_Error('could_not_remove_plugin', sprintf(__('Could not fully remove the plugin(s) %s'), implode(', ', $errors)) ); // Force refresh of plugin update information - if ( $current = get_transient('update_plugins') ) { + if ( $current = get_transient('update_plugins') ) { unset( $current->response[ $plugin_file ] ); set_transient('update_plugins', $current); } @@ -598,7 +598,7 @@ function add_menu_page( $page_title, $menu_title, $access_level, $file, $functio if ( empty($icon_url) ) $icon_url = 'images/generic.png'; elseif ( is_ssl() && 0 === strpos($icon_url, 'http://') ) - $icon_url = 'https://' . substr($icon_url, 7); + $icon_url = 'https://' . substr($icon_url, 7); $menu[] = array ( $menu_title, $access_level, $file, $page_title, 'menu-top ' . $hookname, $hookname, $icon_url ); @@ -640,7 +640,7 @@ function add_utility_page( $page_title, $menu_title, $access_level, $file, $func if ( empty($icon_url) ) $icon_url = 'images/generic.png'; elseif ( is_ssl() && 0 === strpos($icon_url, 'http://') ) - $icon_url = 'https://' . substr($icon_url, 7); + $icon_url = 'https://' . substr($icon_url, 7); $_wp_last_utility_menu++; diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php index d4955cae50..25ce199677 100644 --- a/wp-admin/includes/post.php +++ b/wp-admin/includes/post.php @@ -927,7 +927,7 @@ function get_sample_permalink($id, $title=null, $name = null) { $post->post_name = sanitize_title($post->post_name? $post->post_name : $post->post_title, $post->ID); } - $post->post_name = wp_unique_post_slug($post->post_name, $post->ID, $post->post_status, $post->post_type, $post->post_parent); + $post->post_name = wp_unique_post_slug($post->post_name, $post->ID, $post->post_status, $post->post_type, $post->post_parent); // If the user wants to set a new name -- override the current one // Note: if empty name is supplied -- use the title instead, see #6072 @@ -1339,13 +1339,13 @@ function wp_tiny_mce( $teeny = false ) { $language = $initArray['language']; $zip = $compress_scripts ? 1 : 0; - + /** * Deprecated - * + * * The tiny_mce_version filter is not needed since external plugins are loaded directly by TinyMCE. * These plugins can be refreshed by appending query string to the URL passed to mce_external_plugins filter. - * If the plugin has a popup dialog, a query string can be added to the button action that opens it (in the plugin's code). + * If the plugin has a popup dialog, a query string can be added to the button action that opens it (in the plugin's code). */ $version = apply_filters('tiny_mce_version', ''); $version = 'ver=' . $tinymce_version . $version; diff --git a/wp-admin/includes/schema.php b/wp-admin/includes/schema.php index 6f3106ec40..53ec246d72 100644 --- a/wp-admin/includes/schema.php +++ b/wp-admin/includes/schema.php @@ -303,7 +303,7 @@ function populate_options() { 'widget_categories' => array(), 'widget_text' => array(), 'widget_rss' => array(), - + // 2.8 'timezone_string' => '' ); diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php index 0d35a8f104..e8f298d3dc 100644 --- a/wp-admin/includes/template.php +++ b/wp-admin/includes/template.php @@ -21,25 +21,25 @@ * @param unknown_type $per_page */ function cat_rows( $parent = 0, $level = 0, $categories = 0, $page = 1, $per_page = 20 ) { - + $count = 0; - + if ( empty($categories) ) { - + $args = array('hide_empty' => 0); if ( !empty($_GET['s']) ) $args['search'] = $_GET['s']; - - $categories = get_categories( $args ); - + + $categories = get_categories( $args ); + if ( empty($categories) ) return false; } - $children = _get_term_hierarchy('category'); - - _cat_rows( $parent, $level, $categories, $children, $page, $per_page, $count ); - + $children = _get_term_hierarchy('category'); + + _cat_rows( $parent, $level, $categories, $children, $page, $per_page, $count ); + } /** @@ -55,22 +55,22 @@ function cat_rows( $parent = 0, $level = 0, $categories = 0, $page = 1, $per_pag * @param unknown_type $per_page * @return unknown */ -function _cat_rows( $parent = 0, $level = 0, $categories, &$children, $page = 1, $per_page = 20, &$count ) { - +function _cat_rows( $parent = 0, $level = 0, $categories, &$children, $page = 1, $per_page = 20, &$count ) { + $start = ($page - 1) * $per_page; $end = $start + $per_page; ob_start(); - + foreach ( $categories as $key => $category ) { if ( $count >= $end ) break; - + if ( $category->parent != $parent && empty($_GET['s']) ) continue; // If the page starts in a subtree, print the parents. if ( $count == $start && $category->parent > 0 ) { - + $my_parents = array(); $p = $category->parent; while ( $p ) { @@ -80,7 +80,7 @@ function _cat_rows( $parent = 0, $level = 0, $categories, &$children, $page = 1, break; $p = $my_parent->parent; } - + $num_parents = count($my_parents); while( $my_parent = array_pop($my_parents) ) { echo "\t" . _cat_row( $my_parent, $level - $num_parents ); @@ -91,12 +91,12 @@ function _cat_rows( $parent = 0, $level = 0, $categories, &$children, $page = 1, if ( $count >= $start ) echo "\t" . _cat_row( $category, $level ); - unset( $categories[ $key ] ); - + unset( $categories[ $key ] ); + $count++; if ( isset($children[$category->term_id]) ) - _cat_rows( $category->term_id, $level + 1, $categories, $children, $page, $per_page, $count ); + _cat_rows( $category->term_id, $level + 1, $categories, $children, $page, $per_page, $count ); } $output = ob_get_contents(); @@ -517,13 +517,13 @@ function wp_category_checklist( $post_id = 0, $descendants_and_self = 0, $select // Post process $categories rather than adding an exclude to the get_terms() query to keep the query the same across all posts (for any query cache) $checked_categories = array(); - $keys = array_keys( $categories ); - + $keys = array_keys( $categories ); + foreach( $keys as $k ) { if ( in_array( $categories[$k]->term_id, $args['selected_cats'] ) ) { $checked_categories[] = $categories[$k]; unset( $categories[$k] ); - } + } } // Put checked cats on top @@ -3598,7 +3598,7 @@ function screen_layout($screen) { $screen_layout_columns = 0; return ''; } - + $screen_layout_columns = get_user_option("screen_layout_$screen"); $num = $columns[$screen]; diff --git a/wp-admin/includes/update.php b/wp-admin/includes/update.php index 94259b6078..5c9ef6b2d8 100644 --- a/wp-admin/includes/update.php +++ b/wp-admin/includes/update.php @@ -154,7 +154,7 @@ function wp_plugin_update_row( $file, $plugin_data ) { $plugins_allowedtags = array('a' => array('href' => array(),'title' => array()),'abbr' => array('title' => array()),'acronym' => array('title' => array()),'code' => array(),'em' => array(),'strong' => array()); $plugin_name = wp_kses( $plugin_data['Name'], $plugins_allowedtags ); - + $details_url = admin_url('plugin-install.php?tab=plugin-information&plugin=' . $r->slug . '&TB_iframe=true&width=600&height=800'); echo '

'; @@ -164,9 +164,9 @@ function wp_plugin_update_row( $file, $plugin_data ) { printf( __('There is a new version of %1$s available. View version %4$s Details automatic upgrade unavailable for this plugin.'), $plugin_name, esc_url($details_url), esc_attr($plugin_name), $r->new_version ); else printf( __('There is a new version of %1$s available. View version %4$s Details or upgrade automatically.'), $plugin_name, esc_url($details_url), esc_attr($plugin_name), $r->new_version, wp_nonce_url('update.php?action=upgrade-plugin&plugin=' . $file, 'upgrade-plugin_' . $file) ); - + do_action( "in_plugin_update_message-$file", $plugin_data, $r ); - + echo '
'; } add_action( 'after_plugin_row', 'wp_plugin_update_row', 10, 2 ); diff --git a/wp-admin/includes/user.php b/wp-admin/includes/user.php index ec158669e3..33e751f53c 100644 --- a/wp-admin/includes/user.php +++ b/wp-admin/includes/user.php @@ -179,8 +179,8 @@ function edit_user( $user_id = 0 ) { } // Allow plugins to return there own errors. - do_action_ref_array('user_profile_update_errors', array ( &$errors, $update, &$user ) ); - + do_action_ref_array('user_profile_update_errors', array ( &$errors, $update, &$user ) ); + if ( $errors->get_error_codes() ) return $errors; @@ -803,7 +803,7 @@ function default_password_nag_handler($errors = false) { return; //get_user_setting = JS saved UI setting. else no-js-falback code. - if ( 'hide' == get_user_setting('default_password_nag') || isset($_GET['default_password_nag']) && '0' == $_GET['default_password_nag'] ) { + if ( 'hide' == get_user_setting('default_password_nag') || isset($_GET['default_password_nag']) && '0' == $_GET['default_password_nag'] ) { delete_user_setting('default_password_nag'); update_usermeta($user_ID, 'default_password_nag', false); } diff --git a/wp-admin/js/common.dev.js b/wp-admin/js/common.dev.js index 262fea50c2..207214b591 100644 --- a/wp-admin/js/common.dev.js +++ b/wp-admin/js/common.dev.js @@ -137,7 +137,7 @@ showNotice = { jQuery(document).ready( function($) { var lastClicked = false, checks, first, last, checked; - + // pulse $('.fade').animate( { backgroundColor: '#ffffe0' }, 300).animate( { backgroundColor: '#fffbcc' }, 300).animate( { backgroundColor: '#ffffe0' }, 300).animate( { backgroundColor: '#fffbcc' }, 300); diff --git a/wp-admin/js/custom-fields.dev.js b/wp-admin/js/custom-fields.dev.js index eecb56b88f..70be83a8c4 100644 --- a/wp-admin/js/custom-fields.dev.js +++ b/wp-admin/js/custom-fields.dev.js @@ -1,6 +1,6 @@ jQuery(document).ready( function($) { var before, addBefore, addAfter, delBefore; - + before = function() { var nonce = $('#newmeta [name=_ajax_nonce]').val(), postId = $('#post_ID').val(); if ( !nonce || !postId ) { return false; } diff --git a/wp-admin/js/edit-comments.dev.js b/wp-admin/js/edit-comments.dev.js index 659c1e09df..2d7ddbe867 100644 --- a/wp-admin/js/edit-comments.dev.js +++ b/wp-admin/js/edit-comments.dev.js @@ -3,7 +3,7 @@ var theList, theExtraList, toggleWithKeyboard = false; setCommentsList = function() { var totalInput, perPageInput, pageInput, lastConfidentTime = 0, dimAfter, delBefore, updateTotalCount, delAfter; - + totalInput = $('#comments-form .tablenav :input[name="_total"]'); perPageInput = $('#comments-form .tablenav :input[name="_per_page"]'); pageInput = $('#comments-form .tablenav :input[name="_page"]'); @@ -101,7 +101,7 @@ setCommentsList = function() { a.html(n); }); - + // XML response if ( ( 'object' == typeof r ) && lastConfidentTime < settings.parsed.responses[0].supplemental.time ) { // Set the total to the known good value (even if this value is a little old, newer values should only be a few less, and so shouldn't mess up the page links) @@ -156,7 +156,7 @@ commentReply = { if ( $('#the-comment-list #replyrow').length > 0 ) commentReply.close(); }); - + this.comments_listing = $('#comments-form > input[name="comment_status"]').val() || ''; }, @@ -250,7 +250,7 @@ commentReply = { setTimeout(function() { var rtop, rbottom, scrollTop, vp, scrollBottom; - + rtop = $('#replyrow').offset().top; rbottom = rtop + $('#replyrow').height(); scrollTop = window.pageYOffset || document.documentElement.scrollTop; @@ -316,7 +316,7 @@ commentReply = { $(c).hide() $('#replyrow').after(c); - + this.o = id = '#comment-'+r.id; this.revert(); this.addEvents($(id)); @@ -357,7 +357,7 @@ $(document).ready(function(){ make_hotkeys_redirect = function(which) { return function() { var first_last, l; - + first_last = 'next' == which? 'first' : 'last'; l = $('.'+which+'.page-numbers'); if (l.length) diff --git a/wp-admin/js/inline-edit-post.dev.js b/wp-admin/js/inline-edit-post.dev.js index 4fd83bbe54..ecc93b6b68 100644 --- a/wp-admin/js/inline-edit-post.dev.js +++ b/wp-admin/js/inline-edit-post.dev.js @@ -192,7 +192,7 @@ inlineEditPost = { save : function(id) { var params, fields; - + if( typeof(id) == 'object' ) id = this.getId(id); diff --git a/wp-admin/js/inline-edit-tax.dev.js b/wp-admin/js/inline-edit-tax.dev.js index d26f81887e..91c85ff81a 100644 --- a/wp-admin/js/inline-edit-tax.dev.js +++ b/wp-admin/js/inline-edit-tax.dev.js @@ -64,7 +64,7 @@ inlineEditTax = { save : function(id) { var params, fields, tax = $('input[name="taxonomy"]').val() || ''; - + if( typeof(id) == 'object' ) id = this.getId(id); diff --git a/wp-admin/js/media-upload.dev.js b/wp-admin/js/media-upload.dev.js index 1fe5cf9aca..e2c00ae229 100644 --- a/wp-admin/js/media-upload.dev.js +++ b/wp-admin/js/media-upload.dev.js @@ -1,7 +1,7 @@ // send html to the post editor function send_to_editor(h) { var ed; - + if ( typeof tinyMCE != 'undefined' && ( ed = tinyMCE.activeEditor ) && !ed.isHidden() ) { ed.focus(); if (tinymce.isIE) diff --git a/wp-admin/js/page.dev.js b/wp-admin/js/page.dev.js index d310404b92..89a3d0ab54 100644 --- a/wp-admin/js/page.dev.js +++ b/wp-admin/js/page.dev.js @@ -22,7 +22,7 @@ jQuery(document).ready( function($) { function updateText() { var attemptedDate, originalDate, currentDate, publishOn; - + attemptedDate = new Date( $('#aa').val(), $('#mm').val() -1, $('#jj').val(), $('#hh').val(), $('#mn').val()); originalDate = new Date( $('#hidden_aa').val(), $('#hidden_mm').val() -1, $('#hidden_jj').val(), $('#hidden_hh').val(), $('#hidden_mn').val()); currentDate = new Date( $('#cur_aa').val(), $('#cur_mm').val() -1, $('#cur_jj').val(), $('#cur_hh').val(), $('#cur_mn').val()); diff --git a/wp-admin/js/post.dev.js b/wp-admin/js/post.dev.js index 101b067b90..d1007f55bb 100644 --- a/wp-admin/js/post.dev.js +++ b/wp-admin/js/post.dev.js @@ -36,7 +36,7 @@ function tag_update_quickclicks(taxbox) { jQuery.each( current_tags, function( key, val ) { var txt, button_id; - + val = jQuery.trim(val); if ( !val.match(/^\s+$/) && '' != val ) { button_id = jQuery(taxbox).attr('id') + '-check-num-' + key; @@ -52,7 +52,7 @@ function tag_update_quickclicks(taxbox) { function tag_flush_to_text(id, a) { a = a || false; var taxbox, text, tags, newtags; - + taxbox = jQuery('#'+id); text = a ? jQuery(a).text() : taxbox.find('input.newtag').val(); @@ -68,7 +68,7 @@ function tag_flush_to_text(id, a) { newtags = array_unique_noempty(newtags.split(',')).join(','); taxbox.find('.the-tags').val(newtags); tag_update_quickclicks(taxbox); - + if ( ! a ) taxbox.find('input.newtag').val('').focus(); @@ -317,7 +317,7 @@ jQuery(document).ready( function($) { function updateText() { var attemptedDate, originalDate, currentDate, publishOn; - + attemptedDate = new Date( $('#aa').val(), $('#mm').val() -1, $('#jj').val(), $('#hh').val(), $('#mn').val()); originalDate = new Date( $('#hidden_aa').val(), $('#hidden_mm').val() -1, $('#hidden_jj').val(), $('#hidden_hh').val(), $('#hidden_mn').val()); currentDate = new Date( $('#cur_aa').val(), $('#cur_mm').val() -1, $('#cur_jj').val(), $('#cur_hh').val(), $('#cur_mn').val()); diff --git a/wp-admin/js/tags.dev.js b/wp-admin/js/tags.dev.js index 7556f92900..3f1da879be 100644 --- a/wp-admin/js/tags.dev.js +++ b/wp-admin/js/tags.dev.js @@ -18,7 +18,7 @@ jQuery(document).ready(function($) { if ( id == options[o].value ) options[o] = null; } - + delBefore = function(s) { s.data.taxonomy = $('input[name="taxonomy"]').val(); diff --git a/wp-admin/js/theme-preview.dev.js b/wp-admin/js/theme-preview.dev.js index d3abf5d176..5c67e999b5 100644 --- a/wp-admin/js/theme-preview.dev.js +++ b/wp-admin/js/theme-preview.dev.js @@ -23,12 +23,12 @@ jQuery(document).ready(function($) { $('a.thickbox-preview').click( function() { var alink = $(this).parents('.available-theme').find('.activatelink'), link = '', href = $(this).attr('href'), url, text; - if ( tbWidth = href.match(/&tbWidth=[0-9]+/) ) + if ( tbWidth = href.match(/&tbWidth=[0-9]+/) ) tbWidth = parseInt(tbWidth[0].replace(/[^0-9]+/g, ''), 10); else tbWidth = $(window).width() - 90; - if ( tbHeight = href.match(/&tbHeight=[0-9]+/) ) + if ( tbHeight = href.match(/&tbHeight=[0-9]+/) ) tbHeight = parseInt(tbHeight[0].replace(/[^0-9]+/g, ''), 10); else tbHeight = $(window).height() - 60; diff --git a/wp-admin/js/utils.dev.js b/wp-admin/js/utils.dev.js index bf3bb2b501..3f6925bfec 100644 --- a/wp-admin/js/utils.dev.js +++ b/wp-admin/js/utils.dev.js @@ -134,7 +134,7 @@ function getUserSetting( name, def ) { function setUserSetting( name, value, del ) { if ( 'object' !== typeof userSettings ) return false; - + var c = 'wp-settings-' + userSettings.uid, o = wpCookies.getHash(c) || {}, d = new Date(), p, n = name.toString().replace(/[^A-Za-z0-9_]/, ''), v = value.toString().replace(/[^A-Za-z0-9_]/, ''); @@ -149,7 +149,7 @@ function setUserSetting( name, value, del ) { wpCookies.setHash(c, o, d, p); wpCookies.set('wp-settings-time-'+userSettings.uid, userSettings.time, d, p); - + return name; } diff --git a/wp-admin/link-manager.php b/wp-admin/link-manager.php index 6978641215..b28109e6cc 100644 --- a/wp-admin/link-manager.php +++ b/wp-admin/link-manager.php @@ -233,9 +233,9 @@ if ( $links ) { case 'visible': ?>>>> link_id); ?> diff --git a/wp-admin/menu.php b/wp-admin/menu.php index 78b415cd1d..6116f5aa81 100644 --- a/wp-admin/menu.php +++ b/wp-admin/menu.php @@ -128,7 +128,7 @@ do_action('_admin_menu'); // Create list of page plugin hook names. foreach ($menu as $menu_page) { $hook_name = sanitize_title(basename($menu_page[2], '.php')); - + // ensure we're backwards compatible $compat = array( 'index' => 'dashboard', @@ -140,12 +140,12 @@ foreach ($menu as $menu_page) { 'options-general' => 'settings', 'themes' => 'appearance', ); - + if ( isset($compat[$hook_name]) ) $hook_name = $compat[$hook_name]; elseif ( !$hook_name ) continue; - + $admin_page_hooks[$menu_page[2]] = $hook_name; } diff --git a/wp-admin/options-permalink.php b/wp-admin/options-permalink.php index e1d7ef8a6a..4bff30a4cb 100644 --- a/wp-admin/options-permalink.php +++ b/wp-admin/options-permalink.php @@ -228,9 +228,9 @@ $structures = array(

-

web.config file writable for us to generate rewrite rules automatically, do not forget to revert the permissions after rule has been saved.') ?>

+

web.config file writable for us to generate rewrite rules automatically, do not forget to revert the permissions after rule has been saved.') ?>

-

.htaccess file were writable, we could do this automatically, but it isn’t so these are the mod_rewrite rules you should have in your .htaccess file. Click in the field and press CTRL + a to select all.') ?>

diff --git a/wp-admin/plugin-editor.php b/wp-admin/plugin-editor.php index 7d8e99628b..7e4288e3d2 100644 --- a/wp-admin/plugin-editor.php +++ b/wp-admin/plugin-editor.php @@ -84,8 +84,8 @@ default: } wp_enqueue_script( 'codepress' ); - add_action( 'admin_print_footer_scripts', 'codepress_footer_js' ); - + add_action( 'admin_print_footer_scripts', 'codepress_footer_js' ); + // List of allowable extensions $editable_extensions = array('php', 'txt', 'text', 'js', 'css', 'html', 'htm', 'xml', 'inc', 'include'); $editable_extensions = (array) apply_filters('editable_extensions', $editable_extensions); @@ -101,9 +101,9 @@ default: wp_die(sprintf('

%s

', __('Files of this type are not editable.'))); } } - + require_once('admin-header.php'); - + update_recently_edited(WP_PLUGIN_DIR . '/' . $file); $content = file_get_contents( $real_file ); diff --git a/wp-admin/plugins.php b/wp-admin/plugins.php index 7782965fdc..83e0982404 100644 --- a/wp-admin/plugins.php +++ b/wp-admin/plugins.php @@ -410,7 +410,7 @@ function print_plugins_table($plugins, $context = '') { echo implode(' | ', $plugin_meta); echo "

\n"; - + do_action( 'after_plugin_row', $plugin_file, $plugin_data, $context ); do_action( "after_plugin_row_$plugin_file", $plugin_file, $plugin_data, $context ); } diff --git a/wp-admin/widgets.php b/wp-admin/widgets.php index ee04b07539..f96b10a9aa 100644 --- a/wp-admin/widgets.php +++ b/wp-admin/widgets.php @@ -69,13 +69,13 @@ function retrieve_widgets() { $_sidebars_widgets['wp_inactive_widgets'] = array_merge( (array) $_sidebars_widgets['wp_inactive_widgets'], $val ); } } - + // discard invalid, theme-specific widgets from sidebars $shown_widgets = array(); foreach ( $_sidebars_widgets as $sidebar => $widgets ) { if ( !is_array($widgets) ) continue; - + $_widgets = array(); foreach ( $widgets as $widget ) { if ( isset($wp_registered_widgets[$widget]) ) @@ -220,7 +220,7 @@ if ( isset($_GET['editwidget']) && $_GET['editwidget'] ) { if ( !isset($name) ) $name = esc_html( strip_tags($control['name']) ); - + if ( !isset($sidebar) ) $sidebar = isset($_GET['sidebar']) ? $_GET['sidebar'] : 'wp_inactive_widgets'; @@ -242,7 +242,7 @@ if ( isset($_GET['editwidget']) && $_GET['editwidget'] ) {
-ID) ? (int)$authordata->ID : 0; elseif ( isset($authordata->$user_field) ) @@ -108,12 +108,12 @@ function get_the_author_meta($field = '', $user_id = false) { } /** - * Retrieve the requested data of the author of the current post. - * @link http://codex.wordpress.org/Template_Tags/the_author_meta - * @since 2.8.0 - * @param string $field selects the field of the users record. + * Retrieve the requested data of the author of the current post. + * @link http://codex.wordpress.org/Template_Tags/the_author_meta + * @since 2.8.0 + * @param string $field selects the field of the users record. * @param int $user_id Optional. User ID. - * @echo string The author's field from the current author's DB object. + * @echo string The author's field from the current author's DB object. */ function the_author_meta($field = '', $user_id = false) { echo apply_filters('the_author_' . $field, get_the_author_meta($field, $user_id)); diff --git a/wp-includes/category-template.php b/wp-includes/category-template.php index 6218896d98..61f2faf1aa 100644 --- a/wp-includes/category-template.php +++ b/wp-includes/category-template.php @@ -575,7 +575,7 @@ function default_topic_count_text( $count ) { * * The 'tag_cloud_sort' filter allows you to override the sorting done * by the 'orderby' argument; passed to the filter: $tags array and $args array. - * + * * The 'orderby' argument will accept 'name' or 'count' and defaults to 'name'. * The 'order' is the direction to sort, defaults to 'ASC' and can be 'DESC' or * 'RAND'. @@ -623,7 +623,7 @@ function wp_generate_tag_cloud( $tags, $args = '' ) { uasort( $tags, create_function('$a, $b', 'return ($a->count > $b->count);') ); $tags = apply_filters( 'tag_cloud_sort', $tags, $args ); - + if ( 'DESC' == $order ) $tags = array_reverse( $tags, true ); elseif ( 'RAND' == $order ) { diff --git a/wp-includes/class.wp-dependencies.php b/wp-includes/class.wp-dependencies.php index 6c03582b8c..af3808b8c7 100644 --- a/wp-includes/class.wp-dependencies.php +++ b/wp-includes/class.wp-dependencies.php @@ -89,7 +89,7 @@ class WP_Dependencies { continue; $moved = $this->set_group( $handle, $recursion, $group ); - + if ( $queued && !$moved ) // already queued and in the right group continue; diff --git a/wp-includes/comment.php b/wp-includes/comment.php index b86b3a8458..53e2233dc3 100644 --- a/wp-includes/comment.php +++ b/wp-includes/comment.php @@ -169,7 +169,7 @@ function &get_comment(&$comment, $output = OBJECT) { * Retrieve a list of comments. * * The comment list can be for the blog as a whole or for an individual post. - * + * * The list of comment arguments are 'status', 'orderby', 'comment_date_gmt', * 'order', 'number', 'offset', and 'post_id'. * diff --git a/wp-includes/default-widgets.php b/wp-includes/default-widgets.php index 3822203bbd..f5159809ae 100644 --- a/wp-includes/default-widgets.php +++ b/wp-includes/default-widgets.php @@ -189,7 +189,7 @@ class WP_Widget_Search extends WP_Widget { echo $after_widget; } - + function form( $instance ) { $instance = wp_parse_args( (array) $instance, array( 'title' => '') ); $title = $instance['title']; @@ -197,14 +197,14 @@ class WP_Widget_Search extends WP_Widget {

'')); $instance['title'] = strip_tags($new_instance['title']); return $instance; - } - + } + } /** diff --git a/wp-includes/deprecated.php b/wp-includes/deprecated.php index 2988dbc8a1..010eb78ee1 100644 --- a/wp-includes/deprecated.php +++ b/wp-includes/deprecated.php @@ -1672,7 +1672,7 @@ function the_author_url() { * @deprecated 2.8 * @return int The author's ID. */ -function get_the_author_ID() { +function get_the_author_ID() { _deprecated_function(__FUNCTION__, '2.8', 'get_the_author_meta(\'ID\')' ); return get_the_author_meta('ID'); } @@ -1685,9 +1685,9 @@ function get_the_author_ID() { * @deprecated 2.8 * @uses get_the_author_ID() */ -function the_author_ID() { +function the_author_ID() { _deprecated_function(__FUNCTION__, '2.8', 'the_author_meta(\'ID\')' ); the_author_meta('ID'); -} +} ?> \ No newline at end of file diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index d192504927..cd3d723632 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -172,7 +172,7 @@ function wpautop($pee, $br = 1) { /** * Checks to see if a string is utf8 encoded. * - * NOTE: This function checks for 5-Byte sequences, UTF8 + * NOTE: This function checks for 5-Byte sequences, UTF8 * has Bytes Sequences with a maximum length of 4. * * @author bmorel at ssi dot fr (modified) @@ -184,7 +184,7 @@ function wpautop($pee, $br = 1) { function seems_utf8(&$str) { $length = strlen($str); for ($i=0; $i < $length; $i++) { - $c = ord($str[$i]); + $c = ord($str[$i]); if ($c < 0x80) $n = 0; # 0bbbbbbb elseif (($c & 0xE0) == 0xC0) $n=1; # 110bbbbb elseif (($c & 0xF0) == 0xE0) $n=2; # 1110bbbb @@ -256,7 +256,7 @@ function _wp_specialchars( $string, $quote_style = ENT_NOQUOTES, $charset = fals } elseif ( $quote_style === 'single' ) { $quote_style = ENT_NOQUOTES; } - + // Handle double encoding ourselves if ( !$double_encode ) { $string = wp_specialchars_decode( $string, $_quote_style ); @@ -581,9 +581,9 @@ function remove_accents($string) { /** * Sanitizes a filename replacing whitespace with dashes * - * Removes special characters that are illegal in filenames on certain - * operating systems and special characters requiring special escaping - * to manipulate at the command line. Replaces spaces and consecutive + * Removes special characters that are illegal in filenames on certain + * operating systems and special characters requiring special escaping + * to manipulate at the command line. Replaces spaces and consecutive * dashes with a single dash. Trim period, dash and underscore from beginning * and end of filename. * @@ -720,14 +720,14 @@ function sanitize_sql_orderby( $orderby ){ /** * Santizes a html classname to ensure it only contains valid characters - * + * * Strips the string down to A-Z,a-z,0-9,'-' if this results in an empty * string then it will return the alternative value supplied. - * + * * @todo Expand to support the full range of CDATA that a class attribute can contain. - * + * * @since 2.8.0 - * + * * @param string $class The classname to be sanitized * @param string $fallback The value to return if the sanitization end's up as an empty string. * @return string The sanitized value @@ -735,14 +735,14 @@ function sanitize_sql_orderby( $orderby ){ function sanitize_html_class($class, $fallback){ //Strip out any % encoded octets $sanitized = preg_replace('|%[a-fA-F0-9][a-fA-F0-9]|', '', $class); - + //Limit to A-Z,a-z,0-9,'-' $sanitized = preg_replace('/[^A-Za-z0-9-]/', '', $sanitized); - + if ('' == $sanitized) $sanitized = $fallback; - - return apply_filters('sanitize_html_class',$sanitized, $class, $fallback); + + return apply_filters('sanitize_html_class',$sanitized, $class, $fallback); } /** @@ -2215,7 +2215,7 @@ function esc_attr( $text ) { * * @deprecated 2.8.0 * @see esc_attr() - * + * * @param string $text * @return string */ diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 454417d39c..9199ab043c 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -141,7 +141,7 @@ function number_format_i18n( $number, $decimals = null ) { $decimals = ( is_null( $decimals ) ) ? $wp_locale->number_format['decimals'] : intval( $decimals ); $num = number_format( $number, $decimals, $wp_locale->number_format['decimal_point'], $wp_locale->number_format['thousands_sep'] ); - + // let the user translate digits from latin to localized language return apply_filters( 'number_format_i18n', $num ); } @@ -479,7 +479,7 @@ function wp_load_alloptions() { * parameter value, will be called. The hook should accept two parameters, the * first is the new value and the second is the old value. Whatever is * returned will be used as the new value. - * + * * After the value has been updated the action named 'update_option_$option_name' * will be called. This action receives two parameters the first being the old * value and the second the new value. @@ -2035,7 +2035,7 @@ function wp_unique_filename( $dir, $filename, $unique_filename_callback = null ) $info = pathinfo($filename); $ext = !empty($info['extension']) ? $info['extension'] : ''; $name = basename($filename, ".{$ext}"); - + // edge case: if file is named '.ext', treat as an empty name if( $name === ".$ext" ) $name = ''; @@ -2366,7 +2366,7 @@ function wp_die( $message, $title = '', $args = array() ) { $defaults = array( 'response' => 500 ); $r = wp_parse_args($args, $defaults); - + $have_gettext = function_exists('__'); if ( function_exists( 'is_wp_error' ) && is_wp_error( $message ) ) { @@ -2390,12 +2390,12 @@ function wp_die( $message, $title = '', $args = array() ) { } elseif ( is_string( $message ) ) { $message = "

$message

"; } - + if ( isset( $r['back_link'] ) && $r['back_link'] ) { $back_text = $have_gettext? __('« Back') : '« Back'; $message .= "\n

$back_text

"; } - + if ( defined( 'WP_SITEURL' ) && '' != WP_SITEURL ) $admin_dir = WP_SITEURL . '/wp-admin/'; elseif ( function_exists( 'get_bloginfo' ) && '' != get_bloginfo( 'wpurl' ) ) @@ -2411,7 +2411,7 @@ function wp_die( $message, $title = '', $args = array() ) { nocache_headers(); header( 'Content-Type: text/html; charset=utf-8' ); } - + if ( empty($title) ) { $title = $have_gettext? __('WordPress › Error') : 'WordPress › Error'; } @@ -2683,9 +2683,9 @@ function wp_widgets_add_menu() { * @since 2.2.0 */ function wp_ob_end_flush_all() { - $levels = ob_get_level(); - for ($i=0; $i<$levels; $i++) - ob_end_flush(); + $levels = ob_get_level(); + for ($i=0; $i<$levels; $i++) + ob_end_flush(); } /** @@ -3164,7 +3164,7 @@ function wp_timezone_choice($selectedzone) { else return strnatcasecmp($a_continent, $b_continent); ')); - + $structure = ''; $pad = '   '; diff --git a/wp-includes/general-template.php b/wp-includes/general-template.php index 35833830c6..2480aaeb23 100644 --- a/wp-includes/general-template.php +++ b/wp-includes/general-template.php @@ -208,7 +208,7 @@ function wp_login_url($redirect = '') { * @param string $redirect Path to redirect to on login. */ function wp_lostpassword_url($redirect = '') { - $args = array( 'action' => 'lostpassword' ); + $args = array( 'action' => 'lostpassword' ); if ( !empty($redirect) ) { $args['redirect_to'] = $redirect; } diff --git a/wp-includes/http.php b/wp-includes/http.php index be618a7c66..408fd56e62 100644 --- a/wp-includes/http.php +++ b/wp-includes/http.php @@ -281,7 +281,7 @@ class WP_Http { $transports = WP_Http::_getTransport($r); } else { if ( is_array( $r['body'] ) || is_object( $r['body'] ) ) { - if ( ! version_compare(phpversion(), '5.1.2', '>=') ) + if ( ! version_compare(phpversion(), '5.1.2', '>=') ) $r['body'] = _http_build_query($r['body'], null, '&'); else $r['body'] = http_build_query($r['body'], null, '&'); diff --git a/wp-includes/link-template.php b/wp-includes/link-template.php index 4e5cd8aa71..ed1da6e640 100644 --- a/wp-includes/link-template.php +++ b/wp-includes/link-template.php @@ -1433,17 +1433,17 @@ function previous_posts_link( $label = '« Previous Page' ) { * @since 2.8 * * @param string|array $args Optional args. - * @return string The posts link navigation. + * @return string The posts link navigation. */ function get_posts_nav_link( $args = array() ) { global $wp_query; - + $return = ''; if ( !is_singular() ) { $defaults = array( - 'sep' => ' — ', - 'prelabel' => __('« Previous Page'), + 'sep' => ' — ', + 'prelabel' => __('« Previous Page'), 'nxtlabel' => __('Next Page »'), ); $args = wp_parse_args( $args, $defaults ); diff --git a/wp-includes/media.php b/wp-includes/media.php index ce1e821ed4..e7c0bc79fd 100644 --- a/wp-includes/media.php +++ b/wp-includes/media.php @@ -610,7 +610,7 @@ add_shortcode('gallery', 'gallery_shortcode'); */ function gallery_shortcode($attr) { global $post; - + static $instance = 0; $instance++; @@ -654,7 +654,7 @@ function gallery_shortcode($attr) { $captiontag = tag_escape($captiontag); $columns = intval($columns); $itemwidth = $columns > 0 ? floor(100/$columns) : 100; - + $selector = "gallery-{$instance}"; $output = apply_filters('gallery_style', " diff --git a/wp-includes/pluggable.php b/wp-includes/pluggable.php index 67295e24a7..8044ed2030 100644 --- a/wp-includes/pluggable.php +++ b/wp-includes/pluggable.php @@ -954,7 +954,7 @@ function wp_notify_postauthor($comment_id, $comment_type='') { $current_user = wp_get_current_user(); if ( $comment->user_id == $post->post_author ) return false; // The author moderated a comment on his own post - + if ('' == $user->user_email) return false; // If there's no email to send the comment to $comment_author_domain = @gethostbyaddr($comment->comment_author_IP); diff --git a/wp-includes/post-template.php b/wp-includes/post-template.php index dd948a2fc4..30856c5846 100644 --- a/wp-includes/post-template.php +++ b/wp-includes/post-template.php @@ -311,7 +311,7 @@ function get_post_class( $class = '', $post_id = null ) { $post = get_post($post_id); $classes = array(); - + $classes[] = 'post-' . $post->ID; $classes[] = $post->post_type; diff --git a/wp-includes/post.php b/wp-includes/post.php index 74ce1598ee..487f7d3c45 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -1197,8 +1197,8 @@ function wp_delete_post($postid = 0) { clean_post_cache($postid); } - wp_clear_scheduled_hook('publish_future_post', $postid); - + wp_clear_scheduled_hook('publish_future_post', $postid); + do_action('deleted_post', $postid); return $post; @@ -1734,7 +1734,7 @@ function check_and_publish_future_post($post_id) { * @param string $post_status no uniqueness checks are made if the post is still draft or pending * @param string $post_type * @param integer $post_parent - * @return string unique slug for the post, based on $post_name (with a -1, -2, etc. suffix) + * @return string unique slug for the post, based on $post_name (with a -1, -2, etc. suffix) */ function wp_unique_post_slug($slug, $post_ID, $post_status, $post_type, $post_parent) { global $wpdb, $wp_rewrite; @@ -1747,7 +1747,7 @@ function wp_unique_post_slug($slug, $post_ID, $post_status, $post_type, $post_pa $check_sql = "SELECT post_name FROM $wpdb->posts WHERE post_name = %s AND post_type = %s AND ID != %d AND post_parent = %d LIMIT 1"; $post_name_check = $wpdb->get_var($wpdb->prepare($check_sql, $slug, $post_type, $post_ID, $post_parent)); } - + if ( $post_name_check || in_array($slug, $wp_rewrite->feeds) ) { $suffix = 2; do { diff --git a/wp-includes/query.php b/wp-includes/query.php index 60a08d67a6..e8fbeecfaf 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -1908,7 +1908,7 @@ class WP_Query { foreach ($intersections as $item => $taxonomy) { if ( empty($q[$item]) ) continue; if ( in_array($item, $tagin) && empty($q['cat']) ) continue; // We should already have what we need if categories aren't being used - + if ( $item != 'category__and' ) { $reqtag = is_term( $q[$item][0], 'post_tag' ); if ( !empty($reqtag) ) @@ -2662,7 +2662,7 @@ function setup_postdata($post) { global $id, $authordata, $day, $currentmonth, $page, $pages, $multipage, $more, $numpages; do_action_ref_array('the_post', array(&$post)); - + $id = (int) $post->ID; $authordata = get_userdata($post->post_author); diff --git a/wp-includes/rewrite.php b/wp-includes/rewrite.php index 12af4059ef..c84b5205ed 100644 --- a/wp-includes/rewrite.php +++ b/wp-includes/rewrite.php @@ -1703,20 +1703,20 @@ class WP_Rewrite { return $rules; } - + /** * Retrieve IIS7 URL Rewrite formatted rewrite rules to write to web.config file. * * Does not actually write to the web.config file, but creates the rules for * the process that will. * - * @since 2.8.0 + * @since 2.8.0 * @access public * * @return string */ function iis7_url_rewrite_rules(){ - + if ( ! $this->using_permalinks()) { return ''; } @@ -1728,9 +1728,9 @@ class WP_Rewrite { $rules .= " \n"; $rules .= " \n"; $rules .= ""; - + $rules = apply_filters('iis7_url_rewrite_rules', $rules); - + return $rules; } @@ -1874,7 +1874,7 @@ class WP_Rewrite { * Will update the 'permalink_structure' option, if there is a difference * between the current permalink structure and the parameter value. Calls * {@link WP_Rewrite::init()} after the option is updated. - * + * * Fires the 'permalink_structure_changed' action once the init call has * processed passing the old and new values * diff --git a/wp-includes/script-loader.php b/wp-includes/script-loader.php index 4958a608c4..4779a5ac06 100644 --- a/wp-includes/script-loader.php +++ b/wp-includes/script-loader.php @@ -422,7 +422,7 @@ function wp_default_styles( &$styles ) { // all colors stylesheets need to have the same query strings (cache manifest compat) $colors_version = '20090522'; - + $styles->add( 'wp-admin', '/wp-admin/wp-admin.css', array(), '20090522' ); $styles->add_data( 'wp-admin', 'rtl', '/wp-admin/rtl.css' ); diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php index 3c5c1d75c9..0af57c74af 100644 --- a/wp-includes/taxonomy.php +++ b/wp-includes/taxonomy.php @@ -15,9 +15,9 @@ * Creates the initial taxonomies when 'init' action is fired. */ function create_initial_taxonomies() { - register_taxonomy( 'category', 'post', array('hierarchical' => true, 'update_count_callback' => '_update_post_term_count', 'label' => __('Categories'), 'query_var' => false, 'rewrite' => false) ) ; - register_taxonomy( 'post_tag', 'post', array('hierarchical' => false, 'update_count_callback' => '_update_post_term_count', 'label' => __('Post Tags'), 'query_var' => false, 'rewrite' => false) ) ; - register_taxonomy( 'link_category', 'link', array('hierarchical' => false, 'label' => __('Categories'), 'query_var' => false, 'rewrite' => false) ) ; + register_taxonomy( 'category', 'post', array('hierarchical' => true, 'update_count_callback' => '_update_post_term_count', 'label' => __('Categories'), 'query_var' => false, 'rewrite' => false) ) ; + register_taxonomy( 'post_tag', 'post', array('hierarchical' => false, 'update_count_callback' => '_update_post_term_count', 'label' => __('Post Tags'), 'query_var' => false, 'rewrite' => false) ) ; + register_taxonomy( 'link_category', 'link', array('hierarchical' => false, 'label' => __('Categories'), 'query_var' => false, 'rewrite' => false) ) ; } add_action( 'init', 'create_initial_taxonomies', 0 ); // highest priority @@ -167,7 +167,7 @@ function is_taxonomy_hierarchical($taxonomy) { function register_taxonomy( $taxonomy, $object_type, $args = array() ) { global $wp_taxonomies, $wp_rewrite, $wp; - if (!is_array($wp_taxonomies)) + if (!is_array($wp_taxonomies)) $wp_taxonomies = array(); $defaults = array('hierarchical' => false, 'update_count_callback' => '', 'rewrite' => true, 'query_var' => true); @@ -525,7 +525,7 @@ function get_term_to_edit( $id, $taxonomy ) { * The 'list_terms_exclusions' filter passes the compiled exclusions along with * the $args. * - * The 'get_terms_orderby' filter passes the ORDER BY clause for the query + * The 'get_terms_orderby' filter passes the ORDER BY clause for the query * along with the $args array. * The 'get_terms_fields' filter passes the fields for the SELECT query @@ -533,10 +533,10 @@ function get_term_to_edit( $id, $taxonomy ) { * * The list of arguments that $args can contain, which will overwrite the defaults: * - * orderby - Default is 'name'. Can be name, count, term_group, slug or nothing + * orderby - Default is 'name'. Can be name, count, term_group, slug or nothing * (will use term_id), Passing a custom value other than these will cause it to * order based on the custom value. - * + * * order - Default is ASC. Can use DESC. * * hide_empty - Default is true. Will not return empty terms, which means @@ -680,7 +680,7 @@ function &get_terms($taxonomies, $args = '') { $orderby = 't.slug'; else if ( 'term_group' == $_orderby ) $orderby = 't.term_group'; - elseif ( empty($_orderby) || 'id' == $_orderby ) + elseif ( empty($_orderby) || 'id' == $_orderby ) $orderby = 't.term_id'; $orderby = apply_filters( 'get_terms_orderby', $orderby, $args ); @@ -871,7 +871,7 @@ function is_term($term, $taxonomy = '', $parent = 0) { } $term = trim( stripslashes( $term ) ); - + if ( '' === $slug = sanitize_title($term) ) return 0; diff --git a/wp-includes/theme.php b/wp-includes/theme.php index f3a483ea33..82fe33a189 100644 --- a/wp-includes/theme.php +++ b/wp-includes/theme.php @@ -884,7 +884,7 @@ function preview_theme() { add_filter( 'stylesheet', create_function('', "return '{$_GET['stylesheet']}';") ); } - // Prevent theme mods to current theme being used on theme being previewed + // Prevent theme mods to current theme being used on theme being previewed add_filter( 'pre_option_mods_' . get_current_theme(), create_function( '', "return array();" ) ); ob_start( 'preview_theme_ob_filter' ); diff --git a/wp-includes/widgets.php b/wp-includes/widgets.php index f1285b7f72..4041179f81 100644 --- a/wp-includes/widgets.php +++ b/wp-includes/widgets.php @@ -173,7 +173,7 @@ class WP_Widget { if ( array_key_exists( $this->number, $settings ) ) { $settings = $settings[$this->number]; // filters the widget's settings, return false to stop displaying the widget - $settings = apply_filters('widget_display_callback', $settings, $this, $args); + $settings = apply_filters('widget_display_callback', $settings, $this, $args); if ( false !== $settings ) $this->widget($args, $settings); } @@ -285,7 +285,7 @@ class WP_Widget { function get_settings() { $settings = get_option($this->option_name); - + if ( false === $settings && isset($this->alt_option_name) ) $settings = get_option($this->alt_option_name); @@ -772,9 +772,9 @@ function dynamic_sidebar($index = 1) { $did_one = false; foreach ( (array) $sidebars_widgets[$index] as $id ) { - + if ( !isset($wp_registered_widgets[$id]) ) continue; - + $params = array_merge( array( array_merge( $sidebar, array('widget_id' => $id, 'widget_name' => $wp_registered_widgets[$id]['name']) ) ), (array) $wp_registered_widgets[$id]['params'] @@ -813,7 +813,7 @@ function dynamic_sidebar($index = 1) { * in which the first instance of the widget with the given callback or $id_base is found. * With the $widget_id parameter, returns the ID of the sidebar where * the widget with that callback/$id_base AND that ID is found. - * + * * NOTE: $widget_id and $id_base are the same for single widgets. To be effective * this function has to run after widgets have initialized, at action 'init' or later. * @@ -834,7 +834,7 @@ function is_active_widget($callback = false, $widget_id = false, $id_base = fals foreach ( $sidebars_widgets as $sidebar => $widgets ) { if ( $skip_inactive && 'wp_inactive_widgets' == $sidebar ) continue; - + if ( is_array($widgets) ) { foreach ( $widgets as $widget ) { if ( ( $callback && isset($wp_registered_widgets[$widget]['callback']) && $wp_registered_widgets[$widget]['callback'] == $callback ) || ( $id_base && preg_replace( '/-[0-9]+$/', '', $widget ) == $id_base ) ) { @@ -878,8 +878,8 @@ function is_dynamic_sidebar() { */ function is_active_sidebar( $index ) { $index = ( is_int($index) ) ? "sidebar-$index" : sanitize_title($index); - $sidebars_widgets = get_option( 'sidebars_widgets', array() ); - if ( isset($sidebars_widgets[$index]) && !empty($sidebars_widgets[$index]) ) + $sidebars_widgets = get_option( 'sidebars_widgets', array() ); + if ( isset($sidebars_widgets[$index]) && !empty($sidebars_widgets[$index]) ) return true; return false; @@ -1056,7 +1056,7 @@ function wp_convert_widget_settings($base_name, $option_name, $settings) { $GLOBALS['_wp_sidebars_widgets'] = get_option('sidebars_widgets'); $sidebars_widgets = &$GLOBALS['_wp_sidebars_widgets']; } - + foreach ( (array) $sidebars_widgets as $index => $sidebar ) { if ( is_array($sidebar) ) { foreach ( $sidebar as $i => $name ) { diff --git a/wp-login.php b/wp-login.php index bf3a9d2ec4..5c492e6e54 100644 --- a/wp-login.php +++ b/wp-login.php @@ -147,12 +147,12 @@ function retrieve_password() { $message .= sprintf(__('Username: %s'), $user_login) . "\r\n\r\n"; $message .= __('To reset your password visit the following address, otherwise just ignore this email and nothing will happen.') . "\r\n\r\n"; $message .= site_url("wp-login.php?action=rp&key=$key", 'login') . "\r\n"; - + $title = sprintf(__('[%s] Password Reset'), get_option('blogname')); - + $title = apply_filters('retrieve_password_title', $title); $message = apply_filters('retrieve_password_message', $message, $key); - + if ( $message && !wp_mail($user_email, $title, $message) ) die('

' . __('The e-mail could not be sent.') . "
\n" . __('Possible reason: your host may have disabled the mail() function...') . '

'); @@ -181,7 +181,7 @@ function reset_password($key) { // Generate something random for a password... $new_pass = wp_generate_password(); - + do_action('password_reset', $user, $new_pass); wp_set_password($new_pass, $user->ID); @@ -194,7 +194,7 @@ function reset_password($key) { $title = apply_filters('password_reset_title', $title); $message = apply_filters('password_reset_message', $message, $new_pass); - + if ( $message && !wp_mail($user->user_email, $title, $message) ) die('

' . __('The e-mail could not be sent.') . "
\n" . __('Possible reason: your host may have disabled the mail() function...') . '

');