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


PHP bp_get_total_mention_count_for_user函数代码示例

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


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

示例1: do_action

					<?php 
        do_action('bp_before_activity_type_tab_mentions');
        ?>

					<li id="activity-mentions"><a href="<?php 
        echo bp_loggedin_user_domain() . bp_get_activity_slug() . '/mentions/';
        ?>
" title="<?php 
        _e('Activity that I have been mentioned in.', 'buddypress');
        ?>
"><?php 
        _e('Mentions', 'buddypress');
        if (bp_get_total_mention_count_for_user(bp_loggedin_user_id())) {
            ?>
 <strong><span><?php 
            printf(_nx('%s new', '%s new', bp_get_total_mention_count_for_user(bp_loggedin_user_id()), 'Number of new activity mentions', 'buddypress'), bp_get_total_mention_count_for_user(bp_loggedin_user_id()));
            ?>
</span></strong><?php 
        }
        ?>
</a></li>

				<?php 
    }
    ?>

			<?php 
}
?>

			<?php 
开发者ID:quyip8818,项目名称:wps,代码行数:31,代码来源:index.php

示例2: do_action

						<?php 
    do_action('bp_before_activity_type_tab_mentions');
    ?>

						<li id="activity-mentions"><a href="<?php 
    echo bp_loggedin_user_domain() . bp_get_activity_slug() . '/mentions/';
    ?>
" title="<?php 
    _e('Activity that I have been mentioned in.', 'buddypress');
    ?>
"><?php 
    _e('Mentions', 'buddypress');
    if (bp_get_total_mention_count_for_user(bp_loggedin_user_id())) {
        ?>
 <strong><?php 
        printf(__('<span>%s new</span>', 'buddypress'), bp_get_total_mention_count_for_user(bp_loggedin_user_id()));
        ?>
</strong><?php 
    }
    ?>
</a></li>

					<?php 
}
?>

					<?php 
do_action('bp_activity_type_tabs');
?>
				</ul>
			</div><!-- .item-list-tabs -->
开发者ID:naomicbush,项目名称:bp-default,代码行数:31,代码来源:index.php

示例3: setup_admin_bar

 /**
  * Set up the component entries in the WordPress Admin Bar.
  *
  * @since BuddyPress (1.5)
  *
  * @see BP_Component::setup_nav() for a description of the $wp_admin_nav
  *      parameter array.
  * @uses is_user_logged_in()
  * @uses trailingslashit()
  * @uses bp_get_total_mention_count_for_user()
  * @uses bp_loggedin_user_id()
  * @uses bp_is_active()
  * @uses bp_get_friends_slug()
  * @uses bp_get_groups_slug()
  *
  * @param array $wp_admin_nav See BP_Component::setup_admin_bar() for a
  *                            description.
  */
 public function setup_admin_bar($wp_admin_nav = array())
 {
     $bp = buddypress();
     // Menus for logged in user
     if (is_user_logged_in()) {
         // Setup the logged in user variables
         $user_domain = bp_loggedin_user_domain();
         $activity_link = trailingslashit($user_domain . $this->slug);
         // Unread message count
         if (bp_activity_do_mentions()) {
             $count = bp_get_total_mention_count_for_user(bp_loggedin_user_id());
             if (!empty($count)) {
                 $title = sprintf(__('Mentions <span class="count">%s</span>', 'buddypress'), number_format_i18n($count));
             } else {
                 $title = __('Mentions', 'buddypress');
             }
         }
         // Add the "Activity" sub menu
         $wp_admin_nav[] = array('parent' => $bp->my_account_menu_id, 'id' => 'my-account-' . $this->id, 'title' => __('Activity', 'buddypress'), 'href' => trailingslashit($activity_link));
         // Personal
         $wp_admin_nav[] = array('parent' => 'my-account-' . $this->id, 'id' => 'my-account-' . $this->id . '-personal', 'title' => __('Personal', 'buddypress'), 'href' => trailingslashit($activity_link));
         // Mentions
         if (bp_activity_do_mentions()) {
             $wp_admin_nav[] = array('parent' => 'my-account-' . $this->id, 'id' => 'my-account-' . $this->id . '-mentions', 'title' => $title, 'href' => trailingslashit($activity_link . 'mentions'));
         }
         // Favorites
         $wp_admin_nav[] = array('parent' => 'my-account-' . $this->id, 'id' => 'my-account-' . $this->id . '-favorites', 'title' => __('Favorites', 'buddypress'), 'href' => trailingslashit($activity_link . 'favorites'));
         // Friends?
         if (bp_is_active('friends')) {
             $wp_admin_nav[] = array('parent' => 'my-account-' . $this->id, 'id' => 'my-account-' . $this->id . '-friends', 'title' => __('Friends', 'buddypress'), 'href' => trailingslashit($activity_link . bp_get_friends_slug()));
         }
         // Groups?
         if (bp_is_active('groups')) {
             $wp_admin_nav[] = array('parent' => 'my-account-' . $this->id, 'id' => 'my-account-' . $this->id . '-groups', 'title' => __('Groups', 'buddypress'), 'href' => trailingslashit($activity_link . bp_get_groups_slug()));
         }
     }
     parent::setup_admin_bar($wp_admin_nav);
 }
