Changeset 12797 for trunk/wp-admin/includes/template.php
- Timestamp:
- 01/22/2010 06:27:54 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/template.php
r12789 r12797 1266 1266 <input accesskey="s" class="button-primary alignright" type="submit" name="bulk_edit" value="<?php echo esc_attr( $update_text ); ?>" /> 1267 1267 <?php } ?> 1268 <input type="hidden" name="post_view" value="<?php echo $m; ?>" /> 1268 <input type="hidden" name="post_view" value="<?php echo esc_attr($m); ?>" /> 1269 <input type="hidden" name="screen" value="<?php echo esc_attr($screen->id); ?>" /> 1269 1270 <br class="clear" /> 1270 1271 </p> … … 3828 3829 } 3829 3830 3831 /** 3832 * Set the current screen object 3833 * 3834 * @since 3.0 3835 * 3836 * @uses $current_screen 3837 * 3838 * @param string $id Screen id, optional. 3839 */ 3840 function set_current_screen( $id = '' ) { 3841 global $current_screen, $hook_suffix, $typenow; 3842 3843 if ( empty($id) ) { 3844 $current_screen = $hook_suffix; 3845 $current_screen = str_replace('.php', '', $current_screen); 3846 $current_screen = str_replace('-new', '', $current_screen); 3847 $current_screen = str_replace('-add', '', $current_screen); 3848 $current_screen = array('id' => $current_screen, 'base' => $current_screen); 3849 } else { 3850 if ( false !== strpos($id, '-') ) 3851 list( $id, $typenow ) = explode('-', $id, 2); 3852 $current_screen = array('id' => $id, 'base' => $id); 3853 } 3854 3855 $current_screen = (object) $current_screen; 3856 3857 if ( 'edit' == $current_screen->id ) { 3858 if ( empty($typenow) ) 3859 $typenow = 'post'; 3860 $current_screen->id .= '-' . $typenow; 3861 $current_screen->post_type = $typenow; 3862 } elseif ( 'post' == $current_screen->id ) { 3863 if ( empty($typenow) ) 3864 $typenow = 'post'; 3865 $current_screen->id = $typenow; 3866 $current_screen->post_type = $typenow; 3867 } else { 3868 $typenow = ''; 3869 } 3870 3871 $current_screen = apply_filters('current_screen', $current_screen); 3872 } 3873 3830 3874 ?>
Note: See TracChangeset
for help on using the changeset viewer.