[ Index ]

PHP Cross Reference of BBPress

title

Body

[close]

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

bbPress Formatting

File Size: 761 lines (23 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

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

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

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

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

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

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

return: string Partially encoded content
since: 2.3.0 bbPress (r4641)
param: string $content Topic and reply 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.

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

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

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

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

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

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

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

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)

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

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

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

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.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

return: string Returns timestamp
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

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.

return: string Formatted time
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_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

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



Generated: Sat Sep 21 01:01:35 2019 Cross-referenced by PHPXref 0.7.1