• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP bp_is_user_notifications函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: do_action

do_action('bp_before_member_body');
if (bp_is_user_activity() || !bp_current_component()) {
    bp_get_template_part('members/single/activity');
} elseif (bp_is_user_blogs()) {
    bp_get_template_part('members/single/blogs');
} elseif (bp_is_user_friends()) {
    bp_get_template_part('members/single/friends');
} elseif (bp_is_user_groups()) {
    bp_get_template_part('members/single/groups');
} elseif (bp_is_user_messages()) {
    bp_get_template_part('members/single/messages');
} elseif (bp_is_user_profile()) {
    bp_get_template_part('members/single/profile');
} elseif (bp_is_user_forums()) {
    bp_get_template_part('members/single/forums');
} elseif (bp_is_user_notifications()) {
    bp_get_template_part('members/single/notifications');
} elseif (bp_is_user_settings()) {
    bp_get_template_part('members/single/settings');
    // If nothing sticks, load a generic template
} else {
    bp_get_template_part('members/single/plugins');
}
do_action('bp_after_member_body');
?>

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

  </div>
    <!-- end .row -->
开发者ID:quyip8818,项目名称:wps,代码行数:31,代码来源:home.php


示例2: rendez_vous_format_notifications

/**
 * Format screen notifications
 *
 * @package Rendez Vous
 * @subpackage Notifications
 *
 * @since Rendez Vous (1.0.0)
 */
function rendez_vous_format_notifications($action, $item_id, $secondary_item_id, $total_items, $format = 'string')
{
    $bp = buddypress();
    switch ($action) {
        case 'rendez_vous_schedule':
            if ((int) $total_items > 1) {
                $rendez_vous_link = add_query_arg(array('n' => $total_items), trailingslashit(bp_loggedin_user_domain() . $bp->rendez_vous->slug . '/schedule'));
                $title = __('rendez-vous preferences updated', 'rendez-vous');
                $text = sprintf(__('%d rendez-vous preferences updated', 'rendez-vous'), (int) $total_items);
                $filter = 'rendez_vous_multiple_userset_notification';
            } else {
                $rendez_vous_link = add_query_arg(array('n' => 1), rendez_vous_get_single_link($item_id, bp_loggedin_user_id()));
                $user_fullname = bp_core_get_user_displayname($secondary_item_id, false);
                $title = __('View the rendez-vous', 'rendez-vous');
                $text = sprintf(__('%s set his preferences about a rendez-vous', 'rendez-vous'), $user_fullname);
                $filter = 'rendez_vous_single_userset_notification';
            }
            break;
        case 'rendez_vous_attend':
            if ((int) $total_items > 1) {
                $rendez_vous_link = add_query_arg(array('n' => $total_items), trailingslashit(bp_loggedin_user_domain() . $bp->rendez_vous->slug . '/attend'));
                $title = __('rendez-vous sheduled', 'rendez-vous');
                $text = sprintf(__('%d rendez-vous sheduled', 'rendez-vous'), (int) $total_items);
                $filter = 'rendez_vous_multiple_attend_notification';
            } else {
                $rendez_vous_link = add_query_arg(array('n' => 1), rendez_vous_get_single_link($item_id, $secondary_item_id));
                $user_fullname = bp_core_get_user_displayname($secondary_item_id, false);
                $title = __('View the rendez-vous', 'rendez-vous');
                $text = sprintf(__('%s scheduled a rendez-vous', 'rendez-vous'), $user_fullname);
                $filter = 'rendez_vous_single_attend_notification';
            }
            break;
        case 'rendez_vous_fixed':
            if ((int) $total_items > 1) {
                $rendez_vous_link = add_query_arg(array('n' => $total_items), trailingslashit(bp_loggedin_user_domain() . $bp->rendez_vous->slug . '/attend'));
                $title = __('rendez-vous fixed', 'rendez-vous');
                $text = sprintf(__('%d rendez-vous fixed', 'rendez-vous'), (int) $total_items);
                $filter = 'rendez_vous_multiple_fixed_notification';
            } else {
                $rendez_vous_link = add_query_arg(array('n' => 1), rendez_vous_get_single_link($item_id, $secondary_item_id));
                $user_fullname = bp_core_get_user_displayname($secondary_item_id, false);
                $title = __('View the rendez-vous', 'rendez-vous');
                $text = sprintf(__('%s fixed a rendez-vous', 'rendez-vous'), $user_fullname);
                $filter = 'rendez_vous_single_fixed_notification';
            }
            break;
        case 'rendez_vous_report':
            if ((int) $total_items > 1) {
                $rendez_vous_link = add_query_arg(array('n' => $total_items), trailingslashit(bp_loggedin_user_domain() . $bp->rendez_vous->slug . '/attend'));
                $title = __('rendez-vous report created', 'rendez-vous');
                $text = sprintf(__('%d rendez-vous reports created', 'rendez-vous'), (int) $total_items);
                $filter = 'rendez_vous_multiple_report_notification';
            } else {
                $rendez_vous_link = add_query_arg(array('n' => 1), rendez_vous_get_single_link($item_id, $secondary_item_id));
                $user_fullname = bp_core_get_user_displayname($secondary_item_id, false);
                $title = __('View the rendez-vous', 'rendez-vous');
                $text = sprintf(__('%s created a report for a rendez-vous', 'rendez-vous'), $user_fullname);
                $filter = 'rendez_vous_single_report_notification';
            }
            break;
    }
    /**
     * If on notifications read screen remove the n arguments to
     * avoid re runing the mark notification function
     */
    if (bp_is_user_notifications() && bp_is_current_action('read')) {
        $rendez_vous_link = remove_query_arg('n', $rendez_vous_link);
    }
    if ('string' == $format) {
        $return = apply_filters($filter, '<a href="' . esc_url($rendez_vous_link) . '" title="' . esc_attr($title) . '">' . esc_html($text) . '</a>', $rendez_vous_link, (int) $total_items, $item_id, $secondary_item_id);
    } else {
        $return = apply_filters($filter, array('text' => $text, 'link' => esc_url($rendez_vous_link)), $rendez_vous_link, (int) $total_items, $item_id, $secondary_item_id);
    }
    do_action('rendez_vous_format_notifications', $action, $item_id, $secondary_item_id, $total_items);
    return $return;
}
开发者ID:socialray,项目名称:surfied-2-0,代码行数:84,代码来源:rendez-vous-notifications.php


