PHP Class WPDKPostPlaceholders

See thirth part extensions like Users Manager.
Since: 1.5.6
Author: =undo= ([email protected])
Datei anzeigen Open project: wpxtreme/wpdk

Public Methods

Method Description
__construct ( ) : WPDKPostPlaceholders Create an instance of WPDKPostPlaceholders class
add_meta_boxes ( string $post_type, WP_Post $post ) Fires after all built-in meta boxes have been added.
init ( ) : WPDKPostPlaceholders Return a singleton instance of WPDKPostPlaceholders class
wpdk_post_placeholders ( array $placeholders ) Filter the list of registered placeholder.
wpdk_post_placeholders_content ( string $content, integer $user_id = false, array $replace_pairs = [], array $args = [] ) Filter the content with standard placeholder.
wpdk_post_placeholders_replace ( $array = [], integer $user_id = false ) : array Filter the key value pairs array with placeholder and value.

Method Details

__construct() public method

Create an instance of WPDKPostPlaceholders class
public __construct ( ) : WPDKPostPlaceholders
return WPDKPostPlaceholders

add_meta_boxes() public method

Fires after all built-in meta boxes have been added.
Since: 3.0.0
public add_meta_boxes ( string $post_type, WP_Post $post )
$post_type string Post type.
$post WP_Post Post object.

init() public static method

Return a singleton instance of WPDKPostPlaceholders class
public static init ( ) : WPDKPostPlaceholders
return WPDKPostPlaceholders

wpdk_post_placeholders() public method

Filter the list of registered placeholder.
public wpdk_post_placeholders ( array $placeholders )
$placeholders array An array key value pairs with the list of registered placeholders.

wpdk_post_placeholders_content() public method

Filter the content with standard placeholder.
public wpdk_post_placeholders_content ( string $content, integer $user_id = false, array $replace_pairs = [], array $args = [] )
$content string The content.
$user_id integer Optional. User id or null for current user.
$replace_pairs array Optional. It's an array in the form array( 'from' => 'to', ...).
$args array Optional. Mixed extra params.

wpdk_post_placeholders_replace() public method

Filter the key value pairs array with placeholder and value.
public wpdk_post_placeholders_replace ( $array = [], integer $user_id = false ) : array
$user_id integer Optional. User id or FALSE for current user logged in. This param could be set to -1, in this case the original to email is an external address: no WordPress user.
return array