Skip to:
Content

BuddyPress.org

Opened 12 years ago

Closed 12 years ago

Last modified 8 years ago

#3737 closed enhancement (fixed)

Add missing hooks in blogs/create.php and groups/create.php

Reported by: mercime's profile mercime Owned by:
Milestone: 1.6 Priority: normal
Severity: minor Version:
Component: Templates Keywords:
Cc:

Description

There are missing hooks in the bp-default/groups/create.php and the bp-default/blogs/create.php files which are available in the other template files of bp-default theme.

So theme authors can hook into the same location in the HTML structure even if the hooks are named differently and for the sake of consistency, attached is a proposed patch.

For blogs/index.php you have

	<?php get_header( 'buddypress' ); ?>
	        '''<?php do_action( 'bp_before_directory_blogs_page' ); ?>'''
	        <div id="content">
	                <div class="padder">
	                '''<?php do_action( 'bp_before_directory_blogs' ); ?>'''

while in blogs/create.php

	<?php get_header( 'buddypress' ); ?>
	        '''<?php do_action( 'bp_before_directory_blogs_content' ); ?>'''
	        <div id="content">
	                <div class="padder" role="main">
                           '''// missing hook here - added in patch'''
	              <?php do_action( 'template_notices' ); ?>

For groups/index.php

	<?php get_header( 'buddypress' ); ?>
	        '''<?php do_action( 'bp_before_directory_groups_page' ); ?>'''
	        <div id="content">
                     <div class="padder">
                    '''<?php do_action( 'bp_before_directory_groups' ); ?>'''

while in groups/create.php

	<?php get_header( 'buddypress' ); ?>
                '''// missing hook here - not added in patch yet'''
	        <div id="content">
	                <div class="padder">
                         '''// missing hook here - added in patch'''

Same goes for the required closing hooks in the bottom portion of both files.

For consideration.

Attachments (2)

3737-01.patch (1.6 KB) - added by mercime 12 years ago.
new-hooks.gif (52.7 KB) - added by mercime 12 years ago.
Without hooks and With hooks

Download all attachments as: .zip

Change History (5)

@mercime
12 years ago

@mercime
12 years ago

Without hooks and With hooks

#1 @boonebgorges
12 years ago

  • Milestone changed from Awaiting Review to 1.6
  • Severity changed from normal to minor

#2 @boonebgorges
12 years ago

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

(In [5549]) Adds pre- and post-template content hooks to blog and group creation templates.
Fixes #3737
Props mercime

#3 @DJPaul
8 years ago

  • Component changed from Appearance - Template Parts to Templates
Note: See TracTickets for help on using tickets.