Changeset 2209 for trunk/bp-core/bp-core-templatetags.php
- Timestamp:
- 12/27/2009 10:41:10 AM (16 years ago)
- File:
-
- 1 edited
-
trunk/bp-core/bp-core-templatetags.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-templatetags.php
r2199 r2209 1 1 <?php 2 3 2 /*** 4 3 * Members template loop that will allow you to loop all members or friends of a member … … 902 901 903 902 function bp_has_custom_signup_page() { 904 if ( file_exists( WP_CONTENT_DIR . '/themes/' . get_blog_option( BP_ROOT_BLOG, 'template') . '/register.php') ) 905 return true; 906 907 if ( file_exists( WP_CONTENT_DIR . '/themes/' . get_blog_option( BP_ROOT_BLOG, 'template') . '/registration/register.php') ) 908 return true; 909 910 return false; 911 } 912 913 function bp_signup_page( $deprecated = true ) { 914 if ( !$deprecated ) 915 return bp_get_signup_page(); 916 else 917 echo bp_get_signup_page(); 903 if ( locate_template( array( 'register.php' ), false ) || locate_template( array( '/registration/register.php' ), false ) ) 904 return true; 905 906 return false; 907 } 908 909 function bp_signup_page() { 910 echo bp_get_signup_page(); 918 911 } 919 912 function bp_get_signup_page() { 920 913 global $bp; 921 914 922 if ( bp_has_custom_signup_page() ) { 923 return apply_filters( 'bp_get_signup_page', $bp->root_domain . '/' . BP_REGISTER_SLUG ); 924 } else { 925 return apply_filters( 'bp_get_signup_page', $bp->root_domain . '/wp-signup.php' ); 926 } 915 if ( bp_has_custom_signup_page() ) 916 $page = $bp->root_domain . '/' . BP_REGISTER_SLUG; 917 else 918 $page = $bp->root_domain . '/wp-signup.php'; 919 920 return apply_filters( 'bp_get_signup_page', $page ); 927 921 } 928 922 … … 937 931 } 938 932 939 function bp_activation_page( $echo = true ) { 940 global $bp; 941 942 if ( bp_has_custom_activation_page() ) { 943 if ( $echo ) 944 echo $bp->root_domain . '/' . BP_ACTIVATION_SLUG; 933 function bp_activation_page() { 934 echo bp_get_activation_page(); 935 } 936 function bp_get_activation_page() { 937 global $bp; 938 939 if ( bp_has_custom_activation_page() ) 940 $page = $bp->root_domain . '/' . BP_ACTIVATION_SLUG; 945 941 else 946 return $bp->root_domain . '/' . BP_ACTIVATION_SLUG; 947 } else { 948 if ( $echo ) 949 echo $bp->root_domain . '/wp-activate.php'; 950 else 951 return $bp->root_domain . '/wp-activate.php'; 952 } 953 } 942 $page = $bp->root_domain . '/wp-activate.php'; 943 944 return apply_filters( 'bp_get_activation_page', $page ); 945 } 954 946 955 947 function bp_search_form_action() { … … 1219 1211 } 1220 1212 function bp_get_signup_allowed() { 1221 return get_site_option( 'registration' ); 1213 if ( bp_core_is_multiblog_install() ) 1214 return get_site_option( 'registration' ); 1215 else { 1216 if ( (int)get_option( 'users_can_register') ) 1217 return 'user'; 1218 } 1219 1220 return false; 1222 1221 } 1223 1222 … … 1226 1225 1227 1226 return $bp->activation_complete; 1227 } 1228 1229 function bp_registration_needs_activation() { 1230 return apply_filters( 'bp_registration_needs_activation', bp_core_is_multiblog_install() ); 1228 1231 } 1229 1232
Note: See TracChangeset
for help on using the changeset viewer.