Changeset 19063
- Timestamp:
- 10/25/2011 06:54:23 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/screen.php
r19054 r19063 402 402 $action = $post_type = $taxonomy = ''; 403 403 404 if ( $hook_name ) 405 $id = $hook_name; 406 else 407 $id = $GLOBALS['hook_suffix']; 408 409 $id = str_replace( '.php', '', $id ); 410 if ( in_array( substr( $id, -4 ), array( '-add', '-new' ) ) ) 411 $action = 'add'; 412 $id = str_replace( array( '-new', '-add' ), '', $id ); 413 404 414 if ( $hook_name ) { 405 if ( '-network' == substr( $hook_name, -8 ) ) 406 $hook_name = str_replace( '-network', '', $hook_name ); 407 elseif ( '-user' == substr( $hook_name, -5 ) ) 408 $hook_name = str_replace( '-user', '', $hook_name ); 409 $id = sanitize_key( $hook_name ); 415 if ( '-network' == substr( $id, -8 ) ) 416 $id = str_replace( '-network', '', $id ); 417 elseif ( '-user' == substr( $id, -5 ) ) 418 $id = str_replace( '-user', '', $id ); 419 420 $id = sanitize_key( $id ); 410 421 if ( false !== strpos( $id, '-' ) ) { 411 422 list( $id, $second ) = explode( '-', $id, 2 ); … … 419 430 } 420 431 } 421 } else { 422 $id = $GLOBALS['hook_suffix']; 423 $id = str_replace( '.php', '', $id ); 424 if ( in_array( substr( $id, -4 ), array( '-add', '-new' ) ) ) 425 $action = 'add'; 426 $id = str_replace( array( '-new', '-add' ), '', $id ); 427 } 432 } 428 433 429 434 if ( 'index' == $id )
Note: See TracChangeset
for help on using the changeset viewer.