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


PHP bp_word_or_name函数代码示例

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


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

示例1: bp_friends_random_friends

function bp_friends_random_friends() {
	global $bp;

	if ( !$friend_ids = wp_cache_get( 'friends_friend_ids_' . $bp->displayed_user->id, 'bp' ) ) {
		$friend_ids = BP_Friends_Friendship::get_random_friends( $bp->displayed_user->id );
		wp_cache_set( 'friends_friend_ids_' . $bp->displayed_user->id, $friend_ids, 'bp' );
	}
?>
	<div class="info-group">
		<h4><?php bp_word_or_name( __( "My Friends", 'buddypress' ), __( "%s's Friends", 'buddypress' ) ) ?>  (<?php echo BP_Friends_Friendship::total_friend_count( $bp->displayed_user->id ) ?>) <span><a href="<?php echo $bp->displayed_user->domain . $bp->friends->slug ?>"><?php _e('See All', 'buddypress') ?> &rarr;</a></span></h4>

		<?php if ( $friend_ids ) { ?>
			<ul class="horiz-gallery">
			<?php for ( $i = 0; $i < count( $friend_ids ); $i++ ) { ?>
				<li>
					<a href="<?php echo bp_core_get_user_domain( $friend_ids[$i] ) ?>"><?php echo bp_core_fetch_avatar( array( 'item_id' => $friend_ids[$i], 'type' => 'thumb' ) ) ?></a>
					<h5><?php echo bp_core_get_userlink($friend_ids[$i]) ?></h5>
				</li>
			<?php } ?>
			</ul>
		<?php } else { ?>
			<div id="message" class="info">
				<p><?php bp_word_or_name( __( "You haven't added any friend connections yet.", 'buddypress' ), __( "%s hasn't created any friend connections yet.", 'buddypress' ) ) ?></p>
			</div>
		<?php } ?>
		<div class="clear"></div>
	</div>
<?php
}
开发者ID:n-sane,项目名称:zaroka,代码行数:29,代码来源:bp-friends-templatetags.php

