Changeset 12797 for trunk/wp-admin/admin.php
- Timestamp:
- 01/22/2010 06:27:54 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/admin.php
r12753 r12797 113 113 // @todo validate typenow against post types. 114 114 115 /** 116 * Global object containing info about the current screen. 117 */ 118 $current_screen = $hook_suffix; 119 $current_screen = str_replace('.php', '', $current_screen); 120 $current_screen = str_replace('-new', '', $current_screen); 121 $current_screen = str_replace('-add', '', $current_screen); 122 $current_screen = array('id' => $current_screen, 'base' => $current_screen); 123 $current_screen = (object) $current_screen; 124 if ( 'edit' == $current_screen->id ) { 125 if ( empty($typenow) ) 126 $typenow = 'post'; 127 $current_screen->id .= '-' . $typenow; 128 $current_screen->post_type = $typenow; 129 } elseif ( 'post' == $current_screen->id ) { 130 if ( empty($typenow) ) 131 $typenow = 'post'; 132 $current_screen->id = $typenow; 133 $current_screen->post_type = $typenow; 134 } else { 135 $typenow = ''; 136 } 137 138 $current_screen = apply_filters('current_screen', $current_screen); 115 set_current_screen(); 139 116 140 117 // Handle plugin admin pages.
Note: See TracChangeset
for help on using the changeset viewer.