PHP Class Twitter\WordPress\Shortcodes\TweetGrid

Since: 1.3.0
Inheritance: implements Twitter\WordPress\Shortcodes\ShortcodeInterface, use trait Twitter\WordPress\Shortcodes\OEmbedTrait
Exibir arquivo Open project: twitter/wordpress

Public Properties

Property Type Description
$SHORTCODE_DEFAULTS Accepted shortcode attributes and their default values

Public Methods

Method Description
featureName ( ) : string Reference the feature by name
init ( ) : void Attach handlers for Twitter Grid
linkHandler ( array $matches, array $attr, string $url, array $rawattr ) : string Handle a URL matched by a embed handler
oEmbedCacheKey ( array $query_parameters ) : string Construct a cache key for the oEmbed response. Account for query parameters needing to bust cache
shortcodeHandler ( array $attributes, string $content = '' ) : string Handle shortcode macro
shortcodeUI ( ) : void Describe shortcode for Shortcake UI

Method Details

featureName() public static method

Reference the feature by name
Since: 1.3.0
public static featureName ( ) : string
return string translated feature name

init() public static method

Attach handlers for Twitter Grid
Since: 1.3.0
public static init ( ) : void
return void

linkHandler() public static method

Handle a URL matched by a embed handler
Since: 1.3.0
public static linkHandler ( array $matches, array $attr, string $url, array $rawattr ) : string
$matches array The regex matches from the provided regex when calling {@link wp_embed_register_handler()}.
$attr array Embed attributes. Not used.
$url string The original URL that was matched by the regex. Not used.
$rawattr array The original unmodified attributes. Not used.
return string HTML markup for the Tweet grid or an empty string if requirements not met

oEmbedCacheKey() public static method

Construct a cache key for the oEmbed response. Account for query parameters needing to bust cache
Since: 1.3.0
public static oEmbedCacheKey ( array $query_parameters ) : string
$query_parameters array oEmbed API query parameters
return string cache key

shortcodeHandler() public static method

Handle shortcode macro
Since: 1.3.0
public static shortcodeHandler ( array $attributes, string $content = '' ) : string
$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 }
$content string content inside a shortcode macro. no effect on this shortcode
return string HTML markup. empty string if parameter requirement not met or no collection info found

shortcodeUI() public static method

Describe shortcode for Shortcake UI
Since: 1.3.0
public static shortcodeUI ( ) : void
return void

Property Details

$SHORTCODE_DEFAULTS public_oe static_oe property

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