本文整理汇总了PHP中bp_has_custom_signup_page函数的典型用法代码示例。如果您正苦于以下问题:PHP bp_has_custom_signup_page函数的具体用法?PHP bp_has_custom_signup_page怎么用?PHP bp_has_custom_signup_page使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了bp_has_custom_signup_page函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: bp_signup_page
function bp_signup_page($echo = true)
{
global $bp;
if (bp_has_custom_signup_page()) {
if ($echo) {
echo $bp->root_domain . '/' . BP_REGISTER_SLUG;
} else {
return $bp->root_domain . '/' . BP_REGISTER_SLUG;
}
} else {
if ($echo) {
echo $bp->root_domain . '/wp-signup.php';
} else {
return $bp->root_domain . '/wp-signup.php';
}
}
}
示例2: bp_core_filter_blog_welcome_email
/**
* Replace the generated password in the welcome email with '[User Set]'.
*
* On a standard BP installation, users who register themselves also set their
* own passwords. Therefore there is no need for the insecure practice of
* emailing the plaintext password to the user in the welcome email.
*
* This filter will not fire when a user is registered by the site admin.
*
* @param string $welcome_email Complete email passed through WordPress.
* @param int $blog_id ID of the blog user is joining.
* @param int $user_id ID of the user joining.
* @param string $password Password of user.
* @return string Filtered $welcome_email with $password replaced by '[User Set]'.
*/
function bp_core_filter_blog_welcome_email( $welcome_email, $blog_id, $user_id, $password ) {
// Don't touch the email when a user is registered by the site admin
if ( ( is_admin() || is_network_admin() ) && buddypress()->members->admin->signups_page != get_current_screen()->id ) {
return $welcome_email;
}
// Don't touch the email if we don't have a custom registration template
if ( ! bp_has_custom_signup_page() )
return $welcome_email;
// [User Set] Replaces $password in welcome email; Represents value set by user
return str_replace( $password, __( '[User Set]', 'buddypress' ), $welcome_email );
}
示例3: 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());
}
示例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: 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);
}
示例6: bp_core_filter_blog_welcome_email
/**
* Replace the generated password in the welcome email with '[User Set]'.
*
* On a standard BP installation, users who register themselves also set their
* own passwords. Therefore there is no need for the insecure practice of
* emailing the plaintext password to the user in the welcome email.
*
* This filter will not fire when a user is registered by the site admin.
*
* @param string $welcome_email Complete email passed through WordPress.
* @param int $blog_id ID of the blog user is joining.
* @param int $user_id ID of the user joining.
* @param string $password Password of user.
* @return string Filtered $welcome_email with $password replaced by '[User Set]'.
*/
function bp_core_filter_blog_welcome_email($welcome_email, $blog_id, $user_id, $password)
{
// Don't touch the email when a user is registered by the site admin.
if (is_admin()) {
return $welcome_email;
}
// Don't touch the email if we don't have a custom registration template
if (!bp_has_custom_signup_page()) {
return $welcome_email;
}
// [User Set] Replaces $password in welcome email; Represents value set by user
return str_replace($password, __('[User Set]', 'buddypress'), $welcome_email);
}
示例7: geodir_buddypress_gdsignup_redirect
/**
* Redirect away from gd signup if BP registration templates are present.
*
* @since 1.0.0
* @package GeoDirectory_BuddyPress_Integration
*/
function geodir_buddypress_gdsignup_redirect()
{
if (!get_option('geodir_buddypress_bp_register')) {
return;
}
// Bail in admin or logged in
if (is_admin() || !bp_has_custom_signup_page() || is_user_logged_in()) {
return;
}
$geodir_signup = !empty($_GET['geodir_signup']) ? true : false;
$sign_up = !empty($_GET['page1']) && trim($_GET['page1']) == 'sign_up' ? true : false;
// Not at the WP core signup page and action is not register
if (!empty($_SERVER['SCRIPT_NAME']) && false !== strpos($_SERVER['SCRIPT_NAME'], 'index.php') && $geodir_signup) {
// adds class to gd signup page
add_filter('body_class', 'geodir_buddypress_body_class', 100);
add_action('wp_head', 'geodir_buddypress_custom_style');
add_action('login_form', 'geodir_buddypress_login_form');
if (!$sign_up) {
return;
}
} else {
return;
}
bp_core_redirect(bp_get_signup_page());
}
示例8: bp_get_signup_page
function bp_get_signup_page() {
global $bp;
if ( bp_has_custom_signup_page() )
$page = $bp->root_domain . '/' . BP_REGISTER_SLUG;
else
$page = $bp->root_domain . '/wp-signup.php';
return apply_filters( 'bp_get_signup_page', $page );
}