[ 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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

param: string $text Post text
since: 2.3.0 bbPress (r4865)
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

param: array $matches
since: 2.3.0 bbPress (r4865)
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.

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

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

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

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

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

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

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

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

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

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

param: array $matches Regular expression matches in the current text blob.
since: 2.6.0 bbPress (r6014)
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.

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

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

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

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

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

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

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
since: 2.0.0 bbPress (r2544)
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.

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.
since: 2.0.0 bbPress (r2544)

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

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.
since: 2.0.0 bbPress (r2544)
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

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



Generated: Sat Dec 14 01:00:50 2024 Cross-referenced by PHPXref 0.7.1