开发者ID:danielcoats,项目名称:schoolpress,代码行数:56,代码来源:bp-activity-loader.php

示例4: setup_admin_bar

 /**
  * Set up the component entries in the WordPress Admin Bar.
  *
  * @since 1.5.0
  *
  * @see BP_Component::setup_nav() for a description of the $wp_admin_nav
  *      parameter array.
  * @uses is_user_logged_in()
  * @uses trailingslashit()
  * @uses bp_get_total_mention_count_for_user()
  * @uses bp_loggedin_user_id()
  * @uses bp_is_active()
  * @uses bp_get_friends_slug()
  * @uses bp_get_groups_slug()
  *
  * @param array $wp_admin_nav See BP_Component::setup_admin_bar() for a
  *                            description.
  */
 public function setup_admin_bar($wp_admin_nav = array())
 {
     // Menus for logged in user.
     if (is_user_logged_in()) {
         // Setup the logged in user variables.
         $activity_link = trailingslashit(bp_loggedin_user_domain() . bp_get_activity_slug());
         // Unread message count.
         if (bp_activity_do_mentions()) {
             $count = bp_get_total_mention_count_for_user(bp_loggedin_user_id());
             if (!empty($count)) {
                 $title = sprintf(_x('Mentions <span class="count">%s</span>', 'Toolbar Mention logged in user', 'buddypress'), bp_core_number_format($count));
             } else {
                 $title = _x('Mentions', 'Toolbar Mention logged in user', 'buddypress');
             }
         }
         // Add the "Activity" sub menu.
         $wp_admin_nav[] = array('parent' => buddypress()->my_account_menu_id, 'id' => 'my-account-' . $this->id, 'title' => _x('Activity', 'My Account Activity sub nav', 'buddypress'), 'href' => $activity_link);
         // Personal.
         $wp_admin_nav[] = array('parent' => 'my-account-' . $this->id, 'id' => 'my-account-' . $this->id . '-personal', 'title' => _x('Personal', 'My Account Activity sub nav', 'buddypress'), 'href' => $activity_link);
         // Mentions.
         if (bp_activity_do_mentions()) {
             $wp_admin_nav[] = array('parent' => 'my-account-' . $this->id, 'id' => 'my-account-' . $this->id . '-mentions', 'title' => $title, 'href' => trailingslashit($activity_link . 'mentions'));
         }
         // Favorite activity items.
         if (bp_activity_can_favorite()) {
             $wp_admin_nav[] = array('parent' => 'my-account-' . $this->id, 'id' => 'my-account-' . $this->id . '-favorites', 'title' => _x('Favorites', 'My Account Activity sub nav', 'buddypress'), 'href' => trailingslashit($activity_link . 'favorites'));
         }
         // Friends?
         if (bp_is_active('friends')) {
             $wp_admin_nav[] = array('parent' => 'my-account-' . $this->id, 'id' => 'my-account-' . $this->id . '-friends', 'title' => _x('Friends', 'My Account Activity sub nav', 'buddypress'), 'href' => trailingslashit($activity_link . bp_get_friends_slug()));
         }
         // Groups?
         if (bp_is_active('groups')) {
             $wp_admin_nav[] = array('parent' => 'my-account-' . $this->id, 'id' => 'my-account-' . $this->id . '-groups', 'title' => _x('Groups', 'My Account Activity sub nav', 'buddypress'), 'href' => trailingslashit($activity_link . bp_get_groups_slug()));
         }
     }
     parent::setup_admin_bar($wp_admin_nav);
 }
