WordPress.org

Make WordPress Core

Ticket #7552: removeh2.patch

File removeh2.patch, 22.9 KB (added by Viper007Bond, 6 years ago)

Remove most <h2>'s, theme-editor.php still needs attention

  • wp-admin/categories.php

     
    7878break; 
    7979case 'edit': 
    8080 
     81        $title = __('Edit Category'); 
     82 
    8183        require_once ('admin-header.php'); 
    8284        $cat_ID = (int) $_GET['cat_ID']; 
    8385        $category = get_category_to_edit($cat_ID); 
     
    140142 
    141143<div class="wrap"> 
    142144 
    143         <h2><?php printf( current_user_can('manage_categories') ? __('Categories (<a href="%s">Add New</a>)') : __('Manage Tags'), '#addcat' ); ?></h2> 
    144  
    145145<form id="posts-filter" action="" method="get"> 
    146146<div class="tablenav"> 
    147147 
  • wp-admin/edit-category-form.php

     
    1616        /** 
    1717         * @var string 
    1818         */ 
    19         $heading = __('Edit Category'); 
     19        $heading = ''; 
    2020        $submit_text = __('Edit Category'); 
    2121        $form = '<form name="editcat" id="editcat" method="post" action="categories.php" class="validate">'; 
    2222        $action = 'editedcat'; 
    2323        $nonce_action = 'update-category_' . $cat_ID; 
    2424        do_action('edit_category_form_pre', $category); 
    2525} else { 
    26         $heading = __('Add Category'); 
     26        $heading = '<h2>' . __('Add Category') . '</h2>'; 
    2727        $submit_text = __('Add Category'); 
    2828        $form = '<form name="addcat" id="addcat" method="post" action="categories.php" class="add:the-list: validate">'; 
    2929        $action = 'addcat'; 
     
    5656?> 
    5757 
    5858<div class="wrap"> 
    59 <h2><?php echo $heading ?></h2> 
     59<?php echo $heading ?> 
    6060<div id="ajax-response"></div> 
    6161<?php echo $form ?> 
    6262<input type="hidden" name="action" value="<?php echo $action ?>" /> 
  • wp-admin/edit-comments.php

     
    123123 
    124124<div class="wrap"> 
    125125 
    126 <h2><?php _e('Manage Comments'); ?></h2> 
    127  
    128126<ul class="subsubsub"> 
    129127<?php 
    130128$status_links = array(); 
  • wp-admin/edit-form-advanced.php

     
    426426 
    427427<div class="wrap"> 
    428428 
    429 <h2><?php 
    430         if ( !isset($post_ID) || 0 == $post_ID) 
    431                 printf( __( '<a href="%s">Posts</a> / Write New Post' ), 'edit.php' ); 
    432         else 
    433                 printf( __( '<a href="%s">Posts</a> / Edit Post' ), 'edit.php' ); 
    434 ?></h2> 
    435  
    436429<form name="post" action="post.php" method="post" id="post"> 
    437430<?php 
    438431 
  • wp-admin/edit-form-comment.php

     
    1818<form name="post" action="comment.php" method="post" id="post"> 
    1919<?php wp_nonce_field('update-comment_' . $comment->comment_ID) ?> 
    2020<div class="wrap"> 
    21 <h2><?php echo $toprow_title; ?></h2> 
    2221 
    2322<div id="poststuff"> 
    2423<input type="hidden" name="user_ID" value="<?php echo (int) $user_ID ?>" /> 
  • wp-admin/edit-link-categories.php

     
    7878 
    7979<div class="wrap"> 
    8080 
    81         <h2><?php printf( current_user_can('manage_categories') ? __('Link Categories (<a href="%s">Add New</a>)') : __('Manage Tags'), '#addcat' ); ?></h2> 
    82  
    8381<form id="posts-filter" action="" method="get"> 
    8482<div class="tablenav"> 
    8583 
  • wp-admin/edit-link-category-form.php

     
    1616        /** 
    1717         * @var string 
    1818         */ 
    19         $heading = __('Edit Category'); 
     19        $heading = ''; 
    2020        $submit_text = __('Edit Category'); 
    2121        $form = '<form name="editcat" id="editcat" method="post" action="link-category.php" class="validate">'; 
    2222        $action = 'editedcat'; 
    2323        $nonce_action = 'update-link-category_' . $cat_ID; 
    2424        do_action('edit_link_category_form_pre', $category); 
    2525} else { 
    26         $heading = __('Add Category'); 
     26        $heading = '<h2>' . __('Add Category') . '</h2>'; 
    2727        $submit_text = __('Add Category'); 
    2828        $form = '<form name="addcat" id="addcat" class="add:the-list: validate" method="post" action="link-category.php">'; 
    2929        $action = 'addcat'; 
     
    5353?> 
    5454 
    5555<div class="wrap"> 
    56 <h2><?php echo $heading ?></h2> 
     56<?php echo $heading ?> 
    5757<div id="ajax-response"></div> 
    5858<?php echo $form ?> 
    5959<input type="hidden" name="action" value="<?php echo $action ?>" /> 
  • wp-admin/edit-link-form.php

     
    278278 
    279279<div class="wrap"> 
    280280 
    281 <h2><?php echo $heading; ?></h2> 
    282  
    283281<!-- 
    284282<p id="big-add-button"> 
    285283<span id="previewview"> 
  • wp-admin/edit-page-form.php

     
    292292 
    293293<div class="wrap"> 
    294294 
    295 <h2><?php 
    296         if ( !isset($post_ID) || 0 == $post_ID ) 
    297                 printf( __( '<a href="%s">Pages</a> / Write New Page' ), 'edit-pages.php' ); 
    298         else 
    299                 printf( __( '<a href="%s">Pages</a> / Edit Page' ), 'edit-pages.php' ); 
    300 ?></h2> 
    301  
    302295<form name="post" action="page.php" method="post" id="post"> 
    303296<?php if ( $notice ) : ?> 
    304297<div id="notice" class="error"><p><?php echo $notice ?></p></div> 
  • wp-admin/edit-pages.php

     
    130130<?php $_SERVER['REQUEST_URI'] = remove_query_arg(array('posted'), $_SERVER['REQUEST_URI']); 
    131131endif; ?> 
    132132 
    133 <h2><?php 
    134 // Use $_GET instead of is_ since they can override each other 
    135 $h2_search = isset($_GET['s']) && $_GET['s'] ? ' ' . sprintf(__('matching &#8220;%s&#8221;'), wp_specialchars( stripslashes( $_GET['s'] ) ) ) : ''; 
    136 $h2_author = ''; 
    137 if ( isset($_GET['author']) && $_GET['author'] ) { 
    138         $author_user = get_userdata( (int) $_GET['author'] ); 
    139         $h2_author = ' ' . sprintf(__('by %s'), wp_specialchars( $author_user->display_name )); 
    140 } 
    141 printf( _c( '%1$s%2$s%3$s (<a href="%4$s">Add New</a>)|You can reorder these: 1: Pages, 2: by {s}, 3: matching {s}' ), $post_status_label, $h2_author, $h2_search, 'page-new.php' ); 
    142 ?></h2> 
    143  
    144133<ul class="subsubsub"> 
    145134<?php 
    146135 
  • wp-admin/edit-tag-form.php

     
    1010        /** 
    1111         * @var string 
    1212         */ 
    13         $heading = __('Edit Tag'); 
     13        $heading = ''; 
    1414        $submit_text = __('Edit Tag'); 
    1515        $form = '<form name="edittag" id="edittag" method="post" action="edit-tags.php" class="validate">'; 
    1616        $action = 'editedtag'; 
    1717        $nonce_action = 'update-tag_' . $tag_ID; 
    1818        do_action('edit_tag_form_pre', $tag); 
    1919} else { 
    20         $heading = __('Add Tag'); 
     20        $heading = '<h2>' . __('Add Tag') . '</h2>'; 
    2121        $submit_text = __('Add Tag'); 
    2222        $form = '<form name="addtag" id="addtag" method="post" action="edit-tags.php" class="add:the-list: validate">'; 
    2323        $action = 'addtag'; 
     
    2727?> 
    2828 
    2929<div class="wrap"> 
    30 <h2><?php echo $heading ?></h2> 
     30<?php echo $heading ?> 
    3131<div id="ajax-response"></div> 
    3232<?php echo $form ?> 
    3333<input type="hidden" name="action" value="<?php echo $action ?>" /> 
  • wp-admin/edit-tags.php

     
    7272break; 
    7373 
    7474case 'edit': 
     75        $title = __('Edit Tag'); 
    7576 
    7677        require_once ('admin-header.php'); 
    7778        $tag_ID = (int) $_GET['tag_ID']; 
     
    144145 
    145146<div class="wrap"> 
    146147 
    147         <h2><?php printf( current_user_can('manage_categories') ? __('Tags (<a href="%s">Add New</a>)') : __('Manage Tags'), '#addtag' ); ?></h2> 
    148  
    149148<form id="posts-filter" action="" method="get"> 
    150149<div class="tablenav"> 
    151150 
  • wp-admin/edit.php

     
    120120 
    121121<div class="wrap"> 
    122122 
    123 <h2><?php 
    124 if ( is_single() ) { 
    125         printf(__('Comments on %s'), apply_filters( "the_title", $post->post_title)); 
    126 } else { 
    127         $post_status_label = _c('Posts|manage posts header'); 
    128         if ( isset($_GET['post_status']) && in_array( $_GET['post_status'], array_keys($post_stati) ) ) 
    129         $post_status_label = $post_stati[$_GET['post_status']][1]; 
    130         //TODO: Unreachable code: $post_listing_pageable is undefined, Similar code in upload.php 
    131         //if ( $post_listing_pageable && !is_archive() && !is_search() ) 
    132         //      $h2_noun = is_paged() ? sprintf(__( 'Previous %s' ), $post_status_label) : sprintf(__('Latest %s'), $post_status_label); 
    133         //else 
    134                 $h2_noun = $post_status_label; 
    135         // Use $_GET instead of is_ since they can override each other 
    136         $h2_author = ''; 
    137         $_GET['author'] = isset($_GET['author']) ? (int) $_GET['author'] : 0; 
    138         if ( $_GET['author'] != 0 ) { 
    139                 if ( $_GET['author'] == '-' . $user_ID ) { // author exclusion 
    140                         $h2_author = ' ' . __('by other authors'); 
    141                 } else { 
    142                         $author_user = get_userdata( get_query_var( 'author' ) ); 
    143                         $h2_author = ' ' . sprintf(__('by %s'), wp_specialchars( $author_user->display_name )); 
    144                 } 
    145         } 
    146         $h2_search = isset($_GET['s'])   && $_GET['s']   ? ' ' . sprintf(__('matching &#8220;%s&#8221;'), wp_specialchars( get_search_query() ) ) : ''; 
    147         $h2_cat    = isset($_GET['cat']) && $_GET['cat'] ? ' ' . sprintf( __('in &#8220;%s&#8221;'), single_cat_title('', false) ) : ''; 
    148         $h2_tag    = isset($_GET['tag']) && $_GET['tag'] ? ' ' . sprintf( __('tagged with &#8220;%s&#8221;'), single_tag_title('', false) ) : ''; 
    149         $h2_month  = isset($_GET['m'])   && $_GET['m']   ? ' ' . sprintf( __('during %s'), single_month_title(' ', false) ) : ''; 
    150         printf( _c( '%1$s%2$s%3$s%4$s%5$s%6$s (<a href="%7$s">Add New</a>)|You can reorder these: 1: Posts, 2: by {s}, 3: matching {s}, 4: in {s}, 5: tagged with {s}, 6: during {s}' ), $h2_noun, $h2_author, $h2_search, $h2_cat, $h2_tag, $h2_month, 'post-new.php' ); 
    151 } 
    152 ?></h2> 
    153  
    154123<ul class="subsubsub"> 
    155124<?php 
    156125if ( empty($locked_post_status) ) : 
  • wp-admin/export.php

     
    2222?> 
    2323 
    2424<div class="wrap"> 
    25 <h2><?php _e('Export'); ?></h2> 
    2625<p><?php _e('When you click the button below WordPress will create an XML file for you to save to your computer.'); ?></p> 
    2726<p><?php _e('This format, which we call WordPress eXtended RSS or WXR, will contain your posts, pages, comments, custom fields, categories, and tags.'); ?></p> 
    2827<p><?php _e('Once you&#8217;ve saved the download file, you can use the Import function on another WordPress blog to import this blog.'); ?></p> 
  • wp-admin/import.php

     
    1313?> 
    1414 
    1515<div class="wrap"> 
    16 <h2><?php _e('Import'); ?></h2> 
    1716<p><?php _e('If you have posts or comments in another system, WordPress can import those into this blog. To get started, choose a system to import from below:'); ?></p> 
    1817 
    1918<?php 
  • wp-admin/inbox.php

     
    2121?> 
    2222<div class="wrap"> 
    2323<form id="inbox-filter" action="" method="get"> 
    24 <h2><?php _e('Inbox'); ?></h2> 
    2524<ul class="subsubsub"> 
    2625<li><a href="#" class="current"><?php _e('Messages') ?></a> | </li><li><a href="#"><?php echo sprintf(__('Archived') . ' (%s)', '42'); ?></a></li> 
    2726</ul> 
  • wp-admin/link-category.php

     
    6161break; 
    6262 
    6363case 'edit': 
    64         $title = __('Categories'); 
     64        $title = __('Edit Category'); 
    6565        $parent_file = 'edit.php'; 
    6666        $submenu_file = 'edit-link-categories.php'; 
    6767        require_once ('admin-header.php'); 
  • wp-admin/link-manager.php

     
    9999 
    100100<div class="wrap"> 
    101101 
    102 <h2><?php printf( __('Links (<a href="%s">Add New</a>)' ), 'link-add.php' ); ?></h2> 
    103  
    104102<form id="list-filter" action="" method="get"> 
    105103<?php 
    106104$categories = get_terms('link_category', "hide_empty=1"); 
  • wp-admin/media-upload.php

     
    5656        $parent_file = 'edit.php'; 
    5757        require_once('admin-header.php'); ?> 
    5858        <div class="wrap"> 
    59         <h2><?php _e('Upload Media') ?></h2> 
    6059 
    6160        <form enctype="multipart/form-data" method="post" action="media-upload.php?inline=&upload-page-form=" class="media-upload-form type-form validate" id="file-form"> 
    6261         
  • wp-admin/options-discussion.php

     
    1616?> 
    1717 
    1818<div class="wrap"> 
    19 <h2><?php _e('Discussion Settings') ?></h2> 
    2019<form method="post" action="options.php"> 
    2120<input type='hidden' name='option_page' value='discussion' /> 
    2221<?php wp_nonce_field('discussion-options') ?> 
  • wp-admin/options-general.php

     
    1616?> 
    1717 
    1818<div class="wrap"> 
    19 <h2><?php _e('General Settings') ?></h2> 
    2019<form method="post" action="options.php"> 
    2120<?php wp_nonce_field('general-options') ?> 
    2221<input type='hidden' name='option_page' value='general' /> 
  • wp-admin/options-media.php

     
    1818 
    1919<div class="wrap"> 
    2020 
    21 <h2><?php _e('Media Settings') ?></h2> 
    2221<form action="options.php" method="post"> 
    2322<p><?php _e('The setting below determines where images, documents, and other media files will be linked to when inserted into the body of a post.'); ?></p> 
    2423 
  • wp-admin/options-misc.php

     
    1717?> 
    1818 
    1919<div class="wrap"> 
    20 <h2><?php _e('Miscellaneous Settings') ?></h2> 
    2120<form method="post" action="options.php"> 
    2221<input type='hidden' name='option_page' value='misc' /> 
    2322<?php wp_nonce_field('misc-options') ?> 
  • wp-admin/options-permalink.php

     
    123123<?php endif; ?> 
    124124 
    125125<div class="wrap"> 
    126   <h2><?php _e('Customize Permalink Structure') ?></h2> 
    127126<form name="form" action="options-permalink.php" method="post"> 
    128127<?php wp_nonce_field('update-permalink') ?> 
    129128  <p><?php _e('By default WordPress uses web <abbr title="Universal Resource Locator">URL</abbr>s which have question marks and lots of numbers in them, however WordPress offers you the ability to create a custom URL structure for your permalinks and archives. This can improve the aesthetics, usability, and forward-compatibility of your links. A <a href="http://codex.wordpress.org/Using_Permalinks">number of tags are available</a>, and here are some examples to get you started.'); ?></p> 
  • wp-admin/options-privacy.php

     
    1616?> 
    1717 
    1818<div class="wrap"> 
    19 <h2><?php _e('Privacy Settings') ?></h2> 
    2019<form method="post" action="options.php"> 
    2120<?php wp_nonce_field('privacy-options') ?> 
    2221<input type='hidden' name='option_page' value='privacy' /> 
  • wp-admin/options-reading.php

     
    1616?> 
    1717 
    1818<div class="wrap"> 
    19 <h2><?php _e('Reading Settings') ?></h2> 
    2019<form name="form1" method="post" action="options.php"> 
    2120<?php wp_nonce_field('reading-options') ?> 
    2221<input type='hidden' name='option_page' value='reading' /> 
  • wp-admin/options-writing.php

     
    1616?> 
    1717 
    1818<div class="wrap"> 
    19 <h2><?php _e('Writing Settings') ?></h2> 
    2019<form method="post" action="options.php"> 
    2120<?php wp_nonce_field('writing-options') ?> 
    2221<input type='hidden' name='option_page' value='writing' /> 
  • wp-admin/page.php

     
    8282        break; 
    8383 
    8484case 'edit': 
    85         $title = __('Edit'); 
     85        $title = __('Edit Page'); 
    8686        $editing = true; 
    8787        $page_ID = $post_ID = $p = (int) $_GET['post']; 
    8888        $post = get_post_to_edit($page_ID); 
  • wp-admin/plugin-editor.php

     
    9696</div> 
    9797<?php endif; ?> 
    9898<div class="wrap"> 
    99 <div class="bordertitle"> 
    100         <h2><?php _e('Plugin Editor'); ?></h2> 
    101 </div> 
    10299<div class="tablenav"> 
    103100<div class="alignleft"> 
    104101<big><?php 
  • wp-admin/plugin-install.php

     
    4848include('admin-header.php'); 
    4949?> 
    5050<div class="wrap"> 
    51         <h2><?php _e('Install Plugins') ?></h2> 
    5251        <ul class="subsubsub"> 
    5352<?php 
    5453$display_tabs = array(); 
  • wp-admin/plugins.php

     
    203203<?php endif; ?> 
    204204 
    205205<div class="wrap"> 
    206 <h2><?php _e('Plugin Management'); ?></h2> 
    207206<p><?php _e('Plugins extend and expand the functionality of WordPress. Once a plugin is installed, you may activate it or deactivate it here.'); ?></p> 
    208207<?php 
    209208 
  • wp-admin/upload.php

     
    187187 
    188188<div class="wrap"> 
    189189 
    190 <h2><?php 
    191 if ( isset($_GET['detached']) ) { 
    192         _e('Unattached Media'); 
    193 } elseif ( is_singular() ) { 
    194         printf( __('Comments on %s'), apply_filters("the_title", $post->post_title) ); 
    195 } else { 
    196         $post_mime_type_label = _c('Media|manage media header'); 
    197         if ( isset($_GET['post_mime_type']) && in_array( $_GET['post_mime_type'], array_keys($post_mime_types) ) ) 
    198         $post_mime_type_label = $post_mime_types[$_GET['post_mime_type']][1]; 
    199         //TODO: Unreachable code: $post_listing_pageable is undefined, Similar code in edit.php 
    200         //if ( $post_listing_pageable && !is_archive() && !is_search() ) 
    201         //      $h2_noun = is_paged() ? sprintf(__( 'Previous %s' ), $post_mime_type_label) : sprintf(__('Latest %s'), $post_mime_type_label); 
    202         //else 
    203                 $h2_noun = $post_mime_type_label; 
    204         // Use $_GET instead of is_ since they can override each other 
    205         $h2_author = ''; 
    206         $_GET['author'] = isset( $_GET['author'] ) ? (int) $_GET['author'] : 0; 
    207         if ( $_GET['author'] != 0 ) { 
    208                 if ( $_GET['author'] == '-' . $user_ID ) { // author exclusion 
    209                         $h2_author = ' ' . __('by other authors'); 
    210                 } else { 
    211                         $author_user = get_userdata( get_query_var( 'author' ) ); 
    212                         $h2_author = ' ' . sprintf(__('by %s'), wp_specialchars( $author_user->display_name )); 
    213                 } 
    214         } 
    215         $h2_search = isset($_GET['s'])   && $_GET['s']   ? ' ' . sprintf(__('matching &#8220;%s&#8221;'), wp_specialchars( get_search_query() ) ) : ''; 
    216         $h2_cat    = isset($_GET['cat']) && $_GET['cat'] ? ' ' . sprintf( __('in &#8220;%s&#8221;'), single_cat_title('', false) ) : ''; 
    217         $h2_tag    = isset($_GET['tag']) && $_GET['tag'] ? ' ' . sprintf( __('tagged with &#8220;%s&#8221;'), single_tag_title('', false) ) : ''; 
    218         $h2_month  = isset($_GET['m'])   && $_GET['m']   ? ' ' . sprintf( __('during %s'), single_month_title(' ', false) ) : ''; 
    219         printf( _c( '%1$s%2$s%3$s%4$s%5$s%6$s (<a href="%7$s">Add New</a>)|You can reorder these: 1: Posts, 2: by {s}, 3: matching {s}, 4: in {s}, 5: tagged with {s}, 6: during {s}' ), $h2_noun, $h2_author, $h2_search, $h2_cat, $h2_tag, $h2_month, 'media-upload.php?inline' ); 
    220 } 
    221 ?></h2> 
    222  
    223190<ul class="subsubsub"> 
    224191<?php 
    225192$type_links = array(); 
  • wp-admin/user-edit.php

     
    169169<?php endif; ?> 
    170170 
    171171<div class="wrap" id="profile-page"> 
    172 <h2><?php $is_profile_page? _e('Your Profile and Personal Options') : _e('Edit User'); ?></h2> 
    173172 
    174173<form id="your-profile" action="" method="post"> 
    175174<?php wp_nonce_field('update-user_' . $user_id) ?> 
  • wp-admin/users.php

     
    271271<form id="posts-filter" action="" method="get"> 
    272272        <?php if ( $wp_user_search->is_search() ) : ?> 
    273273                <h2><?php printf( current_user_can('create_users') ? __('Users Matching "%2$s" (<a href="%1$s">Add New</a>)') : __('Add New'), '#add-new-user', wp_specialchars($wp_user_search->search_term) ); ?></h2> 
    274         <?php else : ?> 
    275                 <h2><?php printf( current_user_can('create_users') ? __('Users (<a href="%s">Add New</a>)') : __('Add New'), '#add-new-user' ); ?></h2> 
    276274        <?php endif; ?> 
    277275 
    278276<ul class="subsubsub"> 
  • wp-admin/wp-admin.css

     
    25072507#favorite-first { 
    25082508        padding-right: 22px; 
    25092509        background: url(images/menu-open.png) 108px 5px no-repeat; 
    2510 } 
     2510} 
     2511 No newline at end of file 
  • wp-content/themes/default/functions.php

     
    364364?> 
    365365<div class='wrap'> 
    366366        <div id="kubrick-header"> 
    367         <h2><?php _e('Header Image and Color'); ?></h2> 
    368367                <div id="headwrap"> 
    369368                        <div id="header"> 
    370369                                <div id="headerimg">