Changeset 565
- Timestamp:
- 11/21/2008 09:01:26 PM (18 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
-
bp-core.php (modified) (1 diff)
-
bp-core/bp-core-admin.php (modified) (2 diffs)
-
bp-core/bp-core-catchuri.php (modified) (3 diffs)
-
bp-messages/bp-messages-notifications.php (modified) (1 diff)
-
bp-xprofile/bp-xprofile-notifications.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core.php
r540 r565 1092 1092 } 1093 1093 1094 function bp_core_get_member_themes() { 1095 add_filter( 'theme_root', 'bp_core_set_member_theme_root' ); 1096 $themes = get_themes(); 1097 1098 if ( $themes ) { 1099 foreach ( $themes as $name => $values ) { 1100 $member_themes[] = array( 1101 'name' => $name, 1102 'template' => $values['Template'] 1103 ); 1104 } 1105 } 1106 1107 return $member_themes; 1108 } 1109 1110 function bp_core_set_member_theme_root() { 1111 return WP_CONTENT_DIR . "/member-themes"; 1112 } 1113 1114 function bp_core_set_member_theme_root_uri() { 1115 return WP_CONTENT_URL . '/member-themes'; 1116 } 1117 1118 1094 1119 /** 1095 1120 * bp_core_email_from_name_filter() -
trunk/bp-core/bp-core-admin.php
r526 r565 17 17 <div class="wrap"> 18 18 19 <h2> BuddyPress Settings</h2>19 <h2><?php _e( 'BuddyPress Settings', 'buddypress' ) ?></h2> 20 20 21 21 <form action="<?php $_SERVER['PHPSELF'] ?>" method="post" id="bp-admin-form"> … … 39 39 </tr> 40 40 <?php } ?> 41 <tr> 42 <th scope="row"><?php _e('Select theme to use for member pages', 'buddypress') ?>:</th> 43 <td> 44 <select name="bp-admin[active-member-theme]" id="active-member-theme"> 45 <?php $themes = bp_core_get_member_themes() ?> 46 <?php 47 if ( $themes ) { 48 for ( $i = 0; $i < count($themes); $i++ ) { 49 if ( $themes[$i]['template'] == get_site_option( 'active-member-theme' ) ) { 50 $selected = ' selected="selected"'; 51 } else { 52 $selected = ''; 53 } 54 ?> 55 <option<?php echo $selected ?> value="<?php echo $themes[$i]['template'] ?>"><?php echo $themes[$i]['name'] ?></option> 56 <?php 57 } 58 } 59 ?> 60 61 </select> 62 </td> 63 </tr> 41 64 </tbody> 42 65 </table> -
trunk/bp-core/bp-core-catchuri.php
r556 r565 233 233 global $is_member_page; 234 234 235 $member_theme = get_site_option('active-member-theme'); 236 237 if ( $member_theme == '' ) 238 $member_theme = 'buddypress-member'; 239 235 240 // The theme filter does not recognize any globals, where as the stylesheet filter does. 236 241 // We have to set up the globals to use manually. … … 243 248 $is_single_group = BP_Groups_Group::group_exists( $current_action, $groups_bp['groups']['table_name'] ); 244 249 245 if ( $is_member_page ) 246 $theme = 'buddypress-member'; 247 else if ( $current_component == $groups_bp['groups']['slug'] && $is_single_group ) 248 $theme = 'buddypress-member'; 249 else 250 $theme = get_option('template'); 250 if ( $is_member_page || ( $current_component == $groups_bp['groups']['slug'] && $is_single_group ) ) { 251 add_filter( 'theme_root', 'bp_core_set_member_theme_root' ); 252 add_filter( 'theme_root_uri', 'bp_core_set_member_theme_root_uri' ); 253 254 return $member_theme; 255 } else { 256 return get_option('template'); 257 } 251 258 252 259 return $theme; … … 256 263 function bp_core_force_buddypress_stylesheet() { 257 264 global $bp, $is_single_group, $is_member_page; 258 259 if ( $is_member_page ) 260 return 'buddypress-member'; 261 else if ( $bp['current_component'] == $bp['groups']['slug'] && $is_single_group ) 262 return 'buddypress-member'; 263 else 265 266 $member_theme = get_site_option('active-member-theme'); 267 268 if ( $member_theme == '' ) 269 $member_theme = 'buddypress-member'; 270 271 if ( $is_member_page || ( $bp['current_component'] == $bp['groups']['slug'] && $is_single_group ) ) { 272 add_filter( 'theme_root', 'bp_core_set_member_theme_root' ); 273 add_filter( 'theme_root_uri', 'bp_core_set_member_theme_root_uri' ); 274 275 return $member_theme; 276 } else { 264 277 return get_option('stylesheet'); 278 } 265 279 } 266 280 add_filter( 'stylesheet', 'bp_core_force_buddypress_stylesheet' ); -
trunk/bp-messages/bp-messages-notifications.php
r462 r565 18 18 // Set up and send the message 19 19 $to = $ud->user_email; 20 $subject = sprintf( __( 'New message from %s', 'buddypress' ), $sender_name);20 $subject = sprintf( __( 'New message from %s', 'buddypress' ), stripslashes($sender_name) ); 21 21 22 22 $message = sprintf( __( -
trunk/bp-xprofile/bp-xprofile-notifications.php
r482 r565 35 35 // Set up and send the message 36 36 $to = $ud->user_email; 37 $subject = sprintf( __( '%s posted on your wire.', 'buddypress' ), $poster_name);37 $subject = sprintf( __( '%s posted on your wire.', 'buddypress' ), stripslashes($poster_name) ); 38 38 39 39 $message = sprintf( __(
Note: See TracChangeset
for help on using the changeset viewer.