WordPress.org

Make WordPress Core

Changeset 15278


Ignore:
Timestamp:
06/19/2010 05:32:01 AM (8 years ago)
Author:
dd32
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/template.php

    r15253 r15278  
    103103        $actions['inline hide-if-no-js'] = '<a href="#" class="editinline">' . __('Quick&nbsp;Edit') . '</a>';
    104104        if ( $default_cat_id != $category->term_id )
    105             $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>";
     105            $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>';
    106106        $actions = apply_filters('link_cat_row_actions', $actions, $category);
    107107        $action_count = count($actions);
     
    156156                break;
    157157            case 'slug':
    158                 $output .= "<td $attributes>" . apply_filters('editable_slug', $category->slug) . "</td>";
     158                $output .= "<td $attributes>" . apply_filters('editable_slug', $category->slug) . '</td>';
    159159                break;
    160160            case 'links':
     
    234234            'walker' => $walker,
    235235            'checked_ontop' => $checked_ontop
    236   ));
     236    ));
    237237}
    238238
     
    289289        $keys = array_keys( $categories );
    290290
    291         foreach( $keys as $k ) {
     291        foreach ( $keys as $k ) {
    292292            if ( in_array( $categories[$k]->term_id, $args['selected_cats'] ) ) {
    293293                $checked_categories[] = $categories[$k];
     
    341341        <li id="<?php echo $id; ?>" class="popular-category">
    342342            <label class="selectit">
    343             <input id="in-<?php echo $id; ?>" type="checkbox" <?php echo $checked; ?> value="<?php echo (int) $term->term_id; ?>" <?php echo $disabled ?>/>
     343            <input id="in-<?php echo $id; ?>" type="checkbox" <?php echo $checked; ?> value="<?php echo (int) $term->term_id; ?>" <?php echo $disabled; ?>/>
    344344                <?php echo esc_html( apply_filters( 'the_category', $term->name ) ); ?>
    345345            </label>
     
    450450                    }
    451451                    if ( current_user_can($tax->cap->delete_terms) && $tag->term_id != $default_term )
    452                         $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>";
     452                        $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>';
    453453
    454454                    $actions = apply_filters('tag_row_actions', $actions, $tag);
     
    473473                    break;
    474474                case 'slug':
    475                     $out .= "<td $attributes>" . apply_filters('editable_slug', $tag->slug) . "</td>";
     475                    $out .= "<td $attributes>" . apply_filters('editable_slug', $tag->slug) . '</td>';
    476476                    break;
    477477                case 'posts':
     
    531531    } else {
    532532        $terms = get_terms( $taxonomy, $args );
    533         foreach( $terms as $term )
     533        foreach ( $terms as $term )
    534534            $out .= _tag_row( $term, 0, $taxonomy );
    535535        $count = $pagesize; // Only displaying a single page.
     
    570570            $num_parents = count($my_parents);
    571571            while ( $my_parent = array_pop($my_parents) ) {
    572                 $output .=  "\t" . _tag_row( $my_parent, $level - $num_parents, $taxonomy );
     572                $output .= "\t" . _tag_row( $my_parent, $level - $num_parents, $taxonomy );
    573573                $num_parents--;
    574574            }
     
    804804
    805805/**
    806  * Register column headers for a particular screen.  The header names will be listed in the Screen Options.
     806 * Register column headers for a particular screen. The header names will be listed in the Screen Options.
    807807 *
    808808 * @since 2.7.0
    809809 *
    810  * @param string $screen The handle for the screen to add help to.  This is usually the hook name returned by the add_*_page() functions.
     810 * @param string $screen The handle for the screen to add help to. This is usually the hook name returned by the add_*_page() functions.
    811811 * @param array $columns An array of columns with column IDs as the keys and translated column names as the values
    812812 * @see get_column_headers(), print_column_headers(), get_hidden_columns()
     
    941941
    942942        endif; // authors
    943 ?>
    944 
    945 <?php if ( !$bulk ) echo $authors_dropdown;
    946 endif; // post_type_supports author
     943        if ( !$bulk ) // On bulk views, this is used further down
     944            echo $authors_dropdown;
     945    endif; // post_type_supports author
    947946
    948947if ( !$bulk ) :
     
    977976<?php foreach ( $hierarchical_taxonomies as $taxonomy ) : ?>
    978977
    979         <span class="title inline-edit-categories-label"><?php echo esc_html($taxonomy->labels->name) ?>
     978        <span class="title inline-edit-categories-label"><?php echo esc_html($taxonomy->labels->name); ?>
    980979            <span class="catshow"><?php _e('[more]'); ?></span>
    981980            <span class="cathide" style="display:none;"><?php _e('[less]'); ?></span>
     
    983982        <input type="hidden" name="<?php echo ( $taxonomy->name == 'category' ) ? 'post_category[]' : 'tax_input[' . esc_attr($taxonomy->name) . '][]'; ?>" value="0" />
    984983        <ul class="cat-checklist <?php echo esc_attr($taxonomy->name)?>-checklist">
    985             <?php wp_terms_checklist(null, array('taxonomy' => $taxonomy->name)) ?>
     984            <?php wp_terms_checklist(null, array('taxonomy' => $taxonomy->name)); ?>
    986985        </ul>
    987986
     
    10061005    $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');
    10071006    if ( $bulk )
    1008         $dropdown_args['show_option_no_change'] =  __('&mdash; No Change &mdash;');
     1007        $dropdown_args['show_option_no_change'] = __('&mdash; No Change &mdash;');
    10091008    $dropdown_args = apply_filters('quick_edit_dropdown_pages_args', $dropdown_args);
    10101009    wp_dropdown_pages($dropdown_args);
     
    10171016        <label>
    10181017            <span class="title"><?php _e( 'Order' ); ?></span>
    1019             <span class="input-text-wrap"><input type="text" name="menu_order" class="inline-edit-menu-order-input" value="<?php echo $post->menu_order ?>" /></span>
     1018            <span class="input-text-wrap"><input type="text" name="menu_order" class="inline-edit-menu-order-input" value="<?php echo $post->menu_order; ?>" /></span>
    10201019        </label>
    10211020
     
    10291028<?php   endif; // $bulk ?>
    10301029                <option value="default"><?php _e( 'Default Template' ); ?></option>
    1031                 <?php page_template_dropdown() ?>
     1030                <?php page_template_dropdown(); ?>
    10321031            </select>
    10331032        </label>
     
    10421041
    10431042        <label class="inline-edit-tags">
    1044             <span class="title"><?php echo esc_html($taxonomy->labels->name) ?></span>
    1045             <textarea cols="22" rows="1" name="tax_input[<?php echo esc_attr($taxonomy->name)?>]" class="tax_input_<?php echo esc_attr($taxonomy->name)?>"></textarea>
     1043            <span class="title"><?php echo esc_html($taxonomy->labels->name); ?></span>
     1044            <textarea cols="22" rows="1" name="tax_input[<?php echo esc_attr($taxonomy->name); ?>]" class="tax_input_<?php echo esc_attr($taxonomy->name); ?>"></textarea>
    10461045        </label>
    10471046
    10481047<?php endforeach; //$flat_taxonomies as $taxonomy ?>
    10491048
    1050 <?php endif; // count($flat_taxonomies) && !$bulk  ?>
     1049<?php endif; // count($flat_taxonomies) && !$bulk ?>
    10511050
    10521051<?php if ( post_type_supports( $screen->post_type, 'comments' ) || post_type_supports( $screen->post_type, 'trackbacks' ) ) :
     
    11051104                    <option value="future"><?php _e( 'Scheduled' ); ?></option>
    11061105<?php if ( $bulk ) : ?>
    1107                     <option value="private"><?php _e('Private') ?></option>
     1106                    <option value="private"><?php _e('Private'); ?></option>
    11081107<?php endif; // $bulk ?>
    11091108                <?php endif; ?>
     
    13431342            $attributes = 'class="post-title column-title"' . $style;
    13441343        ?>
    1345         <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>
     1344        <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>
    13461345        <?php
    13471346            if ( 'excerpt' == $mode )
     
    13551354            if ( current_user_can($post_type_object->cap->delete_post, $post->ID) ) {
    13561355                if ( 'trash' == $post->post_status )
    1357                     $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>";
     1356                    $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>';
    13581357                elseif ( EMPTY_TRASH_DAYS )
    1359                     $actions['trash'] = "<a class='submitdelete' title='" . esc_attr(__('Move this item to the Trash')) . "' href='" . get_delete_post_link($post->ID) . "'>" . __('Trash') . "</a>";
     1358                    $actions['trash'] = "<a class='submitdelete' title='" . esc_attr(__('Move this item to the Trash')) . "' href='" . get_delete_post_link($post->ID) . "'>" . __('Trash') . '</a>';
    13601359                if ( 'trash' == $post->post_status || !EMPTY_TRASH_DAYS )
    1361                     $actions['delete'] = "<a class='submitdelete' title='" . esc_attr(__('Delete this item permanently')) . "' href='" . get_delete_post_link($post->ID, '', true) . "'>" . __('Delete Permanently') . "</a>";
     1360                    $actions['delete'] = "<a class='submitdelete' title='" . esc_attr(__('Delete this item permanently')) . "' href='" . get_delete_post_link($post->ID, '', true) . "'>" . __('Delete Permanently') . '</a>';
    13621361            }
    13631362            if ( in_array($post->post_status, array('pending', 'draft')) ) {
     
    13861385        case 'categories':
    13871386        ?>
    1388         <td <?php echo $attributes ?>><?php
     1387        <td <?php echo $attributes; ?>><?php
    13891388            $categories = get_the_category();
    13901389            if ( !empty( $categories ) ) {
    13911390                $out = array();
    13921391                foreach ( $categories as $c )
    1393                     $out[] = "<a href='edit.php?category_name=$c->slug'> " . esc_html(sanitize_term_field('name', $c->name, $c->term_id, 'category', 'display')) . "</a>";
     1392                    $out[] = "<a href='edit.php?category_name=$c->slug'> " . esc_html(sanitize_term_field('name', $c->name, $c->term_id, 'category', 'display')) . '</a>';
    13941393                    echo join( ', ', $out );
    13951394            } else {
     
    14021401        case 'tags':
    14031402        ?>
    1404         <td <?php echo $attributes ?>><?php
     1403        <td <?php echo $attributes; ?>><?php
    14051404            $tags = get_the_tags($post->ID);
    14061405            if ( !empty( $tags ) ) {
    14071406                $out = array();
    14081407                foreach ( $tags as $c )
    1409                     $out[] = "<a href='edit.php?tag=$c->slug'> " . esc_html(sanitize_term_field('name', $c->name, $c->term_id, 'post_tag', 'display')) . "</a>";
     1408                    $out[] = "<a href='edit.php?tag=$c->slug'> " . esc_html(sanitize_term_field('name', $c->name, $c->term_id, 'post_tag', 'display')) . '</a>';
    14101409                echo join( ', ', $out );
    14111410            } else {
     
    14181417        case 'comments':
    14191418        ?>
    1420         <td <?php echo $attributes ?>><div class="post-com-count-wrapper">
     1419        <td <?php echo $attributes; ?>><div class="post-com-count-wrapper">
    14211420        <?php
    14221421            $pending_phrase = sprintf( __('%s pending'), number_format( $pending_comments ) );
     
    14331432        case 'author':
    14341433        ?>
    1435         <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>
     1434        <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>
    14361435        <?php
    14371436        break;
     
    14451444        case 'control_edit':
    14461445        ?>
    1447         <td><?php if ( current_user_can($post_type_object->cap->edit_post, $post->ID) ) { echo "<a href='$edit_link' class='edit'>" . __('Edit') . "</a>"; } ?></td>
     1446        <td><?php if ( current_user_can($post_type_object->cap->edit_post, $post->ID) ) { echo "<a href='$edit_link' class='edit'>" . __('Edit') . '</a>'; } ?></td>
    14481447        <?php
    14491448        break;
     
    14511450        case 'control_delete':
    14521451        ?>
    1453         <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>
     1452        <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>
    14541453        <?php
    14551454        break;
     
    14571456        default:
    14581457        ?>
    1459         <td <?php echo $attributes ?>><?php do_action('manage_posts_custom_column', $column_name, $post->ID); ?></td>
     1458        <td <?php echo $attributes; ?>><?php do_action('manage_posts_custom_column', $column_name, $post->ID); ?></td>
    14601459        <?php
    14611460        break;
     
    15091508    $rowclass = 'alternate' == $rowclass ? '' : 'alternate';
    15101509    $posts_columns = get_column_headers( $current_screen );
    1511     $hidden = get_hidden_columns(  $current_screen );
     1510    $hidden = get_hidden_columns( $current_screen );
    15121511    $title = _draft_or_post_title();
    15131512    $post_type = $page->post_type;
     
    15681567        $edit_link = get_edit_post_link( $page->ID );
    15691568        ?>
    1570         <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>
     1569        <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>
    15711570        <?php
    15721571        $actions = array();
     
    15771576        if ( current_user_can($post_type_object->cap->delete_post, $page->ID) ) {
    15781577            if ( $post->post_status == 'trash' )
    1579                 $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>";
     1578                $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>';
    15801579            elseif ( EMPTY_TRASH_DAYS )
    1581                 $actions['trash'] = "<a class='submitdelete' title='" . esc_attr(__('Move this page to the Trash')) . "' href='" . get_delete_post_link($page->ID) . "'>" . __('Trash') . "</a>";
     1580                $actions['trash'] = "<a class='submitdelete' title='" . esc_attr(__('Move this page to the Trash')) . "' href='" . get_delete_post_link($page->ID) . "'>" . __('Trash') . '</a>';
    15821581            if ( $post->post_status == 'trash' || !EMPTY_TRASH_DAYS )
    1583                 $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>";
     1582                $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>';
    15841583        }
    15851584        if ( in_array($post->post_status, array('pending', 'draft')) ) {
     
    16071606    case 'comments':
    16081607        ?>
    1609         <td <?php echo $attributes ?>><div class="post-com-count-wrapper">
     1608        <td <?php echo $attributes; ?>><div class="post-com-count-wrapper">
    16101609        <?php
    16111610        $left = get_pending_comments_num( $page->ID );
     
    16231622    case 'author':
    16241623        ?>
    1625         <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>
     1624        <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>
    16261625        <?php
    16271626        break;
     
    16291628    default:
    16301629        ?>
    1631         <td <?php echo $attributes ?>><?php do_action('manage_pages_custom_column', $column_name, $id); ?></td>
     1630        <td <?php echo $attributes; ?>><?php do_action('manage_pages_custom_column', $column_name, $id); ?></td>
    16321631        <?php
    16331632        break;
     
    17141713
    17151714    // if it is the last pagenum and there are orphaned pages, display them with paging as well
    1716     if ( isset($children_pages) && $count < $end ){
    1717         foreach( $children_pages as $orphans ){
     1715    if ( isset($children_pages) && $count < $end ) {
     1716        foreach ( $children_pages as $orphans ) {
    17181717            foreach ( $orphans as $op ) {
    17191718                if ( $count >= $end )
     
    17651764            }
    17661765            $num_parents = count($my_parents);
    1767             while( $my_parent = array_pop($my_parents) ) {
     1766            while ( $my_parent = array_pop($my_parents) ) {
    17681767                echo "\t" . display_page_row( $my_parent, $level - $num_parents );
    17691768                $num_parents--;
     
    17881787 *
    17891788 * @param object $user_object
    1790  * @param string $style Optional. Attributes added to the TR element.  Must be sanitized.
     1789 * @param string $style Optional. Attributes added to the TR element. Must be sanitized.
    17911790 * @param string $role Key for the $wp_roles array.
    1792  * @param int $numposts Optional. Post count to display for this user.  Defaults to zero, as in, a new user has made zero posts.
     1791 * @param int $numposts Optional. Post count to display for this user. Defaults to zero, as in, a new user has made zero posts.
    17931792 * @return string
    17941793 */
     
    18241823        $actions = array();
    18251824
    1826         if ( current_user_can('edit_user',  $user_object->ID) ) {
     1825        if ( current_user_can('edit_user', $user_object->ID) ) {
    18271826            $edit = "<strong><a href=\"$edit_link\">$user_object->user_login</a></strong><br />";
    18281827            $actions['edit'] = '<a href="' . $edit_link . '">' . __('Edit') . '</a>';
     
    18321831
    18331832        if ( !is_multisite() && $current_user->ID != $user_object->ID && current_user_can('delete_user', $user_object->ID) )
    1834             $actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("users.php?action=delete&amp;user=$user_object->ID", 'bulk-users') . "'>" . __('Delete') . "</a>";
     1833            $actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("users.php?action=delete&amp;user=$user_object->ID", 'bulk-users') . "'>" . __('Delete') . '</a>';
    18351834        if ( is_multisite() && $current_user->ID != $user_object->ID && current_user_can('remove_user', $user_object->ID) )
    1836             $actions['remove'] = "<a class='submitdelete' href='" . wp_nonce_url("users.php?action=remove&amp;user=$user_object->ID", 'bulk-users') . "'>" . __('Remove') . "</a>";
     1835            $actions['remove'] = "<a class='submitdelete' href='" . wp_nonce_url("users.php?action=remove&amp;user=$user_object->ID", 'bulk-users') . "'>" . __('Remove') . '</a>';
    18371836        $actions = apply_filters('user_row_actions', $actions, $user_object);
    18381837        $action_count = count($actions);
     
    22512250    <div id="edithead" style="display:none;">
    22522251        <div class="inside">
    2253         <label for="author"><?php _e('Name') ?></label>
     2252        <label for="author"><?php _e('Name'); ?></label>
    22542253        <input type="text" name="newcomment_author" size="50" value="" tabindex="101" id="author" />
    22552254        </div>
    22562255
    22572256        <div class="inside">
    2258         <label for="author-email"><?php _e('E-mail') ?></label>
     2257        <label for="author-email"><?php _e('E-mail'); ?></label>
    22592258        <input type="text" name="newcomment_author_email" size="50" value="" tabindex="102" id="author-email" />
    22602259        </div>
    22612260
    22622261        <div class="inside">
    2263         <label for="author-url"><?php _e('URL') ?></label>
     2262        <label for="author-url"><?php _e('URL'); ?></label>
    22642263        <input type="text" id="author-url" name="newcomment_author_url" size="103" value="" tabindex="103" />
    22652264        </div>
     
    23432342    <thead>
    23442343    <tr>
    2345         <th class="left"><?php _e( 'Name' ) ?></th>
    2346         <th><?php _e( 'Value' ) ?></th>
     2344        <th class="left"><?php _e( 'Name' ); ?></th>
     2345        <th><?php _e( 'Value' ); ?></th>
    23472346    </tr>
    23482347    </thead>
     
    24282427        natcasesort($keys);
    24292428?>
    2430 <p><strong><?php _e( 'Add New Custom Field:' ) ?></strong></p>
     2429<p><strong><?php _e( 'Add New Custom Field:' ); ?></strong></p>
    24312430<table id="newmeta">
    24322431<thead>
    24332432<tr>
    24342433<th class="left"><label for="metakeyselect"><?php _e( 'Name' ) ?></label></th>
    2435 <th><label for="metavalue"><?php _e( 'Value' ) ?></label></th>
     2434<th><label for="metavalue"><?php _e( 'Value' ); ?></label></th>
    24362435</tr>
    24372436</thead>
     
    24462445
    24472446    foreach ( $keys as $key ) {
    2448         echo "\n<option value='" . esc_attr($key) . "'>" . esc_html($key) . "</option>";
     2447        echo "\n<option value='" . esc_attr($key) . "'>" . esc_html($key) . '</option>';
    24492448    }
    24502449?>
     
    24622461
    24632462<tr><td colspan="2" class="submit">
    2464 <input type="submit" id="addmetasub" name="addmeta" class="add:the-list:newmeta" tabindex="9" value="<?php esc_attr_e( 'Add Custom Field' ) ?>" />
     2463<input type="submit" id="addmetasub" name="addmeta" class="add:the-list:newmeta" tabindex="9" value="<?php esc_attr_e( 'Add Custom Field' ); ?>" />
    24652464<?php wp_nonce_field( 'add-meta', '_ajax_nonce-add-meta', false ); ?>
    24662465</td></tr>
     
    25922591                $current = '';
    25932592
    2594             echo "\n\t<option class='level-$level' value='$item->ID'$current>$pad " . esc_html($item->post_title) . "</option>";
     2593            echo "\n\t<option class='level-$level' value='$item->ID'$current>$pad " . esc_html($item->post_title) . '</option>';
    25952594            parent_dropdown( $default, $item->ID, $level +1 );
    25962595        }
     
    26242623    <col class="widefat" />
    26252624    <tr>
    2626         <th scope="row"><?php _e( 'URL' ) ?></th>
     2625        <th scope="row"><?php _e( 'URL' ); ?></th>
    26272626        <td><textarea rows="1" cols="40" type="text" class="attachmentlinks" readonly="readonly"><?php echo wp_get_attachment_url(); ?></textarea></td>
    26282627    </tr>
     
    26302629    <tr>
    26312630        <th scope="row"><?php $thumb ? _e( 'Thumbnail linked to file' ) : _e( 'Image linked to file' ); ?></th>
    2632         <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>
     2631        <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>
    26332632    </tr>
    26342633    <tr>
    26352634        <th scope="row"><?php $thumb ? _e( 'Thumbnail linked to page' ) : _e( 'Image linked to page' ); ?></th>
    2636         <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>
     2635        <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>
    26372636    </tr>
    26382637<?php else : ?>
    26392638    <tr>
    2640         <th scope="row"><?php _e( 'Link to file' ) ?></th>
     2639        <th scope="row"><?php _e( 'Link to file' ); ?></th>
    26412640        <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>
    26422641    </tr>
    26432642    <tr>
    2644         <th scope="row"><?php _e( 'Link to page' ) ?></th>
    2645         <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>
     2643        <th scope="row"><?php _e( 'Link to page' ); ?></th>
     2644        <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>
    26462645    </tr>
    26472646<?php endif; ?>
     
    27822781
    27832782    foreach ( array_keys($wp_meta_boxes[$page]) as $a_context ) {
    2784     foreach ( array('high', 'core', 'default', 'low') as $a_priority ) {
    2785         if ( !isset($wp_meta_boxes[$page][$a_context][$a_priority][$id]) )
    2786             continue;
    2787 
    2788         // If a core box was previously added or removed by a plugin, don't add.
    2789         if ( 'core' == $priority ) {
    2790             // If core box previously deleted, don't add
    2791             if ( false === $wp_meta_boxes[$page][$a_context][$a_priority][$id] )
     2783        foreach ( array('high', 'core', 'default', 'low') as $a_priority ) {
     2784            if ( !isset($wp_meta_boxes[$page][$a_context][$a_priority][$id]) )
     2785                continue;
     2786   
     2787            // If a core box was previously added or removed by a plugin, don't add.
     2788            if ( 'core' == $priority ) {
     2789                // If core box previously deleted, don't add
     2790                if ( false === $wp_meta_boxes[$page][$a_context][$a_priority][$id] )
     2791                    return;
     2792                // If box was added with default priority, give it core priority to maintain sort order
     2793                if ( 'default' == $a_priority ) {
     2794                    $wp_meta_boxes[$page][$a_context]['core'][$id] = $wp_meta_boxes[$page][$a_context]['default'][$id];
     2795                    unset($wp_meta_boxes[$page][$a_context]['default'][$id]);
     2796                }
    27922797                return;
    2793             // If box was added with default priority, give it core priority to maintain sort order
    2794             if ( 'default' == $a_priority ) {
    2795                 $wp_meta_boxes[$page][$a_context]['core'][$id] = $wp_meta_boxes[$page][$a_context]['default'][$id];
    2796                 unset($wp_meta_boxes[$page][$a_context]['default'][$id]);
    27972798            }
    2798             return;
     2799            // If no priority given and id already present, use existing priority
     2800            if ( empty($priority) ) {
     2801                $priority = $a_priority;
     2802            // 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.
     2803            } elseif ( 'sorted' == $priority ) {
     2804                $title = $wp_meta_boxes[$page][$a_context][$a_priority][$id]['title'];
     2805                $callback = $wp_meta_boxes[$page][$a_context][$a_priority][$id]['callback'];
     2806                $callback_args = $wp_meta_boxes[$page][$a_context][$a_priority][$id]['args'];
     2807            }
     2808            // An id can be in only one priority and one context
     2809            if ( $priority != $a_priority || $context != $a_context )
     2810                unset($wp_meta_boxes[$page][$a_context][$a_priority][$id]);
    27992811        }
    2800         // If no priority given and id already present, use existing priority
    2801         if ( empty($priority) ) {
    2802             $priority = $a_priority;
    2803         // 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.
    2804         } elseif ( 'sorted' == $priority ) {
    2805             $title = $wp_meta_boxes[$page][$a_context][$a_priority][$id]['title'];
    2806             $callback = $wp_meta_boxes[$page][$a_context][$a_priority][$id]['callback'];
    2807             $callback_args = $wp_meta_boxes[$page][$a_context][$a_priority][$id]['args'];
    2808         }
    2809         // An id can be in only one priority and one context
    2810         if ( $priority != $a_priority || $context != $a_context )
    2811             unset($wp_meta_boxes[$page][$a_context][$a_priority][$id]);
    2812     }
    28132812    }
    28142813
     
    28742873    } while(0);
    28752874
    2876     echo "</div>";
     2875    echo '</div>';
    28772876
    28782877    return $i;
     
    31553154 * @return array Array of settings errors
    31563155 */
    3157 function get_settings_errors( $setting = '', $sanitize = FALSE ) {
     3156function get_settings_errors( $setting = '', $sanitize = false ) {
    31583157    global $wp_settings_errors;
    31593158
     
    32063205 * @return <type>
    32073206 */
    3208 function settings_errors ( $setting = '', $sanitize = FALSE, $hide_on_update = FALSE ) {
    3209 
    3210     if ($hide_on_update AND $_GET['updated']) return;
     3207function settings_errors( $setting = '', $sanitize = false, $hide_on_update = false ) {
     3208
     3209    if ( $hide_on_update && !empty($_GET['updated']) )
     3210        return;
    32113211
    32123212    $settings_errors = get_settings_errors( $setting, $sanitize );
    32133213
    3214     if ( !is_array($settings_errors) ) return;
    3215 
    3216     $output = '';
     3214    if ( !is_array($settings_errors) )
     3215        return;
     3216
    32173217    foreach ( $settings_errors as $key => $details ) {
    32183218        $css_id = 'setting-error-' . $details['code'];
    32193219        $css_class = $details['type'] . ' settings-error';
    3220         $output .= "<div id='$css_id' class='$css_class'> \n";
    3221         $output .= "<p><strong>{$details['message']}</strong></p>";
    3222         $output .= "</div> \n";
    3223     }
    3224     echo $output;
     3220        echo "<div id='$css_id' class='$css_class'>\n";
     3221        echo "<p><strong>{$details['message']}</strong></p>";
     3222        echo "</div>\n";
     3223    }
    32253224}
    32263225
     
    32743273                <label class="screen-reader-text" for="find-posts-input"><?php _e( 'Search' ); ?></label>
    32753274                <input type="text" id="find-posts-input" name="ps" value="" />
    3276                 <input type="button" onclick="findPosts.send();" value="<?php esc_attr_e( 'Search' ); ?>" class="button" /><br />
     3275                <input type="button" onClick="findPosts.send();" value="<?php esc_attr_e( 'Search' ); ?>" class="button" /><br />
    32773276
    32783277                <?php
     
    32823281                        continue;
    32833282                ?>
    3284                 <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'); ?> />
     3283                <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'); ?> />
    32853284                <label for="find-posts-<?php echo esc_attr($post->name); ?>"><?php echo $post->label; ?></label>
    32863285                <?php
     
    32903289        </div>
    32913290        <div class="find-box-buttons">
    3292             <input type="button" class="button alignleft" onclick="findPosts.close();" value="<?php esc_attr_e('Close'); ?>" />
     3291            <input type="button" class="button alignleft" onClick="findPosts.close();" value="<?php esc_attr_e('Close'); ?>" />
    32933292            <input id="find-posts-submit" type="submit" class="button-primary alignright" value="<?php esc_attr_e('Select'); ?>" />
    32943293        </div>
     
    33083307function the_post_password() {
    33093308    global $post;
    3310     if ( isset( $post->post_password ) ) echo esc_attr( $post->post_password );
     3309    if ( isset( $post->post_password ) )
     3310        echo esc_attr( $post->post_password );
    33113311}
    33123312
     
    34013401    array_shift($allowed_actions);
    34023402
    3403     foreach ( $allowed_actions as $action => $label) {
     3403    foreach ( $allowed_actions as $action => $label ) {
    34043404        echo "<div class='favorite-action'><a href='$action'>";
    34053405        echo $label;
     
    34373437 */
    34383438function _admin_search_query() {
    3439     echo isset($_GET['s']) ? esc_attr( stripslashes( $_GET['s'] ) ) : '';
     3439    if ( isset($_GET['s']) )
     3440        echo esc_attr( stripslashes( $_GET['s'] ) );
    34403441}
    34413442
     
    34493450 */
    34503451function iframe_header( $title = '', $limit_styles = false ) {
    3451 global $hook_suffix;
    3452 ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     3452    global $hook_suffix;
     3453?>
     3454<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    34533455<html xmlns="http://www.w3.org/1999/xhtml" <?php do_action('admin_xml_ns'); ?> <?php language_attributes(); ?>>
    34543456<head>
    34553457<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
    3456 <title><?php bloginfo('name') ?> &rsaquo; <?php echo $title ?> &#8212; <?php _e('WordPress'); ?></title>
     3458<title><?php bloginfo('name'); ?> &rsaquo; <?php echo $title; ?> &#8212; <?php _e('WordPress'); ?></title>
    34573459<?php
    3458 wp_enqueue_style( 'global' );
    3459 if ( ! $limit_styles )
    3460     wp_enqueue_style( 'wp-admin' );
    3461 wp_enqueue_style( 'colors' );
     3460    wp_enqueue_style( 'global' );
     3461    if ( ! $limit_styles )
     3462        wp_enqueue_style( 'wp-admin' );
     3463    wp_enqueue_style( 'colors' );
    34623464?>
    34633465<script type="text/javascript">
     
    34683470</script>
    34693471<?php
    3470 do_action('admin_print_styles');
    3471 do_action('admin_print_scripts');
    3472 do_action('admin_head');
    3473 
    3474 $admin_body_class = preg_replace('/[^a-z0-9_-]+/i', '-', $hook_suffix);
     3472    do_action('admin_print_styles');
     3473    do_action('admin_print_scripts');
     3474    do_action('admin_head');
     3475   
     3476    $admin_body_class = preg_replace('/[^a-z0-9_-]+/i', '-', $hook_suffix);
    34753477?>
    34763478</head>
    3477 <body<?php if ( isset($GLOBALS['body_id']) ) echo ' id="' . $GLOBALS['body_id'] . '"'; ?>  class="no-js <?php echo $admin_body_class; ?>">
     3479<body<?php if ( isset($GLOBALS['body_id']) ) echo ' id="' . $GLOBALS['body_id'] . '"'; ?> class="no-js <?php echo $admin_body_class; ?>">
    34783480<script type="text/javascript">
    34793481//<![CDATA[
     
    35883590            break;
    35893591    }
    3590     if( ! empty( $settings ) )
     3592    if ( ! empty( $settings ) )
    35913593        $show_screen = true;
    35923594?>
     
    35963598    <form id="adv-settings" action="" method="post">
    35973599    <?php if ( isset($wp_meta_boxes[$screen->id]) ) : ?>
    3598         <h5><?php _ex('Show on screen', 'Metaboxes') ?></h5>
     3600        <h5><?php _ex('Show on screen', 'Metaboxes'); ?></h5>
    35993601        <div class="metabox-prefs">
    36003602            <?php meta_box_prefs($screen); ?>
     
    36033605        <?php endif;
    36043606        if ( ! empty($column_screens) ) : ?>
    3605         <h5><?php echo ( isset( $column_screens['_title'] ) ?  $column_screens['_title'] :  _x('Show on screen', 'Columns') ) ?></h5>
     3607        <h5><?php echo ( isset( $column_screens['_title'] ) ? $column_screens['_title'] : _x('Show on screen', 'Columns') ); ?></h5>
    36063608        <div class="metabox-prefs">
    36073609            <?php manage_columns_prefs($screen); ?>
     
    36133615    if ( !empty( $screen_options ) ) {
    36143616        ?>
    3615         <h5><?php _ex('Show on screen', 'Screen Options') ?></h5>
     3617        <h5><?php _ex('Show on screen', 'Screen Options'); ?></h5>
    36163618        <?php
    36173619    }
     
    36473649<div id="screen-meta-links">
    36483650<div id="contextual-help-link-wrap" class="hide-if-no-js screen-meta-toggle">
    3649 <a href="#contextual-help" id="contextual-help-link" class="show-settings"><?php _e('Help') ?></a>
     3651<a href="#contextual-help" id="contextual-help-link" class="show-settings"><?php _e('Help'); ?></a>
    36503652</div>
    36513653<?php if ( $show_screen ) { ?>
    36523654<div id="screen-options-link-wrap" class="hide-if-no-js screen-meta-toggle">
    3653 <a href="#screen-options" id="show-settings-link" class="show-settings"><?php _e('Screen Options') ?></a>
     3655<a href="#screen-options" id="show-settings-link" class="show-settings"><?php _e('Screen Options'); ?></a>
    36543656</div>
    36553657<?php } ?>
     
    36643666 * @since 2.7.0
    36653667 *
    3666  * @param string $screen The handle for the screen to add help to.  This is usually the hook name returned by the add_*_page() functions.
     3668 * @param string $screen The handle for the screen to add help to. This is usually the hook name returned by the add_*_page() functions.
    36673669 * @param string $help Arbitrary help text
    36683670 */
     
    37193721
    37203722    if ( ! $screen_layout_columns )
    3721             $screen_layout_columns = 2;
     3723        $screen_layout_columns = 2;
    37223724
    37233725    $i = 1;
     
    38963898 * @param string $id Screen id, optional.
    38973899 */
    3898 function set_current_screen( $id =  '' ) {
     3900function set_current_screen( $id = '' ) {
    38993901    global $current_screen, $hook_suffix, $typenow, $taxnow;
    39003902
Note: See TracChangeset for help on using the changeset viewer.