WP_Styles::__construct()publicWP 2.6.0

Constructor.

Метод класса: WP_Styles{}

Хуки из метода

Возвращает

null. Ничего (null).

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

global $wp_styles;
$wp_styles->__construct();

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

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

Код WP_Styles::__construct() WP 6.5.2

public function __construct() {
	if (
		function_exists( 'is_admin' ) && ! is_admin()
	&&
		function_exists( 'current_theme_supports' ) && ! current_theme_supports( 'html5', 'style' )
	) {
		$this->type_attr = " type='text/css'";
	}

	/**
	 * Fires when the WP_Styles instance is initialized.
	 *
	 * @since 2.6.0
	 *
	 * @param WP_Styles $wp_styles WP_Styles instance (passed by reference).
	 */
	do_action_ref_array( 'wp_default_styles', array( &$this ) );
}