Skip to:
Content

BuddyPress.org

Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#1987 closed defect (bug) (fixed)

Buddypress 1.2 - Removing Custom Image Header

Reported by: anraiki's profile anraiki Owned by:
Milestone: 1.2.1 Priority: minor
Severity: Version:
Component: 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
15 years ago

  • Resolution set to worksforme
  • Status changed from new to closed

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
15 years ago

How about...

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

#3 @apeatling
15 years ago

  • Resolution changed from worksforme to fixed

(In [2746]) Fixes #1987 props jjj

#4 @apeatling
15 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.