[buddypress-trac] [BuddyPress Trac] #6844: Extract & relocate core markup functions: Theme compat include functionality & search forms file

buddypress-trac noreply at wordpress.org
Tue Jan 26 12:55:19 UTC 2016

#6844: Extract & relocate core markup functions:  Theme compat include
functionality & search forms file
 Reporter:  hnla                         |      Owner:
     Type:  enhancement                  |     Status:  new
 Priority:  normal                       |  Milestone:  Awaiting Review
Component:  Appearance - Template Parts  |    Version:
 Severity:  normal                       |   Keywords:  has-patch dev-
                                         |  feedback
 This ticket starts a process for extracting and moving core markup to
 theme location, and follows on from the discussion in #6556.

 Attached patch is a first pass looking at the process for:

 1. Writing new functions to run  require() on array of files specified in

 2. Creation of new directory for includes in theme.

 3. Creation of a example include file to manage all BP dir search function

 4. Removal of search functions from core component template files.

 The new functions in bp_theme_compat class is a modified version of the
 `locate_assets_in_stack` to enable checking for file_exists in the various
 theme locations and sub_dirs that are permitted. The function is extended
 to take an array of file names and return the paths to located files to be
 looped over and added to an include_once()  call.

 An initial example include file for search forms is included  which
 reworks the search functions splitting out the actual markup to it's own
 function then running the existing function names to preserve backpat in
 possible overloaded templates along with their apply_filters and passing
 the unique params query string, markup tokens etc to the base markup
 function bp_get_dir_search_markup().

 I propose for this to be implemented for 2.6 by which time a fair few core
 html markup functions should have been identified, re-factored and re-

 N.B. This is very much a first pass, directory names, file names, and
 likely the methods I've used to create the includes functionality will all
 need tweaking and thought.

Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6844>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac

More information about the buddypress-trac mailing list