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


PHP bp_action_variable函数代码示例

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


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

示例1: friends_screen_requests

/**
 * Catch and process the Requests page.
 */
function friends_screen_requests()
{
    if (bp_is_action_variable('accept', 0) && is_numeric(bp_action_variable(1))) {
        // Check the nonce
        check_admin_referer('friends_accept_friendship');
        if (friends_accept_friendship(bp_action_variable(1))) {
            bp_core_add_message(__('Friendship accepted', 'buddypress'));
        } else {
            bp_core_add_message(__('Friendship could not be accepted', 'buddypress'), 'error');
        }
        bp_core_redirect(trailingslashit(bp_loggedin_user_domain() . bp_current_component() . '/' . bp_current_action()));
    } elseif (bp_is_action_variable('reject', 0) && is_numeric(bp_action_variable(1))) {
        // Check the nonce
        check_admin_referer('friends_reject_friendship');
        if (friends_reject_friendship(bp_action_variable(1))) {
            bp_core_add_message(__('Friendship rejected', 'buddypress'));
        } else {
            bp_core_add_message(__('Friendship could not be rejected', 'buddypress'), 'error');
        }
        bp_core_redirect(trailingslashit(bp_loggedin_user_domain() . bp_current_component() . '/' . bp_current_action()));
    } elseif (bp_is_action_variable('cancel', 0) && is_numeric(bp_action_variable(1))) {
        // Check the nonce
        check_admin_referer('friends_withdraw_friendship');
        if (friends_withdraw_friendship(bp_loggedin_user_id(), bp_action_variable(1))) {
            bp_core_add_message(__('Friendship request withdrawn', 'buddypress'));
        } else {
            bp_core_add_message(__('Friendship request could not be withdrawn', 'buddypress'), 'error');
        }
        bp_core_redirect(trailingslashit(bp_loggedin_user_domain() . bp_current_component() . '/' . bp_current_action()));
    }
    do_action('friends_screen_requests');
    bp_core_load_template(apply_filters('friends_template_requests', 'members/single/home'));
}
开发者ID:eresyyl,项目名称:mk,代码行数:36,代码来源:bp-friends-screens.php

示例2: friends_action_remove_friend

/**
 * Catch and process Remove Friendship requests.
 *
 * @since 1.0.1
 */
function friends_action_remove_friend()
{
    if (!bp_is_friends_component() || !bp_is_current_action('remove-friend')) {
        return false;
    }
    if (!($potential_friend_id = (int) bp_action_variable(0))) {
        return false;
    }
    if ($potential_friend_id == bp_loggedin_user_id()) {
        return false;
    }
    $friendship_status = BP_Friends_Friendship::check_is_friend(bp_loggedin_user_id(), $potential_friend_id);
    if ('is_friend' == $friendship_status) {
        if (!check_admin_referer('friends_remove_friend')) {
            return false;
        }
        if (!friends_remove_friend(bp_loggedin_user_id(), $potential_friend_id)) {
            bp_core_add_message(__('Friendship could not be canceled.', 'buddypress'), 'error');
        } else {
            bp_core_add_message(__('Friendship canceled', 'buddypress'));
        }
    } elseif ('is_friends' == $friendship_status) {
        bp_core_add_message(__('You are not yet friends with this user', 'buddypress'), 'error');
    } else {
        bp_core_add_message(__('You have a pending friendship request with this user', 'buddypress'), 'error');
    }
    bp_core_redirect(wp_get_referer());
    return false;
}
开发者ID:igniterealtime,项目名称:community-plugins,代码行数:34,代码来源:bp-friends-actions.php

示例3: friends_screen_requests

