本文整理汇总了PHP中_wp_admin_html_begin函数的典型用法代码示例。如果您正苦于以下问题:PHP _wp_admin_html_begin函数的具体用法?PHP _wp_admin_html_begin怎么用?PHP _wp_admin_html_begin使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了_wp_admin_html_begin函数的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: render
/**
* Render the current view.
*
* @since 1.0.0
*/
public function render()
{
_wp_admin_html_begin();
?>
<title><?php
printf(__('%1$s ‹ %2$s', 'tablepress'), __('Preview', 'tablepress'), 'TablePress');
?>
</title>
<style type="text/css">
body {
margin-top: -6px !important;
}
</style>
<?php
echo $this->data['head_html'];
?>
</head>
<body>
<div id="tablepress-page">
<p>
<?php
_e('This is a preview of your table.', 'tablepress');
?>
<?php
_e('Because of CSS styling in your theme, the table might look different on your page!', 'tablepress');
?>
<?php
_e('The features of the DataTables JavaScript library are also not available or visible in this preview!', 'tablepress');
?>
<br />
<?php
printf(__('To insert the table into a page, post, or text widget, copy the Shortcode %s and paste it into the editor.', 'tablepress'), '<input type="text" class="table-shortcode table-shortcode-inline" value="' . esc_attr('[' . TablePress::$shortcode . " id={$this->data['table_id']} /]") . '" readonly="readonly" />');
?>
</p>
<?php
echo $this->data['body_html'];
?>
</div>
</body>
</html>
<?php
}
示例2: iframe_header
/**
* Generic Iframe header for use with Thickbox
*
* @since 2.7.0
*
* @global string $hook_suffix
* @global string $admin_body_class
* @global WP_Locale $wp_locale
*
* @param string $title Optional. Title of the Iframe page. Default empty.
* @param bool $deprecated Not used.
*/
function iframe_header($title = '', $deprecated = false)
{
show_admin_bar(false);
global $hook_suffix, $admin_body_class, $wp_locale;
$admin_body_class = preg_replace('/[^a-z0-9_-]+/i', '-', $hook_suffix);
$current_screen = get_current_screen();
@header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
_wp_admin_html_begin();
?>
<title><?php
bloginfo('name');
?>
› <?php
echo $title;
?>
— <?php
_e('WordPress');
?>
</title>
<?php
wp_enqueue_style('colors');
?>
<script type="text/javascript">
addLoadEvent = 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();}}};
function tb_close(){var win=window.dialogArguments||opener||parent||top;win.tb_remove();}
var ajaxurl = '<?php
echo admin_url('admin-ajax.php', 'relative');
?>
',
pagenow = '<?php
echo $current_screen->id;
?>
',
typenow = '<?php
echo $current_screen->post_type;
?>
',
adminpage = '<?php
echo $admin_body_class;
?>
',
thousandsSeparator = '<?php
echo addslashes($wp_locale->number_format['thousands_sep']);
?>
',
decimalPoint = '<?php
echo addslashes($wp_locale->number_format['decimal_point']);
?>
',
isRtl = <?php
echo (int) is_rtl();
?>
;
</script>
<?php
/** This action is documented in wp-admin/admin-header.php */
do_action('admin_enqueue_scripts', $hook_suffix);
/** This action is documented in wp-admin/admin-header.php */
do_action("admin_print_styles-{$hook_suffix}");
/** This action is documented in wp-admin/admin-header.php */
do_action('admin_print_styles');
/** This action is documented in wp-admin/admin-header.php */
do_action("admin_print_scripts-{$hook_suffix}");
/** This action is documented in wp-admin/admin-header.php */
do_action('admin_print_scripts');
/** This action is documented in wp-admin/admin-header.php */
do_action("admin_head-{$hook_suffix}");
/** This action is documented in wp-admin/admin-header.php */
do_action('admin_head');
$admin_body_class .= ' locale-' . sanitize_html_class(strtolower(str_replace('_', '-', get_locale())));
if (is_rtl()) {
$admin_body_class .= ' rtl';
}
?>
</head>
<?php
/** This filter is documented in wp-admin/admin-header.php */
$admin_body_classes = apply_filters('admin_body_class', '');
?>
<body<?php
/**
* @global string $body_id
*/
if (isset($GLOBALS['body_id'])) {
echo ' id="' . $GLOBALS['body_id'] . '"';
}
?>
class="wp-admin wp-core-ui no-js iframe <?php
//.........这里部分代码省略.........
示例3: sprintf
if ($admin_title == $title) {
$admin_title = sprintf(__('%1$s — WordPress'), $title);
} else {
$admin_title = sprintf(__('%1$s ‹ %2$s — WordPress'), $title, $admin_title);
}
/**
* Filter the <title> content for an admin page.
*
* @since 3.1.0
*
* @param string $admin_title The page title, with extra context added.
* @param string $title The original page title.
*/
$admin_title = apply_filters('admin_title', $admin_title, $title);
wp_user_settings();
_wp_admin_html_begin();
?>
<title><?php
echo $admin_title;
?>
</title>
<?php
wp_enqueue_style('colors');
wp_enqueue_style('ie');
wp_enqueue_script('utils');
wp_enqueue_script('svg-painter');
$admin_body_class = preg_replace('/[^a-z0-9_-]+/i', '-', $hook_suffix);
?>
<script type="text/javascript">
addLoadEvent = 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();}}};
var ajaxurl = '<?php
示例4: wp_iframe
/**
* Adds the iframe to display content for the media upload page
*
* @since 2.5.0
*
* @param array $content_func
*/
function wp_iframe($content_func)
{
_wp_admin_html_begin();
?>
<title><?php
bloginfo('name');
?>
› <?php
_e('Uploads');
?>
— <?php
_e('WordPress');
?>
</title>
<?php
wp_enqueue_style('colors');
// Check callback name for 'media'
if (is_array($content_func) && !empty($content_func[1]) && 0 === strpos((string) $content_func[1], 'media') || !is_array($content_func) && 0 === strpos($content_func, 'media')) {
wp_enqueue_style('media');
}
wp_enqueue_style('ie');
?>
<script type="text/javascript">
//<![CDATA[
addLoadEvent = 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();}}};
var ajaxurl = '<?php
echo admin_url('admin-ajax.php', 'relative');
?>
', pagenow = 'media-upload-popup', adminpage = 'media-upload-popup',
isRtl = <?php
echo (int) is_rtl();
?>
;
//]]>
</script>
<?php
/** This action is documented in wp-admin/admin-header.php */
do_action('admin_enqueue_scripts', 'media-upload-popup');
/**
* Fires when admin styles enqueued for the legacy (pre-3.5.0) media upload popup are printed.
*
* @since 2.9.0
*/
do_action('admin_print_styles-media-upload-popup');
/** This action is documented in wp-admin/admin-header.php */
do_action('admin_print_styles');
/**
* Fires when admin scripts enqueued for the legacy (pre-3.5.0) media upload popup are printed.
*
* @since 2.9.0
*/
do_action('admin_print_scripts-media-upload-popup');
/** This action is documented in wp-admin/admin-header.php */
do_action('admin_print_scripts');
/**
* Fires when scripts enqueued for the admin header for the legacy (pre-3.5.0)
* media upload popup are printed.
*
* @since 2.9.0
*/
do_action('admin_head-media-upload-popup');
/** This action is documented in wp-admin/admin-header.php */
do_action('admin_head');
if (is_string($content_func)) {
/**
* Fires in the admin header for each specific form tab in the legacy
* (pre-3.5.0) media upload popup.
*
* The dynamic portion of the hook, $content_func, refers to the form
* callback for the media upload type. Possible values include
* 'media_upload_type_form', 'media_upload_type_url_form', and
* 'media_upload_library_form'.
*
* @since 2.5.0
*/
do_action("admin_head_{$content_func}");
}
?>
</head>
<body<?php
if (isset($GLOBALS['body_id'])) {
echo ' id="' . $GLOBALS['body_id'] . '"';
}
?>
class="wp-core-ui no-js">
<script type="text/javascript">
document.body.className = document.body.className.replace('no-js', 'js');
</script>
<?php
$args = func_get_args();
$args = array_slice($args, 1);
call_user_func_array($content_func, $args);
/** This action is documented in wp-admin/admin-footer.php */
//.........这里部分代码省略.........
示例5: iframe_header
/**
* Generic Iframe header for use with Thickbox
*
* @since 2.7.0
* @param string $title Title of the Iframe page.
* @param bool $limit_styles Limit styles to colour-related styles only (unless others are enqueued).
*
*/
function iframe_header($title = '', $limit_styles = false)
{
show_admin_bar(false);
global $hook_suffix, $current_user, $admin_body_class, $wp_locale;
$admin_body_class = preg_replace('/[^a-z0-9_-]+/i', '-', $hook_suffix);
$current_screen = get_current_screen();
_wp_admin_html_begin();
?>
<title><?php
bloginfo('name');
?>
› <?php
echo $title;
?>
— <?php
_e('WordPress');
?>
</title>
<?php
wp_enqueue_style('colors');
?>
<script type="text/javascript">
//<![CDATA[
addLoadEvent = 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();}}};
function tb_close(){var win=window.dialogArguments||opener||parent||top;win.tb_remove();}
var 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();
?>
'
},
ajaxurl = '<?php
echo admin_url('admin-ajax.php');
?>
',
pagenow = '<?php
echo $current_screen->id;
?>
',
typenow = '<?php
echo $current_screen->post_type;
?>
',
adminpage = '<?php
echo $admin_body_class;
?>
',
thousandsSeparator = '<?php
echo addslashes($wp_locale->number_format['thousands_sep']);
?>
',
decimalPoint = '<?php
echo addslashes($wp_locale->number_format['decimal_point']);
?>
',
isRtl = <?php
echo (int) is_rtl();
?>
;
//]]>
</script>
<?php
do_action('admin_enqueue_scripts', $hook_suffix);
do_action("admin_print_styles-{$hook_suffix}");
do_action('admin_print_styles');
do_action("admin_print_scripts-{$hook_suffix}");
do_action('admin_print_scripts');
do_action("admin_head-{$hook_suffix}");
do_action('admin_head');
?>
</head>
<body<?php
if (isset($GLOBALS['body_id'])) {
echo ' id="' . $GLOBALS['body_id'] . '"';
}
?>
class="wp-admin no-js iframe <?php
echo apply_filters('admin_body_class', '') . ' ' . $admin_body_class;
?>
">
<script type="text/javascript">
//.........这里部分代码省略.........
示例6: edit_user_permissions
function edit_user_permissions()
{
_wp_admin_html_begin();
?>
<title><?php
_e('Post Indexer Settings', 'postindexer');
?>
</title>
<?php
wp_enqueue_style('colors');
//wp_enqueue_style( 'media' );
//wp_enqueue_style( 'ie' );
wp_enqueue_script('jquery');
do_action('admin_print_styles');
do_action('admin_print_scripts');
do_action('admin_head');
?>
</head>
<body<?php
if (isset($GLOBALS['body_id'])) {
echo ' id="' . $GLOBALS['body_id'] . '"';
}
?>
class="no-js">
<script type="text/javascript">
document.body.className = document.body.className.replace('no-js', 'js');
</script>
<?php
$this->edit_users_permissions_content();
do_action('admin_print_footer_scripts');
?>
<script type="text/javascript">if(typeof wpOnload=='function')wpOnload();</script>
</body>
</html>
<?php
exit;
}
示例7: wp_iframe
/**
* Adds the iframe to display content for the media upload page
*
* @since 2.5.0
*
* @param array $content_func
*/
function wp_iframe($content_func)
{
_wp_admin_html_begin();
?>
<title><?php
bloginfo('name');
?>
› <?php
_e('Uploads');
?>
— <?php
_e('WordPress');
?>
</title>
<?php
wp_enqueue_style('colors');
// Check callback name for 'media'
if (is_array($content_func) && !empty($content_func[1]) && 0 === strpos((string) $content_func[1], 'media') || !is_array($content_func) && 0 === strpos($content_func, 'media')) {
wp_enqueue_style('media');
}
wp_enqueue_style('ie');
?>
<script type="text/javascript">
//<![CDATA[
addLoadEvent = 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();}}};
var ajaxurl = '<?php
echo admin_url('admin-ajax.php', 'relative');
?>
', pagenow = 'media-upload-popup', adminpage = 'media-upload-popup',
isRtl = <?php
echo (int) is_rtl();
?>
;
//]]>
</script>
<?php
do_action('admin_enqueue_scripts', 'media-upload-popup');
do_action('admin_print_styles-media-upload-popup');
do_action('admin_print_styles');
do_action('admin_print_scripts-media-upload-popup');
do_action('admin_print_scripts');
do_action('admin_head-media-upload-popup');
do_action('admin_head');
if (is_string($content_func)) {
do_action("admin_head_{$content_func}");
}
?>
</head>
<body<?php
if (isset($GLOBALS['body_id'])) {
echo ' id="' . $GLOBALS['body_id'] . '"';
}
?>
class="wp-core-ui no-js">
<script type="text/javascript">
document.body.className = document.body.className.replace('no-js', 'js');
</script>
<?php
$args = func_get_args();
$args = array_slice($args, 1);
call_user_func_array($content_func, $args);
do_action('admin_print_footer_scripts');
?>
<script type="text/javascript">if(typeof wpOnload=='function')wpOnload();</script>
</body>
</html>
<?php
}
示例8: render
/**
* Render the current view.
*
* @since 1.0.0
*/
public function render()
{
_wp_admin_html_begin();
wp_print_styles('colors');
wp_print_scripts('jquery');
?>
<title><?php
printf(__('%1$s ‹ %2$s', 'tablepress'), __('List of Tables', 'tablepress'), 'TablePress');
?>
</title>
<style type="text/css">
/* Account for .wp-toolbar */
html {
padding-top: 0 !important;
}
body {
margin: 0 0 15px 15px;
}
/* Fix search field positioning */
#tablepress-page .search-box {
position: relative;
height: auto;
width: auto;
float: right;
clear: none;
margin: 0;
}
#tablepress-page .subtitle {
float: left;
padding: 10px 0 0;
}
#tablepress-page .search-box input[name="s"] {
float: left;
width: auto;
}
/* Fix pagination layout */
#tablepress-page .tablenav-pages {
text-align: left;
}
#tablepress-page .tablenav .tablenav-pages a {
padding: 5px 12px;
font-size: 16px;
}
#tablepress-page .tablenav-pages .pagination-links .paging-input {
font-size: 16px;
}
#tablepress-page .tablenav-pages .pagination-links .current-page {
padding: 4px;
font-size: 16px;
}
/* Width and font weight for the columns */
.tablepress-editor-button-list thead .column-table_id {
width: 50px;
}
.tablepress-editor-button-list tbody .column-table_id,
.tablepress-editor-button-list tbody .column-table_name {
font-weight: bold;
}
.tablepress-editor-button-list thead .column-table_action {
width: 150px;
}
.tablepress-editor-button-list tbody .column-table_action {
padding: 4px 7px 1px;
vertical-align: middle;
}
/* Shortcode input field */
#tablepress-page .table-shortcode-inline {
background: transparent;
border: none;
color: #333333;
width: 110px;
margin: 0;
padding: 0;
font-weight: bold;
font-size: 14px;
-webkit-box-shadow: none;
box-shadow: none;
text-align: center;
vertical-align: top;
}
#tablepress-page .table-shortcode {
cursor: text;
}
<?php
if (is_rtl()) {
?>
/* RTL CSS */
body.rtl {
margin: 0 15px 15px 0;
}
//.........这里部分代码省略.........
示例9: edit_site_postindexer
function edit_site_postindexer()
{
if (isset($_GET['action'])) {
switch ($_GET['action']) {
case 'updatepostindexersitesettings':
$blog_id = $_GET['blog_id'];
check_admin_referer('postindexer_update_site_settings_' . $blog_id);
$this->model->switch_to_blog($blog_id);
update_option('postindexer_active', $_GET['postindexer_active']);
$this->model->restore_current_blog();
break;
}
}
_wp_admin_html_begin();
?>
<title><?php
_e('Post Indexer Settings', 'postindexer');
?>
</title>
<?php
wp_enqueue_style('colors');
//wp_enqueue_style( 'media' );
//wp_enqueue_style( 'ie' );
wp_enqueue_script('jquery');
do_action('admin_print_styles');
do_action('admin_print_scripts');
do_action('admin_head');
?>
</head>
<body<?php
if (isset($GLOBALS['body_id'])) {
echo ' id="' . $GLOBALS['body_id'] . '"';
}
?>
class="no-js">
<script type="text/javascript">
document.body.className = document.body.className.replace('no-js', 'js');
</script>
<?php
$this->edit_site_content();
do_action('admin_print_footer_scripts');
?>
<script type="text/javascript">if(typeof wpOnload=='function')wpOnload();</script>
</body>
</html>
<?php
exit;
}
示例10: _wpsc_admin_html_begin
/**
* Wrapper for _wp_admin_html_begin(), which might not be available on older
* WordPress versions.
*
* @access private
* @since 3.8.9.4
*/
function _wpsc_admin_html_begin()
{
if (function_exists('_wp_admin_html_begin')) {
_wp_admin_html_begin();
return;
}
$admin_html_class = is_admin_bar_showing() ? 'wp-toolbar' : '';
?>
<!DOCTYPE html>
<!--[if IE 8]>
<html xmlns="http://www.w3.org/1999/xhtml" class="ie8 <?php
echo $admin_html_class;
?>
" <?php
do_action('admin_xml_ns');
?>
<?php
language_attributes();
?>
>
<![endif]-->
<!--[if !(IE 8) ]><!-->
<html xmlns="http://www.w3.org/1999/xhtml" class="<?php
echo $admin_html_class;
?>
" <?php
do_action('admin_xml_ns');
?>
<?php
language_attributes();
?>
>
<!--<![endif]-->
<head>
<meta http-equiv="Content-Type" content="<?php
bloginfo('html_type');
?>
; charset=<?php
echo get_option('blog_charset');
?>
" />
<?php
}
示例11: videos_list
/**
* Video list output
*/
function videos_list()
{
_wp_admin_html_begin();
printf('<title>%s</title>', __('Video list', 'cvm_video'));
wp_enqueue_style('colors');
wp_enqueue_style('ie');
wp_enqueue_script('utils');
wp_enqueue_style('cvm-video-list-modal', CVM_URL . 'assets/back-end/css/video-list-modal.css', false, '1.0');
wp_enqueue_script('cvm-video-list-modal', CVM_URL . 'assets/back-end/js/video-list-modal.js', array('jquery'), '1.0');
do_action('admin_print_styles');
do_action('admin_print_scripts');
do_action('cvm_video_list_modal_print_scripts');
echo '</head>';
echo '<body>';
require CVM_PATH . 'includes/libs/video-list-table.class.php';
$table = new CVM_Video_List_Table();
$table->prepare_items();
global $CVM_POST_TYPE;
?>
<div class="wrap">
<form method="get" action="" id="cvm-video-list-form">
<input type="hidden" name="post_type" value="<?php
echo $CVM_POST_TYPE->get_post_type();
?>
" />
<input type="hidden" name="page" value="<?php
echo $_REQUEST['page'];
?>
" />
<?php
$table->search_box(__('Search', 'cvm_video'), 'video');
?>
<?php
$table->display();
?>
</form>
<div id="cvm-shortcode-atts"></div>
</div>
<?php
echo '</body>';
echo '</html>';
die;
}
示例12: render
/**
* Render the current view
*
* @since 1.0.0
*/
public function render()
{
_wp_admin_html_begin();
wp_print_styles('colors');
wp_print_scripts('jquery');
?>
<title><?php
printf(__('%1$s ‹ %2$s', 'tablepress'), __('List of Tables', 'tablepress'), 'TablePress');
?>
</title>
<style type="text/css">
body {
margin: -26px 0px 15px 15px; /* top has -28px offset to account for html.wp-toolbar */
}
#icon-tablepress {
background: transparent url(<?php
echo plugins_url('admin/tablepress-icon.png', TABLEPRESS__FILE__);
?>
) no-repeat;
}
/* HiDPI images */
@media print,
(-o-min-device-pixel-ratio: 5/4),
(-webkit-min-device-pixel-ratio: 1.25),
(min-resolution: 120dpi) {
/* Screen icon */
#icon-tablepress {
background-image: url(<?php
echo plugins_url('admin/tablepress-icon-2x.png', TABLEPRESS__FILE__);
?>
);
background-size: 36px 36px;
}
}
/* width and font weight for the columns */
.tablepress-editor-button-list thead .column-table_id {
width: 50px;
}
.tablepress-editor-button-list tbody .column-table_id,
.tablepress-editor-button-list tbody .column-table_name {
font-weight: bold;
}
.tablepress-editor-button-list thead .column-table_action {
width: 150px;
}
.tablepress-editor-button-list tbody .column-table_action {
padding: 4px 7px;
}
#tablepress-page .table-shortcode-inline {
background: transparent;
border: none;
color: #333333;
width: 90px;
margin: 0;
padding: 0;
font-weight: bold;
-webkit-box-shadow: none;
box-shadow: none;
}
#tablepress-page .table-shortcode {
cursor: text;
}
/* Search results for WP_List_Table */
#tablepress-page .subtitle {
float: left;
padding-left: 0px;
}
</style>
</head>
<body class="wp-admin wp-core-ui js iframe">
<div id="tablepress-page" class="wrap">
<?php
screen_icon('tablepress');
?>
<h2><?php
printf(__('%1$s ‹ %2$s', 'tablepress'), __('List of Tables', 'tablepress'), 'TablePress');
?>
</h2>
<div id="poststuff">
<p>
<?php
_e('This is a list of all available tables.', 'tablepress');
?>
<?php
_e('You may insert a table into a post or page here.', 'tablepress');
?>
</p><p>
<?php
printf(__('Click the “%1$s” button for the desired table to automatically insert the<br />corresponding Shortcode (%2$s) into the editor.', 'tablepress'), __('Insert Shortcode', 'tablepress'), '<input type="text" class="table-shortcode table-shortcode-inline" value="[' . TablePress::$shortcode . ' id=<ID> /]" readonly="readonly" />');
?>
</p>
//.........这里部分代码省略.........
示例13: printer_friendly_header
public static function printer_friendly_header($args = '')
{
define('IFRAME_REQUEST', true);
// In case admin-header.php is included in a function.
global $title, $hook_suffix, $current_screen, $wp_locale, $pagenow, $wp_version, $current_site, $update_title, $total_update_count, $parent_file;
// Catch plugins that include admin-header.php before admin.php completes.
if (empty($current_screen)) {
set_current_screen();
}
get_admin_page_title();
$title = esc_html(strip_tags($title));
if (is_network_admin()) {
$admin_title = __('Network Admin', 'opentickets-community-edition');
} elseif (is_user_admin()) {
$admin_title = __('Global Dashboard', 'opentickets-community-edition');
} else {
$admin_title = get_bloginfo('name');
}
if ($admin_title == $title) {
$admin_title = sprintf(__('%1$s — WordPress', 'opentickets-community-edition'), $title);
} else {
$admin_title = sprintf(__('%1$s ‹ %2$s — WordPress', 'opentickets-community-edition'), $title, $admin_title);
}
$admin_title = apply_filters('admin_title', $admin_title, $title);
wp_user_settings();
_wp_admin_html_begin();
?>
<title><?php
echo $admin_title;
?>
</title>
<?php
wp_enqueue_style('colors');
wp_enqueue_style('ie');
wp_enqueue_script('utils');
$admin_body_class = preg_replace('/[^a-z0-9_-]+/i', '-', $hook_suffix);
?>
<script type="text/javascript">
addLoadEvent = 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();}}};
var ajaxurl = '<?php
echo admin_url('admin-ajax.php', 'relative');
?>
',
pagenow = '<?php
echo $current_screen->id;
?>
',
typenow = '<?php
echo $current_screen->post_type;
?>
',
adminpage = '<?php
echo $admin_body_class;
?>
',
thousandsSeparator = '<?php
echo addslashes($wp_locale->number_format['thousands_sep']);
?>
',
decimalPoint = '<?php
echo addslashes($wp_locale->number_format['decimal_point']);
?>
',
isRtl = <?php
echo (int) is_rtl();
?>
;
</script>
<?php
do_action('admin_enqueue_scripts', $hook_suffix);
do_action("admin_print_styles-{$hook_suffix}");
do_action('admin_print_styles');
do_action("admin_print_scripts-{$hook_suffix}");
do_action('admin_print_scripts');
do_action("admin_head-{$hook_suffix}");
do_action('admin_head');
if (get_user_setting('mfold') == 'f') {
$admin_body_class .= ' folded';
}
if (!get_user_setting('unfold')) {
$admin_body_class .= ' auto-fold';
}
if (is_admin_bar_showing()) {
$admin_body_class .= ' admin-bar';
}
if (is_rtl()) {
$admin_body_class .= ' rtl';
}
$admin_body_class .= ' branch-' . str_replace(array('.', ','), '-', floatval($wp_version));
$admin_body_class .= ' version-' . str_replace('.', '-', preg_replace('/^([.0-9]+).*/', '$1', $wp_version));
$admin_body_class .= ' admin-color-' . sanitize_html_class(get_user_option('admin_color'), 'fresh');
$admin_body_class .= ' locale-' . sanitize_html_class(strtolower(str_replace('_', '-', get_locale())));
if (wp_is_mobile()) {
$admin_body_class .= ' mobile';
}
$admin_body_class .= ' no-customize-support';
?>
</head>
<body class="wp-admin wp-core-ui no-js <?php
echo apply_filters('admin_body_class', '') . " {$admin_body_class}";
//.........这里部分代码省略.........
示例14: ym_admin_header
function ym_admin_header($page)
{
_wp_admin_html_begin();
do_action('admin_init');
// recall for scripts
ym_admin_script_init();
// In case admin-header.php is included in a function.
global $title, $hook_suffix, $current_screen, $wp_locale, $pagenow, $wp_version, $is_iphone, $current_site, $update_title, $total_update_count, $parent_file;
// Catch plugins that include admin-header.php before admin.php completes.
if (empty($current_screen)) {
set_current_screen();
}
wp_user_settings();
wp_enqueue_style('colors');
wp_enqueue_style('ie');
do_action('admin_print_styles');
do_action('admin_print_scripts');
do_action('admin_head');
echo '<style type="text/css">
html.wp-toolbar {
padding-top: 0px;
}
#poststuff {
width: 100%;
margin: 0px;
}
</style>
';
echo '</head>';
?>
<body<?php
if (isset($GLOBALS['body_id'])) {
echo ' id="' . $GLOBALS['body_id'] . '"';
}
?>
class="no-js">
<script type="text/javascript">
document.body.className = document.body.className.replace('no-js', 'js');
</script>
<?php
}