Changeset 3307221
- Timestamp:
- 06/05/2025 06:58:00 PM (10 months ago)
- Location:
- useful-blocks
- Files:
-
- 6 edited
- 1 copied
-
tags/1.8.2 (copied) (copied from useful-blocks/trunk)
-
tags/1.8.2/inc/register_blocks.php (modified) (1 diff)
-
tags/1.8.2/readme.txt (modified) (2 diffs)
-
tags/1.8.2/useful-blocks.php (modified) (1 diff)
-
trunk/inc/register_blocks.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/useful-blocks.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
useful-blocks/tags/1.8.2/inc/register_blocks.php
r3305987 r3307221 84 84 85 85 /** 86 * リストブロックで空のulタグを出力しない 86 * リストブロックで空のulタグを出力しない.かつ、「innerHTML」にコンテンツが含まれる古いリストブロックが空として扱われないように注意。 87 87 */ 88 88 add_filter( 'render_block_ponhiro-blocks/list', function ( $block_content, $block ) { 89 $is_empty = true; 90 foreach ( $block['innerBlocks'] as $inner_block ) { 91 if ( ! empty( $inner_block['innerHTML'] ) ) { 92 $is_empty = false; 93 break; 89 $has_content = false; 90 91 // 新しい保存形式では、li要素が innerBlocks 配列に格納されている 92 if ( ! empty( $block['innerBlocks'] ) ) { 93 foreach ( $block['innerBlocks'] as $inner_block ) { 94 if ( ! empty( $inner_block['innerHTML'] ) ) { 95 $has_content = true; 96 break; 97 } 94 98 } 99 // 古い保存形式では、innerBlocks が存在せず、HTML文字列がそのまま innerHTML に入る 100 } elseif ( ! empty( $block['innerHTML'] ) ) { 101 $has_content = '' !== trim( wp_strip_all_tags( $block['innerHTML'] ) ); 95 102 } 96 return $is_empty ? null : $block_content; 103 104 return $has_content ? $block_content : null; 97 105 }, 10, 2 ); -
useful-blocks/tags/1.8.2/readme.txt
r3305987 r3307221 5 5 Requires at least: 5.9 6 6 Tested up to: 6.8 7 Stable tag: 1.8. 17 Stable tag: 1.8.2 8 8 Requires PHP: 7.0 9 9 License: GPLv2 or later … … 35 35 == Changelog == 36 36 37 = 1.8.0 = 37 = 1.8.2 = 38 - Fixed some bugs. 39 40 = 1.8.1 = 38 41 - Support for WordPress 6.7. 39 42 - Fixed some bugs. -
useful-blocks/tags/1.8.2/useful-blocks.php
r3305987 r3307221 4 4 * Plugin URI: https://ponhiro.com/useful-blocks/ 5 5 * Description: It is a plugin that collects very convenient blocks. 6 * Version: 1.8. 16 * Version: 1.8.2 7 7 * Requires at least: 5.9 8 8 * Author: Ponhiro, Ryo -
useful-blocks/trunk/inc/register_blocks.php
r3305987 r3307221 84 84 85 85 /** 86 * リストブロックで空のulタグを出力しない 86 * リストブロックで空のulタグを出力しない.かつ、「innerHTML」にコンテンツが含まれる古いリストブロックが空として扱われないように注意。 87 87 */ 88 88 add_filter( 'render_block_ponhiro-blocks/list', function ( $block_content, $block ) { 89 $is_empty = true; 90 foreach ( $block['innerBlocks'] as $inner_block ) { 91 if ( ! empty( $inner_block['innerHTML'] ) ) { 92 $is_empty = false; 93 break; 89 $has_content = false; 90 91 // 新しい保存形式では、li要素が innerBlocks 配列に格納されている 92 if ( ! empty( $block['innerBlocks'] ) ) { 93 foreach ( $block['innerBlocks'] as $inner_block ) { 94 if ( ! empty( $inner_block['innerHTML'] ) ) { 95 $has_content = true; 96 break; 97 } 94 98 } 99 // 古い保存形式では、innerBlocks が存在せず、HTML文字列がそのまま innerHTML に入る 100 } elseif ( ! empty( $block['innerHTML'] ) ) { 101 $has_content = '' !== trim( wp_strip_all_tags( $block['innerHTML'] ) ); 95 102 } 96 return $is_empty ? null : $block_content; 103 104 return $has_content ? $block_content : null; 97 105 }, 10, 2 ); -
useful-blocks/trunk/readme.txt
r3305987 r3307221 5 5 Requires at least: 5.9 6 6 Tested up to: 6.8 7 Stable tag: 1.8. 17 Stable tag: 1.8.2 8 8 Requires PHP: 7.0 9 9 License: GPLv2 or later … … 35 35 == Changelog == 36 36 37 = 1.8.0 = 37 = 1.8.2 = 38 - Fixed some bugs. 39 40 = 1.8.1 = 38 41 - Support for WordPress 6.7. 39 42 - Fixed some bugs. -
useful-blocks/trunk/useful-blocks.php
r3305987 r3307221 4 4 * Plugin URI: https://ponhiro.com/useful-blocks/ 5 5 * Description: It is a plugin that collects very convenient blocks. 6 * Version: 1.8. 16 * Version: 1.8.2 7 7 * Requires at least: 5.9 8 8 * Author: Ponhiro, Ryo
Note: See TracChangeset
for help on using the changeset viewer.