Changeset 11771
- Timestamp:
- 12/12/2017 03:07:29 PM (7 years ago)
- Location:
- branches/2.9/src/bp-forums
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.9/src/bp-forums/bp-forums-bbpress-sa.php
r11366 r11771 38 38 39 39 require( BB_PATH . BB_INC . 'class.bb-query.php' ); 40 require( BB_PATH . BB_INC . 'class.bb-walker.php' );40 @require( BB_PATH . BB_INC . 'class.bb-walker.php' ); 41 41 42 42 require( BB_PATH . BB_INC . 'functions.bb-core.php' ); … … 51 51 require( BB_PATH . BB_INC . 'functions.bb-template.php' ); 52 52 53 require( BACKPRESS_PATH . 'class.wp-taxonomy.php' );54 require( BB_PATH . BB_INC . 'class.bb-taxonomy.php' );55 56 require( BB_PATH . 'bb-admin/includes/functions.bb-admin.php' );53 require( $bp->plugin_dir . '/bp-forums/class.backpress-taxonomy.php' ); 54 require( $bp->plugin_dir . '/bp-forums/class.bb-taxonomy.php' ); 55 56 @require( BB_PATH . 'bb-admin/includes/functions.bb-admin.php' ); 57 57 58 58 $bb = new stdClass(); … … 125 125 // Check if the tables are installed, if not, install them. 126 126 if ( !$tables_installed = (boolean) $bbdb->get_results( 'DESCRIBE `' . $bbdb->forums . '`;', ARRAY_A ) ) { 127 // Do not alter wp_users table. 128 if ( ! defined( 'BB_SCHEMA_IGNORE_WP_USERS_TABLES' ) ) { 129 define( 'BB_SCHEMA_IGNORE_WP_USERS_TABLES', true ); 130 } 131 127 132 require( BB_PATH . 'bb-admin/includes/defaults.bb-schema.php' ); 128 133 129 134 // Backticks and "IF NOT EXISTS" break the dbDelta function. 130 bp_bb_dbDelta( str_replace( ' IF NOT EXISTS', '', str_replace( '`', '', $bb_queries ) ) ); 131 135 $bb_queries = str_replace( ' IF NOT EXISTS', '', str_replace( '`', '', $bb_queries ) ); 136 137 // Fix issue with utf8mb4 in WP 4.2+ and bbPress DB schema (bb_terms/bb_meta) 138 $bb_queries = str_replace( array( 'varchar(200)', 'varchar(255)' ), 'varchar(191)', $bb_queries ); 139 140 // Do the DB! 141 bp_bb_dbDelta( $bb_queries ); 132 142 require( BB_PATH . 'bb-admin/includes/functions.bb-upgrade.php' ); 133 143 bb_update_db_version(); -
branches/2.9/src/bp-forums/bp-forums-filters.php
r10821 r11771 170 170 171 171 /** 172 * Append forum topic to document title. 173 * 174 * @since 2.9.0 175 * 176 * @param array $bp_title The BuddyPress page title parts. 177 * @param array $title The original WordPress title parts. 178 */ 179 function bp_forums_add_forum_topic_to_document_title( $bp_title, $title ) { 180 if ( bp_is_current_action( 'forum' ) && bp_is_action_variable( 'topic', 0 ) && bp_has_forum_topic_posts() ) { 181 /** This filter is documented in wp-includes/general-template.php */ 182 $sep = apply_filters( 'document_title_separator', '-' ); 183 184 $bp_title['title'] = bp_get_the_topic_title() . " $sep " . $bp_title['title']; 185 } 186 187 return $bp_title; 188 } 189 add_filter( 'bp_modify_document_title_parts', 'bp_forums_add_forum_topic_to_document_title', 10, 2 ); 190 191 /** 172 192 * Remove the anchor tag autogenerated for at-mentions when forum topics and posts are edited. 173 193 * -
branches/2.9/src/bp-forums/bp-forums-template.php
r11606 r11771 2426 2426 2427 2427 } else { 2428 $topic_template = new BP_Forums_Template_Topic( (int) $topic_id, $per_page, $max, $order ); 2428 if ( empty( $topic_template ) ) { 2429 $topic_template = new BP_Forums_Template_Topic( (int) $topic_id, $per_page, $max, $order ); 2430 } 2429 2431 2430 2432 // Current topic forum_id needs to match current_group forum_id.
Note: See TracChangeset
for help on using the changeset viewer.