当前位置: 首页>>代码示例>>PHP>>正文


PHP the_author_nickname函数代码示例

本文整理汇总了PHP中the_author_nickname函数的典型用法代码示例。如果您正苦于以下问题:PHP the_author_nickname函数的具体用法?PHP the_author_nickname怎么用?PHP the_author_nickname使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了the_author_nickname函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: prayer_page


//.........这里部分代码省略.........
        ?>
" onclick="javascript:window.open(this.href,'', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=400,width=600');return false;" title="Google+"></a>
                                                </li>
                                            </ul>
                                            <!-- <p>I’m telling my friends to pray</p> -->
                                        </div>
                                    </div>
                                    <div class="user-detail ff-left" id="<?php 
        the_author_ID();
        ?>
">
                                    	
                                    		<!----user avtar---->
									<?php 
        $authore_id = get_the_author_meta('ID');
        ?>
									<?php 
        $provider = get_the_author_meta("wsl_current_provider", $authore_id);
        ?>
									
									<?php 
        if ($provider == "") {
            ?>
										<?php 
            $user_pix = $wpdb->get_row("SELECT * FROM " . $wpdb->prefix . "user_avtar WHERE user_id = {$authore_id}");
            ?>
										<?php 
            if ($user_pix->user_avtar == "") {
                ?>
												<a href="<?php 
                echo get_author_posts_url(get_the_author_meta('ID'));
                ?>
" title="<?php 
                the_author_nickname();
                ?>
"><img src="<?php 
                echo get_template_directory_uri();
                ?>
/library/images/epray-icon.png" class="avtr_img" /></a>
										<?php 
            } else {
                ?>
												<a href="<?php 
                echo get_author_posts_url(get_the_author_meta('ID'));
                ?>
" title="<?php 
                the_author_nickname();
                ?>
"><img src="<?php 
                bloginfo('stylesheet_directory');
                ?>
/library/avtar/<?php 
                echo $user_pix->user_avtar;
                ?>
" class="avtr_img"/></a> 
										<?php 
            }
            ?>
									
									<?php 
        } else {
            ?>
												<a href="<?php 
            echo get_author_posts_url(get_the_author_meta('ID'));
            ?>
" title="<?php 
开发者ID:nagyistoce,项目名称:krunalsojitra-wp-themes,代码行数:67,代码来源:functions.php

示例2: get_avatar

        $cat_id = $category[0]->cat_ID;
        $cat_name = $category[0]->cat_name;
        $cat_slug = $category[0]->category_nicename;
        ?>
								<span class="category category-<?php 
        echo $cat_slug;
        ?>
"><?php 
        echo $cat_name;
        ?>
</span>
								<?php 
        echo get_avatar(get_the_author_id(), 15);
        ?>
								<span><?php 
        echo the_author_nickname();
        ?>
</span>
							</div>
						</li>
					</a>
				<?php 
    }
    ?>
				<?php 
}
?>
				<?php 
wp_reset_query();
?>
				</ul>
开发者ID:project-SY,项目名称:route134-wp,代码行数:31,代码来源:curator-ken.php

示例3: postinfo

function postinfo($postinfo_string)
{
    // one theme option needed below for nofollow trackback / RSS links yes/no
    global $bfa_ata, $post;
    /* replace date format escape placeholders(#) with the actual escpae
    	character (=backslashes). This function removes all backslashes from
    	post info strings to avoid issues with hosts that have magic_quotes_gpc ON.
    	But we want to keep the backslashes inside date items, because they are
    	needed to escape literal strings inside dates */
    $postinfo_string = str_replace("#", "\\", $postinfo_string);
    $postinfo = $postinfo_string;
    // Author public name
    if (strpos($postinfo_string, '%author%') !== FALSE) {
        ob_start();
        the_author();
        $author = ob_get_contents();
        ob_end_clean();
        $postinfo = str_replace("%author%", $author, $postinfo);
    }
    // Public name of Author who last modified a post, since WordPress 2.8.
    // Check first if function is available (= if this is WP 2.8+)
    if (function_exists('the_modified_author')) {
        if (strpos($postinfo_string, '%modified-author%') !== FALSE) {
            ob_start();
            the_modified_author();
            $modified_author = ob_get_contents();
            ob_end_clean();
            $postinfo = str_replace("%modified-author%", $modified_author, $postinfo);
        }
    }
    // Author about yourself
    if (strpos($postinfo_string, '%author-description%') !== FALSE) {
        ob_start();
        the_author_description();
        $author_description = ob_get_contents();
        ob_end_clean();
        $postinfo = str_replace("%author-description%", $author_description, $postinfo);
    }
    // Author login name
    if (strpos($postinfo_string, '%author-login%') !== FALSE) {
        ob_start();
        the_author_login();
        $author_login = ob_get_contents();
        ob_end_clean();
        $postinfo = str_replace("%author-login%", $author_login, $postinfo);
    }
    // Author first name
    if (strpos($postinfo_string, '%author-firstname%') !== FALSE) {
        ob_start();
        the_author_firstname();
        $author_firstname = ob_get_contents();
        ob_end_clean();
        $postinfo = str_replace("%author-firstname%", $author_firstname, $postinfo);
    }
    // Author last name
    if (strpos($postinfo_string, '%author-lastname%') !== FALSE) {
        ob_start();
        the_author_lastname();
        $author_lastname = ob_get_contents();
        ob_end_clean();
        $postinfo = str_replace("%author-lastname%", $author_lastname, $postinfo);
    }
    // Author nickname
    if (strpos($postinfo_string, '%author-nickname%') !== FALSE) {
        ob_start();
        the_author_nickname();
        $author_nickname = ob_get_contents();
        ob_end_clean();
        $postinfo = str_replace("%author-nickname%", $author_nickname, $postinfo);
    }
    // Author ID
    if (strpos($postinfo_string, '%author-id%') !== FALSE) {
        ob_start();
        the_author_ID();
        $author_ID = ob_get_contents();
        ob_end_clean();
        $postinfo = str_replace("%author-id%", $author_ID, $postinfo);
    }
    // Author email address, clear text in HTML source code
    if (strpos($postinfo_string, '%author-email-clear%') !== FALSE) {
        ob_start();
        the_author_email();
        $author_email_clear = ob_get_contents();
        ob_end_clean();
        $postinfo = str_replace("%author-email-clear%", $author_email_clear, $postinfo);
    }
    // Author email address obfuscated
    if (strpos($postinfo_string, '%author-email%') !== FALSE) {
        $postinfo = str_replace("%author-email%", antispambot(get_the_author_email()), $postinfo);
    }
    // Author website URL
    if (strpos($postinfo_string, '%author-url%') !== FALSE) {
        ob_start();
        the_author_url();
        $author_url = ob_get_contents();
        ob_end_clean();
        $postinfo = str_replace("%author-url%", $author_url, $postinfo);
    }
    // Author website link
    if (strpos($postinfo_string, '%author-link%') !== FALSE) {
//.........这里部分代码省略.........
开发者ID:billerby,项目名称:Surdeg,代码行数:101,代码来源:bfa_postinfo.php


注:本文中的the_author_nickname函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。