1. 首页
  2. WordPress 函数手册

login_header()

login_header( string $title = ‘Log In’, string $message = , WP_Error $wp_error = null )

输出登录页标题。
Output the login page header.

目录锚点:#参数#返回#源码#笔记


参数(Parameters)

参数 类型 必填 说明
$title (string) 可选 WordPress登录页面标题显示在元素中。</td> </tr> <tr> <td><span class="color_0f55c8">$message</span></td> <td><span class="color_24831d">(string)</span></td> <td>可选</td> <td>要在标题中显示的消息。</td> </tr> <tr> <td><span class="color_0f55c8">$wp_error</span></td> <td><span class="color_24831d">(WP_Error)</span></td> <td>可选</td> <td>要传递的错误。默认为WP_错误实例。</td> </tr> </tbody> </table> <hr /> <h1 class='header-left-color' id='a1e2d02f148284aefd709b4a8c01c6a8'>返回<span style='font-size: 17px'>(Return)<a href='#a1e2d02f148284aefd709b4a8c01c6a8'></a></span></h1> <p>无返回值</p> <hr /> <h1 class='header-left-color' id='415a0a3fa08384a56be19d391855b5a5'>源码<span style='font-size: 17px'>(Source)<a href='#415a0a3fa08384a56be19d391855b5a5'></a></span></h1> <pre class="brush: php; class-name: 'my_code_css'; title: ; notranslate" title=""> </pre> <table class="table"> <thead> <tr> <th>更新版本</th> <th>源码位置</th> <th>使用</th> <th>被使用</th> </tr> </thead> <tbody> <tr> <td>2.1.0</td> <td style='color: #8f8fff;'> wp-login.php:41</td> <td>0</td> <td>35</td> </tr> </tbody> </table> <hr /> <h1 class='header-left-color' id='42c26d7df2d912cecc14e164816945e5'>笔记<span style='font-size: 17px'>(Notes)<a href='#42c26d7df2d912cecc14e164816945e5'></a></span></h1> <p>示例来自`wp-登录.php`</p> <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <ins class="adsbygoogle" style="display:block; text-align:center;" data-ad-layout="in-article" data-ad-format="fluid" data-ad-client="ca-pub-4239947792775398" data-ad-slot="5275133285"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> <div class="entry-copyright"><p> login_header() 为WP2原创文章,链接:https://www.wp2.cn/functions/login_header/</p></div> </div> <div class="entry-footer"> <div class="entry-tag"></div> <div class="entry-action"> <div class="btn-zan" data-id="24372"><i class="fa fa-thumbs-up"></i> 赞 <span class="entry-action-num">(0)</span></div> </div> <div class="entry-bar"> <div class="entry-bar-inner clearfix"> <div class="info text-center"> <div class="info-item meta"> <a class="meta-item j-heart" href="javascript:;" data-id="24372"><i class="fa fa-heart"></i> <span class="data">0</span></a> <a class="meta-item" href="#comments"><i class="fa fa-comments"></i> <span class="data">0</span> </a> </div> <div class="info-item share"> <a class="meta-item wechat" href="javascript:;"> <i class="fa fa-wechat"></i> <span class="wx-wrap"> <span class="j-qrcode" data-text="https://www.wp2.cn/functions/login_header/"></span> <span>扫码分享到微信</span> </span> </a> <a class="meta-item weibo" href="http://service.weibo.com/share/share.php?url=https%3A%2F%2Fwww.wp2.cn%2Ffunctions%2Flogin_header%2F&title=login_header%28%29&pic=&searchPic=true" target="_blank" rel="nofollow"><i class="fa fa-weibo"></i></a> <a class="meta-item qq" href="https://connect.qq.com/widget/shareqq/index.html?url=https%3A%2F%2Fwww.wp2.cn%2Ffunctions%2Flogin_header%2F&title=login_header%28%29&pics=" target="_blank" rel="nofollow"><i class="fa fa-qq"></i></a> </div> <div class="info-item act"> <a href="javascript:;" id="j-reading"><i class="fa fa-file-text"></i></a> </div> </div> </div> </div> <div class="entry-page"> <div class="entry-page-prev j-lazy" style="background-image: url(https://www.wp2.cn/wp-content/themes/WP2/themer/assets/images/lazy.png);" data-original=""> <a href="https://www.wp2.cn/functions/menu_page_url/" title="menu_page_url()"> <span>menu_page_url()</span> </a> <div class="entry-page-info"> <span class="pull-left">« 上一篇</span> <span class="pull-right">2020年7月31日 </span> </div> </div> <div class="entry-page-next j-lazy" style="background-image: url(https://www.wp2.cn/wp-content/themes/WP2/themer/assets/images/lazy.png);" data-original=""> <a href="https://www.wp2.cn/functions/links_add_target/" title="links_add_target()"> <span>links_add_target()</span> </a> <div class="entry-page-info"> <span class="pull-right">下一篇 »</span> <span class="pull-left">2020年7月31日 </span> </div> </div> </div> <div class="wpcom_ad_wrap"><script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <!-- hx --> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-4239947792775398" data-ad-slot="3962051617" data-ad-format="auto" data-full-width-responsive="true"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script></div> <h3 class="entry-related-title">相关推荐</h3><ul class="entry-related clearfix"><li><a href="https://www.wp2.cn/functions/get_network/" title="get_network()">get_network()</a></li><li><a href="https://www.wp2.cn/functions/get_parent_post_rel_link/" title="get_parent_post_rel_link()">get_parent_post_rel_link()</a></li><li><a href="https://www.wp2.cn/functions/get_header_image_tag/" title="get_header_image_tag()">get_header_image_tag()</a></li><li><a href="https://www.wp2.cn/functions/_ex/" title="_ex()">_ex()</a></li><li><a href="https://www.wp2.cn/functions/do_action/" title="do_action()">do_action()</a></li><li><a href="https://www.wp2.cn/functions/add_dashboard_page/" title="add_dashboard_page()">add_dashboard_page()</a></li><li><a href="https://www.wp2.cn/functions/add_option_update_handler/" title="add_option_update_handler()">add_option_update_handler()</a></li><li><a href="https://www.wp2.cn/functions/get_search_query/" title="get_search_query()">get_search_query()</a></li><li><a href="https://www.wp2.cn/functions/get_site_screen_help_tab_args/" title="get_site_screen_help_tab_args()">get_site_screen_help_tab_args()</a></li><li><a href="https://www.wp2.cn/functions/display_space_usage/" title="display_space_usage()">display_space_usage()</a></li><li><a href="https://www.wp2.cn/functions/wp_add_dashboard_widget/" title="wp_add_dashboard_widget()">wp_add_dashboard_widget()</a></li><li><a href="https://www.wp2.cn/functions/register_deactivation_hook/" title="register_deactivation_hook()">register_deactivation_hook()</a></li><li><a href="https://www.wp2.cn/functions/get_post_meta_by_id/" title="get_post_meta_by_id()">get_post_meta_by_id()</a></li><li><a href="https://www.wp2.cn/functions/install_plugins_upload/" title="install_plugins_upload()">install_plugins_upload()</a></li><li><a href="https://www.wp2.cn/functions/get_the_archive_title/" title="get_the_archive_title()">get_the_archive_title()</a></li><li><a href="https://www.wp2.cn/functions/get_permalink/" title="get_permalink()">get_permalink()</a></li></ul> </div> <div id="comments" class="entry-comments"> </div><!-- .comments-area --> </div> </article> </div> <aside class="sidebar"> <div id="wpcom-famous_quotes-3" class="widget widget_famous_quotes"> <h3 class="widget-title"><span><i class="fa fa-gavel" aria-hidden="true"></i>名人名言</span></h3> <p style="margin-bottom: 0;margin-top: 12px;text-indent: 28px;">用巧计才能捉住狐狸,凭勇敢才能</p> <p style="text-align: right;margin-bottom: 0">—— 蒙古</p> </div><div id="search-2" class="widget widget_search"><form class="search-form" action="https://www.wp2.cn" method="get" role="search"> <input type="text" class="keyword" name="s" placeholder="输入关键词搜索..." value=""> <input type="submit" class="submit" value=""> </form></div><div id="wpcom-post-category-2" class="widget widget_category"><h3 class="widget-title"><span>函数分类</span></h3> <ul> <li class="cat-item cat-item-14"> <a href="https://www.wp2.cn/category/functions/rest_function/" title="rest">rest</a> <span>(44)</span> </li> <li class="cat-item cat-item-14"> <a href="https://www.wp2.cn/category/functions/theme_function/" title="主题相关">主题相关</a> <span>(132)</span> </li> <li class="cat-item cat-item-14"> <a href="https://www.wp2.cn/category/functions/other_function/" title="功能、杂项">功能、杂项</a> <span>(2)</span> </li> <li class="cat-item cat-item-14"> <a href="https://www.wp2.cn/category/functions/admin_menu_function/" title="后台、管理员">后台、管理员</a> <span>(30)</span> </li> <li class="cat-item cat-item-14"> <a href="https://www.wp2.cn/category/functions/widget_function/" title="小工具函数">小工具函数</a> <span>(32)</span> </li> <li class="cat-item cat-item-14"> <a href="https://www.wp2.cn/category/functions/common_function/" title="常用函数">常用函数</a> <span>(1)</span> </li> <li class="cat-item cat-item-14"> <a href="https://www.wp2.cn/category/functions/plugin_function/" title="插件相关">插件相关</a> <span>(1)</span> </li> <li class="cat-item cat-item-14"> <a href="https://www.wp2.cn/category/functions/format_function/" title="格式化、序列化">格式化、序列化</a> <span>(1)</span> </li> <li class="cat-item cat-item-14"> <a href="https://www.wp2.cn/category/functions/user_role_auth_function/" title="用户、角色、权限">用户、角色、权限</a> <span>(3)</span> </li> <li class="cat-item cat-item-14"> <a href="https://www.wp2.cn/category/functions/system_function/" title="系统、缓存">系统、缓存</a> <span>(22)</span> </li> <li class="cat-item cat-item-14"> <a href="https://www.wp2.cn/category/functions/script_style_function/" title="脚本、样式">脚本、样式</a> <span>(22)</span> </li> <li class="cat-item cat-item-14"> <a href="https://www.wp2.cn/category/functions/comment_function/" title="评论、通知">评论、通知</a> <span>(117)</span> </li> <li class="cat-item cat-item-14"> <a href="https://www.wp2.cn/category/functions/option_function/" title="选项、设置">选项、设置</a> <span>(41)</span> </li> <li class="cat-item cat-item-14"> <a href="https://www.wp2.cn/category/functions/attach_function/" title="附件、链接">附件、链接</a> <span>(37)</span> </li> </ul> </div><div id="wpcom-html-ad-9" class="widget widget_html_ad"><!-- 侧边 --> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-4239947792775398" data-ad-slot="7316216531" data-ad-format="auto" data-full-width-responsive="true"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script></div> </aside> </div> <div class="modal" id="login-modal"> <div class="modal-dialog modal-sm"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> <h4 class="modal-title">请登录</h4> </div> <div class="modal-body login-modal-body"> <p>您还未登录,请登录后再进行相关操作!</p> <div class="login-btn"> <a class="btn btn-login" href="https://www.wp2.cn/login/">登 录</a> <a class="btn btn-register" href="https://www.wp2.cn/register/">注 册</a> </div> </div> </div> </div> </div> </div> <footer class="footer"> <div class="container"> <div class="clearfix"> <div class="footer-col footer-col-logo"> <img src="https://wp2-cn.oss-cn-shanghai.aliyuncs.com/static/img/logo-r-g.png" alt="WordPress二次开发"> </div> <div class="footer-col footer-col-copy"> <div class="copyright"> <p>承接网站开发调优、小程序、安卓苹果app、pc程序等软件开发</p> <p>联系邮箱:84051225@qq.com</p> <!--<p>--> <!-- 友情链接:--> <!-- <a target="_blank" href="https://activity.huaweicloud.com/828_promotion/index.html?fromacct=dbfe616d-7cf5-446b-a03d-430e594e7506&utm_source=V1g3MDY4NTY=&utm_medium=cps&utm_campaign=201905">华为云</a>・--> <!-- <a href="">腾讯云</a>--> <!--</p>--> <p> <a onclick="alert('请使用快捷键 Ctrl+D 进行添加');">收藏本站</a>・ <a target="_blank" href="https://www.wp2.cn/sitemap.html">站点地图</a>・ <a target="_blank" href="https://www.wp2.cn/disclaimer/">免责声明</a> </p> <p> <a href="https://www.wp2.cn">WP2.cn</a> 由 <a target="_blank" href="https://wordpress.org/">WordPress</a> 驱动 ・ <a target="_blank" href="https://activity.huaweicloud.com/828_promotion/index.html?fromacct=dbfe616d-7cf5-446b-a03d-430e594e7506&utm_source=V1g3MDY4NTY=&utm_medium=cps&utm_campaign=201905">华为云</a> 构建 ・ ©2012-2020 ・ <a target="_blank" href="https://beian.miit.gov.cn/">晋ICP备20005987号</a> </p> </div> </div> <div class="footer-col footer-col-sns"> <div class="footer-sns"> </div> </div> </div> </div> </footer> <div class="action" style="top:80%;"> <div class="a-box gotop" id="j-top" style="display: none;"></div> </div> <script> var _hmt = _hmt || []; (function () { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?e7d1d8d6deac03e81546edc01f0bba31"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); var src = "https://jspassport.ssl.qhimg.com/11.0.1.js?d182b3f28525f2db83acfaaf6e696dba"; document.write('<script async src="' + src + '" id="sozz"><\/script>'); })(); </script> </script> <script></script><script type='text/javascript' src='https://www.wp2.cn/wp-content/plugins/syntaxhighlighter/syntaxhighlighter3/scripts/shCore.js?ver=3.0.9b' id='syntaxhighlighter-core-js'></script> <script type='text/javascript' src='https://www.wp2.cn/wp-content/plugins/syntaxhighlighter/syntaxhighlighter3/scripts/shBrushPhp.js?ver=3.0.9b' id='syntaxhighlighter-brush-php-js'></script> <script type='text/javascript'> (function(){ var corecss = document.createElement('link'); var themecss = document.createElement('link'); var corecssurl = "https://www.wp2.cn/wp-content/plugins/syntaxhighlighter/syntaxhighlighter3/styles/shCore.css?ver=3.0.9b"; if ( corecss.setAttribute ) { corecss.setAttribute( "rel", "stylesheet" ); corecss.setAttribute( "type", "text/css" ); corecss.setAttribute( "href", corecssurl ); } else { corecss.rel = "stylesheet"; corecss.href = corecssurl; } document.head.appendChild( corecss ); var themecssurl = "https://www.wp2.cn/wp-content/plugins/syntaxhighlighter/syntaxhighlighter3/styles/shThemeMidnight.css?ver=3.0.9b"; if ( themecss.setAttribute ) { themecss.setAttribute( "rel", "stylesheet" ); themecss.setAttribute( "type", "text/css" ); themecss.setAttribute( "href", themecssurl ); } else { themecss.rel = "stylesheet"; themecss.href = themecssurl; } document.head.appendChild( themecss ); })(); SyntaxHighlighter.config.strings.expandSource = '+ expand source'; SyntaxHighlighter.config.strings.help = '?'; SyntaxHighlighter.config.strings.alert = 'SyntaxHighlighter\n\n'; SyntaxHighlighter.config.strings.noBrush = 'Can\'t find brush for: '; SyntaxHighlighter.config.strings.brushNotHtmlScript = 'Brush wasn\'t configured for html-script option: '; SyntaxHighlighter.defaults['pad-line-numbers'] = true; SyntaxHighlighter.defaults['toolbar'] = false; SyntaxHighlighter.all(); // Infinite scroll support if ( typeof( jQuery ) !== 'undefined' ) { jQuery( function( $ ) { $( document.body ).on( 'post-load', function() { SyntaxHighlighter.highlight(); } ); } ); } </script> <script type='text/javascript' src='https://www.wp2.cn/wp-content/themes/WP2/static/lib/pace.min.js?ver=1.0' id='pace.min-js'></script> <script type='text/javascript' id='main-js-extra'> /* <![CDATA[ */ var _wpcom_js = {"webp":"","ajaxurl":"https:\/\/www.wp2.cn\/wp-admin\/admin-ajax.php","slide_speed":"3000","fluidbox":"1"}; /* ]]> */ </script> <script type='text/javascript' src='https://www.wp2.cn/wp-content/themes/WP2/js/main.js?ver=4.3.1' id='main-js'></script> <script type='text/javascript' src='https://www.wp2.cn/wp-includes/js/wp-embed.min.js?ver=5.8.4' id='wp-embed-js'></script> </body> </html> <!-- This website is like a Rocket, isn't it? Performance optimized by WP Rocket. Learn more: https://wp-rocket.me -->