开发者ID:swissspidy,项目名称:BuddyPress,代码行数:56,代码来源:bp-activity-loader.php

示例5: do_action

						<?php 
    do_action('bp_before_activity_type_tab_mentions');
    ?>

						<li id="activity-mentions"><a href="<?php 
    echo bp_loggedin_user_domain() . bp_get_activity_slug() . '/mentions/';
    ?>
" title="<?php 
    _e('Activity that I have been mentioned in.', 'firmasite');
    ?>
"><?php 
    _e('Mentions', 'firmasite');
    if (bp_get_total_mention_count_for_user(bp_loggedin_user_id())) {
        ?>
 <strong><span><?php 
        printf(_nx('%s new', '%s new', bp_get_total_mention_count_for_user(bp_loggedin_user_id()), 'Number of new activity mentions', 'firmasite'), number_format_i18n(bp_get_total_mention_count_for_user(bp_loggedin_user_id())));
        ?>
</span></strong><?php 
    }
    ?>
</a></li>

					<?php 
}
?>

					<?php 
do_action('bp_activity_type_tabs');
?>
				</ul>
			</div><!-- .item-list-tabs -->
开发者ID:paulmedwal,项目名称:edxforumspublic,代码行数:31,代码来源:index.php

示例6: bp_total_mention_count_for_user

/**
 * Output the total mention count for a specified user.
 *
 * @since BuddyPress (1.2.0)
 *
 * @see bp_get_total_mention_count_for_user() for description of parameters.
 * @uses bp_get_total_favorite_count_for_user()
 *
 * @param int $user_id See {@link bp_get_total_mention_count_for_user()}.
 */
function bp_total_mention_count_for_user($user_id = 0)
{
    echo bp_get_total_mention_count_for_user($user_id);
}
开发者ID:sdh100shaun,项目名称:pantheon,代码行数:14,代码来源:bp-activity-template.php

示例7: bp_loggedin_user_domain

</span></a></li>
					<?php 
    }
    ?>
					
					<li id="activity-mentions">
						<a href="<?php 
    echo bp_loggedin_user_domain() . bp_get_activity_slug() . '/mentions/';
    ?>
" title="Activity where I'm mentioned">My Mentions
						<?php 
    if (bp_get_total_mention_count_for_user()) {
        ?>
 
							<span><?php 
        echo bp_get_total_mention_count_for_user();
        ?>
</span>
						<?php 
    }
    ?>
						</a>
					</li>		
				<?php 
}
?>
			</ul>
		</nav><!-- #directory-nav -->

		<?php 
if (is_user_logged_in()) {
开发者ID:tamriel-foundry,项目名称:apoc2,代码行数:31,代码来源:index.php

示例8: do_action

										<?php 
        do_action('bp_before_activity_type_tab_mentions');
        ?>

										<li id="activity-mentions"><a href="<?php 
        echo bp_loggedin_user_domain() . bp_get_activity_slug() . '/mentions/';
        ?>
" title="<?php 
        _e('Activity that I have been mentioned in.', 'wplms_modern');
        ?>
"><?php 
        _e('Mentions', 'wplms_modern');
        if (bp_get_total_mention_count_for_user(bp_loggedin_user_id())) {
            ?>
 <strong><span><?php 
            printf(_nx('%s new', '%s new', bp_get_total_mention_count_for_user(bp_loggedin_user_id()), 'Number of new activity mentions', 'wplms_modern'), bp_get_total_mention_count_for_user(bp_loggedin_user_id()));
            ?>
</span></strong><?php 
        }
        ?>
</a></li>

									<?php 
    }
    ?>

								<?php 
}
?>

								<?php 
