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


PHP bp_get_group_admin_permalink函数代码示例

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


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

示例1: make_links

 /**
  * Output the quickadmin links
  *
  * @global $bp BuddyPress global settings
  * @since 1.0
  * @todo Make this work for more than just super admins.
  */
 public function make_links()
 {
     global $bp;
     if (empty($bp->loggedin_user->id) || !$bp->loggedin_user->is_super_admin) {
         return;
     }
     $url = bp_get_group_admin_permalink();
     $items = array(sprintf('<a href="%1$s">%2$s</a>', $url . '/edit-details', __('Edit', 'bpl')), sprintf('<a href="%1$s">%2$s</a>', $url . '/group-settings', __('Settings', 'bpl')), sprintf('<a href="%1$s">%2$s</a>', $url . '/group-avatar', __('Avatar', 'bpl')), sprintf('<a href="%1$s">%2$s</a>', $url . '/manage-members', __('Members', 'bpl')), sprintf('<a href="%1$s">%2$s</a>', $url . '/delete-group', __('Delete', 'bpl')));
     echo apply_filters('bplabs_make_links', '<div class="bpl-quickadmin"><span>' . implode('</span> | <span>', $items) . '</span></div>', $items);
 }
开发者ID:rmccue,项目名称:BP-Labs,代码行数:17,代码来源:class-bplabs-quickadmin.php

示例2: bp_group_admin_permalink

function bp_group_admin_permalink($group = false)
{
    echo bp_get_group_admin_permalink($group);
}
开发者ID:kd5ytx,项目名称:Empirical-Wordpress,代码行数:4,代码来源:bp-groups-template.php

示例3: bp_group_admin_permalink

function bp_group_admin_permalink()
{
    echo bp_get_group_admin_permalink();
}
开发者ID:newington,项目名称:buddypress,代码行数:4,代码来源:bp-groups-template.php

示例4: group_admin_tab

 /**
  * group_admin_tab( $current_tab, $group_slug )
  *
  * Hooks into groups_admin_tabs, and adds the courseware options tab
  */
 function group_admin_tab($current_tab, $group_slug)
 {
     // global $bp;
     $tab_content = '<li ';
     if ('courseware' == $current_tab) {
         $tab_content .= 'class="current"';
     }
     $tab_content .= '><a href="' . bp_get_group_admin_permalink() . 'courseware/">';
     $tab_content .= __('Courseware', 'bpsp') . '</a></li>';
     echo $tab_content;
 }
开发者ID:warinermedia,项目名称:buddypress-courseware,代码行数:16,代码来源:groups.class.php

示例5: maybe_map_permalink_to_group

 /**
  * Maybe map a bbPress forum/topic/reply permalink to the corresponding group
  *
  * @param int $post_id
  * @uses get_post()
  * @uses bbp_is_reply()
  * @uses bbp_get_reply_topic_id()
  * @uses bbp_get_reply_forum_id()
  * @uses bbp_is_topic()
  * @uses bbp_get_topic_forum_id()
  * @uses bbp_is_forum()
  * @uses get_post_field()
  * @uses bbp_get_forum_group_ids()
  * @uses groups_get_group()
  * @uses bp_get_group_admin_permalink()
  * @uses bp_get_group_permalink()
  * @return Bail early if not a group forum post
  * @return string
  */
 private function maybe_map_permalink_to_group($post_id = 0, $url = false)
 {
     switch (get_post_type($post_id)) {
         // Reply
         case bbp_get_reply_post_type():
             $topic_id = bbp_get_reply_topic_id($post_id);
             $forum_id = bbp_get_reply_forum_id($post_id);
             $url_end = trailingslashit($this->reply_slug) . get_post_field('post_name', $post_id);
             break;
             // Topic
         // Topic
         case bbp_get_topic_post_type():
             $topic_id = $post_id;
             $forum_id = bbp_get_topic_forum_id($post_id);
             $url_end = trailingslashit($this->topic_slug) . get_post_field('post_name', $post_id);
             break;
             // Forum
         // Forum
         case bbp_get_forum_post_type():
             $forum_id = $post_id;
             $url_end = '';
             //get_post_field( 'post_name', $post_id );
             break;
             // Unknown
         // Unknown
         default:
             return $url;
             break;
     }
     // Get group ID's for this forum
     $group_ids = bbp_get_forum_group_ids($forum_id);
     // Bail if the post isn't associated with a group
     if (empty($group_ids)) {
         return $url;
     }
     // @todo Multiple group forums/forum groups
     $group_id = $group_ids[0];
     $group = groups_get_group(array('group_id' => $group_id));
     if (bp_is_group_admin_screen($this->slug)) {
         $group_permalink = trailingslashit(bp_get_group_admin_permalink($group));
     } else {
         $group_permalink = trailingslashit(bp_get_group_permalink($group));
     }
     return trailingslashit(trailingslashit($group_permalink . $this->slug) . $url_end);
 }
