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


PHP bp_get_signup_page函数代码示例

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


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

示例1: bp_members_admin_bar_my_account_menu

/**
 * Add the "My Account" menu and all submenus.
 *
 * @since BuddyPress (r4151)
 */
function bp_members_admin_bar_my_account_menu()
{
    global $bp, $wp_admin_bar;
    // Bail if this is an ajax request
    if (defined('DOING_AJAX')) {
        return;
    }
    // Logged in user
    if (is_user_logged_in()) {
        // User avatar
        $avatar = bp_core_fetch_avatar(array('item_id' => $bp->loggedin_user->id, 'email' => $bp->loggedin_user->userdata->user_email, 'width' => 16, 'height' => 16));
        // Unique ID for the 'My Account' menu
        $bp->my_account_menu_id = !empty($avatar) ? 'my-account-with-avatar' : 'my-account';
        // Create the main 'My Account' menu
        $wp_admin_bar->add_menu(array('id' => $bp->my_account_menu_id, 'title' => $avatar . bp_get_loggedin_user_fullname(), 'href' => $bp->loggedin_user->domain));
        // Show login and sign-up links
    } elseif (!empty($wp_admin_bar)) {
        add_filter('show_admin_bar', '__return_true');
        // Create the main 'My Account' menu
        $wp_admin_bar->add_menu(array('id' => 'bp-login', 'title' => __('Log in', 'buddypress'), 'href' => wp_login_url()));
        // Sign up
        if (bp_get_signup_allowed()) {
            $wp_admin_bar->add_menu(array('id' => 'bp-register', 'title' => __('Register', 'buddypress'), 'href' => bp_get_signup_page()));
        }
    }
}
开发者ID:hornetalcala,项目名称:trunk,代码行数:31,代码来源:bp-members-adminbar.php

示例2: bp_members_admin_bar_my_account_menu

/**
 * Add the "My Account" menu and all submenus.
 *
 * @since 1.6.0
 *
 * @todo Deprecate WP 3.2 Toolbar compatibility when we drop 3.2 support
 */
function bp_members_admin_bar_my_account_menu()
{
    global $wp_admin_bar;
    // Bail if this is an ajax request
    if (defined('DOING_AJAX')) {
        return;
    }
    // Logged in user
    if (is_user_logged_in()) {
        $bp = buddypress();
        // Stored in the global so we can add menus easily later on
        $bp->my_account_menu_id = 'my-account-buddypress';
        // Create the main 'My Account' menu
        $wp_admin_bar->add_menu(array('id' => $bp->my_account_menu_id, 'group' => true, 'title' => __('Edit My Profile', 'buddypress'), 'href' => bp_loggedin_user_domain(), 'meta' => array('class' => 'ab-sub-secondary')));
        // Show login and sign-up links
    } elseif (!empty($wp_admin_bar)) {
        add_filter('show_admin_bar', '__return_true');
        // Create the main 'My Account' menu
        $wp_admin_bar->add_menu(array('id' => 'bp-login', 'title' => __('Log in', 'buddypress'), 'href' => wp_login_url(bp_get_requested_url())));
        // Sign up
        if (bp_get_signup_allowed()) {
            $wp_admin_bar->add_menu(array('id' => 'bp-register', 'title' => __('Register', 'buddypress'), 'href' => bp_get_signup_page()));
        }
    }
}
开发者ID:jasonmcalpin,项目名称:BuddyPress,代码行数:32,代码来源:bp-members-adminbar.php

示例3: bp_adminbar_login_menu

function bp_adminbar_login_menu() {
	global $bp;

	if ( is_user_logged_in() )
		return false;

	echo '<li class="bp-login no-arrow"><a href="' . $bp->root_domain . '/wp-login.php?redirect_to=' . urlencode( $bp->root_domain ) . '">' . __( 'Log In', 'buddypress' ) . '</a></li>';

	// Show "Sign Up" link if user registrations are allowed
	if ( bp_get_signup_allowed() )
		echo '<li class="bp-signup no-arrow"><a href="' . bp_get_signup_page(false) . '">' . __( 'Sign Up', 'buddypress' ) . '</a></li>';
}
开发者ID:n-sane,项目名称:zaroka,代码行数:12,代码来源:bp-core-adminbar.php

示例4: process_register_button_code

 function process_register_button_code($atts, $content = '')
 {
     if (is_user_logged_in()) {
         return '';
     }
     if (!$this->data->get_option('wdfb_connect', 'allow_facebook_registration')) {
         return '';
     }
     $content = !empty($content) ? $content : __('Register with Facebook', 'wdfb');
     $base_url = defined('BP_VERSION') ? bp_get_signup_page() : apply_filters('wdfb-registration-registration_page', site_url('/wp-signup.php', 'login'));
     $url = add_query_arg(array('fb_registration_page' => 1), $base_url);
     return '<p><a class="wdfb_register_button" href="' . $url . '"><span>' . $content . '</span></a></p>';
 }
开发者ID:m-godefroid76,项目名称:devrestofactory,代码行数:13,代码来源:class_wdfb_marker_replacer.php

示例5: bp_members_admin_bar_my_account_menu

/**
 * Add the "My Account" menu and all submenus.
 *
 * @since BuddyPress (r4151)
 * @todo Deprecate WP 3.2 admin bar compatibility when we drop 3.2 support
 */
function bp_members_admin_bar_my_account_menu()
{
    global $bp, $wp_admin_bar, $wp_version;
    // Bail if this is an ajax request
    if (defined('DOING_AJAX')) {
        return;
    }
    // Logged in user
    if (is_user_logged_in()) {
        // User avatar
        $avatar = bp_core_fetch_avatar(array('item_id' => bp_loggedin_user_id(), 'email' => $bp->loggedin_user->userdata->user_email, 'width' => 16, 'height' => 16));
        // Some admin bar setup in WP 3.2 differs from WP 3.3+.
        // Backward-compatibility will be deprecated at some point.
        if (version_compare((double) $wp_version, '3.3', '>=')) {
            // Stored in the global so we can add menus easily later on
            $bp->my_account_menu_id = 'my-account-buddypress';
            $title = bp_get_loggedin_user_fullname() . $avatar;
            $class = 'opposite';
            if (!empty($avatar)) {
                $class .= ' with-avatar';
            }
            $meta = array('class' => $class);
        } else {
            $bp->my_account_menu_id = !empty($avatar) ? 'my-account-with-avatar' : 'my-account';
            $title = $avatar . bp_get_loggedin_user_fullname();
            $meta = array();
        }
        // Create the main 'My Account' menu
        $wp_admin_bar->add_menu(array('id' => $bp->my_account_menu_id, 'title' => $title, 'href' => $bp->loggedin_user->domain, 'meta' => $meta));
        // Show login and sign-up links
    } elseif (!empty($wp_admin_bar)) {
        add_filter('show_admin_bar', '__return_true');
        // Create the main 'My Account' menu
        $wp_admin_bar->add_menu(array('id' => 'bp-login', 'title' => __('Log in', 'buddypress'), 'href' => wp_login_url()));
        // Sign up
        if (bp_get_signup_allowed()) {
            $wp_admin_bar->add_menu(array('id' => 'bp-register', 'title' => __('Register', 'buddypress'), 'href' => bp_get_signup_page()));
        }
    }
}
开发者ID:newington,项目名称:buddypress,代码行数:46,代码来源:bp-members-adminbar.php

示例6: to_bp_register

 /**
  * Builds a BuddyPress URL to: `/register`.
  *
  * @param string $scheme Optional. To force a specific scheme (i.e. `//`, `http`, `https`).
  *
  * @return string BuddyPress URL to: `/register`, if BuddyPress is installed; else an empty string.
  *
  * @throws exception If invalid types are passed through arguments list.
  */
 public function to_bp_register($scheme = '')
 {
     $this->check_arg_types('string', func_get_args());
     if ($this->©env->has_bp_active() && function_exists('bp_get_signup_page')) {
         $url = bp_get_signup_page();
     } else {
         $url = '';
     }
     // Not applicable.
     return $url && $scheme ? $this->set_scheme($url, $scheme) : $url;
 }
开发者ID:panvagenas,项目名称:x-related-posts,代码行数:20,代码来源:urls.php

示例7: bp_core_wpsignup_redirect

/**
 * Redirect away from wp-signup.php if BP registration templates are present.
 *
 * @since 1.1.0
 */
function bp_core_wpsignup_redirect()
{
    // Bail in admin or if custom signup page is broken.
    if (is_admin() || !bp_has_custom_signup_page()) {
        return;
    }
    $action = !empty($_GET['action']) ? $_GET['action'] : '';
    // Not at the WP core signup page and action is not register.
    if (!empty($_SERVER['SCRIPT_NAME']) && false === strpos('wp-signup.php', $_SERVER['SCRIPT_NAME']) && 'register' != $action) {
        return;
    }
    bp_core_redirect(bp_get_signup_page());
}
开发者ID:CompositeUK,项目名称:clone.BuddyPress,代码行数:18,代码来源:bp-members-functions.php

示例8: esc_html_e

	<input name="rememberme" type="checkbox" id="em_rememberme" value="forever" /> <label><?php 
esc_html_e('Remember Me', 'dbem');
?>
</label>
	<input type="hidden" name="redirect_to" value="<?php 
echo esc_url($_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']);
?>
#em-booking" />
	<br />
	<?php 
//Signup Links
if (get_option('users_can_register')) {
    echo "<br />";
    if (function_exists('bp_get_signup_page')) {
        //Buddypress
        $register_link = bp_get_signup_page();
    } elseif (file_exists(ABSPATH . "/wp-signup.php")) {
        //MU + WP3
        $register_link = site_url('wp-signup.php', 'login');
    } else {
        $register_link = site_url('wp-login.php?action=register', 'login');
    }
    ?>

		<a href="<?php 
    echo $register_link;
    ?>
"><?php 
    esc_html_e('Sign Up', 'dbem');
    ?>
</a>&nbsp;&nbsp;|&nbsp;&nbsp; 
开发者ID:pcco,项目名称:portal-redesign,代码行数:31,代码来源:login.php

示例9: wp_nav_menu

				<?php 
if (!is_page_template('page-no-buddypanel.php') && !(!boss_get_option('boss_panel_hide') && !is_user_logged_in())) {
    wp_nav_menu(array('theme_location' => 'header-my-account', 'container_class' => 'boss-mobile-porfile-menu', 'fallback_cb' => '', 'menu_class' => 'links', 'depth' => 2, 'walker' => new BuddybossWalker()));
}
?>

				<!-- Register/Login links for logged out users -->
				<?php 
if (!is_user_logged_in() && buddyboss_is_bp_active() && !bp_hide_loggedout_adminbar(false)) {
    ?>

					<?php 
    if (buddyboss_is_bp_active() && bp_get_signup_allowed()) {
        ?>
						<a href="<?php 
        echo bp_get_signup_page();
        ?>
" class="register-link screen-reader-shortcut"><?php 
        _e('Register', 'boss');
        ?>
</a>
					<?php 
    }
    ?>

					<a href="<?php 
    echo wp_login_url();
    ?>
" class="login-link screen-reader-shortcut"><?php 
    _e('Login', 'boss');
    ?>
开发者ID:rpi-virtuell,项目名称:rw-social-learner,代码行数:31,代码来源:left-panel.php

示例10: bp_core_wpsignup_redirect

function bp_core_wpsignup_redirect()
{
    $action = !empty($_GET['action']) ? $_GET['action'] : '';
    // Not at the WP core signup page and action is not register
    if (false === strpos($_SERVER['SCRIPT_NAME'], 'wp-signup.php') && 'register' != $action) {
        return;
    }
    // Redirect to sign-up page
    if (locate_template(array('registration/register.php'), false) || locate_template(array('register.php'), false)) {
        bp_core_redirect(bp_get_signup_page());
    }
}
开发者ID:newington,项目名称:buddypress,代码行数:12,代码来源:bp-members-signup.php

示例11: site_url

if (!is_user_logged_in()) {
    ?>
								<li class="top-nav-main-item top-nav-item-first sigin-link-top"> <a href="<?php 
    echo site_url('wp-login.php', 'login_post');
    ?>
" class=""><?php 
    _ex('Sign in', 'header top signin link', 'bp-magic');
    ?>
 </a></li>

								<?php 
    if (bp_get_signup_allowed()) {
        ?>
     
									<li class="top-nav-main-item top-nav-item-second signup-link-top"> <?php 
        printf(__('<a href="%s" title="Create an account" class="my-account">Register</a>', 'bp-magic'), bp_get_signup_page());
        ?>
</li>
								<?php 
    }
    ?>
							<?php 
} else {
    ?>
 
								<?php 
    bpmagic_notifications_menu();
    ?>
         
								
								<li class="top-nav-main-item top-nav-item-second  top-account-menu ">
开发者ID:buddydev,项目名称:bp-magic,代码行数:31,代码来源:header.php

示例12: widget

    function widget($args, $instance)
    {
        if (is_user_logged_in()) {
            // || !get_option('users_can_register')
            // dont show a widget here!
            return false;
        }
        extract($args);
        echo $before_widget;
        $title = apply_filters('widget_title', $instance['title']);
        if (!empty($title)) {
            echo $before_title . $title . $after_title;
        }
        //Signup Links
        if (function_exists('bp_get_signup_page')) {
            //Buddypress
            $register_link = bp_get_signup_page();
        } elseif (file_exists(ABSPATH . "/wp-signup.php")) {
            //MU + WP3
            $register_link = site_url('wp-signup.php', 'login');
        } else {
            $register_link = site_url('wp-login.php?action=register', 'login');
        }
        ?>

            <script type="text/javascript">
                function ajax_do_register(){
                    //jQuery('<div class="LoginWithAjax_Loading" id="LoginWithAjax_Loading"></div>').prependTo('#LoginWithAjax_Register');
                    //Sort out url
                    //Get POST data
                    jQuery('#ajax_register_status').attr('class','').html('');
                    var postData = {};
                    jQuery.each(jQuery('#ajax_register_form *[name]'), function(index,el){
                        el = jQuery(el);
                        postData[el.attr('name')] = el.val();
                    });
                    jQuery.ajax({
                        url: '<?php 
        echo site_url('wp-login.php?action=register');
        ?>
',
                        dataType: 'json',
                        type: 'POST',
                        data: postData,
                        success: function(data){
                            //variable status not here anymore
                            if( data.result === true || data.result === false ){
                                if(data.result === true){
                                    jQuery('#ajax_register_form').hide();
                                    jQuery('#register_button').hide();
                                    jQuery('#ajax_register_status').attr('class','alert').html(data.message);
                                }else{
                                    //If there already is an error element, replace text contents, otherwise create a new one and insert it
                                    jQuery('#ajax_register_status').attr('class','alert alert-error').html(data.error);
                                }
                            }else{
                                jQuery('#ajax_register_status').attr('class','invalid').html('An error has occured. Please try again.');
                            }
                        },
                        error: function(){
                            jQuery('#ajax_register_status').attr('class','invalid').html('An error has occured. Please try again.');
                        }
                    });
                    return false;
                }
            </script>

        <!-- Button trigger modal -->
        <button class="btn btn-primary" data-toggle="modal" data-target="#ajax_register"><?php 
        _e('Register');
        ?>
</button>

        <!-- Modal -->
        <div class="modal fade" id="ajax_register" tabindex="-1" role="dialog" aria-labelledby="ajax_registerLabel" aria-hidden="true">
          <div class="modal-dialog">
            <div class="modal-content">
              <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title" id="ajax_registerLabel"><?php 
        _e('Forum Registration');
        ?>
</h4>
              </div>
              <div class="modal-body">
                <div id="ajax_register_status"></div>
                <form name="ajax_register_form" id="ajax_register_form" action="#" method="post">
                    <!--<p>
                        <label><?php 
        /*_e('Envato Item Purchase Code') */
        ?>
<br />
                        <input type="text" name="purchase_code" id="purchase_code" class="input-xlarge" tabindex="18" /></label>
                    </p>-->
                    <div class="form-group">
                        <label for="register_widget_username"><?php 
        _e('Username');
        ?>
</label>
                        <input type="text" class="form-control" name="user_login" id="register_widget_username" placeholder="">
//.........这里部分代码省略.........
开发者ID:paulmedwal,项目名称:edxforumspublic,代码行数:101,代码来源:bbps-register-widget.php

示例13: kleo_check_access

 /**
  * Checks $area for applied restrictions based on user status(logged in, membership level)
  * and does the proper redirect
  * @global object $current_user
  * @param string $area
  * @param array $restrict_options
  * @since 2.0
  */
 function kleo_check_access($area, $restrict_options = null)
 {
     global $current_user;
     if (!$restrict_options) {
         $restrict_options = kleo_memberships();
     }
     if (pmpro_url("levels")) {
         $default_redirect = pmpro_url("levels");
     } else {
         $default_redirect = bp_get_signup_page();
     }
     $default_redirect = apply_filters('kleo_pmpro_url_redirect', $default_redirect);
     //no restriction
     if ($restrict_options[$area]['type'] == 0) {
         return;
     }
     //restrict all members -> go to home url
     if ($restrict_options[$area]['type'] == 1) {
         wp_redirect(apply_filters('kleo_pmpro_home_redirect', home_url()));
         exit;
     }
     //is a member
     if (isset($current_user->membership_level) && $current_user->membership_level->ID) {
         //if restrict my level
         if ($restrict_options[$area]['type'] == 2 && is_array($restrict_options[$area]['levels']) && !empty($restrict_options[$area]['levels']) && pmpro_hasMembershipLevel($restrict_options[$area]['levels'])) {
             wp_redirect($default_redirect);
             exit;
         }
         //logged in but not a member
     } else {
         if (is_user_logged_in()) {
             if ($restrict_options[$area]['type'] == 2 && isset($restrict_options[$area]['not_member']) && $restrict_options[$area]['not_member'] == 1) {
                 wp_redirect($default_redirect);
                 exit;
             }
         } else {
             if ($restrict_options[$area]['type'] == 2 && isset($restrict_options[$area]['guest']) && $restrict_options[$area]['guest'] == 1) {
                 wp_redirect($default_redirect);
                 exit;
             }
         }
     }
 }
开发者ID:6226,项目名称:wp,代码行数:51,代码来源:config.php

示例14: geodir_buddypress_signup_reg_form_link

/**
 * GD registration to BuddyPress registration.
 *
 * @since 1.0.0
 * @package GeoDirectory_BuddyPress_Integration
 *
 * @param string $link Signup page link.
 * @return string Modified Signup page link.
 */
function geodir_buddypress_signup_reg_form_link($link)
{
    if (get_option('geodir_buddypress_bp_register')) {
        $link = bp_get_signup_page();
    }
    return $link;
}
开发者ID:poweronio,项目名称:mbsite,代码行数:16,代码来源:gdbuddypress_functions.php

示例15: widget

 function widget($args, $instance)
 {
     extract($args, EXTR_SKIP);
     echo $before_widget;
     // set widget title when logged out
     if (!is_user_logged_in()) {
         $title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']);
         if (!empty($title)) {
             echo $before_title . $title . $after_title;
         }
     }
     // start widget display code
     if (function_exists('bp_is_active')) {
         // check is user is logged in
         if (is_user_logged_in()) {
             echo "<div id='sidebarme'>";
             echo "<a href='" . bp_loggedin_user_domain() . "'>";
             echo bp_loggedin_user_avatar('type=thumb');
             echo "</a>";
             echo "<ul class='sidebarme-quicklinks'>";
             echo "<li class='sidebarme-username'>" . bp_core_get_userlink(bp_loggedin_user_id()) . "</li>";
             echo "<li class='sidebarme-profile'>";
             echo "<a href='" . bp_loggedin_user_domain() . "profile/edit'>" . __('Edit Profile', 'boss') . "</a>";
             echo " &middot; ";
             echo wp_loginout();
             echo "</li>";
             echo "</ul>";
             echo "</div>";
             // check if user is logged out
         } else {
             echo "<form name='login-form' id='sidebar-login-form' class='standard-form' action='" . site_url('wp-login.php', 'login_post') . "' method='post'>";
             echo "<label>" . __('Username', 'boss') . "</label>";
             $return = isset($_POST['value']) ? $_POST['value'] : '';
             $return .= "<input type='text' name='log' id='sidebar-user-login' class='input' value='";
             if (isset($user_login)) {
                 $return .= esc_attr(stripslashes($user_login));
             }
             $return .= "' tabindex='97' />";
             echo $return;
             echo "<label>" . __('Password', 'boss') . "</label>";
             echo "<input type='password' name='pwd' id='sidebar-user-pass' class='input' value='' tabindex='98' />";
             echo "<p class='forgetmenot'><input name='rememberme' type='checkbox' id='sidebar-rememberme' value='forever' tabindex='99' /> " . __('Remember Me', 'boss') . "</p>";
             echo do_action('bp_sidebar_login_form');
             echo "<input type='submit' name='wp-submit' id='sidebar-wp-submit' value='" . __('Log In', 'boss') . "' tabindex='100' />";
             if (bp_get_signup_allowed()) {
                 echo " <a class='sidebar-wp-register' href='" . bp_get_signup_page() . "'>" . __('Register', 'boss') . "</a>";
             }
             echo "</form>";
         }
     }
     // end widget display code
     echo $after_widget;
 }
开发者ID:tvolmari,项目名称:hammydowns,代码行数:53,代码来源:buddyboss-profile-widget-loader.php


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