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


PHP the_author_url函数代码示例

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


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

示例1: echo_entry

    function echo_entry()
    {
        ?>
<entry xmlns="<?php 
        echo $this->ATOM_NS;
        ?>
"
       xmlns:app="<?php 
        echo $this->ATOMPUB_NS;
        ?>
" xml:lang="<?php 
        echo get_option('rss_language');
        ?>
">
	<id><?php 
        the_guid($GLOBALS['post']->ID);
        ?>
</id>
<?php 
        list($content_type, $content) = prep_atom_text_construct(get_the_title());
        ?>
	<title type="<?php 
        echo $content_type;
        ?>
"><?php 
        echo $content;
        ?>
</title>
	<updated><?php 
        echo get_post_modified_time('Y-m-d\\TH:i:s\\Z', true);
        ?>
</updated>
	<published><?php 
        echo get_post_time('Y-m-d\\TH:i:s\\Z', true);
        ?>
</published>
	<app:edited><?php 
        echo get_post_modified_time('Y-m-d\\TH:i:s\\Z', true);
        ?>
</app:edited>
	<app:control>
		<app:draft><?php 
        echo $GLOBALS['post']->post_status == 'draft' ? 'yes' : 'no';
        ?>
</app:draft>
	</app:control>
	<author>
		<name><?php 
        the_author();
        ?>
</name>
<?php 
        if (get_the_author_url() && get_the_author_url() != 'http://') {
            ?>
		<uri><?php 
            the_author_url();
            ?>
</uri>
<?php 
        }
        ?>
	</author>
<?php 
        if ($GLOBALS['post']->post_type == 'attachment') {
            ?>
	<link rel="edit-media" href="<?php 
            $this->the_media_url();
            ?>
" />
	<content type="<?php 
            echo $GLOBALS['post']->post_mime_type;
            ?>
" src="<?php 
            the_guid();
            ?>
"/>
<?php 
        } else {
            ?>
	<link href="<?php 
            the_permalink_rss();
            ?>
" />
<?php 
            if (strlen($GLOBALS['post']->post_content)) {
                list($content_type, $content) = prep_atom_text_construct(get_the_content());
                ?>
	<content type="<?php 
                echo $content_type;
                ?>
"><?php 
                echo $content;
                ?>
</content>
<?php 
            }
        }
        ?>
	<link rel="edit" href="<?php 
        $this->the_entry_url();
//.........这里部分代码省略.........
开发者ID:staylor,项目名称:develop.svn.wordpress.org,代码行数:101,代码来源:wp-app.php

示例2: do_action

	<?php 
do_action('atom_head');
?>
	<?php 
while (have_posts()) {
    the_post();
    ?>
	<entry>
		<author>
			<name><?php 
    the_author();
    ?>
</name>
			<uri><?php 
    the_author_url();
    ?>
</uri>
		</author>
		<title type="<?php 
    html_type_rss();
    ?>
"><![CDATA[<?php 
    the_title_rss();
    ?>
]]></title>
		<link rel="alternate" type="text/html" href="<?php 
    permalink_single_rss();
    ?>
" />
		<id><?php 
开发者ID:staylor,项目名称:develop.svn.wordpress.org,代码行数:30,代码来源:feed-atom.php

示例3: get_entry

	function get_entry($postID, $post_type = 'post') {
		log_app('function',"get_entry($postID, '$post_type')");
		ob_start();
		global $posts, $post, $wp_query, $wp, $wpdb, $blog_id, $post_cache;
		switch($post_type) {
			case 'post':
				$varname = 'p';
				break;
			case 'attachment':
				$varname = 'attachment_id';
				break;
		}
		query_posts($varname . '=' . $postID);
		if ( have_posts() ) : while ( have_posts() ) : the_post();
		$post = $GLOBALS['post'];
		?>
		<?php log_app('$post',print_r($GLOBALS['post'],true)); ?>
<entry xmlns="http://www.w3.org/2005/Atom" xmlns:app="http://purl.org/atom/app#" xml:lang="<?php echo get_option('rss_language'); ?>">
	<id><?php the_guid($post->ID); ?></id>
	<title type="html"><![CDATA[<?php the_title_rss() ?>]]></title>

	<updated><?php echo get_post_modified_time('Y-m-d\TH:i:s\Z', true); ?></updated>
	<published><?php echo get_post_time('Y-m-d\TH:i:s\Z', true); ?></published>
	<app:control>
		<app:draft><?php echo ($GLOBALS['post']->post_status == 'draft' ? 'yes' : 'no') ?></app:draft>
	</app:control>
	<author>
		<name><?php the_author()?></name>
		<email><?php the_author_email()?></email>
		<uri><?php the_author_url()?></uri>
	</author>
<?php if($GLOBALS['post']->post_type == 'attachment') { ?>
	<link rel="edit" href="<?php $this->the_entry_url() ?>" />
	<link rel="edit-media" href="<?php $this->the_media_url() ?>" />
	<content type="<?php echo $GLOBALS['post']->post_mime_type ?>" src="<?php the_guid(); ?>"/>
<?php } else { ?>
	<link href="<?php permalink_single_rss() ?>" />
	<link rel="edit" href="<?php $this->the_entry_url() ?>" />
<?php } ?>
<?php foreach(get_the_category() as $category) { ?>
	<category scheme="<?php bloginfo_rss('home') ?>" term="<?php echo $category->cat_name?>" />
	<summary type="html"><![CDATA[<?php the_excerpt_rss(); ?>]]></summary>
<?php }
	if ( strlen( $GLOBALS['post']->post_content ) ) : ?>
	<content type="html"><![CDATA[<?php echo get_the_content('', 0, '') ?>]]></content>
<?php endif; ?>
</entry>
<?php
		$entry = ob_get_contents();
		break;
		endwhile;
		else:
			$this->auth_required(__("Access Denied."));
		endif;
		ob_end_clean();

		log_app('get_entry returning:',$entry);
		return $entry; 
	}
