Skip to content
Snippets Groups Projects
Commit e994e608 authored by lechuck's avatar lechuck Committed by lechuck
Browse files

Upgrade BP template pack to 1.2.1

parent 504badae
No related branches found
No related tags found
No related merge requests found
...@@ -73,15 +73,13 @@ add_action( 'admin_notices', 'bp_tpack_admin_notices' ); ...@@ -73,15 +73,13 @@ add_action( 'admin_notices', 'bp_tpack_admin_notices' );
* Output the BPT admin page * Output the BPT admin page
*/ */
function bp_tpack_theme_menu() { function bp_tpack_theme_menu() {
$theme_dir = WP_CONTENT_DIR . '/themes/' . get_option('stylesheet') . '/';
if ( !empty( $_GET['finish'] ) ) if ( !empty( $_GET['finish'] ) )
update_option( 'bp_tpack_configured', 1 ); update_option( 'bp_tpack_configured', 1 );
if ( !empty( $_GET['reset'] ) ) if ( !empty( $_GET['reset'] ) )
delete_option( 'bp_tpack_configured' ); delete_option( 'bp_tpack_configured' );
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' ) ) { if ( !file_exists( get_query_template('bp-tpack', array('activity', 'blogs', 'forums', 'groups', 'members', 'registration') ) ) ) {
$step = 1; $step = 1;
if ( !empty( $_GET['move'] ) ) { if ( !empty( $_GET['move'] ) ) {
...@@ -145,7 +143,7 @@ function bp_tpack_theme_menu() { ...@@ -145,7 +143,7 @@ function bp_tpack_theme_menu() {
<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> <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>
<p><code><?php echo $theme_dir ?></code></p> <p><code><?php echo get_stylesheet_directory() . '/' ?></code></p>
<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> <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>
...@@ -194,7 +192,7 @@ function bp_tpack_theme_menu() { ...@@ -194,7 +192,7 @@ function bp_tpack_theme_menu() {
<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> <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>
<p><code><?php echo $theme_dir ?></code></p> <p><code><?php echo get_stylesheet_directory() . '/' ?></code></p>
<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>&lt;div&gt;</code> tags that surround the content and sidebar.', 'bp-tpack' ); ?></p> <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>&lt;div&gt;</code> tags that surround the content and sidebar.', 'bp-tpack' ); ?></p>
...@@ -205,7 +203,7 @@ function bp_tpack_theme_menu() { ...@@ -205,7 +203,7 @@ function bp_tpack_theme_menu() {
<ol> <ol>
<li> <li>
<?php _e( "The first method is to locate tho following templates (leave out any folders that you didn't copy over in Step Two):", 'bp-tpack' ) ?> <?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' ) ?>
<?php else : ?> <?php else : ?>
<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> <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>
...@@ -222,11 +220,14 @@ function bp_tpack_theme_menu() { ...@@ -222,11 +220,14 @@ function bp_tpack_theme_menu() {
<li><code><?php echo '/members/index.php' ?></code></li> <li><code><?php echo '/members/index.php' ?></code></li>
<li><code><?php echo '/members/single/home.php' ?></code></li> <li><code><?php echo '/members/single/home.php' ?></code></li>
<li><code><?php echo '/members/single/plugins.php' ?></code></li> <li><code><?php echo '/members/single/plugins.php' ?></code></li>
<li><code><?php echo '/members/single/settings/delete-account.php' ?></code></li>
<li><code><?php echo '/members/single/settings/notifications.php' ?></code></li>
<li><code><?php echo '/members/single/settings/general.php' ?></code></li>
<li><code><?php echo '/registration/register.php' ?></code></li> <li><code><?php echo '/registration/register.php' ?></code></li>
<li><code><?php echo '/registration/activate.php' ?></code></li>
<?php if ( is_multisite() ) : ?> <?php if ( is_multisite() ) : ?>
<li><code><?php echo '/blogs/create.php' ?></code></li> <li><code><?php echo '/blogs/create.php' ?></code></li>
<li><code><?php echo '/registration/activate.php' ?></code></li>
<?php endif; ?> <?php endif; ?>
</ul> </ul>
...@@ -329,7 +330,7 @@ function bp_tpack_theme_menu() { ...@@ -329,7 +330,7 @@ function bp_tpack_theme_menu() {
* @uses bp_tpack_recurse_copy() * @uses bp_tpack_recurse_copy()
*/ */
function bp_tpack_move_templates() { function bp_tpack_move_templates() {
$destination_dir = WP_CONTENT_DIR . '/themes/' . get_option('stylesheet') . '/'; $destination_dir = get_stylesheet_directory() . '/';
$source_dir = BP_PLUGIN_DIR . '/bp-themes/bp-default/'; $source_dir = BP_PLUGIN_DIR . '/bp-themes/bp-default/';
$dirs = array( 'activity', 'blogs', 'forums', 'groups', 'members', 'registration' ); $dirs = array( 'activity', 'blogs', 'forums', 'groups', 'members', 'registration' );
......
...@@ -130,7 +130,7 @@ function bp_tpack_enqueue_styles() { ...@@ -130,7 +130,7 @@ function bp_tpack_enqueue_styles() {
if ( version_compare( BP_VERSION, '1.3', '>' ) && is_rtl() ) if ( version_compare( BP_VERSION, '1.3', '>' ) && is_rtl() )
wp_enqueue_style( 'bp-rtl', plugins_url( '/bp-template-pack/' ) . 'bp-rtl.css', array( 'bp' ), $version ); wp_enqueue_style( 'bp-rtl', plugins_url( '/bp-template-pack/' ) . 'bp-rtl.css', array( 'bp' ), $version );
} }
add_action( 'wp_print_styles', 'bp_tpack_enqueue_styles' ); add_action( 'wp_enqueue_scripts', 'bp_tpack_enqueue_styles' );
if ( !function_exists( 'bp_tpack_use_wplogin' ) ) : if ( !function_exists( 'bp_tpack_use_wplogin' ) ) :
/** /**
......
...@@ -4,7 +4,7 @@ Plugin Name: BuddyPress Template Pack ...@@ -4,7 +4,7 @@ Plugin Name: BuddyPress Template Pack
Plugin URI: http://wordpress.org/extend/plugins/bp-template-pack/ Plugin URI: http://wordpress.org/extend/plugins/bp-template-pack/
Description: Add support for BuddyPress to your existing WordPress theme. This plugin will guide you through the process step by step. Description: Add support for BuddyPress to your existing WordPress theme. This plugin will guide you through the process step by step.
Author: apeatling, boonebgorges, r-a-y Author: apeatling, boonebgorges, r-a-y
Version: 1.2 Version: 1.2.1
Author URI: http://buddypress.org Author URI: http://buddypress.org
*/ */
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
Contributors: apeatling, boonebgorges, r-a-y Contributors: apeatling, boonebgorges, r-a-y
Tags: buddypress, themes, compatibility, convert, integration Tags: buddypress, themes, compatibility, convert, integration
Requires at least: WordPress 3.0 / BuddyPress 1.2 Requires at least: WordPress 3.0 / BuddyPress 1.2
Tested up to: WordPress 3.2.1 / BuddyPress 1.5 Tested up to: WordPress 3.3.1 / BuddyPress 1.5.4
Stable tag: 1.2 Stable tag: 1.2.1
== Description == == Description ==
...@@ -22,6 +22,10 @@ Head to the "Appearance > BP Compatibility" menu and follow the step-by-step ins ...@@ -22,6 +22,10 @@ Head to the "Appearance > BP Compatibility" menu and follow the step-by-step ins
== Changelog == == Changelog ==
= 1.2.1 =
* Improves performance with parent/child themes
* Improves performance with WP 3.3+
= 1.2 = = 1.2 =
* Adds BP 1.5 compatibility * Adds BP 1.5 compatibility
* Restructures how scripts and CSS are enqueued * Restructures how scripts and CSS are enqueued
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment