Ticket #17324: h2-to-h1.diff
| File h2-to-h1.diff, 6.1 KB (added by , 15 years ago) |
|---|
-
wp-admin/includes/template.php
2141 2141 } 2142 2142 2143 2143 /** 2144 * Set an attribute for the current screen object 2145 * 2146 * @since 3.2.0 2147 * 2148 * @param string $key An attribute name 2149 * @param mixed $value Attribute value 2150 */ 2151 function set_screen_attribute( $key, $value ) { 2152 global $current_screen; 2153 2154 $current_screen->$key = $value; 2155 } 2156 2157 /** 2144 2158 * Echos a submit button, with provided text and appropriate class 2145 2159 * 2146 2160 * @since 3.1.0 -
wp-admin/edit-tags.php
221 221 unset($help); 222 222 } 223 223 224 set_screen_attribute( 'title', $title ); 225 226 if ( !empty($_REQUEST['s']) ) 227 set_screen_attribute( 'sub_title', sprintf( __( 'Search results for “%s”' ), esc_html( stripslashes($_REQUEST['s']) ) ) ); 228 224 229 require_once ('admin-header.php'); 225 230 226 231 if ( !current_user_can($tax->cap->edit_terms) ) … … 236 241 ?> 237 242 238 243 <div class="wrap nosubsub"> 239 <?php screen_icon(); ?>240 <h2><?php echo esc_html( $title );241 if ( !empty($_REQUEST['s']) )242 printf( '<span class="subtitle">' . __('Search results for “%s”') . '</span>', esc_html( stripslashes($_REQUEST['s']) ) ); ?>243 </h2>244 244 245 245 <?php if ( isset($_REQUEST['message']) && ( $msg = (int) $_REQUEST['message'] ) ) : ?> 246 246 <div id="message" class="updated"><p><?php echo $messages[$msg]; ?></p></div> -
wp-admin/options-general.php
74 74 ?> 75 75 76 76 <div class="wrap"> 77 <?php screen_icon(); ?>78 <h2><?php echo esc_html( $title ); ?></h2>79 77 80 78 <form method="post" action="options.php"> 81 79 <?php settings_fields('general'); ?> -
wp-admin/index.php
55 55 ?> 56 56 57 57 <div class="wrap"> 58 <?php screen_icon(); ?>59 <h2><?php60 echo esc_html( $title );61 favorite_actions( $current_screen ); ?>62 </h2>63 58 64 59 <div id="dashboard-widgets-wrap"> 65 60 -
wp-admin/edit-form-advanced.php
194 194 ?> 195 195 196 196 <div class="wrap"> 197 <?php screen_icon(); ?>198 <h2><?php echo esc_html( $title ); ?></h2>199 197 <?php if ( $notice ) : ?> 200 198 <div id="notice" class="error"><p><?php echo $notice ?></p></div> 201 199 <?php endif; ?> -
wp-admin/admin-header.php
10 10 if ( ! defined( 'WP_ADMIN' ) ) 11 11 require_once( './admin.php' ); 12 12 13 $current_screen->parent_file = $parent_file; 14 $current_screen->parent_base = preg_replace('/\?.*$/', '', $parent_file); 15 $current_screen->parent_base = str_replace('.php', '', $current_screen->parent_base); 16 13 17 get_admin_page_title(); 14 18 $title = esc_html( strip_tags( $title ) ); 15 19 … … 129 133 if ( strlen($blog_name) > 30 ) 130 134 $title_class = 'class="long-title"'; 131 135 } 136 137 $screen_icon = !empty( $current_screen->icon ) ? sanitize_key( $current_screen->icon ) : ''; 138 screen_icon(); 139 140 if ( !empty( $current_screen->title ) ) 141 $title = esc_html( strip_tags( $current_screen->title ) ); 132 142 ?> 133 134 <img id="header-logo" src="<?php echo esc_url( includes_url( 'images/blank.gif' ) ); ?>" alt="" width="16" height="16" />135 143 <h1 id="site-heading" <?php echo $title_class ?>> 136 <a href="<?php echo trailingslashit( get_bloginfo( 'url' ) ); ?>" title="<?php esc_attr_e('Visit Site') ?>"> 137 <span id="site-title"><?php echo $blog_name ?></span> 138 </a> 144 <?php echo $title; 145 if ( ! empty( $current_screen->sub_title ) ) 146 echo '<span class="subtitle">' . esc_html( strip_tags( $current_screen->sub_title ) ) . '</span>'; 147 ?> 139 148 </h1> 140 149 141 150 <?php … … 161 170 $links = array_map( 'trim', $links, array_fill( 0, count( $links ), " |\n\t" ) ); 162 171 $links = '<li>' . implode( '</li><li>', $links ) . '</li>'; 163 172 173 // Site greeting 174 $welcome = home_url(); 175 $welcome = preg_replace( '#^https?://#', '', $welcome ); 176 untrailingslashit( $welcome ); 177 178 $welcome = sprintf( __( 'Welcome to %s' ), '<a href="'. get_home_url() . '">' . esc_html( $welcome ) . '</a>' ); 164 179 ?> 165 180 166 181 <div id="wphead-info"> … … 171 186 <ul><?php echo $links; ?></ul> 172 187 </div></div> 173 188 </div> 189 <p><?php echo $welcome; ?></p> 174 190 </div> 175 191 </div> 176 192 … … 178 194 179 195 <div id="wpbody"> 180 196 <?php 181 unset($title_class, $blog_name, $total_update_count, $update_title );197 unset($title_class, $blog_name, $total_update_count, $update_title, $howdy, $welcome); 182 198 183 $current_screen->parent_file = $parent_file;184 $current_screen->parent_base = preg_replace('/\?.*$/', '', $parent_file);185 $current_screen->parent_base = str_replace('.php', '', $current_screen->parent_base);186 199 ?> 187 200 188 201 <div id="wpbody-content"> -
wp-admin/edit.php
186 186 187 187 add_screen_option( 'per_page', array('label' => $title, 'default' => 20) ); 188 188 189 set_screen_attribute( 'title', $title ); 190 191 if ( isset($_REQUEST['s']) && $_REQUEST['s'] ) 192 set_screen_attribute( 'sub_title', sprintf( __( 'Search results for “%s”' ), get_search_query() ) ); 193 189 194 require_once('./admin-header.php'); 190 195 ?> 191 196 <div class="wrap"> 192 <?php screen_icon(); ?>193 <h2><?php194 echo esc_html( $post_type_object->labels->name );195 favorite_actions( $current_screen );196 if ( isset($_REQUEST['s']) && $_REQUEST['s'] )197 printf( '<span class="subtitle">' . __('Search results for “%s”') . '</span>', get_search_query() ); ?>198 </h2>199 197 200 198 <?php 201 199 if ( isset($_REQUEST['posted']) && $_REQUEST['posted'] ) : $_REQUEST['posted'] = (int) $_REQUEST['posted']; ?>