required assets. * * @return void */ public function enqueue_assets() { $user_id = $this->user_helper->get_current_user_id(); \wp_enqueue_script( 'wp-seo-premium-ai-generator' ); \wp_localize_script( 'wp-seo-premium-ai-generator', 'wpseoPremiumAiGenerator', [ 'adminUrl' => \admin_url( 'admin.php' ), 'hasConsent' => $this->user_helper->get_meta( $user_id, '_yoast_wpseo_ai_consent', true ), 'productSubscriptions' => $this->get_product_subscriptions(), 'hasSeenIntroduction' => $this->introductions_seen_repository->is_introduction_seen( $user_id, Ai_Fix_Assessments_Introduction::ID ), 'pluginUrl' => \plugins_url( '', \WPSEO_PREMIUM_FILE ), 'postType' => $this->get_post_type(), 'contentType' => $this->get_content_type(), 'requestTimeout' => $this->ai_generator_helper->get_request_timeout(), ] ); $this->asset_manager->enqueue_style( 'premium-ai-generator' ); } /** * Returns the post type of the currently edited object. * In case this object is a term, returns the taxonomy. * * @return string */ private function get_post_type() { // The order of checking is important here: terms have an empty post_type parameter in their GET request. $taxonomy = $this->current_page_helper->get_current_taxonomy(); if ( $taxonomy !== '' ) { return $taxonomy; } $post_type = $this->current_page_helper->get_current_post_type(); if ( $post_type ) { return $post_type; } return ''; } /** * Returns the content type (i.e., 'post' or 'term') of the currently edited object. * * @return string */ private function get_content_type() { $taxonomy = $this->current_page_helper->get_current_taxonomy(); if ( $taxonomy !== '' ) { return 'term'; } $post_type = $this->current_page_helper->get_current_post_type(); if ( $post_type ) { return 'post'; } return ''; } } Archives des Sac - Bagagerie - Amzi Group
Filtrer
Affichage de 16 sur 23 produits