示例2: bp_word_or_name

		<?php 
    }
    ?>
		</ul>

	<?php 
} else {
    ?>

		<?php 
    if (bp_group_show_no_groups_message()) {
        ?>
		
			<div id="message" class="info">
				<p><?php 
        bp_word_or_name(__("You haven't joined any groups yet.", 'buddypress'), __("%s hasn't joined any groups yet.", 'buddypress'));
        ?>
</p>
			</div>
	
			<?php 
        if (bp_is_home()) {
            ?>
				
				<h3><?php 
            _e('Why not join a few of these groups?', 'buddypress');
            ?>
</h3>
				<?php 
            bp_groups_random_selection();
            ?>
开发者ID:alvaropereyra,项目名称:shrekcms,代码行数:31,代码来源:group-loop.php

示例3: bp_friends_random_friends

		
			<?php 
if (function_exists('bp_friends_random_friends')) {
    ?>
				<?php 
    bp_friends_random_friends();
    ?>
			<?php 
}
?>

			<?php 
bp_custom_profile_boxes();
?>

			<?php 
if (function_exists('bp_wire_get_post_list')) {
    ?>
				<?php 
    bp_wire_get_post_list(bp_current_user_id(), bp_word_or_name(__("My Wire", 'buddypress'), __("%s's Wire", 'buddypress'), true, false), bp_word_or_name(__("No one has posted to your wire yet.", 'buddypress'), __("No one has posted to %s's wire yet.", 'buddypress'), true, false), bp_profile_wire_can_post());
    ?>
			<?php 
}
?>
		</div>
	</div>

</div>

<?php 
get_footer();
开发者ID:alvaropereyra,项目名称:shrekcms,代码行数:30,代码来源:index.php

示例4: bp_word_or_name

        ?>
</p>
				</li>
				
			<?php 
    }
    ?>
		</ul>
		
	<?php 
} else {
    ?>

		<div id="message" class="info">
			<p><?php 
    bp_word_or_name(__("You haven't created any blogs yet.", 'buddypress'), __("%s hasn't created any public blogs yet.", 'buddypress'));
    ?>
 <?php 
    bp_create_blog_link();
    ?>
</p>
		</div>

	<?php 
}
?>

  </div>

</div>
开发者ID:alvaropereyra,项目名称:shrekcms,代码行数:30,代码来源:my-blogs.php

示例5: bp_album_get_prev_picture_or_album_link

function bp_album_get_prev_picture_or_album_link($text = '&laquo; ', $title = true)
{
    global $pictures_template;
    if ($pictures_template->has_prev_pic()) {
        $text .= $title ? bp_album_get_prev_picture_title() : '';
        return '<a href="' . bp_album_get_prev_picture_url() . '" class="picture-prev-link"><span>' . $text . '</span> </a>';
    } else {
        return '<a href="' . bp_album_get_pictures_url() . '" class="picture-album-link picture-prev-link"><span> ' . bp_word_or_name(__("Return to your album", 'bp-album'), __("Return to %s album", 'bp-album'), false, false) . '</span> </a>';
    }
}
开发者ID:narabikke,项目名称:wordpress,代码行数:10,代码来源:bpa.template.tags.php

示例6: bp_album_setup_nav

 /**
  * bp_album_setup_nav()
  *
  * Sets up the user profile navigation items for the component. This adds the top level nav
  * item and all the sub level nav items to the navigation array. This is then
  * rendered in the template.
  *
  * @version 0.1.8.12
  * @since 0.1.8.0
  */
 function bp_album_setup_nav()
 {
     global $bp, $pictures_template;
     $nav_item_name = apply_filters('bp_album_nav_item_name', __('Album', 'bp-album'));
     bp_core_new_nav_item(array('name' => $nav_item_name, 'slug' => $bp->album->slug, 'position' => 80, 'screen_function' => 'bp_album_screen_pictures', 'default_subnav_slug' => $bp->album->pictures_slug, 'show_for_displayed_user' => true));
     $album_link = '';
     $album_link_title = '';
     if ($bp->current_component == $bp->album->slug) {
         $album_link = ($bp->displayed_user->id ? $bp->displayed_user->domain : $bp->loggedin_user->domain) . $bp->album->slug . '/';
         $album_link_title = $bp->displayed_user->id ? bp_word_or_name(__("My pictures", 'bp-album'), __("%s's pictures", 'bp-album'), false, false) : __("My pictures", 'bp-album');
     }
     bp_core_new_subnav_item(array('name' => $album_link_title, 'slug' => $bp->album->pictures_slug, 'parent_slug' => $bp->album->slug, 'parent_url' => $album_link, 'screen_function' => 'bp_album_screen_pictures', 'position' => 10));
     if ($bp->current_component == $bp->album->slug && $bp->current_action == $bp->album->single_slug) {
         add_filter('bp_get_displayed_user_nav_' . $bp->album->single_slug, 'bp_album_single_subnav_filter', 10, 2);
         bp_core_new_subnav_item(array('name' => __('Picture', 'bp-album'), 'slug' => $bp->album->single_slug, 'parent_slug' => $bp->album->slug, 'parent_url' => $album_link, 'screen_function' => 'bp_album_screen_single', 'position' => 20));
     }
     bp_core_new_subnav_item(array('name' => __('Upload picture', 'bp-album'), 'slug' => $bp->album->upload_slug, 'parent_slug' => $bp->album->slug, 'parent_url' => $album_link, 'screen_function' => 'bp_album_screen_upload', 'position' => 30, 'user_has_access' => bp_is_my_profile()));
 }
开发者ID:igniterealtime,项目名称:community-plugins,代码行数:28,代码来源:bpa.core.php

示例7: bp_album_picture_title_truncate

        bp_album_picture_title_truncate();
        ?>
</a>
				</div>

						<?php 
    }
    ?>
				</div>
					<?php 
} else {
    ?>

				<div id="message" class="info">
					<p><?php 
    echo bp_word_or_name(__("You don't have any photos yet. Why not upload some!", 'bp-album'), __("Either %s hasn't uploaded any pictures yet or they have restricted access", 'bp-album'), false, false);
    ?>
</p>
				</div>

				<?php 
}
?>

			</div><!-- #item-body -->

		</div><!-- .padder -->
	</div><!-- #content -->

	<?php 
locate_template(array('sidebar.php'), true);
开发者ID:narabikke,项目名称:wordpress,代码行数:31,代码来源:pictures.php

示例8: bp_friends_random_friends

/**
 * Output a block of random friends.
 *
 * No longer used in BuddyPress.
 *
 * @todo Deprecate
 */