function friends_screen_requests()
{
    if (bp_is_action_variable('accept', 0) && is_numeric(bp_action_variable(1))) {
        // Check the nonce
        check_admin_referer('friends_accept_friendship');
        if (friends_accept_friendship(bp_action_variable(1))) {
            bp_core_add_message(__('Friendship accepted', 'buddypress'));
        } else {
            bp_core_add_message(__('Friendship could not be accepted', 'buddypress'), 'error');
        }
        bp_core_redirect(bp_loggedin_user_domain() . bp_current_component() . '/' . bp_current_action());
    } elseif (bp_is_action_variable('reject', 0) && is_numeric(bp_action_variable(1))) {
        // Check the nonce
        check_admin_referer('friends_reject_friendship');
        if (friends_reject_friendship(bp_action_variable(1))) {
            bp_core_add_message(__('Friendship rejected', 'buddypress'));
        } else {
            bp_core_add_message(__('Friendship could not be rejected', 'buddypress'), 'error');
        }
        bp_core_redirect(bp_loggedin_user_domain() . bp_current_component() . '/' . bp_current_action());
    }
    do_action('friends_screen_requests');
    if (isset($_GET['new'])) {
        bp_core_delete_notifications_by_type(bp_loggedin_user_id(), 'friends', 'friendship_request');
    }
    bp_core_load_template(apply_filters('friends_template_requests', 'members/single/home'));
}
开发者ID:hornetalcala,项目名称:trunk,代码行数:27,代码来源:bp-friends-screens.php

示例4: bp_checkins_is_group_places_area

function bp_checkins_is_group_places_area()
{
    if (bp_is_groups_component() && bp_is_single_item() && bp_is_current_action('checkins') && bp_action_variable(0) == 'places') {
        return true;
    } else {
        return false;
    }
}
开发者ID:socialray,项目名称:surfied-2-0,代码行数:8,代码来源:bp-checkins-functions.php

示例5: bp_core_new_nav_item

/**
 * Add an item to the main BuddyPress navigation array.
 *
 * @global BuddyPress $bp The one true BuddyPress instance.
 *
 * @param array $args {
 *     Array describing the new nav item.
 *     @type string $name Display name for the nav item.
 *     @type string $slug Unique URL slug for the nav item.
 *     @type bool|string $item_css_id Optional. 'id' attribute for the nav
 *           item. Default: the value of $slug.
 *     @type bool $show_for_displayed_user Optional. Whether the nav item
 *           should be visible when viewing a member profile other than your
 *           own. Default: true.
 *     @type bool $site_admin_only Optional. Whether the nav item should be
 *           visible only to site admins (those with the 'bp_moderate' cap).
 *           Default: false.
 *     @type int $position Optional. Numerical index specifying where the item
 *           should appear in the nav array. Default: 99.
 *     @type callable $screen_function The callback function that will run
 *           when the nav item is clicked.
 *     @type bool|string $default_subnav_slug Optional. The slug of the default
 *           subnav item to select when the nav item is clicked.
 * }
 * @return bool|null Returns false on failure.
 */
function bp_core_new_nav_item($args = '')
{
    global $bp;
    $defaults = array('name' => false, 'slug' => false, 'item_css_id' => false, 'show_for_displayed_user' => true, 'site_admin_only' => false, 'position' => 99, 'screen_function' => false, 'default_subnav_slug' => false);
    $r = wp_parse_args($args, $defaults);
    extract($r, EXTR_SKIP);
    // If we don't have the required info we need, don't create this subnav item
    if (empty($name) || empty($slug)) {
        return false;
    }
    // If this is for site admins only and the user is not one, don't create the subnav item
    if (!empty($site_admin_only) && !bp_current_user_can('bp_moderate')) {
        return false;
    }
    if (empty($item_css_id)) {
        $item_css_id = $slug;
    }
    $bp->bp_nav[$slug] = array('name' => $name, 'slug' => $slug, 'link' => trailingslashit(bp_loggedin_user_domain() . $slug), 'css_id' => $item_css_id, 'show_for_displayed_user' => $show_for_displayed_user, 'position' => $position, 'screen_function' => &$screen_function, 'default_subnav_slug' => $default_subnav_slug);
    /**
     * If this nav item is hidden for the displayed user, and
     * the logged in user is not the displayed user
     * looking at their own profile, don't create the nav item.
     */
    if (empty($show_for_displayed_user) && !bp_user_has_access()) {
        return false;
    }
    /**
     * If the nav item is visible, we are not viewing a user, and this is a root
     * component, don't attach the default subnav function so we can display a
     * directory or something else.
     */
    if (-1 != $position && bp_is_root_component($slug) && !bp_displayed_user_id()) {
        return;
    }
    // Look for current component
    if (bp_is_current_component($slug) || bp_is_current_item($slug)) {
        // The requested URL has explicitly included the default subnav
        // (eg: http://example.com/members/membername/activity/just-me/)
        // The canonical version will not contain this subnav slug.
        if (!empty($default_subnav_slug) && bp_is_current_action($default_subnav_slug) && !bp_action_variable(0)) {
            unset($bp->canonical_stack['action']);
        } elseif (!bp_current_action()) {
            // Add our screen hook if screen function is callable
            if (is_callable($screen_function)) {
                add_action('bp_screens', $screen_function, 3);
            }
            if (!empty($default_subnav_slug)) {
                $bp->current_action = apply_filters('bp_default_component_subnav', $default_subnav_slug, $r);
            }
        }
    }
    do_action('bp_core_new_nav_item', $r, $args, $defaults);
}
开发者ID:danielcoats,项目名称:schoolpress,代码行数:79,代码来源:bp-core-buddybar.php

