); // This is needed as it's not supported in oEmbed discovery wp_oembed_add_provider( '|^https?://v\.wordpress\.com/([a-zA-Z\d]{8})(.+)?$|i', 'https://public-api.wordpress.com/oembed/?for=' . $host, true ); // phpcs:ignore WordPress.WP.CapitalPDangit.MisspelledInText add_filter( 'embed_oembed_html', array( __CLASS__, 'video_enqueue_bridge_when_oembed_present' ), 10, 4 ); } /** * Enqueues VideoPress token bridge when a VideoPress oembed is present on the current page. * * @param string|false $cache The cached HTML result, stored in post meta. * @param string $url The attempted embed URL. * @param array $attr An array of shortcode attributes. * @param int $post_ID Post ID. * * @return string|false */ public static function video_enqueue_bridge_when_oembed_present( $cache, $url, $attr, $post_ID = null ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable if ( Utils::is_videopress_url( $url ) ) { Jwt_Token_Bridge::enqueue_jwt_token_bridge(); } return $cache; } /** * Register all VideoPress blocks * * @return void */ public static function register_videopress_blocks() { // Register VideoPress Video block. self::register_videopress_video_block(); } /** * VideoPress video block render method * * @param array $block_attributes - Block attributes. * @param string $content - Current block markup. * @param WP_Block $block - Current block. * * @return string Block markup. */ public static function render_videopress_video_block( $block_attributes, $content, $block ) { global $wp_embed; // CSS classes $align = isset( $block_attributes['align'] ) ? $block_attributes['align'] : null; $align_class = $align ? ' align' . $align : ''; $custom_class = isset( $block_attributes['className'] ) ? ' ' . $block_attributes['className'] : ''; $classes = 'wp-block-jetpack-videopress jetpack-videopress-player' . $custom_class . $align_class; // Inline style $style = ''; $max_width = isset( $block_attributes['maxWidth'] ) ? $block_attributes['maxWidth'] : null; if ( $max_width && $max_width !== '100%' ) { $style = sprintf( 'max-width: %s;', $max_width ); $classes .= ' wp-block-jetpack-videopress--has-max-width'; } /* *
element * Caption is stored into the block attributes, * but also it was stored into the
element, * meaning that it could be stored in two different places. */ $figcaption = ''; // Caption from block attributes $caption = isset( $block_attributes['caption'] ) ? $block_attributes['caption'] : null; /* * If the caption is not stored into the block attributes, * try to get it from the
element. */ if ( $caption === null ) { preg_match( '/
(.*?)<\/figcaption>/', $content, $matches ); $caption = isset( $matches[1] ) ? $matches[1] : null; } // If we have a caption, create the
element. if ( $caption !== null ) { $figcaption = sprintf( '
%s
', wp_kses_post( $caption ) ); } // Custom anchor from block content $id_attribute = ''; // Try to get the custom anchor from the block attributes. if ( isset( $block_attributes['anchor'] ) && $block_attributes['anchor'] ) { $id_attribute = sprintf( 'id="%s"', esc_attr( $block_attributes['anchor'] ) ); } elseif ( preg_match( '/]*id="([^"]+)"/', $content, $matches ) ) { // Othwerwise, try to get the custom anchor from the
element. $id_attribute = sprintf( 'id="%s"', $matches[1] ); } // Preview On Hover data $is_poh_enabled = isset( $block_attributes['posterData']['previewOnHover'] ) && $block_attributes['posterData']['previewOnHover']; $autoplay = isset( $block_attributes['autoplay'] ) ? $block_attributes['autoplay'] : false; $controls = isset( $block_attributes['controls'] ) ? $block_attributes['controls'] : false; $poster = isset( $block_attributes['posterData']['url'] ) ? $block_attributes['posterData']['url'] : null; $preview_on_hover = ''; if ( $is_poh_enabled ) { $preview_on_hover = array( 'previewAtTime' => $block_attributes['posterData']['previewAtTime'], 'previewLoopDuration' => $block_attributes['posterData']['previewLoopDuration'], 'autoplay' => $autoplay, 'showControls' => $controls, ); // Create inlione style in case video has a custom poster. $inline_style = ''; if ( $poster ) { $inline_style = sprintf( 'style="background-image: url(%s); background-size: cover; background-position: center center;"', esc_attr( $poster ) ); } // Expose the preview on hover data to the client. $preview_on_hover = sprintf( '
', $inline_style, wp_json_encode( $preview_on_hover, JSON_UNESCAPED_SLASHES | JSON_HEX_TAG | JSON_HEX_AMP ) ); // Set `autoplay` and `muted` attributes to the video element. $block_attributes['autoplay'] = true; $block_attributes['muted'] = true; } $figure_template = '
%4$s %5$s %6$s
'; // VideoPress URL $guid = isset( $block_attributes['guid'] ) ? $block_attributes['guid'] : null; $videopress_url = Utils::get_video_press_url( $guid, $block_attributes ); $video_wrapper = ''; $video_wrapper_classes = 'jetpack-videopress-player__wrapper'; if ( $videopress_url ) { $videopress_url = wp_kses_post( $videopress_url ); $oembed_html = apply_filters( 'video_embed_html', $wp_embed->shortcode( array(), $videopress_url ) ); $video_wrapper = sprintf( '
%s %s
', $video_wrapper_classes, $preview_on_hover, $oembed_html ); } // Get premium content from block context $premium_block_plan_id = isset( $block->context['premium-content/planId'] ) ? intval( $block->context['premium-content/planId'] ) : 0; $is_premium_content_child = isset( $block->context['isPremiumContentChild'] ) ? (bool) $block->context['isPremiumContentChild'] : false; $maybe_premium_script = ''; if ( $is_premium_content_child ) { Access_Control::instance()->set_guid_subscription( $guid, $premium_block_plan_id ); $escaped_guid = wp_json_encode( $guid, JSON_UNESCAPED_SLASHES | JSON_HEX_TAG | JSON_HEX_AMP ); $script_content = "if ( ! window.__guidsToPlanIds ) { window.__guidsToPlanIds = {}; }; window.__guidsToPlanIds[$escaped_guid] = $premium_block_plan_id;"; $maybe_premium_script = ''; } // $id_attribute, $video_wrapper, $figcaption properly escaped earlier on the code return sprintf( $figure_template, esc_attr( $classes ), esc_attr( $style ), $id_attribute, $video_wrapper, $figcaption, $maybe_premium_script ); } /** * Register the VideoPress block editor block, * AKA "VideoPress Block v6". * * @return void */ public static function register_videopress_video_block() { /* * If only Jetpack is active, and if the VideoPress module is not active, * we can register the block just to display a placeholder to turn on the module. * That invitation is only useful for admins though. */ if ( Status::is_jetpack_plugin_without_videopress_module_active() && ! Status::is_standalone_plugin_active() && ! current_user_can( 'jetpack_activate_modules' ) ) { return; } $videopress_video_metadata_file = __DIR__ . '/../build/block-editor/blocks/video/block.json'; $videopress_video_metadata_file_exists = file_exists( $videopress_video_metadata_file ); if ( ! $videopress_video_metadata_file_exists ) { return; } $videopress_video_metadata = json_decode( // phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents file_get_contents( $videopress_video_metadata_file ) ); // Pick the block name straight from the block metadata .json file. $videopress_video_block_name = $videopress_video_metadata->name; // Is the block already registered? $is_block_registered = \WP_Block_Type_Registry::get_instance()->is_registered( $videopress_video_block_name ); // Do not register if the block is already registered. if ( $is_block_registered ) { return; } $registration = register_block_type( $videopress_video_metadata_file, array( 'render_callback' => array( __CLASS__, 'render_videopress_video_block' ), 'uses_context' => array( 'premium-content/planId', 'isPremiumContentChild', 'selectedPlanId' ), ) ); // Do not enqueue scripts if the block could not be registered. if ( empty( $registration ) || empty( $registration->editor_script_handles ) ) { return; } // Extensions use Connection_Initial_State::render_script with script handle as parameter. if ( is_array( $registration->editor_script_handles ) ) { $script_handle = $registration->editor_script_handles[0]; } else { $script_handle = $registration->editor_script_handles; } // Register and enqueue scripts used by the VideoPress video block. Block_Editor_Extensions::init( $script_handle ); } /** * Enqueue the VideoPress Iframe API script * when the URL of oEmbed HTML is a VideoPress URL. * * @param string|false $cache The cached HTML result, stored in post meta. * @param string $url The attempted embed URL. * @param array $attr An array of shortcode attributes. * @param int $post_ID Post ID. * * @return string|false */ public static function enqueue_videopress_iframe_api_script( $cache, $url, $attr, $post_ID ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable if ( Utils::is_videopress_url( $url ) ) { // Enqueue the VideoPress IFrame API in the front-end. wp_enqueue_script( self::JETPACK_VIDEOPRESS_IFRAME_API_HANDLER, 'https://s0.wp.com/wp-content/plugins/video/assets/js/videojs/videopress-iframe-api.js', array(), gmdate( 'YW' ), false ); } return $cache; } } ); // This is needed as it's not supported in oEmbed discovery wp_oembed_add_provider( '|^https?://v\.wordpress\.com/([a-zA-Z\d]{8})(.+)?$|i', 'https://public-api.wordpress.com/oembed/?for=' . $host, true ); // phpcs:ignore WordPress.WP.CapitalPDangit.MisspelledInText add_filter( 'embed_oembed_html', array( __CLASS__, 'video_enqueue_bridge_when_oembed_present' ), 10, 4 ); } /** * Enqueues VideoPress token bridge when a VideoPress oembed is present on the current page. * * @param string|false $cache The cached HTML result, stored in post meta. * @param string $url The attempted embed URL. * @param array $attr An array of shortcode attributes. * @param int $post_ID Post ID. * * @return string|false */ public static function video_enqueue_bridge_when_oembed_present( $cache, $url, $attr, $post_ID = null ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable if ( Utils::is_videopress_url( $url ) ) { Jwt_Token_Bridge::enqueue_jwt_token_bridge(); } return $cache; } /** * Register all VideoPress blocks * * @return void */ public static function register_videopress_blocks() { // Register VideoPress Video block. self::register_videopress_video_block(); } /** * VideoPress video block render method * * @param array $block_attributes - Block attributes. * @param string $content - Current block markup. * @param WP_Block $block - Current block. * * @return string Block markup. */ public static function render_videopress_video_block( $block_attributes, $content, $block ) { global $wp_embed; // CSS classes $align = isset( $block_attributes['align'] ) ? $block_attributes['align'] : null; $align_class = $align ? ' align' . $align : ''; $custom_class = isset( $block_attributes['className'] ) ? ' ' . $block_attributes['className'] : ''; $classes = 'wp-block-jetpack-videopress jetpack-videopress-player' . $custom_class . $align_class; // Inline style $style = ''; $max_width = isset( $block_attributes['maxWidth'] ) ? $block_attributes['maxWidth'] : null; if ( $max_width && $max_width !== '100%' ) { $style = sprintf( 'max-width: %s;', $max_width ); $classes .= ' wp-block-jetpack-videopress--has-max-width'; } /* *
element * Caption is stored into the block attributes, * but also it was stored into the
element, * meaning that it could be stored in two different places. */ $figcaption = ''; // Caption from block attributes $caption = isset( $block_attributes['caption'] ) ? $block_attributes['caption'] : null; /* * If the caption is not stored into the block attributes, * try to get it from the
element. */ if ( $caption === null ) { preg_match( '/
(.*?)<\/figcaption>/', $content, $matches ); $caption = isset( $matches[1] ) ? $matches[1] : null; } // If we have a caption, create the
element. if ( $caption !== null ) { $figcaption = sprintf( '
%s
', wp_kses_post( $caption ) ); } // Custom anchor from block content $id_attribute = ''; // Try to get the custom anchor from the block attributes. if ( isset( $block_attributes['anchor'] ) && $block_attributes['anchor'] ) { $id_attribute = sprintf( 'id="%s"', esc_attr( $block_attributes['anchor'] ) ); } elseif ( preg_match( '/]*id="([^"]+)"/', $content, $matches ) ) { // Othwerwise, try to get the custom anchor from the
element. $id_attribute = sprintf( 'id="%s"', $matches[1] ); } // Preview On Hover data $is_poh_enabled = isset( $block_attributes['posterData']['previewOnHover'] ) && $block_attributes['posterData']['previewOnHover']; $autoplay = isset( $block_attributes['autoplay'] ) ? $block_attributes['autoplay'] : false; $controls = isset( $block_attributes['controls'] ) ? $block_attributes['controls'] : false; $poster = isset( $block_attributes['posterData']['url'] ) ? $block_attributes['posterData']['url'] : null; $preview_on_hover = ''; if ( $is_poh_enabled ) { $preview_on_hover = array( 'previewAtTime' => $block_attributes['posterData']['previewAtTime'], 'previewLoopDuration' => $block_attributes['posterData']['previewLoopDuration'], 'autoplay' => $autoplay, 'showControls' => $controls, ); // Create inlione style in case video has a custom poster. $inline_style = ''; if ( $poster ) { $inline_style = sprintf( 'style="background-image: url(%s); background-size: cover; background-position: center center;"', esc_attr( $poster ) ); } // Expose the preview on hover data to the client. $preview_on_hover = sprintf( '
', $inline_style, wp_json_encode( $preview_on_hover, JSON_UNESCAPED_SLASHES | JSON_HEX_TAG | JSON_HEX_AMP ) ); // Set `autoplay` and `muted` attributes to the video element. $block_attributes['autoplay'] = true; $block_attributes['muted'] = true; } $figure_template = '
%4$s %5$s %6$s
'; // VideoPress URL $guid = isset( $block_attributes['guid'] ) ? $block_attributes['guid'] : null; $videopress_url = Utils::get_video_press_url( $guid, $block_attributes ); $video_wrapper = ''; $video_wrapper_classes = 'jetpack-videopress-player__wrapper'; if ( $videopress_url ) { $videopress_url = wp_kses_post( $videopress_url ); $oembed_html = apply_filters( 'video_embed_html', $wp_embed->shortcode( array(), $videopress_url ) ); $video_wrapper = sprintf( '
%s %s
', $video_wrapper_classes, $preview_on_hover, $oembed_html ); } // Get premium content from block context $premium_block_plan_id = isset( $block->context['premium-content/planId'] ) ? intval( $block->context['premium-content/planId'] ) : 0; $is_premium_content_child = isset( $block->context['isPremiumContentChild'] ) ? (bool) $block->context['isPremiumContentChild'] : false; $maybe_premium_script = ''; if ( $is_premium_content_child ) { Access_Control::instance()->set_guid_subscription( $guid, $premium_block_plan_id ); $escaped_guid = wp_json_encode( $guid, JSON_UNESCAPED_SLASHES | JSON_HEX_TAG | JSON_HEX_AMP ); $script_content = "if ( ! window.__guidsToPlanIds ) { window.__guidsToPlanIds = {}; }; window.__guidsToPlanIds[$escaped_guid] = $premium_block_plan_id;"; $maybe_premium_script = ''; } // $id_attribute, $video_wrapper, $figcaption properly escaped earlier on the code return sprintf( $figure_template, esc_attr( $classes ), esc_attr( $style ), $id_attribute, $video_wrapper, $figcaption, $maybe_premium_script ); } /** * Register the VideoPress block editor block, * AKA "VideoPress Block v6". * * @return void */ public static function register_videopress_video_block() { /* * If only Jetpack is active, and if the VideoPress module is not active, * we can register the block just to display a placeholder to turn on the module. * That invitation is only useful for admins though. */ if ( Status::is_jetpack_plugin_without_videopress_module_active() && ! Status::is_standalone_plugin_active() && ! current_user_can( 'jetpack_activate_modules' ) ) { return; } $videopress_video_metadata_file = __DIR__ . '/../build/block-editor/blocks/video/block.json'; $videopress_video_metadata_file_exists = file_exists( $videopress_video_metadata_file ); if ( ! $videopress_video_metadata_file_exists ) { return; } $videopress_video_metadata = json_decode( // phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents file_get_contents( $videopress_video_metadata_file ) ); // Pick the block name straight from the block metadata .json file. $videopress_video_block_name = $videopress_video_metadata->name; // Is the block already registered? $is_block_registered = \WP_Block_Type_Registry::get_instance()->is_registered( $videopress_video_block_name ); // Do not register if the block is already registered. if ( $is_block_registered ) { return; } $registration = register_block_type( $videopress_video_metadata_file, array( 'render_callback' => array( __CLASS__, 'render_videopress_video_block' ), 'uses_context' => array( 'premium-content/planId', 'isPremiumContentChild', 'selectedPlanId' ), ) ); // Do not enqueue scripts if the block could not be registered. if ( empty( $registration ) || empty( $registration->editor_script_handles ) ) { return; } // Extensions use Connection_Initial_State::render_script with script handle as parameter. if ( is_array( $registration->editor_script_handles ) ) { $script_handle = $registration->editor_script_handles[0]; } else { $script_handle = $registration->editor_script_handles; } // Register and enqueue scripts used by the VideoPress video block. Block_Editor_Extensions::init( $script_handle ); } /** * Enqueue the VideoPress Iframe API script * when the URL of oEmbed HTML is a VideoPress URL. * * @param string|false $cache The cached HTML result, stored in post meta. * @param string $url The attempted embed URL. * @param array $attr An array of shortcode attributes. * @param int $post_ID Post ID. * * @return string|false */ public static function enqueue_videopress_iframe_api_script( $cache, $url, $attr, $post_ID ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable if ( Utils::is_videopress_url( $url ) ) { // Enqueue the VideoPress IFrame API in the front-end. wp_enqueue_script( self::JETPACK_VIDEOPRESS_IFRAME_API_HANDLER, 'https://s0.wp.com/wp-content/plugins/video/assets/js/videojs/videopress-iframe-api.js', array(), gmdate( 'YW' ), false ); } return $cache; } } A peine suspendues, les droits de douane de Trump maintenus temporairement en appel – Sen Humanité

