PHP Class Twitter\WordPress\Shortcodes\EmbeddedTweetVideo

Since: 1.0.0
Inheritance: extends EmbeddedTweet
Afficher le fichier Open project: twitter/wordpress Class Usage Examples

Méthodes publiques

Свойство Type Description
$SHORTCODE_DEFAULTS Accepted shortcode attributes and their default values

Méthodes publiques

Méthode Description
getOEmbedCacheKeyCustomParameters ( array $query_parameters ) : string Generate a unique string representing oEmbed result customizations set by shortcode parameters
init ( ) : void Attach handlers for Twitter embedded video
sanitizeShortcodeParameters ( array $attributes = [] ) : array Convert shortcode parameters into a clean set of Twitter embedded video options parameters
shortcodeHandler ( array $attributes, string $content = '' ) : string Handle shortcode macro
shortcodeParamsToOEmbedParams ( string $tweet_id, array $shortcode_options = [] ) : array Convert shortcode parameters into query parameters supported by the Twitter oEmbed endpoint
shortcodeUI ( ) : void Describe shortcode for Shortcake UI

Method Details

getOEmbedCacheKeyCustomParameters() public static méthode

Generate a unique string representing oEmbed result customizations set by shortcode parameters
Since: 1.0.0
public static getOEmbedCacheKeyCustomParameters ( array $query_parameters ) : string
$query_parameters array associative array of query parameters sent to the oEmbed endpoint { @type string query parameter name @type string|bool query parameter value }
Résultat string cache key component

init() public static méthode

Attach handlers for Twitter embedded video
Since: 1.0.0
public static init ( ) : void
Résultat void

sanitizeShortcodeParameters() public static méthode

Convert shortcode parameters into a clean set of Twitter embedded video options parameters
Since: 1.0.0
public static sanitizeShortcodeParameters ( array $attributes = [] ) : array
$attributes array set of shortcode attribute-value pairs matching the WordPress shortcode regex { @type string attribute name @type mixed shortcode value }
Résultat array cleaned up options ready for comparison { @type string option name @type string|bool option value }

shortcodeHandler() public static méthode

Handle shortcode macro
Since: 1.0.0
public static shortcodeHandler ( array $attributes, string $content = '' ) : string
$attributes array shortcode attributes
$content string shortcode content. no effect
Résultat string HTML markup

shortcodeParamsToOEmbedParams() public static méthode

Convert shortcode parameters into query parameters supported by the Twitter oEmbed endpoint
Since: 1.0.0
public static shortcodeParamsToOEmbedParams ( string $tweet_id, array $shortcode_options = [] ) : array
$tweet_id string Tweet identifier
$shortcode_options array customizations specified in the shortcode
Résultat array associative array of query parameters ready for http_build_query

shortcodeUI() public static méthode

Describe shortcode for Shortcake UI
Since: 1.1.0
public static shortcodeUI ( ) : void
Résultat void

Property Details

$SHORTCODE_DEFAULTS public_oe static_oe property

Accepted shortcode attributes and their default values
Since: 1.0.0
public static $SHORTCODE_DEFAULTS