[buddypress-trac] [BuddyPress] #5021: Shortcode contents don't display in non-standard BP 1.7 themes

buddypress-trac noreply at wordpress.org
Tue May 28 01:07:40 UTC 2013

#5021: Shortcode contents don't display in non-standard BP 1.7 themes
 Reporter:  sensibleplugins         |       Owner:
     Type:  defect (bug)            |      Status:  new
 Priority:  normal                  |   Milestone:  1.8
Component:  Core                    |     Version:  1.7
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |
Changes (by boonebgorges):

 * cc: johnjamesjacoby (added)


 We're currently running `bp_remove_all_filters()` in
 `bp_template_include_theme_compat()`, which runs at `'template_include'`.
 This is very late in the WP loading process, immediately before the
 templates begin to be loaded. It's possible that sensibleplugins is
 registering shortcodes after `'template_include'` - for example, at
 `'wp_head'`, or maybe even inline in a template file. In contrast,
 WordPress adds its native shortcodes (such as `[caption]`) very early, as
 soon as wp-includes/media.php is included into the application. Therefore,
 I'd suggest that if you're loading your shortcodes after template_include,
 you're doing something wrong - in a theme, try `'after_setup_theme'`, and
 in a plugin, try `'init'`.

 That said, I'm still interested in r-a-y's question about why we are
 removing the filters as early as we are. It seems to me that moving the
 call to `bp_remove_all_filters()` to `bp_buffer_template_part()` would
 help with cases like sensibleplugins's. johnjamesjacoby, is there any
 reason why it couldn't be moved in this way?

Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5021#comment:2>
BuddyPress <http://buddypress.org/>

More information about the buddypress-trac mailing list