From d88983793b540015c1297cc734855a6b39ef0737 Mon Sep 17 00:00:00 2001 From: ryan Date: Tue, 5 Feb 2008 06:47:27 +0000 Subject: [PATCH] Trailing whitespace cleanup git-svn-id: http://svn.automattic.com/wordpress/trunk@6726 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/admin-ajax.php | 2 +- wp-admin/edit-page-form.php | 2 +- wp-admin/edit-pages.php | 2 +- wp-admin/edit-tags.php | 4 +- wp-admin/export.php | 2 +- wp-admin/import/blogger.php | 4 +- wp-admin/import/btt.php | 2 +- wp-admin/import/jkw.php | 4 +- wp-admin/import/mt.php | 6 +- wp-admin/import/stp.php | 6 +- wp-admin/import/textpattern.php | 2 +- wp-admin/import/wordpress.php | 126 +++++----- wp-admin/import/wp-cat2tag.php | 12 +- wp-admin/includes/dashboard.php | 4 +- wp-admin/includes/export.php | 2 +- wp-admin/includes/image.php | 22 +- wp-admin/includes/media.php | 38 +-- wp-admin/includes/post.php | 4 +- wp-admin/includes/template.php | 54 ++--- wp-admin/includes/widgets.php | 4 +- wp-admin/install.php | 2 +- wp-admin/plugins.php | 4 +- wp-admin/setup-config.php | 4 +- wp-admin/user-edit.php | 2 +- wp-admin/users.php | 2 +- wp-admin/widgets.php | 2 +- wp-app.php | 6 +- wp-includes/bookmark-template.php | 2 +- wp-includes/bookmark.php | 2 +- wp-includes/canonical.php | 2 +- wp-includes/classes.php | 94 ++++---- wp-includes/comment-template.php | 10 +- wp-includes/comment.php | 44 ++-- wp-includes/compat.php | 2 +- wp-includes/deprecated.php | 24 +- wp-includes/feed-atom-comments.php | 2 +- wp-includes/feed.php | 2 +- wp-includes/formatting.php | 2 +- wp-includes/functions.php | 38 +-- wp-includes/general-template.php | 20 +- .../spellchecker/classes/SpellChecker.php | 2 +- wp-includes/js/tinymce/tiny_mce_config.php | 4 +- wp-includes/js/tinymce/tiny_mce_gzip.php | 40 ++-- wp-includes/js/tinymce/wp-mce-help.php | 6 +- wp-includes/l10n.php | 2 +- wp-includes/link-template.php | 24 +- wp-includes/pluggable.php | 10 +- wp-includes/plugin.php | 10 +- wp-includes/post.php | 2 +- wp-includes/query.php | 28 +-- wp-includes/rewrite.php | 2 +- wp-includes/script-loader.php | 16 +- wp-includes/shortcodes.php | 2 +- wp-includes/streams.php | 2 +- wp-includes/taxonomy.php | 50 ++-- wp-includes/update.php | 2 +- wp-includes/user.php | 4 +- wp-includes/widgets.php | 14 +- wp-includes/wp-db.php | 2 +- wp-login.php | 12 +- wp-settings.php | 2 +- xmlrpc.php | 224 +++++++++--------- 62 files changed, 514 insertions(+), 514 deletions(-) diff --git a/wp-admin/admin-ajax.php b/wp-admin/admin-ajax.php index 3fe3c6331..91294846f 100644 --- a/wp-admin/admin-ajax.php +++ b/wp-admin/admin-ajax.php @@ -303,7 +303,7 @@ case 'add-link-cat' : // From Blogroll -> Categories if ( !$link_cat = link_cat_row( $term_id ) ) die('0'); - + $x = new WP_Ajax_Response( array( 'what' => 'link-cat', 'id' => $term_id, diff --git a/wp-admin/edit-page-form.php b/wp-admin/edit-page-form.php index 0da6f54d7..eb9653f62 100644 --- a/wp-admin/edit-page-form.php +++ b/wp-admin/edit-page-form.php @@ -48,7 +48,7 @@ addLoadEvent(focusit);

