當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。