Property | Type | Description | |
---|---|---|---|
$SHORTCODE_DEFAULTS | Accepted shortcode attributes and their default values |
Method | Description | |
---|---|---|
getPostMeta ( ) : array | Get any Tweet values stored for an individual post | |
init ( ) : void | Attach handlers for Tweet button | |
sanitizeShortcodeParameters ( array $attributes = [] ) : array | Convert shortcode parameters, attributes, and defaults into a clean set of Tweet parameters | |
shortcodeHandler ( array $attributes, string $content = null ) : string | Handle shortcode macro | |
shortcodeUI ( ) : void | Describe shortcode for Shortcake UI |
Method | Description | |
---|---|---|
addPostData ( array $options, WP_Post $post ) : array | Add explicit Tweet button data related to the post and its author | |
addPostMetaOptions ( array $options ) : array | Add post meta values to a Tweet button options array |
protected static addPostData ( array $options, WP_Post $post ) : array | ||
$options | array | Tweet button options { @type string option name @type string|bool option value } |
$post | WP_Post | post of interest |
return | array | Tweet button options with possible additions based on post data { @type string option name @type string|bool option value } |
protected static addPostMetaOptions ( array $options ) : array | ||
$options | array | Tweet button options array { @type string option name @type string|array option value } |
return | array | Tweet button options array { @type string option name @type string|array option value } |
public static getPostMeta ( ) : array | ||
return | array | post meta Tweet values or empty array if no values stored |
public static sanitizeShortcodeParameters ( array $attributes = [] ) : array | ||
$attributes | array | set of shortcode attribute-value pairs or positional content matching the WordPress shortcode regex { @type string|int attribute name or positional int @type mixed shortcode value } |
return | array | cleaned up options ready for comparison { @type string option name @type string|bool option value } |
public static shortcodeUI ( ) : void | ||
return | void |