Changeset 3382931
- Timestamp:
- 10/22/2025 08:50:29 PM (5 months ago)
- Location:
- enhanced-embed-block
- Files:
-
- 2 added
- 2 deleted
- 6 edited
- 1 copied
-
tags/1.3.1 (copied) (copied from enhanced-embed-block/trunk)
-
tags/1.3.1/css/enhanced-embed.css (added)
-
tags/1.3.1/css/lite-embed-fallback.css (deleted)
-
tags/1.3.1/enhanced-embed-block.php (modified) (5 diffs)
-
tags/1.3.1/inc/generic.php (modified) (1 diff)
-
tags/1.3.1/readme.txt (modified) (1 diff)
-
trunk/css/enhanced-embed.css (added)
-
trunk/css/lite-embed-fallback.css (deleted)
-
trunk/enhanced-embed-block.php (modified) (5 diffs)
-
trunk/inc/generic.php (modified) (1 diff)
-
trunk/readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
enhanced-embed-block/tags/1.3.1/enhanced-embed-block.php
r3374716 r3382931 7 7 * Author URI: https://MRWweb.com 8 8 * Text Domain: enhanced-embed-block 9 * Version: 1.3. 09 * Version: 1.3.1 10 10 * Requires at least: 6.5 11 11 * Requires PHP: 7.4 … … 20 20 namespace EnhancedEmbedBlock; 21 21 22 define( 'EEB_VERSION', '1.3. 0' );22 define( 'EEB_VERSION', '1.3.1' ); 23 23 24 24 add_action( 'wp_enqueue_scripts', __NAMESPACE__ . '\enqueue_lite_youtube_component' ); … … 33 33 plugins_url( 'vendor/lite-youtube/lite-youtube.js', __FILE__ ), 34 34 array(), 35 '1.8. 1',35 '1.8.2', 36 36 array( 'async' => true ) 37 37 ); … … 46 46 47 47 wp_register_style( 48 ' lite-embed-fallback',49 plugins_url( 'css/ lite-embed-fallback.css', __FILE__ ),48 'enhanced-embed', 49 plugins_url( 'css/enhanced-embed.css', __FILE__ ), 50 50 array(), 51 51 EEB_VERSION, … … 72 72 } 73 73 74 wp_enqueue_style( ' lite-embed-fallback' );74 wp_enqueue_style( 'enhanced-embed' ); 75 75 76 76 switch ( $block['attrs']['providerNameSlug'] ) { -
enhanced-embed-block/tags/1.3.1/inc/generic.php
r3374716 r3382931 58 58 function aspect_ratio_style( $block ) { 59 59 if( isset( $block['attrs']['className'] ) && str_contains( $block['attrs']['className'], 'wp-embed-aspect-' ) ) { 60 $style = 'position:absolute;inset:0;';61 60 if( $block['attrs']['providerNameSlug'] === 'youtube' ) { 62 61 //php regex to extract the aspect ratio from the class name 63 62 preg_match( '/wp-embed-aspect-([0-9]+)-([0-9]+)/', $block['attrs']['className'], $matches ); 64 $style .= '--lite-youtube-aspect-ratio:' . $matches[1] . '/' . $matches[2] . ';'; 63 $style = '--lite-youtube-aspect-ratio:' . $matches[1] . '/' . $matches[2] . ';'; 64 return ' style="' . $style . '" '; 65 65 } 66 66 67 return ' style="' . $style . '" ';68 67 } 69 68 return ''; -
enhanced-embed-block/tags/1.3.1/readme.txt
r3374716 r3382931 84 84 == Changelog == 85 85 86 = 1.3.1 (22 October 2025) = 87 88 - Adjust approach to managing default WordPress aspect ratio styles to avoid "collapsed" layouts in some themes 89 86 90 = 1.3.0 (7 October 2025) = 87 91 -
enhanced-embed-block/trunk/enhanced-embed-block.php
r3374716 r3382931 7 7 * Author URI: https://MRWweb.com 8 8 * Text Domain: enhanced-embed-block 9 * Version: 1.3. 09 * Version: 1.3.1 10 10 * Requires at least: 6.5 11 11 * Requires PHP: 7.4 … … 20 20 namespace EnhancedEmbedBlock; 21 21 22 define( 'EEB_VERSION', '1.3. 0' );22 define( 'EEB_VERSION', '1.3.1' ); 23 23 24 24 add_action( 'wp_enqueue_scripts', __NAMESPACE__ . '\enqueue_lite_youtube_component' ); … … 33 33 plugins_url( 'vendor/lite-youtube/lite-youtube.js', __FILE__ ), 34 34 array(), 35 '1.8. 1',35 '1.8.2', 36 36 array( 'async' => true ) 37 37 ); … … 46 46 47 47 wp_register_style( 48 ' lite-embed-fallback',49 plugins_url( 'css/ lite-embed-fallback.css', __FILE__ ),48 'enhanced-embed', 49 plugins_url( 'css/enhanced-embed.css', __FILE__ ), 50 50 array(), 51 51 EEB_VERSION, … … 72 72 } 73 73 74 wp_enqueue_style( ' lite-embed-fallback' );74 wp_enqueue_style( 'enhanced-embed' ); 75 75 76 76 switch ( $block['attrs']['providerNameSlug'] ) { -
enhanced-embed-block/trunk/inc/generic.php
r3374716 r3382931 58 58 function aspect_ratio_style( $block ) { 59 59 if( isset( $block['attrs']['className'] ) && str_contains( $block['attrs']['className'], 'wp-embed-aspect-' ) ) { 60 $style = 'position:absolute;inset:0;';61 60 if( $block['attrs']['providerNameSlug'] === 'youtube' ) { 62 61 //php regex to extract the aspect ratio from the class name 63 62 preg_match( '/wp-embed-aspect-([0-9]+)-([0-9]+)/', $block['attrs']['className'], $matches ); 64 $style .= '--lite-youtube-aspect-ratio:' . $matches[1] . '/' . $matches[2] . ';'; 63 $style = '--lite-youtube-aspect-ratio:' . $matches[1] . '/' . $matches[2] . ';'; 64 return ' style="' . $style . '" '; 65 65 } 66 66 67 return ' style="' . $style . '" ';68 67 } 69 68 return ''; -
enhanced-embed-block/trunk/readme.txt
r3374716 r3382931 84 84 == Changelog == 85 85 86 = 1.3.1 (22 October 2025) = 87 88 - Adjust approach to managing default WordPress aspect ratio styles to avoid "collapsed" layouts in some themes 89 86 90 = 1.3.0 (7 October 2025) = 87 91
Note: See TracChangeset
for help on using the changeset viewer.