function bp_friends_random_friends()
{
    if (!($friend_ids = wp_cache_get('friends_friend_ids_' . bp_displayed_user_id(), 'bp'))) {
        $friend_ids = BP_Friends_Friendship::get_random_friends(bp_displayed_user_id());
        wp_cache_set('friends_friend_ids_' . bp_displayed_user_id(), $friend_ids, 'bp');
    }
    ?>

	<div class="info-group">
		<h4><?php 
    bp_word_or_name(__("My Friends", 'buddypress'), __("%s's Friends", 'buddypress'));
    ?>
  (<?php 
    echo BP_Friends_Friendship::total_friend_count(bp_displayed_user_id());
    ?>
) <span><a href="<?php 
    echo trailingslashit(bp_displayed_user_domain() . bp_get_friends_slug());
    ?>
"><?php 
    _e('See All', 'buddypress');
    ?>
</a></span></h4>

		<?php 
    if ($friend_ids) {
        ?>

			<ul class="horiz-gallery">

			<?php 
        for ($i = 0, $count = count($friend_ids); $i < $count; ++$i) {
            ?>

				<li>
					<a href="<?php 
            echo bp_core_get_user_domain($friend_ids[$i]);
            ?>
"><?php 
            echo bp_core_fetch_avatar(array('item_id' => $friend_ids[$i], 'type' => 'thumb'));
            ?>
</a>
					<h5><?php 
            echo bp_core_get_userlink($friend_ids[$i]);
            ?>
</h5>
				</li>

			<?php 
        }
        ?>

			</ul>

		<?php 
    } else {
        ?>

			<div id="message" class="info">
				<p><?php 
        bp_word_or_name(__("You haven't added any friend connections yet.", 'buddypress'), __("%s hasn't created any friend connections yet.", 'buddypress'));
        ?>
</p>
			</div>

		<?php 
    }
    ?>

		<div class="clear"></div>
	</div>

<?php 
}
开发者ID:mawilliamson,项目名称:wordpress,代码行数:80,代码来源:bp-friends-template.php

示例9: get_header

<?php

get_header();
?>

<div class="content-header">
	<ul class="content-header-nav">
		<?php 
bp_groups_header_tabs();
?>
	</ul>
</div>

<div id="content">
	<h2><?php 
bp_word_or_name(__("My Groups", 'buddypress'), __("%s's Groups", 'buddypress'));
?>
 &raquo; <?php 
bp_groups_filter_title();
?>
</h2>
	
	<div class="left-menu">
		<?php 
bp_group_search_form();
?>
	</div>
	
	<div class="main-column">
		<?php 
do_action('template_notices');
开发者ID:alvaropereyra,项目名称:shrekcms,代码行数:31,代码来源:index.php

示例10: bp_post_tags

				<p class="postmetadata"><?php 
        bp_post_tags('<span class="tags">', ', ', '</span>');
        ?>
  <span class="comments"><?php 
        bp_post_comments(__('No Comments'), __('1 Comment'), __('% Comments'));
        ?>
</span></p>
				<hr />
			</div>
			<?php 
    }
    ?>
	<?php 
} else {
    ?>

		<div id="message" class="info">
			<p><?php 
    bp_word_or_name(__("You haven't made any posts yet.", 'buddypress'), __("%s hasn't made any posts yet.", 'buddypress'));
    ?>
</p>
		</div>

	<?php 
}
?>

</div>

<?php 
get_footer();
开发者ID:alvaropereyra,项目名称:shrekcms,代码行数:31,代码来源:recent-posts.php