开发者ID:luskyj89,项目名称:mt-wordpress,代码行数:64,代码来源:groups.php

示例6: edit_screen_save

 function edit_screen_save()
 {
     global $bp;
     if (!isset($_POST['save'])) {
         return false;
     }
     check_admin_referer('groups_edit_save_' . $this->slug);
     /** save the selected subgroup permission setting */
     $permission_options = apply_filters('bp_group_hierarchy_subgroup_permission_options', $this->subgroup_permission_options);
     if (array_key_exists($_POST['allow_children_by'], $permission_options)) {
         $allow_children_by = $_POST['allow_children_by'];
     } else {
         if (groups_get_groupmeta($bp->groups->current_group->id, 'bp_group_hierarchy_subgroup_creators') != '') {
             $allow_children_by = groups_get_groupmeta($bp->groups->current_group->id, 'bp_group_hierarchy_subgroup_creators');
         } else {
             $allow_children_by = $this->get_default_permission_option();
         }
     }
     groups_update_groupmeta($bp->groups->current_group->id, 'bp_group_hierarchy_subgroup_creators', $allow_children_by);
     if (is_super_admin()) {
         /** save changed parent_id */
         $parent_id = (int) $_POST['parent_id'];
         if (bp_group_hierarchy_can_create_subgroups($bp->loggedin_user->id, $bp->groups->current_group->id)) {
             $bp->groups->current_group->parent_id = $parent_id;
             $success = $bp->groups->current_group->save();
         }
         if (!$success) {
             bp_core_add_message(__('There was an error saving; please try again.', 'bp-group-hierarchy'), 'error');
         } else {
             bp_core_add_message(__('Group hierarchy settings saved successfully.', 'bp-group-hierarchy'));
         }
     }
     bp_core_redirect(bp_get_group_admin_permalink($bp->groups->current_group));
 }
开发者ID:adisonc,项目名称:MaineLearning,代码行数:34,代码来源:extension.php

示例7: chat_network_site_box_container

 function chat_network_site_box_container($content = '')
 {
     global $bp;
     // We don't want to add the container on our pop-out template.
     if ($this->using_popup_out_template == true) {
         return;
     }
     $site_chat_box = '';
     if (!is_admin()) {
         if ($this->get_option('bottom_corner', 'network-site') == 'enabled') {
             $_SHOW_SITE_CHAT = true;
         } else {
             $_SHOW_SITE_CHAT = false;
         }
         if ($_SHOW_SITE_CHAT == true) {
             // Are we viewing a BuddyPress Group pages?
             if (isset($bp->groups->current_group->id) && intval($bp->groups->current_group->id)) {
                 // Are we viewing the Group Admin screen?
                 $bp_group_admin_url_path = parse_url(bp_get_group_admin_permalink($bp->groups->current_group), PHP_URL_PATH);
                 $request_url_path = parse_url(get_option('siteurl') . $_SERVER['REQUEST_URI'], PHP_URL_PATH);
                 if (!empty($request_url_path) && !empty($bp_group_admin_url_path) && substr($request_url_path, 0, strlen($bp_group_admin_url_path)) == $bp_group_admin_url_path) {
                     if ($this->get_option('bp_group_admin_show_site', 'global') != "enabled") {
                         $_SHOW_SITE_CHAT = false;
                     }
                 } else {
                     if ($this->get_option('bp_group_show_site', 'global') != "enabled") {
                         $_SHOW_SITE_CHAT = false;
                     }
                 }
             } else {
                 if ($this->_chat_plugin_settings['blocked_urls']['site'] == true) {
                     $_SHOW_SITE_CHAT = false;
                 } else {
                     if ($this->get_option('blocked_on_shortcode', 'site') == 'enabled') {
                         global $post;
                         if (!empty($post->post_content) && strstr($post->post_content, '[chat ') !== false) {
                             $_SHOW_SITE_CHAT = false;
                         }
                     }
                 }
             }
         }
     } else {
         if ($this->get_option('bottom_corner_wpadmin', 'network-site') == 'enabled') {
             $_SHOW_SITE_CHAT = true;
         } else {
             $_SHOW_SITE_CHAT = false;
         }
         if ($this->_chat_plugin_settings['blocked_urls']['admin'] == true) {
             $_SHOW_SITE_CHAT = false;
         }
         if ($this->_chat_plugin_settings['blocked_urls']['site'] == true) {
             $_SHOW_SITE_CHAT = false;
         }
     }
     if ($_SHOW_SITE_CHAT == true) {
         $atts = array('id' => 'network-site', 'session_type' => 'network-site');
         $atts = wp_parse_args($atts, $this->_chat_options['network-site']);
         $content .= $this->process_chat_shortcode($atts);
     }
     return $content;
 }
