From b046d67f41fc3f081ba81b8df816de03a2dc677c Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Thu, 14 Jun 2007 02:25:30 +0000 Subject: [PATCH] Trim empty lines. Nothing but newline. git-svn-id: https://develop.svn.wordpress.org/trunk@5700 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/edit-pages.php | 2 +- wp-admin/export.php | 4 +- wp-admin/import/blogger.php | 2 +- wp-admin/import/mt.php | 2 +- wp-admin/import/utw.php | 146 +++++++++--------- wp-admin/import/wordpress.php | 6 +- wp-admin/import/wp-cat2tag.php | 110 ++++++------- wp-admin/includes/bookmark.php | 2 +- wp-admin/includes/file.php | 2 +- wp-admin/includes/image.php | 2 +- wp-admin/includes/plugin.php | 2 +- wp-admin/includes/schema.php | 2 +- wp-admin/includes/template.php | 4 +- wp-admin/includes/theme.php | 2 +- wp-admin/includes/upgrade.php | 16 +- wp-admin/link-import.php | 2 +- wp-admin/moderation.php | 52 +++---- wp-admin/options-general.php | 2 +- wp-admin/options.php | 2 +- wp-admin/plugins.php | 4 +- wp-admin/widgets.php | 66 ++++---- wp-app.php | 4 +- .../themes/default/images/header-img.php | 20 +-- wp-content/themes/default/sidebar.php | 4 +- wp-includes/author-template.php | 2 +- wp-includes/bookmark-template.php | 16 +- wp-includes/bookmark.php | 4 +- wp-includes/category-template.php | 24 +-- wp-includes/class-IXR.php | 2 +- wp-includes/class-phpmailer.php | 74 ++++----- wp-includes/class-smtp.php | 6 +- wp-includes/classes.php | 2 +- wp-includes/cron.php | 4 +- wp-includes/formatting.php | 2 +- wp-includes/functions.php | 8 +- wp-includes/general-template.php | 12 +- .../classes/TinyGoogleSpell.class.php | 2 +- .../classes/TinyPspellShell.class.php | 2 +- .../plugins/spellchecker/tinyspell.php | 4 +- wp-includes/js/tinymce/tiny_mce_config.php | 2 +- wp-includes/js/tinymce/tiny_mce_gzip.php | 2 +- wp-includes/kses.php | 2 +- wp-includes/link-template.php | 38 ++--- wp-includes/locale.php | 4 +- wp-includes/pluggable.php | 50 +++--- wp-includes/post-template.php | 6 +- wp-includes/post.php | 24 +-- wp-includes/query.php | 4 +- wp-includes/rewrite.php | 2 +- wp-includes/script-loader.php | 30 ++-- wp-includes/streams.php | 8 +- wp-includes/taxonomy.php | 12 +- wp-includes/theme.php | 12 +- wp-includes/user.php | 4 +- wp-includes/vars.php | 8 +- wp-includes/widgets.php | 18 +-- wp-includes/wp-db.php | 4 +- wp-mail.php | 2 +- wp-settings.php | 2 +- xmlrpc.php | 6 +- 60 files changed, 432 insertions(+), 432 deletions(-) diff --git a/wp-admin/edit-pages.php b/wp-admin/edit-pages.php index aa3c6e99f2..6e3b2864bb 100644 --- a/wp-admin/edit-pages.php +++ b/wp-admin/edit-pages.php @@ -41,7 +41,7 @@ printf( _c( '%1$s%2$s%3$s|manage pages header' ), $post_status_label, $h2_author - +

'; echo ''; echo ''; } - - + + function import_posts ( ) { echo '
'; echo '

'.__('Reading UTW Post Tags…').'

'; @@ -128,12 +128,12 @@ class UTW_Import { } add_option('utwimp_posts', $posts); - + $count = count($posts); - + echo '

' . sprintf( __('Done! %s tag to post relationships were read.'), $count ) . '

'; - + } echo '
'; @@ -142,8 +142,8 @@ class UTW_Import { echo '
'; } - - + + function import_t2p ( ) { echo '
'; @@ -151,7 +151,7 @@ class UTW_Import { // run that funky magic! $tags_added = $this->tag2post(); - + echo '

' . sprintf( __('Done! %s tags where added!'), $tags_added ) . '

'; echo ''; @@ -160,104 +160,104 @@ class UTW_Import { echo '
'; } - - + + function get_utw_tags ( ) { - + global $wpdb; - + // read in all the tags from the UTW tags table: should be wp_tags $tags_query = "SELECT tag_id, tag FROM " . $wpdb->prefix . "tags"; - + $tags = $wpdb->get_results($tags_query); - + // rearrange these tags into something we can actually use foreach ( $tags as $tag ) { - + $new_tags[$tag->tag_id] = $tag->tag; - + } - + return $new_tags; } - + function get_utw_posts ( ) { - + global $wpdb; - + // read in all the posts from the UTW post->tag table: should be wp_post2tag $posts_query = "SELECT tag_id, post_id FROM " . $wpdb->prefix . "post2tag"; - + $posts = $wpdb->get_results($posts_query); - + return $posts; - + } - - + + function tag2post ( ) { - + // get the tags and posts we imported in the last 2 steps $tags = get_option('utwimp_tags'); $posts = get_option('utwimp_posts'); - + // null out our results $tags_added = 0; - + // loop through each post and add its tags to the db foreach ( $posts as $this_post ) { - + $the_post = (int) $this_post->post_id; $the_tag = (int) $this_post->tag_id; - + // what's the tag name for that id? $the_tag = $tags[$the_tag]; - + // screw it, just try to add the tag wp_add_post_tags($the_post, $the_tag); $tags_added++; - + } - + // that's it, all posts should be linked to their tags properly, pending any errors we just spit out! return $tags_added; - - + + } - - + + function cleanup_import ( ) { - + delete_option('utwimp_tags'); delete_option('utwimp_posts'); - + $this->done(); - + } - - + + function done ( ) { - + echo '
'; echo '

'.__('Import Complete!').'

'; - + echo '

' . __('OK, so we lied about this being a 5-step program! You’re done!') . '

'; - + echo '

' . __('Now wasn’t that easy?') . '

'; - + echo '
'; - + } - + function UTW_Import ( ) { - + // Nothing. - + } - + } diff --git a/wp-admin/import/wordpress.php b/wp-admin/import/wordpress.php index 7dadede4b0..ef84032cac 100644 --- a/wp-admin/import/wordpress.php +++ b/wp-admin/import/wordpress.php @@ -251,14 +251,14 @@ class WP_Import { echo '

'.sprintf(__('All done.').' '.__('Have fun!').'', get_option('home')).'

'; } - + function process_post($post) { global $wpdb; $post_ID = (int) $this->get_tag( $post, 'wp:post_id' ); if ( $post_ID && !empty($this->posts_processed[$post_ID][1]) ) // Processed already return 0; - + // There are only ever one of these $post_title = $this->get_tag( $post, 'title' ); $post_date = $this->get_tag( $post, 'wp:post_date' ); @@ -311,7 +311,7 @@ class WP_Import { // Memorize old and new ID. if ( $post_id && $post_ID && $this->posts_processed[$post_ID] ) $this->posts_processed[$post_ID][1] = $post_id; // New ID. - + // Add categories. if (count($categories) > 0) { $post_cats = array(); diff --git a/wp-admin/import/wp-cat2tag.php b/wp-admin/import/wp-cat2tag.php index bb69eb2c31..c31658ef49 100644 --- a/wp-admin/import/wp-cat2tag.php +++ b/wp-admin/import/wp-cat2tag.php @@ -3,163 +3,163 @@ class WP_Categories_to_Tags { var $categories_to_convert = array(); var $all_categories = array(); - + function header() { print '
'; print '

' . __('Convert Categories to Tags') . '

'; } - + function footer() { print '
'; } - + function populate_all_categories() { global $wpdb; - + $this->all_categories = get_categories('get=all'); } - + function welcome() { $this->populate_all_categories(); - + print '
'; - + if (count($this->all_categories) > 0) { print '

' . __('Howdy! This converter allows you to selectively convert existing categories to tags. To get started, check the checkboxes of the categories you wish to be converted, then click the Convert button.') . '

'; print '

' . __('Keep in mind that if you convert a category with child categories, those child categories get their parent setting removed, so they\'re in the root.') . '

'; - + $this->categories_form(); } else { print '

'.__('You have no categories to convert!').'

'; } - + print '
'; } - + function categories_form() { print ''; print ''; - + print '

'; print ''; } - + function _category_children($parent, $hier) { print ''; } - + function _category_exists($cat_id) { global $wpdb; - + $cat_id = (int) $cat_id; - + $maybe_exists = category_exists($cat_id); - + if ( $maybe_exists ) { return true; } else { return false; } } - + function convert_them() { global $wpdb; - + if (!isset($_POST['cats_to_convert']) || !is_array($_POST['cats_to_convert'])) { print '
'; print '

' . sprintf(__('Uh, oh. Something didn\'t work. Please try again.'), 'admin.php?import=wp-cat2tag') . '

'; print '
'; } - - + + if ( empty($this->categories_to_convert) ) $this->categories_to_convert = $_POST['cats_to_convert']; $hier = _get_term_hierarchy('category'); - + print ''; } - + function convert_all_confirm() { print '
'; - + print '

' . __('Confirm') . '

'; - + print '

' . __('You are about to convert all categories to tags. Are you sure you want to continue?') . '

'; - + print '
'; print '

    

'; print '
'; - + print '
'; } - + function convert_all() { global $wpdb; $wpdb->query("UPDATE $wpdb->term_taxonomy SET taxonomy = 'post_tag', parent = 0 WHERE taxonomy = 'category'"); clean_category_cache($category->term_id); } - + function init() { echo ''; - + if (isset($_POST['maybe_convert_all_cats'])) { $step = 3; } elseif (isset($_POST['yes_convert_all_cats'])) { @@ -169,9 +169,9 @@ class WP_Categories_to_Tags { } else { $step = (isset($_GET['step'])) ? (int) $_GET['step'] : 1; } - + $this->header(); - + if (!current_user_can('manage_categories')) { print '
'; print '

