Ticket #3774: child-theme-support-2.patch
File child-theme-support-2.patch, 3.3 KB (added by , 13 years ago) |
---|
-
bpt-admin.php
73 73 * Output the BPT admin page 74 74 */ 75 75 function bp_tpack_theme_menu() { 76 $theme_dir = WP_CONTENT_DIR . '/themes/' . get_option('stylesheet') . '/';77 78 76 if ( !empty( $_GET['finish'] ) ) 79 77 update_option( 'bp_tpack_configured', 1 ); 80 78 81 79 if ( !empty( $_GET['reset'] ) ) 82 80 delete_option( 'bp_tpack_configured' ); 83 81 84 if ( !file_exists( $theme_dir . 'activity' ) && !file_exists( $theme_dir . 'blogs' ) && !file_exists( $theme_dir . 'forums' ) && !file_exists( $theme_dir . 'groups' ) && !file_exists( $theme_dir . 'members' ) && !file_exists( $theme_dir . 'registration') ) {82 if ( !file_exists( get_query_template('bp-tpack', array('activity', 'blogs', 'forums', 'groups', 'members', 'registration') ) ) ) { 85 83 $step = 1; 86 84 87 85 if ( !empty( $_GET['move'] ) ) { … … 145 143 146 144 <p><?php _e( 'In this directory you will find six folders (/activity/, /blogs/, /forums/, /groups/, /members/, /registration/). If you want to use all of the features of BuddyPress then you must move these six directories to the following folder:', 'bp-tpack' ); ?></p> 147 145 148 <p><code><?php echo $theme_dir?></code></p>146 <p><code><?php echo get_stylesheet_directory() . '/' ?></code></p> 149 147 150 148 <p><?php _e( "If you decide that you don't want to use a feature of BuddyPress, then you can actually ignore the template folders for these features. For example, if you don't want to use the groups and forums features, you can simply avoid copying the /groups/ and /forums/ template folders to your active theme. (If you're not sure what to do, just copy all six folders over to your theme directory.)", 'bp-tpack' ); ?></p> 151 149 … … 194 192 195 193 <p><?php _e( "If BuddyPress pages are not aligned correctly, then you may need to modify some of the templates to match your theme's HTML structure. The best way to do this is to access your theme's files, via FTP, at:", 'bp-tpack' ); ?></p> 196 194 197 <p><code><?php echo $theme_dir?></code></p>195 <p><code><?php echo get_stylesheet_directory() . '/' ?></code></p> 198 196 199 197 <p><?php _e( 'Open up the <code>page.php</code> file (if this does not exist, use <code>index.php</code>). Make note of the HTML template structure of the file, specifically the <code><div></code> tags that surround the content and sidebar.', 'bp-tpack' ); ?></p> 200 198 … … 205 203 206 204 <ol> 207 205 <li> 208 <?php _e( "The first method is to locate th ofollowing templates (leave out any folders that you didn't copy over in Step Two):", 'bp-tpack' ) ?>206 <?php _e( "The first method is to locate the following templates (leave out any folders that you didn't copy over in Step Two):", 'bp-tpack' ) ?> 209 207 210 208 <?php else : ?> 211 209 <p><?php _e( 'The files that you need to edit are as follows (leave out any folders you have not copied over in step two):', 'bp-tpack' ); ?></p> … … 329 327 * @uses bp_tpack_recurse_copy() 330 328 */ 331 329 function bp_tpack_move_templates() { 332 $destination_dir = WP_CONTENT_DIR . '/themes/' . get_option('stylesheet') . '/';330 $destination_dir = get_stylesheet_directory() . '/'; 333 331 $source_dir = BP_PLUGIN_DIR . '/bp-themes/bp-default/'; 334 332 335 333 $dirs = array( 'activity', 'blogs', 'forums', 'groups', 'members', 'registration' );