Changeset 1468
- Timestamp:
- 04/03/2015 01:01:47 PM (9 years ago)
- Location:
- sites/trunk/buddypress.org/public_html/wp-content
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/buddypress.org/public_html/wp-content/plugins/bbpress-org/bbpress-dot-org.php
r529 r1468 29 29 return; 30 30 31 wp_safe_redirect( 'http://bbpress.org');31 wp_safe_redirect( home_url( '/' ) ); 32 32 die; 33 33 } -
sites/trunk/buddypress.org/public_html/wp-content/plugins/buddypress-org/extensions.php
r499 r1468 91 91 // Redirect /forums/ to /support/ 92 92 if ( $uri_chunks[1] === 'forums' && empty( $uri_chunks[2] ) ) { 93 bp_core_redirect( 'http://buddypress.org/support/');93 bp_core_redirect( home_url( '/support/' ) ); 94 94 } 95 95 96 96 // Redirect members directory to root to block heavy paginated user queries 97 97 if ( ( $uri_chunks[1] === 'members' ) && empty( $uri_chunks[2] ) ) { 98 bp_core_redirect( 'http://buddypress.org');98 bp_core_redirect( home_url( '/' ) ); 99 99 } 100 100 101 101 // Redirect old members profile pages to 102 102 if ( ( $uri_chunks[1] === 'community' ) && ( $uri_chunks[2] === 'members' ) && ! empty( $uri_chunks[3] ) ) { 103 bp_core_redirect( 'http://buddypress.org/members/' . $uri_chunks[3] . '/');103 bp_core_redirect( home_url( '/members/' . $uri_chunks[3] . '/' ) ); 104 104 } 105 105 … … 109 109 // Single group topic redirect 110 110 if ( !empty( $uri_chunks[5] ) && ( $uri_chunks[5] === 'topic' ) ) { 111 bp_core_redirect( 'http://buddypress.org/support/topic/' . $uri_chunks[6] . '/');111 bp_core_redirect( home_url( '/support/topic/' . $uri_chunks[6] . '/' ) ); 112 112 113 113 // Single group forum redirect … … 116 116 // Use legacy group slug 117 117 if ( ! in_array( $uri_chunks[3], array( 'gallery', 'how-to-and-troubleshooting' ) ) ) { 118 bp_core_redirect( 'http://buddypress.org/support/forum/plugin-forums/' . $uri_chunks[3] . '/');118 bp_core_redirect( home_url( '/support/forum/plugin-forums/' . $uri_chunks[3] . '/' ) ); 119 119 120 120 // Root forums, maybe with new slug … … 124 124 switch ( $uri_chunks[3] ) { 125 125 case 'gallery' : 126 $url = ' http://buddypress.org/support/forum/your-buddypress/';126 $url = '/support/forum/your-buddypress/'; 127 127 break; 128 128 case 'how-to-and-troubleshooting' : 129 $url = ' http://buddypress.org/support/forum/how-to/';129 $url = '/support/forum/how-to/'; 130 130 break; 131 131 case 'creating-and-extending' : 132 $url = ' http://buddypress.org/support/forum/extending/';132 $url = '/support/forum/extending/'; 133 133 break; 134 134 case 'requests-and-feedback' : 135 $url = ' http://buddypress.org/support/forum/feedback/';135 $url = '/support/forum/feedback/'; 136 136 break; 137 137 case 'buddypress' : 138 $url = ' http://buddypress.org/support/forum/installing/';138 $url = '/support/forum/installing/'; 139 139 break; 140 140 case 'third-party-plugins' : 141 $url = ' http://buddypress.org/support/forum/plugins/';141 $url = '/support/forum/plugins/'; 142 142 break; 143 143 default: … … 145 145 break; 146 146 } 147 bp_core_redirect( $url);147 bp_core_redirect( home_url( $url ) ); 148 148 } 149 149 } … … 152 152 // Redirect /support/topics/ to /support/ 153 153 if ( $uri_chunks[1] === 'support' && ( !empty( $uri_chunks[2] ) && ( 'topics' === $uri_chunks[2] ) ) ) { 154 bp_core_redirect( 'http://buddypress.org/support/');155 } 156 } 157 if ( 'buddypress.org' === $_SERVER['HTTP_HOST']&& ! is_admin() && defined( 'WP_USE_THEMES' ) && WP_USE_THEMES ) {154 bp_core_redirect( home_url( '/support/' ) ); 155 } 156 } 157 if ( (bool) strstr( $_SERVER['HTTP_HOST'], 'buddypress' ) && ! is_admin() && defined( 'WP_USE_THEMES' ) && WP_USE_THEMES ) { 158 158 add_action( 'init', 'bporg_redirect', 1 ); // before bp_init 159 159 } -
sites/trunk/buddypress.org/public_html/wp-content/plugins/buddypress-org/toolbar.php
r1263 r1468 269 269 270 270 // bbPress Codex 271 } elseif ( 'codex.bbpress.org' == $_SERVER['HTTP_HOST']) {271 } elseif ( bb_base_is_bbpress() ) { 272 272 $wp_admin_bar->add_menu( array( 273 273 'id' => 'bp-site-name', -
sites/trunk/buddypress.org/public_html/wp-content/themes/bb-base/functions.php
r1263 r1468 23 23 } 24 24 25 /** 26 * Are we looking at a buddypress.org site? 27 * 28 * @return bool 29 */ 30 function bb_base_is_buddypress() { 31 $retval = (bool) strstr( $_SERVER['HTTP_HOST'], 'buddypress' ); 32 return (bool) apply_filters( 'bb_base_is_buddypress', $retval ); 33 } 34 35 /** 36 * Are we looking at a bbpress.org site? 37 * 38 * @return bool 39 */ 40 function bb_base_is_bbpress() { 41 $retval = (bool) strstr( $_SERVER['HTTP_HOST'], 'bbpress' ); 42 return (bool) apply_filters( 'bb_base_is_bbpress', $retval ); 43 } 44 45 25 46 // Include in Codex code on codex sites 26 47 if ( bb_base_is_codex() ) { … … 40 61 41 62 // Handle root styling for buddypress/bbpress 42 if ( strstr( $_SERVER['HTTP_HOST'], 'bbpress.org') ) {63 if ( bb_base_is_bbpress() ) { 43 64 $root = 'style-bbpress.css'; 44 } elseif ( strstr( $_SERVER['HTTP_HOST'], 'buddypress.org') ) {65 } elseif ( bb_base_is_buddypress() ) { 45 66 $root = 'style-buddypress.css'; 46 67 } -
sites/trunk/buddypress.org/public_html/wp-content/themes/buddypress-org/header-front.php
r1008 r1468 1 <?php if ( 'buddypress.org' === parse_url( get_home_url(), PHP_URL_HOST) && is_front_page() ) : ?>1 <?php if ( bb_base_is_buddypress() && is_front_page() ) : ?> 2 2 3 3 <div id="headline"><div id="headline-inner">
Note: See TracChangeset
for help on using the changeset viewer.