开发者ID:VLabsInc,项目名称:WordPressPlatforms,代码行数:62,代码来源:wordpress-chat.php

示例8: bp_group_admin_permalink

function bp_group_admin_permalink($deprecated = true, $deprecated2 = false)
{
    if (!$deprecated) {
        return bp_get_group_admin_permalink();
    } else {
        echo bp_get_group_admin_permalink();
    }
}
开发者ID:alvaropereyra,项目名称:shrekcms,代码行数:8,代码来源:bp-groups-templatetags.php

示例9: chat_network_site_box_container

 function chat_network_site_box_container($content = '')
 {
     global $bp;
     // We don't want to add the container on our pop-out template.
     if ($this->using_popup_out_template == true) {
         return;
     }
     $site_chat_box = '';
     if (!is_admin()) {
         if ($this->get_option('bottom_corner', 'network-site') == 'enabled') {
             $_SHOW_SITE_CHAT = true;
         } else {
             $_SHOW_SITE_CHAT = false;
         }
         if ($_SHOW_SITE_CHAT == true) {
             // Are we viewing a BuddyPress Group pages?
             if (isset($bp->groups->current_group->id) && intval($bp->groups->current_group->id)) {
                 // Are we viewing the Group Admin screen?
                 $bp_group_admin_url_path = parse_url(bp_get_group_admin_permalink($bp->groups->current_group), PHP_URL_PATH);
                 $request_url_path = parse_url(get_option('siteurl') . $_SERVER['REQUEST_URI'], PHP_URL_PATH);
                 if (!empty($request_url_path) && !empty($bp_group_admin_url_path) && substr($request_url_path, 0, strlen($bp_group_admin_url_path)) == $bp_group_admin_url_path) {
                     if ($this->get_option('bp_group_admin_show_site', 'global') != "enabled") {
                         $_SHOW_SITE_CHAT = false;
                     }
                 } else {
                     if ($this->get_option('bp_group_show_site', 'global') != "enabled") {
                         $_SHOW_SITE_CHAT = false;
                     }
                 }
             } else {
                 if ($this->_chat_plugin_settings['blocked_urls']['site'] == true) {
                     $_SHOW_SITE_CHAT = false;
                 } else {
                     if ($this->get_option('blocked_on_shortcode', 'site') == 'enabled') {
                         global $post;
                         if (!empty($post->post_content) && strstr($post->post_content, '[chat ') !== false) {
                             $_SHOW_SITE_CHAT = false;
                         }
                     }
                 }
             }
         }
     } else {
         if ($this->get_option('bottom_corner_wpadmin', 'network-site') == 'enabled') {
             $_SHOW_SITE_CHAT = true;
         } else {
             $_SHOW_SITE_CHAT = false;
         }
         if ($this->_chat_plugin_settings['blocked_urls']['admin'] == true) {
             $_SHOW_SITE_CHAT = false;
         }
         if ($this->_chat_plugin_settings['blocked_urls']['site'] == true) {
             $_SHOW_SITE_CHAT = false;
         }
     }
     if ($_SHOW_SITE_CHAT == true) {
         //			$site_box_height 		= wpmudev_chat_check_size_qualifier($this->get_option('box_height', 'network-site'), array('px'));
         //			$site_box_position_v 	= $this->get_option('box_position_v', 'network-site');
         //			$site_box_position_h 	= $this->get_option('box_position_h', 'network-site');
         //			$site_box_offset_v 		= wpmudev_chat_check_size_qualifier($this->get_option('box_offset_v', 'network-site'), array('px'));
         //			$site_box_offset_h 		= wpmudev_chat_check_size_qualifier($this->get_option('box_offset_h', 'network-site'), array('px'));
         //			$site_box_spacing_h 	= wpmudev_chat_check_size_qualifier($this->get_option('box_spacing_h', 'network-site'), array('px'));
         //
         //			if ($site_box_position_h == "left")
         //				$site_box_spacing = "0 ". $site_box_spacing_h .' 0 0';
         //			else
         //				$site_box_spacing = "0 0 0 ". $site_box_spacing_h .'';
         //
         //			$site_box_float 		= $site_box_position_h;
         //			$site_box_position_h 	= $site_box_position_h.': '. $site_box_offset_h .';';
         //
         //			$height_offset = 0;
         //			if ($site_box_position_v == "bottom") {
         //				$border_width = intval($this->get_option('box_border_width', 'network-site'));
         //				if ($border_width > 0) {
         //					$height_offset = wpmudev_chat_check_size_qualifier($border_width*2, array('px'));
         //				}
         //			}
         //
         //			$site_box_position_v 	= $site_box_position_v.': '. $site_box_offset_v .';';
         //
         //
         $atts = array('id' => 'network-site', 'session_type' => 'network-site');
         $atts = wp_parse_args($atts, $this->_chat_options['network-site']);
         //echo "atts<pre>"; print_r($atts); echo "</pre>";
         $content .= $this->process_chat_shortcode($atts);
         //			if (!empty($content)) {
         //				$content .= '<style type="text/css">';
         //				$content .= 'div.wpmudev-chat-box.wpmudev-chat-box-site {  margin: 0; padding: 0;
         //					position: fixed; '. $site_box_position_h .' '. $site_box_position_v .' z-index: 10000;  margin: '. $site_box_spacing .'; padding: 0; } ';
         //				$content .= '</style>';
         //				if ((isset($_GET['page'])) && ($_GET['page'] == 'chat_session_logs')) {
         //
         //				} else {
         //					if ($this->get_option('box_shadow_show', 'network-site') == "enabled") {
         //
         //					$content .= '<style type="text/css">';
         //					$content .= 'div.wpmudev-chat-box.wpmudev-chat-box-network-site {
         //							box-shadow: '.
         //							wpmudev_chat_check_size_qualifier($this->get_option('box_shadow_v', 'network-site'), array('px')) .' '.
//.........这里部分代码省略.........
开发者ID:novichkovv,项目名称:candoweightloss,代码行数:101,代码来源:wordpress-chat.php

示例10: widget

 function widget($args, $instance)
 {
     global $wpmudev_chat, $post, $bp;
     if ($wpmudev_chat->get_option('blocked_on_shortcode', 'widget') == "enabled") {
         if (strstr($post->post_content, '[chat ') !== false) {
             return;
         }
     }
     if (isset($bp->groups->current_group->id) && intval($bp->groups->current_group->id)) {
         // Are we viewing the Group Admin screen?
         $bp_group_admin_url_path = parse_url(bp_get_group_admin_permalink($bp->groups->current_group), PHP_URL_PATH);
         $request_url_path = parse_url(get_option('siteurl') . $_SERVER['REQUEST_URI'], PHP_URL_PATH);
         if (!empty($request_url_path) && !empty($bp_group_admin_url_path) && substr($request_url_path, 0, strlen($bp_group_admin_url_path)) == $bp_group_admin_url_path) {
             if ($wpmudev_chat->get_option('bp_group_admin_show_widget', 'global') != "enabled") {
                 return;
             }
         } else {
             if ($wpmudev_chat->get_option('bp_group_show_widget', 'global') != "enabled") {
                 return;
             }
         }
     }
     if ($wpmudev_chat->_chat_plugin_settings['blocked_urls']['widget'] != true) {
         $instance['id'] = $this->id;
         //echo "instance before<pre>"; print_r($instance); echo "</pre>";
         //die();
         $instance = wp_parse_args($this->convert_settings_keys($instance), $this->defaults);
         //echo "instance<pre>"; print_r($instance); echo "</pre>";
         $instance['session_type'] = 'widget';
         $chat_output = $wpmudev_chat->process_chat_shortcode($instance);
         if (!empty($chat_output)) {
             echo $args['before_widget'];
             $title = apply_filters('widget_title', $instance['box_title']);
             if ($title) {
                 echo $args['before_title'] . $title . $args['after_title'];
             }
             echo $chat_output;
             echo $args['after_widget'];
         }
     }
 }
开发者ID:VLabsInc,项目名称:WordPressPlatforms,代码行数:41,代码来源:wpmudev_chat_widget.php

示例11: map_reply_permalink_to_group

 /**
  * Map a topic permalink to the current group forum
  *
  * @since bbPress (r3802)
  * @param string $url
  * @param int $reply_id
  * @return string
  */
 public function map_reply_permalink_to_group($url, $reply_id)
 {
     $slug = get_post_field('post_name', $reply_id);
     $forum_id = bbp_get_reply_forum_id($reply_id);
     $group_ids = bbp_get_forum_group_ids($forum_id);
     // If the topic is not associated with a group, don't mess with it
     if (!empty($group_ids)) {
         // @todo Multiple group forums/forum groups
         $group_id = $group_ids[0];
         $group = groups_get_group(array('group_id' => $group_id));
         if (bp_is_group_admin_screen($this->forums_slug)) {
             $group_permalink = bp_get_group_admin_permalink($group);
         } else {
             $group_permalink = bp_get_group_permalink($group);
         }
         $url = trailingslashit($group_permalink . $this->forums_slug . '/' . $this->topic_slug . '/' . $slug);
     }
     return $url;
 }
开发者ID:hscale,项目名称:webento,代码行数:27,代码来源:bbp-extend-buddypress.php


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