Skip to:
Content

BuddyPress.org

Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#1987 closed defect (bug) (fixed)

Buddypress 1.2 - Removing Custom Image Header

Reported by: anraiki Owned by:
Priority: minor Milestone: 1.2.1
Component: Version:
Severity: Keywords:
Cc:

Description

==Refer in the forum==
http://buddypress.org/forums/topic/bp-12-removing-custom-image-header-code-in-child-theme-did-not-work

==Detail==
The function:
remove_action( 'init', 'bp_dtheme_add_custom_header_support' );

is not working properly.

Change History (4)

#1 @MrMaz
16 years ago

  • Resolutionworksforme
  • Status newclosed

Since the child theme functions.php loads first you have to add an action that removes the other action before it tries to execute it. Since the core action runs at default priority 10, you just have to hook in at priority 9.

Here is how to do it:

`
function remove_header_support() {

remove_action( 'init', 'bp_dtheme_add_custom_header_support' );

}
add_action( 'init', 'remove_header_support', 9 );
`

#2 @johnjamesjacoby
16 years ago

How about...

if ( !defined( 'BP_NO_CUSTOM_HEADER' ) )
	add_action( 'init', 'bp_dtheme_add_custom_header_support' );

#3 @apeatling
16 years ago

  • Resolution worksformefixed

(In [2746]) Fixes #1987 props jjj

#4 @apeatling
16 years ago

I've added the define to override this as I think it will be easier for people having thought about it more. MrMaz's solution will still work fine though.

Note: See TracTickets for help on using tickets.