开发者ID:staylor,项目名称:develop.svn.wordpress.org,代码行数:59,代码来源:wp-app.php

示例4: bloginfo_rss

	<title type="text"><?php bloginfo_rss('name'); wp_title_rss(); ?></title>
	<subtitle type="text"><?php bloginfo_rss("description") ?></subtitle>

	<updated><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_lastpostmodified('GMT')); ?></updated>
	<generator uri="http://wordpress.org/" version="<?php bloginfo_rss('version'); ?>">WordPress</generator>

	<link rel="alternate" type="text/html" href="<?php bloginfo_rss('home') ?>" />
	<id><?php bloginfo('atom_url'); ?></id>
	<link rel="self" type="application/atom+xml" href="<?php bloginfo('atom_url'); ?>" />

	<?php do_action('atom_head'); ?>
	<?php while (have_posts()) : the_post(); ?>
	<entry>
		<author>
			<name><?php the_author() ?></name>
			<uri><?php the_author_url()?></uri>
		</author>
		<title type="<?php html_type_rss(); ?>"><![CDATA[<?php the_title_rss() ?>]]></title>
		<link rel="alternate" type="text/html" href="<?php permalink_single_rss() ?>" />
		<id><?php the_guid(); ?></id>
		<updated><?php echo get_post_time('Y-m-d\TH:i:s\Z', true); ?></updated>
		<published><?php echo get_post_time('Y-m-d\TH:i:s\Z', true); ?></published>
		<?php the_category_rss('atom') ?>
		<summary type="<?php html_type_rss(); ?>"><![CDATA[<?php the_excerpt_rss(); ?>]]></summary>
<?php if ( !get_option('rss_use_excerpt') ) : ?>
		<content type="<?php html_type_rss(); ?>" xml:base="<?php permalink_single_rss() ?>"><![CDATA[<?php the_content('', 0, '') ?>]]></content>
<?php endif; ?>
<?php atom_enclosure(); ?>
<?php do_action('atom_entry'); ?>
	</entry>
	<?php endwhile ; ?>
开发者ID:staylor,项目名称:develop.svn.wordpress.org,代码行数:31,代码来源:feed-atom.php

示例5: printf

		the_post();
?>

				<h1 class="page-title author"><?php printf( __( 'Articles Written By: %s', 'pts' ), "<span class='vcard'><a class='url fn n' href='" . get_author_posts_url( get_the_author_meta( 'ID' ) ) . "' title='" . esc_attr( get_the_author() ) . "' rel='me'>" . get_the_author() . "</a></span>" ); ?></h1>

<?php
// If a user has filled out their description, show a bio on their entries.
if ( get_the_author_meta( 'description' ) ) : ?>
					<div id="entry-author-info">
						
						<div id="author-description"><span id="author-avatar">
							<?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'pts_author_bio_avatar_size', 60 ) ); ?>
						</span><!-- #author-avatar -->
							<h2><?php printf( __( 'About %s', 'pts' ), get_the_author() ); ?></h2>
							<p><?php the_author_meta( 'description' ); ?></p>
							<p><strong>Author Website:</strong> <a href="<?php the_author_url(); ?>"><?php the_author_url(); ?></a><br />
						</div><!-- #author-description	-->
					</div><!-- #entry-author-info -->
<?php endif; ?>

<?php
	/* Since we called the_post() above, we need to
	 * rewind the loop back to the beginning that way
	 * we can run the loop properly, in full.
	 */
	rewind_posts();

	/* Run the loop for the author archive page to output the authors posts
	 * If you want to overload this in a child theme then include a file
	 * called loop-author.php and that will be used instead.
	 */
开发者ID:roryzweistra,项目名称:Shapshap,代码行数:31,代码来源:author.php

示例6: 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

示例7: if

<div class="posts<?php if(is_single()) echo ' post'; if(current_user_can( 'edit_page', $post->ID )) echo ' editable';?>">

<?php if (have_posts()) : while (have_posts()) : the_post(); ?>


<div class="hentry selfclear" id="post-<?php the_ID(); ?>">

				<div class="head selfclear">
					<?php if (!is_page()): ?>
					<?php echo get_avatar(get_the_author_id(), 40); ?>
					<?php endif; ?>
					<h4><a class="entry-title" href="<?php the_permalink() ?>"><?php the_title() ?></a></h4>
					<?php if(!is_page()): ?>
					<div class="source">
						by  
						<a class="author" href="<?php the_author_url(); ?>"><?php the_author() ?></a>
					</div>								
					<?php endif; ?>
				</div><!-- end .head -->

			
				<div class="entry-summary">
					<?php the_content(); ?>
				</div><!-- end .entry-summary -->
				
				<?php if (!is_page()) { ?>
				<div class="entry-footer">
					<div class="comment-count">			
						<?php if(comments_open() || pings_open()) { 
								comments_number('','1','%'); ?> <a href="#"><?php comments_popup_link('Leave a Comment &#187;', 'Comment &#187;', 'Comments &#187;'); ?></a>
						<?php } ?>								
开发者ID:GreeneHillFoodCoop,项目名称:public-website,代码行数:31,代码来源:index.php


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