WordPress.org

Make WordPress Core


Ignore:
Timestamp:
01/04/2010 04:58:43 PM (10 years ago)
Author:
ryan
Message:

More custom post type support. Props scribu. see #9674

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin-header.php

    r12513 r12597  
    3636    $hook_suffix = $pagenow;
    3737
     38if ( isset($submenu_file) && (false !== $pos = strpos($submenu_file, 'post_type=')) )
     39    $typenow = substr($submenu_file, $pos + 10);
     40elseif ( isset($parent_file) && (false !== $pos = strpos($parent_file, 'post_type=')) )
     41    $typenow = substr($parent_file, $pos + 10);
     42else
     43    $typenow = '';
     44
    3845$admin_body_class = preg_replace('/[^a-z0-9_-]+/i', '-', $hook_suffix);
    3946?>
     
    4249addLoadEvent = function(func){if(typeof jQuery!="undefined")jQuery(document).ready(func);else if(typeof wpOnload!='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}};
    4350var userSettings = {'url':'<?php echo SITECOOKIEPATH; ?>','uid':'<?php if ( ! isset($current_user) ) $current_user = wp_get_current_user(); echo $current_user->ID; ?>','time':'<?php echo time() ?>'};
    44 var ajaxurl = '<?php echo admin_url('admin-ajax.php'); ?>', pagenow = '<?php echo substr($pagenow, 0, -4); ?>', adminpage = '<?php echo $admin_body_class; ?>',  thousandsSeparator = '<?php echo $wp_locale->number_format['thousands_sep']; ?>', decimalPoint = '<?php echo $wp_locale->number_format['decimal_point']; ?>';
     51var ajaxurl = '<?php echo admin_url('admin-ajax.php'); ?>', pagenow = '<?php echo substr($pagenow, 0, -4); ?>', typenow = '<?php echo $typenow; ?>', adminpage = '<?php echo $admin_body_class; ?>',  thousandsSeparator = '<?php echo $wp_locale->number_format['thousands_sep']; ?>', decimalPoint = '<?php echo $wp_locale->number_format['decimal_point']; ?>';
    4552//]]>
    4653</script>
Note: See TracChangeset for help on using the changeset viewer.