示例11: _e

		<?php 
    if (bp_friends_is_filtered()) {
        ?>
			<div id="message" class="info">
				<p><?php 
        _e("No friends matched your search filter terms", 'buddypress');
        ?>
</p>
			</div>			
		<?php 
    } else {
        ?>
			<div id="message" class="info">
				<p><?php 
        bp_word_or_name(__("Your friends list is currently empty", 'buddypress'), __("%s's friends list is currently empty", 'buddypress'));
        ?>
</p>
			</div>
		<?php 
    }
    ?>
		
		<?php 
    if (bp_is_home() && !bp_friends_is_filtered()) {
        ?>
			<h3><?php 
        _e('Why not make friends with some of these members?', 'buddypress');
        ?>
</h3>
			<?php 
开发者ID:alvaropereyra,项目名称:shrekcms,代码行数:30,代码来源:friends-loop.php

示例12: bp_album_screen_single_image

function bp_album_screen_single_image()
{
    ?>
	<?php 
    if (bp_album_has_pictures()) {
        bp_album_the_picture();
        ?>



		<div class="picture-single">

			<div class="single-picture-links"><?php 
        bp_album_adjacent_links();
        ?>
</div>
			<h3><?php 
        bp_album_picture_title();
        ?>
</h3>
        	<div class="picture-outer-container">
        		<div class="picture-inner-container">
	                <div class="picture-middle">
		                <img src="<?php 
        bp_album_picture_middle_url();
        ?>
" />
	                </div>
                </div>
            </div>



			<p class="picture-description"><?php 
        bp_album_picture_desc();
        ?>
</p>

            <div class="single-picture-meta">
            	<div class="picture-edit-link"><?php 
        bp_album_picture_edit_link();
        ?>
</div>
            	<div class="picture-delete-link"><?php 
        bp_album_picture_delete_link();
        ?>
</div>
            </div>
         </div>
         <div class="activity">
		<?php 
        bp_album_load_subtemplate(apply_filters('bp_album_template_screen_comments', 'album/comments'));
        ?>
         </div>


			<?php 
    } else {
        ?>

		<div id="message" class="info activity">
			<p><?php 
        echo bp_word_or_name(__("This url is not valid.", 'bp-album'), __("Either this url is not valid or picture has restricted access.", 'bp-album'), false, false);
        ?>
</p>
		</div>

	<?php 
    }
    ?>

<?php 
}
开发者ID:igniterealtime,项目名称:community-plugins,代码行数:73,代码来源:bpa.screens.php

示例13: bp_groups_random_groups

function bp_groups_random_groups($total_groups = 5)
{
    global $bp;
    if (!($group_ids = wp_cache_get('groups_random_user_groups_' . $bp->displayed_user->id . '_' . $total_groups, 'bp'))) {
        $group_ids = groups_get_random_groups_for_user($bp->displayed_user->id, $total_groups, 1);
        wp_cache_set('groups_random_user_groups_' . $bp->displayed_user->id . '_' . $total_groups, $group_ids, 'bp');
    }
    ?>
	
	<div class="info-group">
		<h4><?php 
    bp_word_or_name(__("My Groups", 'buddypress'), __("%s's Groups", 'buddypress'));
    ?>
 (<?php 
    echo BP_Groups_Member::total_group_count();
    ?>
) <a href="<?php 
    echo $bp->displayed_user->domain . $bp->groups->slug;
    ?>
"><?php 
    _e('See All', 'buddypress');
    ?>
 &raquo;</a></h4>
		<?php 
    if ($group_ids) {
        ?>
			<ul class="horiz-gallery">
			<?php 
        for ($i = 0; $i < count($group_ids); $i++) {
            if (!($group = wp_cache_get('groups_group_nouserdata_' . $group_ids[$i], 'bp'))) {
                $group = new BP_Groups_Group($group_ids[$i], false, false);
                wp_cache_set('groups_group_nouserdata_' . $group_ids[$i], $group, 'bp');
            }
            ?>
				<li>
					<a href="<?php 
            echo bp_get_group_permalink($group);
            ?>
"><img src="<?php 
            echo attribute_escape($group->avatar_thumb);
            ?>
" class="avatar" alt="<?php 
            _e('Group Avatar', 'buddypress');
            ?>
" /></a>
					<h5><a href="<?php 
            echo bp_get_group_permalink($group);
            ?>
"><?php 
            echo attribute_escape($group->name);
            ?>
</a></h5>
				</li>
			<?php 
        }
        ?>
			</ul>
		<?php 
    } else {
        ?>
			<div id="message" class="info">
				<p><?php 
        bp_word_or_name(__("You haven't joined any groups yet.", 'buddypress'), __("%s hasn't joined any groups yet.", 'buddypress'));
        ?>
</p>
			</div>
		<?php 
    }
    ?>
		<div class="clear"></div>
	</div>
<?php 
}
开发者ID:alvaropereyra,项目名称:shrekcms,代码行数:73,代码来源:bp-groups-templatetags.php

示例14: get_header

<?php 
get_header();
?>

<div class="content-header">
	<ul class="content-header-nav">
		<?php 
bp_friends_header_tabs();
?>
	</ul>
</div>

<div id="main">
	<h2><?php 
bp_word_or_name(__("My Friends", 'buddypress'), __("%s's Friends", 'buddypress'));
?>
 &rarr; <?php 
bp_friends_filter_title();
?>
</h2>
	
	<div class="page-menu">
		<?php 
bp_friend_search_form();
?>
	</div>
	
	<div class="main-column">
		<?php 
do_action('template_notices');
开发者ID:alvaropereyra,项目名称:shrekcms,代码行数:30,代码来源:index.php

示例15: bp_custom_profile_sidebar_boxes

?>
		</div>

		<?php 
bp_custom_profile_sidebar_boxes();
?>
	</div>

	<div class="main-column">
		<?php 
bp_get_profile_header();
?>

		<?php 
if (function_exists('bp_activity_get_list')) {
    ?>
			
			<?php 
    bp_activity_get_list(bp_current_user_id(), bp_word_or_name(__("Mi actividad", 'buddypress'), __("Actividad de %s", 'buddypress'), true, false), bp_word_or_name(__("Aun no has hecho nada.", 'buddypress'), __("%s no ha hecho nada aun.", 'buddypress'), true, false));
    ?>
		
		<?php 
}
?>
		
	</div>

</div>

<?php 
get_footer();
开发者ID:alvaropereyra,项目名称:shrekcms,代码行数:31,代码来源:just-me.php


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