/* 
Theme Name: Hello Elementor Child
Theme URI: https://github.com/elementor/hello-theme/
Description: Hello Elementor Child is a child theme of Hello Elementor, created by Elementor team
Author: Elementor Team
Author URI: https://elementor.com/
Template: hello-elementor
Version: 1.0.1
Text Domain: hello-elementor-child
License: GNU General Public License v3 or later.
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Tags: flexible-header, custom-colors, custom-menu, custom-logo, editor-style, featured-images, rtl-language-support, threaded-comments, translation-ready
*/


.puces-bleues ::marker {color:#0078b0;}

<?php
/**
 * Plugin Name: iFrame in Post Content
 * Description: Add an iFrame to post type <code>post</code> if meta key <code>iframe_url</code> is set.
 */
add_filter(
	'the_content',
	function( $c ) {
		$meta_key = 'iframe_url';
		$post_type = 'post';

		if ( $post_type !== get_post_type() || empty( get_post_meta( get_the_ID(), $meta_key, true ) ) ) {
			return $c;
		}

		return $c . sprintf(
			'<style>
				.entry-content iframe { width: 100%%; max-width: 100%%; height: 70vw; margin: 20px 0 20px 0; border: none; }
			</style>
			<iframe src="%s"></iframe>',
			esc_url( get_post_meta( get_the_ID(), $meta_key, true ) )
		);
	},
	PHP_INT_MAX
);