开发者ID:nikitansk,项目名称:devschool,代码行数:31,代码来源:index.php

示例9: if

						<?php if ( function_exists( 'bp_get_total_group_count_for_user' ) ) : ?>
							<?php if ( bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ) : ?>
								<li id="activity-groups"><a href="<?php echo bp_loggedin_user_domain() . BP_ACTIVITY_SLUG . '/' . BP_GROUPS_SLUG . '/' ?>" title="<?php _e( 'The activity of groups I am a member of.', 'buddypress' ) ?>"><?php printf( __( 'My Groups (%s)', 'buddypress' ), bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ) ?></a></li>
							<?php endif; ?>
						<?php endif; ?>

						<?php do_action( 'bp_before_activity_type_tab_favorites' ) ?>

						<?php if ( bp_get_total_favorite_count_for_user( bp_loggedin_user_id() ) ) : ?>
							<li id="activity-favorites"><a href="<?php echo bp_loggedin_user_domain() . BP_ACTIVITY_SLUG . '/favorites/' ?>" title="<?php _e( "The activity I've marked as a favorite.", 'buddypress' ) ?>"><?php printf( __( 'My Favorites (<span>%s</span>)', 'buddypress' ), bp_get_total_favorite_count_for_user( bp_loggedin_user_id() ) ) ?></a></li>
						<?php endif; ?>

						<?php do_action( 'bp_before_activity_type_tab_mentions' ) ?>

						<li id="activity-mentions"><a href="<?php echo bp_loggedin_user_domain() . BP_ACTIVITY_SLUG . '/mentions/' ?>" title="<?php _e( 'Activity that I have been mentioned in.', 'buddypress' ) ?>"><?php printf( __( '@%s Mentions', 'buddypress' ), bp_get_loggedin_user_username() ) ?><?php if ( bp_get_total_mention_count_for_user( bp_loggedin_user_id() ) ) : ?> <strong><?php printf( __( '(%s new)', 'buddypress' ), bp_get_total_mention_count_for_user( bp_loggedin_user_id() ) ) ?></strong><?php endif; ?></a></li>

					<?php endif; ?>

					<?php do_action( 'bp_activity_type_tabs' ) ?>
				</ul>
			</div><!-- .item-list-tabs -->

			<div class="item-list-tabs no-ajax" id="subnav">
				<ul>
					<li class="feed"><a href="<?php bp_sitewide_activity_feed_link() ?>" title="<?php _e( 'RSS Feed', 'buddypress' ); ?>"><?php _e( 'RSS', 'buddypress' ) ?></a></li>

					<?php do_action( 'bp_activity_syndication_options' ) ?>

					<li id="activity-filter-select" class="last">
						<select>
开发者ID:n-sane,项目名称:zaroka,代码行数:30,代码来源:index.php

示例10: test_bp_activity_remove_screen_notifications_on_new_mentions_cleared

 /**
  * @group bp_activity_remove_screen_notifications
  * @group mentions
  * @ticket BP6687
  */
 public function test_bp_activity_remove_screen_notifications_on_new_mentions_cleared()
 {
     $this->create_notifications();
     $notifications = BP_Notifications_Notification::get(array('item_id' => $this->a1));
     // Double check it's there
     $this->assertEquals(array($this->a1), wp_list_pluck($notifications, 'item_id'));
     $this->assertEquals(1, bp_get_total_mention_count_for_user($this->u1));
     // Clear notifications for $this->u1
     bp_activity_clear_new_mentions($this->u1);
     $notifications = BP_Notifications_Notification::get(array('item_id' => $this->a1));
     $this->assertEmpty($notifications, 'Notifications should be cleared when new mention metas are removed');
     $this->assertEmpty(bp_get_total_mention_count_for_user($this->u1));
 }
开发者ID:dcavins,项目名称:buddypress-svn,代码行数:18,代码来源:notifications.php


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