' . __('Cheatin’ uh?') . '

'; @@ -181,24 +181,24 @@ class WP_Categories_to_Tags { case 1 : $this->welcome(); break; - + case 2 : $this->convert_them(); break; - + case 3 : $this->convert_all_confirm(); break; - + case 4 : $this->convert_all(); break; } } - + $this->footer(); } - + function WP_Categories_to_Tags() { // Do nothing. } diff --git a/wp-admin/includes/bookmark.php b/wp-admin/includes/bookmark.php index 36cb2edb1c..c0aafb923d 100644 --- a/wp-admin/includes/bookmark.php +++ b/wp-admin/includes/bookmark.php @@ -46,7 +46,7 @@ function wp_delete_link($link_id) { wp_delete_object_term_relationships($link_id, 'link_category'); $wpdb->query("DELETE FROM $wpdb->links WHERE link_id = '$link_id'"); - + do_action('deleted_link', $link_id); return true; diff --git a/wp-admin/includes/file.php b/wp-admin/includes/file.php index 8cb19b0e52..027b8c4f4b 100644 --- a/wp-admin/includes/file.php +++ b/wp-admin/includes/file.php @@ -138,7 +138,7 @@ function wp_handle_upload( &$file, $overrides = false ) { if ( ( !$type || !$ext ) && !current_user_can( 'unfiltered_upload' ) ) return $upload_error_handler( $file, __( 'File type does not meet security guidelines. Try another.' )); - + if ( !$ext ) $ext = strrchr($file['name'], '.'); } diff --git a/wp-admin/includes/image.php b/wp-admin/includes/image.php index 4e5c4ed2bb..ec4466e5dc 100644 --- a/wp-admin/includes/image.php +++ b/wp-admin/includes/image.php @@ -121,7 +121,7 @@ function wp_crop_image( $src_file, $src_x, $src_y, $src_w, $src_h, $dst_w, $dst_ if (function_exists('imageantialias')) imageantialias( $dst, true ); - + imagecopyresampled( $dst, $src, 0, 0, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h ); if ( !$dst_file ) diff --git a/wp-admin/includes/plugin.php b/wp-admin/includes/plugin.php index c97b2db963..be5f28cd01 100644 --- a/wp-admin/includes/plugin.php +++ b/wp-admin/includes/plugin.php @@ -7,7 +7,7 @@ function get_plugin_data( $plugin_file ) { preg_match( '|Description:(.*)$|mi', $plugin_data, $description ); preg_match( '|Author:(.*)$|mi', $plugin_data, $author_name ); preg_match( '|Author URI:(.*)$|mi', $plugin_data, $author_uri ); - + if ( preg_match( "|Version:(.*)|i", $plugin_data, $version )) $version = trim( $version[1] ); else diff --git a/wp-admin/includes/schema.php b/wp-admin/includes/schema.php index 1030b2e379..90beddd1d0 100644 --- a/wp-admin/includes/schema.php +++ b/wp-admin/includes/schema.php @@ -392,7 +392,7 @@ function populate_roles_210() { function populate_roles_230() { $role = get_role( 'administrator' ); - + if ( !empty( $role ) ) { $role->add_cap( 'unfiltered_upload' ); } diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php index 4a4b660b9c..d0efb3af60 100644 --- a/wp-admin/includes/template.php +++ b/wp-admin/includes/template.php @@ -149,7 +149,7 @@ function dropdown_link_categories( $default = 0 ) { } $categories = get_terms('link_category', 'orderby=count&hide_empty=0'); - + if ( empty($categories) ) return; @@ -421,7 +421,7 @@ function touch_time( $edit = 1, $for_post = 1 ) { if ( $for_post ) $edit = ( ('draft' == $post->post_status ) && (!$post->post_date || '0000-00-00 00:00:00' == $post->post_date ) ) ? false : true; - + echo '
'; $time_adj = time() + (get_option( 'gmt_offset' ) * 3600 ); diff --git a/wp-admin/includes/theme.php b/wp-admin/includes/theme.php index c2329b5e3c..bd39dea20f 100644 --- a/wp-admin/includes/theme.php +++ b/wp-admin/includes/theme.php @@ -33,7 +33,7 @@ function get_page_templates() { if ( is_array( $templates ) ) { foreach ( $templates as $template ) { $template_data = implode( '', file( ABSPATH.$template )); - + preg_match( '|Template Name:(.*)$|mi', $template_data, $name ); preg_match( '|Description:(.*)$|mi', $template_data, $description ); diff --git a/wp-admin/includes/upgrade.php b/wp-admin/includes/upgrade.php index 6457754c84..e4a773ce5d 100644 --- a/wp-admin/includes/upgrade.php +++ b/wp-admin/includes/upgrade.php @@ -187,11 +187,11 @@ function upgrade_all() { if ( $wp_current_db_version < 4351 ) upgrade_old_slugs(); - + if ( $wp_current_db_version < 5539 ) upgrade_230(); - + maybe_disable_automattic_widgets(); $wp_rewrite->flush_rules(); @@ -576,7 +576,7 @@ function upgrade_210() { function upgrade_230() { global $wp_current_db_version, $wpdb; - + if ( $wp_current_db_version < 5200 ) { populate_roles_230(); } @@ -628,7 +628,7 @@ function upgrade_230() { $wpdb->query("INSERT INTO $wpdb->term_taxonomy (term_id, taxonomy, description, parent, count) VALUES ('$term_id', '$taxonomy', '$description', '$parent', '$count')"); $tt_ids[$term_id][$taxonomy] = (int) $wpdb->insert_id; } - + if ( empty($count) ) { $count = 0; $taxonomy = 'category'; @@ -756,15 +756,15 @@ function get_alloptions_110() { // Version of get_option that is private to install/upgrade. function __get_option($setting) { global $wpdb; - + if ( $setting == 'home' && defined( 'WP_HOME' ) ) { return preg_replace( '|/+$|', '', constant( 'WP_HOME' ) ); } - + if ( $setting == 'siteurl' && defined( 'WP_SITEURL' ) ) { return preg_replace( '|/+$|', '', constant( 'WP_SITEURL' ) ); } - + $option = $wpdb->get_var("SELECT option_value FROM $wpdb->options WHERE option_name = '$setting'"); if ( 'home' == $setting && '' == $option ) @@ -1208,7 +1208,7 @@ function wp_check_mysql_version() { function maybe_disable_automattic_widgets() { $plugins = __get_option( 'active_plugins' ); - + foreach ( (array) $plugins as $plugin ) { if ( basename( $plugin ) == 'widgets.php' ) { array_splice( $plugins, array_search( $plugin, $plugins ), 1 ); diff --git a/wp-admin/link-import.php b/wp-admin/link-import.php index abbbdc238b..60bf09c454 100644 --- a/wp-admin/link-import.php +++ b/wp-admin/link-import.php @@ -98,7 +98,7 @@ foreach ($categories as $category) { } else { $opml = file_get_contents($opml_url); } - + include_once('link-parse-opml.php'); $link_count = count($names); diff --git a/wp-admin/moderation.php b/wp-admin/moderation.php index b054bcf5e4..953fda4267 100644 --- a/wp-admin/moderation.php +++ b/wp-admin/moderation.php @@ -19,48 +19,48 @@ if ( isset( $_POST['comment'] ) && is_array( $_POST['comment'] ) ) { if ( $action == 'update' ) { check_admin_referer( 'moderate-comments' ); - + if ( !current_user_can( 'moderate_comments' ) ) { wp_die( __( 'Your level is not high enough to moderate comments.' ) ); } - + $item_ignored = 0; $item_deleted = 0; $item_approved = 0; $item_spam = 0; - + foreach ( $comment as $k => $v ) { if ( $feelinglucky && $v == 'later' ) { $v = 'delete'; } - + switch ( $v ) { case 'later' : $item_ignored++; break; - + case 'delete' : wp_set_comment_status( $k, 'delete' ); $item_deleted++; break; - + case 'spam' : wp_set_comment_status( $k, 'spam' ); $item_spam++; break; - + case 'approve' : wp_set_comment_status( $k, 'approve' ); - + if ( get_option( 'comments_notify' ) == true ) { wp_notify_postauthor( $k ); } - + $item_approved++; break; } } - + wp_redirect( basename( __FILE__ ) . '?ignored=' . $item_ignored . '&deleted=' . $item_deleted . '&approved=' . $item_approved . '&spam=' . $item_spam ); exit; } @@ -77,25 +77,25 @@ if ( isset( $_GET['approved'] ) || isset( $_GET['deleted'] ) || isset( $_GET['sp $approved = isset( $_GET['approved'] ) ? (int) $_GET['approved'] : 0; $deleted = isset( $_GET['deleted'] ) ? (int) $_GET['deleted'] : 0; $spam = isset( $_GET['ignored'] ) ? (int) $_GET['spam'] : 0; - + if ( $approved > 0 || $deleted > 0 || $spam > 0 ) { echo '

'; - + if ( $approved > 0 ) { printf( __ngettext( '%s comment approved.', '%s comments approved.', $approved ), $approved ); echo '
'; } - + if ( $deleted > 0 ) { printf( __ngettext( '%s comment deleted', '%s comments deleted.', $deleted ), $deleted ); echo '
'; } - + if ( $spam > 0 ) { printf( __ngettext( '%s comment marked as spam', '%s comments marked as spam', $spam ), $spam ); echo '
'; } - + echo '

'; } } @@ -137,23 +137,23 @@ $comments = array_slice( $comments, $start, $stop ); ?>

- + ' . $page_links . '

'; } ?> - +
    comment_author_url ) && $comment->comment_author_url != 'http://' ) { ?>| |

    - +

    @@ -189,25 +189,25 @@ $comments = array_slice( $comments, $start, $stop ); } ?>
- + ' . $page_links . '

'; } ?> - +
- + - +

- + diff --git a/wp-admin/options-general.php b/wp-admin/options-general.php index a32f8f16e0..ecaa01e5f7 100644 --- a/wp-admin/options-general.php +++ b/wp-admin/options-general.php @@ -6,7 +6,7 @@ $parent_file = 'options-general.php'; include('./admin-header.php'); ?> - +

