<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[15278] trunk/wp-admin/includes/template.php:
Coding standards clean-up of admin template.php.</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/15278">15278</a></dd>
<dt>Author</dt> <dd>dd32</dd>
<dt>Date</dt> <dd>2010-06-19 05:32:01 +0000 (Sat, 19 Jun 2010)</dd>
</dl>
<h3>Log Message</h3>
<pre>Coding standards clean-up of admin template.php. No logic changes. Removal of multiple spaces, addition of whitespace, addition of ;, s/"/'/g where appropriate, case changes of constants, removal of $output = '..'; echo $output. </pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminincludestemplatephp">trunk/wp-admin/includes/template.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadminincludestemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/template.php (15277 => 15278)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/template.php        2010-06-18 05:37:45 UTC (rev 15277)
+++ trunk/wp-admin/includes/template.php        2010-06-19 05:32:01 UTC (rev 15278)
</span><span class="lines">@@ -102,7 +102,7 @@
</span><span class="cx">                 $actions['edit'] = '<a href="' . $edit_link . '">' . __('Edit') . '</a>';
</span><span class="cx">                 $actions['inline hide-if-no-js'] = '<a href="#" class="editinline">' . __('Quick&nbsp;Edit') . '</a>';
</span><span class="cx">                 if ( $default_cat_id != $category->term_id )
</span><del>-                        $actions['delete'] = "<a class='delete:the-list:link-cat-$category->term_id submitdelete' href='" . wp_nonce_url("link-category.php?action=delete&amp;cat_ID=$category->term_id", 'delete-link-category_' . $category->term_id) . "'>" . __('Delete') . "</a>";
</del><ins>+                        $actions['delete'] = "<a class='delete:the-list:link-cat-$category->term_id submitdelete' href='" . wp_nonce_url("link-category.php?action=delete&amp;cat_ID=$category->term_id", 'delete-link-category_' . $category->term_id) . "'>" . __('Delete') . '</a>';
</ins><span class="cx">                 $actions = apply_filters('link_cat_row_actions', $actions, $category);
</span><span class="cx">                 $action_count = count($actions);
</span><span class="cx">                 $i = 0;
</span><span class="lines">@@ -155,7 +155,7 @@
</span><span class="cx">                                 $output .= "<td $attributes>$category->description</td>";
</span><span class="cx">                                 break;
</span><span class="cx">                         case 'slug':
</span><del>-                                $output .= "<td $attributes>" . apply_filters('editable_slug', $category->slug) . "</td>";
</del><ins>+                                $output .= "<td $attributes>" . apply_filters('editable_slug', $category->slug) . '</td>';
</ins><span class="cx">                                 break;
</span><span class="cx">                         case 'links':
</span><span class="cx">                                 $attributes = 'class="links column-links num"' . $style;
</span><span class="lines">@@ -233,7 +233,7 @@
</span><span class="cx">                         'popular_cats' => $popular_cats,
</span><span class="cx">                         'walker' => $walker,
</span><span class="cx">                         'checked_ontop' => $checked_ontop
</span><del>- ));
</del><ins>+        ));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><span class="lines">@@ -288,7 +288,7 @@
</span><span class="cx">                 $checked_categories = array();
</span><span class="cx">                 $keys = array_keys( $categories );
</span><span class="cx">
</span><del>-                foreach( $keys as $k ) {
</del><ins>+                foreach ( $keys as $k ) {
</ins><span class="cx">                         if ( in_array( $categories[$k]->term_id, $args['selected_cats'] ) ) {
</span><span class="cx">                                 $checked_categories[] = $categories[$k];
</span><span class="cx">                                 unset( $categories[$k] );
</span><span class="lines">@@ -340,7 +340,7 @@
</span><span class="cx">
</span><span class="cx">                 <li id="<?php echo $id; ?>" class="popular-category">
</span><span class="cx">                         <label class="selectit">
</span><del>-                        <input id="in-<?php echo $id; ?>" type="checkbox" <?php echo $checked; ?> value="<?php echo (int) $term->term_id; ?>" <?php echo $disabled ?>/>
</del><ins>+                        <input id="in-<?php echo $id; ?>" type="checkbox" <?php echo $checked; ?> value="<?php echo (int) $term->term_id; ?>" <?php echo $disabled; ?>/>
</ins><span class="cx">                                 <?php echo esc_html( apply_filters( 'the_category', $term->name ) ); ?>
</span><span class="cx">                         </label>
</span><span class="cx">                 </li>
</span><span class="lines">@@ -449,7 +449,7 @@
</span><span class="cx">                                                 $actions['inline hide-if-no-js'] = '<a href="#" class="editinline">' . __('Quick&nbsp;Edit') . '</a>';
</span><span class="cx">                                         }
</span><span class="cx">                                         if ( current_user_can($tax->cap->delete_terms) && $tag->term_id != $default_term )
</span><del>-                                                $actions['delete'] = "<a class='delete-tag' href='" . wp_nonce_url("edit-tags.php?action=delete&amp;taxonomy=$taxonomy&amp;tag_ID=$tag->term_id", 'delete-tag_' . $tag->term_id) . "'>" . __('Delete') . "</a>";
</del><ins>+                                                $actions['delete'] = "<a class='delete-tag' href='" . wp_nonce_url("edit-tags.php?action=delete&amp;taxonomy=$taxonomy&amp;tag_ID=$tag->term_id", 'delete-tag_' . $tag->term_id) . "'>" . __('Delete') . '</a>';
</ins><span class="cx">
</span><span class="cx">                                         $actions = apply_filters('tag_row_actions', $actions, $tag);
</span><span class="cx">                                         $actions = apply_filters("${taxonomy}_row_actions", $actions, $tag);
</span><span class="lines">@@ -472,7 +472,7 @@
</span><span class="cx">                                         $out .= "<td $attributes>$tag->description</td>";
</span><span class="cx">                                         break;
</span><span class="cx">                                 case 'slug':
</span><del>-                                        $out .= "<td $attributes>" . apply_filters('editable_slug', $tag->slug) . "</td>";
</del><ins>+                                        $out .= "<td $attributes>" . apply_filters('editable_slug', $tag->slug) . '</td>';
</ins><span class="cx">                                         break;
</span><span class="cx">                                 case 'posts':
</span><span class="cx">                                         $attributes = 'class="posts column-posts num"' . $style;
</span><span class="lines">@@ -530,7 +530,7 @@
</span><span class="cx">                 $out .= _term_rows($taxonomy, $terms, $children, $page, $pagesize, $count);
</span><span class="cx">         } else {
</span><span class="cx">                 $terms = get_terms( $taxonomy, $args );
</span><del>-                foreach( $terms as $term )
</del><ins>+                foreach ( $terms as $term )
</ins><span class="cx">                         $out .= _tag_row( $term, 0, $taxonomy );
</span><span class="cx">                 $count = $pagesize; // Only displaying a single page.
</span><span class="cx">         }
</span><span class="lines">@@ -569,7 +569,7 @@
</span><span class="cx">
</span><span class="cx">                         $num_parents = count($my_parents);
</span><span class="cx">                         while ( $my_parent = array_pop($my_parents) ) {
</span><del>-                                $output .= "\t" . _tag_row( $my_parent, $level - $num_parents, $taxonomy );
</del><ins>+                                $output .= "\t" . _tag_row( $my_parent, $level - $num_parents, $taxonomy );
</ins><span class="cx">                                 $num_parents--;
</span><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="lines">@@ -803,11 +803,11 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><del>- * Register column headers for a particular screen. The header names will be listed in the Screen Options.
</del><ins>+ * Register column headers for a particular screen. The header names will be listed in the Screen Options.
</ins><span class="cx"> *
</span><span class="cx"> * @since 2.7.0
</span><span class="cx"> *
</span><del>- * @param string $screen The handle for the screen to add help to. This is usually the hook name returned by the add_*_page() functions.
</del><ins>+ * @param string $screen The handle for the screen to add help to. This is usually the hook name returned by the add_*_page() functions.
</ins><span class="cx"> * @param array $columns An array of columns with column IDs as the keys and translated column names as the values
</span><span class="cx"> * @see get_column_headers(), print_column_headers(), get_hidden_columns()
</span><span class="cx"> */
</span><span class="lines">@@ -940,11 +940,10 @@
</span><span class="cx">                         $authors_dropdown .= '</label>';
</span><span class="cx">
</span><span class="cx">                 endif; // authors
</span><del>-?>
</del><ins>+                if ( !$bulk ) // On bulk views, this is used further down
+                        echo $authors_dropdown;
+        endif; // post_type_supports author
</ins><span class="cx">
</span><del>-<?php if ( !$bulk ) echo $authors_dropdown;
-endif; // post_type_supports author
-
</del><span class="cx"> if ( !$bulk ) :
</span><span class="cx"> ?>
</span><span class="cx">
</span><span class="lines">@@ -976,13 +975,13 @@
</span><span class="cx">
</span><span class="cx"> <?php foreach ( $hierarchical_taxonomies as $taxonomy ) : ?>
</span><span class="cx">
</span><del>-                <span class="title inline-edit-categories-label"><?php echo esc_html($taxonomy->labels->name) ?>
</del><ins>+                <span class="title inline-edit-categories-label"><?php echo esc_html($taxonomy->labels->name); ?>
</ins><span class="cx">                         <span class="catshow"><?php _e('[more]'); ?></span>
</span><span class="cx">                         <span class="cathide" style="display:none;"><?php _e('[less]'); ?></span>
</span><span class="cx">                 </span>
</span><span class="cx">                 <input type="hidden" name="<?php echo ( $taxonomy->name == 'category' ) ? 'post_category[]' : 'tax_input[' . esc_attr($taxonomy->name) . '][]'; ?>" value="0" />
</span><span class="cx">                 <ul class="cat-checklist <?php echo esc_attr($taxonomy->name)?>-checklist">
</span><del>-                        <?php wp_terms_checklist(null, array('taxonomy' => $taxonomy->name)) ?>
</del><ins>+                        <?php wp_terms_checklist(null, array('taxonomy' => $taxonomy->name)); ?>
</ins><span class="cx">                 </ul>
</span><span class="cx">
</span><span class="cx"> <?php endforeach; //$hierarchical_taxonomies as $taxonomy ?>
</span><span class="lines">@@ -1005,7 +1004,7 @@
</span><span class="cx"> <?php
</span><span class="cx">         $dropdown_args = array('post_type' => $post_type_object->name, 'selected' => $post->post_parent, 'name' => 'post_parent', 'show_option_none' => __('Main Page (no parent)'), 'option_none_value' => 0, 'sort_column'=> 'menu_order, post_title');
</span><span class="cx">         if ( $bulk )
</span><del>-                $dropdown_args['show_option_no_change'] = __('&mdash; No Change &mdash;');
</del><ins>+                $dropdown_args['show_option_no_change'] = __('&mdash; No Change &mdash;');
</ins><span class="cx">         $dropdown_args = apply_filters('quick_edit_dropdown_pages_args', $dropdown_args);
</span><span class="cx">         wp_dropdown_pages($dropdown_args);
</span><span class="cx"> ?>
</span><span class="lines">@@ -1016,7 +1015,7 @@
</span><span class="cx">
</span><span class="cx">                 <label>
</span><span class="cx">                         <span class="title"><?php _e( 'Order' ); ?></span>
</span><del>-                        <span class="input-text-wrap"><input type="text" name="menu_order" class="inline-edit-menu-order-input" value="<?php echo $post->menu_order ?>" /></span>
</del><ins>+                        <span class="input-text-wrap"><input type="text" name="menu_order" class="inline-edit-menu-order-input" value="<?php echo $post->menu_order; ?>" /></span>
</ins><span class="cx">                 </label>
</span><span class="cx">
</span><span class="cx"> <?php        endif; // !$bulk ?>
</span><span class="lines">@@ -1028,7 +1027,7 @@
</span><span class="cx">                                 <option value="-1"><?php _e('&mdash; No Change &mdash;'); ?></option>
</span><span class="cx"> <?php        endif; // $bulk ?>
</span><span class="cx">                                 <option value="default"><?php _e( 'Default Template' ); ?></option>
</span><del>-                                <?php page_template_dropdown() ?>
</del><ins>+                                <?php page_template_dropdown(); ?>
</ins><span class="cx">                         </select>
</span><span class="cx">                 </label>
</span><span class="cx">
</span><span class="lines">@@ -1041,13 +1040,13 @@
</span><span class="cx"> <?php foreach ( $flat_taxonomies as $taxonomy ) : ?>
</span><span class="cx">
</span><span class="cx">                 <label class="inline-edit-tags">
</span><del>-                        <span class="title"><?php echo esc_html($taxonomy->labels->name) ?></span>
-                        <textarea cols="22" rows="1" name="tax_input[<?php echo esc_attr($taxonomy->name)?>]" class="tax_input_<?php echo esc_attr($taxonomy->name)?>"></textarea>
</del><ins>+                        <span class="title"><?php echo esc_html($taxonomy->labels->name); ?></span>
+                        <textarea cols="22" rows="1" name="tax_input[<?php echo esc_attr($taxonomy->name); ?>]" class="tax_input_<?php echo esc_attr($taxonomy->name); ?>"></textarea>
</ins><span class="cx">                 </label>
</span><span class="cx">
</span><span class="cx"> <?php endforeach; //$flat_taxonomies as $taxonomy ?>
</span><span class="cx">
</span><del>-<?php endif; // count($flat_taxonomies) && !$bulk ?>
</del><ins>+<?php endif; // count($flat_taxonomies) && !$bulk ?>
</ins><span class="cx">
</span><span class="cx"> <?php if ( post_type_supports( $screen->post_type, 'comments' ) || post_type_supports( $screen->post_type, 'trackbacks' ) ) :
</span><span class="cx">         if ( $bulk ) : ?>
</span><span class="lines">@@ -1104,7 +1103,7 @@
</span><span class="cx">                                         <option value="publish"><?php _e( 'Published' ); ?></option>
</span><span class="cx">                                         <option value="future"><?php _e( 'Scheduled' ); ?></option>
</span><span class="cx"> <?php if ( $bulk ) : ?>
</span><del>-                                        <option value="private"><?php _e('Private') ?></option>
</del><ins>+                                        <option value="private"><?php _e('Private'); ?></option>
</ins><span class="cx"> <?php endif; // $bulk ?>
</span><span class="cx">                                 <?php endif; ?>
</span><span class="cx">                                         <option value="pending"><?php _e( 'Pending Review' ); ?></option>
</span><span class="lines">@@ -1342,7 +1341,7 @@
</span><span class="cx">                 case 'title':
</span><span class="cx">                         $attributes = 'class="post-title column-title"' . $style;
</span><span class="cx">                 ?>
</span><del>-                <td <?php echo $attributes ?>><strong><?php if ( current_user_can($post_type_object->cap->edit_post, $post->ID) && $post->post_status != 'trash' ) { ?><a class="row-title" href="<?php echo $edit_link; ?>" title="<?php echo esc_attr(sprintf(__('Edit &#8220;%s&#8221;'), $title)); ?>"><?php echo $title ?></a><?php } else { echo $title; }; _post_states($post); ?></strong>
</del><ins>+                <td <?php echo $attributesl ?>><strong><?php if ( current_user_can($post_type_object->cap->edit_post, $post->ID) && $post->post_status != 'trash' ) { ?><a class="row-title" href="<?php echo $edit_link; ?>" title="<?php echo esc_attr(sprintf(__('Edit &#8220;%s&#8221;'), $title)); ?>"><?php echo $titlel ?></a><?php } else { echo $title; }; _post_states($post); ?></strong>
</ins><span class="cx">                 <?php
</span><span class="cx">                         if ( 'excerpt' == $mode )
</span><span class="cx">                                 the_excerpt();
</span><span class="lines">@@ -1354,11 +1353,11 @@
</span><span class="cx">                         }
</span><span class="cx">                         if ( current_user_can($post_type_object->cap->delete_post, $post->ID) ) {
</span><span class="cx">                                 if ( 'trash' == $post->post_status )
</span><del>-                                        $actions['untrash'] = "<a title='" . esc_attr(__('Restore this item from the Trash')) . "' href='" . wp_nonce_url( admin_url( sprintf($post_type_object->_edit_link . '&amp;action=untrash', $post->ID) ), 'untrash-' . $post->post_type . '_' . $post->ID ) . "'>" . __('Restore') . "</a>";
</del><ins>+                                        $actions['untrash'] = "<a title='" . esc_attr(__('Restore this item from the Trash')) . "' href='" . wp_nonce_url( admin_url( sprintf($post_type_object->_edit_link . '&amp;action=untrash', $post->ID) ), 'untrash-' . $post->post_type . '_' . $post->ID ) . "'>" . __('Restore') . '</a>';
</ins><span class="cx">                                 elseif ( EMPTY_TRASH_DAYS )
</span><del>-                                        $actions['trash'] = "<a class='submitdelete' title='" . esc_attr(__('Move this item to the Trash')) . "' href='" . get_delete_post_link($post->ID) . "'>" . __('Trash') . "</a>";
</del><ins>+                                        $actions['trash'] = "<a class='submitdelete' title='" . esc_attr(__('Move this item to the Trash')) . "' href='" . get_delete_post_link($post->ID) . "'>" . __('Trash') . '</a>';
</ins><span class="cx">                                 if ( 'trash' == $post->post_status || !EMPTY_TRASH_DAYS )
</span><del>-                                        $actions['delete'] = "<a class='submitdelete' title='" . esc_attr(__('Delete this item permanently')) . "' href='" . get_delete_post_link($post->ID, '', true) . "'>" . __('Delete Permanently') . "</a>";
</del><ins>+                                        $actions['delete'] = "<a class='submitdelete' title='" . esc_attr(__('Delete this item permanently')) . "' href='" . get_delete_post_link($post->ID, '', true) . "'>" . __('Delete Permanently') . '</a>';
</ins><span class="cx">                         }
</span><span class="cx">                         if ( in_array($post->post_status, array('pending', 'draft')) ) {
</span><span class="cx">                                 if ( current_user_can($post_type_object->cap->edit_post, $post->ID) )
</span><span class="lines">@@ -1385,12 +1384,12 @@
</span><span class="cx">
</span><span class="cx">                 case 'categories':
</span><span class="cx">                 ?>
</span><del>-                <td <?php echo $attributes ?>><?php
</del><ins>+                <td <?php echo $attributes; ?>><?php
</ins><span class="cx">                         $categories = get_the_category();
</span><span class="cx">                         if ( !empty( $categories ) ) {
</span><span class="cx">                                 $out = array();
</span><span class="cx">                                 foreach ( $categories as $c )
</span><del>-                                        $out[] = "<a href='edit.php?category_name=$c->slug'> " . esc_html(sanitize_term_field('name', $c->name, $c->term_id, 'category', 'display')) . "</a>";
</del><ins>+                                        $out[] = "<a href='edit.php?category_name=$c->slug'> " . esc_html(sanitize_term_field('name', $c->name, $c->term_id, 'category', 'display')) . '</a>';
</ins><span class="cx">                                         echo join( ', ', $out );
</span><span class="cx">                         } else {
</span><span class="cx">                                 _e('Uncategorized');
</span><span class="lines">@@ -1401,12 +1400,12 @@
</span><span class="cx">
</span><span class="cx">                 case 'tags':
</span><span class="cx">                 ?>
</span><del>-                <td <?php echo $attributes ?>><?php
</del><ins>+                <td <?php echo $attributes; ?>><?php
</ins><span class="cx">                         $tags = get_the_tags($post->ID);
</span><span class="cx">                         if ( !empty( $tags ) ) {
</span><span class="cx">                                 $out = array();
</span><span class="cx">                                 foreach ( $tags as $c )
</span><del>-                                        $out[] = "<a href='edit.php?tag=$c->slug'> " . esc_html(sanitize_term_field('name', $c->name, $c->term_id, 'post_tag', 'display')) . "</a>";
</del><ins>+                                        $out[] = "<a href='edit.php?tag=$c->slug'> " . esc_html(sanitize_term_field('name', $c->name, $c->term_id, 'post_tag', 'display')) . '</a>';
</ins><span class="cx">                                 echo join( ', ', $out );
</span><span class="cx">                         } else {
</span><span class="cx">                                 _e('No Tags');
</span><span class="lines">@@ -1417,7 +1416,7 @@
</span><span class="cx">
</span><span class="cx">                 case 'comments':
</span><span class="cx">                 ?>
</span><del>-                <td <?php echo $attributes ?>><div class="post-com-count-wrapper">
</del><ins>+                <td <?php echo $attributes; ?>><div class="post-com-count-wrapper">
</ins><span class="cx">                 <?php
</span><span class="cx">                         $pending_phrase = sprintf( __('%s pending'), number_format( $pending_comments ) );
</span><span class="cx">                         if ( $pending_comments )
</span><span class="lines">@@ -1432,7 +1431,7 @@
</span><span class="cx">
</span><span class="cx">                 case 'author':
</span><span class="cx">                 ?>
</span><del>-                <td <?php echo $attributes ?>><a href="edit.php?post_type=<?php echo $post->post_type; ?>&amp;author=<?php the_author_meta('ID'); ?>"><?php the_author() ?></a></td>
</del><ins>+                <td <?php echo $attributes; ?>><a href="edit.php?post_type=<?php echo $post->post_type; ?>&amp;author=<?php the_author_meta('ID'); ?>"><?php the_author(); ?></a></td>
</ins><span class="cx">                 <?php
</span><span class="cx">                 break;
</span><span class="cx">
</span><span class="lines">@@ -1444,19 +1443,19 @@
</span><span class="cx">
</span><span class="cx">                 case 'control_edit':
</span><span class="cx">                 ?>
</span><del>-                <td><?php if ( current_user_can($post_type_object->cap->edit_post, $post->ID) ) { echo "<a href='$edit_link' class='edit'>" . __('Edit') . "</a>"; } ?></td>
</del><ins>+                <td><?php if ( current_user_can($post_type_object->cap->edit_post, $post->ID) ) { echo "<a href='$edit_link' class='edit'>" . __('Edit') . '</a>'; } ?></td>
</ins><span class="cx">                 <?php
</span><span class="cx">                 break;
</span><span class="cx">
</span><span class="cx">                 case 'control_delete':
</span><span class="cx">                 ?>
</span><del>-                <td><?php if ( current_user_can($post_type_object->cap->delete_post, $post->ID) ) { echo "<a href='" . wp_nonce_url("post.php?action=delete&amp;post=$id", 'delete-post_' . $post->ID) . "' class='delete'>" . __('Delete') . "</a>"; } ?></td>
</del><ins>+                <td><?php if ( current_user_can($post_type_object->cap->delete_post, $post->ID) ) { echo "<a href='" . wp_nonce_url("post.php?action=delete&amp;post=$id", 'delete-post_' . $post->ID) . "' class='delete'>" . __('Delete') . '</a>'; } ?></td>
</ins><span class="cx">                 <?php
</span><span class="cx">                 break;
</span><span class="cx">
</span><span class="cx">                 default:
</span><span class="cx">                 ?>
</span><del>-                <td <?php echo $attributes ?>><?php do_action('manage_posts_custom_column', $column_name, $post->ID); ?></td>
</del><ins>+                <td <?php echo $attributes; ?>><?php do_action('manage_posts_custom_column', $column_name, $post->ID); ?></td>
</ins><span class="cx">                 <?php
</span><span class="cx">                 break;
</span><span class="cx">         }
</span><span class="lines">@@ -1508,7 +1507,7 @@
</span><span class="cx">         $id = (int) $page->ID;
</span><span class="cx">         $rowclass = 'alternate' == $rowclass ? '' : 'alternate';
</span><span class="cx">         $posts_columns = get_column_headers( $current_screen );
</span><del>-        $hidden = get_hidden_columns( $current_screen );
</del><ins>+        $hidden = get_hidden_columns( $current_screen );
</ins><span class="cx">         $title = _draft_or_post_title();
</span><span class="cx">         $post_type = $page->post_type;
</span><span class="cx">         $post_type_object = get_post_type_object($post_type);
</span><span class="lines">@@ -1567,7 +1566,7 @@
</span><span class="cx">                 $attributes = 'class="post-title page-title column-title"' . $style;
</span><span class="cx">                 $edit_link = get_edit_post_link( $page->ID );
</span><span class="cx">                 ?>
</span><del>-                <td <?php echo $attributes ?>><strong><?php if ( current_user_can($post_type_object->cap->edit_post, $page->ID) && $post->post_status != 'trash' ) { ?><a class="row-title" href="<?php echo $edit_link; ?>" title="<?php echo esc_attr(sprintf(__('Edit &#8220;%s&#8221;'), $title)); ?>"><?php echo $pad; echo $title ?></a><?php } else { echo $pad; echo $title; }; _post_states($page); echo isset($parent_name) ? ' | ' . $post_type_object->labels->parent_item_colon . ' ' . esc_html($parent_name) : ''; ?></strong>
</del><ins>+                <td <?php echo $attributes; ?>><strong><?php if ( current_user_can($post_type_object->cap->edit_post, $page->ID) && $post->post_status != 'trash' ) { ?><a class="row-title" href="<?php echo $edit_link; ?>" title="<?php echo esc_attr(sprintf(__('Edit &#8220;%s&#8221;'), $title)); ?>"><?php echo $pad; echo $title; ?></a><?php } else { echo $pad; echo $title; }; _post_states($page); echo isset($parent_name) ? ' | ' . $post_type_object->labels->parent_item_colon . ' ' . esc_html($parent_name) : ''; ?></strong>
</ins><span class="cx">                 <?php
</span><span class="cx">                 $actions = array();
</span><span class="cx">                 if ( current_user_can($post_type_object->cap->edit_post, $page->ID) && $post->post_status != 'trash' ) {
</span><span class="lines">@@ -1576,11 +1575,11 @@
</span><span class="cx">                 }
</span><span class="cx">                 if ( current_user_can($post_type_object->cap->delete_post, $page->ID) ) {
</span><span class="cx">                         if ( $post->post_status == 'trash' )
</span><del>-                                $actions['untrash'] = "<a title='" . esc_attr(__('Remove this page from the Trash')) . "' href='" . wp_nonce_url("post.php?post_type=$post_type&amp;action=untrash&amp;post=$page->ID", 'untrash-' . $post->post_type . '_' . $page->ID) . "'>" . __('Restore') . "</a>";
</del><ins>+                                $actions['untrash'] = "<a title='" . esc_attr(__('Remove this page from the Trash')) . "' href='" . wp_nonce_url("post.php?post_type=$post_type&amp;action=untrash&amp;post=$page->ID", 'untrash-' . $post->post_type . '_' . $page->ID) . "'>" . __('Restore') . '</a>';
</ins><span class="cx">                         elseif ( EMPTY_TRASH_DAYS )
</span><del>-                                $actions['trash'] = "<a class='submitdelete' title='" . esc_attr(__('Move this page to the Trash')) . "' href='" . get_delete_post_link($page->ID) . "'>" . __('Trash') . "</a>";
</del><ins>+                                $actions['trash'] = "<a class='submitdelete' title='" . esc_attr(__('Move this page to the Trash')) . "' href='" . get_delete_post_link($page->ID) . "'>" . __('Trash') . '</a>';
</ins><span class="cx">                         if ( $post->post_status == 'trash' || !EMPTY_TRASH_DAYS )
</span><del>-                                $actions['delete'] = "<a class='submitdelete' title='" . esc_attr(__('Delete this page permanently')) . "' href='" . wp_nonce_url("post.php?post_type=$post_type&amp;action=delete&amp;post=$page->ID", 'delete-' . $post->post_type . '_' . $page->ID) . "'>" . __('Delete Permanently') . "</a>";
</del><ins>+                                $actions['delete'] = "<a class='submitdelete' title='" . esc_attr(__('Delete this page permanently')) . "' href='" . wp_nonce_url("post.php?post_type=$post_type&amp;action=delete&amp;post=$page->ID", 'delete-' . $post->post_type . '_' . $page->ID) . "'>" . __('Delete Permanently') . '</a>';
</ins><span class="cx">                 }
</span><span class="cx">                 if ( in_array($post->post_status, array('pending', 'draft')) ) {
</span><span class="cx">                         if ( current_user_can($post_type_object->cap->edit_post, $page->ID) )
</span><span class="lines">@@ -1606,7 +1605,7 @@
</span><span class="cx">
</span><span class="cx">         case 'comments':
</span><span class="cx">                 ?>
</span><del>-                <td <?php echo $attributes ?>><div class="post-com-count-wrapper">
</del><ins>+                <td <?php echo $attributes; ?>><div class="post-com-count-wrapper">
</ins><span class="cx">                 <?php
</span><span class="cx">                 $left = get_pending_comments_num( $page->ID );
</span><span class="cx">                 $pending_phrase = sprintf( __('%s pending'), number_format( $left ) );
</span><span class="lines">@@ -1622,13 +1621,13 @@
</span><span class="cx">
</span><span class="cx">         case 'author':
</span><span class="cx">                 ?>
</span><del>-                <td <?php echo $attributes ?>><a href="edit.php?post_type=<?php echo $post_type; ?>&amp;author=<?php the_author_meta('ID'); ?>"><?php the_author() ?></a></td>
</del><ins>+                <td <?php echo $attributes; ?>><a href="edit.php?post_type=<?php echo $post_type; ?>&amp;author=<?php the_author_meta('ID'); ?>"><?php the_author(); ?></a></td>
</ins><span class="cx">                 <?php
</span><span class="cx">                 break;
</span><span class="cx">
</span><span class="cx">         default:
</span><span class="cx">                 ?>
</span><del>-                <td <?php echo $attributes ?>><?php do_action('manage_pages_custom_column', $column_name, $id); ?></td>
</del><ins>+                <td <?php echo $attributes; ?>><?php do_action('manage_pages_custom_column', $column_name, $id); ?></td>
</ins><span class="cx">                 <?php
</span><span class="cx">                 break;
</span><span class="cx">         }
</span><span class="lines">@@ -1713,8 +1712,8 @@
</span><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         // if it is the last pagenum and there are orphaned pages, display them with paging as well
</span><del>-        if ( isset($children_pages) && $count < $end ){
-                foreach( $children_pages as $orphans ){
</del><ins>+        if ( isset($children_pages) && $count < $end ) {
+                foreach ( $children_pages as $orphans ) {
</ins><span class="cx">                         foreach ( $orphans as $op ) {
</span><span class="cx">                                 if ( $count >= $end )
</span><span class="cx">                                         break;
</span><span class="lines">@@ -1764,7 +1763,7 @@
</span><span class="cx">                                 $my_parent = $my_parent->post_parent;
</span><span class="cx">                         }
</span><span class="cx">                         $num_parents = count($my_parents);
</span><del>-                        while( $my_parent = array_pop($my_parents) ) {
</del><ins>+                        while ( $my_parent = array_pop($my_parents) ) {
</ins><span class="cx">                                 echo "\t" . display_page_row( $my_parent, $level - $num_parents );
</span><span class="cx">                                 $num_parents--;
</span><span class="cx">                         }
</span><span class="lines">@@ -1787,9 +1786,9 @@
</span><span class="cx"> * @since 2.1.0
</span><span class="cx"> *
</span><span class="cx"> * @param object $user_object
</span><del>- * @param string $style Optional. Attributes added to the TR element. Must be sanitized.
</del><ins>+ * @param string $style Optional. Attributes added to the TR element. Must be sanitized.
</ins><span class="cx"> * @param string $role Key for the $wp_roles array.
</span><del>- * @param int $numposts Optional. Post count to display for this user. Defaults to zero, as in, a new user has made zero posts.
</del><ins>+ * @param int $numposts Optional. Post count to display for this user. Defaults to zero, as in, a new user has made zero posts.
</ins><span class="cx"> * @return string
</span><span class="cx"> */
</span><span class="cx"> function user_row( $user_object, $style = '', $role = '', $numposts = 0 ) {
</span><span class="lines">@@ -1823,7 +1822,7 @@
</span><span class="cx">                 // Set up the hover actions for this user
</span><span class="cx">                 $actions = array();
</span><span class="cx">
</span><del>-                if ( current_user_can('edit_user', $user_object->ID) ) {
</del><ins>+                if ( current_user_can('edit_user', $user_object->ID) ) {
</ins><span class="cx">                         $edit = "<strong><a href=\"$edit_link\">$user_object->user_login</a></strong><br />";
</span><span class="cx">                         $actions['edit'] = '<a href="' . $edit_link . '">' . __('Edit') . '</a>';
</span><span class="cx">                 } else {
</span><span class="lines">@@ -1831,9 +1830,9 @@
</span><span class="cx">                 }
</span><span class="cx">
</span><span class="cx">                 if ( !is_multisite() && $current_user->ID != $user_object->ID && current_user_can('delete_user', $user_object->ID) )
</span><del>-                        $actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("users.php?action=delete&amp;user=$user_object->ID", 'bulk-users') . "'>" . __('Delete') . "</a>";
</del><ins>+                        $actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("users.php?action=delete&amp;user=$user_object->ID", 'bulk-users') . "'>" . __('Delete') . '</a>';
</ins><span class="cx">                 if ( is_multisite() && $current_user->ID != $user_object->ID && current_user_can('remove_user', $user_object->ID) )
</span><del>-                        $actions['remove'] = "<a class='submitdelete' href='" . wp_nonce_url("users.php?action=remove&amp;user=$user_object->ID", 'bulk-users') . "'>" . __('Remove') . "</a>";
</del><ins>+                        $actions['remove'] = "<a class='submitdelete' href='" . wp_nonce_url("users.php?action=remove&amp;user=$user_object->ID", 'bulk-users') . "'>" . __('Remove') . '</a>';
</ins><span class="cx">                 $actions = apply_filters('user_row_actions', $actions, $user_object);
</span><span class="cx">                 $action_count = count($actions);
</span><span class="cx">                 $i = 0;
</span><span class="lines">@@ -2250,17 +2249,17 @@
</span><span class="cx">
</span><span class="cx">         <div id="edithead" style="display:none;">
</span><span class="cx">                 <div class="inside">
</span><del>-                <label for="author"><?php _e('Name') ?></label>
</del><ins>+                <label for="author"><?php _e('Name'); ?></label>
</ins><span class="cx">                 <input type="text" name="newcomment_author" size="50" value="" tabindex="101" id="author" />
</span><span class="cx">                 </div>
</span><span class="cx">
</span><span class="cx">                 <div class="inside">
</span><del>-                <label for="author-email"><?php _e('E-mail') ?></label>
</del><ins>+                <label for="author-email"><?php _e('E-mail'); ?></label>
</ins><span class="cx">                 <input type="text" name="newcomment_author_email" size="50" value="" tabindex="102" id="author-email" />
</span><span class="cx">                 </div>
</span><span class="cx">
</span><span class="cx">                 <div class="inside">
</span><del>-                <label for="author-url"><?php _e('URL') ?></label>
</del><ins>+                <label for="author-url"><?php _e('URL'); ?></label>
</ins><span class="cx">                 <input type="text" id="author-url" name="newcomment_author_url" size="103" value="" tabindex="103" />
</span><span class="cx">                 </div>
</span><span class="cx">                 <div style="clear:both;"></div>
</span><span class="lines">@@ -2342,8 +2341,8 @@
</span><span class="cx"> <table id="list-table">
</span><span class="cx">         <thead>
</span><span class="cx">         <tr>
</span><del>-                <th class="left"><?php _e( 'Name' ) ?></th>
-                <th><?php _e( 'Value' ) ?></th>
</del><ins>+                <th class="left"><?php _e( 'Name' ); ?></th>
+                <th><?php _e( 'Value' ); ?></th>
</ins><span class="cx">         </tr>
</span><span class="cx">         </thead>
</span><span class="cx">         <tbody id='the-list' class='list:meta'>
</span><span class="lines">@@ -2427,12 +2426,12 @@
</span><span class="cx">         if ( $keys )
</span><span class="cx">                 natcasesort($keys);
</span><span class="cx"> ?>
</span><del>-<p><strong><?php _e( 'Add New Custom Field:' ) ?></strong></p>
</del><ins>+<p><strong><?php _e( 'Add New Custom Field:' ); ?></strong></p>
</ins><span class="cx"> <table id="newmeta">
</span><span class="cx"> <thead>
</span><span class="cx"> <tr>
</span><span class="cx"> <th class="left"><label for="metakeyselect"><?php _e( 'Name' ) ?></label></th>
</span><del>-<th><label for="metavalue"><?php _e( 'Value' ) ?></label></th>
</del><ins>+<th><label for="metavalue"><?php _e( 'Value' ); ?></label></th>
</ins><span class="cx"> </tr>
</span><span class="cx"> </thead>
</span><span class="cx">
</span><span class="lines">@@ -2445,7 +2444,7 @@
</span><span class="cx"> <?php
</span><span class="cx">
</span><span class="cx">         foreach ( $keys as $key ) {
</span><del>-                echo "\n<option value='" . esc_attr($key) . "'>" . esc_html($key) . "</option>";
</del><ins>+                echo "\n<option value='" . esc_attr($key) . "'>" . esc_html($key) . '</option>';
</ins><span class="cx">         }
</span><span class="cx"> ?>
</span><span class="cx"> </select>
</span><span class="lines">@@ -2461,7 +2460,7 @@
</span><span class="cx"> </tr>
</span><span class="cx">
</span><span class="cx"> <tr><td colspan="2" class="submit">
</span><del>-<input type="submit" id="addmetasub" name="addmeta" class="add:the-list:newmeta" tabindex="9" value="<?php esc_attr_e( 'Add Custom Field' ) ?>" />
</del><ins>+<input type="submit" id="addmetasub" name="addmeta" class="add:the-list:newmeta" tabindex="9" value="<?php esc_attr_e( 'Add Custom Field' ); ?>" />
</ins><span class="cx"> <?php wp_nonce_field( 'add-meta', '_ajax_nonce-add-meta', false ); ?>
</span><span class="cx"> </td></tr>
</span><span class="cx"> </tbody>
</span><span class="lines">@@ -2591,7 +2590,7 @@
</span><span class="cx">                         else
</span><span class="cx">                                 $current = '';
</span><span class="cx">
</span><del>-                        echo "\n\t<option class='level-$level' value='$item->ID'$current>$pad " . esc_html($item->post_title) . "</option>";
</del><ins>+                        echo "\n\t<option class='level-$level' value='$item->ID'$current>$pad " . esc_html($item->post_title) . '</option>';
</ins><span class="cx">                         parent_dropdown( $default, $item->ID, $level +1 );
</span><span class="cx">                 }
</span><span class="cx">         } else {
</span><span class="lines">@@ -2623,26 +2622,26 @@
</span><span class="cx">         <col />
</span><span class="cx">         <col class="widefat" />
</span><span class="cx">         <tr>
</span><del>-                <th scope="row"><?php _e( 'URL' ) ?></th>
</del><ins>+                <th scope="row"><?php _e( 'URL' ); ?></th>
</ins><span class="cx">                 <td><textarea rows="1" cols="40" type="text" class="attachmentlinks" readonly="readonly"><?php echo wp_get_attachment_url(); ?></textarea></td>
</span><span class="cx">         </tr>
</span><span class="cx"> <?php if ( $icon ) : ?>
</span><span class="cx">         <tr>
</span><span class="cx">                 <th scope="row"><?php $thumb ? _e( 'Thumbnail linked to file' ) : _e( 'Image linked to file' ); ?></th>
</span><del>-                <td><textarea rows="1" cols="40" type="text" class="attachmentlinks" readonly="readonly"><a href="<?php echo wp_get_attachment_url(); ?>"><?php echo $icon ?></a></textarea></td>
</del><ins>+                <td><textarea rows="1" cols="40" type="text" class="attachmentlinks" readonly="readonly"><a href="<?php echo wp_get_attachment_url(); ?>"><?php echo $icon; ?></a></textarea></td>
</ins><span class="cx">         </tr>
</span><span class="cx">         <tr>
</span><span class="cx">                 <th scope="row"><?php $thumb ? _e( 'Thumbnail linked to page' ) : _e( 'Image linked to page' ); ?></th>
</span><del>-                <td><textarea rows="1" cols="40" type="text" class="attachmentlinks" readonly="readonly"><a href="<?php echo get_attachment_link( $post->ID ) ?>" rel="attachment wp-att-<?php echo $post->ID; ?>"><?php echo $icon ?></a></textarea></td>
</del><ins>+                <td><textarea rows="1" cols="40" type="text" class="attachmentlinks" readonly="readonly"><a href="<?php echo get_attachment_link( $post->ID ); ?>" rel="attachment wp-att-<?php echo $post->ID; ?>"><?php echo $icon; ?></a></textarea></td>
</ins><span class="cx">         </tr>
</span><span class="cx"> <?php else : ?>
</span><span class="cx">         <tr>
</span><del>-                <th scope="row"><?php _e( 'Link to file' ) ?></th>
</del><ins>+                <th scope="row"><?php _e( 'Link to file' ); ?></th>
</ins><span class="cx">                 <td><textarea rows="1" cols="40" type="text" class="attachmentlinks" readonly="readonly"><a href="<?php echo wp_get_attachment_url(); ?>" class="attachmentlink"><?php echo basename( wp_get_attachment_url() ); ?></a></textarea></td>
</span><span class="cx">         </tr>
</span><span class="cx">         <tr>
</span><del>-                <th scope="row"><?php _e( 'Link to page' ) ?></th>
-                <td><textarea rows="1" cols="40" type="text" class="attachmentlinks" readonly="readonly"><a href="<?php echo get_attachment_link( $post->ID ) ?>" rel="attachment wp-att-<?php echo $post->ID ?>"><?php the_title(); ?></a></textarea></td>
</del><ins>+                <th scope="row"><?php _e( 'Link to page' ); ?></th>
+                <td><textarea rows="1" cols="40" type="text" class="attachmentlinks" readonly="readonly"><a href="<?php echo get_attachment_link( $post->ID ); ?>" rel="attachment wp-att-<?php echo $post->ID; ?>"><?php the_title(); ?></a></textarea></td>
</ins><span class="cx">         </tr>
</span><span class="cx"> <?php endif; ?>
</span><span class="cx"> </table>
</span><span class="lines">@@ -2781,36 +2780,36 @@
</span><span class="cx">                 $wp_meta_boxes[$page][$context] = array();
</span><span class="cx">
</span><span class="cx">         foreach ( array_keys($wp_meta_boxes[$page]) as $a_context ) {
</span><del>-        foreach ( array('high', 'core', 'default', 'low') as $a_priority ) {
-                if ( !isset($wp_meta_boxes[$page][$a_context][$a_priority][$id]) )
-                        continue;
-
-                // If a core box was previously added or removed by a plugin, don't add.
-                if ( 'core' == $priority ) {
-                        // If core box previously deleted, don't add
-                        if ( false === $wp_meta_boxes[$page][$a_context][$a_priority][$id] )
</del><ins>+                foreach ( array('high', 'core', 'default', 'low') as $a_priority ) {
+                        if ( !isset($wp_meta_boxes[$page][$a_context][$a_priority][$id]) )
+                                continue;
+        
+                        // If a core box was previously added or removed by a plugin, don't add.
+                        if ( 'core' == $priority ) {
+                                // If core box previously deleted, don't add
+                                if ( false === $wp_meta_boxes[$page][$a_context][$a_priority][$id] )
+                                        return;
+                                // If box was added with default priority, give it core priority to maintain sort order
+                                if ( 'default' == $a_priority ) {
+                                        $wp_meta_boxes[$page][$a_context]['core'][$id] = $wp_meta_boxes[$page][$a_context]['default'][$id];
+                                        unset($wp_meta_boxes[$page][$a_context]['default'][$id]);
+                                }
</ins><span class="cx">                                 return;
</span><del>-                        // If box was added with default priority, give it core priority to maintain sort order
-                        if ( 'default' == $a_priority ) {
-                                $wp_meta_boxes[$page][$a_context]['core'][$id] = $wp_meta_boxes[$page][$a_context]['default'][$id];
-                                unset($wp_meta_boxes[$page][$a_context]['default'][$id]);
</del><span class="cx">                         }
</span><del>-                        return;
</del><ins>+                        // If no priority given and id already present, use existing priority
+                        if ( empty($priority) ) {
+                                $priority = $a_priority;
+                        // else if we're adding to the sorted priortiy, we don't know the title or callback. Glab them from the previously added context/priority.
+                        } elseif ( 'sorted' == $priority ) {
+                                $title = $wp_meta_boxes[$page][$a_context][$a_priority][$id]['title'];
+                                $callback = $wp_meta_boxes[$page][$a_context][$a_priority][$id]['callback'];
+                                $callback_args = $wp_meta_boxes[$page][$a_context][$a_priority][$id]['args'];
+                        }
+                        // An id can be in only one priority and one context
+                        if ( $priority != $a_priority || $context != $a_context )
+                                unset($wp_meta_boxes[$page][$a_context][$a_priority][$id]);
</ins><span class="cx">                 }
</span><del>-                // If no priority given and id already present, use existing priority
-                if ( empty($priority) ) {
-                        $priority = $a_priority;
-                // else if we're adding to the sorted priortiy, we don't know the title or callback. Glab them from the previously added context/priority.
-                } elseif ( 'sorted' == $priority ) {
-                        $title = $wp_meta_boxes[$page][$a_context][$a_priority][$id]['title'];
-                        $callback = $wp_meta_boxes[$page][$a_context][$a_priority][$id]['callback'];
-                        $callback_args = $wp_meta_boxes[$page][$a_context][$a_priority][$id]['args'];
-                }
-                // An id can be in only one priority and one context
-                if ( $priority != $a_priority || $context != $a_context )
-                        unset($wp_meta_boxes[$page][$a_context][$a_priority][$id]);
</del><span class="cx">         }
</span><del>-        }
</del><span class="cx">
</span><span class="cx">         if ( empty($priority) )
</span><span class="cx">                 $priority = 'low';
</span><span class="lines">@@ -2873,7 +2872,7 @@
</span><span class="cx">                 }
</span><span class="cx">         } while(0);
</span><span class="cx">
</span><del>-        echo "</div>";
</del><ins>+        echo '</div>';
</ins><span class="cx">
</span><span class="cx">         return $i;
</span><span class="cx">
</span><span class="lines">@@ -3154,7 +3153,7 @@
</span><span class="cx"> * @param boolean $sanitize Whether to re-sanitize the setting value before returning errors.
</span><span class="cx"> * @return array Array of settings errors
</span><span class="cx"> */
</span><del>-function get_settings_errors( $setting = '', $sanitize = FALSE ) {
</del><ins>+function get_settings_errors( $setting = '', $sanitize = false ) {
</ins><span class="cx">         global $wp_settings_errors;
</span><span class="cx">
</span><span class="cx">         // If $sanitize is true, manually re-run the sanitizisation for this option
</span><span class="lines">@@ -3205,23 +3204,23 @@
</span><span class="cx"> * @param boolean $hide_on_update If set to true errors will not be shown if the settings page has already been submitted.
</span><span class="cx"> * @return <type>
</span><span class="cx"> */
</span><del>-function settings_errors ( $setting = '', $sanitize = FALSE, $hide_on_update = FALSE ) {
</del><ins>+function settings_errors( $setting = '', $sanitize = false, $hide_on_update = false ) {
</ins><span class="cx">
</span><del>-        if ($hide_on_update AND $_GET['updated']) return;
</del><ins>+        if ( $hide_on_update && !empty($_GET['updated']) )
+                return;
</ins><span class="cx">
</span><span class="cx">         $settings_errors = get_settings_errors( $setting, $sanitize );
</span><span class="cx">
</span><del>-        if ( !is_array($settings_errors) ) return;
</del><ins>+        if ( !is_array($settings_errors) )
+                return;
</ins><span class="cx">
</span><del>-        $output = '';
</del><span class="cx">         foreach ( $settings_errors as $key => $details ) {
</span><span class="cx">                 $css_id = 'setting-error-' . $details['code'];
</span><span class="cx">                 $css_class = $details['type'] . ' settings-error';
</span><del>-                $output .= "<div id='$css_id' class='$css_class'> \n";
-                $output .= "<p><strong>{$details['message']}</strong></p>";
-                $output .= "</div> \n";
</del><ins>+                echo "<div id='$css_id' class='$css_class'>\n";
+                echo "<p><strong>{$details['message']}</strong></p>";
+                echo "</div>\n";
</ins><span class="cx">         }
</span><del>-        echo $output;
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><span class="lines">@@ -3273,7 +3272,7 @@
</span><span class="cx">                                 <?php wp_nonce_field( 'find-posts', '_ajax_nonce', false ); ?>
</span><span class="cx">                                 <label class="screen-reader-text" for="find-posts-input"><?php _e( 'Search' ); ?></label>
</span><span class="cx">                                 <input type="text" id="find-posts-input" name="ps" value="" />
</span><del>-                                <input type="button" onclick="findPosts.send();" value="<?php esc_attr_e( 'Search' ); ?>" class="button" /><br />
</del><ins>+                                <input type="button" onClick="findPosts.send();" value="<?php esc_attr_e( 'Search' ); ?>" class="button" /><br />
</ins><span class="cx">
</span><span class="cx">                                 <?php
</span><span class="cx">                                 $post_types = get_post_types( array('public' => true), 'objects' );
</span><span class="lines">@@ -3281,7 +3280,7 @@
</span><span class="cx">                                         if ( 'attachment' == $post->name )
</span><span class="cx">                                                 continue;
</span><span class="cx">                                 ?>
</span><del>-                                <input type="radio" name="find-posts-what" id="find-posts-<?php echo esc_attr($post->name); ?>" value="<?php echo esc_attr($post->name); ?>" <?php checked($post->name, 'post'); ?> />
</del><ins>+                                <input type="radio" name="find-posts-what" id="find-posts-<?php echo esc_attr($post->name); ?>" value="<?php echo esc_attr($post->name); ?>" <?php checked($post->name, 'post'); ?> />
</ins><span class="cx">                                 <label for="find-posts-<?php echo esc_attr($post->name); ?>"><?php echo $post->label; ?></label>
</span><span class="cx">                                 <?php
</span><span class="cx">                                 } ?>
</span><span class="lines">@@ -3289,7 +3288,7 @@
</span><span class="cx">                         <div id="find-posts-response"></div>
</span><span class="cx">                 </div>
</span><span class="cx">                 <div class="find-box-buttons">
</span><del>-                        <input type="button" class="button alignleft" onclick="findPosts.close();" value="<?php esc_attr_e('Close'); ?>" />
</del><ins>+                        <input type="button" class="button alignleft" onClick="findPosts.close();" value="<?php esc_attr_e('Close'); ?>" />
</ins><span class="cx">                         <input id="find-posts-submit" type="submit" class="button-primary alignright" value="<?php esc_attr_e('Select'); ?>" />
</span><span class="cx">                 </div>
</span><span class="cx">         </div>
</span><span class="lines">@@ -3307,7 +3306,8 @@
</span><span class="cx"> */
</span><span class="cx"> function the_post_password() {
</span><span class="cx">         global $post;
</span><del>-        if ( isset( $post->post_password ) ) echo esc_attr( $post->post_password );
</del><ins>+        if ( isset( $post->post_password ) )
+                echo esc_attr( $post->post_password );
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><span class="lines">@@ -3400,7 +3400,7 @@
</span><span class="cx">
</span><span class="cx">         array_shift($allowed_actions);
</span><span class="cx">
</span><del>-        foreach ( $allowed_actions as $action => $label) {
</del><ins>+        foreach ( $allowed_actions as $action => $label ) {
</ins><span class="cx">                 echo "<div class='favorite-action'><a href='$action'>";
</span><span class="cx">                 echo $label;
</span><span class="cx">                 echo "</a></div>\n";
</span><span class="lines">@@ -3436,7 +3436,8 @@
</span><span class="cx"> *
</span><span class="cx"> */
</span><span class="cx"> function _admin_search_query() {
</span><del>-        echo isset($_GET['s']) ? esc_attr( stripslashes( $_GET['s'] ) ) : '';
</del><ins>+        if ( isset($_GET['s']) )
+                echo esc_attr( stripslashes( $_GET['s'] ) );
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><span class="lines">@@ -3448,17 +3449,18 @@
</span><span class="cx"> *
</span><span class="cx"> */
</span><span class="cx"> function iframe_header( $title = '', $limit_styles = false ) {
</span><del>-global $hook_suffix;
-?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
</del><ins>+        global $hook_suffix;
+?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
</ins><span class="cx"> <html xmlns="http://www.w3.org/1999/xhtml" <?php do_action('admin_xml_ns'); ?> <?php language_attributes(); ?>>
</span><span class="cx"> <head>
</span><span class="cx"> <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
</span><del>-<title><?php bloginfo('name') ?> &rsaquo; <?php echo $title ?> &#8212; <?php _e('WordPress'); ?></title>
</del><ins>+<title><?php bloginfo('name'); ?> &rsaquo; <?php echo $title; ?> &#8212; <?php _e('WordPress'); ?></title>
</ins><span class="cx"> <?php
</span><del>-wp_enqueue_style( 'global' );
-if ( ! $limit_styles )
-        wp_enqueue_style( 'wp-admin' );
-wp_enqueue_style( 'colors' );
</del><ins>+        wp_enqueue_style( 'global' );
+        if ( ! $limit_styles )
+                wp_enqueue_style( 'wp-admin' );
+        wp_enqueue_style( 'colors' );
</ins><span class="cx"> ?>
</span><span class="cx"> <script type="text/javascript">
</span><span class="cx"> //<![CDATA[
</span><span class="lines">@@ -3467,14 +3469,14 @@
</span><span class="cx"> //]]>
</span><span class="cx"> </script>
</span><span class="cx"> <?php
</span><del>-do_action('admin_print_styles');
-do_action('admin_print_scripts');
-do_action('admin_head');
-
-$admin_body_class = preg_replace('/[^a-z0-9_-]+/i', '-', $hook_suffix);
</del><ins>+        do_action('admin_print_styles');
+        do_action('admin_print_scripts');
+        do_action('admin_head');
+        
+        $admin_body_class = preg_replace('/[^a-z0-9_-]+/i', '-', $hook_suffix);
</ins><span class="cx"> ?>
</span><span class="cx"> </head>
</span><del>-<body<?php if ( isset($GLOBALS['body_id']) ) echo ' id="' . $GLOBALS['body_id'] . '"'; ?> class="no-js <?php echo $admin_body_class; ?>">
</del><ins>+<body<?php if ( isset($GLOBALS['body_id']) ) echo ' id="' . $GLOBALS['body_id'] . '"'; ?> class="no-js <?php echo $admin_body_class; ?>">
</ins><span class="cx"> <script type="text/javascript">
</span><span class="cx"> //<![CDATA[
</span><span class="cx"> (function(){
</span><span class="lines">@@ -3587,7 +3589,7 @@
</span><span class="cx">                         $show_screen = true;
</span><span class="cx">                         break;
</span><span class="cx">         }
</span><del>-        if( ! empty( $settings ) )
</del><ins>+        if ( ! empty( $settings ) )
</ins><span class="cx">                 $show_screen = true;
</span><span class="cx"> ?>
</span><span class="cx"> <div id="screen-meta">
</span><span class="lines">@@ -3595,14 +3597,14 @@
</span><span class="cx"> <div id="screen-options-wrap" class="hidden">
</span><span class="cx">         <form id="adv-settings" action="" method="post">
</span><span class="cx">         <?php if ( isset($wp_meta_boxes[$screen->id]) ) : ?>
</span><del>-                <h5><?php _ex('Show on screen', 'Metaboxes') ?></h5>
</del><ins>+                <h5><?php _ex('Show on screen', 'Metaboxes'); ?></h5>
</ins><span class="cx">                 <div class="metabox-prefs">
</span><span class="cx">                         <?php meta_box_prefs($screen); ?>
</span><span class="cx">                         <br class="clear" />
</span><span class="cx">                 </div>
</span><span class="cx">                 <?php endif;
</span><span class="cx">                 if ( ! empty($column_screens) ) : ?>
</span><del>-                <h5><?php echo ( isset( $column_screens['_title'] ) ? $column_screens['_title'] : _x('Show on screen', 'Columns') ) ?></h5>
</del><ins>+                <h5><?php echo ( isset( $column_screens['_title'] ) ? $column_screens['_title'] : _x('Show on screen', 'Columns') ); ?></h5>
</ins><span class="cx">                 <div class="metabox-prefs">
</span><span class="cx">                         <?php manage_columns_prefs($screen); ?>
</span><span class="cx">                         <br class="clear" />
</span><span class="lines">@@ -3612,7 +3614,7 @@
</span><span class="cx">
</span><span class="cx">         if ( !empty( $screen_options ) ) {
</span><span class="cx">                 ?>
</span><del>-                <h5><?php _ex('Show on screen', 'Screen Options') ?></h5>
</del><ins>+                <h5><?php _ex('Show on screen', 'Screen Options'); ?></h5>
</ins><span class="cx">                 <?php
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -3646,11 +3648,11 @@
</span><span class="cx">
</span><span class="cx"> <div id="screen-meta-links">
</span><span class="cx"> <div id="contextual-help-link-wrap" class="hide-if-no-js screen-meta-toggle">
</span><del>-<a href="#contextual-help" id="contextual-help-link" class="show-settings"><?php _e('Help') ?></a>
</del><ins>+<a href="#contextual-help" id="contextual-help-link" class="show-settings"><?php _e('Help'); ?></a>
</ins><span class="cx"> </div>
</span><span class="cx"> <?php if ( $show_screen ) { ?>
</span><span class="cx"> <div id="screen-options-link-wrap" class="hide-if-no-js screen-meta-toggle">
</span><del>-<a href="#screen-options" id="show-settings-link" class="show-settings"><?php _e('Screen Options') ?></a>
</del><ins>+<a href="#screen-options" id="show-settings-link" class="show-settings"><?php _e('Screen Options'); ?></a>
</ins><span class="cx"> </div>
</span><span class="cx"> <?php } ?>
</span><span class="cx"> </div>
</span><span class="lines">@@ -3663,7 +3665,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @since 2.7.0
</span><span class="cx"> *
</span><del>- * @param string $screen The handle for the screen to add help to. This is usually the hook name returned by the add_*_page() functions.
</del><ins>+ * @param string $screen The handle for the screen to add help to. This is usually the hook name returned by the add_*_page() functions.
</ins><span class="cx"> * @param string $help Arbitrary help text
</span><span class="cx"> */
</span><span class="cx"> function add_contextual_help($screen, $help) {
</span><span class="lines">@@ -3718,7 +3720,7 @@
</span><span class="cx">         $num = $columns[$screen->id];
</span><span class="cx">
</span><span class="cx">         if ( ! $screen_layout_columns )
</span><del>-                        $screen_layout_columns = 2;
</del><ins>+                $screen_layout_columns = 2;
</ins><span class="cx">
</span><span class="cx">         $i = 1;
</span><span class="cx">         $return = '<h5>' . __('Screen Layout') . "</h5>\n<div class='columns-prefs'>" . __('Number of Columns:') . "\n";
</span><span class="lines">@@ -3895,7 +3897,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @param string $id Screen id, optional.
</span><span class="cx"> */
</span><del>-function set_current_screen( $id = '' ) {
</del><ins>+function set_current_screen( $id = '' ) {
</ins><span class="cx">         global $current_screen, $hook_suffix, $typenow, $taxnow;
</span><span class="cx">
</span><span class="cx">         $action = '';
</span></span></pre>
</div>
</div>
</body>
</html>