diff --git bp-blogs/bp-blogs-template.php bp-blogs/bp-blogs-template.php
index 7efaff0..17341fb 100644
|
|
|
function bp_blogs_signup_blog( $blogname = '', $blog_title = '', $errors = '' ) |
| 1007 | 1007 | } |
| 1008 | 1008 | |
| 1009 | 1009 | /** |
| 1010 | | * Output the base URL for subdomain installations of WordPress Multisite. |
| 1011 | | * |
| 1012 | | * @since BuddyPress (1.6.0) |
| 1013 | | */ |
| 1014 | | function bp_blogs_subdomain_base() { |
| 1015 | | echo bp_blogs_get_subdomain_base(); |
| 1016 | | } |
| 1017 | | /** |
| 1018 | | * Return the base URL for subdomain installations of WordPress Multisite. |
| 1019 | | * |
| 1020 | | * @since BuddyPress (1.6.0) |
| 1021 | | * |
| 1022 | | * @return string The base URL - eg, 'example.com' for site_url() example.com or www.example.com. |
| 1023 | | */ |
| 1024 | | function bp_blogs_get_subdomain_base() { |
| 1025 | | global $current_site; |
| 1026 | | |
| 1027 | | return apply_filters( 'bp_blogs_subdomain_base', preg_replace( '|^www\.|', '', $current_site->domain ) . $current_site->path ); |
| 1028 | | } |
| 1029 | | |
| 1030 | | /** |
| 1031 | 1010 | * Process a blog registration submission. |
| 1032 | 1011 | * |
| 1033 | 1012 | * Passes submitted values to {@link wpmu_create_blog()}. |
diff --git bp-core/deprecated/2.0.php bp-core/deprecated/2.0.php
index 18608d2..a2cb2d4 100644
|
|
|
function bp_blogs_catch_published_post() { |
| 30 | 30 | function bp_messages_screen_inbox_mark_notifications() { |
| 31 | 31 | _deprecated_function( __FUNCTION__, '2.0', 'bp_messages_screen_conversation_mark_notifications()' ); |
| 32 | 32 | } |
| | 33 | |
| | 34 | /** |
| | 35 | * @deprecated BuddyPress (2.0.0) |
| | 36 | */ |
| | 37 | function bp_blogs_subdomain_base() { |
| | 38 | _deprecated_function( __FUNCTION__, '2.0', 'bp_signup_subdomain_base()' ); |
| | 39 | echo bp_signup_get_subdomain_base(); |
| | 40 | } |
| | 41 | |
| | 42 | /** |
| | 43 | * @deprecated BuddyPress (2.0.0) |
| | 44 | */ |
| | 45 | function bp_blogs_get_subdomain_base() { |
| | 46 | _deprecated_function( __FUNCTION__, '2.0', 'bp_signup_get_subdomain_base()' ); |
| | 47 | return bp_signup_get_subdomain_base(); |
| | 48 | } |
diff --git bp-members/bp-members-template.php bp-members/bp-members-template.php
index 5741693..80d3a0f 100644
|
|
|
function bp_signup_blog_url_value() { |
| 1143 | 1143 | return apply_filters( 'bp_get_signup_blog_url_value', $value ); |
| 1144 | 1144 | } |
| 1145 | 1145 | |
| | 1146 | /** |
| | 1147 | * Output the base URL for subdomain installations of WordPress Multisite. |
| | 1148 | * |
| | 1149 | * @since BuddyPress (2.0.0) |
| | 1150 | */ |
| | 1151 | function bp_signup_subdomain_base() { |
| | 1152 | echo bp_signup_get_subdomain_base(); |
| | 1153 | } |
| | 1154 | /** |
| | 1155 | * Return the base URL for subdomain installations of WordPress Multisite. |
| | 1156 | * |
| | 1157 | * Replaces bp_blogs_get_subdomain_base() |
| | 1158 | * |
| | 1159 | * @since BuddyPress (2.0.0) |
| | 1160 | * |
| | 1161 | * @return string The base URL - eg, 'example.com' for site_url() example.com or www.example.com. |
| | 1162 | */ |
| | 1163 | function bp_signup_get_subdomain_base() { |
| | 1164 | global $current_site; |
| | 1165 | |
| | 1166 | // In case plugins are still using this filter |
| | 1167 | $subdomain_base = apply_filters( 'bp_blogs_subdomain_base', preg_replace( '|^www\.|', '', $current_site->domain ) . $current_site->path ); |
| | 1168 | |
| | 1169 | return apply_filters( 'bp_signup_subdomain_base', $subdomain_base ); |
| | 1170 | } |
| | 1171 | |
| 1146 | 1172 | function bp_signup_blog_title_value() { |
| 1147 | 1173 | echo bp_get_signup_blog_title_value(); |
| 1148 | 1174 | } |
diff --git bp-templates/bp-legacy/buddypress/members/register.php bp-templates/bp-legacy/buddypress/members/register.php
index 6624817..c237462 100644
|
|
|
|
| 133 | 133 | <?php do_action( 'bp_signup_blog_url_errors' ); ?> |
| 134 | 134 | |
| 135 | 135 | <?php if ( is_subdomain_install() ) : ?> |
| 136 | | http:// <input type="text" name="signup_blog_url" id="signup_blog_url" value="<?php bp_signup_blog_url_value(); ?>" /> .<?php bp_blogs_subdomain_base(); ?> |
| | 136 | http:// <input type="text" name="signup_blog_url" id="signup_blog_url" value="<?php bp_signup_blog_url_value(); ?>" /> .<?php bp_signup_subdomain_base(); ?> |
| 137 | 137 | <?php else : ?> |
| 138 | 138 | <?php echo home_url( '/' ); ?> <input type="text" name="signup_blog_url" id="signup_blog_url" value="<?php bp_signup_blog_url_value(); ?>" /> |
| 139 | 139 | <?php endif; ?> |
diff --git bp-themes/bp-default/registration/register.php bp-themes/bp-default/registration/register.php
index 399b358..e15534a 100644
|
|
|
|
| 217 | 217 | <?php do_action( 'bp_signup_blog_url_errors' ); ?> |
| 218 | 218 | |
| 219 | 219 | <?php if ( is_subdomain_install() ) : ?> |
| 220 | | http:// <input type="text" name="signup_blog_url" id="signup_blog_url" value="<?php bp_signup_blog_url_value(); ?>" /> .<?php bp_blogs_subdomain_base(); ?> |
| | 220 | http:// <input type="text" name="signup_blog_url" id="signup_blog_url" value="<?php bp_signup_blog_url_value(); ?>" /> .<?php bp_signup_subdomain_base(); ?> |
| 221 | 221 | <?php else : ?> |
| 222 | 222 | <?php echo home_url( '/' ); ?> <input type="text" name="signup_blog_url" id="signup_blog_url" value="<?php bp_signup_blog_url_value(); ?>" /> |
| 223 | 223 | <?php endif; ?> |