示例6: display

 public function display()
 {
     //switch based on current view
     $current_action = bp_action_variable(0);
     if ($current_action == 'create') {
         $this->view_create();
     } elseif (bcg_is_single_post()) {
         $this->view_single();
     } else {
         $this->view_blog();
     }
     //just load the plugins template, above functions will attach the content generators
     bp_core_load_template('groups/single/plugins');
 }
开发者ID:WP--plugins,项目名称:blog-categories-for-groups,代码行数:14,代码来源:bcg-screens.php

示例7: bp_portfolio_item_delete

/**
 * Delte an item 
 */
function bp_portfolio_item_delete()
{
    if (bp_is_portfolio_component() and bp_is_current_action('delete') and bp_displayed_user_id() == bp_loggedin_user_id()) {
        if ($project_id = bp_action_variable() and wp_verify_nonce($_REQUEST['_wpnonce'], 'delete_project')) {
            if (bp_portfolio_delete_item($project_id)) {
                bp_core_add_message(__('Project deleted !', 'bp-portfolio'));
            } else {
                bp_core_add_message(__('An error occured, please try again.', 'bp-portfolio'), 'error');
            }
        } else {
            bp_core_add_message(__('An error occured, please try again.', 'bp-portfolio'), 'error');
        }
        bp_core_redirect(bp_core_get_user_domain(bp_loggedin_user_id()) . bp_get_portfolio_slug());
    }
}
开发者ID:ncrocfer,项目名称:BP-Portfolio,代码行数:18,代码来源:bp-portfolio-actions.php

示例8: friends_screen_requests

/**
 * Catch and process the Requests page.
 */
function friends_screen_requests()
{
    if (bp_is_action_variable('accept', 0) && is_numeric(bp_action_variable(1))) {
        // Check the nonce
        check_admin_referer('friends_accept_friendship');
        if (friends_accept_friendship(bp_action_variable(1))) {
            bp_core_add_message(__('Friendship accepted', 'buddypress'));
        } else {
            bp_core_add_message(__('Friendship could not be accepted', 'buddypress'), 'error');
        }
        bp_core_redirect(trailingslashit(bp_loggedin_user_domain() . bp_current_component() . '/' . bp_current_action()));
    } elseif (bp_is_action_variable('reject', 0) && is_numeric(bp_action_variable(1))) {
        // Check the nonce
        check_admin_referer('friends_reject_friendship');
        if (friends_reject_friendship(bp_action_variable(1))) {
            bp_core_add_message(__('Friendship rejected', 'buddypress'));
        } else {
            bp_core_add_message(__('Friendship could not be rejected', 'buddypress'), 'error');
        }
        bp_core_redirect(trailingslashit(bp_loggedin_user_domain() . bp_current_component() . '/' . bp_current_action()));
    } elseif (bp_is_action_variable('cancel', 0) && is_numeric(bp_action_variable(1))) {
        // Check the nonce
        check_admin_referer('friends_withdraw_friendship');
        if (friends_withdraw_friendship(bp_loggedin_user_id(), bp_action_variable(1))) {
            bp_core_add_message(__('Friendship request withdrawn', 'buddypress'));
        } else {
            bp_core_add_message(__('Friendship request could not be withdrawn', 'buddypress'), 'error');
        }
        bp_core_redirect(trailingslashit(bp_loggedin_user_domain() . bp_current_component() . '/' . bp_current_action()));
    }
    /**
     * Fires before the loading of template for the friends requests page.
     *
     * @since BuddyPress (1.0.0)
     */
    do_action('friends_screen_requests');
    /**
     * Filters the template used to display the My Friends page.
     *
     * @since BuddyPress (1.0.0)
     *
     * @param string $template Path to the friends request template to load.
     */
    bp_core_load_template(apply_filters('friends_template_requests', 'members/single/home'));
}
开发者ID:sdh100shaun,项目名称:pantheon,代码行数:48,代码来源:bp-friends-screens.php

示例9: get_current_view

 /**
  * Sets up the current view when viewing a user page
  *
  * @since 1.2
  */
 function get_current_view($view, $item_type)
 {
     global $wp_rewrite;
     if ($item_type == 'user') {
         $current_action = bp_current_action();
         if (empty($current_action) || in_array($current_action, array(BP_DOCS_STARTED_SLUG, BP_DOCS_EDITED_SLUG))) {
             // An empty $bp->action_variables[0] means that you're looking at a list.
             // A url like members/terry/docs/started/page/3 also means you're looking at a list.
             $view = 'list';
         } else {
             if ($current_action == BP_DOCS_CATEGORY_SLUG) {
                 // Category view
                 $view = 'category';
             } else {
                 if ($current_action == BP_DOCS_CREATE_SLUG) {
                     // Create new doc
                     $view = 'create';
                 } else {
                     if (!bp_action_variable(0)) {
                         // $bp->action_variables[1] is the slug for this doc. If there's no
                         // further chunk, then we're attempting to view a single item
                         $view = 'single';
                     } else {
                         if (bp_is_action_variable(BP_DOCS_EDIT_SLUG, 0)) {
                             // This is an edit page
                             $view = 'edit';
                         } else {
                             if (bp_is_action_variable(BP_DOCS_DELETE_SLUG, 0)) {
                                 // This is an delete request
                                 $view = 'delete';
                             } else {
                                 if (bp_is_action_variable(BP_DOCS_HISTORY_SLUG, 0)) {
                                     // This is a history request
                                     $view = 'history';
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
     return $view;
 }
开发者ID:igniterealtime,项目名称:community-plugins,代码行数:49,代码来源:integration-users.php

示例10: get_current_view

 /**
  * Sets up the current view when viewing a user page
  *
  * @since 1.2
  */
 function get_current_view($view, $item_type)
 {
     if ($item_type == 'user') {
         if (!bp_current_action()) {
             // An empty $bp->action_variables[0] means that you're looking at a list
             $view = 'list';
         } else {
             if (bp_is_current_action(BP_DOCS_CATEGORY_SLUG)) {
                 // Category view
                 $view = 'category';
             } else {
                 if (bp_is_current_action(BP_DOCS_CREATE_SLUG)) {
                     // Create new doc
                     $view = 'create';
                 } else {
                     if (!bp_action_variable(0)) {
                         // $bp->action_variables[1] is the slug for this doc. If there's no
                         // further chunk, then we're attempting to view a single item
                         $view = 'single';
                     } else {
                         if (bp_is_action_variable(BP_DOCS_EDIT_SLUG, 0)) {
                             // This is an edit page
                             $view = 'edit';
                         } else {
                             if (bp_is_action_variable(BP_DOCS_DELETE_SLUG, 0)) {
                                 // This is an delete request
                                 $view = 'delete';
                             } else {
                                 if (bp_is_action_variable(BP_DOCS_HISTORY_SLUG, 0)) {
                                     // This is a history request
                                     $view = 'history';
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
     return $view;
 }
开发者ID:adisonc,项目名称:MaineLearning,代码行数:46,代码来源:integration-users.php

示例11: messages_screen_notices

function messages_screen_notices()
{
    global $notice_id;
    if (!is_super_admin()) {
        return false;
    }
    $notice_id = (int) bp_action_variable(1);
    if (!empty($notice_id) && is_numeric($notice_id)) {
        $notice = new BP_Messages_Notice($notice_id);
        if (bp_is_action_variable('deactivate', 0)) {
            if (!$notice->deactivate()) {
                bp_core_add_message(__('There was a problem deactivating that notice.', 'buddypress'), 'error');
            } else {
                bp_core_add_message(__('Notice deactivated.', 'buddypress'));
            }
        } else {
            if (bp_is_action_variable('activate', 0)) {
                if (!$notice->activate()) {
                    bp_core_add_message(__('There was a problem activating that notice.', 'buddypress'), 'error');
                } else {
                    bp_core_add_message(__('Notice activated.', 'buddypress'));
                }
            } else {
                if (bp_is_action_variable('delete')) {
                    if (!$notice->delete()) {
                        bp_core_add_message(__('There was a problem deleting that notice.', 'buddypress'), 'buddypress');
                    } else {
                        bp_core_add_message(__('Notice deleted.', 'buddypress'));
                    }
                }
            }
        }
        bp_core_redirect(bp_loggedin_user_domain() . bp_get_messages_slug() . '/notices');
    }
    if (bp_action_variables()) {
        bp_do_404();
        return;
    }
    do_action('messages_screen_notices');
    bp_core_load_template(apply_filters('messages_template_notices', 'members/single/home'));
}
开发者ID:nxtclass,项目名称:NXTClass-Plugin,代码行数:41,代码来源:bp-messages-screens.php

示例12: messages_action_delete_message

/**
 * Process a request to delete a message.
 *
 * @return bool False on failure.
 */
function messages_action_delete_message()
{
    if (!bp_is_messages_component() || bp_is_current_action('notices') || !bp_is_action_variable('delete', 0)) {
        return false;
    }
    $thread_id = bp_action_variable(1);
    if (!$thread_id || !is_numeric($thread_id) || !messages_check_thread_access($thread_id)) {
        bp_core_redirect(trailingslashit(bp_displayed_user_domain() . bp_get_messages_slug() . '/' . bp_current_action()));
    } else {
        if (!check_admin_referer('messages_delete_thread')) {
            return false;
        }
        // Delete message
        if (!messages_delete_thread($thread_id)) {
            bp_core_add_message(__('There was an error deleting that message.', 'buddypress'), 'error');
        } else {
            bp_core_add_message(__('Message deleted.', 'buddypress'));
        }
        bp_core_redirect(trailingslashit(bp_displayed_user_domain() . bp_get_messages_slug() . '/' . bp_current_action()));
    }
}
开发者ID:sdh100shaun,项目名称:pantheon,代码行数:26,代码来源:bp-messages-actions.php

示例13: bcg_get_query

function bcg_get_query()
{
    $bp = buddypress();
    $cats = bcg_get_categories($bp->groups->current_group->id);
    $qs = array('post_type' => bcg_get_post_type(), 'post_status' => 'publish');
    if (empty($cats)) {
        $qs['name'] = -1;
        //we know it will not find anything
    }
    if (bcg_is_single_post()) {
        $slug = $bp->action_variables[0];
        $qs['name'] = $slug;
        //tax query
        $qs['tax_query'] = array(array('taxonomy' => bcg_get_taxonomy(), 'terms' => $cats, 'field' => 'id', 'operator' => 'IN'));
    }
    $paged = get_query_var('paged') ? get_query_var('paged') : 1;
    if (bcg_is_category()) {
        $qs['tax_query'] = array(array('taxonomy' => bcg_get_taxonomy(), 'terms' => (int) bp_action_variable(1), 'field' => 'id', 'operator' => 'IN'));
    } else {
        $qs['tax_query'] = array(array('taxonomy' => bcg_get_taxonomy(), 'terms' => $cats, 'field' => 'id', 'operator' => 'IN'));
    }
    $qs['paged'] = $paged;
    return apply_filters("bcg_get_query", $qs);
}
开发者ID:WP--plugins,项目名称:blog-categories-for-groups,代码行数:24,代码来源:bcg-template.php

示例14: bp_get_group_current_admin_tab

/**
 * Returns the current group admin tab slug.
 *
 * @since 1.6.0
 *
 * @uses apply_filters() Filter bp_get_current_group_admin_tab to modify return value.
 *
 * @return string $tab The current tab's slug.
 */
function bp_get_group_current_admin_tab()
{
    if (bp_is_groups_component() && bp_is_current_action('admin')) {
        $tab = bp_action_variable(0);
    } else {
        $tab = '';
    }
    /**
     * Filters the current group admin tab slug.
     *
     * @since 1.6.0
     *
     * @param string $tab Current group admin tab slug.
     */
    return apply_filters('bp_get_current_group_admin_tab', $tab);
}
开发者ID:igniterealtime,项目名称:community-plugins,代码行数:25,代码来源:bp-groups-template.php

示例15: xprofile_screen_edit_profile

/**
 * Handles the display of the profile edit page by loading the correct template file.
 * Also checks to make sure this can only be accessed for the logged in users profile.
 *
 * @package BuddyPress XProfile
 * @uses bp_is_my_profile() Checks to make sure the current user being viewed equals the logged in user
 * @uses bp_core_load_template() Looks for and loads a template file within the current member theme (folder/filename)
 */
function xprofile_screen_edit_profile()
{
    global $bp;
    if (!bp_is_my_profile() && !is_super_admin()) {
        return false;
    }
    // Make sure a group is set.
    if (!bp_action_variable(1)) {
        bp_core_redirect(bp_displayed_user_domain() . $bp->profile->slug . '/edit/group/1');
    }
    // Check the field group exists
    if (!bp_is_action_variable('group') || !xprofile_get_field_group(bp_action_variable(1))) {
        bp_do_404();
        return;
    }
    // Check to see if any new information has been submitted
    if (isset($_POST['field_ids'])) {
        // Check the nonce
        check_admin_referer('bp_xprofile_edit');
        // Check we have field ID's
        if (empty($_POST['field_ids'])) {
            bp_core_redirect(trailingslashit($bp->displayed_user->domain . $bp->profile->slug . '/edit/group/' . bp_action_variable(1)));
        }
        // Explode the posted field IDs into an array so we know which
        // fields have been submitted
        $posted_field_ids = explode(',', $_POST['field_ids']);
        $is_required = array();
        // Loop through the posted fields formatting any datebox values
        // then validate the field
        foreach ((array) $posted_field_ids as $field_id) {
            if (!isset($_POST['field_' . $field_id])) {
                if (!empty($_POST['field_' . $field_id . '_day']) && !empty($_POST['field_' . $field_id . '_month']) && !empty($_POST['field_' . $field_id . '_year'])) {
                    // Concatenate the values
                    $date_value = $_POST['field_' . $field_id . '_day'] . ' ' . $_POST['field_' . $field_id . '_month'] . ' ' . $_POST['field_' . $field_id . '_year'];
                    // Turn the concatenated value into a timestamp
                    $_POST['field_' . $field_id] = date('Y-m-d H:i:s', strtotime($date_value));
                }
            }
            $is_required[$field_id] = xprofile_check_is_required_field($field_id);
            if ($is_required[$field_id] && empty($_POST['field_' . $field_id])) {
                $errors = true;
            }
        }
        // There are errors
        if (!empty($errors)) {
            bp_core_add_message(__('Please make sure you fill in all required fields in this profile field group before saving.', 'buddypress'), 'error');
            // No errors
        } else {
            // Reset the errors var
            $errors = false;
            // Now we've checked for required fields, lets save the values.
            foreach ((array) $posted_field_ids as $field_id) {
                // Certain types of fields (checkboxes, multiselects) may come through empty. Save them as an empty array so that they don't get overwritten by the default on the next edit.
                if (empty($_POST['field_' . $field_id])) {
                    $value = array();
                } else {
                    $value = $_POST['field_' . $field_id];
                }
                if (!xprofile_set_field_data($field_id, $bp->displayed_user->id, $value, $is_required[$field_id])) {
                    $errors = true;
                } else {
                    do_action('xprofile_profile_field_data_updated', $field_id, $value);
                }
            }
            do_action('xprofile_updated_profile', $bp->displayed_user->id, $posted_field_ids, $errors);
            // Set the feedback messages
            if ($errors) {
                bp_core_add_message(__('There was a problem updating some of your profile information, please try again.', 'buddypress'), 'error');
            } else {
                bp_core_add_message(__('Changes saved.', 'buddypress'));
            }
            // Redirect back to the edit screen to display the updates and message
            bp_core_redirect(trailingslashit(bp_displayed_user_domain() . $bp->profile->slug . '/edit/group/' . bp_action_variable(1)));
        }
    }
    do_action('xprofile_screen_edit_profile');
    bp_core_load_template(apply_filters('xprofile_template_edit_profile', 'members/single/home'));
}
开发者ID:nxtclass,项目名称:NXTClass-Plugin,代码行数:86,代码来源:bp-xprofile-screens.php


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