diff --git a/wp-admin/options.php b/wp-admin/options.php index 93238870da..f6b6880edf 100644 --- a/wp-admin/options.php +++ b/wp-admin/options.php @@ -34,7 +34,7 @@ case 'update': update_option($option, $value); } } - + $referred = remove_query_arg('updated' , wp_get_referer()); $goback = add_query_arg('updated', 'true', wp_get_referer()); $goback = preg_replace('|[^a-z0-9-~+_.?#=&;,/:]|i', '', $goback); diff --git a/wp-admin/plugins.php b/wp-admin/plugins.php index a01f43a072..91d52c1133 100644 --- a/wp-admin/plugins.php +++ b/wp-admin/plugins.php @@ -31,12 +31,12 @@ if ( isset($_GET['action']) ) { } elseif ($_GET['action'] == 'deactivate-all') { check_admin_referer('deactivate-all'); $current = get_option('active_plugins'); - + foreach ($current as $plugin) { array_splice($current, array_search($plugin, $current), 1); do_action('deactivate_' . $plugin); } - + update_option('active_plugins', array()); wp_redirect('plugins.php?deactivate-all=true'); } diff --git a/wp-admin/widgets.php b/wp-admin/widgets.php index 83d62d1ce1..6f2b47050d 100644 --- a/wp-admin/widgets.php +++ b/wp-admin/widgets.php @@ -10,7 +10,7 @@ wp_enqueue_script( 'scriptaculous-dragdrop' ); function wp_widgets_admin_head() { global $wp_registered_sidebars, $wp_registered_widgets, $wp_registered_widget_controls; - + define( 'WP_WIDGETS_WIDTH', 1 + 262 * ( count( $wp_registered_sidebars ) ) ); define( 'WP_WIDGETS_HEIGHT', 35 * ( count( $wp_registered_widgets ) ) ); ?> @@ -30,13 +30,13 @@ function wp_widgets_admin_head() { $sidebar ) { $cols[] = '\'' . $index . '\''; } $cols = implode( ', ', $cols ); - + $widgets = array(); foreach ( $wp_registered_widgets as $name => $widget ) { $widgets[] = '\'' . $widget['id'] . '\''; @@ -179,19 +179,19 @@ do_action( 'sidebar_admin_setup' ); function wp_widget_draggable( $name ) { global $wp_registered_widgets, $wp_registered_widget_controls; - + if ( !isset( $wp_registered_widgets[$name] ) ) { return; } - + $sanitized_name = sanitize_title( $wp_registered_widgets[$name]['id'] ); $link_title = __( 'Configure' ); $popper = ( isset( $wp_registered_widget_controls[$name] ) ) ? '
' : ''; - + $output = '
  • %2$s
  • '; - + printf( $output, $sanitized_name, $wp_registered_widgets[$name]['name'] . $popper ); } @@ -204,11 +204,11 @@ if ( count( $wp_registered_sidebars ) < 1 ) { ?>

    - +

    follow these instructions.' ); /* TODO: article on codex */; ?>

    $sidebar ) { $postindex = $index . 'order'; - + parse_str( $_POST[$postindex], $order ); - + $new_order = $order[$index]; - + if ( is_array( $new_order ) ) { foreach ( $new_order as $sanitized_name ) { foreach ( $wp_registered_widgets as $name => $widget ) { @@ -248,7 +248,7 @@ if ( isset( $_POST['action'] ) ) { } } } - + wp_set_sidebars_widgets( $sidebars_widgets ); break; } @@ -260,14 +260,14 @@ $inactive_widgets = array(); foreach ( $wp_registered_widgets as $name => $widget ) { $is_active = false; - + foreach ( $wp_registered_sidebars as $index => $sidebar ) { if ( is_array( $sidebars_widgets[$index] ) && in_array( $name, $sidebars_widgets[$index] ) ) { $is_active = true; break; } } - + if ( !$is_active ) { $inactive_widgets[] = $name; } @@ -297,9 +297,9 @@ if ( isset( $_POST['action'] ) ) { ?>

    - +

    - +

    @@ -309,17 +309,17 @@ if ( isset( $_POST['action'] ) ) { foreach ( $wp_registered_sidebars as $index => $sidebar ) { ?> - +

    - +

    - +
      - +
      - +
    - +

    - +
    - + - +

    - +
    $widget ) { ?> - +
    - +
    - + diff --git a/wp-app.php b/wp-app.php index ded359efb5..13a506742d 100644 --- a/wp-app.php +++ b/wp-app.php @@ -109,7 +109,7 @@ class AtomParser { $fp = fopen("php://input", "r"); while(!feof($fp)) { $line = fgets($fp, 4096); - + if($app_logging) $contents .= $line; if(!xml_parse($parser, $line)) { @@ -162,7 +162,7 @@ class AtomParser { if(count($this->in_content) == 2) { array_push($this->in_content, ">"); } - + array_push($this->in_content, "<". $this->ns_to_prefix($name) ."{$xmlns_str}{$attrs_str}"); } else if(in_array($tag, $this->ATOM_CONTENT_ELEMENTS) || in_array($tag, $this->ATOM_SIMPLE_ELEMENTS)) { $this->in_content = array(); diff --git a/wp-content/themes/default/images/header-img.php b/wp-content/themes/default/images/header-img.php index 65a9e87515..c54491a36d 100644 --- a/wp-content/themes/default/images/header-img.php +++ b/wp-content/themes/default/images/header-img.php @@ -1,11 +1,11 @@ array('r1', 'g1', 'b1'), 'lower'=>array('r2', 'g2', 'b2')); @@ -23,17 +23,17 @@ foreach ( $vars as $var => $subvars ) { $default = true; } } - + if ( $default ) list ( $r1, $g1, $b1, $r2, $g2, $b2 ) = array ( 105, 174, 231, 65, 128, 182 ); - + // Create the image $im = imagecreatefromjpeg($img); - + // Get the background color, define the rectangle height $white = imagecolorat( $im, 15, 15 ); $h = 182; - + // Define the boundaries of the rounded edges ( y => array ( x1, x2 ) ) $corners = array( 0 => array ( 25, 734 ), @@ -47,14 +47,14 @@ $corners = array( 180 => array ( 23, 736 ), 181 => array ( 25, 734 ), ); - + // Blank out the blue thing for ( $i = 0; $i < $h; $i++ ) { $x1 = 19; $x2 = 740; imageline( $im, $x1, 18 + $i, $x2, 18 + $i, $white ); } - + // Draw a new color thing for ( $i = 0; $i < $h; $i++ ) { $x1 = 20; @@ -69,7 +69,7 @@ for ( $i = 0; $i < $h; $i++ ) { } imageline( $im, $x1, 18 + $i, $x2, 18 + $i, $color ); } - + //die; header("Content-Type: image/jpeg"); imagejpeg($im, '', 92); diff --git a/wp-content/themes/default/sidebar.php b/wp-content/themes/default/sidebar.php index a6c5b7ed2d..f692c9e391 100644 --- a/wp-content/themes/default/sidebar.php +++ b/wp-content/themes/default/sidebar.php @@ -40,7 +40,7 @@

    You are currently browsing the weblog archives.

    - + Pages' ); ?> @@ -67,7 +67,7 @@ - +
    diff --git a/wp-includes/author-template.php b/wp-includes/author-template.php index e250fe9698..3a30e2e51c 100644 --- a/wp-includes/author-template.php +++ b/wp-includes/author-template.php @@ -362,7 +362,7 @@ function get_author_name( $auth_id ) { */ function wp_list_authors($args = '') { global $wpdb; - + $defaults = array( 'optioncount' => false, 'exclude_admin' => true, 'show_fullname' => false, 'hide_empty' => true, diff --git a/wp-includes/bookmark-template.php b/wp-includes/bookmark-template.php index 3252d4ea09..a6bc3fd06e 100644 --- a/wp-includes/bookmark-template.php +++ b/wp-includes/bookmark-template.php @@ -9,12 +9,12 @@ **/ function wp_get_links($args = '') { global $wpdb; - + if ( strpos( $args, '=' ) === false ) { $cat_id = $args; $args = add_query_arg( 'category', $cat_id, $args ); } - + $defaults = array( 'category' => -1, 'before' => '', 'after' => '
    ', 'between' => ' ', @@ -23,7 +23,7 @@ function wp_get_links($args = '') { 'limit' => -1, 'show_updated' => true, 'echo' => true ); - + $r = wp_parse_args( $args, $defaults ); extract( $r ); @@ -131,7 +131,7 @@ function get_links($category = -1, if ( $show_description && '' != $desc ) $output .= $between . $desc; - + if ($show_rating) { $output .= $between . get_linkrating($row); } @@ -245,7 +245,7 @@ function _walk_bookmarks($bookmarks, $args = '' ) { 'show_images' => 1, 'before' => '
  • ', 'after' => '
  • ', 'between' => "\n" ); - + $r = wp_parse_args( $args, $defaults ); extract( $r ); @@ -302,11 +302,11 @@ function _walk_bookmarks($bookmarks, $args = '' ) { if ( $show_description && '' != $desc ) $output .= $between . $desc; - + if ($show_rating) { $output .= $between . get_linkrating($bookmark); } - + $output .= "$after\n"; } // end while @@ -325,7 +325,7 @@ function wp_list_bookmarks($args = '') { 'class' => 'linkcat', 'category_before' => '
  • ', 'category_after' => '
  • ' ); - + $r = wp_parse_args( $args, $defaults ); extract( $r ); diff --git a/wp-includes/bookmark.php b/wp-includes/bookmark.php index da13e1219e..4431ce06ab 100644 --- a/wp-includes/bookmark.php +++ b/wp-includes/bookmark.php @@ -25,7 +25,7 @@ function get_link($bookmark_id, $output = OBJECT) { function get_bookmarks($args = '') { global $wpdb; - + $defaults = array( 'orderby' => 'name', 'order' => 'ASC', 'limit' => -1, 'category' => '', @@ -33,7 +33,7 @@ function get_bookmarks($args = '') { 'show_updated' => 0, 'include' => '', 'exclude' => '' ); - + $r = wp_parse_args( $args, $defaults ); extract( $r ); diff --git a/wp-includes/category-template.php b/wp-includes/category-template.php index 482ef4da95..18d03a5263 100644 --- a/wp-includes/category-template.php +++ b/wp-includes/category-template.php @@ -186,9 +186,9 @@ function wp_dropdown_categories($args = '') { 'selected' => 0, 'hierarchical' => 0, 'name' => 'cat', 'class' => 'postform' ); - + $defaults['selected'] = ( is_category() ) ? get_query_var('cat') : 0; - + $r = wp_parse_args( $args, $defaults ); $r['include_last_update_time'] = $r['show_last_update']; extract( $r ); @@ -236,19 +236,19 @@ function wp_list_categories($args = '') { 'feed_image' => '', 'exclude' => '', 'hierarchical' => true, 'title_li' => __('Categories') ); - + $r = wp_parse_args( $args, $defaults ); - + if ( !isset( $r['pad_counts'] ) && $r['show_count'] && $r['hierarchical'] ) { $r['pad_counts'] = true; } - + if ( isset( $r['show_date'] ) ) { $r['include_last_update_time'] = $r['show_date']; } - + extract( $r ); - + $categories = get_categories($r); $output = ''; @@ -262,13 +262,13 @@ function wp_list_categories($args = '') { $output .= __("No categories"); } else { global $wp_query; - + if( !empty($show_option_all) ) if ('list' == $style ) $output .= '
  • ' . $show_option_all . '
  • '; else $output .= '' . $show_option_all . ''; - + if ( is_category() ) $r['current_category'] = $wp_query->get_queried_object_id(); @@ -409,12 +409,12 @@ function get_tag_link( $tag_id ) { function get_the_tags( $id = 0 ) { global $post; - + $id = (int) $id; if ( ! $id && ! in_the_loop() ) return false; // in-the-loop function - + if ( !$id ) $id = (int) $post->ID; @@ -433,7 +433,7 @@ function the_tags( $before = 'Tags: ', $sep = ', ', $after = '' ) { if ( empty( $tags ) ) return false; - + $tag_list = $before; foreach ( $tags as $tag ) $tag_links[] = ''; diff --git a/wp-includes/class-IXR.php b/wp-includes/class-IXR.php index 7851b68a99..842d4fad3e 100644 --- a/wp-includes/class-IXR.php +++ b/wp-includes/class-IXR.php @@ -47,7 +47,7 @@ class IXR_Value { } // If it is a normal PHP object convert it in to a struct if (is_object($this->data)) { - + $this->data = get_object_vars($this->data); return 'struct'; } diff --git a/wp-includes/class-phpmailer.php b/wp-includes/class-phpmailer.php index 4c93bae3b9..3c1f397e43 100644 --- a/wp-includes/class-phpmailer.php +++ b/wp-includes/class-phpmailer.php @@ -113,7 +113,7 @@ class PHPMailer * @var string */ var $Sendmail = "/usr/sbin/sendmail"; - + /** * Path to PHPMailer plugins. This is now only useful if the SMTP class * is in a different directory than the PHP include path. @@ -222,7 +222,7 @@ class PHPMailer var $error_count = 0; var $LE = "\n"; /**#@-*/ - + ///////////////////////////////////////////////// // VARIABLE METHODS ///////////////////////////////////////////////// @@ -382,7 +382,7 @@ class PHPMailer return $result; } - + /** * Sends mail using the $Sendmail program. * @access private @@ -402,7 +402,7 @@ class PHPMailer fputs($mail, $header); fputs($mail, $body); - + $result = pclose($mail) >> 8 & 0xFF; if($result != 0) { @@ -548,7 +548,7 @@ class PHPMailer $this->smtp->Hello($this->Helo); else $this->smtp->Hello($this->ServerHostname()); - + if($this->SMTPAuth) { if(!$this->smtp->Authenticate($this->Username, @@ -604,7 +604,7 @@ class PHPMailer return false; } $this->language = $PHPMAILER_LANG; - + return true; } @@ -629,7 +629,7 @@ class PHPMailer return $addr_str; } - + /** * Formats an address correctly. * @access private @@ -726,7 +726,7 @@ class PHPMailer return $message; } - + /** * Set the body wrapping. * @access private @@ -735,7 +735,7 @@ class PHPMailer function SetWordWrap() { if($this->WordWrap < 1) return; - + switch($this->message_type) { case "alt": @@ -756,7 +756,7 @@ class PHPMailer */ function CreateHeader() { $result = ""; - + // Set the boundaries $uniq_id = md5(uniqid(time())); $this->boundary[1] = "b1_" . $uniq_id; @@ -767,7 +767,7 @@ class PHPMailer $result .= $this->HeaderLine("Return-Path", trim($this->From)); else $result .= $this->HeaderLine("Return-Path", trim($this->Sender)); - + // To be created automatically by mail() if($this->Mailer != "mail") { @@ -797,7 +797,7 @@ class PHPMailer $result .= sprintf("Message-ID: <%s@%s>%s", $uniq_id, $this->ServerHostname(), $this->LE); $result .= $this->HeaderLine("X-Priority", $this->Priority); - + if($this->ConfirmReadingTo != "") { $result .= $this->HeaderLine("Disposition-Notification-To", @@ -865,10 +865,10 @@ class PHPMailer $result .= $this->LE.$this->LE; $result .= $this->GetBoundary($this->boundary[1], "", "text/html", ""); - + $result .= $this->EncodeString($this->Body, $this->Encoding); $result .= $this->LE.$this->LE; - + $result .= $this->EndBoundary($this->boundary[1]); break; case "plain": @@ -878,7 +878,7 @@ class PHPMailer $result .= $this->GetBoundary($this->boundary[1], "", "", ""); $result .= $this->EncodeString($this->Body, $this->Encoding); $result .= $this->LE; - + $result .= $this->AttachAll(); break; case "alt_attachments": @@ -887,23 +887,23 @@ class PHPMailer "\tboundary=\"%s\"%s", "multipart/alternative", $this->LE, $this->boundary[2], $this->LE.$this->LE); - + // Create text body $result .= $this->GetBoundary($this->boundary[2], "", "text/plain", "") . $this->LE; $result .= $this->EncodeString($this->AltBody, $this->Encoding); $result .= $this->LE.$this->LE; - + // Create the HTML body $result .= $this->GetBoundary($this->boundary[2], "", "text/html", "") . $this->LE; - + $result .= $this->EncodeString($this->Body, $this->Encoding); $result .= $this->LE.$this->LE; $result .= $this->EndBoundary($this->boundary[2]); - + $result .= $this->AttachAll(); break; } @@ -929,10 +929,10 @@ class PHPMailer $result .= $this->LE; $result .= $this->HeaderLine("Content-Transfer-Encoding", $encoding); $result .= $this->LE; - + return $result; } - + /** * Returns the end of a message boundary. * @access private @@ -940,7 +940,7 @@ class PHPMailer function EndBoundary($boundary) { return $this->LE . "--" . $boundary . "--" . $this->LE; } - + /** * Sets the message type. * @access private @@ -1043,7 +1043,7 @@ class PHPMailer $type = $this->attachment[$i][4]; $disposition = $this->attachment[$i][6]; $cid = $this->attachment[$i][7]; - + $mime[] = sprintf("--%s%s", $this->boundary[1], $this->LE); $mime[] = sprintf("Content-Type: %s; name=\"%s\"%s", $type, $name, $this->LE); $mime[] = sprintf("Content-Transfer-Encoding: %s%s", $encoding, $this->LE); @@ -1073,7 +1073,7 @@ class PHPMailer return join("", $mime); } - + /** * Encodes attachment in requested format. Returns an * empty string on failure. @@ -1135,7 +1135,7 @@ class PHPMailer */ function EncodeHeader ($str, $position = 'text') { $x = 0; - + switch (strtolower($position)) { case 'phrase': if (!preg_match('/[\200-\377]/', $str)) { @@ -1177,10 +1177,10 @@ class PHPMailer $encoded = preg_replace('/^(.*)$/m', " =?".$this->CharSet."?$encoding?\\1?=", $encoded); $encoded = trim(str_replace("\n", $this->LE, $encoded)); - + return $encoded; } - + /** * Encode string to quoted-printable. * @access private @@ -1226,7 +1226,7 @@ class PHPMailer "'='.sprintf('%02X', ord('\\1'))", $encoded); break; } - + // Replace every spaces to _ (more readable than =20) $encoded = str_replace(" ", "_", $encoded); @@ -1256,7 +1256,7 @@ class PHPMailer $this->attachment[$cur][6] = "attachment"; $this->attachment[$cur][7] = 0; } - + /** * Adds an embedded attachment. This can include images, sounds, and * just about any other document. Make sure to set the $type to an @@ -1272,7 +1272,7 @@ class PHPMailer */ function AddEmbeddedImage($path, $cid, $name = "", $encoding = "base64", $type = "application/octet-stream") { - + if(!@is_file($path)) { $this->SetError($this->Lang("file_access") . $path); @@ -1293,10 +1293,10 @@ class PHPMailer $this->attachment[$cur][5] = false; // isStringAttachment $this->attachment[$cur][6] = "inline"; $this->attachment[$cur][7] = $cid; - + return true; } - + /** * Returns true if an inline attachment is present. * @access private @@ -1312,7 +1312,7 @@ class PHPMailer break; } } - + return $result; } @@ -1410,7 +1410,7 @@ class PHPMailer return $result; } - + /** * Returns the appropriate server variable. Should work with both * PHP 4.1.0+ as well as older versions. Returns an empty string @@ -1428,7 +1428,7 @@ class PHPMailer if(!isset($_SERVER["REMOTE_ADDR"])) $_SERVER = $HTTP_ENV_VARS; // must be Apache } - + if(isset($_SERVER[$varName])) return $_SERVER[$varName]; else @@ -1459,13 +1459,13 @@ class PHPMailer function Lang($key) { if(count($this->language) < 1) $this->SetLanguage("en"); // set the default language - + if(isset($this->language[$key])) return $this->language[$key]; else return "Language string failed to load: " . $key; } - + /** * Returns true if an error occurred. * @return bool diff --git a/wp-includes/class-smtp.php b/wp-includes/class-smtp.php index 9c18e83c4c..08aa419531 100644 --- a/wp-includes/class-smtp.php +++ b/wp-includes/class-smtp.php @@ -28,13 +28,13 @@ class SMTP * @var int */ var $SMTP_PORT = 25; - + /** * SMTP reply line ending * @var string */ var $CRLF = "\r\n"; - + /** * Sets whether debugging is turned on * @var bool @@ -508,7 +508,7 @@ class SMTP } $this->helo_rply = $rply; - + return true; } diff --git a/wp-includes/classes.php b/wp-includes/classes.php index 8abc07e6f3..e3ac636e1b 100644 --- a/wp-includes/classes.php +++ b/wp-includes/classes.php @@ -692,7 +692,7 @@ class WP_Ajax_Response { 'id' => '0', 'old_id' => false, 'data' => '', 'supplemental' => array() ); - + $r = wp_parse_args( $args, $defaults ); extract( $r ); diff --git a/wp-includes/cron.php b/wp-includes/cron.php index de6e586914..5c2547a2d3 100644 --- a/wp-includes/cron.php +++ b/wp-includes/cron.php @@ -83,7 +83,7 @@ function spawn_cron() { $cron_url = get_option( 'siteurl' ) . '/wp-cron.php'; $parts = parse_url( $cron_url ); - + if ($parts['scheme'] == 'https') { // support for SSL was added in 4.3.0 if (version_compare(phpversion(), '4.3.0', '>=') && function_exists('openssl_open')) { @@ -94,7 +94,7 @@ function spawn_cron() { } else { $argyle = @ fsockopen( $parts['host'], $_SERVER['SERVER_PORT'], $errno, $errstr, 0.01 ); } - + if ( $argyle ) fputs( $argyle, "GET {$parts['path']}?check=" . wp_hash('187425') . " HTTP/1.0\r\n" diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index e2204afbb6..4e32f0afcf 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -1085,7 +1085,7 @@ function clean_url( $url, $protocols = null ) { if ( strpos($url, '://') === false && substr( $url, 0, 1 ) != '/' && !preg_match('/^[a-z0-9-]+?\.php/i', $url) ) $url = 'http://' . $url; - + $url = preg_replace('/&([^#])(?![a-z]{2,8};)/', '&$1', $url); if ( !is_array($protocols) ) $protocols = array('http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet'); diff --git a/wp-includes/functions.php b/wp-includes/functions.php index dbf7817fc7..87b9ce7cbc 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -706,9 +706,9 @@ function wp($query_vars = '') { function get_status_header_desc( $code ) { global $wp_header_to_desc; - + $code = (int) $code; - + if ( isset( $wp_header_to_desc[$code] ) ) { return $wp_header_to_desc[$code]; } else { @@ -718,7 +718,7 @@ function get_status_header_desc( $code ) { function status_header( $header ) { $text = get_status_header_desc( $header ); - + if ( empty( $text ) ) return false; @@ -1296,7 +1296,7 @@ function wp_parse_args( $args, $defaults = '' ) { $r = stripslashes_deep( $r ); } } - + if ( is_array( $defaults ) ) { return array_merge( $defaults, $r ); } else { diff --git a/wp-includes/general-template.php b/wp-includes/general-template.php index 4f31c4a205..41e7bc2760 100644 --- a/wp-includes/general-template.php +++ b/wp-includes/general-template.php @@ -61,7 +61,7 @@ function wp_meta() { function bloginfo($show='') { $info = get_bloginfo($show); - + // Don't filter URL's. if (strpos($show, 'url') === false && strpos($show, 'directory') === false && @@ -322,13 +322,13 @@ function get_archives_link($url, $text, $format = 'html', $before = '', $after = function wp_get_archives($args = '') { global $wpdb, $wp_locale; - + $defaults = array( 'type' => 'monthly', 'limit' => '', 'format' => 'html', 'before' => '', 'after' => '', 'show_post_count' => false ); - + $r = wp_parse_args( $args, $defaults ); extract( $r ); @@ -593,10 +593,10 @@ function get_calendar($initial = true) { ); if ( $ak_post_titles ) { foreach ( $ak_post_titles as $ak_post_title ) { - + $post_title = apply_filters( "the_title", $ak_post_title->post_title ); $post_title = str_replace('"', '"', wptexturize( $post_title )); - + if ( empty($ak_titles_for_day['day_'.$ak_post_title->dom]) ) $ak_titles_for_day['day_'.$ak_post_title->dom] = ''; if ( empty($ak_titles_for_day["$ak_post_title->dom"]) ) // first one @@ -817,7 +817,7 @@ function rich_edit_exists() { function user_can_richedit() { global $wp_rich_edit, $pagenow; - + if ( !isset( $wp_rich_edit) ) { if ( get_user_option( 'rich_editing' ) == 'true' && ( ( preg_match( '!AppleWebKit/(\d+)!', $_SERVER['HTTP_USER_AGENT'], $match ) && intval($match[1]) >= 420 ) || diff --git a/wp-includes/js/tinymce/plugins/spellchecker/classes/TinyGoogleSpell.class.php b/wp-includes/js/tinymce/plugins/spellchecker/classes/TinyGoogleSpell.class.php index 2a4576c35a..e7d8a5780f 100755 --- a/wp-includes/js/tinymce/plugins/spellchecker/classes/TinyGoogleSpell.class.php +++ b/wp-includes/js/tinymce/plugins/spellchecker/classes/TinyGoogleSpell.class.php @@ -49,7 +49,7 @@ class TinyGoogleSpell { function _xmlChars($string) { $trans = get_html_translation_table(HTML_ENTITIES, ENT_QUOTES); - + foreach ($trans as $k => $v) $trans[$k] = "&#".ord($k).";"; diff --git a/wp-includes/js/tinymce/plugins/spellchecker/classes/TinyPspellShell.class.php b/wp-includes/js/tinymce/plugins/spellchecker/classes/TinyPspellShell.class.php index d0c03e01c8..41cb8c354a 100755 --- a/wp-includes/js/tinymce/plugins/spellchecker/classes/TinyPspellShell.class.php +++ b/wp-includes/js/tinymce/plugins/spellchecker/classes/TinyPspellShell.class.php @@ -49,7 +49,7 @@ class TinyPspellShell { $data = shell_exec($this->cmd); @unlink($this->tmpfile); - + $returnData = array(); $dataArr = preg_split("/\n/", $data, -1, PREG_SPLIT_NO_EMPTY); diff --git a/wp-includes/js/tinymce/plugins/spellchecker/tinyspell.php b/wp-includes/js/tinymce/plugins/spellchecker/tinyspell.php index 80f8706ad9..4c0cd16620 100755 --- a/wp-includes/js/tinymce/plugins/spellchecker/tinyspell.php +++ b/wp-includes/js/tinymce/plugins/spellchecker/tinyspell.php @@ -115,7 +115,7 @@ $words = preg_split("/ |\n/", $check, -1, PREG_SPLIT_NO_EMPTY); $result = $tinyspell->checkWords($words); break; - + case "suggest": $result = $tinyspell->getSuggestion($check); break; @@ -138,7 +138,7 @@ header('Content-type: text/xml; charset=utf-8'); $body = ''; $body .= "\n"; - + if (count($result) == 0) $body .= ''; else diff --git a/wp-includes/js/tinymce/tiny_mce_config.php b/wp-includes/js/tinymce/tiny_mce_config.php index de01c670f9..22a194d417 100644 --- a/wp-includes/js/tinymce/tiny_mce_config.php +++ b/wp-includes/js/tinymce/tiny_mce_config.php @@ -48,7 +48,7 @@ $mce_css = str_replace('http://', 'https://', $mce_css); $mce_popups_css = str_replace('http://', 'https://', $mce_popups_css); } - + $mce_locale = ( '' == get_locale() ) ? 'en' : strtolower(get_locale()); ?> diff --git a/wp-includes/js/tinymce/tiny_mce_gzip.php b/wp-includes/js/tinymce/tiny_mce_gzip.php index 14ffba3723..7c21f48090 100644 --- a/wp-includes/js/tinymce/tiny_mce_gzip.php +++ b/wp-includes/js/tinymce/tiny_mce_gzip.php @@ -110,7 +110,7 @@ if ($index > -1) { // Patch loading functions //$content .= "tinyMCE_GZ.start();"; - + // Do init based on index $content .= "tinyMCE.init(tinyMCECompressed.configs[" . $index . "]);"; diff --git a/wp-includes/kses.php b/wp-includes/kses.php index 7182dc1964..167abe161b 100644 --- a/wp-includes/kses.php +++ b/wp-includes/kses.php @@ -182,7 +182,7 @@ if (!CUSTOM_TAGS) { 'ol' => array(), 'var' => array() ); - + $allowedtags = array( 'a' => array( 'href' => array(), 'title' => array() diff --git a/wp-includes/link-template.php b/wp-includes/link-template.php index 2d510f98c3..20c55c264e 100644 --- a/wp-includes/link-template.php +++ b/wp-includes/link-template.php @@ -273,21 +273,21 @@ function get_post_comments_feed_link($post_id = '', $feed = 'rss2') { function get_edit_post_link( $id = 0 ) { $post = &get_post( $id ); - + if ( $post->post_type == 'attachment' ) { return; } elseif ( $post->post_type == 'page' ) { if ( !current_user_can( 'edit_page', $post->ID ) ) return; - + $file = 'page'; } else { if ( !current_user_can( 'edit_post', $post->ID ) ) return; - + $file = 'post'; } - + return apply_filters( 'get_edit_post_link', get_bloginfo( 'wpurl' ) . '/wp-admin/' . $file . '.php?action=edit&post=' . $post->ID, $post->ID ); } @@ -299,12 +299,12 @@ function edit_post_link( $link = 'Edit This', $before = '', $after = '' ) { } elseif ( $post->post_type == 'page' ) { if ( !current_user_can( 'edit_page', $post->ID ) ) return; - + $file = 'page'; } else { if ( !current_user_can( 'edit_post', $post->ID ) ) return; - + $file = 'post'; } @@ -315,7 +315,7 @@ function edit_post_link( $link = 'Edit This', $before = '', $after = '' ) { function get_edit_comment_link( $comment_id = 0 ) { $comment = &get_comment( $comment_id ); $post = &get_post( $comment->comment_post_ID ); - + if ( $post->post_type == 'attachment' ) { return; } elseif ( $post->post_type == 'page' ) { @@ -453,18 +453,18 @@ function next_post_link($format='%link »', $link='%title', $in_same_cat = function get_pagenum_link($pagenum = 1) { global $wp_rewrite; - + $pagenum = (int) $pagenum; - + $request = remove_query_arg( 'paged' ); - + $home_root = parse_url(get_option('home')); $home_root = $home_root['path']; $home_root = preg_quote( trailingslashit( $home_root ), '|' ); - + $request = preg_replace('|^'. $home_root . '|', '', $request); $request = preg_replace('|^/+|', '', $request); - + if ( !$wp_rewrite->using_permalinks() || is_admin() ) { $base = trailingslashit( get_bloginfo( 'home' ) ); @@ -476,29 +476,29 @@ function get_pagenum_link($pagenum = 1) { } else { $qs_regex = '|\?.*?$|'; preg_match( $qs_regex, $request, $qs_match ); - + if ( $qs_match[0] ) { $query_string = $qs_match[0]; $request = preg_replace( $qs_regex, '', $request ); } else { $query_string = ''; } - + $request = preg_replace( '|page/(.+)/?$|', '', $request); - + $base = trailingslashit( get_bloginfo( 'url' ) ); - + if ( $wp_rewrite->using_index_permalinks() && $pagenum > 1 ) { $base .= 'index.php/'; } - + if ( $pagenum > 1 ) { $request = ( ( !empty( $request ) ) ? trailingslashit( $request ) : $request ) . user_trailingslashit( 'page/' . $pagenum, 'paged' ); } - + $result = $base . $request . $query_string; } - + return $result; } diff --git a/wp-includes/locale.php b/wp-includes/locale.php index af3fc13686..16c2fe8b42 100644 --- a/wp-includes/locale.php +++ b/wp-includes/locale.php @@ -92,13 +92,13 @@ class WP_Locale { $trans = __('number_format_decimals'); $this->number_format['decimals'] = ('number_format_decimals' == $trans) ? 0 : $trans; - + $trans = __('number_format_decimal_point'); $this->number_format['decimal_point'] = ('number_format_decimal_point' == $trans) ? '.' : $trans; $trans = __('number_format_thousands_sep'); $this->number_format['thousands_sep'] = ('number_format_thousands_sep' == $trans) ? ',' : $trans; - + // Import global locale vars set during inclusion of $locale.php. foreach ( $this->locale_vars as $var ) { if ( isset($GLOBALS[$var]) ) diff --git a/wp-includes/pluggable.php b/wp-includes/pluggable.php index 9de8b92ea2..30cd6649bd 100644 --- a/wp-includes/pluggable.php +++ b/wp-includes/pluggable.php @@ -159,17 +159,17 @@ endif; if ( !function_exists( 'wp_mail' ) ) : function wp_mail( $to, $subject, $message, $headers = '' ) { global $phpmailer; - + // (Re)create it, if it's gone missing if ( !is_object( $phpmailer ) || !is_a( $phpmailer, 'PHPMailer' ) ) { require_once ABSPATH . WPINC . '/class-phpmailer.php'; require_once ABSPATH . WPINC . '/class-smtp.php'; $phpmailer = new PHPMailer(); } - + // Compact the input, apply the filters, and extract them back out extract( apply_filters( 'wp_mail', compact( 'to', 'subject', 'message', 'headers' ) ) ); - + // Default headers if ( empty( $headers ) ) { $headers = array( @@ -180,18 +180,18 @@ function wp_mail( $to, $subject, $message, $headers = '' ) { // string headers and an array of headers. $tempheaders = (array) explode( "\n", $headers ); $headers = array(); - + // If it's actually got contents if ( !empty( $tempheaders ) ) { // Iterate through the raw headers foreach ( $tempheaders as $header ) { // Explode them out list( $name, $content ) = explode( ':', trim( $header ), 2 ); - + // Cleanup crew $name = trim( $name ); $content = trim( $content ); - + // Mainly for legacy -- process a From: header if it's there if ( $name == 'From' ) { if ( strpos( '<', $content ) !== false ) { @@ -199,7 +199,7 @@ function wp_mail( $to, $subject, $message, $headers = '' ) { $from_name = substr( $content, 0, strpos( '<', $content ) - 1 ); $from_name = str_replace( '"', '', $from_name ); $from_name = trim( $from_name ); - + $from_email = substr( $content, strpos( '<', $content ) + 1 ); $from_email = str_replace( '>', '', $from_email ); $from_email = trim( $from_email ); @@ -221,7 +221,7 @@ function wp_mail( $to, $subject, $message, $headers = '' ) { } } } - + // Empty out the values that may be set $phpmailer->ClearAddresses(); $phpmailer->ClearAllRecipients(); @@ -230,13 +230,13 @@ function wp_mail( $to, $subject, $message, $headers = '' ) { $phpmailer->ClearCCs(); $phpmailer->ClearCustomHeaders(); $phpmailer->ClearReplyTos(); - + // From email and name // If we don't have a name from the input headers if ( !isset( $from_name ) ) { $from_name = 'WordPress'; } - + // If we don't have an email from the input headers if ( !isset( $from_email ) ) { // Get the site domain and get rid of www. @@ -244,58 +244,58 @@ function wp_mail( $to, $subject, $message, $headers = '' ) { if ( substr( $sitename, 0, 4 ) == 'www.' ) { $sitename = substr( $sitename, 4 ); } - + $from_email = 'wordpress@' . $sitename; } - + // Set the from name and email $phpmailer->From = apply_filters( 'wp_mail_from', $from_email ); $phpmailer->FromName = apply_filters( 'wp_mail_from_name', $from_name ); - + // Set destination address $phpmailer->AddAddress( $to ); - + // Set mail's subject and body $phpmailer->Subject = $subject; $phpmailer->Body = $message; - + // Set to use PHP's mail() $phpmailer->IsMail(); - + // Set Content-Type and charset // If we don't have a content-type from the input headers if ( !isset( $content_type ) ) { $content_type = 'text/plain'; } - + // Set whether it's plaintext or not, depending on $content_type if ( $content_type == 'text/html' ) { $phpmailer->IsHTML( true ); } else { $phpmailer->IsHTML( false ); } - + // If we don't have a charset from the input headers if ( !isset( $charset ) ) { $charset = get_bloginfo( 'charset' ); } - + // Set the content-type and charset $phpmailer->ContentType = apply_filters( 'wp_mail_content_type', 'text/plain' ); $phpmailer->CharSet = apply_filters( 'wp_mail_charset', $charset ); - + // Set custom headers if ( !empty( $headers ) ) { foreach ( $headers as $name => $content ) { $phpmailer->AddCustomHeader( sprintf( '%1$s: %2$s', $name, $content ) ); } } - + do_action_ref_array( 'phpmailer_init', array( &$phpmailer ) ); - + // Send! $result = @$phpmailer->Send(); - + return $result; } endif; @@ -533,7 +533,7 @@ function wp_notify_postauthor($comment_id, $comment_type='') { $message_headers = apply_filters('comment_notification_headers', $message_headers, $comment_id); @wp_mail($user->user_email, $subject, $notify_message, $message_headers); - + return true; } endif; @@ -549,7 +549,7 @@ function wp_notify_moderator($comment_id) { if( get_option( "moderation_notify" ) == 0 ) return true; - + $comment = $wpdb->get_row("SELECT * FROM $wpdb->comments WHERE comment_ID='$comment_id' LIMIT 1"); $post = $wpdb->get_row("SELECT * FROM $wpdb->posts WHERE ID='$comment->comment_post_ID' LIMIT 1"); diff --git a/wp-includes/post-template.php b/wp-includes/post-template.php index a998ef9b6e..2b2ff5f8f4 100644 --- a/wp-includes/post-template.php +++ b/wp-includes/post-template.php @@ -141,7 +141,7 @@ function wp_link_pages($args = '') { 'previouspagelink' => __('Previous page'), 'pagelink' => '%', 'more_file' => '', 'echo' => 1 ); - + $r = wp_parse_args( $args, $defaults ); extract( $r ); @@ -254,7 +254,7 @@ function wp_dropdown_pages($args = '') { 'selected' => 0, 'echo' => 1, 'name' => 'page_id', 'show_option_none' => '' ); - + $r = wp_parse_args( $args, $defaults ); extract( $r ); @@ -285,7 +285,7 @@ function wp_list_pages($args = '') { 'title_li' => __('Pages'), 'echo' => 1, 'authors' => '', 'sort_column' => 'menu_order, post_title' ); - + $r = wp_parse_args( $args, $defaults ); extract( $r ); diff --git a/wp-includes/post.php b/wp-includes/post.php index e82d920aed..540e5fc13c 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -27,7 +27,7 @@ function update_attached_file( $attachment_id, $file ) { function &get_children($args = '', $output = OBJECT) { global $post_cache, $wpdb, $blog_id; - + if ( empty( $args ) ) { if ( isset( $GLOBALS['post'] ) ) { $args = 'post_parent=' . (int) $GLOBALS['post']->post_parent; @@ -39,12 +39,12 @@ function &get_children($args = '', $output = OBJECT) { } elseif ( is_numeric( $args ) ) { $args = 'post_parent=' . (int) $args; } - + $defaults = array( 'numberposts' => -1, 'post_type' => '', 'post_status' => '', 'post_parent' => 0 ); - + $r = wp_parse_args( $args, $defaults ); $children = get_posts( $r ); @@ -174,7 +174,7 @@ function get_post_type($post = false) { function get_posts($args) { global $wpdb; - + $defaults = array( 'numberposts' => 5, 'offset' => 0, 'category' => 0, 'orderby' => 'post_date', @@ -183,10 +183,10 @@ function get_posts($args) { 'meta_value' =>'', 'post_type' => 'post', 'post_status' => 'publish', 'post_parent' => 0 ); - + $r = wp_parse_args( $args, $defaults ); extract( $r ); - + $numberposts = (int) $numberposts; $offset = (int) $offset; $category = (int) $category; @@ -430,7 +430,7 @@ function wp_delete_post($postid = 0) { } do_action('deleted_post', $postid); - + return $post; } @@ -449,7 +449,7 @@ function wp_get_post_tags( $post_id = 0, $args = array() ) { $defaults = array('fields' => 'all'); $args = wp_parse_args( $args, $defaults ); - + $tags = get_object_terms($post_id, 'post_tag', $args); return $tags; @@ -777,9 +777,9 @@ function wp_add_post_tags($post_id = 0, $tags = '') { function wp_set_post_tags( $post_id = 0, $tags = '', $append = false ) { /* $append - true = don't delete existing tags, just add on, false = replace the tags with the new tags */ global $wpdb; - + $post_id = (int) $post_id; - + if ( !$post_id ) return false; @@ -1040,7 +1040,7 @@ function get_page_uri($page_id) { function &get_pages($args = '') { global $wpdb; - + $defaults = array( 'child_of' => 0, 'sort_order' => 'ASC', 'sort_column' => 'post_title', 'hierarchical' => 1, @@ -1048,7 +1048,7 @@ function &get_pages($args = '') { 'meta_key' => '', 'meta_value' => '', 'authors' => '' ); - + $r = wp_parse_args( $args, $defaults ); extract( $r ); diff --git a/wp-includes/query.php b/wp-includes/query.php index 676a94164c..f17911e953 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -461,7 +461,7 @@ class WP_Query { $qv['attachment_id'] = $qv['subpost_id']; $qv['attachment_id'] = (int) $qv['attachment_id']; - + if ( ('' != $qv['attachment']) || !empty($qv['attachment_id']) ) { $this->is_single = true; $this->is_attachment = true; @@ -1021,7 +1021,7 @@ class WP_Query { if ( is_admin() ) $where .= " OR post_status = 'future' OR post_status = 'draft'"; - + if ( is_user_logged_in() ) { $where .= current_user_can( "read_private_{$post_type}s" ) ? " OR post_status = 'private'" : " OR post_author = $user_ID AND post_status = 'private'"; } diff --git a/wp-includes/rewrite.php b/wp-includes/rewrite.php index cf545aa819..a879e728df 100644 --- a/wp-includes/rewrite.php +++ b/wp-includes/rewrite.php @@ -63,7 +63,7 @@ function add_rewrite_endpoint($name, $places) { // determine the post ID it represents. function url_to_postid($url) { global $wp_rewrite; - + $url = apply_filters('url_to_postid', $url); // First, check to see if there is a 'p=N' or 'page_id=N' to match against diff --git a/wp-includes/script-loader.php b/wp-includes/script-loader.php index 00ddc47dd4..4adb5427d1 100644 --- a/wp-includes/script-loader.php +++ b/wp-includes/script-loader.php @@ -11,11 +11,11 @@ class WP_Scripts { function default_scripts() { $this->add( 'dbx', '/wp-includes/js/dbx.js', false, '2.05' ); - + $this->add( 'fat', '/wp-includes/js/fat.js', false, '1.0-RC1_3660' ); - + $this->add( 'sack', '/wp-includes/js/tw-sack.js', false, '1.6.1' ); - + $this->add( 'quicktags', '/wp-includes/js/quicktags.js', false, '3958' ); $this->localize( 'quicktags', 'quicktagsL10n', array( 'quickLinks' => __('(Quick Links)'), @@ -28,15 +28,15 @@ class WP_Scripts { 'enterImageURL' => __('Enter the URL of the image'), 'enterImageDescription' => __('Enter a description of the image') ) ); - + $this->add( 'colorpicker', '/wp-includes/js/colorpicker.js', false, '3517' ); - + $this->add( 'tiny_mce', '/wp-includes/js/tinymce/tiny_mce_gzip.php', false, '20070528' ); $mce_config = apply_filters('tiny_mce_config_url', '/wp-includes/js/tinymce/tiny_mce_config.php'); $this->add( 'wp_tiny_mce', $mce_config, array('tiny_mce'), '20070528' ); - + $this->add( 'prototype', '/wp-includes/js/prototype.js', false, '1.5.1'); - + $this->add( 'autosave', '/wp-includes/js/autosave.js', array('prototype', 'sack'), '20070306'); $this->localize( 'autosave', 'autosaveL10n', array( 'autosaveInterval' => apply_filters('autosave_interval', '120'), @@ -45,7 +45,7 @@ class WP_Scripts { 'requestFile' => get_option( 'siteurl' ) . '/wp-admin/admin-ajax.php', 'savingText' => __('Saving Draft...') ) ); - + $this->add( 'wp-ajax', '/wp-includes/js/wp-ajax.js', array('prototype'), '20070306'); $this->localize( 'wp-ajax', 'WPAjaxL10n', array( 'defaultUrl' => get_option( 'siteurl' ) . '/wp-admin/admin-ajax.php', @@ -53,13 +53,13 @@ class WP_Scripts { 'strangeText' => __("Something strange happened. Try refreshing the page."), 'whoaText' => __("Slow down, I'm still sending your data!") ) ); - + $this->add( 'listman', '/wp-includes/js/list-manipulation.js', array('wp-ajax', 'fat'), '20070306' ); $this->localize( 'listman', 'listManL10n', array( 'jumpText' => __('Jump to new item'), 'delText' => __('Are you sure you want to delete this %thing%?') ) ); - + $this->add( 'scriptaculous-root', '/wp-includes/js/scriptaculous/wp-scriptaculous.js', array('prototype'), '1.7.1-b2'); $this->add( 'scriptaculous-builder', '/wp-includes/js/scriptaculous/builder.js', array('scriptaculous-root'), '1.7.1-b2'); $this->add( 'scriptaculous-dragdrop', '/wp-includes/js/scriptaculous/dragdrop.js', array('scriptaculous-builder', 'scriptaculous-effects'), '1.7.1-b2'); @@ -68,13 +68,13 @@ class WP_Scripts { $this->add( 'scriptaculous-sound', '/wp-includes/js/scriptaculous/sound.js', array( 'scriptaculous-root' ), '1.7.1-b2' ); $this->add( 'scriptaculous-controls', '/wp-includes/js/scriptaculous/controls.js', array('scriptaculous-root'), '1.7.1-b2'); $this->add( 'scriptaculous', '', array('scriptaculous-dragdrop', 'scriptaculous-slider', 'scriptaculous-controls'), '1.7.1-b2'); - + $this->add( 'cropper', '/wp-includes/js/crop/cropper.js', array('scriptaculous-dragdrop'), '20070118'); - + $this->add( 'jquery', '/wp-includes/js/jquery/jquery.js', false, '1.1.2'); $this->add( 'jquery-form', '/wp-includes/js/jquery/jquery.form.js', array('jquery'), '1.0.3'); $this->add( 'interface', '/wp-includes/js/jquery/interface.js', array('jquery'), '1.2'); - + if ( is_admin() ) { global $pagenow; $man = false; @@ -182,11 +182,11 @@ class WP_Scripts { $ver .= '&' . $this->args[$handle]; $src = 0 === strpos($this->scripts[$handle]->src, 'http://') ? $this->scripts[$handle]->src : get_option( 'siteurl' ) . $this->scripts[$handle]->src; $src = $this->scripts[$handle]->src; - + if (!preg_match('|^https?://|', $src)) { $src = get_option('siteurl') . $src; } - + $src = add_query_arg('ver', $ver, $src); $src = clean_url(apply_filters( 'script_loader_src', $src )); echo "\n"; diff --git a/wp-includes/streams.php b/wp-includes/streams.php index d57aac6496..4fab2b5e82 100644 --- a/wp-includes/streams.php +++ b/wp-includes/streams.php @@ -28,17 +28,17 @@ class StreamReader { function read($bytes) { return false; } - + // should return new position function seekto($position) { return false; } - + // returns current position function currentpos() { return false; } - + // returns length of entire stream (limit for seekto()s) function length() { return false; @@ -114,7 +114,7 @@ class FileReader { $bytes -= strlen($chunk); } $this->_pos = ftell($this->_fd); - + return $data; } else return ''; } diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php index 024f37d730..ea7135f83a 100644 --- a/wp-includes/taxonomy.php +++ b/wp-includes/taxonomy.php @@ -98,7 +98,7 @@ function wp_insert_term( $term, $taxonomy, $args = array() ) { $slug = sanitize_title($slug, $term_id); $wpdb->query("UPDATE $wpdb->terms SET slug = '$slug' WHERE term_id = '$term_id'"); } - + $tt_id = $wpdb->get_var("SELECT tt.term_taxonomy_id FROM $wpdb->term_taxonomy AS tt INNER JOIN $wpdb->terms AS t ON tt.term_id = t.term_id WHERE tt.taxonomy = '$taxonomy' AND t.term_id = $term_id"); if ( !empty($tt_id) ) @@ -135,7 +135,7 @@ function wp_delete_object_term_relationships( $object_id, $taxonomies ) { wp_update_term_count($terms, $taxonomy); } - + // TODO clear the cache } @@ -239,7 +239,7 @@ function wp_update_term( $term, $taxonomy, $args = array() ) { $slug = sanitize_title($name, $term_id); $wpdb->query("UPDATE $wpdb->terms SET slug = '$slug' WHERE term_id = '$term_id'"); } - + $tt_id = $wpdb->get_var("SELECT tt.term_taxonomy_id FROM $wpdb->term_taxonomy AS tt INNER JOIN $wpdb->terms AS t ON tt.term_id = t.term_id WHERE tt.taxonomy = '$taxonomy' AND t.term_id = $term_id"); $wpdb->query("UPDATE $wpdb->term_taxonomy SET term_id = '$term_id', taxonomy = '$taxonomy', description = '$description', parent = '$parent' WHERE term_taxonomy_id = '$tt_id'"); @@ -300,7 +300,7 @@ function is_term($term, $taxonomy = '') { return $wpdb->get_row("SELECT tt.term_id, tt.term_taxonomy_id FROM $wpdb->terms AS t INNER JOIN $wpdb->term_taxonomy as tt ON tt.term_id = t.term_id WHERE $where AND tt.taxonomy = '$taxonomy'", ARRAY_A); } - + /** * Given an array of terms, returns those that are defined term slugs. Ignores integers. * @param array $terms The term slugs to check for a definition. @@ -316,7 +316,7 @@ function get_defined_terms($terms) { $terms = "'" . implode("', '", $searches) . "'"; return $wpdb->get_col("SELECT slug FROM $wpdb->terms WHERE slug IN ($terms)"); } - + /** * Relates an object (post, link etc) to a term and taxonomy type. Creates the term and taxonomy * relationship if it doesn't already exist. Creates a term if it doesn't exist (using the slug). @@ -331,7 +331,7 @@ function wp_set_object_terms($object_id, $terms, $taxonomy, $append = false) { if ( ! is_taxonomy($taxonomy) ) return false; - + if ( !is_array($terms) ) $terms = array($terms); diff --git a/wp-includes/theme.php b/wp-includes/theme.php index fd73a5f550..734a93c417 100644 --- a/wp-includes/theme.php +++ b/wp-includes/theme.php @@ -70,7 +70,7 @@ function get_theme_data( $theme_file ) { 'em' => array(), 'strong' => array() ); - + $theme_data = implode( '', file( $theme_file ) ); $theme_data = str_replace ( '\r', '\n', $theme_data ); preg_match( '|Theme Name:(.*)$|mi', $theme_data, $theme_name ); @@ -79,24 +79,24 @@ function get_theme_data( $theme_file ) { preg_match( '|Author:(.*)$|mi', $theme_data, $author_name ); preg_match( '|Author URI:(.*)$|mi', $theme_data, $author_uri ); preg_match( '|Template:(.*)$|mi', $theme_data, $template ); - + if ( preg_match( '|Version:(.*)|i', $theme_data, $version ) ) $version = wp_kses( trim( $version[1] ), $themes_allowed_tags ); else $version = ''; - + if ( preg_match('|Status:(.*)|i', $theme_data, $status) ) $status = wp_kses( trim( $status[1] ), $themes_allowed_tags ); else $status = 'publish'; - + $name = $theme = wp_kses( trim( $theme_name[1] ), $themes_allowed_tags ); $theme_uri = clean_url( trim( $theme_uri[1] ) ); $description = wptexturize( wp_kses( trim( $description[1] ), $themes_allowed_tags ) ); $template = wp_kses( trim( $template[1] ), $themes_allowed_tags ); - + $author_uri = clean_url( trim( $author_uri[1] ) ); - + if ( empty( $author_uri[1] ) ) { $author = wp_kses( trim( $author_name[1] ), $themes_allowed_tags ); } else { diff --git a/wp-includes/user.php b/wp-includes/user.php index cd1c6aa007..ab531952c7 100644 --- a/wp-includes/user.php +++ b/wp-includes/user.php @@ -188,9 +188,9 @@ function wp_dropdown_users( $args = '' ) { 'show' => 'display_name', 'echo' => 1, 'selected' => 0, 'name' => 'user', 'class' => '' ); - + $defaults['selected'] = is_author() ? get_query_var( 'author' ) : 0; - + $r = wp_parse_args( $args, $defaults ); extract( $r ); diff --git a/wp-includes/vars.php b/wp-includes/vars.php index da8e3f7661..e6d3a19386 100644 --- a/wp-includes/vars.php +++ b/wp-includes/vars.php @@ -38,7 +38,7 @@ $is_IIS = (strpos($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS') !== false) ? tru $wp_header_to_desc = apply_filters( 'wp_header_to_desc_array', array( 100 => 'Continue', 101 => 'Switching Protocols', - + 200 => 'OK', 201 => 'Created', 202 => 'Accepted', @@ -46,7 +46,7 @@ $wp_header_to_desc = apply_filters( 'wp_header_to_desc_array', array( 204 => 'No Content', 205 => 'Reset Content', 206 => 'Partial Content', - + 300 => 'Multiple Choices', 301 => 'Moved Permanently', 302 => 'Found', @@ -54,7 +54,7 @@ $wp_header_to_desc = apply_filters( 'wp_header_to_desc_array', array( 304 => 'Not Modified', 305 => 'Use Proxy', 307 => 'Temporary Redirect', - + 400 => 'Bad Request', 401 => 'Unauthorized', 403 => 'Forbidden', @@ -72,7 +72,7 @@ $wp_header_to_desc = apply_filters( 'wp_header_to_desc_array', array( 415 => 'Unsupported Media Type', 416 => 'Requested Range Not Satisfiable', 417 => 'Expectation Failed', - + 500 => 'Internal Server Error', 501 => 'Not Implemented', 502 => 'Bad Gateway', diff --git a/wp-includes/widgets.php b/wp-includes/widgets.php index 223eb874f9..78b201c544 100644 --- a/wp-includes/widgets.php +++ b/wp-includes/widgets.php @@ -59,7 +59,7 @@ function register_sidebar($args = array()) { function unregister_sidebar( $name ) { global $wp_registered_sidebars; - + if ( isset( $wp_registered_sidebars[$name] ) ) unset( $wp_registered_sidebars[$name] ); } @@ -329,17 +329,17 @@ function wp_get_widget_defaults() { function wp_widget_pages( $args ) { extract( $args ); $options = get_option( 'widget_pages' ); - + $title = empty( $options['title'] ) ? __( 'Pages' ) : $options['title']; $sortby = empty( $options['sortby'] ) ? 'menu_order' : $options['sortby']; $exclude = empty( $options['exclude'] ) ? '' : '&exclude=' . $options['exclude']; - + if ( $sortby == 'menu_order' ) { $sortby = 'menu_order, post_title'; } - + $out = wp_list_pages( 'title_li=&echo=0&sort_column=' . $sortby . $exclude ); - + if ( !empty( $out ) ) { ?> @@ -356,15 +356,15 @@ function wp_widget_pages_control() { $options = $newoptions = get_option('widget_pages'); if ( $_POST['pages-submit'] ) { $newoptions['title'] = strip_tags(stripslashes($_POST['pages-title'])); - + $sortby = stripslashes( $_POST['pages-sortby'] ); - + if ( in_array( $sortby, array( 'post_title', 'menu_order', 'ID' ) ) ) { $newoptions['sortby'] = $sortby; } else { $newoptions['sortby'] = 'menu_order'; } - + $newoptions['exclude'] = strip_tags( stripslashes( $_POST['pages-exclude'] ) ); } if ( $options != $newoptions ) { @@ -798,7 +798,7 @@ function wp_widget_recent_comments_register() { $class = array('classname' => 'widget_recent_comments'); wp_register_sidebar_widget('recent-comments', __('Recent Comments'), 'wp_widget_recent_comments', $class); wp_register_widget_control('recent-comments', __('Recent Comments'), 'wp_widget_recent_comments_control', $dims); - + if ( is_active_widget('wp_widget_recent_comments') ) add_action('wp_head', 'wp_widget_recent_comments_style'); } diff --git a/wp-includes/wp-db.php b/wp-includes/wp-db.php index 7eff0fd18f..acf9a7e526 100644 --- a/wp-includes/wp-db.php +++ b/wp-includes/wp-db.php @@ -258,7 +258,7 @@ class wpdb { $this->func_call = "\$db->get_row(\"$query\",$output,$y)"; if ( $query ) $this->query($query); - + if ( !isset($this->last_result[$y]) ) return null; @@ -372,7 +372,7 @@ class wpdb { function bail($message) { // Just wraps errors in a nice header and footer if ( !$this->show_errors ) return false; - + header('Content-Type: text/html; charset=utf-8'); if (strpos($_SERVER['PHP_SELF'], 'wp-admin') !== false) diff --git a/wp-mail.php b/wp-mail.php index 8795c74f4f..e94225270d 100644 --- a/wp-mail.php +++ b/wp-mail.php @@ -117,7 +117,7 @@ for ($i=1; $i <= $count; $i++) : $content = strip_tags($content[1], '


    '); } $content = trim($content); - + if (stripos($content_transfer_encoding, "quoted-printable") !== false) { $content = quoted_printable_decode($content); } diff --git a/wp-settings.php b/wp-settings.php index b69664abbc..e73c1fd4f0 100644 --- a/wp-settings.php +++ b/wp-settings.php @@ -146,7 +146,7 @@ if ( !is_blog_installed() && (strpos($_SERVER['PHP_SELF'], 'install.php') === fa $link = 'install.php'; else $link = 'wp-admin/install.php'; - + wp_die( sprintf( 'It doesn’t look like you’ve installed WP yet. Try running install.php.', $link ) ); } diff --git a/xmlrpc.php b/xmlrpc.php index 648548328f..ad30a7c01d 100644 --- a/xmlrpc.php +++ b/xmlrpc.php @@ -505,7 +505,7 @@ class wp_xmlrpc_server extends IXR_Server { if(empty($category["description"])) { $category["description"] = ""; } - + $new_category = array( "cat_name" => $category["name"], "category_nicename" => $category["slug"], @@ -784,7 +784,7 @@ class wp_xmlrpc_server extends IXR_Server { if (!$this->login_pass_ok($user_login, $user_pass)) { return $this->error; } - + $cap = ($publish) ? 'publish_posts' : 'edit_posts'; $user = set_current_user(0, $user_login); if ( !current_user_can($cap) ) @@ -1216,7 +1216,7 @@ class wp_xmlrpc_server extends IXR_Server { if(isset($content_struct["mt_allow_comments"])) { $comment_status = (int) $content_struct["mt_allow_comments"]; } - + // Do some timestamp voodoo $dateCreatedd = $content_struct['dateCreated']; if (!empty($dateCreatedd)) {