WC_Embed::init()public staticWC 2.4.11

Init embed class.

{} Это метод класса: WC_Embed{}

Хуков нет.

Возвращает

null. Ничего.

Использование

$result = WC_Embed::init();

Список изменений

С версии 2.4.11 Введена.

Код WC_Embed::init() WC 6.4.1

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' ) );
}