next_tag( array( 'tag_name' => 'script' ) ) ) { if ( self::CLICK_HANDLE . '-js' === $processor->get_attribute( 'id' ) ) { $processor->set_attribute( 'data-src', self::versioned_script_url() ); return $processor->get_updated_html(); } } return $tag; } /** Print styles enqueued by shortcodes after the theme printed its head. */ public static function late_styles(): void { if ( wp_style_is( self::HANDLE, 'enqueued' ) && ! wp_style_is( self::HANDLE, 'done' ) ) { wp_print_styles( array( self::HANDLE ) ); } } /** * Register for the iframe. In the editor the elements are always loaded, so a block * inserted into a new post previews the real element. The front end loads them only * from render callbacks. */ public static function editor_assets(): void { self::register(); if ( is_admin() ) { self::enqueue(); } } }