最新公告
  • 欢迎您光临站盟网(原知事网),一个优质的网站源码基地、精品网站模板和插件。欢迎加入永久SVIP
  • WordPress函数the_author()用法 调用当前文章的作者名称

    正文概述 知事网   2020-09-11 11:09   583

    描述:

    显示当前文章的作者名称

    用法:

    <?php the_author(); ?>

    示例:

    <p>This post was written by <?php the_author(); ?></p>

    源文件:

    function the_author( $deprecated = '', $deprecated_echo = true ) {
    if ( ! empty( $deprecated ) ) {
    _deprecated_argument( __FUNCTION__, '2.1.0' );
    }
    
    if ( true !== $deprecated_echo ) {
    _deprecated_argument(
    __FUNCTION__,
    '1.5.0',
    sprintf(
    /* translators: %s: get_the_author() */
    __( 'Use %s instead if you do not want the value echoed.' ),
    '<code>get_the_author()</code>'
    )
    );
    }
    
    if ( $deprecated_echo ) {
    echo get_the_author();
    }
    
    return get_the_author();
    }

    站盟网 » WordPress函数the_author()用法 调用当前文章的作者名称

    发表评论

    还没有评论,快来抢沙发吧!

    如需帝国cms功能定制以及二次开发请联系我们

    联系作者
    请选择支付方式
    ×
    支付宝支付
    微信支付
    余额支付
    ×
    微信扫码支付 0 元