[ Index ]

PHP Cross Reference of BBPress

title

Body

[close]

/src/includes/core/ -> abstraction.php (summary)

bbPress Abstractions This file contains functions for abstracting WordPress core functionality into convenient wrappers so they can be used more reliably.

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

Defines 21 functions

  bbp_setup_admin()
  bbp_setup_converter()
  bbp_get_global_object()
  bbp_get_wp_query()
  bbp_get_wp_roles()
  bbp_db()
  bbp_rewrite()
  bbp_get_root_url()
  bbp_get_paged_slug()
  bbp_use_pretty_urls()
  bbp_make_first_page_canonical()
  bbp_paginate_links()
  bbp_get_major_wp_version()
  bbp_is_large_install()
  bbp_get_total_users()
  bbp_switch_to_site()
  bbp_restore_current_site()
  bbp_default_intercept()
  bbp_is_intercepted()
  bbp_maybe_intercept()
  bbp_get_empty_datetime()

Functions
Functions that are not part of a class:

bbp_setup_admin()   X-Ref
Setup Admin

This exists outside of "/includes/admin/" because the converter may need to
be setup to convert the passwords of users that were migrated from another
forum platform.

since: 2.6.0 bbPress (r2596)

bbp_setup_converter()   X-Ref
Setup Converter

This exists outside of "/includes/admin/" because the converter may need to
be setup to convert the passwords of users that were migrated from another
forum platform.

since: 2.6.0 bbPress (r2596)

bbp_get_global_object( $name = '', $type = '', $default = null )   X-Ref
Lookup and return a global variable

param: string  $name     Name of global variable
param: string  $type     Type of variable to check with `is_a()`
param: mixed   $default  Default value to return if no global found
return: mixed   Verified object if valid, Default or null if invalid
since: 2.5.8 bbPress (r5814)

bbp_get_wp_query()   X-Ref
Get the `$wp_query` global without needing to declare it everywhere

return: WP_Roles
since: 2.6.0 bbPress (r6582)

bbp_get_wp_roles()   X-Ref
Get the `$wp_roles` global without needing to declare it everywhere

return: WP_Roles
since: 2.2.0 bbPress (r4293)

bbp_db()   X-Ref
Return the database class being used to interface with the environment.

This function is abstracted to avoid global touches to the primary database
class. bbPress supports WordPress's `$wpdb` global by default, and can be
filtered to support other configurations if needed.

return: object
since: 2.5.8 bbPress (r5814)

bbp_rewrite()   X-Ref
Return the rewrite rules class being used to interact with URLs.

This function is abstracted to avoid global touches to the primary rewrite
rules class. bbPress supports WordPress's `$wp_rewrite` by default, but can
be filtered to support other configurations if needed.

return: object
since: 2.5.8 bbPress (r5814)

bbp_get_root_url()   X-Ref
Get the root URL

return: string
since: 2.5.8 bbPress (r5814)

bbp_get_paged_slug()   X-Ref
Get the slug used for paginated requests

return: string
since: 2.4.0 bbPress (r4926)

bbp_use_pretty_urls()   X-Ref
Is the environment using pretty URLs?

return: bool
since: 2.5.8 bbPress (r5814)

bbp_make_first_page_canonical( $pagination_links = '' )   X-Ref
Remove the first-page from a pagination links result set, ensuring that it
points to the canonical first page URL.

This is a bit of an SEO hack, to guarantee that the first page in a loop will
never have pagination appended to the end of it, regardless of what the other
functions have decided for us.

param: string $pagination_links The HTML links used for pagination
return: string
since: 2.6.0 bbPress (r6678)

bbp_paginate_links( $args = array()   X-Ref
A convenient wrapper for common calls to paginate_links(), complete with
support for parameters that aren't used internally by bbPress.

param: array $args
return: string
since: 2.6.0 bbPress (r6679)

bbp_get_major_wp_version()   X-Ref
Parse the WordPress core version number

return: string $wp_version
since: 2.6.0 bbPress (r6051)

bbp_is_large_install()   X-Ref
Is this a large bbPress installation?

return: bool True if more than 10000 users, false not
since: 2.6.0 bbPress (r6242)

bbp_get_total_users()   X-Ref
Get the total number of users on the forums

return: int Total number of users
since: 2.0.0 bbPress (r2769)

bbp_switch_to_site( $site_id = 0 )   X-Ref
Switch to a site in a multisite installation.

If not a multisite installation, no switching will occur.

param: int $site_id
since: 2.6.0 bbPress (r6733)

bbp_restore_current_site()   X-Ref
Switch back to the original site in a multisite installation.

If not a multisite installation, no switching will occur.

since: 2.6.0 bbPress (r6733)

bbp_default_intercept()   X-Ref
Generate a default intercept value.

return: string
since: 2.6.0

bbp_is_intercepted( $value = '' )   X-Ref
Whether a value has been intercepted

param: bool $value
since: 2.6.0

bbp_maybe_intercept( $action = '', $args = array()   X-Ref
Allow interception of a method or function call.

param: string $action Typically the name of the caller function
param: array  $args   Typically the results of caller function func_get_args()
return: mixed         Intercept results. Default bbp_default_intercept().
since: 2.6.0

bbp_get_empty_datetime()   X-Ref
Get an empty datetime value.

return: string
since: 2.6.6 bbPress (r7094)



Generated: Thu Apr 25 01:01:05 2024 Cross-referenced by PHPXref 0.7.1