WC_Embed::init()
Init embed class.
Description Description
Source Source
File: includes/class-wc-embed.php
public static function init() { // Filter all of the content that's going to be embedded. add_filter( 'the_excerpt_embed', array( __CLASS__, 'the_excerpt' ), 10 ); // Make sure no comments display. Doesn't make sense for products. add_action( 'embed_content_meta', array( __CLASS__, 'remove_comments_button' ), 5 ); // In the comments place let's display the product rating. add_action( 'embed_content_meta', array( __CLASS__, 'get_ratings' ), 5 ); // Add some basic styles. add_action( 'embed_head', array( __CLASS__, 'print_embed_styles' ) ); }
Changelog Changelog
Version | Description |
---|---|
2.4.11 | Introduced. |