-
+
diff --git a/wp-admin/edit-pages.php b/wp-admin/edit-pages.php index f9ff0ed71..6aeed9355 100644 --- a/wp-admin/edit-pages.php +++ b/wp-admin/edit-pages.php @@ -87,7 +87,7 @@ if ($posts) { - + diff --git a/wp-admin/edit-tags.php b/wp-admin/edit-tags.php index 7742bab01..f91b7ae3f 100644 --- a/wp-admin/edit-tags.php +++ b/wp-admin/edit-tags.php @@ -42,8 +42,8 @@ case 'edit': require_once ('admin-header.php'); $tag_ID = (int) $_GET['tag_ID']; - - $tag = get_term($tag_ID, 'post_tag', OBJECT, 'edit'); + + $tag = get_term($tag_ID, 'post_tag', OBJECT, 'edit'); include('edit-tag-form.php'); break; diff --git a/wp-admin/export.php b/wp-admin/export.php index 976e36fe6..1c71dca33 100644 --- a/wp-admin/export.php +++ b/wp-admin/export.php @@ -4,7 +4,7 @@ require_once('includes/export.php'); $title = __('Export'); $parent_file = 'edit.php'; -if ( isset( $_GET['download'] ) ) { +if ( isset( $_GET['download'] ) ) { export_wp( $_GET['author'] ); die(); } diff --git a/wp-admin/import/blogger.php b/wp-admin/import/blogger.php index fcf35b07d..e841388c9 100644 --- a/wp-admin/import/blogger.php +++ b/wp-admin/import/blogger.php @@ -381,7 +381,7 @@ class Blogger_Import { $AtomParser = new AtomParser(); $AtomParser->parse( $entry ); $result = $this->import_post($AtomParser->entry); - if ( is_wp_error( $result ) ) + if ( is_wp_error( $result ) ) return $result; unset($AtomParser); } @@ -520,7 +520,7 @@ class Blogger_Import { $post = compact('post_date', 'post_content', 'post_title', 'post_status'); $post_id = wp_insert_post($post); - if ( is_wp_error( $post_id ) ) + if ( is_wp_error( $post_id ) ) return $post_id; wp_create_categories( array_map( 'addslashes', $entry->categories ), $post_id ); diff --git a/wp-admin/import/btt.php b/wp-admin/import/btt.php index 8ddabd42b..d3b135d89 100644 --- a/wp-admin/import/btt.php +++ b/wp-admin/import/btt.php @@ -61,7 +61,7 @@ class BunnyTags_Import { echo '
'; echo '

'.__('Reading Bunny’s Technorati Tags…').'

'; - // import Bunny's Keywords tags + // import Bunny's Keywords tags $metakeys = $wpdb->get_results("SELECT post_id, meta_id, meta_key, meta_value FROM $wpdb->postmeta WHERE $wpdb->postmeta.meta_key = 'tags'"); if ( !is_array($metakeys)) { echo '

' . __('No Tags Found!') . '

'; diff --git a/wp-admin/import/jkw.php b/wp-admin/import/jkw.php index 16012bf62..03b74fb01 100644 --- a/wp-admin/import/jkw.php +++ b/wp-admin/import/jkw.php @@ -77,7 +77,7 @@ class JeromesKeyword_Import { echo '
'; echo '

'.__('Reading Jerome’s Keywords Tags…').'

'; - // import Jerome's Keywords tags + // import Jerome's Keywords tags $metakeys = $wpdb->get_results("SELECT post_id, meta_id, meta_key, meta_value FROM $wpdb->postmeta WHERE $wpdb->postmeta.meta_key = 'keywords'"); if ( !is_array($metakeys)) { echo '

' . __('No Tags Found!') . '

'; @@ -117,7 +117,7 @@ class JeromesKeyword_Import { echo '
'; echo '

'.__('Reading Jerome’s Keywords Tags…').'

'; - // import Jerome's Keywords tags + // import Jerome's Keywords tags $tablename = $wpdb->prefix . substr(get_option('jkeywords_keywords_table'), 1, -1); $metakeys = $wpdb->get_results("SELECT post_id, tag_name FROM $tablename"); if ( !is_array($metakeys) ) { diff --git a/wp-admin/import/mt.php b/wp-admin/import/mt.php index 50a03534e..63ab04748 100644 --- a/wp-admin/import/mt.php +++ b/wp-admin/import/mt.php @@ -215,7 +215,7 @@ class MT_Import { $post->post_author = $this->checkauthor($post->post_author); //just so that if a post already exists, new users are not created by checkauthor $post_id = wp_insert_post($post); - if ( is_wp_error( $post_id ) ) + if ( is_wp_error( $post_id ) ) return $post_id; // Add categories. @@ -294,7 +294,7 @@ class MT_Import { // Finishing a post. $context = ''; $result = $this->save_post($post, $comments, $pings); - if ( is_wp_error( $result ) ) + if ( is_wp_error( $result ) ) return $result; $post = new StdClass; $comment = new StdClass(); @@ -420,7 +420,7 @@ class MT_Import { $this->file = get_attached_file($this->id); $this->get_authors_from_post(); $result = $this->process_posts(); - if ( is_wp_error( $result ) ) + if ( is_wp_error( $result ) ) return $result; } diff --git a/wp-admin/import/stp.php b/wp-admin/import/stp.php index dee6fb567..7df798db3 100644 --- a/wp-admin/import/stp.php +++ b/wp-admin/import/stp.php @@ -70,7 +70,7 @@ class STP_Import { if ( get_option('stpimp_posts') ) { delete_option('stpimp_posts'); } - + add_option('stpimp_posts', $posts); $count = count($posts); echo '

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

'; @@ -87,10 +87,10 @@ class STP_Import { function import_t2p ( ) { echo '
'; echo '

'.__('Adding Tags to Posts…').'

'; - + // run that funky magic! $tags_added = $this->tag2post(); - + echo '

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

'; echo '
'; wp_nonce_field('import-stp'); diff --git a/wp-admin/import/textpattern.php b/wp-admin/import/textpattern.php index deb994efc..c232103e3 100644 --- a/wp-admin/import/textpattern.php +++ b/wp-admin/import/textpattern.php @@ -646,7 +646,7 @@ class Textpattern_Import { break; case 3 : $result = $this->import_posts(); - if ( is_wp_error( $result ) ) + if ( is_wp_error( $result ) ) echo $result->get_error_message(); break; case 4 : diff --git a/wp-admin/import/wordpress.php b/wp-admin/import/wordpress.php index db5115137..235d47c49 100644 --- a/wp-admin/import/wordpress.php +++ b/wp-admin/import/wordpress.php @@ -9,10 +9,10 @@ class WP_Import { var $mtnames = array (); var $newauthornames = array (); var $allauthornames = array (); - + var $author_ids = array (); var $tags = array (); - + var $j = -1; var $fetch_attachments = false; var $url_remap = array (); @@ -51,25 +51,25 @@ class WP_Import { function has_gzip() { return is_callable('gzopen'); } - + function fopen($filename, $mode='r') { if ( $this->has_gzip() ) return gzopen($filename, $mode); return fopen($filename, $mode); } - + function feof($fp) { if ( $this->has_gzip() ) return gzeof($fp); return feof($fp); } - + function fgets($fp, $len=8192) { if ( $this->has_gzip() ) return gzgets($fp, $len); return fgets($fp, $len); } - + function fclose($fp) { if ( $this->has_gzip() ) return gzclose($fp); @@ -86,7 +86,7 @@ class WP_Import { if ($fp) { while ( !$this->feof($fp) ) { $importline = rtrim($this->fgets($fp)); - + // this doesn't check that the file is perfectly valid but will at least confirm that it's not the wrong format altogether if ( !$is_wxr_file && preg_match('|xmlns:wp="http://wordpress[.]org/export/\d+[.]\d+/"|', $importline) ) $is_wxr_file = true; @@ -123,7 +123,7 @@ class WP_Import { return $is_wxr_file; } - + function get_wp_authors() { // We need to find unique values of author names, while preserving the order, so this function emulates the unique_value(); php function, without the sorting. $temp = $this->allauthornames; @@ -140,11 +140,11 @@ class WP_Import { function get_authors_from_post() { global $current_user; - + // this will populate $this->author_ids with a list of author_names => user_ids - + foreach ( $_POST['author_in'] as $i => $in_author_name ) { - + if ( !empty($_POST['user_select'][$i]) ) { // an existing user was selected in the dropdown list $user = get_userdata( intval($_POST['user_select'][$i]) ); @@ -153,26 +153,26 @@ class WP_Import { } elseif ( $this->allow_create_users() ) { // nothing was selected in the dropdown list, so we'll use the name in the text field - + $new_author_name = trim($_POST['user_create'][$i]); // if the user didn't enter a name, assume they want to use the same name as in the import file if ( empty($new_author_name) ) $new_author_name = $in_author_name; - + $user_id = username_exists($new_author_name); - if ( !$user_id ) { + if ( !$user_id ) { $user_id = wp_create_user($new_author_name, 'changeme'); } - + $this->author_ids[$in_author_name] = $user_id; } - + // failsafe: if the user_id was invalid, default to the current user if ( empty($this->author_ids[$in_author_name]) ) { $this->author_ids[$in_author_name] = intval($current_user->ID); } } - + } function wp_authors_form() { @@ -196,10 +196,10 @@ class WP_Import { $this->users_form($j, $author); echo ''; } - + if ( $this->allow_fetch_attachments() ) { -?> - +?> +

@@ -208,14 +208,14 @@ class WP_Import { '.'
'; echo '

'; } - + function users_form($n, $author) { - + if ( $this->allow_create_users() ) { printf(__('Create user %1$s or map to existing'), '
'); } @@ -225,7 +225,7 @@ class WP_Import { // keep track of $n => $author name echo ''; - + $users = get_users_of_blog(); ?> ' . $category->name . ' (' . $category->count . ')'; @@ -164,7 +164,7 @@ function check_all_rows() { $id = $id['term_taxonomy_id']; $posts = get_objects_in_term($category->term_id, 'category'); foreach ( $posts as $post ) { - if ( !$wpdb->get_var("SELECT object_id FROM $wpdb->term_relationships WHERE object_id = '$post' AND term_taxonomy_id = '$id'") ) + if ( !$wpdb->get_var("SELECT object_id FROM $wpdb->term_relationships WHERE object_id = '$post' AND term_taxonomy_id = '$id'") ) $wpdb->query("INSERT INTO $wpdb->term_relationships (object_id, term_taxonomy_id) VALUES ('$post', '$id')"); clean_post_cache($post); } diff --git a/wp-admin/includes/dashboard.php b/wp-admin/includes/dashboard.php index a1be0c419..bd468f509 100644 --- a/wp-admin/includes/dashboard.php +++ b/wp-admin/includes/dashboard.php @@ -58,7 +58,7 @@ function wp_dashboard_setup() { wp_register_widget_control( 'dashboard_plugins', __( 'Plugins' ), 'wp_dashboard_empty', array(), array( 'widget_id' => 'dashboard_plugins' ) ); - + // Primary feed (Dev Blog) Widget if ( !isset( $widget_options['dashboard_primary'] ) ) { @@ -91,7 +91,7 @@ function wp_dashboard_setup() { 'items' => 15 ); } - wp_register_sidebar_widget( 'dashboard_secondary', $widget_options['dashboard_secondary']['title'], 'wp_dashboard_empty', + wp_register_sidebar_widget( 'dashboard_secondary', $widget_options['dashboard_secondary']['title'], 'wp_dashboard_empty', array( 'all_link' => $widget_options['dashboard_secondary']['link'], 'feed_link' => $widget_options['dashboard_secondary']['url'], 'width' => 'full' ) ); wp_register_widget_control( 'dashboard_secondary', __( 'Secondary Feed' ), 'wp_dashboard_rss_control', array(), diff --git a/wp-admin/includes/export.php b/wp-admin/includes/export.php index 8eeb6377a..16282641b 100644 --- a/wp-admin/includes/export.php +++ b/wp-admin/includes/export.php @@ -74,7 +74,7 @@ function wxr_cdata($str) { function wxr_site_url() { global $current_site; - + // mu: the base url if ( isset($current_site->domain) ) { return 'http://'.$current_site->domain.$current_site->path; diff --git a/wp-admin/includes/image.php b/wp-admin/includes/image.php index 6f58549ec..178171699 100644 --- a/wp-admin/includes/image.php +++ b/wp-admin/includes/image.php @@ -21,7 +21,7 @@ function wp_create_thumbnail( $file, $max_side, $deprecated = '' ) { $file = get_attached_file( $file ); $image = wp_load_image( $file ); - + if ( !is_resource( $image ) ) return $image; @@ -39,10 +39,10 @@ function wp_create_thumbnail( $file, $max_side, $deprecated = '' ) { imagealphablending( $thumbnail, false); imagesavealpha( $thumbnail, true); } - + @ imagecopyresampled( $thumbnail, $image, 0, 0, 0, 0, $image_new_width, $image_new_height, $sourceImageWidth, $sourceImageHeight ); - imagedestroy( $image ); // Free up memory + imagedestroy( $image ); // Free up memory // If no filters change the filename, we'll do a default transformation. if ( basename( $file ) == $thumb = apply_filters( 'thumbnail_filename', basename( $file ) ) ) @@ -67,12 +67,12 @@ function wp_create_thumbnail( $file, $max_side, $deprecated = '' ) { break; } - imagedestroy( $thumbnail ); // Free up memory - - // Set correct file permissions - $stat = stat( dirname( $thumbpath )); + imagedestroy( $thumbnail ); // Free up memory + + // Set correct file permissions + $stat = stat( dirname( $thumbpath )); $perms = $stat['mode'] & 0000666; //same permissions as parent folder, strip off the executable bits - @ chmod( $thumbpath, $perms ); + @ chmod( $thumbpath, $perms ); return apply_filters( 'wp_create_thumbnail', $thumbpath ); } @@ -114,8 +114,8 @@ function wp_crop_image( $src_file, $src_x, $src_y, $src_w, $src_h, $dst_w, $dst_ imageantialias( $dst, true ); imagecopyresampled( $dst, $src, 0, 0, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h ); - - imagedestroy( $src ); // Free up memory + + imagedestroy( $src ); // Free up memory if ( ! $dst_file ) $dst_file = str_replace( basename( $src_file ), 'cropped-' . basename( $src_file ), $src_file ); @@ -159,7 +159,7 @@ function wp_generate_attachment_metadata( $attachment_id, $file ) { if ( @file_exists($thumb) ) $metadata['thumb'] = basename($thumb); } - + // fetch additional metadata from exif/iptc $image_meta = wp_read_image_metadata( $file ); if ($image_meta) diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php index 3a2fba8b2..4a50e2979 100644 --- a/wp-admin/includes/media.php +++ b/wp-admin/includes/media.php @@ -15,7 +15,7 @@ function image_upload_form( $action_url, $values = array(), $error = null ) { $image_title = attribute_escape( @$values['image-title'] ); $image_align = @$values['image-url']; $post_id = $_GET['post_id']; - + ?>

Add Image

@@ -33,7 +33,7 @@ function image_upload_form( $action_url, $values = array(), $error = null ) { + EOF; return $out; @@ -184,10 +184,10 @@ add_filter('async_upload_image', 'async_image_callback'); function image_send_to_editor($id, $alt, $title, $align, $url='') { - + $img_src = wp_get_attachment_url($id); $meta = wp_get_attachment_metadata($id); - + $hwstring = ''; if ( isset($meta['width'], $meta['height']) ) $hwstring = ' width="'.intval($meta['width']).'" height="'.intval($meta['height']).'"'; @@ -207,7 +207,7 @@ function media_send_to_editor($html) { top.send_to_editor(''); top.tb_remove(); --> - + false); $file = wp_handle_upload($_FILES['image-file'], $overrides); if ( isset($file['error']) ) return new wp_error( 'upload_error', $file['error'] ); - + $url = $file['url']; $type = $file['type']; $file = $file['file']; - + $post_title = trim($_POST['image-title']); $post_content = trim($_POST['image-alt']); $post_parent = intval($_POST['parent_post_id']); - + // Construct the attachment array $attachment = array( 'post_title' => $post_title, @@ -247,7 +247,7 @@ function image_upload_post() { if ( !is_wp_error($id) ) wp_update_attachment_metadata( $id, wp_generate_attachment_metadata( $id, $file ) ); - return $id; + return $id; } // this handles the file upload POST itself, creating the attachment post diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php index 19244efbb..a525ad96e 100644 --- a/wp-admin/includes/post.php +++ b/wp-admin/includes/post.php @@ -542,7 +542,7 @@ function get_sample_permalink($id, $name = null) { $post->post_name = sanitize_title($post->post_name? $post->post_name : $post->post_title, $post->ID); } if (!is_null($name)) { - $post->post_name = sanitize_title($name, $post->ID); + $post->post_name = sanitize_title($name, $post->ID); } $permalink = get_permalink($post, true); $permalink = array($permalink, $post->post_name); @@ -565,6 +565,6 @@ function get_sample_permalink_html($id, $new_slug=null) { $post_name_html = ''.$post_name.''; $display_link = str_replace('%postname%', $post_name_html, $permalink); return $display_link; -} +} ?> diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php index 1ea24bb87..b4a5a4a1a 100644 --- a/wp-admin/includes/template.php +++ b/wp-admin/includes/template.php @@ -239,41 +239,41 @@ function dropdown_link_categories( $default = 0 ) { function _tag_row( $tag, $class = '' ) { $count = number_format_i18n( $tag->count ); $count = ( $count > 0 ) ? "$count" : $count; - + $out = ''; $out .= ''; $out .= '' . $tag->term_id . ''; $out .= '' . apply_filters( 'term_name', $tag->name ) . ''; - $out .= "$count"; + $out .= "$count"; $out .= '' . __( 'Edit' ) . "" . - 'term_id", - 'delete-tag_' . $tag->term_id ) . + 'term_id", + 'delete-tag_' . $tag->term_id ) . '" class="delete:the-list:tag-' . $tag->term_id . ' delete">' . __( 'Delete' ) . ""; $out .= ''; - + return $out; } // Outputs appropriate rows for the Nth page of the Tag Management screen, -// assuming M tags displayed at a time on the page +// assuming M tags displayed at a time on the page // Returns the number of tags displayed function tag_rows( $page = 0, $pagesize = 20, $searchterms = '' ) { - + // Get a page worth of tags $start = $page * $pagesize; $args = array('offset' => $start, 'number' => $pagesize, 'hide_empty' => 0); - + if ( !empty( $searchterms ) ) { $args['name__like'] = '%' . like_escape( $searchterms ); } $tags = get_terms( 'post_tag', $args ); - + // convert it to table rows $out = ''; $class = ''; @@ -291,7 +291,7 @@ function tag_rows( $page = 0, $pagesize = 20, $searchterms = '' ) { $out .= _tag_row( $tag, $class ); $count++; } - + // filter and send to screen $out = apply_filters('tag_rows', $out); echo $out; @@ -330,7 +330,7 @@ function wp_manage_posts_columns() { function display_page_row( $page, &$children_pages, $level = 0 ) { global $post; static $class; - + $post = $page; setup_postdata($page); @@ -355,14 +355,14 @@ function display_page_row( $page, &$children_pages, $level = 0 ) { post_parent == $id ) { - array_splice($children_pages, $i, 1); + array_splice($children_pages, $i, 1); display_page_row($child, $children_pages, $level+1); $i = -1; //as numeric keys in $children_pages are not preserved after splice } @@ -370,7 +370,7 @@ function display_page_row( $page, &$children_pages, $level = 0 ) { } /* - * displays pages in hierarchical order + * displays pages in hierarchical order */ function page_rows( $pages ) { if ( ! $pages ) @@ -385,33 +385,33 @@ function page_rows( $pages ) { $children_pages = array(); foreach ( $pages as $page ) { - - // catch and repair bad pages + + // catch and repair bad pages if ( $page->post_parent == $page->ID ) { - $page->post_parent = 0; + $page->post_parent = 0; $wpdb->query( $wpdb->prepare("UPDATE $wpdb->posts SET post_parent = '0' WHERE ID = %d", $page->ID) ); clean_page_cache( $page->ID ); } - + if ( 0 == $page->post_parent ) - $top_level_pages[] = $page; + $top_level_pages[] = $page; else - $children_pages[] = $page; + $children_pages[] = $page; } foreach ( $top_level_pages as $page ) display_page_row($page, $children_pages, 0); - - /* + + /* * display the remaining children_pages which are orphans * having orphan requires parental attention */ if ( count($children_pages) > 0 ) { - $empty_array = array(); - foreach ( $children_pages as $orphan_page ) { + $empty_array = array(); + foreach ( $children_pages as $orphan_page ) { clean_page_cache( $orphan_page->ID); display_page_row( $orphan_page, $empty_array, 0 ); - } + } } } @@ -649,7 +649,7 @@ function touch_time( $edit = 1, $for_post = 1, $tab_index = 0 ) { if ( $for_post ) $edit = ( in_array($post->post_status, array('draft', 'pending') ) && (!$post->post_date || '0000-00-00 00:00:00' == $post->post_date ) ) ? false : true; - + $tab_index_attribute = ''; if ( (int) $tab_index > 0 ) $tab_index_attribute = " tabindex=\"$tab_index\""; diff --git a/wp-admin/includes/widgets.php b/wp-admin/includes/widgets.php index a950da902..79be165e5 100644 --- a/wp-admin/includes/widgets.php +++ b/wp-admin/includes/widgets.php @@ -52,7 +52,7 @@ function wp_list_widgets( $show = 'all', $_search = false ) { if ( !$sidebar || false !== strpos( $widget_control_template, '%i%' ) ) { $already_shown[] = $widget['callback']; // it's a multi-widget. We only need to show it in the list once. - $action = 'add'; + $action = 'add'; $add_url = wp_nonce_url( add_query_arg( array( 'sidebar' => $sidebar, 'add' => $widget['id'], @@ -111,7 +111,7 @@ function wp_list_widgets( $show = 'all', $_search = false ) { - +
  • diff --git a/wp-admin/install.php b/wp-admin/install.php index 6f4d7e3e7..4e9f6c4e1 100644 --- a/wp-admin/install.php +++ b/wp-admin/install.php @@ -69,7 +69,7 @@ switch($step) { if ( !empty($wpdb->error) ) wp_die($wpdb->error->get_error_message()); - display_header(); + display_header(); // Fill in the data we gathered $weblog_title = stripslashes($_POST['weblog_title']); $admin_email = stripslashes($_POST['admin_email']); diff --git a/wp-admin/plugins.php b/wp-admin/plugins.php index a741e85a7..33c84c537 100644 --- a/wp-admin/plugins.php +++ b/wp-admin/plugins.php @@ -139,13 +139,13 @@ if (empty($plugins)) {   - - diff --git a/wp-admin/setup-config.php b/wp-admin/setup-config.php index b4352657b..dcf640ed3 100644 --- a/wp-admin/setup-config.php +++ b/wp-admin/setup-config.php @@ -13,7 +13,7 @@ if (!file_exists('../wp-config-sample.php')) $configFile = file('../wp-config-sample.php'); -if ( !is_writable('../')) +if ( !is_writable('../')) wp_die("Sorry, I can't write to the directory. You'll have to either change the permissions on your WordPress directory or create your wp-config.php manually."); // Check if wp-config.php has been created @@ -194,7 +194,7 @@ switch($step) { } fclose($handle); chmod('../wp-config.php', 0666); - + display_header(); ?>

    All right sparky! You've made it through this part of the installation. WordPress can now communicate with your database. If you are ready, time now to run the install!

    diff --git a/wp-admin/user-edit.php b/wp-admin/user-edit.php index f80df83c1..e16cfdad5 100644 --- a/wp-admin/user-edit.php +++ b/wp-admin/user-edit.php @@ -268,7 +268,7 @@ if ( $show_password_fields ) :

    -
    +

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

    diff --git a/wp-app.php b/wp-app.php index acd5d9025..3bee65f14 100644 --- a/wp-app.php +++ b/wp-app.php @@ -164,7 +164,7 @@ class AtomServer { function get_service() { log_app('function','get_service()'); - if( !current_user_can( 'edit_posts' ) ) + if( !current_user_can( 'edit_posts' ) ) $this->auth_required( __( 'Sorry, you do not have the right to access this blog.' ) ); $entries_url = attribute_escape($this->get_entries_url()); @@ -198,7 +198,7 @@ EOD; function get_categories_xml() { log_app('function','get_categories_xml()'); - if( !current_user_can( 'edit_posts' ) ) + if( !current_user_can( 'edit_posts' ) ) $this->auth_required( __( 'Sorry, you do not have the right to access this blog.' ) ); $home = attribute_escape(get_bloginfo_rss('home')); @@ -295,7 +295,7 @@ EOD; global $entry; if( !current_user_can( 'edit_post', $postID ) ) - $this->auth_required( __( 'Sorry, you do not have the right to access this post.' ) ); + $this->auth_required( __( 'Sorry, you do not have the right to access this post.' ) ); $this->set_current_entry($postID); $output = $this->get_entry($postID); diff --git a/wp-includes/bookmark-template.php b/wp-includes/bookmark-template.php index 6e6a86a7d..62e62a11a 100644 --- a/wp-includes/bookmark-template.php +++ b/wp-includes/bookmark-template.php @@ -47,7 +47,7 @@ function _walk_bookmarks($bookmarks, $args = '' ) { extract( $r, EXTR_SKIP ); $output = ''; // Blank string to start with. - + foreach ( (array) $bookmarks as $bookmark ) { if ( !isset($bookmark->recently_updated) ) $bookmark->recently_updated = false; diff --git a/wp-includes/bookmark.php b/wp-includes/bookmark.php index df308639c..ccd6f1bcf 100644 --- a/wp-includes/bookmark.php +++ b/wp-includes/bookmark.php @@ -268,7 +268,7 @@ function sanitize_bookmark($bookmark, $context = 'display') { * @param mixed $value The bookmark field value * @param int $bookmark_id Bookmark ID * @param string $context How to filter the field value. Either 'raw', 'edit', 'attribute', 'js', 'db', or 'display' - * @return mixed The filtered value + * @return mixed The filtered value */ function sanitize_bookmark_field($field, $value, $bookmark_id, $context) { $int_fields = array('link_id', 'link_rating'); diff --git a/wp-includes/canonical.php b/wp-includes/canonical.php index a47c68998..c09031baa 100644 --- a/wp-includes/canonical.php +++ b/wp-includes/canonical.php @@ -51,7 +51,7 @@ function redirect_canonical($requested_url=null, $do_redirect=true) { // Some PHP setups turn requests for / into /index.php in REQUEST_URI $original['path'] = preg_replace('|/index\.php$|', '/', $original['path']); - + $redirect = $original; $redirect_url = false; diff --git a/wp-includes/classes.php b/wp-includes/classes.php index 39a1b0da8..c0d904aad 100644 --- a/wp-includes/classes.php +++ b/wp-includes/classes.php @@ -386,8 +386,8 @@ function is_wp_error($thing) { return false; } -/* - * A class for displaying various tree-like structures. +/* + * A class for displaying various tree-like structures. * Extend the Walker class to use it, see examples at the bottom */ class Walker { @@ -405,120 +405,120 @@ class Walker { * otherwise, display the element and its children */ function display_element( $element, &$children_elements, $max_depth, $depth=0, $args, $output ) { - + if ( !$element) - return $output; - + return $output; + if ( $max_depth != 0 ) { if ($depth >= $max_depth) - return $output; + return $output; } - + $id_field = $this->db_fields['id']; $parent_field = $this->db_fields['parent']; - + if ($depth > 0) { //start the child delimiter $cb_args = array_merge( array($output, $depth), $args); $output = call_user_func_array(array(&$this, 'start_lvl'), $cb_args); - } - + } + //display this element $cb_args = array_merge( array($output, $element, $depth), $args); $output = call_user_func_array(array(&$this, 'start_el'), $cb_args); for ( $i = 0; $i < sizeof( $children_elements ); $i++ ) { - + $child = $children_elements[$i]; if ( $child->$parent_field == $element->$id_field ) { - + array_splice( $children_elements, $i, 1 ); $output = $this->display_element( $child, $children_elements, $max_depth, $depth + 1, $args, $output ); - $i = -1; + $i = -1; } } - + //end this element $cb_args = array_merge( array($output, $element, $depth), $args); $output = call_user_func_array(array(&$this, 'end_el'), $cb_args); - + if ($depth > 0) { //end the child delimiter $cb_args = array_merge( array($output, $depth), $args); $output = call_user_func_array(array(&$this, 'end_lvl'), $cb_args); } - - return $output; + + return $output; } /* * displays array of elements hierarchically * it is a generic function which does not assume any existing order of elements - * max_depth = -1 means flatly display every element - * max_depth = 0 means display all levels - * max_depth > 0 specifies the number of display levels. + * max_depth = -1 means flatly display every element + * max_depth = 0 means display all levels + * max_depth > 0 specifies the number of display levels. */ function walk( $elements, $max_depth) { - + $args = array_slice(func_get_args(), 2); $output = ''; if ($max_depth < -1) //invalid parameter - return $output; - + return $output; + if (empty($elements)) //nothing to walk - return $output; - + return $output; + $id_field = $this->db_fields['id']; $parent_field = $this->db_fields['parent']; - + // flat display if ( -1 == $max_depth ) { - $empty_array = array(); - foreach ( $elements as $e ) + $empty_array = array(); + foreach ( $elements as $e ) $output = $this->display_element( $e, $empty_array, 1, 0, $args, $output ); - return $output; + return $output; } - - /* - * need to display in hierarchical order + + /* + * need to display in hierarchical order * splice elements into two buckets: those without parent and those with parent */ $top_level_elements = array(); $children_elements = array(); foreach ( $elements as $e) { if ( 0 == $e->$parent_field ) - $top_level_elements[] = $e; + $top_level_elements[] = $e; else - $children_elements[] = $e; + $children_elements[] = $e; } - - /* + + /* * none of the elements is top level * the first one must be root of the sub elements */ if ( !$top_level_elements ) { - + $root = $children_elements[0]; for ( $i = 0; $i < sizeof( $children_elements ); $i++ ) { - + $child = $children_elements[$i]; if ($root->$parent_field == $child->$parent_field ) - $top_level_elements[] = $child; + $top_level_elements[] = $child; array_splice( $children_elements, $i, 1 ); - $i--; + $i--; } } - + foreach ( $top_level_elements as $e ) $output = $this->display_element( $e, $children_elements, $max_depth, 0, $args, $output ); - - /* - * if we are displaying all levels, and remaining children_elements is not empty, + + /* + * if we are displaying all levels, and remaining children_elements is not empty, * then we got orphans, which should be displayed regardless */ if ( ( $max_depth == 0 ) && sizeof( $children_elements ) > 0 ) { - $empty_array = array(); + $empty_array = array(); foreach ( $children_elements as $orphan_e ) $output = $this->display_element( $orphan_e, $empty_array, 1, 0, $args, $output ); } @@ -547,7 +547,7 @@ class Walker_Page extends Walker { $indent = str_repeat("\t", $depth); else $indent = ''; - + extract($args, EXTR_SKIP); $css_class = 'page_item page-item-'.$page->ID; $_current_page = get_page( $current_page ); @@ -749,7 +749,7 @@ class WP_Ajax_Response { $response = ''; if ( is_wp_error($data) ) { - foreach ( $data->get_error_codes() as $code ) { + foreach ( $data->get_error_codes() as $code ) { $response .= "get_error_message($code) . "]]>"; if ( !$error_data = $data->get_error_data($code) ) continue; diff --git a/wp-includes/comment-template.php b/wp-includes/comment-template.php index f10a94e5c..725bb4fee 100644 --- a/wp-includes/comment-template.php +++ b/wp-includes/comment-template.php @@ -130,7 +130,7 @@ function comment_author_link() { * * @since 1.5 * @uses $comment - * @uses apply_filters() + * @uses apply_filters() * * @return unknown */ @@ -166,7 +166,7 @@ function get_comment_author_url() { * comment_author_url() - Display the url of the author of the current comment * * @since 0.71 - * @uses apply_filters() + * @uses apply_filters() * @uses get_comment_author_url() Retrieves the comment author's URL */ function comment_author_url() { @@ -568,7 +568,7 @@ function trackback_rdf($deprecated = '') { function comments_open( $post_id=NULL ) { $_post = get_post($post_id); - + $open = ( 'open' == $_post->comment_status ); return apply_filters( 'comments_open', $open, $post_id ); } @@ -577,7 +577,7 @@ function comments_open( $post_id=NULL ) { * pings_open() - Whether the current post is open for pings * * @since 1.5 - * @uses $post + * @uses $post * * @param int $post_id An optional post ID to check instead of the current post. * @return bool True if pings are accepted @@ -757,7 +757,7 @@ function comments_popup_link( $zero = 'No Comments', $one = '1 Comment', $more = echo ' class="'.$css_class.'" '; } $title = attribute_escape( get_the_title() ); - + echo apply_filters( 'comments_popup_link_attributes', '' ); echo ' title="' . sprintf( __('Comment on %s'), $title ) . '">'; diff --git a/wp-includes/comment.php b/wp-includes/comment.php index a914548a2..67b488a6d 100644 --- a/wp-includes/comment.php +++ b/wp-includes/comment.php @@ -244,30 +244,30 @@ function get_comment_count( $post_id = 0 ) { $where = "WHERE comment_post_ID = {$post_id}"; } - $totals = (array) $wpdb->get_results(" - SELECT comment_approved, COUNT( * ) AS total - FROM {$wpdb->comments} - {$where} - GROUP BY comment_approved + $totals = (array) $wpdb->get_results(" + SELECT comment_approved, COUNT( * ) AS total + FROM {$wpdb->comments} + {$where} + GROUP BY comment_approved ", ARRAY_A); - $comment_count = array( - "approved" => 0, + $comment_count = array( + "approved" => 0, "awaiting_moderation" => 0, "spam" => 0, "total_comments" => 0 - ); + ); - foreach ( $totals as $row ) { - switch ( $row['comment_approved'] ) { - case 'spam': - $comment_count['spam'] = $row['total']; + foreach ( $totals as $row ) { + switch ( $row['comment_approved'] ) { + case 'spam': + $comment_count['spam'] = $row['total']; $comment_count["total_comments"] += $row['total']; - break; - case 1: - $comment_count['approved'] = $row['total']; + break; + case 1: + $comment_count['approved'] = $row['total']; $comment_count['total_comments'] += $row['total']; - break; + break; case 0: $comment_count['awaiting_moderation'] = $row['total']; $comment_count['total_comments'] += $row['total']; @@ -788,14 +788,14 @@ function wp_update_comment($commentarr) { */ function wp_defer_comment_counting($defer=null) { static $_defer = false; - + if ( is_bool($defer) ) { $_defer = $defer; // flush any deferred counts if ( !$defer ) wp_update_comment_count( null, true ); } - + return $_defer; } @@ -819,7 +819,7 @@ function wp_defer_comment_counting($defer=null) { */ function wp_update_comment_count($post_id, $do_deferred=false) { static $_deferred = array(); - + if ( $do_deferred ) { $_deferred = array_unique($_deferred); foreach ( $_deferred as $i => $_post_id ) { @@ -827,7 +827,7 @@ function wp_update_comment_count($post_id, $do_deferred=false) { unset( $_deferred[$i] ); /** @todo Move this outside of the foreach and reset $_deferred to an array instead */ } } - + if ( wp_defer_comment_counting() ) { $_deferred[] = $post_id; return true; @@ -835,7 +835,7 @@ function wp_update_comment_count($post_id, $do_deferred=false) { elseif ( $post_id ) { return wp_update_comment_count_now($post_id); } - + } /** @@ -847,7 +847,7 @@ function wp_update_comment_count($post_id, $do_deferred=false) { * @uses do_action() Calls 'edit_posts' hook on $post_id and $post * * @param int $post_id Post ID - * @return bool False on '0' $post_id or if post with ID does not exist. True on success. + * @return bool False on '0' $post_id or if post with ID does not exist. True on success. */ function wp_update_comment_count_now($post_id) { global $wpdb; diff --git a/wp-includes/compat.php b/wp-includes/compat.php index acb14ed23..c657f1f32 100644 --- a/wp-includes/compat.php +++ b/wp-includes/compat.php @@ -69,7 +69,7 @@ function hash_hmac($algo, $data, $key, $raw_output = false) { $key = pack($pack, $algo($key)); else if (strlen($key) < 64) $key = str_pad($key, 64, chr(0)); - + $ipad = (substr($key, 0, 64) ^ str_repeat(chr(0x36), 64)); $opad = (substr($key, 0, 64) ^ str_repeat(chr(0x5C), 64)); diff --git a/wp-includes/deprecated.php b/wp-includes/deprecated.php index 45bdc5232..d1813ec5e 100644 --- a/wp-includes/deprecated.php +++ b/wp-includes/deprecated.php @@ -446,7 +446,7 @@ function user_can_edit_user($user_id, $other_user) { * @param string $after Optional. The html to output after the link. * @param string $between Optional. The html to output between the link/image and it's description. Not used if no image or $show_images is true. * @param bool $show_images Optional. Whether to show images (if defined). - * @param string $orderby Optional. The order to output the links. E.g. 'id', 'name', 'url', 'description' or 'rating'. Or maybe owner. + * @param string $orderby Optional. The order to output the links. E.g. 'id', 'name', 'url', 'description' or 'rating'. Or maybe owner. * If you start the name with an underscore the order will be reversed. You can also specify 'rand' as the order which will return links in a * random order. * @param bool $show_description Optional. Whether to show the description if show_images=false/not defined. @@ -505,8 +505,8 @@ function wp_get_linksbyname($category, $args = '') { * @see get_linkobjects() * * @param string $cat_name The category name to use. If no match is found uses all. - * @param string $orderby The order to output the links. E.g. 'id', 'name', 'url', 'description', or 'rating'. - * Or maybe owner. If you start the name with an underscore the order will be reversed. You can also + * @param string $orderby The order to output the links. E.g. 'id', 'name', 'url', 'description', or 'rating'. + * Or maybe owner. If you start the name with an underscore the order will be reversed. You can also * specify 'rand' as the order which will return links in a random order. * @param int $limit Limit to X entries. If not specified, all entries are shown. * @return unknown @@ -558,7 +558,7 @@ function get_linkobjectsbyname($cat_name = "noname" , $orderby = 'name', $limit * * @param int $category The category to use. If no category supplied uses all * @param string $orderby the order to output the links. E.g. 'id', 'name', 'url', - * 'description', or 'rating'. Or maybe owner. If you start the name with an + * 'description', or 'rating'. Or maybe owner. If you start the name with an * underscore the order will be reversed. You can also specify 'rand' as the * order which will return links in a random order. * @param int $limit Limit to X entries. If not specified, all entries are shown. @@ -589,7 +589,7 @@ function get_linkobjects($category = 0, $orderby = 'name', $limit = 0) { * @param string $between The html to output between the link/image and it's description. Not used if no image or show_images is true * @param bool $show_images Whether to show images (if defined). * @param string $orderby the order to output the links. E.g. 'id', 'name', 'url', - * 'description', or 'rating'. Or maybe owner. If you start the name with an + * 'description', or 'rating'. Or maybe owner. If you start the name with an * underscore the order will be reversed. You can also specify 'rand' as the * order which will return links in a random order. * @param bool $show_description Whether to show the description if show_images=false/not defined @@ -616,7 +616,7 @@ function get_linksbyname_withrating($cat_name = "noname", $before = '', $after = * @param string $between The html to output between the link/image and it's description. Not used if no image or show_images == true * @param bool $show_images Whether to show images (if defined). * @param string $orderby The order to output the links. E.g. 'id', 'name', 'url', - * 'description', or 'rating'. Or maybe owner. If you start the name with an + * 'description', or 'rating'. Or maybe owner. If you start the name with an * underscore the order will be reversed. You can also specify 'rand' as the * order which will return links in a random order. * @param bool $show_description Whether to show the description if show_images=false/not defined. @@ -669,8 +669,8 @@ function get_autotoggle($id = 0) { * @param bool $hierarchical * @return unknown */ -function list_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_order = 'asc', $file = '', $list = true, $optiondates = 0, - $optioncount = 0, $hide_empty = 1, $use_desc_for_title = 1, $children=false, $child_of=0, $categories=0, +function list_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_order = 'asc', $file = '', $list = true, $optiondates = 0, + $optioncount = 0, $hide_empty = 1, $use_desc_for_title = 1, $children=false, $child_of=0, $categories=0, $recurse=0, $feed = '', $feed_image = '', $exclude = '', $hierarchical=false) { _deprecated_function(__FUNCTION__, '0.0', 'wp_list_categories()'); @@ -866,7 +866,7 @@ function get_author_link($echo = false, $author_id, $author_nicename = '') { * @param string $more_file * @return string */ -function link_pages($before='
    ', $after='
    ', $next_or_number='number', $nextpagelink='next page', $previouspagelink='previous page', +function link_pages($before='
    ', $after='
    ', $next_or_number='number', $nextpagelink='next page', $previouspagelink='previous page', $pagelink='%', $more_file='') { _deprecated_function(__FUNCTION__, '0.0', 'wp_link_pages()'); @@ -1068,7 +1068,7 @@ function get_links($category = -1, $before = '', $after = '
    ', $between = ' * @see get_categories() * * @param string $order Sort link categories by 'name' or 'id' - * @param string $$deprecated Not Used + * @param string $$deprecated Not Used */ function get_links_list($order = 'name', $deprecated = '') { _deprecated_function(__FUNCTION__, '0.0', 'get_categories()'); @@ -1214,7 +1214,7 @@ function get_category_rss_link($echo = false, $cat_ID = 1, $deprecated = '') { } /** - * get_author_rss_link() - Print/Return link to author RSS feed + * get_author_rss_link() - Print/Return link to author RSS feed * * @since 1.2 * @deprecated Use get_author_feed_link() @@ -1235,7 +1235,7 @@ function get_author_rss_link($echo = false, $author_id = 1, $deprecated = '') { } /** - * comments_rss() - Return link to the post RSS feed + * comments_rss() - Return link to the post RSS feed * * @since 1.5 * @deprecated Use get_post_comments_feed_link() diff --git a/wp-includes/feed-atom-comments.php b/wp-includes/feed-atom-comments.php index 39ce37258..919a347bc 100644 --- a/wp-includes/feed-atom-comments.php +++ b/wp-includes/feed-atom-comments.php @@ -25,7 +25,7 @@ echo '' - + diff --git a/wp-includes/feed.php b/wp-includes/feed.php index 2384fe84e..2734f88a2 100644 --- a/wp-includes/feed.php +++ b/wp-includes/feed.php @@ -187,7 +187,7 @@ function atom_enclosure() { * * @package WordPress * @subpackage Feed - * @since 2.4 + * @since 2.4 * * @param string $data input string * @return array $result array(type, value) diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index 039255b15..70af8a10d 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -1115,7 +1115,7 @@ function clean_url( $url, $protocols = null, $context = 'display' ) { $original_url = $url; if ('' == $url) return $url; - $url = preg_replace('|[^a-z0-9-~+_.?#=!&;,/:%@()]|i', '', $url); + $url = preg_replace('|[^a-z0-9-~+_.?#=!&;,/:%@()]|i', '', $url); $strip = array('%0d', '%0a'); $url = str_replace($strip, '', $url); $url = str_replace(';//', '://', $url); diff --git a/wp-includes/functions.php b/wp-includes/functions.php index a616711d6..21e8d5ca3 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -553,7 +553,7 @@ function wp_get_http( $url, $file_path = false, $red = 1 ) { $request_type = 'GET'; else $request_type = 'HEAD'; - + $head = "$request_type $file HTTP/1.1\r\nHOST: $host\r\nUser-Agent: WordPress/" . $wp_version . "\r\n\r\n"; $fp = @fsockopen( $host, $parts['port'], $err_num, $err_msg, 3 ); @@ -579,7 +579,7 @@ function wp_get_http( $url, $file_path = false, $red = 1 ) { fclose($fp); return wp_get_http( $headers['location'], $file_path, ++$red ); } - + // make a note of the final location, so the caller can tell if we were redirected or not $headers['x-final-location'] = $url; @@ -588,7 +588,7 @@ function wp_get_http( $url, $file_path = false, $red = 1 ) { fclose($fp); return $headers; } - + // GET request - fetch and write it to the supplied filename $content_length = $headers['content-length']; $got_bytes = 0; @@ -601,7 +601,7 @@ function wp_get_http( $url, $file_path = false, $red = 1 ) { if ($content_length and $got_bytes >= $content_length) break; } - + fclose($out_fp); fclose($fp); return $headers; @@ -947,7 +947,7 @@ function do_robots() { function is_blog_installed() { global $wpdb; - // Check cache first. If options table goes away and we have true cached, oh well. + // Check cache first. If options table goes away and we have true cached, oh well. if ( wp_cache_get('is_blog_installed') ) return true; @@ -994,7 +994,7 @@ function wp_original_referer_field() { function wp_get_referer() { if ( ! empty( $_REQUEST['_wp_http_referer'] ) ) return $_REQUEST['_wp_http_referer']; - else if ( ! empty( $_SERVER['HTTP_REFERER'] ) ) + else if ( ! empty( $_SERVER['HTTP_REFERER'] ) ) return $_SERVER['HTTP_REFERER']; return false; } @@ -1068,12 +1068,12 @@ function wp_upload_dir( $time = NULL ) { // return a filename that is sanitized and unique for the given directory function wp_unique_filename( $dir, $filename, $unique_filename_callback = NULL ) { - + // separate the filename into a name and extension $info = pathinfo($filename); $ext = $info['extension']; $name = basename($filename, ".{$ext}"); - + // Increment the file number until we have a unique file to save in $dir. Use $override['unique_filename_callback'] if supplied. if ( $unique_filename_callback && function_exists( $unique_filename_callback ) ) { $filename = $unique_filename_callback( $dir, $name ); @@ -1095,7 +1095,7 @@ function wp_unique_filename( $dir, $filename, $unique_filename_callback = NULL ) $filename = str_replace( $ext, '', $filename ); $filename = sanitize_title_with_dashes( $filename ) . $ext; } - + return $filename; } @@ -1111,7 +1111,7 @@ function wp_upload_bits( $name, $deprecated, $bits, $time = NULL ) { if ( $upload['error'] !== false ) return $upload; - + $filename = wp_unique_filename( $upload['path'], $name ); $new_file = $upload['path'] . "/$filename"; @@ -1225,7 +1225,7 @@ function wp_explain_nonce( $action ) { $trans['add']['bookmark'] = array( __( 'Are you sure you want to add this link?' ), false ); $trans['delete']['bookmark'] = array( __( 'Are you sure you want to delete this link: "%s"?' ), 'use_id' ); $trans['update']['bookmark'] = array( __( 'Are you sure you want to edit this link: "%s"?' ), 'use_id' ); - $trans['bulk']['bookmarks'] = array( __( 'Are you sure you want to bulk modify links?' ), false ); + $trans['bulk']['bookmarks'] = array( __( 'Are you sure you want to bulk modify links?' ), false ); $trans['add']['page'] = array( __( 'Are you sure you want to add this page?' ), false ); $trans['delete']['page'] = array( __( 'Are you sure you want to delete this page: "%s"?' ), 'get_the_title' ); @@ -1322,10 +1322,10 @@ function wp_die( $message, $title = '' ) { $message = "

    $message

    "; } - if ( defined( 'WP_SITEURL' ) && '' != WP_SITEURL ) - $admin_dir = WP_SITEURL . '/wp-admin/'; + if ( defined( 'WP_SITEURL' ) && '' != WP_SITEURL ) + $admin_dir = WP_SITEURL . '/wp-admin/'; elseif ( function_exists( 'get_bloginfo' ) && '' != get_bloginfo( 'wpurl' ) ) - $admin_dir = get_bloginfo( 'wpurl' ) . '/wp-admin/'; + $admin_dir = get_bloginfo( 'wpurl' ) . '/wp-admin/'; elseif ( strpos( $_SERVER['PHP_SELF'], 'wp-admin' ) !== false ) $admin_dir = ''; else @@ -1555,7 +1555,7 @@ function dead_db() { Database Error - +

    Error establishing a database connection

    @@ -1612,11 +1612,11 @@ function atom_service_url_filter($url) /** * _deprecated_function() - Marks a function as deprecated and informs when it has been used. * - * There is a hook deprecated_function_run that will be called that can be used to get the backtrace + * There is a hook deprecated_function_run that will be called that can be used to get the backtrace * up to what file and function called the deprecated function. * * The current behavior is to trigger an user error if WP_DEBUG is defined and is true. - * + * * This function is to be used in every function in depreceated.php * * @package WordPress @@ -1647,11 +1647,11 @@ function _deprecated_function($function, $version, $replacement=null) { /** * _deprecated_file() - Marks a file as deprecated and informs when it has been used. * - * There is a hook deprecated_file_included that will be called that can be used to get the backtrace + * There is a hook deprecated_file_included that will be called that can be used to get the backtrace * up to what file and function included the deprecated file. * * The current behavior is to trigger an user error if WP_DEBUG is defined and is true. - * + * * This function is to be used in every file that is depreceated * * @package WordPress diff --git a/wp-includes/general-template.php b/wp-includes/general-template.php index d5a4e10ff..ac7352367 100644 --- a/wp-includes/general-template.php +++ b/wp-includes/general-template.php @@ -195,7 +195,7 @@ function wp_title($sep = '»', $display = true, $seplocation = '') { if ( !empty($tag) ) { $tag = get_term($tag, 'post_tag', OBJECT, 'display'); - if ( is_wp_error( $tag ) ) + if ( is_wp_error( $tag ) ) return $tag; if ( ! empty($tag->name) ) $title = apply_filters('single_tag_title', $tag->name); @@ -242,7 +242,7 @@ function wp_title($sep = '»', $display = true, $seplocation = '') { $title = $title . $prefix; else $title = $prefix . $title; - + $title = apply_filters('wp_title', $title, $sep); // Send it out @@ -297,7 +297,7 @@ function single_tag_title($prefix = '', $display = true ) { if ( !empty($tag_id) ) { $my_tag = &get_term($tag_id, 'post_tag', OBJECT, 'display'); - if ( is_wp_error( $my_tag ) ) + if ( is_wp_error( $my_tag ) ) return false; $my_tag_name = apply_filters('single_tag_title', $my_tag->name); if ( !empty($my_tag_name) ) { @@ -933,13 +933,13 @@ function the_editor($content, $id = 'content', $prev_id = 'title') { if ( 'tinymce' == $wp_default_editor ) add_filter('the_editor_content', 'wp_richedit_pre'); - // The following line moves the border so that the active button "attaches" to the toolbar. Only IE needs it. - ?> + // The following line moves the border so that the active button "attaches" to the toolbar. Only IE needs it. + ?> - +