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


PHP bp_is_user_profile_edit函数代码示例

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


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

示例1: bp_has_profile

/**
 * Query for XProfile groups and fields.
 *
 * @since 1.0.0
 *
 * @global object $profile_template
 * @see BP_XProfile_Group::get() for full description of `$args` array.
 *
 * @param array|string $args {
 *     Array of arguments. See BP_XProfile_Group::get() for full description. Those arguments whose defaults differ
 *     from that method are described here:
 *     @type string|array $member_type            Default: 'any'.
 *     @type bool         $hide_empty_groups      Default: true.
 *     @type bool         $hide_empty_fields      Defaults to true on the Dashboard, on a user's Edit Profile page,
 *                                                or during registration. Otherwise false.
 *     @type bool         $fetch_visibility_level Defaults to true when an admin is viewing a profile, or when a user is
 *                                                viewing her own profile, or during registration. Otherwise false.
 *     @type bool         $fetch_fields           Default: true.
 *     @type bool         $fetch_field_data       Default: true.
 * }
 *
 * @return bool
 */
function bp_has_profile($args = '')
{
    global $profile_template;
    // Only show empty fields if we're on the Dashboard, or we're on a user's
    // profile edit page, or this is a registration page.
    $hide_empty_fields_default = !is_network_admin() && !is_admin() && !bp_is_user_profile_edit() && !bp_is_register_page();
    // We only need to fetch visibility levels when viewing your own profile.
    if (bp_is_my_profile() || bp_current_user_can('bp_moderate') || bp_is_register_page()) {
        $fetch_visibility_level_default = true;
    } else {
        $fetch_visibility_level_default = false;
    }
    // Parse arguments.
    $r = bp_parse_args($args, array('user_id' => bp_displayed_user_id(), 'member_type' => 'any', 'profile_group_id' => false, 'hide_empty_groups' => true, 'hide_empty_fields' => $hide_empty_fields_default, 'fetch_fields' => true, 'fetch_field_data' => true, 'fetch_visibility_level' => $fetch_visibility_level_default, 'exclude_groups' => false, 'exclude_fields' => false, 'update_meta_cache' => true), 'has_profile');
    // Populate the template loop global.
    $profile_template = new BP_XProfile_Data_Template($r);
    /**
     * Filters whether or not a group has a profile to display.
     *
     * @since 1.1.0
     * @since 2.6.0 Added the `$r` parameter.
     *
     * @param bool   $has_groups       Whether or not there are group profiles to display.
     * @param string $profile_template Current profile template being used.
     * @param array  $r                Array of arguments passed into the BP_XProfile_Data_Template class.
     */
    return apply_filters('bp_has_profile', $profile_template->has_groups(), $profile_template, $r);
}
开发者ID:CompositeUK,项目名称:clone.BuddyPress,代码行数:51,代码来源:bp-xprofile-template.php

示例2: init

 public function init()
 {
     $this->images_ext_allowed = apply_filters('bxcft_images_ext_allowed', array('jpg', 'jpeg', 'gif', 'png'));
     $this->images_max_filesize = apply_filters('bxcft_images_max_filesize', Bxcft_Plugin::BXCFT_MAX_FILESIZE);
     $this->files_ext_allowed = apply_filters('bxcft_files_ext_allowed', array('doc', 'docx', 'pdf'));
     $this->files_max_filesize = apply_filters('bxcft_files_max_filesize', Bxcft_Plugin::BXCFT_MAX_FILESIZE);
     /** Includes **/
     require_once 'classes/Bxcft_Field_Type_Birthdate.php';
     require_once 'classes/Bxcft_Field_Type_Email.php';
     require_once 'classes/Bxcft_Field_Type_Web.php';
     require_once 'classes/Bxcft_Field_Type_Datepicker.php';
     require_once 'classes/Bxcft_Field_Type_SelectCustomPostType.php';
     require_once 'classes/Bxcft_Field_Type_MultiSelectCustomPostType.php';
     require_once 'classes/Bxcft_Field_Type_SelectCustomTaxonomy.php';
     require_once 'classes/Bxcft_Field_Type_MultiSelectCustomTaxonomy.php';
     require_once 'classes/Bxcft_Field_Type_CheckboxAcceptance.php';
     require_once 'classes/Bxcft_Field_Type_Image.php';
     require_once 'classes/Bxcft_Field_Type_File.php';
     require_once 'classes/Bxcft_Field_Type_Color.php';
     require_once 'classes/Bxcft_Field_Type_DecimalNumber.php';
     require_once 'classes/Bxcft_Field_Type_NumberMinMax.php';
     if (bp_is_user_profile_edit() || bp_is_register_page()) {
         wp_enqueue_script('bxcft-modernizr', plugin_dir_url(__FILE__) . 'js/modernizr.js', array(), '2.6.2', false);
         wp_enqueue_script('bxcft-jscolor', plugin_dir_url(__FILE__) . 'js/jscolor/jscolor.js', array(), '1.4.1', true);
     }
 }