A peine suspendues, les droits de douane de Trump maintenus temporairement en appel

Moins de 24 heures après avoir été bloqués en première instance, les droits de douane de Donald Trump ont été maintenus temporairement jeudi par une Cour d’appel aux Etats-Unis, le temps pour elle de se prononcer sur le fond.

Mercredi, le tribunal de commerce international des États-Unis (ITC) avait estimé que M. Trump avait outrepassé ses pouvoirs en imposant des surtaxes non ciblées, alors qu’il s’agit d’une prérogative du Congrès.

Sa décision bloquait dès lors tant les droits de douane imposés au Canada, au Mexique et à la Chine que les droits de douane « réciproques » imposés début avril à l’égard de plusieurs pays.

Une décision qui avait fustigée la Maison Blanche mais qui avait été appréciée par les principaux partenaires commerciaux des Etats-Unis, la Chine appelant même à « annuler totalement » ces surtaxes.

Le gouvernement avait déposé dans la foulée une requête, consultée par l’AFP, annonçant être prêt à se tourner vers la Cour suprême pour obtenir dès vendredi cette suspension temporaire.

Mais une Cour d’appel a accédé à la demande du gouvernement, précisant aussi son intention de joindre les deux procédures, initiées d’un côté par des petites entreprises et de l’autre par une coalition d’États américains.