示例3: bp_follow_filter_unread_notifications

/**
 * Filter notifications by component action.
 *
 * Only applicable in BuddyPress 2.1+.
 *
 * @since 1.3.0
 *
 * @param array $retval Current notification parameters.
 * @return array
 */
function bp_follow_filter_unread_notifications($retval)
{
    // make sure we're on a user's notification page
    if (!bp_is_user_notifications()) {
        return $retval;
    }
    // make sure we're doing this for the main notifications loop
    if (!did_action('bp_before_member_body')) {
        return $retval;
    }
    // filter notifications by action
    if (!empty($_GET['action'])) {
        $retval['component_action'] = sanitize_title($_GET['action']);
        // remove this filter to prevent any other notification loop getting filtered
        remove_filter('bp_after_has_notifications_parse_args', 'bp_follow_filter_unread_notifications');
    }
    return $retval;
}
开发者ID:vikramshaw,项目名称:buddypress-followers,代码行数:28,代码来源:notifications.php


示例4: locate_template

    locate_template(array('members/single/activity.php'), true);
} elseif (bp_is_user_blogs()) {
    locate_template(array('members/single/blogs.php'), true);
} elseif (bp_is_user_friends()) {
    locate_template(array('members/single/friends.php'), true);
} elseif (bp_is_user_groups()) {
    locate_template(array('members/single/groups.php'), true);
} elseif (bp_is_user_messages()) {
    locate_template(array('members/single/messages.php'), true);
} elseif (bp_is_user_profile()) {
    locate_template(array('members/single/profile.php'), true);
} elseif (bp_is_user_forums()) {
    locate_template(array('members/single/forums.php'), true);
} elseif (bp_is_user_settings()) {
    locate_template(array('members/single/settings.php'), true);
} elseif (function_exists('bp_is_user_notifications') && bp_is_user_notifications()) {
    locate_template(array('members/single/notifications.php'), true);
    // If nothing sticks, load a generic template
} else {
    locate_template(array('members/single/plugins.php'), true);
}
do_action('bp_after_member_body');
?>

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

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

		</div><!-- .padder -->
开发者ID:shads196770,项目名称:cbox-theme,代码行数:31,代码来源:home.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP bp_is_user_profile函数代码示例发布时间:2022-05-24
下一篇:
PHP bp_is_user_messages函数代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap