本文整理汇总了PHP中bp_get_signup_slug函数的典型用法代码示例。如果您正苦于以下问题:PHP bp_get_signup_slug函数的具体用法?PHP bp_get_signup_slug怎么用?PHP bp_get_signup_slug使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了bp_get_signup_slug函数的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: bp_register_url
/**
* Builds a BuddyPress registration URL to `/register`.
*
* @package s2Member\Utilities
* @since 111009
*
* @return str|bool Full URL to `/register`, if BuddyPress is installed; else false.
*/
public static function bp_register_url()
{
if (c_ws_plugin__s2member_utils_conds::bp_is_installed()) {
return home_url(function_exists('bp_get_signup_slug') ? bp_get_signup_slug() . '/' : BP_REGISTER_SLUG . '/');
}
return false;
}
示例2: bp_register_url
/**
* Builds a BuddyPress registration URL to `/register`.
*
* @package s2Member\Utilities
* @since 111009
*
* @return str|bool Full URL to `/register`, if BuddyPress is installed; else false.
*/
public static function bp_register_url()
{
if (c_ws_plugin__s2member_utils_conds::bp_is_installed()) {
return site_url(function_exists("bp_get_signup_slug") ? bp_get_signup_slug() . "/" : BP_REGISTER_SLUG . "/");
}
return false;
}
示例3: invite_anyone_accept_invitation_backward_compatibility
/**
* Redirect from old 'accept-invitation' and 'opt-out' email formats
*
* Invite Anyone used to use the current_action and action_variables for
* subpages of the registration screen. This caused some problems with URL
* encoding, and it also broke with BP 2.1. In IA 1.3.4, this functionality
* was moved to URL arguments; the current function handles backward
* compatibility with the old addresses.
*
* @since 1.3.4
*/
function invite_anyone_accept_invitation_backward_compatibility()
{
if (!bp_is_register_page()) {
return;
}
if (!bp_current_action()) {
return;
}
$action = bp_current_action();
if (!in_array($action, array('accept-invitation', 'opt-out'))) {
return;
}
$redirect_to = add_query_arg('iaaction', $action, bp_get_root_domain() . '/' . bp_get_signup_slug() . '/');
$email = bp_action_variable(0);
$email = str_replace(' ', '+', $email);
if (!empty($email)) {
$redirect_to = add_query_arg('email', $email, $redirect_to);
}
bp_core_redirect($redirect_to);
die;
}
示例4: bp_get_signup_page
/**
* Get the URL to the signup page.
*
* @return string
*/
function bp_get_signup_page()
{
if (bp_has_custom_signup_page()) {
$page = trailingslashit(bp_get_root_domain() . '/' . bp_get_signup_slug());
} else {
$page = bp_get_root_domain() . '/wp-signup.php';
}
/**
* Filters the URL to the signup page.
*
* @since 1.1.0
*
* @param string $page URL to the signup page.
*/
return apply_filters('bp_get_signup_page', $page);
}
示例5: do_action
<?php
} else {
?>
<?php
do_action('bp_before_sidebar_login_form');
?>
<?php
if (bp_get_signup_allowed()) {
?>
<p id="login-text">
<?php
printf(__('Please <a href="%s" title="Create an account">create an account</a> to get started.', 'buddypress'), site_url(bp_get_signup_slug() . '/'));
?>
</p>
<?php
}
?>
<form name="login-form" id="sidebar-login-form" class="standard-form" action="<?php
echo site_url('wp-login.php', 'login_post');
?>
" method="post">
<label><?php
_e('Username', 'buddypress');
?>
示例6: bp_get_signup_page
function bp_get_signup_page()
{
global $bp;
if (bp_has_custom_signup_page()) {
$page = trailingslashit(bp_get_root_domain() . '/' . bp_get_signup_slug());
} else {
$page = bp_get_root_domain() . '/nxt-signup.php';
}
return apply_filters('bp_get_signup_page', $page);
}
示例7: wff_homepage_welcome_text
/**
* Default Welcome Text on the Hero Homepage
*
*/
function wff_homepage_welcome_text()
{
if (function_exists('bp_is_active')) {
printf(__('<p>You can use this space to welcome new and returning visitors! Maybe tell them something about your community and why they should become a member? What is the most important thing you want people to know about your site when they first visit? This is the place to do it!</p>
<p>You can edit the text in this header by editing your Homepage template in the WordPress Admin.</p>
<p>
<a class="btn btn-success btn-lg" href="%s"><i class="fa fa-user-plus"></i> Create Your Account</a></p>', 'wefoster'), bp_get_root_domain() . '/' . bp_get_signup_slug() . '/', wp_login_url());
} else {
printf(__('<p>You can use this space to welcome new and returning visitors! Maybe tell them something about your community and why they should become a member? What is the most important thing you want people to know about your site when they first visit? This is the place to do it!</p>
<p>You can edit the text in this header by editing your Homepage template in the WordPress Admin.</p>
<p>
<a class="btn btn-primary btn-success" href="%s">Read More About Us</a></p>', 'wefoster'), get_site_url() . '/about-us');
}
}
示例8: is_systematic_use_specific_page
/**
* Determines if a specific Post/Page ID, or URI, is Systematic in any way.
*
* @package s2Member\Systematics
* @since 3.5
*
* @param int|string $singular_id Optional. A numeric Post/Page ID in WordPress.
* @param string $uri Optional. A request URI to test against.
* @return bool True if Systematic, else false.
*
* @todo Test URIs against formulated links for Systematic Pages like the Membership Options Page?
* Don't think this is required though; as it's already handled in other areas, correct?
*/
public static function is_systematic_use_specific_page($singular_id = FALSE, $uri = FALSE)
{
global $bp;
// If BuddyPress is installed, we'll need this global reference.
$singular_id = $singular_id && is_numeric($singular_id) ? (int) $singular_id : false;
// Force types.
$uri = $uri && is_string($uri) && ($uri = c_ws_plugin__s2member_utils_urls::parse_uri($uri)) ? $uri : false;
if (c_ws_plugin__s2member_systematics_sp::is_s2_systematic_use_specific_page($singular_id, $uri)) {
return $is_systematic = apply_filters("ws_plugin__s2member_is_systematic_use_specific_page", true, get_defined_vars());
} else {
if (c_ws_plugin__s2member_systematics_sp::is_wp_systematic_use_specific_page($singular_id, $uri)) {
return $is_systematic = apply_filters("ws_plugin__s2member_is_systematic_use_specific_page", true, get_defined_vars());
} else {
if ($uri && c_ws_plugin__s2member_utils_conds::bp_is_installed() && preg_match("/\\/(?:" . preg_quote(trim(function_exists("bp_get_signup_slug") ? bp_get_signup_slug() : BP_REGISTER_SLUG, "/"), "/") . "|" . preg_quote(trim(function_exists("bp_get_activate_slug") ? bp_get_activate_slug() : BP_ACTIVATION_SLUG, "/"), "/") . ")(?:\\/|\\?|\$)/", $uri)) {
return $is_systematic = apply_filters("ws_plugin__s2member_is_systematic_use_specific_page", true, get_defined_vars());
} else {
if ($singular_id && c_ws_plugin__s2member_utils_conds::bp_is_installed() && (!empty($bp->pages->register->id) && $singular_id === (int) $bp->pages->register->id || !empty($bp->pages->activate->id) && $singular_id === (int) $bp->pages->activate->id)) {
return $is_systematic = apply_filters("ws_plugin__s2member_is_systematic_use_specific_page", true, get_defined_vars());
} else {
if ($singular_id && $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_welcome_page"] && $singular_id === (int) $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_welcome_page"]) {
return $is_systematic = apply_filters("ws_plugin__s2member_is_systematic_use_specific_page", true, get_defined_vars());
} else {
if ($singular_id && $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["membership_options_page"] && $singular_id === (int) $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["membership_options_page"]) {
return $is_systematic = apply_filters("ws_plugin__s2member_is_systematic_use_specific_page", true, get_defined_vars());
} else {
if ($singular_id && $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["file_download_limit_exceeded_page"] && $singular_id === (int) $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["file_download_limit_exceeded_page"]) {
return $is_systematic = apply_filters("ws_plugin__s2member_is_systematic_use_specific_page", true, get_defined_vars());
} else {
if ($uri && $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_redirection_override"] && ($_lro = c_ws_plugin__s2member_login_redirects::login_redirection_uri(false, "root-returns-false")) && preg_match("/^" . preg_quote($_lro, "/") . "\$/", $uri)) {
return $is_systematic = apply_filters("ws_plugin__s2member_is_systematic_use_specific_page", true, get_defined_vars());
} else {
// Otherwise, we return false (i.e. it's NOT a Systematic Use Page in any way).
return $is_systematic = apply_filters("ws_plugin__s2member_is_systematic_use_specific_page", false, get_defined_vars());
}
}
}
}
}
}
}
}
}
示例9: wp_nonce_field
<input type="checkbox" name="rememberme" id="rememberme" value="forever" tabindex="1">
<label for="rememberme">Save</label>
<input type="hidden" name="redirect_to" id="login-redirect" value="<?php
echo $url;
?>
">
<?php
wp_nonce_field('top-login-nonce', 'security');
?>
<button type="submit" name="wp-submit" id="login-submit" class="admin-bar-login-link" tabindex="1"><i class="fa fa-lock"></i>Log In</button>
<a id="register" class="admin-bar-button button" href="<?php
echo trailingslashit(SITEURL) . bp_get_signup_slug();
?>
" title="Register a new user account!"><i class="fa fa-user"></i>Register</a>
<a id="lostpass" class="admin-bar-button button" href="<?php
echo wp_lostpassword_url();
?>
" title="Lost your password?"><i class="fa fa-question"></i>Lost Password</a>
</fieldset>
<?php
}
?>
<div id="top-login-message"></div>
</form>
<?php
示例10: cbox_theme_populate_sidebars
/**
* Populates sidebars throughout the theme on activation
*
* When activating cbox-theme, this function is triggered. It checks each of
* cbox-theme's sidebars, and for each one that is empty, it sets up a number
* of default widgets. Note that this will not override changes you've made
* to any of these sidebars, unless you've cleared them out completely.
*
* @uses CBox_Widget_Setter
* @since 1.0
*/
function cbox_theme_populate_sidebars()
{
// Homepage Top Right
if (!CBox_Widget_Setter::is_sidebar_populated('homepage-top-right')) {
$welcome_text = sprintf(__('<p><a class="button green" href="%s">Join us</a> or <a class="button white" href="%s">Login</a></p>', 'cbox-theme'), bp_get_root_domain() . '/' . bp_get_signup_slug() . '/', wp_login_url());
if (current_user_can('edit_theme_options')) {
$welcome_text = sprintf(__('<p>To modify the text of this widget, and other widgets you see throughout the site, visit <a href="%s">Dashboard > Appearance > Widgets</a>.', 'cbox-theme'), admin_url('widgets.php')) . $welcome_text;
}
CBox_Widget_Setter::set_widget(array('id_base' => 'text', 'sidebar_id' => 'homepage-top-right', 'settings' => array('title' => __('Welcome', 'cbox-theme'), 'text' => $welcome_text, 'filter' => false)));
// Pull up a random member to populate
global $wpdb;
$username = $wpdb->get_var("SELECT user_login FROM {$wpdb->users} ORDER BY RAND()");
CBox_Widget_Setter::set_widget(array('id_base' => 'cac_featured_content_widget', 'sidebar_id' => 'homepage-top-right', 'settings' => array('title' => __('Featured Member', 'cbox-theme'), 'title_element' => 'h4', 'featured_content_type' => 'member', 'featured_member' => $username, 'custom_description' => __('Use the Featured Content widget to show off outstanding content from your community.', 'cbox-theme'), 'display_images' => '1', 'crop_length' => '250', 'image_width' => '50', 'image_height' => '50', 'image_url' => '', 'read_more' => '', 'filter' => false)));
}
// End homepage-top-widget
// Homepage Center Widget
if (!CBox_Widget_Setter::is_sidebar_populated('homepage-center-widget')) {
CBox_Widget_Setter::set_widget(array('id_base' => 'bp_core_recently_active_widget', 'sidebar_id' => 'homepage-center-widget', 'settings' => array('title' => __('Recently Active Members', 'cbox-theme'), 'max_members' => 15, 'filter' => false)));
}
// End homepage-center-widget
// Homepage Left
if (!CBox_Widget_Setter::is_sidebar_populated('homepage-left')) {
if (bp_is_active('groups')) {
CBox_Widget_Setter::set_widget(array('id_base' => 'bp_groups_widget', 'sidebar_id' => 'homepage-left', 'settings' => array('title' => __('Groups', 'cbox-theme'), 'max_groups' => 20, 'link_title' => 1, 'group_default' => 'newest', 'filter' => false)));
}
}
// End homepage-left
// Homepage Middle
if (!CBox_Widget_Setter::is_sidebar_populated('homepage-middle')) {
CBox_Widget_Setter::set_widget(array('id_base' => 'bp_core_members_widget', 'sidebar_id' => 'homepage-middle', 'settings' => array('title' => __('Members', 'cbox-theme'), 'max_members' => 20, 'link_title' => 1, 'member_default' => 'newest', 'filter' => false)));
}
// End homepage-middle
// Homepage Right
if (!CBox_Widget_Setter::is_sidebar_populated('homepage-right')) {
if (bp_is_active('blogs') && is_multisite() && CBox_Widget_Setter::widget_exists('cbox_bp_blogs_recent_posts_widget')) {
CBox_Widget_Setter::set_widget(array('id_base' => 'cbox_bp_blogs_recent_posts_widget', 'sidebar_id' => 'homepage-right', 'settings' => array('title' => __('Recent Blog Posts', 'cbox-theme'), 'filter' => false)));
} else {
CBox_Widget_Setter::set_widget(array('id_base' => 'recent-posts', 'sidebar_id' => 'homepage-right', 'settings' => array('title' => __('Recent Blog Posts', 'cbox-theme'), 'filter' => false)));
}
}
// End homepage-right
// Blog Sidebar
if (!CBox_Widget_Setter::is_sidebar_populated('blog-sidebar')) {
if (bp_is_active('blogs') && is_multisite() && CBox_Widget_Setter::widget_exists('cbox_bp_blogs_recent_posts_widget')) {
CBox_Widget_Setter::set_widget(array('id_base' => 'cbox_bp_blogs_recent_posts_widget', 'sidebar_id' => 'blog-sidebar', 'settings' => array('title' => __('Recent Blog Posts', 'cbox-theme'), 'filter' => false)));
} else {
CBox_Widget_Setter::set_widget(array('id_base' => 'search', 'sidebar_id' => 'blog-sidebar', 'settings' => array('title' => __('Search', 'cbox-theme'), 'filter' => false)));
CBox_Widget_Setter::set_widget(array('id_base' => 'archives', 'sidebar_id' => 'blog-sidebar', 'settings' => array('title' => __('Archives', 'cbox-theme'), 'filter' => false)));
CBox_Widget_Setter::set_widget(array('id_base' => 'recent-posts', 'sidebar_id' => 'blog-sidebar', 'settings' => array('title' => __('Recent Blog Posts', 'cbox-theme'), 'filter' => false)));
}
}
// End blog-sidebar
// Page Sidebar
if (!CBox_Widget_Setter::is_sidebar_populated('page-sidebar')) {
CBox_Widget_Setter::set_widget(array('id_base' => 'pages', 'sidebar_id' => 'page-sidebar', 'settings' => array('title' => __('Pages', 'cbox-theme'), 'filter' => false)));
}
// End page-sidebar
// Footer Left
if (!CBox_Widget_Setter::is_sidebar_populated('footer-left')) {
CBox_Widget_Setter::set_widget(array('id_base' => 'text', 'sidebar_id' => 'footer-left', 'settings' => array('title' => __('Contact Us', 'cbox-theme'), 'text' => __('Put your contact information in this widget.', 'cbox-theme'), 'filter' => false)));
}
// End footer-left
// Footer Middle
if (!CBox_Widget_Setter::is_sidebar_populated('footer-middle')) {
CBox_Widget_Setter::set_widget(array('id_base' => 'text', 'sidebar_id' => 'footer-middle', 'settings' => array('title' => __('About', 'cbox-theme'), 'text' => __('Some brief information about your site.', 'cbox-theme'), 'filter' => false)));
}
// End footer-middle
// Footer Right
if (!CBox_Widget_Setter::is_sidebar_populated('footer-right')) {
CBox_Widget_Setter::set_widget(array('id_base' => 'pages', 'sidebar_id' => 'footer-right', 'settings' => array('title' => __('Sitemap', 'cbox-theme'), 'text' => __('You might use this space to thank ', 'cbox-theme'), 'filter' => false)));
}
// End footer-right
// Activity Sidebar
if (!CBox_Widget_Setter::is_sidebar_populated('activity-sidebar')) {
CBox_Widget_Setter::set_widget(array('id_base' => 'bp_core_whos_online_widget', 'sidebar_id' => 'activity-sidebar', 'settings' => array('title' => __('Who\'s Online', 'cbox-theme'), 'max_members' => 20, 'filter' => false)));
}
// End activity-sidebar
// Activity Sidebar
if (!CBox_Widget_Setter::is_sidebar_populated('member-sidebar')) {
CBox_Widget_Setter::set_widget(array('id_base' => 'bp_core_whos_online_widget', 'sidebar_id' => 'member-sidebar', 'settings' => array('title' => __('Who\'s Online', 'cbox-theme'), 'max_members' => 20, 'filter' => false)));
CBox_Widget_Setter::set_widget(array('id_base' => 'bp_core_recently_active_widget', 'sidebar_id' => 'member-sidebar', 'settings' => array('title' => __('Recently Active Members', 'cbox-theme'), 'max_members' => 20, 'filter' => false)));
}
// End member-sidebar
// Group Sidebar
if (!CBox_Widget_Setter::is_sidebar_populated('groups-sidebar')) {
if (bp_is_active('groups')) {
CBox_Widget_Setter::set_widget(array('id_base' => 'bp_groups_widget', 'sidebar_id' => 'groups-sidebar', 'settings' => array('title' => __('Groups', 'cbox-theme'), 'max_groups' => 5, 'link_title' => '1', 'filter' => false)));
}
}
//.........这里部分代码省略.........
示例11: is_systematic_use_specific_page
/**
* Determines if a specific Post/Page ID, or URI, is Systematic in any way.
*
* @package s2Member\Systematics
* @since 3.5
*
* @param int|string $singular_id Optional. A numeric Post/Page ID in WordPress.
* @param string $uri Optional. A request URI to test against.
*
* @return bool True if Systematic, else false.
*
* @todo Test URIs against formulated links for Systematic Pages like the Membership Options Page?
* Don't think this is required though; as it's already handled in other areas, correct?
*/
public static function is_systematic_use_specific_page($singular_id = '', $uri = '')
{
global $bp;
// If BuddyPress is installed, we'll need this global reference.
$ci = $GLOBALS['WS_PLUGIN__']['s2member']['o']['ruris_case_sensitive'] ? '' : 'i';
$singular_id = $singular_id && is_numeric($singular_id) ? (int) $singular_id : FALSE;
// Force types.
$uri = $uri && is_string($uri) && ($uri = c_ws_plugin__s2member_utils_urls::parse_uri($uri)) ? $uri : FALSE;
if (c_ws_plugin__s2member_systematics_sp::is_s2_systematic_use_specific_page($singular_id, $uri)) {
return $is_systematic = apply_filters('ws_plugin__s2member_is_systematic_use_specific_page', TRUE, get_defined_vars());
}
if (c_ws_plugin__s2member_systematics_sp::is_wp_systematic_use_specific_page($singular_id, $uri)) {
return $is_systematic = apply_filters('ws_plugin__s2member_is_systematic_use_specific_page', TRUE, get_defined_vars());
}
if ($uri && c_ws_plugin__s2member_utils_conds::bp_is_installed() && preg_match('/\\/(?:' . preg_quote(trim(function_exists('bp_get_signup_slug') ? bp_get_signup_slug() : BP_REGISTER_SLUG, '/'), '/') . '|' . preg_quote(trim(function_exists('bp_get_activate_slug') ? bp_get_activate_slug() : BP_ACTIVATION_SLUG, '/'), '/') . ')(?:\\/|\\?|$)/' . $ci, $uri)) {
return $is_systematic = apply_filters('ws_plugin__s2member_is_systematic_use_specific_page', TRUE, get_defined_vars());
}
if ($singular_id && c_ws_plugin__s2member_utils_conds::bp_is_installed() && (!empty($bp->pages->register->id) && $singular_id === (int) $bp->pages->register->id || !empty($bp->pages->activate->id) && $singular_id === (int) $bp->pages->activate->id)) {
return $is_systematic = apply_filters('ws_plugin__s2member_is_systematic_use_specific_page', TRUE, get_defined_vars());
}
if ($singular_id && $GLOBALS['WS_PLUGIN__']['s2member']['o']['login_welcome_page'] && $singular_id === (int) $GLOBALS['WS_PLUGIN__']['s2member']['o']['login_welcome_page']) {
return $is_systematic = apply_filters('ws_plugin__s2member_is_systematic_use_specific_page', TRUE, get_defined_vars());
}
if ($singular_id && $GLOBALS['WS_PLUGIN__']['s2member']['o']['membership_options_page'] && $singular_id === (int) $GLOBALS['WS_PLUGIN__']['s2member']['o']['membership_options_page']) {
return $is_systematic = apply_filters('ws_plugin__s2member_is_systematic_use_specific_page', TRUE, get_defined_vars());
}
if ($singular_id && $GLOBALS['WS_PLUGIN__']['s2member']['o']['file_download_limit_exceeded_page'] && $singular_id === (int) $GLOBALS['WS_PLUGIN__']['s2member']['o']['file_download_limit_exceeded_page']) {
return $is_systematic = apply_filters('ws_plugin__s2member_is_systematic_use_specific_page', TRUE, get_defined_vars());
}
if ($uri && $GLOBALS['WS_PLUGIN__']['s2member']['o']['login_redirection_override'] && ($_lro = c_ws_plugin__s2member_login_redirects::login_redirection_uri(NULL, 'root-returns-false')) && preg_match('/^' . preg_quote($_lro, '/') . '$/' . $ci, $uri)) {
return $is_systematic = apply_filters('ws_plugin__s2member_is_systematic_use_specific_page', TRUE, get_defined_vars());
}
return $is_systematic = apply_filters('ws_plugin__s2member_is_systematic_use_specific_page', FALSE, get_defined_vars());
}