开发者ID:justinticktock,项目名称:buddypress-xprofile-custom-fields-type,代码行数:26,代码来源:bp-xprofile-custom-fields-type.php

示例3: init

 public function init()
 {
     /** Includes **/
     require_once 'Bdd_Field_Type_Address.php';
     //require_once( 'Bdd_Field_Type_District_Korea.php' );
     if (bp_is_user_profile_edit() || bp_is_register_page() || isset($_GET['page']) && $_GET['page'] == 'bp-profile-edit') {
         #wp_enqueue_script('bdd-modernizr', plugin_dir_url(__FILE__) . 'js/modernizr.js', array(), '2.6.2', false);
         #wp_enqueue_script('bdd-jscolor', plugin_dir_url(__FILE__) . 'js/jscolor/jscolor.js', array(), '1.4.1', true);
         wp_enqueue_script('postcode', 'http://dmaps.daum.net/map_js_init/postcode.v2.js', array(), null, true);
         #wp_enqueue_script('district_json', plugin_dir_url(__FILE__) . 'includes/district.json', array('jquery'), null, true);
         #wp_enqueue_script('set_district', plugin_dir_url(__FILE__) . 'includes/set_district.js', array('district_json'), null, true);
     }
 }
开发者ID:ncross42,项目名称:dobalance,代码行数:13,代码来源:bdd_reg_form.php

示例4: exclude_fields_on_register

 public function exclude_fields_on_register($args)
 {
     if (!bp_is_register_page() && !bp_is_user_profile_edit()) {
         return $args;
     }
     if (is_super_admin()) {
         return $args;
     }
     $exclude_fields = isset($args['exclude_fields']) ? $args['exclude_fields'] : array();
     if (is_string($exclude_fields)) {
         $exclude_fields = explode(',', $exclude_fields);
         //Bp does not mandate array, so could be a list by other plugin, play well with them
     }
     $hidden_fields = $this->get_hidden_field();
     $all_exclude = array_merge($exclude_fields, $hidden_fields);
     $args['exclude_fields'] = join(',', $all_exclude);
     return $args;
 }
开发者ID:buddydev,项目名称:bp-readonly-profile-fields,代码行数:18,代码来源:bp-readonly-profile-fields.php

示例5: member_display

 function member_display()
 {
     $auto_embed = bp_get_option('bppp-auto-embed', 'display-profile');
     if (empty($auto_embed)) {
         return false;
     }
     if (!bp_is_user_profile_edit() && $auto_embed == 'edit-profile') {
         return false;
     }
     bppp_progression_block();
 }
开发者ID:NitinPrakash,项目名称:buddypress-force-profile-completion,代码行数:11,代码来源:buddy-press-force-profile-completion.php

