diff --git a/languages/vk-blocks-pro.pot b/languages/vk-blocks-pro.pot index 4707b462a..42c334dad 100644 --- a/languages/vk-blocks-pro.pot +++ b/languages/vk-blocks-pro.pot @@ -2,14 +2,14 @@ # This file is distributed under the same license as the VK Blocks Pro plugin. msgid "" msgstr "" -"Project-Id-Version: VK Blocks Pro 1.69.1.2\n" +"Project-Id-Version: VK Blocks Pro 1.70.0.0\n" "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/vk-blocks-pro\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"POT-Creation-Date: 2024-03-27T11:38:40+00:00\n" +"POT-Creation-Date: 2024-03-27T11:46:22+00:00\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "X-Generator: WP-CLI 2.6.0\n" "X-Domain: vk-blocks-pro\n" diff --git a/readme.txt b/readme.txt index 3862d4a4f..a424f73da 100644 --- a/readme.txt +++ b/readme.txt @@ -104,6 +104,9 @@ e.g. == Changelog == [ Design Bug Fix ]Fixed margin-block-start being attached to flow block + += 1.70.0 = +[ Specification Change ] core/social-link, core/site-logo, core/site-title and core/site-tagline correspond to margin-extension [ Add function ][ Breadcrumb ] Add the ability to input breadcrumb separators. = 1.69.1 = diff --git a/src/utils/is-excludes-blocks.js b/src/utils/is-excludes-blocks.js index 29d5846ee..3c962e36c 100644 --- a/src/utils/is-excludes-blocks.js +++ b/src/utils/is-excludes-blocks.js @@ -54,11 +54,11 @@ export const isExcludesBlocks = ({ blockName, addExclude }) => { 'core/block', 'core/rss', 'core/search', - 'core/social-link', + //'core/social-link', 'core/tag-cloud', - 'core/site-logo', - 'core/site-title', - 'core/site-tagline', + //'core/site-logo', + //'core/site-title', + //'core/site-tagline', 'core/template-part', 'core/post-title', 'core/post-excerpt', diff --git a/test/phpunit/pro/test-blog-card.php b/test/phpunit/pro/test-blog-card.php index fe9ee9fdd..fe1613a07 100644 --- a/test/phpunit/pro/test-blog-card.php +++ b/test/phpunit/pro/test-blog-card.php @@ -51,7 +51,7 @@ public static function wpTearDownAfterClass() { wp_delete_post( self::$attachment_id, true ); } - public function test_vk_blocks_blog_card_render_callback(){ + public function test_vk_blocks_blog_card_render_callback() { print PHP_EOL; print '------------------------------------' . PHP_EOL; @@ -62,8 +62,8 @@ public function test_vk_blocks_blog_card_render_callback(){ $tests = array( // 内部リンク array( - 'content' => ' - + 'content' => ' +
@@ -74,21 +74,22 @@ public function test_vk_blocks_blog_card_render_callback(){ ', 'expected' => '
-
'.get_the_title( self::$post->ID ).'
- -

'.get_the_excerpt( self::$post->ID ).'

- -

'. get_bloginfo( 'name' ) .'

+
' . get_the_title( self::$post->ID ) . '
+ +

' . get_the_excerpt( self::$post->ID ) . '

+ +

' . get_bloginfo( 'name' ) . '

', ), // 外部リンク 埋め込み不可 + // 2024.3.28 以前は GitHub のURLでテストしていたが、GitHub は埋め込みができるようになったため、URLを変更 array( - 'content' => ' - -
- ', - 'expected' => '
https://github.com/vektor-inc/vk-blocks-pro/blob/master/vk-blocks.php
', + 'content' => ' + +
+', + 'expected' => '
https://vektor-inc.co.jp/data/photo_ishikawa.jpg
', ), ); @@ -99,36 +100,47 @@ public function test_vk_blocks_blog_card_render_callback(){ foreach ( $tests as $test ) { + // Get block wrapper attributes ( HTML attributes like as : class="wp-block-vk-blocks-blog-card" ). $get_block_wrapper_attributes = get_block_wrapper_attributes(); - $parse_blocks = parse_blocks(sprintf($test['content'], $get_block_wrapper_attributes)); + // ラッパーア属性を結合したコンテンツ要素 + $block_content = sprintf( $test['content'], $get_block_wrapper_attributes ); + // ブロック情報を配列に変換 + $parse_blocks = parse_blocks( $block_content ); + // Render Blog card block. $render_block_content = render_block( $parse_blocks[1] ); + if ( is_wp_version_compatible( '6.3' ) ) { $get_block_wrapper_attributes = 'class="wp-block-vk-blocks-blog-card is-layout-flow wp-block-blog-card-is-layout-flow"'; } else { $get_block_wrapper_attributes = 'class="wp-block-vk-blocks-blog-card"'; } - if ( is_array($test['expected']) ) { + + if ( is_array( $test['expected'] ) ) { + // Expected が配列の場合 $correct = array(); - $correct[1] = sprintf($test['expected']['can_embed'], $get_block_wrapper_attributes); - $correct[2] = sprintf($test['expected']['cannot_embed'], $get_block_wrapper_attributes); + // 埋め込み成功 + $correct[1] = sprintf( $test['expected']['can_embed'], $get_block_wrapper_attributes ); + // 埋め込み失敗 + $correct[2] = sprintf( $test['expected']['cannot_embed'], $get_block_wrapper_attributes ); } else { - $correct = sprintf($test['expected'], $get_block_wrapper_attributes); + $correct = sprintf( $test['expected'], $get_block_wrapper_attributes ); } // print PHP_EOL; - print '$render_block_content :'; var_dump($render_block_content); + print '$render_block_content :'; + var_dump( $render_block_content ); // print PHP_EOL; // print PHP_EOL; - print 'correct :'; - var_dump($correct); + print 'correct :'; + var_dump( $correct ); // print PHP_EOL; - if ( is_array($correct) ) { - $this->assertContains($render_block_content, $correct); + if ( is_array( $correct ) ) { + // 成功 / 失敗 がある場合 + $this->assertContains( $render_block_content, $correct ); } else { $this->assertSame( $correct, $render_block_content ); } - } } -}; +} diff --git a/vk-blocks.php b/vk-blocks.php index fecd4f06c..8f8808eba 100644 --- a/vk-blocks.php +++ b/vk-blocks.php @@ -3,7 +3,7 @@ * Plugin Name: VK Blocks Pro * Plugin URI: https://github.com/vektor-inc/vk-blocks * Description: This is a plugin that extends Block Editor. - * Version: 1.69.1.2 + * Version: 1.70.0.0 * Stable tag: 1.69.1.2 * Requires at least: 6.1 * Author: Vektor,Inc.