« Nous sommes très satisfaits de cette décision, nous l’attendions », s’est félicité Kevin Hassett, le principal conseiller économique de Donald Trump, sur Fox News, « ils comprennent que nous devons rendre sa grandeur à l’Amérique grâce à des accords commerciaux équitables », en référence au célèbre slogan du président.

– « Inconstitutionnelle » –

Après la décision en première instance, la Chine avait pressé les Etats-Unis d' »annuler totalement les droits de douane unilatéraux injustifiés », après la décision de l’ITC, par la voix d’une porte-parole du ministère du Commerce.

Le Premier ministre canadien avait de son côté salué la suspension de ces droits de douane « illégaux et injustifiés » selon lui.

Mais « nous estimons que notre relation commerciale avec les Etats-Unis est toujours gravement menacée » par les droits de douane toujours appliqués sur l’acier et l’aluminium ou le secteur automobile, at-il ajouté devant le Parlement, disant espérer « renforcer la collaboration avec des partenaires commerciaux fiables et des alliés partout dans le monde ».

Dans le détail, les juges de première instance considéraient que le président ne pouvait invoquer la loi d’urgence économique de 1977 (IEEPA) pour instituer par décret « une surtaxe illimitée sur les produits provenant de quasiment tous les pays », selon la décision que l’AFP a pu consulter.

