Functions

Retrieves the translation of $text. If there is no translation, or the domain isn't loaded the original text is returned.

__(string $text, string $domain = 'default') : string
package bbPress
see An alias of translate()
since 0.7.2

Parameters

$text

string

Text to translate

$domain

string

Optional. Domain to retrieve the translated text

Returns

stringTranslated text

__ngettext()

__ngettext() 
package bbPress
deprecated Use _n()

__ngettext_noop()

__ngettext_noop() 
package bbPress
deprecated Use _n_noop()

Retrieve translated string with vertical bar context

_c(string $text, string $domain = 'default') : string

Quite a few times, there will be collisions with similar translatable text found in more than two places but with different translated context.

In order to use the separate contexts, the _c() function is used and the translatable string uses a pipe ('|') which has the context the string is in.

When the translated string is returned, it is everything before the pipe, not including the pipe character. If there is no pipe in the translated text then everything is returned.

package bbPress
since 1.0

Parameters

$text

string

Text to translate

$domain

string

Optional. Domain to retrieve the translated text

Returns

stringTranslated context string without pipe

Displays the returned translated text from translate().

_e(string $text, string $domain = 'default'
package bbPress
see Echos returned translate() string
since 0.7.2

Parameters

$text

string

Text to translate

$domain

string

Optional. Domain to retrieve the translated text

Retrieve the plural or single form based on the amount.

_n(string $single, string $plural, integer $number, string $domain = 'default') : string

If the domain is not set in the $l10n list, then a comparsion will be made and either $plural or $single parameters returned.

If the domain does exist, then the parameters $single, $plural, and $number will first be passed to the domain's ngettext method. Then it will be passed to the 'ngettext' filter hook along with the same parameters. The expected type will be a string.

package bbPress
since 1.0
uses Gets list of domain translated string (gettext_reader) objects
uses Calls 'ngettext' hook on domains text returned, along with $single, $plural, and $number parameters. Expected to return string.

Parameters

$single

string

The text that will be used if $number is 1

$plural

string

The text that will be used if $number is not 1

$number

integer

The number to compare against to use either $single or $plural

$domain

string

Optional. The domain identifier the text should be retrieved in

Returns

stringEither $single or $plural translated text

Register plural strings in POT file, but don't translate them.

_n_noop($single, $plural) : array

Used when you want do keep structures with translatable plural strings and use them later.

Example: $messages = array( 'post' => _n_noop('%s post', '%s posts'), 'page' => _n_noop('%s pages', '%s pages') ); ... $message = $messages[$type]; $usable_text = sprintf(_n($message[0], $message[1], $count), $count);

package bbPress
since 1.0

Parameters

$single

Single form to be i18ned

$plural

Plural form to be i18ned

Returns

arrayarray($single, $plural)

_nc()

_nc($single, $plural, $number, $domain = 'default'

_nx()

_nx($single, $plural, $number, $context, $domain = 'default'
package bbPress
since 1.0

Parameters

$single

$plural

$number

$context

$domain

Register plural strings with context in POT file, but don't translate them.

_nx_noop($single, $plural, $context) 
package bbPress
see

Parameters

$single

$plural

$context

_x()

_x($single, $context, $domain = 'default'
package bbPress
since 1.0

Parameters

$single

$context

$domain

add_profile_tab()

add_profile_tab($tab_title, $users_cap, $others_cap, $file, $arg = false
package bbPress

Parameters

$tab_title

$users_cap

$others_cap

$file

$arg

add_topic_tag()

add_topic_tag($topic_id, $tag) 
package bbPress

Parameters

$topic_id

$tag

add_topic_tags()

add_topic_tags($topic_id, $tags) 
package bbPress

Parameters

$topic_id

$tags

balanceTags()

balanceTags($text) 
package bbPress

Parameters

$text

bb_add_action()

bb_add_action($tag, $function_to_add, $priority = 10
package bbPress

Parameters

$tag

$function_to_add

$priority

bb_add_filter()

bb_add_filter($tag, $function_to_add, $priority = 10
package bbPress

Parameters

$tag

$function_to_add

$priority

bb_add_profile_tab()

bb_add_profile_tab($tab_title, $users_cap, $others_cap, $file, $arg = false
package bbPress

Parameters

$tab_title

$users_cap

$others_cap

$file

$arg

bb_add_query_arg()

bb_add_query_arg() 
package bbPress

bb_apply_filters()

bb_apply_filters($tag, $string, $filter = true
package bbPress

Parameters

$tag

$string

$filter

bb_basename()

bb_basename($file, $directories) 
package bbPress

Parameters

$file

$directories

bb_cache_javascript_headers()

bb_cache_javascript_headers() 
package bbPress

bb_can_access_tab()

bb_can_access_tab($profile_tab, $viewer_id, $owner_id) 
package bbPress

Parameters

$profile_tab

$viewer_id

$owner_id

bb_check_comment_flood()

bb_check_comment_flood($ip = '', $email = '', $date = ''
package bbPress

Parameters

$ip

$email

$date

bb_closed_title()

bb_closed_title($title) 
package bbPress

Parameters

$title

bb_contextualise_search_post_text()

bb_contextualise_search_post_text() 
package bbPress

bb_convert_path_base()

bb_convert_path_base($path, $from_base, $to_base) 
package bbPress

Parameters

$path

$from_base

$to_base

bb_count_last_query()

bb_count_last_query($query = ''
package bbPress

Parameters

$query

bb_current_time()

bb_current_time($type = 'timestamp'
package bbPress

Parameters

$type

Whether current user has capability or role.

bb_current_user_can(string $capability) : boolean
package bbPress
since 0.7.2
uses Current User Object

Parameters

$capability

string

Capability or role name.

Returns

boolean

bb_datetime_format_i18n()

bb_datetime_format_i18n($unixtimestamp, $type = 'datetime', $formatstring = '', $gmt = true
package bbPress

Parameters

$unixtimestamp

$type

$formatstring

$gmt

bb_dbDelta()

bb_dbDelta($queries, $execute = true
package bbPress

Parameters

$queries

$execute

bb_deregister_view()

bb_deregister_view($view) 
package bbPress

Parameters

$view

bb_die()

bb_die($message, $title = '', $header = 0
package bbPress

Parameters

$message

$title

$header

bb_do_action()

bb_do_action($tag) 
package bbPress

Parameters

$tag

bb_enqueue_script()

bb_enqueue_script($handle, $src = false, $deps = array(), $ver = false
package bbPress

Parameters

$handle

$src

$deps

$ver

bb_explain_nonce()

bb_explain_nonce($action) 
package bbPress

Parameters

$action

bb_filter_feed_content()

bb_filter_feed_content() 
package bbPress

bb_find_filename()

bb_find_filename($text) 
package bbPress

Parameters

$text

bb_flatten_array()

bb_flatten_array($array, $cut_branch = 0, $keep_child_array_keys = true
package bbPress

Parameters

$array

$cut_branch

$keep_child_array_keys

bb_force_ssl_admin()

bb_force_ssl_admin($force = ''
package bbPress

Parameters

$force

bb_force_ssl_user_forms()

bb_force_ssl_user_forms($force = ''
package bbPress

Parameters

$force

bb_get_active_theme_directory()

bb_get_active_theme_directory() 
package bbPress

bb_get_active_theme_folder()

bb_get_active_theme_folder() 
package bbPress

bb_get_assignable_caps()

bb_get_assignable_caps() 
package bbPress

bb_get_common_domains()

bb_get_common_domains($domain1 = false, $domain2 = false
package bbPress

Parameters

$domain1

$domain2

bb_get_common_parts()

bb_get_common_parts($string1 = false, $string2 = false, $delimiter = '', $reverse = false
package bbPress

Parameters

$string1

$string2

$delimiter

$reverse

bb_get_common_paths()

bb_get_common_paths($path1 = false, $path2 = false
package bbPress

Parameters

$path1

$path2

bb_get_current_commenter()

bb_get_current_commenter() 
package bbPress

bb_get_datetime_formatstring_i18n()

bb_get_datetime_formatstring_i18n($type = 'datetime'
package bbPress

Parameters

$type

bb_get_id_from_slug()

bb_get_id_from_slug($table, $slug, $slug_length = 255
package bbPress

Parameters

$table

$slug

$slug_length

Get the date when current installation was created

bb_get_inception(string|array $args = '') : integer
package bbPress
since 0.8
uses Database Object
uses Result cache

Parameters

$args

stringarray

Formatting options for the timestamp.

Returns

integer

Gets the current locale.

bb_get_locale() : string

If the locale is set, then it will filter the locale in the 'locale' filter hook and return the value.

If the locale is not set already, then the BB_LANG constant is used if it is defined. Then it is filtered through the 'locale' filter hook and the value for the locale global set and the locale is returned.

The process to get the locale should only be done once but the locale will always be filtered using the 'locale' hook.

package bbPress
since 0.7.2
uses Calls 'locale' hook on locale value.
uses Gets the locale stored in the global.

Returns

stringThe locale of the blog or from the 'locale' hook.

bb_get_page_number()

bb_get_page_number($item, $per_page = 0
package bbPress

Parameters

$item

$per_page

bb_get_path()

bb_get_path($level = 1, $base = false, $request = false
package bbPress

Parameters

$level

$base

$request

bb_get_plugin_directory()

bb_get_plugin_directory($plugin = false, $path = false
package bbPress

Parameters

$plugin

$path

bb_get_plugin_path()

bb_get_plugin_path($plugin = false
package bbPress

Parameters

$plugin

bb_get_plugin_uri()

bb_get_plugin_uri($plugin = false
package bbPress

Parameters

$plugin

bb_get_profile_admin_keys()

bb_get_profile_admin_keys($context = null
package bbPress

Parameters

$context

bb_get_profile_info_keys()

bb_get_profile_info_keys($context = null
package bbPress

Parameters

$context

bb_get_sql_from_slug()

bb_get_sql_from_slug($table, $slug, $slug_length = 255
package bbPress

Parameters

$table

$slug

$slug_length

bb_get_tag_by_name()

bb_get_tag_by_name($tag) 
package bbPress

Parameters

$tag

bb_get_theme_directory()

bb_get_theme_directory($theme = false
package bbPress

Parameters

$theme

bb_get_themes()

bb_get_themes() 
package bbPress

bb_get_topic_tags_per_day()

bb_get_topic_tags_per_day() 
package bbPress

bb_get_total_topic_tags()

bb_get_total_topic_tags() 
package bbPress

Get the total number of users

bb_get_total_users() : integer
package bbPress
since 1.0
uses Database Object
uses Cache of result generated by previous run

Returns

integer

Return a URI based on the URI setting

bb_get_uri($resource = null, $query = null, $context = BB_URI_CONTEXT_A_HREF) : string
package bbPress
since 1.0

Parameters

$resource

string The directory, may include a querystring

$query

mixed The query arguments as a querystring or an associative array

$context

integer The context of the URI, use BB_URICONTEXT*

Returns

stringThe complete URI

bb_get_uri_page()

bb_get_uri_page() 
package bbPress

bb_get_user_by_name()

bb_get_user_by_name($name) 
package bbPress

Parameters

$name

bb_get_view_query_args()

bb_get_view_query_args($view) 
package bbPress

Parameters

$view

bb_get_views()

bb_get_views() 
package bbPress

Give a user the default role

bb_give_user_default_role(\BP_User $user) 
package bbPress
since 0.7.2

Parameters

$user

\BP_User

User object to give default role to

bb_glob()

bb_glob($pattern) 
package bbPress

Parameters

$pattern

bb_global_profile_menu_structure()

bb_global_profile_menu_structure() 
package bbPress

Sanitizes user input en-masse.

bb_global_sanitize(mixed $array, boolean $trim = true) : mixed
package bbPress

Parameters

$array

mixed

The array of values or a single value to sanitize, usually a global variable like $_GET or $_POST.

$trim

boolean

Optional. Whether to trim the value or not. Default is true.

Returns

mixedThe sanitized data.

Retrieve the date in localized format, based on timestamp.

bb_gmdate_i18n(string $dateformatstring, integer $unixtimestamp = false, boolean $gmt = true) : string

If the locale specifies the locale month and weekday, then the locale will take over the format for the date. If it isn't, then the date format string will be used instead.

package bbPress

Parameters

$dateformatstring

string

Format to display the date.

$unixtimestamp

integer

Optional. Unix timestamp.

$gmt

boolean

Optional, default is true. Whether to convert to GMT for time.

Returns

stringThe date, translated if locale specifies it.

Output the date when current installation was created

bb_inception(string|array $args = ''
package bbPress
since 0.8

Parameters

$args

stringarray

Arguments to pass through to bb_get_inception()

Setup all default roles and associate them with capabilities

bb_init_roles(\BP_Roles $roles) 
package bbPress
since 0.7.2

Parameters

$roles

\BP_Roles

Roles object to add default roles to

bb_install_header()

bb_install_header($title = '', $header = false, $logo = false
package bbPress

Parameters

$title

$header

$logo

Reports whether bbPress is installed by getting forums.

bb_is_installed() : boolean
package bbPress

Returns

booleanTrue if there are forums, otherwise false.

bb_is_ssl()

bb_is_ssl() 
package bbPress

Loads default translated strings based on locale.

bb_load_default_textdomain() 

Loads the .mo file in WP_LANG_DIR constant path from WordPress root. The translated (.mo) file is named based off of the locale.

package bbPress
since 1.5.0

Loads the plugin's translated strings.

bb_load_plugin_textdomain(string $domain, string $path = false

If the path is not given then it will be the root of the plugin directory. The .mo file should be named based on the domain with a dash followed by a dash, and then the locale exactly.

package bbPress
since 0.7.2

Parameters

$domain

string

Unique identifier for retrieving translated strings

$path

string

Optional. Absolute path to folder where the .mo file resides

Loads the theme's translated strings.

bb_load_theme_textdomain(string $domain, $path = false

If the current locale exists as a .mo file in the theme's root directory, it will be included in the translated strings by the $domain.

The .mo files must be named based on the locale exactly.

package bbPress
since 0.7.2

Parameters

$domain

string

Unique identifier for retrieving translated strings

$path

Marks things as deprecated and informs when they have been used.

bb_log_deprecated(string $type, string $name, string $replacement = 'none'
package bbPress
since 0.9
uses BP_Log logging object.

Parameters

$type

string

The type of thing that was attempted: function, class::function, constant, variable or page.

$name

string

The thing that was called.

$replacement

string

Optional. The thing that should have been called.

bb_make_clickable()

bb_make_clickable($ret) 
package bbPress

Parameters

$ret

bb_make_db_current()

bb_make_db_current() 
package bbPress

bb_make_feed()

bb_make_feed($link) 
package bbPress

Parameters

$link

Map meta capabilities to primitive capabilities.

bb_map_meta_cap(array $caps, string $cap, integer $user_id, $args) : array

This does not actually compare whether the user ID has the actual capability, just what the capability or capabilities are. Meta capability list value can be 'delete_user', 'edit_user', 'delete_post', 'delete_page', 'edit_post', 'edit_page', 'read_post', or 'read_page'.

package bbPress
since 0.7.2

Parameters

$caps

array

Previously existing capabilities

$cap

string

Capability name.

$user_id

integer

User ID.

$args

Returns

arrayActual capabilities for meta capability.

bb_match_domains()

bb_match_domains($domain1 = false, $domain2 = false
package bbPress

Parameters

$domain1

$domain2

bb_maybe_add_column()

bb_maybe_add_column($table_name, $column_name, $create_ddl) 
package bbPress

Parameters

$table_name

$column_name

$create_ddl

bb_maybe_serialize()

bb_maybe_serialize($string) 
package bbPress

Parameters

$string

bb_maybe_unserialize()

bb_maybe_unserialize($string) 
package bbPress

Parameters

$string

bb_no_where()

bb_no_where($where) 
package bbPress

Parameters

$where

bb_nonce_ays()

bb_nonce_ays($action) 
package bbPress

Parameters

$action

Convert number to format based on the locale.

bb_number_format_i18n(mixed $number, integer $decimals = null) : string
package bbPress
since 2.3.0

Parameters

$number

mixed

The number to convert based on locale.

$decimals

integer

Precision of the number of decimal places.

Returns

stringConverted number in string format.

bb_offset_time()

bb_offset_time($time, $args = null
package bbPress

Parameters

$time

$args

bb_parse_args()

bb_parse_args($args, $defaults = ''
package bbPress

Parameters

$args

$defaults

bb_path_to_url()

bb_path_to_url($path) 
package bbPress

Parameters

$path

bb_pingback_header()

bb_pingback_header() 
package bbPress

bb_plugin_basename()

bb_plugin_basename($file) 
package bbPress

Parameters

$file

bb_pull_cols()

bb_pull_cols($obj_array) 
package bbPress

Parameters

$obj_array

bb_random_pass()

bb_random_pass($length) 
package bbPress

Parameters

$length

bb_register_activation_hook()

bb_register_activation_hook($file, $function) 
package bbPress

Parameters

$file

$function

bb_register_deactivation_hook()

bb_register_deactivation_hook($file, $function) 
package bbPress

Parameters

$file

$function

bb_register_default_views()

bb_register_default_views() 
package bbPress

bb_register_plugin_activation_hook()

bb_register_plugin_activation_hook($file, $function) 
package bbPress

Parameters

$file

$function

bb_register_plugin_deactivation_hook()

bb_register_plugin_deactivation_hook($file, $function) 
package bbPress

Parameters

$file

$function

bb_register_theme_activation_hook()

bb_register_theme_activation_hook($file, $function) 
package bbPress

Parameters

$file

$function

bb_register_theme_deactivation_hook()

bb_register_theme_deactivation_hook($file, $function) 
package bbPress

Parameters

$file

$function

bb_register_view()

bb_register_view($view, $title, $query_args = '', $feed = TRUE
package bbPress

Parameters

$view

$title

$query_args

$feed

bb_remove_action()

bb_remove_action($tag, $function_to_remove, $priority = 10
package bbPress

Parameters

$tag

$function_to_remove

$priority

bb_remove_filter()

bb_remove_filter($tag, $function_to_remove, $priority = 10
package bbPress

Parameters

$tag

$function_to_remove

$priority

bb_remove_query_arg()

bb_remove_query_arg($key, $query = ''
package bbPress

Parameters

$key

$query

Send status headers for clients supporting Conditional Get

bb_send_304(string $bb_last_modified) 

The function sends the Last-Modified and ETag headers for all clients. It then checks both the If-None-Match and If-Modified-Since headers to see if the client has used them. If so, and the ETag does matches the client ETag or the last modified date sent by the client is newer or the same as the generated last modified, the function sends a 304 Not Modified and exits.

package bbPress
link http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3

Parameters

$bb_last_modified

string

Last modified time. Must be a HTTP-date

bb_send_headers()

bb_send_headers() 
package bbPress

Sets the required variables to connect to custom user tables.

bb_set_custom_user_tables() : boolean
package bbPress

Returns

booleanAlways returns true.

Create an API hook to run on shutdown

bb_shutdown_action_hook() 
package bbPress

bb_since()

bb_since($original, $args = ''
package bbPress

Parameters

$original

$args

bb_slug_increment()

bb_slug_increment($slug, $existing_slug, $slug_length = 255
package bbPress

Parameters

$slug

$existing_slug

$slug_length

bb_specialchars()

bb_specialchars($text, $quotes = 0
package bbPress

Parameters

$text

$quotes

bb_sql_delta()

bb_sql_delta($queries, $execute = true
package bbPress

Parameters

$queries

$execute

bb_sql_describe_table()

bb_sql_describe_table($query) 
package bbPress

Parameters

$query

bb_sql_get_column_definition()

bb_sql_get_column_definition($column_data) 
package bbPress

Parameters

$column_data

bb_sql_get_index_definition()

bb_sql_get_index_definition($index_data) 
package bbPress

Parameters

$index_data

bb_sql_parse()

bb_sql_parse($sql) 
package bbPress

Parameters

$sql

Forces redirection to an SSL page when required

bb_ssl_redirect() : void
package bbPress
since 1.0

bb_tag_sanitize()

bb_tag_sanitize($tag) 
package bbPress

Parameters

$tag

bb_theme_basename()

bb_theme_basename($file) 
package bbPress

Parameters

$file

bb_timer_start() - PHP 4 standard microtime start capture

bb_timer_start() : boolean
package bbPress
access private
global int $bb_timestart Seconds and Microseconds added together from when function is called

Returns

booleanAlways returns true

bb_timer_stop()

bb_timer_stop($display = 0, $precision = 3
package bbPress

Parameters

$display

$precision

bb_topic_tags_per_day()

bb_topic_tags_per_day() 
package bbPress

bb_total_topic_tags()

bb_total_topic_tags() 
package bbPress

Output the number of users

bb_total_users() 
package bbPress
since 1.0

bb_trim_common_path_right()

bb_trim_common_path_right($one, $two) 
package bbPress

Parameters

$one

$two

bb_unregister_GLOBALS() - Turn register globals off

bb_unregister_GLOBALS() : null
package bbPress
access private

Returns

nullWill return null if register_globals PHP directive was disabled

bb_upgrade_1060()

bb_upgrade_1060() 
package bbPress

Echo a URI based on the URI setting

bb_uri($resource = null, $query = null, $context = BB_URI_CONTEXT_A_HREF) : void
package bbPress
since 1.0

Parameters

$resource

string The directory, may include a querystring

$query

mixed The query arguments as a querystring or an associative array

$context

integer The context of the URI, use BB_URICONTEXT*

bb_url_to_path()

bb_url_to_path($url) 
package bbPress

Parameters

$url

bb_user_exists()

bb_user_exists($user) 
package bbPress

Parameters

$user

bb_user_sanitize()

bb_user_sanitize($text, $strict = false
package bbPress

Parameters

$text

$strict

bb_verify_email()

bb_verify_email($email, $check_dns = false
package bbPress

Parameters

$email

$check_dns

bb_view_query()

bb_view_query($view, $new_args = ''
package bbPress

Parameters

$view

$new_args

before_last_bar()

before_last_bar($string) 
package bbPress
since 1.0

Parameters

$string

bozo_add_admin_page()

bozo_add_admin_page() 
package bbPress

bozo_add_recount_list()

bozo_add_recount_list() 
package bbPress

bozo_admin_page()

bozo_admin_page() 
package bbPress

bozo_delete_post()

bozo_delete_post($post_id, $new_status, $old_status) 
package bbPress

Parameters

$post_id

$new_status

$old_status

bozo_get_topic_posts()

bozo_get_topic_posts($topic_posts) 
package bbPress

Parameters

$topic_posts

bozo_latest_filter()

bozo_latest_filter() 
package bbPress

bozo_new_post()

bozo_new_post($post_id) 
package bbPress

Parameters

$post_id

bozo_post_del_class()

bozo_post_del_class($status) 
package bbPress

Parameters

$status

bozo_posts()

bozo_posts($where) 
package bbPress

Parameters

$where

bozo_pre_post_status()

bozo_pre_post_status($status, $post_id, $topic_id) 
package bbPress

Parameters

$status

$post_id

$topic_id

bozo_profile_admin_keys()

bozo_profile_admin_keys($a) 
package bbPress

Parameters

$a

bozo_profile_db_filter()

bozo_profile_db_filter() 
package bbPress

bozo_recount_topics()

bozo_recount_topics() 
package bbPress

bozo_recount_users()

bozo_recount_users() 
package bbPress

bozo_topic_db_filter()

bozo_topic_db_filter() 
package bbPress

bozo_topic_pages_add()

bozo_topic_pages_add($add) 
package bbPress

Parameters

$add

bozo_topics()

bozo_topics($where) 
package bbPress

Parameters

$where

bozon()

bozon($user_id, $topic_id = 0
package bbPress

Parameters

$user_id

$topic_id

can_access_tab()

can_access_tab($profile_tab, $viewer_id, $owner_id) 
package bbPress

Parameters

$profile_tab

$viewer_id

$owner_id

cast_meta_value()

cast_meta_value($data) 
package bbPress

Parameters

$data

closed_title()

closed_title($title) 
package bbPress

Parameters

$title

code_trick()

code_trick($text) 
package bbPress

Parameters

$text

code_trick_reverse()

code_trick_reverse($text) 
package bbPress

Parameters

$text

create_tag()

create_tag($tag) 
package bbPress

Parameters

$tag

current_user_is_bozo()

current_user_is_bozo($topic_id = false
package bbPress

Parameters

$topic_id

decodeit()

decodeit($matches) 
package bbPress

Parameters

$matches

deleted_topics()

deleted_topics($where) 
package bbPress

Parameters

$where

destroy_tag()

destroy_tag($tag_id, $recount_topics = true
package bbPress

Parameters

$tag_id

$recount_topics

encode_bad()

encode_bad($text) 
package bbPress

Parameters

$text

encodeit()

encodeit($matches) 
package bbPress

Parameters

$matches

Retrieves the translation of $text and escapes it for safe use in an attribute.

esc_attr__(string $text, string $domain = 'default') : string

If there is no translation, or the domain isn't loaded the original text is returned.

package bbPress
see An alias of translate()
see
since 1.0

Parameters

$text

string

Text to translate

$domain

string

Optional. Domain to retrieve the translated text

Returns

stringTranslated text

Displays translated text that has been escaped for safe use in an attribute.

esc_attr_e(string $text, string $domain = 'default'
package bbPress
see Echoes returned translate() string
see
since 1.0

Parameters

$text

string

Text to translate

$domain

string

Optional. Domain to retrieve the translated text

esc_attr_x()

esc_attr_x($single, $context, $domain = 'default'
package bbPress

Parameters

$single

$context

$domain

Retrieves the translation of $text and escapes it for safe use in HTML output.

esc_html__(string $text, string $domain = 'default') : string

If there is no translation, or the domain isn't loaded the original text is returned.

package bbPress
see An alias of translate()
see
since 1.0

Parameters

$text

string

Text to translate

$domain

string

Optional. Domain to retrieve the translated text

Returns

stringTranslated text

Displays translated text that has been escaped for safe use in HTML output.

esc_html_e(string $text, string $domain = 'default'
package bbPress
see Echoes returned translate() string
see
since 1.0

Parameters

$text

string

Text to translate

$domain

string

Optional. Domain to retrieve the translated text

fermion()

fermion($user_id, $topic_id = 0
package bbPress

Parameters

$user_id

$topic_id

forum_dropdown()

forum_dropdown($c = false, $a = false
package bbPress

Parameters

$c

$a

get_assignable_caps()

get_assignable_caps() 
package bbPress

get_bb_location()

get_bb_location() 
package bbPress

get_bozos()

get_bozos($page = 1
package bbPress

Parameters

$page

get_deleted_posts()

get_deleted_posts($page = 1, $limit = false, $status = 1, $topic_status = 0
package bbPress

Parameters

$page

$limit

$status

$topic_status

get_forum()

get_forum($id) 
package bbPress

Parameters

$id

get_forums()

get_forums($args = null
package bbPress

Parameters

$args

get_ids_by_role()

get_ids_by_role($role = 'moderator', $sort = 0, $limit_str = ''
package bbPress

Parameters

$role

$sort

$limit_str

get_inception()

get_inception() 
package bbPress

get_latest_forum_posts()

get_latest_forum_posts($forum_id, $limit = 0, $page = 1
package bbPress

Parameters

$forum_id

$limit

$page

get_latest_posts()

get_latest_posts($limit = 0, $page = 1
package bbPress

Parameters

$limit

$page

get_locale()

get_locale() 
package bbPress

get_other_tags()

get_other_tags($topic_id, $user_id) 
package bbPress

Parameters

$topic_id

$user_id

get_page_number()

get_page_number($item, $per_page = 0
package bbPress

Parameters

$item

$per_page

get_path()

get_path($level = 1, $base = false, $request = false
package bbPress

Parameters

$level

$base

$request

Get the average number of posts per day

get_posts_per_day() : integer | float
package bbPress
since 0.7.2

Returns

integerfloat

get_profile_admin_keys()

get_profile_admin_keys($context = null
package bbPress

Parameters

$context

get_profile_info_keys()

get_profile_info_keys($context = null
package bbPress

Parameters

$context

get_public_tags()

get_public_tags($topic_id) 
package bbPress

Parameters

$topic_id

get_recent_registrants()

get_recent_registrants($num = 10
package bbPress

Parameters

$num

get_recent_user_replies()

get_recent_user_replies($user_id) 
package bbPress

Parameters

$user_id

Get the average number of registrations per day

get_registrations_per_day() : integer | float
package bbPress
since 0.7.2

Returns

integerfloat

get_tag()

get_tag($tag_id, $user_id = 0, $topic_id = 0
package bbPress

Parameters

$tag_id

$user_id

$topic_id

get_tag_by_name()

get_tag_by_name($tag) 
package bbPress

Parameters

$tag

get_tag_id()

get_tag_id($tag) 
package bbPress

Parameters

$tag

get_tag_name()

get_tag_name($id = 0
package bbPress

Parameters

$id

get_tagged_topic_ids()

get_tagged_topic_ids($tag_id) 
package bbPress

Parameters

$tag_id

get_top_tags()

get_top_tags($recent = true, $limit = 40
package bbPress

Parameters

$recent

$limit

get_topic_date()

get_topic_date($format = '', $id = 0
package bbPress

Parameters

$format

$id

get_topic_start_timestamp()

get_topic_start_timestamp($id = 0
package bbPress

Parameters

$id

get_topic_tags()

get_topic_tags($topic_id) 
package bbPress

Parameters

$topic_id

get_topic_timestamp()

get_topic_timestamp($id = 0
package bbPress

Parameters

$id

Get the average number of topics per day

get_topics_per_day() : integer | float
package bbPress
since 0.7.2

Returns

integerfloat

Get the total number of forums

get_total_forums() : integer
package bbPress
since 1.0
uses Database Object
uses Cache of result generated by previous run

Returns

integer

Get the total number of posts

get_total_posts() : integer
package bbPress
since 0.7.2
uses Database Object
uses Cache of result generated by previous run

Returns

integer

Get the total number of topics

get_total_topics() : integer
package bbPress
since 0.7.2
uses Database Object
uses Cache of result generated by previous run

Returns

integer

get_total_users()

get_total_users() 
package bbPress

Returns the Translations instance for a domain. If there isn't one, returns empty Translations instance.

get_translations_for_domain(string $domain) : object
package bbPress

Parameters

$domain

string

Returns

objectA Translation instance

get_user_tags()

get_user_tags($topic_id, $user_id) 
package bbPress

Parameters

$topic_id

$user_id

get_views()

get_views() 
package bbPress

is_bb_admin()

is_bb_admin() 
package bbPress

is_bb_favorites()

is_bb_favorites() 
package bbPress

is_bb_feed()

is_bb_feed() 
package bbPress

is_bb_profile()

is_bb_profile() 
package bbPress

is_bb_stats()

is_bb_stats() 
package bbPress

is_bb_tag()

is_bb_tag() 
package bbPress

is_bb_tags()

is_bb_tags() 
package bbPress

is_forum()

is_forum() 
package bbPress

is_front()

is_front() 
package bbPress

is_tag()

is_tag() 
package bbPress

is_tags()

is_tags() 
package bbPress

is_topic()

is_topic() 
package bbPress

is_topic_edit()

is_topic_edit() 
package bbPress

is_view()

is_view() 
package bbPress

language_attributes()

language_attributes($xhtml = 0
package bbPress

Parameters

$xhtml

load_default_textdomain()

load_default_textdomain() 
package bbPress

load_plugin_textdomain()

load_plugin_textdomain($domain, $path = false
package bbPress

Parameters

$domain

$path

Loads MO file into the list of domains.

load_textdomain(string $domain, string $mofile) : null

If the domain already exists, the inclusion will fail. If the MO file is not readable, the inclusion will fail.

On success, the mofile will be placed in the $l10n global by $domain and will be an gettext_reader object.

package bbPress
since 0.7.2
uses Gets list of domain translated string (gettext_reader) objects
uses Reads the MO file
uses Allows for retrieving translated strings

Parameters

$domain

string

Unique identifier for retrieving translated strings

$mofile

string

Path to the .mo file

Returns

nullOn failure returns null and also on success returns nothing.

load_theme_textdomain()

load_theme_textdomain($domain, $path = false
package bbPress

Parameters

$domain

$path

merge_tags()

merge_tags($old_id, $new_id) 
package bbPress

Parameters

$old_id

$new_id

new_topic()

new_topic($args = null
package bbPress

Parameters

$args

no_replies()

no_replies($where) 
package bbPress

Parameters

$where

no_where()

no_where($where) 
package bbPress

Parameters

$where

option()

option($option) 
package bbPress

Parameters

$option

Output the average number of posts per day

posts_per_day() 
package bbPress
since 0.7.2

Output the average number of registrations per day

registrations_per_day() 
package bbPress
since 0.7.2

remove_topic_tag()

remove_topic_tag($tag_id, $user_id, $topic_id) 
package bbPress

Parameters

$tag_id

$user_id

$topic_id

rename_tag()

rename_tag($tag_id, $tag_name) 
package bbPress

Parameters

$tag_id

$tag_name

sanitize_with_dashes()

sanitize_with_dashes($text, $length = 200
package bbPress

Parameters

$text

$length

show_context()

show_context($term, $text) 
package bbPress

Parameters

$term

$text

tag_heat_map()

tag_heat_map($args = ''
package bbPress

Parameters

$args

tag_name()

tag_name($id = 0
package bbPress

Parameters

$id

tag_sanitize()

tag_sanitize($tag) 
package bbPress

Parameters

$tag

topic_date()

topic_date($format = '', $id = 0
package bbPress

Parameters

$format

$id

topic_start_date()

topic_start_date($format = '', $id = 0
package bbPress

Parameters

$format

$id

Output the average number of topics per day

topics_per_day() 
package bbPress
since 0.7.2

topics_replied_on_undelete_post()

topics_replied_on_undelete_post($post_id) 
package bbPress

Parameters

$post_id

Output the number of forums

total_forums() 
package bbPress
since 1.0

Output the number of posts

total_posts() 
package bbPress
since 0.7.2

Output the number of topics

total_topics() 
package bbPress
since 0.7.2

total_users()

total_users() 
package bbPress

Retrieves the translation of $text. If there is no translation, or the domain isn't loaded the original text is returned.

translate(string $text, string $domain = 'default') : string
package bbPress
see Don't use translate() directly, use __()
since 1.0
uses Calls 'gettext' on domain translated text with the untranslated text as second parameter.

Parameters

$text

string

Text to translate.

$domain

string

Domain to retrieve the translated text.

Returns

stringTranslated text

Translate $text like translate(), but assumes that the text contains a context after its last vertical bar.

translate_with_context(string $text, string $domain = 'default') : string
package bbPress
since 1.0
uses

Parameters

$text

string

Text to translate

$domain

string

Domain to retrieve the translated text

Returns

stringTranslated text

translate_with_gettext_context()

translate_with_gettext_context($text, $context, $domain = 'default'
package bbPress
since 1.0

Parameters

$text

$context

$domain

untagged()

untagged($where) 
package bbPress

Parameters

$where

update_post_positions()

update_post_positions($topic_id) 
package bbPress

Parameters

$topic_id

update_user_status()

update_user_status($user_id, $user_status = 0
package bbPress

Parameters

$user_id

$user_status

user_sanitize()

user_sanitize($text, $strict = false
package bbPress

Parameters

$text

$strict

utf8_cut()

utf8_cut($utf8_string, $length) 
package bbPress

Parameters

$utf8_string

$length

wp_check_password()

wp_check_password($password, $hash, $user_id = ''
package bbPress

Parameters

$password

$hash

$user_id

wp_generate_password()

wp_generate_password($length = 12, $special_chars = true
package bbPress

Parameters

$length

$special_chars

wp_hash()

wp_hash($data, $scheme = 'auth'
package bbPress

Parameters

$data

$scheme

wp_hash_password()

wp_hash_password($password) 
package bbPress

Parameters

$password

wp_salt()

wp_salt($scheme = 'auth'
package bbPress

Parameters

$scheme

Classes, interfaces, and traits

BB_Cache

« More »

BB_Locale

Class that loads the calendar locale.

« More »

BB_Pingbacks

bbPress class to handle pinging

« More »

BP_Options

BP_Options allows storage of options for BackPress in the bbPress database

« More »

BP_Transients

Allows storage of transients for BackPress

« More »

WP_User

BackPress User class.

« More »

Constants

 

$old

$old = $bb->{$new} 
package bbPress
 

BACKPRESS_PATH

BACKPRESS_PATH = BB_PATH . BB_INC . 'backpress/' 
package bbPress
 

Database Charset to use in creating database tables.

BBDB_CHARSET = 'utf8' 
package bbPress
 

The Database Collate type. Don't change this if in doubt.

BBDB_COLLATE = '' 
package bbPress
 

MySQL hostname

BBDB_HOST = 'localhost' 
package bbPress
 

The name of the database for bbPress

BBDB_NAME = 'bbpress' 
package bbPress
 

MySQL database password

BBDB_PASSWORD = 'password' 
package bbPress
 

MySQL database username

BBDB_USER = 'username' 
package bbPress
 

BB_AUTH_KEY

BB_AUTH_KEY = 'put your unique phrase here' 
package bbPress
 

Full path to the location of the core plugins directory

BB_CORE_PLUGIN_DIR = BB_PATH . 'bb-plugins/' 
package bbPress
 

Full URL of the core plugins directory

BB_CORE_PLUGIN_URL = $bb->uri . 'bb-plugins/' 
package bbPress
 

Full path to the location of the core themes directory

BB_CORE_THEME_DIR = BB_PATH . 'bb-templates/' 
package bbPress
 

Full URL of the core themes directory

BB_CORE_THEME_URL = $bb->uri . 'bb-templates/' 
package bbPress
 

BB_DATABASE_CLASS

BB_DATABASE_CLASS = 'BPDB_Multi' 
package bbPress
 

BB_DATABASE_CLASS_INCLUDE

BB_DATABASE_CLASS_INCLUDE = BACKPRESS_PATH . 'class.bpdb-multi.php' 
package bbPress
 

The default theme

BB_DEFAULT_THEME = 'core#kakumei' 
package bbPress
 

Full path to the location of the default theme directory

BB_DEFAULT_THEME_DIR = BB_CORE_THEME_DIR . 'kakumei/' 
package bbPress
 

Full URL of the default theme directory

BB_DEFAULT_THEME_URL = BB_CORE_THEME_URL . 'kakumei/' 
package bbPress
 

BB_FORCE_SSL_ADMIN

BB_FORCE_SSL_ADMIN = false 
package bbPress
 

BB_FORCE_SSL_USER_FORMS

BB_FORCE_SSL_USER_FORMS = false 
package bbPress
 

BB_HASH

BB_HASH = $bb->wp_cookies_integrated ? md5($bb->wp_siteurl) : md5($bb->uri) 
package bbPress
 

The bbPress includes path relative to BB_PATH

BB_INC = 'bb-includes/' 
package bbPress
 

BB_INSTALLING

BB_INSTALLING = false 
package bbPress
 

BB_IS_ADMIN

BB_IS_ADMIN = false 
package bbPress
 

BB_IS_WP_LOADED

BB_IS_WP_LOADED = defined('DB_NAME') 
package bbPress
 

BB_LANG

BB_LANG = BBLANG 
package bbPress
 

bbPress Localized Language, defaults to English.

BB_LANG = '' 

Change this to localize bbPress. A corresponding MO file for the chosen language must be installed to a directory called "my-languages" in the root directory of bbPress. For example, install de.mo to "my-languages" and set BB_LANG to 'de' to enable German language support.

package bbPress
 

BB_LANG_DIR

BB_LANG_DIR = BB_PATH . 'my-languages/' 
package bbPress
 

BB_LOAD_DEPRECATED

BB_LOAD_DEPRECATED = true 
package bbPress
 

BB_LOGGED_IN_KEY

BB_LOGGED_IN_KEY = 'put your unique phrase here' 
package bbPress
 

Combination of all errors (excluding none and debug)

BB_LOG_ALL = BB_LOG_FAIL + BB_LOG_ERROR + BB_LOG_WARNING + BB_LOG_NOTICE 
package bbPress
 

BB_LOG_DEBUG

BB_LOG_DEBUG = 16 
package bbPress
 

BB_LOG_ERROR

BB_LOG_ERROR = 2 
package bbPress
 

BB_LOG_FAIL

BB_LOG_FAIL = 1 
package bbPress
 

bbPress logging level constants - same as constants from BP_Log class

BB_LOG_NONE = 0 
package bbPress
 

BB_LOG_NOTICE

BB_LOG_NOTICE = 8 
package bbPress
 

BB_LOG_WARNING

BB_LOG_WARNING = 4 
package bbPress
 

BB_NONCE_KEY

BB_NONCE_KEY = 'put your unique phrase here' 
package bbPress
 

BB_OBJECT_CACHE_FUNCTIONS_INCLUDE

BB_OBJECT_CACHE_FUNCTIONS_INCLUDE = $_internal_object_cache_functions_include 
package bbPress
 

BB_PATH

BB_PATH = $_bb_path 
package bbPress
 

BB_PLUGIN_DIR

BB_PLUGIN_DIR = BB_PATH . 'my-plugins/' 
package bbPress
 

BB_PLUGIN_URL

BB_PLUGIN_URL = $bb->uri . 'my-plugins/' 
package bbPress
 

BB_SECURE_AUTH_KEY

BB_SECURE_AUTH_KEY = 'put your unique phrase here' 
package bbPress
 

BB_THEME_DIR

BB_THEME_DIR = BB_PATH . 'my-templates/' 
package bbPress
 

BB_THEME_URL

BB_THEME_URL = $bb->uri . 'my-templates/' 
package bbPress
 

BB_URI_CONTEXT_AKISMET

BB_URI_CONTEXT_AKISMET = 524288 
package bbPress
 

BB_URI_CONTEXT_A_HREF

BB_URI_CONTEXT_A_HREF = 4 
package bbPress
 

BB_URI_CONTEXT_BB_ADMIN

BB_URI_CONTEXT_BB_ADMIN = 4096 
package bbPress
 

BB_URI_CONTEXT_BB_FEED

BB_URI_CONTEXT_BB_FEED = 1024 
package bbPress
 

BB_URI_CONTEXT_BB_USER_FORMS

BB_URI_CONTEXT_BB_USER_FORMS = 2048 
package bbPress
 

BB_URI_CONTEXT_BB_XMLRPC

BB_URI_CONTEXT_BB_XMLRPC = 8192 
package bbPress
 

BB_URI_CONTEXT_FORM_ACTION

BB_URI_CONTEXT_FORM_ACTION = 8 
package bbPress
 

BB_URI_CONTEXT_HEADER

BB_URI_CONTEXT_HEADER = 1 
package bbPress
 

BB_URI_CONTEXT_IFRAME_SRC

BB_URI_CONTEXT_IFRAME_SRC = 512 
package bbPress
 

BB_URI_CONTEXT_IMG_SRC

BB_URI_CONTEXT_IMG_SRC = 16 
package bbPress
       

BB_URI_CONTEXT_* - Bitwise definitions for bb_uri() and bb_get_uri() contexts

BB_URI_CONTEXT_NONE = 0 
since 1.0
package bbPress
 

BB_URI_CONTEXT_SCRIPT_SRC

BB_URI_CONTEXT_SCRIPT_SRC = 256 
package bbPress
 

BB_URI_CONTEXT_TEXT

BB_URI_CONTEXT_TEXT = 2 
package bbPress
 

BB_URI_CONTEXT_WP_HTTP_REQUEST

BB_URI_CONTEXT_WP_HTTP_REQUEST = 16384 
package bbPress
 

BPDB__CONNECT_ERROR_MESSAGE

BPDB__CONNECT_ERROR_MESSAGE = 'ERROR: Could not establish a database connection' 
package bbPress
 

BPDB__DB_VERSION_ERROR

BPDB__DB_VERSION_ERROR = 'ERROR: bbPress requires MySQL 4.0.0 or higher' 
package bbPress
 

BPDB__ERROR_HTML

BPDB__ERROR_HTML = '<div id="error"><p class="bpdberror"><strong>Database error:</strong> [%s]<br /><code>%s</code><br />Caller: %s</p></div>' 
package bbPress
 

BPDB__ERROR_STRING

BPDB__ERROR_STRING = 'ERROR: bbPress database error - "%s" for query "%s" via caller "%s"' 
package bbPress
 

BPDB__PHP_EXTENSION_MISSING

BPDB__PHP_EXTENSION_MISSING = 'ERROR: bbPress requires The MySQL PHP extension' 
package bbPress
 

BPDB__SELECT_ERROR_MESSAGE

BPDB__SELECT_ERROR_MESSAGE = 'ERROR: Can\'t select database.' 
package bbPress
 

Tell bbPress we are doing the CRON task.

DOING_CRON = true : boolean
package bbPress
   

Whether this is an XML-RPC Request

XMLRPC_REQUEST = true : boolean
since 1.0
package bbPress

Functions

Delete user interface settings.

bb_delete_user_setting(mixed $names) 

Deleting settings would reset them to the defaults.

package bbPress
package bbPress
subpackage Meta
since 1.0

Parameters

$names

mixed

The name or array of names of the setting to be deleted.

Retrieve user interface setting value based on setting name.

bb_get_user_setting(string $name, string $default = false) : mixed
package bbPress
package bbPress
subpackage Meta
since 1.0

Parameters

$name

string

The name of the setting.

$default

string

Optional default value to return when $name is not set.

Returns

mixedthe last saved user setting or the default value/false if it doesn't exist.

Adds or updates a user interface setting value based on setting name.

bb_update_user_setting(string $name, string $value) 
package bbPress
package bbPress
subpackage Meta
since 1.0

Parameters

$name

string

The name of the setting.

$value

string

The value of the setting.

Classes, interfaces, and traits

BB_XMLRPC_Server

XML-RPC server class to allow for remote publishing

« More »

Functions

Retrieve or display nonce hidden field for forms.

bb_nonce_field(string $action = -1, string $name = "_wpnonce", boolean $referer = true, boolean $echo = true) : string

The nonce field is used to validate that the contents of the form came from the location on the current site and not somewhere else. The nonce does not offer absolute protection, but should protect against most cases. It is very important to use nonce field in forms.

If you set $echo to true and set $referer to true, then you will need to retrieve the wp referer field. If you have the $referer set to true and are echoing the nonce field, it will also echo the referer field.

The $action and $name are optional, but if you want to have better security, it is strongly suggested to set those two parameters. It is easier to just call the function without any parameters, because validation of the nonce doesn't require any parameters, but since crackers know what the default is it won't be difficult for them to find a way around your nonce and cause damage.

The input name will be whatever $name value you gave. The input value will be the nonce creation value.

package bbPress
package bbPress
subpackage Security
since 1.0

Parameters

$action

string

Optional. Action name.

$name

string

Optional. Nonce name.

$referer

boolean

Optional, default true. Whether to set the referer field for validation.

$echo

boolean

Optional, default true. Whether to display or return hidden form field.

Returns

stringNonce field.

Retrieve URL with nonce added to URL query.

bb_nonce_url(string $actionurl, string $action = -1) : string
package bbPress
package bbPress
subpackage Security
since 1.0

Parameters

$actionurl

string

URL to add nonce action

$action

string

Optional. Nonce action name

Returns

stringURL with nonce action added.

Classes, interfaces, and traits

BB_Taxonomy

Taxonomy API

« More »

Functions

Delete a transient

bb_delete_transient(string $transient) : boolean
package bbPress
package bbPress
since 1.0
subpackage Transient

Parameters

$transient

string

Transient name. Expected to not be SQL-escaped

Returns

booleantrue if successful, false otherwise

Get the value of a transient

bb_get_transient(string $transient) : mixed

If the transient does not exist or does not have a value, then the return value will be false.

package bbPress
package bbPress
since 1.0
subpackage Transient

Parameters

$transient

string

Transient name. Expected to not be SQL-escaped

Returns

mixedValue of transient

Set/update the value of a transient

bb_set_transient(string $transient, mixed $value, integer $expiration = 0) : boolean

You do not need to serialize values, if the value needs to be serialize, then it will be serialized before it is set.

package bbPress
package bbPress
since 1.0
subpackage Transient

Parameters

$transient

string

Transient name. Expected to not be SQL-escaped

$value

mixed

Transient value.

$expiration

integer

Time until expiration in seconds, default 0

Returns

booleanFalse if value was not set and true if value was set.