[ Index ]

PHP Cross Reference of BBPress

title

Body

[close]

/src/includes/core/ -> theme-compat.php (summary)

bbPress Theme Compatibility

File Size: 1060 lines (31 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

BBP_Theme_Compat:: (25 methods):
  __construct()
  __set()
  __get()
  get_dir()
  bbp_setup_theme_compat()
  bbp_get_current_template_pack()
  bbp_get_theme_compat_id()
  bbp_get_theme_compat_name()
  bbp_get_theme_compat_version()
  bbp_get_theme_compat_dir()
  bbp_get_theme_compat_url()
  bbp_is_theme_compat_active()
  bbp_set_theme_compat_active()
  bbp_set_theme_compat_templates()
  bbp_set_theme_compat_template()
  bbp_set_theme_compat_original_template()
  bbp_is_theme_compat_original_template()
  bbp_register_theme_package()
  bbp_theme_compat_reset_post()
  bbp_template_include_theme_compat()
  bbp_redirect_canonical()
  bbp_remove_all_filters()
  bbp_restore_all_filters()
  bbp_force_comment_status()
  bbp_remove_adjacent_posts()


Class: BBP_Theme_Compat  - X-Ref

Theme Compatibility base class

This is only intended to be extended, and is included here as a basic guide
for future Template Packs to use. @link bbp_setup_theme_compat()

__construct( array $properties = array()   X-Ref
Pass the $properties to the object on creation.

since: 2.1.0 bbPress (r3926)
param: array $properties

__set( $property, $value )   X-Ref
Set a theme's property.

since: 2.1.0 bbPress (r3926)
param: string $property
param: mixed $value
return: mixed

__get( $property )   X-Ref
Get a theme's property.

since: 2.1.0 bbPress (r3926)
param: string $property
param: mixed $value
return: mixed

get_dir()   X-Ref
Return the template directory.

since: 2.6.0 bbPress (r6548)
return: string

bbp_setup_theme_compat( $theme = 'default' )   X-Ref
Setup the active template pack and register it's directory in the stack.

since: 2.0.0 bbPress (r3311)
param: BBP_Theme_Compat $theme

bbp_get_current_template_pack()   X-Ref
Get the current template pack package.

since: 2.6.0 bbPress (r6548)
return: BBP_Theme_Compat

bbp_get_theme_compat_id()   X-Ref
Gets the id of the bbPress compatible theme used, in the event the
currently active WordPress theme does not explicitly support bbPress.
This can be filtered or set manually. Tricky theme authors can override the
default and include their own bbPress compatibility layers for their themes.

since: 2.0.0 bbPress (r3506)
return: string

bbp_get_theme_compat_name()   X-Ref
Gets the name of the bbPress compatible theme used, in the event the
currently active WordPress theme does not explicitly support bbPress.
This can be filtered or set manually. Tricky theme authors can override the
default and include their own bbPress compatibility layers for their themes.

since: 2.0.0 bbPress (r3506)
return: string

bbp_get_theme_compat_version()   X-Ref
Gets the version of the bbPress compatible theme used, in the event the
currently active WordPress theme does not explicitly support bbPress.
This can be filtered or set manually. Tricky theme authors can override the
default and include their own bbPress compatibility layers for their themes.

since: 2.0.0 bbPress (r3506)
return: string

bbp_get_theme_compat_dir()   X-Ref
Gets the bbPress compatible theme used in the event the currently active
WordPress theme does not explicitly support bbPress. This can be filtered,
or set manually. Tricky theme authors can override the default and include
their own bbPress compatibility layers for their themes.

since: 2.0.0 bbPress (r3032)
return: string

bbp_get_theme_compat_url()   X-Ref
Gets the bbPress compatible theme used in the event the currently active
WordPress theme does not explicitly support bbPress. This can be filtered,
or set manually. Tricky theme authors can override the default and include
their own bbPress compatibility layers for their themes.

since: 2.0.0 bbPress (r3032)
return: string

bbp_is_theme_compat_active()   X-Ref
Gets true/false if page is currently inside theme compatibility

since: 2.0.0 bbPress (r3265)
return: bool

bbp_set_theme_compat_active( $set = true )   X-Ref
Sets true/false if page is currently inside theme compatibility

since: 2.0.0 bbPress (r3265)
param: bool $set
return: bool

bbp_set_theme_compat_templates( $templates = array()   X-Ref
Set the theme compat templates global

Stash possible template files for the current query. Useful if plugins want
to override them, or see what files are being scanned for inclusion.

since: 2.0.0 bbPress (r3311)

bbp_set_theme_compat_template( $template = '' )   X-Ref
Set the theme compat template global

Stash the template file for the current query. Useful if plugins want
to override it, or see what file is being included.

since: 2.0.0 bbPress (r3311)

bbp_set_theme_compat_original_template( $template = '' )   X-Ref
Set the theme compat original_template global

Stash the original template file for the current query. Useful for checking
if bbPress was able to find a more appropriate template.

since: 2.1.0 bbPress (r3926)

bbp_is_theme_compat_original_template( $template = '' )   X-Ref
Is a template the original_template global

Stash the original template file for the current query. Useful for checking
if bbPress was able to find a more appropriate template.

since: 2.1.0 bbPress (r3926)

bbp_register_theme_package( $theme = array()   X-Ref
Register a new bbPress theme package to the active theme packages array

since: 2.1.0 bbPress (r3829)
param: array $theme

bbp_theme_compat_reset_post( $args = array()   X-Ref
This fun little function fills up some WordPress globals with dummy data to
stop your average page template from complaining about it missing.

since: 2.0.0 bbPress (r3108)
param: array $args

bbp_template_include_theme_compat( $template = '' )   X-Ref
Reset main query vars and filter 'the_content' to output a bbPress
template part as needed.

since: 2.0.0 bbPress (r3032)
param: string $template

bbp_redirect_canonical( $redirect_url )   X-Ref
Remove the canonical redirect to allow pretty pagination

since: 2.0.0 bbPress (r2628)
param: string $redirect_url Redirect url
return: bool|string False if it's a topic/forum and their first page,

bbp_remove_all_filters( $tag, $priority = false )   X-Ref
Removes all filters from a WordPress filter, and stashes them in the $bbp
global in the event they need to be restored later.

since: 2.0.0 bbPress (r3251)
param: string $tag
param: int $priority
return: bool

bbp_restore_all_filters( $tag, $priority = false )   X-Ref
Restores filters from the $bbp global that were removed using
bbp_remove_all_filters()

since: 2.0.0 bbPress (r3251)
param: string $tag
param: int $priority
return: bool

bbp_force_comment_status( $open = false, $post_id = 0 )   X-Ref
Force comments_status to 'closed' for bbPress post types

since: 2.1.0 bbPress (r3589)
param: bool $open True if open, false if closed
param: int $post_id ID of the post to check
return: bool True if open, false if closed

bbp_remove_adjacent_posts()   X-Ref
Remove "prev" and "next" relational links from <head> on bbPress pages.

WordPress automatically generates these relational links to the current
page, but bbPress does not use these links, nor would they work the same.

In this function, we remove these links when on a bbPress page. This also
prevents additional, unnecessary queries from running.

since: 2.6.0 bbPress (r7071)



Generated: Tue Dec 1 01:01:27 2020 Cross-referenced by PHPXref 0.7.1