Yoast\WP\SEO\Introductions\User_Interface
Introductions_Integration::enqueue_assets()
Enqueue the new features assets.
Метод класса: Introductions_Integration{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$Introductions_Integration = new Introductions_Integration(); $Introductions_Integration->enqueue_assets();
Код Introductions_Integration::enqueue_assets() Introductions Integration::enqueue assets Yoast 24.3
public function enqueue_assets() { $user_id = $this->user_helper->get_current_user_id(); $introductions = $this->introductions_collector->get_for( $user_id ); if ( ! $introductions ) { // Bail when there are no introductions to show. return; } // Update user meta to have "seen" these introductions. $this->update_user_introductions( $user_id, $introductions ); $this->admin_asset_manager->enqueue_script( self::SCRIPT_HANDLE ); $this->admin_asset_manager->localize_script( self::SCRIPT_HANDLE, 'wpseoIntroductions', [ 'introductions' => $introductions, 'isPremium' => $this->product_helper->is_premium(), 'isRtl' => \is_rtl(), 'linkParams' => $this->short_link_helper->get_query_params(), 'pluginUrl' => \plugins_url( '', \WPSEO_FILE ), 'wistiaEmbedPermission' => $this->wistia_embed_permission_repository->get_value_for_user( $user_id ), ] ); $this->admin_asset_manager->enqueue_style( 'introductions' ); }