Pour ces magistrats, les décrets adoptés « outrepassent les pouvoirs accordés au président », ce texte lui permettant seulement « de prendre les sanctions économiques nécessaires en cas d’urgence pour combattre une menace +extraordinaire et inhabituelle+ ».

Toute interprétation qui lui délègue « une autorité illimitée sur les droits de douane est inconstitutionnelle », avait insisté les juges.

– « Renonciation » –

Dans une opinion écrite accompagnant la décision, l’un des juges avait estimé que cela « constituerait un renoncement au pouvoir législatif au bénéfice d’une autre branche du gouvernement », ce qui est contraire à la Constitution américaine.

Le tribunal se prononçait à la suite de deux plaintes, déposées l’une par une alliance de douze Etats américains dont l’Arizona, l’Oregon, New York et le Minnesota, l’autre par un groupe d’entreprises américaines, qui reprochaient à Donald Trump de s’arroger des pouvoirs appartenant au Congrès.

Le 2 avril, le président Trump avait annoncé des droits de douane dits « réciproques », censés concerner l’ensemble des pays dans le monde, avant de reculer face à la chute des marchés financiers, accordant une pause de 90 jours – tout en maintenant une surtaxe plancher de 10% -, afin d’ouvrir la porte à des négociations commerciales.

Après un bras de fer et une escalade des surtaxes colossales de part et d’autre, Pékin et Washington se sont finalement entendus mi-mai sur un retour à 10% sur les produits américains et 30% sur les produits chinois.

 

