Skip to:
Content

BuddyPress.org

Changeset 6605


Ignore:
Timestamp:
12/10/2012 01:39:30 PM (14 years ago)
Author:
johnjamesjacoby
Message:

When in theme-compat, make sure 'bp_head' gets added to 'wp_head' action. Also introduce bp_head() function, and use in bp-default header.php. Fixes #4669.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-dependency.php

    r6436 r6605  
    110110}
    111111
     112/**
     113 * BuddyPress head scripts
     114 */
     115function bp_head() {
     116        do_action ( 'bp_head' );
     117}
     118
    112119/** Theme Permissions *********************************************************/
    113120
  • trunk/bp-core/bp-core-theme-compatibility.php

    r6536 r6605  
    476476
    477477                // Add a filter on the_content late, which we will later remove
    478                 add_filter( 'the_content', 'bp_replace_the_content' );
     478                if ( ! has_filter( 'the_content', 'bp_replace_the_content' ) ) {
     479                        add_filter( 'the_content', 'bp_replace_the_content' );
     480                }
     481
     482                // Add BuddyPress's head action to wp_head
     483                if ( ! has_action( 'wp_head', 'bp_head' ) ) {
     484                        add_action( 'wp_head', 'bp_head' );
     485                }
    479486
    480487                // Find the appropriate template file
  • trunk/bp-templates/bp-legacy/buddypress-functions.php

    r6548 r6605  
    318318
    319319        // Set up the cookies passed on this AJAX request. Store a local var to avoid conflicts
    320         if ( ! empty( $_POST['cookie'] ) )
     320        if ( ! empty( $_POST['cookie'] ) ) {
    321321                $_BP_COOKIE = wp_parse_args( str_replace( '; ', '&', urldecode( $_POST['cookie'] ) ) );
    322         else
     322        } else {
    323323                $_BP_COOKIE = &$_COOKIE;
     324        }
    324325
    325326        $qs = array();
  • trunk/bp-themes/bp-default/header.php

    r6531 r6605  
    88                <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
    99
    10                 <?php do_action( 'bp_head' ); ?>
     10                <?php bp_head(); ?>
    1111                <?php wp_head(); ?>
    1212
Note: See TracChangeset for help on using the changeset viewer.