示例6: inject_opengraph_info

 /**
  * Inject OpenGraph info in the HEAD
  */
 function inject_opengraph_info()
 {
     $title = $url = $site_name = $description = $id = $image = false;
     if (is_singular()) {
         global $post;
         $id = $post->ID;
         $title = $post->post_title;
         $url = get_permalink($id);
         if (defined('BP_VERSION') && function_exists('bp_current_component') && bp_current_component()) {
             global $wp, $bp;
             $url = function_exists('bp_is_user_profile_edit') && bp_is_user_profile_edit() ? bp_core_get_user_domain($bp->displayed_user->id) : site_url($wp->request);
         }
         $site_name = get_option('blogname');
         $text = wdfb_get_singular_description();
         /*
         $content = $post->post_excerpt ? $post->post_excerpt : strip_shortcodes($post->post_content);
         $text = htmlspecialchars(wp_strip_all_tags($content), ENT_QUOTES);
         */
         if (strlen($text) > 250) {
             $description = preg_replace('/(.{0,247}).*/um', '$1', preg_replace('/\\r|\\n/', ' ', $text)) . '...';
         } else {
             $description = $text;
         }
     } else {
         $title = get_option('blogname');
         $url = home_url('/');
         $site_name = get_option('blogname');
         $description = get_option('blogdescription');
     }
     $image = wdfb_get_og_image($id);
     // App ID
     if (!defined('WDFB_APP_ID_OG_SET')) {
         $app_id = trim($this->data->get_option('wdfb_api', 'app_key'));
         if ($app_id) {
             echo wdfb_get_opengraph_property('fb:app_id', $app_id, false);
             define('WDFB_APP_ID_OG_SET', true);
         }
     }
     // Type
     $type = false;
     if ($this->data->get_option('wdfb_opengraph', 'og_custom_type')) {
         if (!is_singular()) {
             $type = $this->data->get_option('wdfb_opengraph', 'og_custom_type_not_singular');
             $type = $type ? $type : 'website';
         } else {
             $type = $this->data->get_option('wdfb_opengraph', 'og_custom_type_singular');
             $type = $type ? $type : 'article';
         }
         if (is_home() || is_front_page()) {
             $type = $this->data->get_option('wdfb_opengraph', 'og_custom_type_front_page');
             $type = $type ? $type : 'website';
         }
     }
     $type = $type ? $type : (is_singular() ? 'article' : 'website');
     $type = apply_filters('wdfb-opengraph-type', $type);
     echo wdfb_get_opengraph_property('type', $type);
     // Defaults
     $title = apply_filters('wdfb-opengraph-title', $title);
     $url = apply_filters('wdfb-opengraph-url', $url);
     $site_name = apply_filters('wdfb-opengraph-site_name', $site_name);
     $description = apply_filters('wdfb-opengraph-description', $description);
     if ($title) {
         echo wdfb_get_opengraph_property('title', $title);
     }
     if ($url) {
         echo wdfb_get_opengraph_property('url', $url);
     }
     if ($site_name) {
         echo wdfb_get_opengraph_property('site_name', $site_name);
     }
     if ($description) {
         echo wdfb_get_opengraph_property('description', $description);
     }
     if ($image) {
         echo wdfb_get_opengraph_property('image', $image);
     }
     $extras = $this->data->get_option('wdfb_opengraph', 'og_extra_headers');
     $extras = $extras ? $extras : array();
     foreach ($extras as $extra) {
         $name = apply_filters('wdfb-opengraph-extra_headers-name', @$extra['name']);
         $value = apply_filters('wdfb-opengraph-extra_headers-value', @$extra['value'], @$extra['name']);
         if (!$name || !$value) {
             continue;
         }
         echo wdfb_get_opengraph_property($name, $value, false);
     }
     do_action('wdfb-opengraph-after_extra_headers');
 }
开发者ID:m-godefroid76,项目名称:devrestofactory,代码行数:91,代码来源:class_wdfb_public_pages.php

示例7: output_profile_header_content

function output_profile_header_content()
{
    global $bp, $wpdb;
    $current_displayed_user = $bp->displayed_user->id;
    $current_loggedin_user = $bp->loggedin_user->id;
    $current_displayed_user_full_name = $bp->displayed_user->fullname;
    $get_user_list = "SELECT user_login FROM " . $wpdb->base_prefix . "users WHERE ID= '" . $current_displayed_user . "' ORDER by ID limit 1";
    $sql_get_user_list = $wpdb->get_var($get_user_list);
    ?>

<?php 
    $my_profile_header_img = get_user_meta($bp->displayed_user->id, 'profile_header_img', true);
    $my_profile_bg_img = get_user_meta($bp->displayed_user->id, 'profile_bg_img', true);
    $my_profile_ads_boxtrue = get_user_meta($bp->displayed_user->id, 'profile_ads_boxtrue', true);
    $my_profile_ads_box2 = get_user_meta($bp->displayed_user->id, 'profile_ads_box2', true);
    $my_profile_link_color = get_user_meta($bp->displayed_user->id, 'profile_link_color', true);
    ?>


<?php 
    if (!bp_is_user_profile_edit() && !bp_is_user_change_avatar()) {
        ?>

<?php 
        if ($my_profile_header_img != "") {
            ?>

<div id="profile-header-img"><img src="<?php 
            echo stripcslashes($my_profile_header_img);
            ?>
" alt="profile-header" /></div>

<?php 
        }
        ?>


<?php 
    }
}
开发者ID:hscale,项目名称:webento,代码行数:40,代码来源:bp-component-functions.php