Malgré cette accalmie, la porte-parole du ministère chinois du Commerce a encore dénoncé jeudi un protectionnisme américain « qui ne profite à personne ».

0 0 votes
Évaluation de l'article
guest

0 Commentaires
Le plus ancien
Le plus récent Le plus populaire
Commentaires en ligne
Afficher tous les commentaires

Partager sur:

Articles récents

IMG-20260204-WA0107
ebasketsenegal-850x491-2
IMG-20260202-WA0164
IMG-20260203-WA0161
20250607_235926
1b9efa_c7d9188c5d1e44c6a1fde2ea424e36c2mv2
Lycee-Djignabo
Mouhamad Al Amine Lo ministre chargé du suivi, de l'évaluation des projets
Découvrir

Dans la même rubrique

IMG-20260204-WA0107
Démantèlement d’un réseau de fraude au sein d'une représentation diplomatique : le Commissariat du Plateau frappe fort
En savoir +
ebasketsenegal-850x491-2
Éliminatoires Coupe du Monde FIBA Qatar 2027: Dakar abritera la fenêtre qualificative en fin février
En savoir +
IMG-20260202-WA0164
Abattage clandestin: la police interpellé un individu à Liberté VI
En savoir +
IMG-20260203-WA0161
Le Premier ministre visite la police nationale
En savoir +

Les plus lus

20250607_235926
1b9efa_c7d9188c5d1e44c6a1fde2ea424e36c2mv2
Lycee-Djignabo
Mouhamad Al Amine Lo ministre chargé du suivi, de l'évaluation des projets
Sen Humanité - L'information humanitaire et des droits humains au quotidien - Tous droits réservés.
0
Nous aimerions avoir votre avis, veuillez laisser un commentaire.x