[ Index ]

PHP Cross Reference of BBPress

title

Body

[close]

/src/includes/common/ -> formatting.php (summary)

bbPress Formatting

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

Defines 25 functions

  bbp_kses_allowed_tags()
  bbp_filter_kses()
  bbp_kses_data()
  bbp_code_trick()
  bbp_code_trick_reverse()
  bbp_encode_bad()
  bbp_encode_callback()
  bbp_decode_callback()
  bbp_encode_empty_callback()
  bbp_encode_normal_callback()
  bbp_rel_nofollow()
  bbp_rel_nofollow_callback()
  bbp_make_clickable()
  bbp_make_urls_clickable()
  bbp_make_ftps_clickable()
  bbp_make_emails_clickable()
  bbp_make_mentions_clickable()
  bbp_make_mentions_clickable_callback()
  bbp_number_not_negative()
  bbp_number_format()
  bbp_number_format_i18n()
  bbp_convert_date()
  bbp_time_since()
  bbp_get_time_since()
  bbp_format_revision_reason()

Functions
Functions that are not part of a class:

bbp_kses_allowed_tags()   X-Ref
Custom allowed tags for forum topics and replies

Allows all users to post links, quotes, code, formatting, lists, and images

since: 2.3.0 bbPress (r4603)
return: array Associative array of allowed tags and attributes

bbp_filter_kses( $data = '' )   X-Ref
Custom kses filter for forum topics and replies, for filtering incoming data

since: 2.3.0 bbPress (r4603)
param: string $data Content to filter, expected to be escaped with slashes
return: string Filtered content

bbp_kses_data( $data = '' )   X-Ref
Custom kses filter for forum topics and replies, for raw data

since: 2.3.0 bbPress (r4603)
param: string $data Content to filter, expected to not be escaped
return: string Filtered content

bbp_code_trick( $content = '' )   X-Ref
Filter the topic or reply content and output code and pre tags

since: 2.3.0 bbPress (r4641)
param: string $content Topic and reply content
return: string Partially encoded content

bbp_code_trick_reverse( $content = '' )   X-Ref
When editing a topic or reply, reverse the code trick so the textarea
contains the correct editable content.

since: 2.3.0 bbPress (r4641)
param: string $content Topic and reply content
return: string Partially encoded content

bbp_encode_bad( $content = '' )   X-Ref
Filter the content and encode any bad HTML tags

since: 2.3.0 bbPress (r4641)
param: string $content Topic and reply content
return: string Partially encoded content

bbp_encode_callback( $matches = array()   X-Ref
Callback to encode the tags in topic or reply content

since: 2.3.0 bbPress (r4641)
param: array $matches
return: string

bbp_decode_callback( $matches = array()   X-Ref
Callback to decode the tags in topic or reply content

since: 2.3.0 bbPress (r4641)
param: array $matches
return: string

bbp_encode_empty_callback( &$content = '', $key = '', $preg = '' )   X-Ref
Callback to replace empty HTML tags in a content string

since: 2.3.0 bbPress (r4641)
param: string $content
param: string $key Not used
param: string $preg

bbp_encode_normal_callback( &$content = '', $key = '', $preg = '')   X-Ref
Callback to replace normal HTML tags in a content string

since: 2.3.0 bbPress (r4641)
param: string $content
param: string $key
param: string $preg

bbp_rel_nofollow( $text = '' )   X-Ref
Catches links so rel=nofollow can be added (on output, not save)

since: 2.3.0 bbPress (r4865)
param: string $text Post text
return: string $text Text with rel=nofollow added to any links

bbp_rel_nofollow_callback( $matches = array()   X-Ref
Adds rel=nofollow to a link

since: 2.3.0 bbPress (r4865)
param: array $matches
return: string $text Link with rel=nofollow added

bbp_make_clickable( $text = '' )   X-Ref
Convert plaintext URI to HTML links.

Converts URI, www and ftp, and email addresses. Finishes by fixing links
within links.

This custom version of WordPress's make_clickable() skips links inside of
pre and code tags.

since: 2.4.0 bbPress (r4941)
param: string $text Content to convert URIs.
return: string Content with converted URIs.

bbp_make_urls_clickable( $text = '' )   X-Ref
Make URLs clickable in content areas

since: 2.6.0 bbPress (r6014)
param: string $text
return: string

bbp_make_ftps_clickable( $text = '' )   X-Ref
Make FTP clickable in content areas

since: 2.6.0 bbPress (r6014)
param: string $text
return: string

bbp_make_emails_clickable( $text = '' )   X-Ref
Make emails clickable in content areas

since: 2.6.0 bbPress (r6014)
param: string $text
return: string

bbp_make_mentions_clickable( $text = '' )   X-Ref
Make mentions clickable in content areas

since: 2.6.0 bbPress (r6014)
param: string $text
return: string

bbp_make_mentions_clickable_callback( $matches = array()   X-Ref
Callback to convert mention matches to HTML A tag.

since: 2.6.0 bbPress (r6014)
param: array $matches Regular expression matches in the current text blob.
return: string Original text if no user exists, or link to user profile.

bbp_number_not_negative( $number = 0 )   X-Ref
Never let a numeric value be less than zero.

since: 2.6.0 bbPress (r6300)
param: int $number

bbp_number_format( $number = 0, $decimals = false, $dec_point = '.', $thousands_sep = ',' )   X-Ref
A bbPress specific method of formatting numeric values

since: 2.0.0 bbPress (r2486)
param: string $number Number to format
param: string $decimals Optional. Display decimals
return: string Formatted string

bbp_number_format_i18n( $number = 0, $decimals = false )   X-Ref
A bbPress specific method of formatting numeric values

since: 2.1.0 bbPress (r3857)
param: string $number Number to format
param: string $decimals Optional. Display decimals
return: string Formatted string

bbp_convert_date( $time, $d = 'U', $translate = false )   X-Ref
Convert time supplied from database query into specified date format.

since: 2.0.0 bbPress (r2544)
param: string $time Time to convert
param: string $d Optional. Default is 'U'. Either 'G', 'U', or php date
param: bool $translate Optional. Default is false. Whether to translate the
return: string Returns timestamp

bbp_time_since( $older_date, $newer_date = false, $gmt = false )   X-Ref
Output formatted time to display human readable time difference.

since: 2.0.0 bbPress (r2544)
param: string $older_date Unix timestamp from which the difference begins.
param: string $newer_date Optional. Unix timestamp from which the
param: int $gmt Optional. Whether to use GMT timezone. Default is false.

bbp_get_time_since( $older_date, $newer_date = false, $gmt = false )   X-Ref
Return formatted time to display human readable time difference.

since: 2.0.0 bbPress (r2544)
param: string $older_date Unix timestamp from which the difference begins.
param: string $newer_date Optional. Unix timestamp from which the
param: int $gmt Optional. Whether to use GMT timezone. Default is false.
return: string Formatted time

bbp_format_revision_reason( $reason = '' )   X-Ref
Formats the reason for editing the topic/reply.

Does these things:
- Trimming
- Removing periods from the end of the string
- Trimming again

since: 2.0.0 bbPress (r2782)
param: string $reason Optional. User submitted reason for editing.
return: string Status of topic



Generated: Mon Apr 29 01:01:00 2024 Cross-referenced by PHPXref 0.7.1