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


PHP bp_is_register_page函数代码示例

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


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

示例1: 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

示例2: enqueue_script

 /**
  * Enqueue needed scripts on BuddyPress' registration page.
  *
  * @since 1.0.3
  */
 public static function enqueue_script()
 {
     if (bp_is_register_page()) {
         // Add the Google reCAPTCHA script.
         add_action('wp_enqueue_scripts', array(__CLASS__, 'enqueue_header_script'));
     }
 }
开发者ID:phongvan212,项目名称:ctsv,代码行数:12,代码来源:buddypress-registration.php

示例3: fx_private_site_please_log_in

/**
 * Redirects users that are not logged in to the 'wp-login.php' page.
 * This function is taken from Private Site Feature in "Members" Plugin.
 *
 * @since  0.1.0
 * @author Justin Tadlock <justin@justintadlock.com>
 * @copyright Copyright (c) 2009 - 2016, Justin Tadlock
 */
function fx_private_site_please_log_in()
{
    /* Check if the private site feature is active and if the user is not logged in. */
    if (true === fx_private_site_get_option('enable', false) && !is_user_logged_in()) {
        /* Hook */
        do_action('fx_private_site_before_auth_redirect');
        /* If using BuddyPress and on the register page, don't do anything. */
        if (function_exists('bp_is_activation_page') && bp_is_activation_page()) {
            return;
        }
        if (function_exists('bp_is_register_page') && bp_is_register_page()) {
            return;
        }
        /* WooCommerce: Whitelist My Account Page */
        if (class_exists('WooCommerce')) {
            $myaccount_page_id = get_option('woocommerce_myaccount_page_id');
            if ($myaccount_page_id && is_page($myaccount_page_id)) {
                return;
            }
        }
        /* Redirect to the login page. */
        auth_redirect();
        exit;
    }
}
开发者ID:turtlepod,项目名称:fx-private-site,代码行数:33,代码来源:functions.php

示例4: subway_redirect_to_login

/**
 * Redirects all the pages except for few selected pages inside
 * the reading settings
 *
 * (Front-end General)
 *
 * @return void
 */
function subway_redirect_to_login()
{
    global $post;
    $post_copy =& $post;
    $login_page_id = intval(get_option('subway_login_page'));
    $excluded_page = subway_get_excluded_page_id_collection();
    // Already escaped inside 'subway_get_redirect_page_url'.
    $redirect_page = subway_get_redirect_page_url();
    // Check if redirect page is empty or not.
    if (empty($redirect_page)) {
        return;
    }
    // Check if buddypress activate page.
    if (function_exists('bp_is_activation_page')) {
        if (bp_is_activation_page()) {
            return;
        }
    }
    // Check if buddypress registration page.
    if (function_exists('bp_is_register_page')) {
        if (bp_is_register_page()) {
            return;
        }
    }
    // In case their is no post ID assign a 0 value to
    // $post->ID. This pages applies to custom WordPress pages
    // like BuddyPress Members and Groups.
    if (empty($post_copy)) {
        $post_copy = new stdclass();
        $post_copy->ID = 0;
    }
    // Check if current page is locked down or not.
    $current_page_id = intval($post_copy->ID);
    // Check if $current_page_id && $selected_blog_id is equal to each other.
    // If that's the case, get the page ID instead of global $post->ID that returns.
    // the ID of the first post object inside the loop.
    $blog_id = intval(get_option('page_for_posts'));
    if (is_home()) {
        if ($blog_id === $login_page_id) {
            $current_page_id = $blog_id;
        }
    }
    // Only execute the script for non-loggedin visitors.
    if (!is_user_logged_in()) {
        if ($current_page_id !== $login_page_id) {
            if (!in_array($current_page_id, $excluded_page, true)) {
                wp_safe_redirect(add_query_arg(array('_redirected' => 'yes'), $redirect_page));
                die;
            }
        }
    }
    return;
}
开发者ID:codehaiku,项目名称:subway,代码行数:61,代码来源:private.php

示例5: 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

示例6: 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

示例7: maybe_redirect

 /**
  * Check user access and redirect if access denied
  */
 public function maybe_redirect()
 {
     // always allow access to blog, registration and activation pages
     if (bp_is_blog_page() || bp_is_register_page() || bp_is_activation_page()) {
         return;
     }
     // grab toggle option from registry
     $opt_toggle = $this->get_suboption('toggle');
     // is option toggled on?
     if ($opt_toggle && true == $opt_toggle->get()) {
         // protection is enabled, is user logged in?
         if (!is_user_logged_in()) {
             // not logged in, redirect to registration page
             bp_core_redirect(bp_get_root_domain() . '/' . bp_get_root_slug('register'));
             // exit to avoid any accidental output
             exit;
         }
     }
 }
开发者ID:shads196770,项目名称:cbox-theme,代码行数:22,代码来源:class.php

示例8: hide_role_fields

 public function hide_role_fields($args)
 {
     global $pagenow;
     $hide = false;
     if (is_admin() && isset($_GET['page']) && $_GET['page'] == 'bp-profile-edit' && $pagenow == 'users.php') {
         $hide = true;
     }
     if (!$hide && !bp_is_user() && !bp_is_register_page()) {
         return $args;
     }
     $excluded_fields = $args['exclude_fields'];
     if (empty($excluded_fields)) {
         $excluded_fields = array();
     }
     $role_field_ids = bd_pseudo_get_role_fields();
     $excluded_fields = array_merge($excluded_fields, $role_field_ids);
     $args['exclude_fields'] = $excluded_fields;
     return $args;
 }
开发者ID:buddydev,项目名称:bp-pseudo-role-field,代码行数:19,代码来源:bp-pseudo-role-field-hooks.php

示例9: lazy_load_css_js

 /**
  * Lazy load CSS/JS files?
  *
  * @package s2Member\CSS_JS
  * @since 131028
  *
  * @return boolean TRUE if we should load; else FALSE.
  */
 public static function lazy_load_css_js()
 {
     static $load;
     // Static cache var.
     if (isset($load)) {
         return $load;
     }
     $null = NULL;
     // Needed below in earlier versions of WP.
     if (!$GLOBALS['WS_PLUGIN__']['s2member']['o']['lazy_load_css_js']) {
         $load = TRUE;
     } else {
         if (c_ws_plugin__s2member_systematics::is_s2_systematic_use_page()) {
             $load = TRUE;
         } else {
             if (!empty($_GET[apply_filters('ws_plugin__s2member_check_force_ssl_get_var_name', 's2-ssl', array())])) {
                 $load = TRUE;
             } else {
                 if (c_ws_plugin__s2member_utils_conds::bp_is_installed() && (bp_is_register_page() || bp_is_activation_page() || bp_is_user_profile())) {
                     $load = TRUE;
                 } else {
                     if (is_singular() && ($post = get_post($null)) && (stripos($post->post_content, 's2member') !== FALSE || stripos($post->post_content, '[s2') !== FALSE)) {
                         $load = TRUE;
                     } else {
                         if (preg_match('/\\/wp\\-signup\\.php|\\/wp\\-login\\.php|\\/wp\\-admin\\/(?:user\\/)?profile\\.php|[?&]s2member/', $_SERVER['REQUEST_URI'])) {
                             $load = TRUE;
                         }
                     }
                 }
             }
         }
     }
     if (!isset($load)) {
         $load = FALSE;
     }
     // Make sure it's set; always.
     return $load = apply_filters('ws_plugin__s2member_lazy_load_css_js', $load);
 }
开发者ID:novichkovv,项目名称:candoweightloss,代码行数:46,代码来源:css-js-themes.inc.php

