Plugin Directory

Changeset 3307221


Ignore:
Timestamp:
06/05/2025 06:58:00 PM (10 months ago)
Author:
looswebstudio
Message:

Update to version 1.8.2 from GitHub

Location:
useful-blocks
Files:
6 edited
1 copied

Legend:

Unmodified
Added
Removed
  • useful-blocks/tags/1.8.2/inc/register_blocks.php

    r3305987 r3307221  
    8484
    8585/**
    86  * リストブロックで空のulタグを出力しない
     86 * リストブロックで空のulタグを出力しない.かつ、「innerHTML」にコンテンツが含まれる古いリストブロックが空として扱われないように注意。
    8787 */
    8888add_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            }
    9498        }
     99    // 古い保存形式では、innerBlocks が存在せず、HTML文字列がそのまま innerHTML に入る
     100    } elseif ( ! empty( $block['innerHTML'] ) ) {
     101        $has_content = '' !== trim( wp_strip_all_tags( $block['innerHTML'] ) );
    95102    }
    96     return $is_empty ? null : $block_content;
     103
     104    return $has_content ? $block_content : null;
    97105}, 10, 2 );
  • useful-blocks/tags/1.8.2/readme.txt

    r3305987 r3307221  
    55Requires at least: 5.9
    66Tested up to: 6.8
    7 Stable tag: 1.8.1
     7Stable tag: 1.8.2
    88Requires PHP: 7.0
    99License: GPLv2 or later
     
    3535== Changelog ==
    3636
    37 = 1.8.0 =
     37= 1.8.2 =
     38- Fixed some bugs.
     39
     40= 1.8.1 =
    3841- Support for WordPress 6.7.
    3942- Fixed some bugs.
  • useful-blocks/tags/1.8.2/useful-blocks.php

    r3305987 r3307221  
    44 * Plugin URI: https://ponhiro.com/useful-blocks/
    55 * Description: It is a plugin that collects very convenient blocks.
    6  * Version: 1.8.1
     6 * Version: 1.8.2
    77 * Requires at least: 5.9
    88 * Author: Ponhiro, Ryo
  • useful-blocks/trunk/inc/register_blocks.php

    r3305987 r3307221  
    8484
    8585/**
    86  * リストブロックで空のulタグを出力しない
     86 * リストブロックで空のulタグを出力しない.かつ、「innerHTML」にコンテンツが含まれる古いリストブロックが空として扱われないように注意。
    8787 */
    8888add_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            }
    9498        }
     99    // 古い保存形式では、innerBlocks が存在せず、HTML文字列がそのまま innerHTML に入る
     100    } elseif ( ! empty( $block['innerHTML'] ) ) {
     101        $has_content = '' !== trim( wp_strip_all_tags( $block['innerHTML'] ) );
    95102    }
    96     return $is_empty ? null : $block_content;
     103
     104    return $has_content ? $block_content : null;
    97105}, 10, 2 );
  • useful-blocks/trunk/readme.txt

    r3305987 r3307221  
    55Requires at least: 5.9
    66Tested up to: 6.8
    7 Stable tag: 1.8.1
     7Stable tag: 1.8.2
    88Requires PHP: 7.0
    99License: GPLv2 or later
     
    3535== Changelog ==
    3636
    37 = 1.8.0 =
     37= 1.8.2 =
     38- Fixed some bugs.
     39
     40= 1.8.1 =
    3841- Support for WordPress 6.7.
    3942- Fixed some bugs.
  • useful-blocks/trunk/useful-blocks.php

    r3305987 r3307221  
    44 * Plugin URI: https://ponhiro.com/useful-blocks/
    55 * Description: It is a plugin that collects very convenient blocks.
    6  * Version: 1.8.1
     6 * Version: 1.8.2
    77 * Requires at least: 5.9
    88 * Author: Ponhiro, Ryo
Note: See TracChangeset for help on using the changeset viewer.