示例8: custom_profile_field_items_4bp

 /**
  * Adds Custom Fields to BuddyPress Profiles in public view.
  *
  * @package s2Member\Custom_Reg_Fields
  * @since 110524RC
  *
  * @attaches-to ``add_action("bp_profile_field_item");``
  *
  * @return null
  */
 public static function custom_profile_field_items_4bp()
 {
     global $bp;
     static $processed = false;
     do_action("ws_plugin__s2member_before_custom_profile_field_items_4bp", get_defined_vars());
     if (!$processed && in_array("profile-view", $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_fields_4bp"])) {
         if (apply_filters("ws_plugin__s2member_custom_profile_field_items_4bp_display", true, get_defined_vars())) {
             if (bp_is_user_profile() && (function_exists("bp_is_user_profile_edit") && !bp_is_user_profile_edit() || function_exists("bp_is_profile_edit") && !bp_is_profile_edit()) && (int) bp_get_the_profile_group_id() === 1) {
                 if (isset($bp->displayed_user->id) && ($user_id = $bp->displayed_user->id)) {
                     if ($processed = true) {
                         foreach (array_keys(get_defined_vars()) as $__v) {
                             $__refs[$__v] =& ${$__v};
                         }
                         do_action("ws_plugin__s2member_during_custom_profile_field_items_4bp_before", get_defined_vars());
                         unset($__refs, $__v);
                         if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_fields"]) {
                             if (($level = c_ws_plugin__s2member_user_access::user_access_level(new WP_User($user_id))) >= 0) {
                                 if ($fields_applicable = c_ws_plugin__s2member_custom_reg_fields::custom_fields_configured_at_level($level, "profile-view")) {
                                     $fields = get_user_option("s2member_custom_fields", $user_id);
                                     foreach (json_decode($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_fields"], true) as $field) {
                                         foreach (array_keys(get_defined_vars()) as $__v) {
                                             $__refs[$__v] =& ${$__v};
                                         }
                                         do_action("ws_plugin__s2member_during_custom_profile_field_items_4bp_before_custom_fields", get_defined_vars());
                                         unset($__refs, $__v);
                                         if (in_array($field["id"], $fields_applicable)) {
                                             $field_var = preg_replace("/[^a-z0-9]/i", "_", strtolower($field["id"]));
                                             $field_id_class = preg_replace("/_/", "-", $field_var);
                                             foreach (array_keys(get_defined_vars()) as $__v) {
                                                 $__refs[$__v] =& ${$__v};
                                             }
                                             if (apply_filters("ws_plugin__s2member_during_custom_profile_field_items_4bp_during_custom_fields_display", true, get_defined_vars())) {
                                                 if (!empty($field["section"]) && $field["section"] === "yes") {
                                                     echo '<tr class="ws-plugin--s2member-profile-field-4bp-divider-section">' . "\n";
                                                     echo '<td colspan="2"><div class="ws-plugin--s2member-profile-field-4bp-divider-section' . (!empty($field["sectitle"]) ? '-title' : '') . '">' . (!empty($field["sectitle"]) ? $field["sectitle"] : '') . '</div></td>' . "\n";
                                                     echo '</tr>' . "\n";
                                                 }
                                                 echo '<tr class="ws-plugin--s2member-profile-field-4bp ws-plugin--s2member-profile-4bp-' . esc_attr($field_id_class) . ' field_' . esc_attr($field_var) . '">' . "\n";
                                                 echo '<td class="ws-plugin--s2member-profile-field-4bp ws-plugin--s2member-profile-4bp-' . esc_attr($field_id_class) . ' field_' . esc_attr($field_var) . ' label"><span>' . $field["label"] . '</span></td>' . "\n";
                                                 echo '<td class="ws-plugin--s2member-profile-field-4bp ws-plugin--s2member-profile-4bp-' . esc_attr($field_id_class) . ' field_' . esc_attr($field_var) . ' data">' . c_ws_plugin__s2member_custom_reg_fields::custom_field_gen(__FUNCTION__, $field, "ws_plugin__s2member_profile_4bp_", "ws-plugin--s2member-profile-4bp-", "ws-plugin--s2member-profile-field-4bp", "", "", "", $fields, $fields[$field_var], "profile-view") . '</td>' . "\n";
                                                 echo '</tr>' . "\n";
                                             }
                                             unset($__refs, $__v);
                                         }
                                         foreach (array_keys(get_defined_vars()) as $__v) {
                                             $__refs[$__v] =& ${$__v};
                                         }
                                         do_action("ws_plugin__s2member_during_custom_profile_field_items_4bp_after_custom_fields", get_defined_vars());
                                         unset($__refs, $__v);
                                     }
                                 }
                             }
                         }
                         foreach (array_keys(get_defined_vars()) as $__v) {
                             $__refs[$__v] =& ${$__v};
                         }
                         do_action("ws_plugin__s2member_during_custom_profile_field_items_4bp_after", get_defined_vars());
                         unset($__refs, $__v);
                     }
                 }
             }
         }
     }
     do_action("ws_plugin__s2member_after_custom_profile_field_items_4bp", get_defined_vars());
     return;
 }
开发者ID:donwea,项目名称:nhap.org,代码行数:76,代码来源:custom-reg-fields-4bp.inc.php

示例9: bp_get_the_body_class

/**
 * Customize the body class, according to the currently displayed BP content.
 *
 * Uses the above is_() functions to output a body class for each scenario.
 *
 * @since 1.1.0
 *
 * @param array      $wp_classes     The body classes coming from WP.
 * @param array|bool $custom_classes Classes that were passed to get_body_class().
 * @return array $classes The BP-adjusted body classes.
 */
function bp_get_the_body_class($wp_classes = array(), $custom_classes = false)
{
    $bp_classes = array();
    /* Pages *************************************************************/
    if (is_front_page()) {
        $bp_classes[] = 'home-page';
    }
    if (bp_is_directory()) {
        $bp_classes[] = 'directory';
    }
    if (bp_is_single_item()) {
        $bp_classes[] = 'single-item';
    }
    /* Components ********************************************************/
    if (!bp_is_blog_page()) {
        if (bp_is_user_profile()) {
            $bp_classes[] = 'xprofile';
        }
        if (bp_is_activity_component()) {
            $bp_classes[] = 'activity';
        }
        if (bp_is_blogs_component()) {
            $bp_classes[] = 'blogs';
        }
        if (bp_is_messages_component()) {
            $bp_classes[] = 'messages';
        }
        if (bp_is_friends_component()) {
            $bp_classes[] = 'friends';
        }
        if (bp_is_groups_component()) {
            $bp_classes[] = 'groups';
        }
        if (bp_is_settings_component()) {
            $bp_classes[] = 'settings';
        }
    }
    /* User **************************************************************/
    if (bp_is_user()) {
        $bp_classes[] = 'bp-user';
        // Add current user member types.
        if ($member_types = bp_get_member_type(bp_displayed_user_id(), false)) {
            foreach ($member_types as $member_type) {
                $bp_classes[] = sprintf('member-type-%s', esc_attr($member_type));
            }
        }
    }
    if (!bp_is_directory()) {
        if (bp_is_user_blogs()) {
            $bp_classes[] = 'my-blogs';
        }
        if (bp_is_user_groups()) {
            $bp_classes[] = 'my-groups';
        }
        if (bp_is_user_activity()) {
            $bp_classes[] = 'my-activity';
        }
    } else {
        if (bp_get_current_member_type()) {
            $bp_classes[] = 'type';
        }
    }
    if (bp_is_my_profile()) {
        $bp_classes[] = 'my-account';
    }
    if (bp_is_user_profile()) {
        $bp_classes[] = 'my-profile';
    }
    if (bp_is_user_friends()) {
        $bp_classes[] = 'my-friends';
    }
    if (bp_is_user_messages()) {
        $bp_classes[] = 'my-messages';
    }
    if (bp_is_user_recent_commments()) {
        $bp_classes[] = 'recent-comments';
    }
    if (bp_is_user_recent_posts()) {
        $bp_classes[] = 'recent-posts';
    }
    if (bp_is_user_change_avatar()) {
        $bp_classes[] = 'change-avatar';
    }
    if (bp_is_user_profile_edit()) {
        $bp_classes[] = 'profile-edit';
    }
    if (bp_is_user_friends_activity()) {
        $bp_classes[] = 'friends-activity';
    }
//.........这里部分代码省略.........
开发者ID:CompositeUK,项目名称:clone.BuddyPress,代码行数:101,代码来源:bp-core-template.php

示例10: output_flickr_youtube_content

function output_flickr_youtube_content()
{
    global $bp, $wpdb;
    $current_displayed_user = $bp->displayed_user->id;
    $current_loggedin_user = $bp->loggedin_user->id;
    $current_displayed_user_full_name = $bp->displayed_user->fullname;
    $get_user_list = "SELECT user_login FROM " . $wpdb->base_prefix . "users WHERE ID= '" . $current_displayed_user . "' ORDER by ID limit 1";
    $sql_get_user_list = $wpdb->get_var($get_user_list);
    ?>

<?php 
    if ($current_displayed_user == $current_loggedin_user) {
        $v_id = 'My';
    } else {
        $v_id = $sql_get_user_list . '&acute;s';
    }
    ?>


<?php 
    if ($current_displayed_user == $current_loggedin_user) {
        $u_id = 'My';
    } else {
        $u_id = $sql_get_user_list;
    }
    $my_flickr_id = get_user_meta($bp->displayed_user->id, 'user_flickr', true);
    $my_video_id = get_user_meta($bp->displayed_user->id, 'user_video', true);
    $my_video_id_misc = get_user_meta($bp->displayed_user->id, 'user_video_misc', true);
    ?>


<?php 
    if (!bp_is_user_profile_edit() && !bp_is_user_change_avatar()) {
        if ($my_flickr_id) {
            ?>
<div class="bp-widget">
<h4><?php 
            echo $v_id;
            ?>
 <?php 
            _e("Flickr", TEMPLATE_DOMAIN);
            ?>
&nbsp;&nbsp;&nbsp;&nbsp;<span><a href="http://www.flickr.com/photos/<?php 
            echo $my_flickr_id;
            ?>
"><?php 
            _e("See All &rarr;", TEMPLATE_DOMAIN);
            ?>
</a></span></h4>
<ul id="myflickr">
<li>
<script type="text/javascript" src="http://www.flickr.com/badge_code_v2.gne?count=10&amp;display=latest&amp;size=s&amp;layout=x&amp;source=user&amp;user=<?php 
            echo "{$my_flickr_id}";
            ?>
">
</script>
</li>
</ul>
</div>
<?php 
        }
        ?>


<?php 
        if ($my_video_id) {
            ?>
<div class="bp-widget">
<h4><?php 
            echo $v_id;
            ?>
 <?php 
            _e('Video', TEMPLATE_DOMAIN);
            ?>
</h4>

<div class="video-wrapper">
	<div class="video-container">
  <iframe width="1280" height="720" src="http://www.youtube.com/embed/<?php 
            echo stripcslashes($my_video_id);
            ?>
" frameborder="0" allowfullscreen></iframe>
  </div></div>

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

        <div class="bp-widget">
<h4><?php 
            echo $v_id;
            ?>
 <?php 
            _e('Video', TEMPLATE_DOMAIN);
            ?>
</h4>
<p>
<?php 
            echo stripcslashes($my_video_id_misc);
//.........这里部分代码省略.........
开发者ID:m-godefroid76,项目名称:devrestofactory,代码行数:101,代码来源:bp-component-functions.php

示例11: custom_profile_field_items_4bp

 /**
  * Adds Custom Fields to BuddyPress Profiles in public view.
  *
  * @package s2Member\Custom_Reg_Fields
  * @since 110524RC
  *
  * @attaches-to ``add_action('bp_profile_field_item');``
  */
 public static function custom_profile_field_items_4bp()
 {
     global $bp;
     // Global reference to the BuddyPress object.
     static $processed = FALSE;
     // Process this routine only one time.
     do_action('ws_plugin__s2member_before_custom_profile_field_items_4bp', get_defined_vars());
     if (!$processed && in_array('profile-view', $GLOBALS['WS_PLUGIN__']['s2member']['o']['custom_reg_fields_4bp'])) {
         if (apply_filters('ws_plugin__s2member_custom_profile_field_items_4bp_display', TRUE, get_defined_vars())) {
             if (bp_is_user_profile() && !bp_is_user_profile_edit() && (int) bp_get_the_profile_group_id() === 1) {
                 if (isset($bp->displayed_user->id) && ($user_id = $bp->displayed_user->id) && ($processed = TRUE)) {
                     foreach (array_keys(get_defined_vars()) as $__v) {
                         $__refs[$__v] =& ${$__v};
                     }
                     do_action('ws_plugin__s2member_during_custom_profile_field_items_4bp_before', get_defined_vars());
                     unset($__refs, $__v);
                     if ($GLOBALS['WS_PLUGIN__']['s2member']['o']['custom_reg_fields']) {
                         if (($level = c_ws_plugin__s2member_user_access::user_access_level(new WP_User($user_id))) >= 0) {
                             if ($fields_applicable = c_ws_plugin__s2member_custom_reg_fields::custom_fields_configured_at_level($level, 'profile-view')) {
                                 $fields = get_user_option('s2member_custom_fields', $user_id);
                                 foreach (json_decode($GLOBALS['WS_PLUGIN__']['s2member']['o']['custom_reg_fields'], TRUE) as $field) {
                                     foreach (array_keys(get_defined_vars()) as $__v) {
                                         $__refs[$__v] =& ${$__v};
                                     }
                                     do_action('ws_plugin__s2member_during_custom_profile_field_items_4bp_before_custom_fields', get_defined_vars());
                                     unset($__refs, $__v);
                                     if (in_array($field['id'], $fields_applicable)) {
                                         $field_var = preg_replace('/[^a-z0-9]/i', '_', strtolower($field['id']));
                                         $field_id_class = preg_replace('/_/', '-', $field_var);
                                         foreach (array_keys(get_defined_vars()) as $__v) {
                                             $__refs[$__v] =& ${$__v};
                                         }
                                         if (apply_filters('ws_plugin__s2member_during_custom_profile_field_items_4bp_during_custom_fields_display', TRUE, get_defined_vars())) {
                                             if (!empty($field['section']) && $field['section'] === 'yes') {
                                                 echo '<tr class="ws-plugin--s2member-profile-field-4bp-divider-section">' . "\n";
                                                 echo '<td colspan="2"><div class="ws-plugin--s2member-profile-field-4bp-divider-section' . (!empty($field['sectitle']) ? '-title' : '') . '">' . (!empty($field['sectitle']) ? $field['sectitle'] : '') . '</div></td>' . "\n";
                                                 echo '</tr>' . "\n";
                                             }
                                             echo '<tr class="ws-plugin--s2member-profile-field-4bp ws-plugin--s2member-profile-4bp-' . esc_attr($field_id_class) . ' field_' . esc_attr($field_var) . '">' . "\n";
                                             echo '<td class="ws-plugin--s2member-profile-field-4bp ws-plugin--s2member-profile-4bp-' . esc_attr($field_id_class) . ' field_' . esc_attr($field_var) . ' label"><span>' . $field['label'] . '</span></td>' . "\n";
                                             echo '<td class="ws-plugin--s2member-profile-field-4bp ws-plugin--s2member-profile-4bp-' . esc_attr($field_id_class) . ' field_' . esc_attr($field_var) . ' data">' . c_ws_plugin__s2member_custom_reg_fields::custom_field_gen(__FUNCTION__, $field, 'ws_plugin__s2member_profile_4bp_', 'ws-plugin--s2member-profile-4bp-', 'ws-plugin--s2member-profile-field-4bp', '', '', '', $fields, @$fields[$field_var], 'profile-view') . '</td>' . "\n";
                                             echo '</tr>' . "\n";
                                         }
                                         unset($__refs, $__v);
                                     }
                                     foreach (array_keys(get_defined_vars()) as $__v) {
                                         $__refs[$__v] =& ${$__v};
                                     }
                                     do_action('ws_plugin__s2member_during_custom_profile_field_items_4bp_after_custom_fields', get_defined_vars());
                                     unset($__refs, $__v);
                                 }
                             }
                         }
                     }
                     foreach (array_keys(get_defined_vars()) as $__v) {
                         $__refs[$__v] =& ${$__v};
                     }
                     do_action('ws_plugin__s2member_during_custom_profile_field_items_4bp_after', get_defined_vars());
                     unset($__refs, $__v);
                 }
             }
         }
     }
     do_action('ws_plugin__s2member_after_custom_profile_field_items_4bp', get_defined_vars());
 }
开发者ID:adnandot,项目名称:intenseburn,代码行数:73,代码来源:custom-reg-fields-4bp.inc.php

示例12: bp_registration_buddypress_allowed_areas

/**
 * Check if on an allowed BuddyPress component
 *
 * @since  4.2.0
 *
 * @return boolean  true if an allowed component, false otherwise
 */
function bp_registration_buddypress_allowed_areas()
{
    if (!function_exists('bp_is_my_profile')) {
        return false;
    }
    global $bp;
    if (bp_is_my_profile() || bp_is_user_profile() || bp_is_user_profile_edit() || $bp->current_component == 'register' || $bp->current_component == 'activate') {
        return true;
    }
    return false;
}
开发者ID:profezzeur,项目名称:BuddyPress-Registration-Options,代码行数:18,代码来源:core.php

示例13: shoestrap_is_bp

/**
 * Check if this is a BuddyPress page or not.
 * Returns true or false (boolean)
 */
function shoestrap_is_bp()
{
    $bp = false;
    /** Pages *************************************************************/
    if (!$bp && bp_is_directory()) {
        $bp = true;
    } elseif (!$bp && bp_is_single_item()) {
        $bp = true;
    } elseif (!$bp && bp_is_user_profile()) {
        $bp = true;
    } elseif (!$bp && bp_is_activity_component()) {
        $bp = true;
    } elseif (!$bp && bp_is_blogs_component()) {
        $bp = true;
    } elseif (!$bp && bp_is_messages_component()) {
        $bp = true;
    } elseif (!$bp && bp_is_friends_component()) {
        $bp = true;
    } elseif (!$bp && bp_is_groups_component()) {
        $bp = true;
    } elseif (!$bp && bp_is_settings_component()) {
        $bp = true;
    } elseif (!$bp && bp_is_user()) {
        $bp = true;
    } elseif (!$bp && bp_is_user_blogs()) {
        $bp = true;
    } elseif (!$bp && bp_is_user_groups()) {
        $bp = true;
    } elseif (!$bp && bp_is_user_activity()) {
        $bp = true;
    } elseif (!$bp && bp_is_my_profile()) {
        $bp = true;
    } elseif (!$bp && bp_is_user_profile()) {
        $bp = true;
    } elseif (!$bp && bp_is_user_friends()) {
        $bp = true;
    } elseif (!$bp && bp_is_user_messages()) {
        $bp = true;
    } elseif (!$bp && bp_is_user_recent_commments()) {
        $bp = true;
    } elseif (!$bp && bp_is_user_recent_posts()) {
        $bp = true;
    } elseif (!$bp && bp_is_user_change_avatar()) {
        $bp = true;
    } elseif (!$bp && bp_is_user_profile_edit()) {
        $bp = true;
    } elseif (!$bp && bp_is_user_friends_activity()) {
        $bp = true;
    } elseif (!$bp && bp_is_user_groups_activity()) {
        $bp = true;
    } elseif (!$bp && is_user_logged_in()) {
        $bp = true;
    } elseif (!$bp && bp_is_messages_inbox()) {
        $bp = true;
    } elseif (!$bp && bp_is_messages_sentbox()) {
        $bp = true;
    } elseif (!$bp && bp_is_messages_compose_screen()) {
        $bp = true;
    } elseif (!$bp && bp_is_notices()) {
        $bp = true;
    } elseif (!$bp && bp_is_user_friend_requests()) {
        $bp = true;
    } elseif (!$bp && bp_is_create_blog()) {
        $bp = true;
    } elseif (!$bp && bp_is_group_leave()) {
        $bp = true;
    } elseif (!$bp && bp_is_group_invites()) {
        $bp = true;
    } elseif (!$bp && bp_is_group_members()) {
        $bp = true;
    } elseif (!$bp && bp_is_group_forum_topic()) {
        $bp = true;
    } elseif (!$bp && bp_is_group_forum_topic_edit()) {
        $bp = true;
    } elseif (!$bp && bp_is_group_forum()) {
        $bp = true;
    } elseif (!$bp && bp_is_group_admin_page()) {
        $bp = true;
    } elseif (!$bp && bp_is_group_create()) {
        $bp = true;
    } elseif (!$bp && bp_is_group_home()) {
        $bp = true;
    } elseif (!$bp && bp_is_single_activity()) {
        $bp = true;
    } elseif (!$bp && bp_is_register_page()) {
        $bp = true;
    } elseif (!$bp && bp_is_activation_page()) {
        $bp = true;
    } elseif (!$bp && !bp_is_blog_page()) {
        $bp = true;
    }
    return $bp;
}
开发者ID:MinecraftServernet,项目名称:shoestrap-3,代码行数:97,代码来源:buddypress.php

示例14: test_member_profile_edit

 function test_member_profile_edit()
 {
     $this->go_to(bp_core_get_user_domain(bp_loggedin_user_id()) . bp_get_profile_slug() . '/edit');
     $this->assertTrue(bp_is_user_profile_edit());
 }
开发者ID:JeroenNouws,项目名称:BuddyPress,代码行数:5,代码来源:xprofile.php

示例15: modify_profile_loop

 function modify_profile_loop($has_profile)
 {
     global $profile_template;
     // We only want to modify the loop if this is a public profile
     if (!bp_is_user_profile() || bp_is_user_profile_edit()) {
         return $has_profile;
     }
     $this->load_fieldmeta();
     // While we're looping through, grab the ids and put them in a property for later
     // access
     $this_user_data_ids = array();
     foreach ($profile_template->groups as $group_key => $group) {
         foreach ($group->fields as $field_key => $field) {
             $this_field_id = (int) $field->id;
             if (isset($this->fieldmeta[$this_field_id])) {
                 unset($profile_template->groups[$group_key]->fields[$field_key]);
             }
             $this_user_data_ids[] = $this_field_id;
         }
         // If we've emptied the group, remove it now
         if (empty($group->fields)) {
             unset($profile_template->groups[$group_key]);
         }
     }
     if (empty($this->this_user_data_ids)) {
         $this->this_user_data_ids = $this_user_data_ids;
     }
     // Reset indexes
     $profile_template->groups = array_values($profile_template->groups);
     return $has_profile;
 }
开发者ID:rjbaniel,项目名称:bp-social-media-profiles,代码行数:31,代码来源:bp-social-media-profiles.php


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