示例10: lazy_load_css_js

 /**
  * Lazy load CSS/JS files?
  *
  * @package s2Member\CSS_JS
  * @since 131028
  *
  * @return boolean TRUE if we should load; else FALSE.
  */
 public static function lazy_load_css_js()
 {
     static $load;
     // Static cache var.
     if (isset($load)) {
         return $load;
     }
     if (!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["lazy_load_css_js"]) {
         $load = TRUE;
     } else {
         if (c_ws_plugin__s2member_systematics::is_s2_systematic_use_page()) {
             $load = TRUE;
         } else {
             if (!empty($_GET[apply_filters("ws_plugin__s2member_check_force_ssl_get_var_name", "s2-ssl", array())])) {
                 $load = TRUE;
             } else {
                 if (c_ws_plugin__s2member_utils_conds::bp_is_installed() && (bp_is_register_page() || bp_is_activation_page() || bp_is_user_profile())) {
                     $load = TRUE;
                 } else {
                     if (is_singular() && ($post = get_post(NULL)) && (stripos($post->post_content, "s2member") !== FALSE || stripos($post->post_content, "[s2") !== FALSE)) {
                         $load = TRUE;
                     } else {
                         if (preg_match("/\\/wp\\-signup\\.php" . "|\\/wp\\-login\\.php" . "|\\/wp\\-admin\\/(?:user\\/)?profile\\.php" . "|[?&]s2member/", $_SERVER["REQUEST_URI"])) {
                             $load = TRUE;
                         }
                     }
                 }
             }
         }
     }
     if (!isset($load)) {
         $load = FALSE;
     }
     // Make sure it's set; always.
     return $load = apply_filters("ws_plugin__s2member_lazy_load_css_js", $load);
 }
开发者ID:novichkovv,项目名称:candoweightloss,代码行数:44,代码来源:css-js-themes.inc.php

示例11: wf_change_bp_register_page_width

function wf_change_bp_register_page_width()
{
    // Our Conditional Tags
    if (bp_is_register_page()) {
        function wf_profile_main_filter()
        {
            // Change our class for .main
            $class = 'col-sm-12';
            // Return it
            return $class;
        }
        // Add the filter.
        add_filter('wff_main_class', 'wf_profile_main_filter');
        function wf_profile_sidebar_filter()
        {
            // Change our class for the sidebar
            $class = 'hidden';
            // Return it
            return $class;
        }
        // Add the filter.
        add_filter('wff_sidebar_class', 'wf_profile_sidebar_filter');
    }
}
开发者ID:WeFoster,项目名称:wefoster,代码行数:24,代码来源:bp-filters.php

示例12: bp_get_the_post_class

/**
 * Customizes the post CSS class according to BuddyPress content.
 *
 * Hooked to the 'post_class' filter.
 *
 * @since 2.1.0
 *
 * @param array $wp_classes The post classes coming from WordPress.
 * @return array
 */
function bp_get_the_post_class($wp_classes = array())
{
    // Don't do anything if we're not on a BP page.
    if (!is_buddypress()) {
        return $wp_classes;
    }
    $bp_classes = array();
    if (bp_is_user() || bp_is_single_activity()) {
        $bp_classes[] = 'bp_members';
    } elseif (bp_is_group()) {
        $bp_classes[] = 'bp_group';
    } elseif (bp_is_activity_component()) {
        $bp_classes[] = 'bp_activity';
    } elseif (bp_is_blogs_component()) {
        $bp_classes[] = 'bp_blogs';
    } elseif (bp_is_register_page()) {
        $bp_classes[] = 'bp_register';
    } elseif (bp_is_activation_page()) {
        $bp_classes[] = 'bp_activate';
    } elseif (bp_is_forums_component() && bp_is_directory()) {
        $bp_classes[] = 'bp_forum';
    }
    if (empty($bp_classes)) {
        return $wp_classes;
    }
    // Emulate post type css class.
    foreach ($bp_classes as $bp_class) {
        $bp_classes[] = "type-{$bp_class}";
    }
    // Okay let's merge!
    return array_unique(array_merge($bp_classes, $wp_classes));
}
开发者ID:CompositeUK,项目名称:clone.BuddyPress,代码行数:42,代码来源:bp-core-template.php

示例13: bp_get_the_profile_field_visibility_level_label

/**
 * Return the visibility level label of this field.
 *
 * @since 1.6.0
 *
 * @return mixed|void
 */
