Changeset 6448
- Timestamp:
- 10/22/2012 08:00:13 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/deprecated/1.6.php
r6342 r6448 80 80 function bp_core_add_ajax_hook() { 81 81 _deprecated_function( __FUNCTION__, '1.6', 'No longer used' ); 82 }83 84 /**85 * Members functions86 */87 88 /**89 * @deprecated 1.690 * @deprecated No longer used. Check for $bp->pages->activate->slug instead.91 */92 function bp_has_custom_activation_page() {93 _deprecated_function( __FUNCTION__, '1.6' );94 82 } 95 83 -
trunk/bp-members/bp-members-template.php
r6404 r6448 108 108 */ 109 109 function bp_get_signup_slug() { 110 global $bp;110 $bp = buddypress(); 111 111 112 112 if ( !empty( $bp->pages->register->slug ) ) … … 967 967 /** Signup Form ***************************************************************/ 968 968 969 /** 970 * Do we have a working custom sign up page? 971 * 972 * @since BuddyPress (1.5) 973 * 974 * @uses bp_get_signup_slug() To make sure there is a slug assigned to the page 975 * @uses bp_locate_template() To make sure a template exists to provide output 976 * @return boolean True if page and template exist, false if not 977 */ 969 978 function bp_has_custom_signup_page() { 970 // if theme is not bp-default, theme compat is on 971 // theme compat already bundles its own templates 972 if ( ! bp_is_theme_bp_default() ) 973 return true; 974 975 // look in parent / child theme for custom registration templates 976 if ( locate_template( array( 'register.php' ), false ) || locate_template( array( '/registration/register.php' ), false ) ) 977 return true; 978 979 return false; 979 static $has_page = false; 980 981 if ( empty( $has_page ) ) 982 $has_page = bp_get_signup_slug() && bp_locate_template( array( 'registration/register.php', 'members/register.php', 'register.php' ), false ); 983 984 return (bool) $has_page; 980 985 } 981 986 … … 1001 1006 } 1002 1007 1008 /** 1009 * Do we have a working custom activation page? 1010 * 1011 * @since BuddyPress (1.5) 1012 * 1013 * @uses bp_get_activate_slug() To make sure there is a slug assigned to the page 1014 * @uses bp_locate_template() To make sure a template exists to provide output 1015 * @return boolean True if page and template exist, false if not 1016 */ 1017 function bp_has_custom_activation_page() { 1018 static $has_page = false; 1019 1020 if ( empty( $has_page ) ) 1021 $has_page = bp_get_activate_slug() && bp_locate_template( array( 'registration/activate.php', 'members/activate.php', 'activate.php' ), false ); 1022 1023 return (bool) $has_page; 1024 } 1025 1003 1026 function bp_activation_page() { 1004 1027 echo bp_get_activation_page(); 1005 1028 } 1006 1029 function bp_get_activation_page() { 1007 global $bp; 1008 1009 // Check the global directly to make sure the WP page exists in $bp->pages 1010 if ( !empty( $bp->pages->activate->slug ) ) 1011 $page = trailingslashit( bp_get_root_domain() . '/' . $bp->pages->activate->slug ); 1012 else 1030 if ( bp_has_custom_activation_page() ) { 1031 $page = trailingslashit( bp_get_root_domain() . '/' . bp_get_activate_slug() ); 1032 } else { 1013 1033 $page = trailingslashit( bp_get_root_domain() ) . 'wp-activate.php'; 1034 } 1014 1035 1015 1036 return apply_filters( 'bp_get_activation_page', $page );
Note: See TracChangeset
for help on using the changeset viewer.