[ Index ] |
PHP Cross Reference of BuddyPress |
[Source view] [Print] [Project Stats]
BuddyPress Template Functions. This file contains functions necessary to mirror the WordPress core template loading process. Many of those functions are not filterable, and even then would not be robust enough to predict where BuddyPress templates might exist.
File Size: | 701 lines (21 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
bp_get_template_part( $slug, $name = null, $args = array() X-Ref |
Get a BuddyPress template part for display in a theme. return: false|string Path to located template. See {@link bp_locate_template()}. param: string $slug Template part slug. Used to generate filenames, param: string|null $name Optional. Template part name. Used to generate param: array $args Optional. Extra args to pass to locate_template(). since: 1.7.0 since: 7.0.0 Added $args parameter. |
bp_get_asset_template_part( $slug, $name = null, $args = array() X-Ref |
Get an asset template part. Basically the same as {@link bp_get_template_part()}, but with 'assets/' prepended to the slug. return: false|string param: string $slug Template slug. param: string|null $name Template name. param: array $args Optional. Extra args to pass to locate_template(). since: 2.6.0 since: 7.0.0 Added $args parameter. |
bp_get_dynamic_template_part( $template = '', $type = 'js', $tokens = array() X-Ref |
Get a dynamic template part. return: string HTML/JS output. param: string $template The Template Pack's relative path to the templata. param: string $type Whether to use the template for JavaScript or PHP. param: array $tokens The data to use to customize the template. Optional. param: array $allowed_tags The allowed tags to use. Optional. since: 9.0.0 |
bp_locate_template( $template_names, $load = false, $require_once = true, $args = array() X-Ref |
Retrieve the name of the highest priority template file that exists. Searches in the STYLESHEETPATH before TEMPLATEPATH so that themes which inherit from a parent theme can just overload one file. If the template is not found in either of those, it looks in the theme-compat folder last. return: string The template filename if one is located. param: string|array $template_names Template file(s) to search for, in order. param: bool $load Optional. If true, the template file will be loaded when param: bool $require_once Optional. Whether to require_once or require. Has param: array $args Optional. Extra args to pass to locate_template(). since: 1.7.0 since: 7.0.0 Added $args parameter. |
bp_locate_template_asset( $filename ) X-Ref |
Get file data of the highest priority asset that exists. Similar to {@link bp_locate_template()}, but for files like CSS and JS. return: false|array Array of asset data if one is located (includes absolute filepath and URI). param: string $filename Relative filename to search for. since: 2.6.0 |
bp_register_template_stack( $location_callback = '', $priority = 10 ) X-Ref |
Register a new template stack location. This allows for templates to live in places beyond just the parent/child relationship, to allow for custom template locations. Used in conjunction with bp_locate_template(), this allows for easy template overrides. return: bool See {@link add_filter()}. param: string $location_callback Callback function that returns the stack location. param: int $priority Optional. The priority parameter as passed to since: 1.7.0 |
bp_deregister_template_stack( $location_callback = '', $priority = 10 ) X-Ref |
Deregister a previously registered template stack location. return: bool See {@link remove_filter()}. param: string $location_callback Callback function that returns the stack location. param: int $priority Optional. The priority parameter passed to since: 1.7.0 |
bp_get_template_stack() X-Ref |
Get the "template stack", a list of registered directories where templates can be found. Calls the functions added to the 'bp_template_stack' filter hook, and return an array of the template locations. return: array The filtered value after all hooked functions are applied to it. since: 1.7.0 |
bp_buffer_template_part( $slug, $name = null, $echo = true, $args = array() X-Ref |
Put a template part into an output buffer, and return it. return: string|null If $echo, returns the template content. param: string $slug See {@link bp_get_template_part()}. param: string|null $name See {@link bp_get_template_part()}. param: bool $echo If true, template content will be echoed. If false, param: array $args See {@link bp_get_template_part()}. since: 1.7.0 since: 7.0.0 Added $args parameter. |
bp_get_query_template( $type, $templates = array() X-Ref |
Retrieve the path to a template. Used to quickly retrieve the path of a template without including the file extension. It will also check the parent theme and theme-compat theme with the use of {@link bp_locate_template()}. Allows for more generic template locations without the use of the other get_*_template() functions. return: string Full path to file. param: string $type Filename without extension. param: array $templates An optional list of template candidates. since: 1.7.0 |
bp_get_template_locations( $templates = array() X-Ref |
Get the possible subdirectories to check for templates in. return: array Possible subfolders to look in. param: array $templates Templates we are looking for. since: 1.7.0 |
bp_add_template_stack_locations( $stacks = array() X-Ref |
Add template locations to template files being searched for. return: array Array of all template locations registered so far. param: array $stacks Array of template locations. since: 1.7.0 |
bp_parse_query( $posts_query ) X-Ref |
Add checks for BuddyPress conditions to 'parse_query' action. param: WP_Query $posts_query WP_Query object. since: 1.7.0 |
bp_template_include_theme_supports( $template = '' ) X-Ref |
Possibly intercept the template being loaded. Listens to the 'template_include' filter and waits for any BuddyPress specific template condition to be met. If one is met and the template file exists, it will be used; otherwise. Note that the _edit() checks are ahead of their counterparts, to prevent them from being stomped on accident. return: string The path to the template file that is being used. param: string $template The path to the template file that is being used. since: 1.7.0 |
bp_set_template_included( $template = false ) X-Ref |
Set the included template. return: mixed False if empty. Template name if template included. param: mixed $template Default: false. since: 1.8.0 |
bp_is_template_included() X-Ref |
Is a BuddyPress template being included? return: bool True if yes, false if no. since: 1.8.0 |
bp_load_theme_functions() X-Ref |
Attempt to load a custom BP functions file, similar to each themes functions.php file. since: 1.7.0 |
bp_get_theme_compat_templates() X-Ref |
Get the templates to use as the endpoint for BuddyPress template parts. return: string Possible root level wrapper template files. since: 1.7.0 since: 2.4.0 Added singular.php to stack |
Generated: Thu Nov 21 01:00:57 2024 | Cross-referenced by PHPXref 0.7.1 |