function bp_get_the_profile_field_visibility_level_label()
{
    global $field;
    // On the registration page, values stored in POST should take
    // precedence over default visibility, so that submitted values
    // are not lost on failure.
    if (bp_is_register_page() && !empty($_POST['field_' . $field->id . '_visibility'])) {
        $level = esc_html($_POST['field_' . $field->id . '_visibility']);
    } else {
        $level = !empty($field->visibility_level) ? $field->visibility_level : 'public';
    }
    $fields = bp_xprofile_get_visibility_levels();
    /**
     * Filters the profile field visibility level label.
     *
     * @since 1.6.0
     * @since 2.6.0 Added the `$level` parameter.
     *
     * @param string $retval Field visibility level label.
     * @param string $level  Field visibility level.
     */
    return apply_filters('bp_get_the_profile_field_visibility_level_label', $fields[$level]['label'], $level);
}
开发者ID:CompositeUK,项目名称:clone.BuddyPress,代码行数:30,代码来源:bp-xprofile-template.php

示例14: ms_process_signup_meta

 /**
  * Adds Customs Fields to ``$meta`` on signup.
  *
  * This can ONLY be fired through `/wp-signup.php` on the front-side.
  * 	Or possibly through `/user-new.php` in the admin.
  * 	Or through `/register` via BuddyPress.
  *
  * @package s2Member\Registrations
  * @since 3.5
  *
  * @attaches-to ``add_filter("add_signup_meta");``
  * @attaches-to ``add_filter("bp_signup_usermeta");``
  *
  * @param array $meta Expects an array of meta-data to be passed in by the Filter.
  * @return array Full ``$meta`` array with s2Member Custom Fields included.
  */
 public static function ms_process_signup_meta($meta = FALSE)
 {
     global $current_site, $current_blog;
     global $pagenow;
     // Need this to detect the current admin page.
     foreach (array_keys(get_defined_vars()) as $__v) {
         $__refs[$__v] =& ${$__v};
     }
     do_action("ws_plugin__s2member_before_ms_process_signup_meta", get_defined_vars());
     unset($__refs, $__v);
     if (is_multisite()) {
         // This event should ONLY be processed with Multisite Networking.
         if (!empty($_POST) && is_array($_POST) && (is_blog_admin() && $pagenow === "user-new.php" || !is_admin() && (preg_match("/\\/wp-signup\\.php/", $_SERVER["REQUEST_URI"]) && !empty($_POST["stage"]) && preg_match("/^validate-(user|blog)-signup\$/", (string) $_POST["stage"]) || c_ws_plugin__s2member_utils_conds::bp_is_installed() && bp_is_register_page()))) {
             c_ws_plugin__s2member_email_configs::email_config();
             // Configures `From:` header used in notifications.
             $meta["add_to_blog"] = empty($meta["add_to_blog"]) ? $current_blog->blog_id : $meta["add_to_blog"];
             $meta["new_role"] = empty($meta["new_role"]) ? get_option("default_role") : $meta["new_role"];
             foreach (c_ws_plugin__s2member_utils_strings::trim_deep(stripslashes_deep($_POST)) as $key => $value) {
                 if (preg_match("/^ws_plugin__s2member_(custom_reg_field|user_new)_/", $key)) {
                     if ($key = preg_replace("/_user_new_/", "_custom_reg_field_", $key)) {
                         $meta["s2member_ms_signup_meta"][$key] = maybe_unserialize($value);
                     }
                 }
             }
         }
     }
     return apply_filters("ws_plugin__s2member_ms_process_signup_meta", $meta, get_defined_vars());
 }
开发者ID:novichkovv,项目名称:candoweightloss,代码行数:44,代码来源:registrations.inc.php

示例15: is_register_page

 /**
  * is_register_page determines if current page is a registration page
  * @return boolean true is registration page false is login page
  */
 public static function is_register_page()
 {
     global $pagenow, $loginRadiusSettings, $loginRadiusLoginIsBpActive;
     $location = LR_Common::get_protocol() . $_SERVER['HTTP_HOST'] . remove_query_arg(array('lrlinked', 'loginradius_linking', 'loginradius_post', 'loginradius_invite', 'loginRadiusMappingProvider', 'loginRadiusMap', 'loginRadiusMain'));
     if ($loginRadiusLoginIsBpActive) {
         if (bp_is_register_page() || bp_is_activation_page()) {
             return true;
         }
     } else {
         if (wp_registration_url() == $location || 'wp-signup.php' == $pagenow || 'register.php' == $pagenow) {
             return true;
         }
     }
     return false;
 }
开发者ID:avijitdeb,项目名称:flatterbox.com,代码行数:19,代码来源:class-login-helper.php


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