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. |
public __construct ( ) : WPDKPostPlaceholders | ||
return | WPDKPostPlaceholders |
public add_meta_boxes ( string $post_type, WP_Post $post ) | ||
$post_type | string | Post type. |
$post | WP_Post | Post object. |
public static init ( ) : WPDKPostPlaceholders | ||
return | WPDKPostPlaceholders |
public wpdk_post_placeholders ( array $placeholders ) | ||
$placeholders | array | An array key value pairs with the list of registered placeholders. |
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. |
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 |