Changeset 36302
- Timestamp:
- 01/14/2016 08:05:06 PM (9 years ago)
- Location:
- trunk/src/wp-admin
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/edit-comments.php
r35549 r36302 192 192 } 193 193 194 if ( isset($_REQUEST['s']) && $_REQUEST['s']) {194 if ( isset($_REQUEST['s']) && strlen( $_REQUEST['s'] ) ) { 195 195 echo '<span class="subtitle">'; 196 196 /* translators: %s: search keywords */ -
trunk/src/wp-admin/edit-tags.php
r35875 r36302 312 312 <div class="wrap nosubsub"> 313 313 <h1><?php echo esc_html( $title ); 314 if ( !empty($_REQUEST['s']) ) 315 printf( '<span class="subtitle">' . __('Search results for “%s”') . '</span>', esc_html( wp_unslash($_REQUEST['s']) ) ); ?> 314 if ( isset( $_REQUEST['s'] ) && strlen( $_REQUEST['s'] ) ) { 315 /* translators: %s: search keywords */ 316 printf( '<span class="subtitle">' . __( 'Search results for “%s”' ) . '</span>', esc_html( wp_unslash( $_REQUEST['s'] ) ) ); 317 } 318 ?> 316 319 </h1> 317 320 -
trunk/src/wp-admin/edit.php
r35376 r36302 304 304 if ( current_user_can( $post_type_object->cap->create_posts ) ) 305 305 echo ' <a href="' . esc_url( admin_url( $post_new_file ) ) . '" class="page-title-action">' . esc_html( $post_type_object->labels->add_new ) . '</a>'; 306 if ( ! empty( $_REQUEST['s'] ) ) 307 printf( ' <span class="subtitle">' . __('Search results for “%s”') . '</span>', get_search_query() ); 306 307 if ( isset( $_REQUEST['s'] ) && strlen( $_REQUEST['s'] ) ) { 308 /* translators: %s: search keywords */ 309 printf( ' <span class="subtitle">' . __( 'Search results for “%s”' ) . '</span>', get_search_query() ); 310 } 308 311 ?></h1> 309 312 -
trunk/src/wp-admin/includes/class-wp-plugins-list-table.php
r36301 r36302 76 76 global $status, $plugins, $totals, $page, $orderby, $order, $s; 77 77 78 wp_reset_vars( array( 'orderby', 'order' , 's') );78 wp_reset_vars( array( 'orderby', 'order' ) ); 79 79 80 80 /** … … 225 225 } 226 226 227 if ( $s) {227 if ( strlen( $s ) ) { 228 228 $status = 'search'; 229 229 $plugins['search'] = array_filter( $plugins['all'], array( $this, '_search_callback' ) ); … … 269 269 270 270 /** 271 * @staticvar string $term 271 * @global string $s 272 * 272 273 * @param array $plugin 273 274 * @return bool 274 275 */ 275 276 public function _search_callback( $plugin ) { 276 static $term = null; 277 if ( is_null( $term ) ) 278 $term = wp_unslash( $_REQUEST['s'] ); 277 global $s; 279 278 280 279 foreach ( $plugin as $value ) { 281 if ( is_string( $value ) && false !== stripos( strip_tags( $value ), $ term) ) {280 if ( is_string( $value ) && false !== stripos( strip_tags( $value ), $s ) ) { 282 281 return true; 283 282 } -
trunk/src/wp-admin/link-manager.php
r34891 r36302 75 75 <div class="wrap nosubsub"> 76 76 <h1><?php echo esc_html( $title ); ?> <a href="link-add.php" class="page-title-action"><?php echo esc_html_x('Add New', 'link'); ?></a> <?php 77 if ( !empty($_REQUEST['s']) ) 78 printf( '<span class="subtitle">' . __('Search results for “%s”') . '</span>', esc_html( wp_unslash($_REQUEST['s']) ) ); ?> 77 if ( isset( $_REQUEST['s'] ) && strlen( $_REQUEST['s'] ) ) { 78 /* translators: %s: search keywords */ 79 printf( '<span class="subtitle">' . __( 'Search results for “%s”' ) . '</span>', esc_html( wp_unslash( $_REQUEST['s'] ) ) ); 80 } 81 ?> 79 82 </h1> 80 83 -
trunk/src/wp-admin/network/sites.php
r35917 r36302 289 289 <?php endif; ?> 290 290 291 <?php if ( isset( $_REQUEST['s'] ) && $_REQUEST['s'] ) { 291 <?php 292 if ( isset( $_REQUEST['s'] ) && strlen( $_REQUEST['s'] ) ) { 293 /* translators: %s: search keywords */ 292 294 printf( '<span class="subtitle">' . __( 'Search results for “%s”' ) . '</span>', esc_html( $s ) ); 293 295 } ?> -
trunk/src/wp-admin/network/themes.php
r35997 r36302 240 240 <div class="wrap"> 241 241 <h1><?php echo esc_html( $title ); if ( current_user_can('install_themes') ) { ?> <a href="theme-install.php" class="page-title-action"><?php echo esc_html_x('Add New', 'theme'); ?></a><?php } 242 if ( $s ) 243 printf( '<span class="subtitle">' . __('Search results for “%s”') . '</span>', esc_html( $s ) ); ?> 242 if ( isset( $_REQUEST['s'] ) && strlen( $_REQUEST['s'] ) ) { 243 /* translators: %s: search keywords */ 244 printf( '<span class="subtitle">' . __( 'Search results for “%s”' ) . '</span>', esc_html( $s ) ); 245 } 246 ?> 244 247 </h1> 245 248 -
trunk/src/wp-admin/network/users.php
r34891 r36302 213 213 endif; 214 214 215 if ( !empty( $usersearch ) ) 216 printf( '<span class="subtitle">' . __( 'Search results for “%s”' ) . '</span>', esc_html( $usersearch ) ); 215 if ( strlen( $usersearch ) ) { 216 /* translators: %s: search keywords */ 217 printf( '<span class="subtitle">' . __( 'Search results for “%s”' ) . '</span>', esc_html( $usersearch ) ); 218 } 217 219 ?> 218 220 </h1> -
trunk/src/wp-admin/plugins.php
r35997 r36302 482 482 if ( ( ! is_multisite() || is_network_admin() ) && current_user_can('install_plugins') ) { ?> 483 483 <a href="<?php echo self_admin_url( 'plugin-install.php' ); ?>" class="page-title-action"><?php echo esc_html_x('Add New', 'plugin'); ?></a> 484 <?php } 485 if ( $s ) 486 printf( '<span class="subtitle">' . __('Search results for “%s”') . '</span>', esc_html( $s ) ); ?> 484 <?php 485 } 486 487 if ( strlen( $s ) ) { 488 /* translators: %s: search keywords */ 489 printf( '<span class="subtitle">' . __( 'Search results for “%s”' ) . '</span>', esc_html( $s ) ); 490 } 491 ?> 487 492 </h1> 488 493 -
trunk/src/wp-admin/upload.php
r34891 r36302 221 221 <a href="media-new.php" class="page-title-action"><?php echo esc_html_x('Add New', 'file'); ?></a><?php 222 222 } 223 if ( ! empty( $_REQUEST['s'] ) ) 224 printf( '<span class="subtitle">' . __('Search results for “%s”') . '</span>', get_search_query() ); ?> 223 if ( isset( $_REQUEST['s'] ) && strlen( $_REQUEST['s'] ) ) { 224 /* translators: %s: search keywords */ 225 printf( '<span class="subtitle">' . __( 'Search results for “%s”' ) . '</span>', get_search_query() ); 226 } 227 ?> 225 228 </h1> 226 229 -
trunk/src/wp-admin/users.php
r36068 r36302 482 482 <?php } 483 483 484 if ( $usersearch ) 485 printf( '<span class="subtitle">' . __('Search results for “%s”') . '</span>', esc_html( $usersearch ) ); ?> 484 if ( strlen( $usersearch ) ) { 485 /* translators: %s: search keywords */ 486 printf( '<span class="subtitle">' . __( 'Search results for “%s”' ) . '</span>', esc_html( $usersearch ) ); 487 } 488 ?> 486 489 </h1> 487 490
Note: See TracChangeset
for help on using the changeset viewer.