WC_Embed::init()
Init embed class.
Метод класса: WC_Embed{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$result = WC_Embed::init();
Список изменений
С версии 2.4.11 | Введена. |
Код WC_Embed::init() WC Embed::init WC 9.4.2
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' ) ); }