
创建和定制WordPress导航菜单的深入浅出教程
_wp_admin_html_begin ( No parameters )
_wp_admin_html_begin是WordPress的一个函数,用于输出WordPress网站管理部分的开头HTML标签: 这个函数在每个管理页面的开头被调用,负责输出doctype、开头HTML标签、head和body标签。
打印出管理员HTML标头的开头。
function _wp_admin_html_begin() { global $is_IE; $admin_html_class = ( is_admin_bar_showing() ) ? 'wp-toolbar' : ''; if ( $is_IE ) { header( 'X-UA-Compatible: IE=edge' ); } ?> <!DOCTYPE html> <html class="<?php echo $admin_html_class; ?>" <?php /** * Fires inside the HTML tag in the admin header. * * @since 2.2.0 */ do_action( 'admin_xml_ns' ); language_attributes(); ?> > <head> <meta http-equiv="Content-Type" content="<?php bloginfo( 'html_type' ); ?>; charset=<?php echo get_option( 'blog_charset' ); ?>" /> <?php }