Home >Backend Development >PHP Tutorial >site-求教php问题,如何在wordpress主题里输出插件的内容

site-求教php问题,如何在wordpress主题里输出插件的内容

WBOY
WBOYOriginal
2016-06-02 11:33:411113browse

site插件phpwordpress插件wordpress

<code> //show contribute meta data        function contribute_metadata( $content ){                if( is_single() ){                        $DXC_options = get_option( 'DX-Contribute-options' );                        $pid = get_the_ID();                        $metas = get_post_meta( $pid, '_DX_Contribute', true );                        if( $DXC_options['meta-on'] = 'on' && $metas ){                                $avatar = get_avatar( $metas['email'], 25 );                                $url = ($metas['site'] == 'true') ? '' : $metas['site'];                                $user = $metas['user'];                                $site = ( $url ) ? '<a href="'.%24url.'" rel="external nofollow" target="_blank">'.$user.'</a>' : '<a rel="nofollow" style="color: #EF4372;">'.$user.'</a>';                                $style = '<style type="text/css">#contribute-metadata{line-height:25px;margin:10px 0;} #contribute-metadata img{display:block;float:left;margin-right:5px;}</style>';                                $meta_code = '<div id="contribute-metadata">'.$avatar.'<div id="contribute-site">'.$site.' 提交于'.get_the_time( 'Y-m-d H:i:s' ).'</div>
</div>
<div style="clear:both;"></div>';                                if( $DXC_options[ 'metapo' ]=='head' ){                                        $content = $style.$meta_code.$content;                                }                                else $content .= $style.$meta_code;                                                }                }                return $content;        }</code>

这一段是插件内的内容,他将自动在文章页面内重输出文章内容
但是我想在首页指定地方输出$user的内容怎么做到呢

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn