Changeset 3208360
- Timestamp:
- 12/16/2024 06:58:41 AM (16 months ago)
- Location:
- taro-taxonomy-blocks
- Files:
-
- 22 edited
- 1 copied
-
tags/1.2.1 (copied) (copied from taro-taxonomy-blocks/trunk)
-
tags/1.2.1/assets/js/block-posts-terms-query.js (modified) (2 diffs)
-
tags/1.2.1/assets/js/block-posts-terms.js (modified) (1 diff)
-
tags/1.2.1/assets/js/block-terms.js (modified) (1 diff)
-
tags/1.2.1/composer.json (modified) (1 diff)
-
tags/1.2.1/dist/js/block-posts-terms-query.js (modified) (1 diff)
-
tags/1.2.1/dist/js/block-posts-terms.js (modified) (1 diff)
-
tags/1.2.1/dist/js/block-terms.js (modified) (1 diff)
-
tags/1.2.1/package.json (modified) (1 diff)
-
tags/1.2.1/readme.txt (modified) (2 diffs)
-
tags/1.2.1/taro-taxonomy-blocks.php (modified) (3 diffs)
-
tags/1.2.1/template-parts/taxonomy-blocks/term-list-hierarchical.php (modified) (1 diff)
-
trunk/assets/js/block-posts-terms-query.js (modified) (2 diffs)
-
trunk/assets/js/block-posts-terms.js (modified) (1 diff)
-
trunk/assets/js/block-terms.js (modified) (1 diff)
-
trunk/composer.json (modified) (1 diff)
-
trunk/dist/js/block-posts-terms-query.js (modified) (1 diff)
-
trunk/dist/js/block-posts-terms.js (modified) (1 diff)
-
trunk/dist/js/block-terms.js (modified) (1 diff)
-
trunk/package.json (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/taro-taxonomy-blocks.php (modified) (3 diffs)
-
trunk/template-parts/taxonomy-blocks/term-list-hierarchical.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
taro-taxonomy-blocks/tags/1.2.1/assets/js/block-posts-terms-query.js
r2999435 r3208360 48 48 /> 49 49 <TaxonomySelector value={ attributes.taxonomy } onChange={ ( taxonomy ) => setAttributes( { taxonomy } ) } /> 50 <TextControl value={ attributes.terms } label={ __( 'Term Slugs', ' label' ) }50 <TextControl value={ attributes.terms } label={ __( 'Term Slugs', 'taro-taxonomy-blocks' ) } 51 51 help={ __( 'Enter term slugs in CSV format. Default value is post\'s terms', 'taro-taxonomy-blocks' ) } 52 52 placeholder={ __( 'Post\'s terms.', 'taro-taxonomy-blocks' ) } … … 64 64 { ( ! attributes.taxonomy ) ? ( 65 65 <div style={ { margin: '40px 0' } }> 66 <p>{ __( 'No taxonomy set. Please choose one.', 'taro-taxonomy- ' ) }</p>66 <p>{ __( 'No taxonomy set. Please choose one.', 'taro-taxonomy-blocks' ) }</p> 67 67 <TaxonomySelector value={ attributes.taxonomy } onChange={ ( taxonomy ) => setAttributes( { taxonomy } ) } /> 68 68 </div> -
taro-taxonomy-blocks/tags/1.2.1/assets/js/block-posts-terms.js
r2999435 r3208360 45 45 { ( ! attributes.taxonomy ) ? ( 46 46 <div style={ { margin: '40px 0' } }> 47 <p>{ __( 'No taxonomy set. Please choose one.', 'taro-taxonomy- ' ) }</p>47 <p>{ __( 'No taxonomy set. Please choose one.', 'taro-taxonomy-blocks' ) }</p> 48 48 <TaxonomySelector value={ attributes.taxonomy } onChange={ ( taxonomy ) => setAttributes( { taxonomy } ) } /> 49 49 </div> -
taro-taxonomy-blocks/tags/1.2.1/assets/js/block-terms.js
r2999435 r3208360 48 48 { ( ! attributes.taxonomy ) ? ( 49 49 <div style={ { margin: '40px 0' } }> 50 <p>{ __( 'No taxonomy set. Please choose one.', 'taro-taxonomy- ' ) }</p>50 <p>{ __( 'No taxonomy set. Please choose one.', 'taro-taxonomy-blocks' ) }</p> 51 51 <TaxonomySelector value={ attributes.taxonomy } onChange={ ( taxonomy ) => setAttributes( { taxonomy } ) } /> 52 52 </div> -
taro-taxonomy-blocks/tags/1.2.1/composer.json
r2999435 r3208360 23 23 "require-dev": { 24 24 "squizlabs/php_codesniffer": "^3.0", 25 "wp-coding-standards/wpcs": "^2.0", 26 "phpcompatibility/php-compatibility": "^9.3", 25 "wp-coding-standards/wpcs": "^3.0", 27 26 "dealerdirect/phpcodesniffer-composer-installer": "^1.0" 28 27 }, -
taro-taxonomy-blocks/tags/1.2.1/dist/js/block-posts-terms-query.js
r2999435 r3208360 2 2 !function(){const{registerBlockType:e}=wp.blocks,{__:__,sprintf:sprintf}=wp.i18n,{select:t}=wp.data,{InspectorControls:o}=wp.blockEditor,{PanelBody:a,TextControl:r}=wp.components,{serverSideRender:l}=wp,{TaxonomySelector:n,OrderSelector:s,PostsOrderBySelector:c}=wp.taro;e("taro/post-terms-query",{title:__("Post Terms Query","taro-taxonomy-blocks"),icon:"tag",category:"widgets",example:{taxonomy:"category"},keywords:["term"],attributes:TaroPostTermsQueryBlockEditor.attributes,description:__("Display posts with same terms of this post in specified taxonomy.","taro-taxonomy-blocks"),edit(e){let{attributes:m,setAttributes:y}=e; 3 3 // translators: %s is post type. 4 const i=sprintf(__("Default: %s","taro-taxonomy-blocks"),t("core/editor").getCurrentPostType());return React.createElement(React.Fragment,null,React.createElement(o,null,React.createElement(a,{defaultOpen:!0,title:__("Taxonomy Setting","taro-taxonomy-blocks")},React.createElement(r,{label:__("Post Type","taro-taxonomy-blocks"),value:m.post_type,placeholder:i,onChange:e=>y({post_type:e}),help:__('Enter post types in csv format. "any" is also available. If empty, current post type will be used.',"taro-taxonomy-blocks")}),React.createElement(n,{value:m.taxonomy,onChange:e=>y({taxonomy:e})}),React.createElement(r,{value:m.terms,label:__("Term Slugs"," label"),help:__("Enter term slugs in CSV format. Default value is post's terms","taro-taxonomy-blocks"),placeholder:__("Post's terms.","taro-taxonomy-blocks"),onChange:e=>y({terms:e})}),React.createElement(r,{label:__("Number of Posts","taro-taxonomy-blocks"),type:"number",min:-1,value:m.limit,placeholder:10,onChange:e=>y({limit:parseInt(e)})}),React.createElement(c,{valu:m.orderby,onChange:e=>y({orderby:e})}),React.createElement(s,{value:m.order,onChange:e=>y({order:e})}))),m.taxonomy?React.createElement("div",{className:"taro-taxonomy-blocks-editor"},React.createElement(l,{block:"taro/post-terms-query",attributes:m})):React.createElement("div",{style:{margin:"40px 0"}},React.createElement("p",null,__("No taxonomy set. Please choose one.","taro-taxonomy-")),React.createElement(n,{value:m.taxonomy,onChange:e=>y({taxonomy:e})})))},save(){return null}})}();4 const i=sprintf(__("Default: %s","taro-taxonomy-blocks"),t("core/editor").getCurrentPostType());return React.createElement(React.Fragment,null,React.createElement(o,null,React.createElement(a,{defaultOpen:!0,title:__("Taxonomy Setting","taro-taxonomy-blocks")},React.createElement(r,{label:__("Post Type","taro-taxonomy-blocks"),value:m.post_type,placeholder:i,onChange:e=>y({post_type:e}),help:__('Enter post types in csv format. "any" is also available. If empty, current post type will be used.',"taro-taxonomy-blocks")}),React.createElement(n,{value:m.taxonomy,onChange:e=>y({taxonomy:e})}),React.createElement(r,{value:m.terms,label:__("Term Slugs","taro-taxonomy-blocks"),help:__("Enter term slugs in CSV format. Default value is post's terms","taro-taxonomy-blocks"),placeholder:__("Post's terms.","taro-taxonomy-blocks"),onChange:e=>y({terms:e})}),React.createElement(r,{label:__("Number of Posts","taro-taxonomy-blocks"),type:"number",min:-1,value:m.limit,placeholder:10,onChange:e=>y({limit:parseInt(e)})}),React.createElement(c,{valu:m.orderby,onChange:e=>y({orderby:e})}),React.createElement(s,{value:m.order,onChange:e=>y({order:e})}))),m.taxonomy?React.createElement("div",{className:"taro-taxonomy-blocks-editor"},React.createElement(l,{block:"taro/post-terms-query",attributes:m})):React.createElement("div",{style:{margin:"40px 0"}},React.createElement("p",null,__("No taxonomy set. Please choose one.","taro-taxonomy-blocks")),React.createElement(n,{value:m.taxonomy,onChange:e=>y({taxonomy:e})})))},save(){return null}})}(); -
taro-taxonomy-blocks/tags/1.2.1/dist/js/block-posts-terms.js
r2999435 r3208360 1 1 /*! License information can be found in block-posts-terms.js.LICENSE.txt */ 2 !function(){const{registerBlockType:t}=wp.blocks,{__:__}=wp.i18n,{InspectorControls:e}=wp.blockEditor,{PanelBody:o}=wp.components,{serverSideRender:a}=wp,{TaxonomySelector:n}=wp.taro;t("taro/post-terms",{title:__("Post Terms","taro-taxonomy-blocks"),icon:"tag",category:"widgets",example:{taxonomy:"category"},keywords:["term"],attributes:TaroPostTermsBlockEditor.attributes,description:__("Display the list of terms assigned to this post in specified taxonomy.","taro-taxonomy-blocks"),edit(t){let{attributes:r,setAttributes:s}=t;return React.createElement(React.Fragment,null,React.createElement(e,null,React.createElement(o,{defaultOpen:!0,title:__("Taxonomy Setting","taro-taxonomy-blocks")},React.createElement(n,{value:r.taxonomy,onChange:t=>s({taxonomy:t})}))),r.taxonomy?React.createElement("div",{className:"taro-taxonomy-blocks-editor"},React.createElement(a,{block:"taro/post-terms",attributes:r})):React.createElement("div",{style:{margin:"40px 0"}},React.createElement("p",null,__("No taxonomy set. Please choose one.","taro-taxonomy- ")),React.createElement(n,{value:r.taxonomy,onChange:t=>s({taxonomy:t})})))},save(){return null}})}();2 !function(){const{registerBlockType:t}=wp.blocks,{__:__}=wp.i18n,{InspectorControls:e}=wp.blockEditor,{PanelBody:o}=wp.components,{serverSideRender:a}=wp,{TaxonomySelector:n}=wp.taro;t("taro/post-terms",{title:__("Post Terms","taro-taxonomy-blocks"),icon:"tag",category:"widgets",example:{taxonomy:"category"},keywords:["term"],attributes:TaroPostTermsBlockEditor.attributes,description:__("Display the list of terms assigned to this post in specified taxonomy.","taro-taxonomy-blocks"),edit(t){let{attributes:r,setAttributes:s}=t;return React.createElement(React.Fragment,null,React.createElement(e,null,React.createElement(o,{defaultOpen:!0,title:__("Taxonomy Setting","taro-taxonomy-blocks")},React.createElement(n,{value:r.taxonomy,onChange:t=>s({taxonomy:t})}))),r.taxonomy?React.createElement("div",{className:"taro-taxonomy-blocks-editor"},React.createElement(a,{block:"taro/post-terms",attributes:r})):React.createElement("div",{style:{margin:"40px 0"}},React.createElement("p",null,__("No taxonomy set. Please choose one.","taro-taxonomy-blocks")),React.createElement(n,{value:r.taxonomy,onChange:t=>s({taxonomy:t})})))},save(){return null}})}(); -
taro-taxonomy-blocks/tags/1.2.1/dist/js/block-terms.js
r2999435 r3208360 1 1 /*! License information can be found in block-terms.js.LICENSE.txt */ 2 !function(){const{registerBlockType:e}=wp.blocks,{__:__}=wp.i18n,{InspectorControls:t}=wp.blockEditor,{PanelBody:o,ToggleControl:a,TextControl:r}=wp.components,{serverSideRender:n}=wp,{TaxonomySelector:l,OrderSelector:c,OrderBySelector:m}=wp.taro;e("taro/terms",{title:__("Terms","taro-taxonomy-blocks"),icon:"tag",category:"widgets",example:{taxonomy:"category"},keywords:["term"],attributes:TaroTermsBlockEditor.attributes,description:__("Display terms list in specified taxonomy.","taro-taxonomy-blocks"),edit(e){let{attributes:s,setAttributes:i}=e;return React.createElement(React.Fragment,null,React.createElement(t,null,React.createElement(o,{defaultOpen:!0,title:__("Taxonomy Setting","taro-taxonomy-blocks")},React.createElement(l,{value:s.taxonomy,onChange:e=>i({taxonomy:e})}),React.createElement(a,{checked:s.hide_empty,label:__("Hide Empty","taro-taxonomy-blocks"),onChange:e=>i({hide_empty:e})}),React.createElement("hr",null),React.createElement(m,{value:s.orderby,onChange:e=>i({orderby:e})}),React.createElement(r,{label:__("Custom Field(optional)","taro-taxonomy-blocks"),value:s.meta,onChange:e=>i({meta:e})}),React.createElement(c,{value:s.order,onChange:e=>i({order:e})}))),s.taxonomy?React.createElement("div",{className:"taro-taxonomy-blocks-editor"},React.createElement(n,{block:"taro/terms",attributes:s})):React.createElement("div",{style:{margin:"40px 0"}},React.createElement("p",null,__("No taxonomy set. Please choose one.","taro-taxonomy- ")),React.createElement(l,{value:s.taxonomy,onChange:e=>i({taxonomy:e})})))},save(){return null}})}();2 !function(){const{registerBlockType:e}=wp.blocks,{__:__}=wp.i18n,{InspectorControls:t}=wp.blockEditor,{PanelBody:o,ToggleControl:a,TextControl:r}=wp.components,{serverSideRender:n}=wp,{TaxonomySelector:l,OrderSelector:c,OrderBySelector:m}=wp.taro;e("taro/terms",{title:__("Terms","taro-taxonomy-blocks"),icon:"tag",category:"widgets",example:{taxonomy:"category"},keywords:["term"],attributes:TaroTermsBlockEditor.attributes,description:__("Display terms list in specified taxonomy.","taro-taxonomy-blocks"),edit(e){let{attributes:s,setAttributes:i}=e;return React.createElement(React.Fragment,null,React.createElement(t,null,React.createElement(o,{defaultOpen:!0,title:__("Taxonomy Setting","taro-taxonomy-blocks")},React.createElement(l,{value:s.taxonomy,onChange:e=>i({taxonomy:e})}),React.createElement(a,{checked:s.hide_empty,label:__("Hide Empty","taro-taxonomy-blocks"),onChange:e=>i({hide_empty:e})}),React.createElement("hr",null),React.createElement(m,{value:s.orderby,onChange:e=>i({orderby:e})}),React.createElement(r,{label:__("Custom Field(optional)","taro-taxonomy-blocks"),value:s.meta,onChange:e=>i({meta:e})}),React.createElement(c,{value:s.order,onChange:e=>i({order:e})}))),s.taxonomy?React.createElement("div",{className:"taro-taxonomy-blocks-editor"},React.createElement(n,{block:"taro/terms",attributes:s})):React.createElement("div",{style:{margin:"40px 0"}},React.createElement("p",null,__("No taxonomy set. Please choose one.","taro-taxonomy-blocks")),React.createElement(l,{value:s.taxonomy,onChange:e=>i({taxonomy:e})})))},save(){return null}})}(); -
taro-taxonomy-blocks/tags/1.2.1/package.json
r2999435 r3208360 22 22 }, 23 23 "devDependencies": { 24 "@babel/core": "^7. 1.0",24 "@babel/core": "^7.23.9", 25 25 "@babel/eslint-parser": "^7.23.3", 26 26 "@babel/plugin-transform-react-jsx": "^7.0.0", 27 "@babel/preset-env": "^7. 1.0",27 "@babel/preset-env": "^7.23.9", 28 28 "@wordpress/env": "^8.0", 29 "@wordpress/eslint-plugin": "^17. 0",29 "@wordpress/eslint-plugin": "^17.7", 30 30 "babel-loader": "^9.1.3", 31 31 "eslint": "^8.53", -
taro-taxonomy-blocks/tags/1.2.1/readme.txt
r2999435 r3208360 6 6 Requires at least: 5.9 7 7 Requires PHP: 7.2 8 Stable Tag: 1.2. 08 Stable Tag: 1.2.1 9 9 License: GPLv3 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-3.0.txt … … 71 71 == Changelog == 72 72 73 = 1.2.1 = 74 75 * Fix translations. 76 73 77 = 1.2.0 = 74 78 -
taro-taxonomy-blocks/tags/1.2.1/taro-taxonomy-blocks.php
r2999435 r3208360 5 5 Description: Add 3 taxonomy blockshh for block editor. 6 6 Author: Tarosky INC. 7 Version: 1.2. 07 Version: 1.2.1 8 8 Author URI: https://tarosky.co.jp/ 9 9 License: GPL3 or later … … 65 65 ] ); 66 66 $taxonomies = apply_filters( 'taro_taxonomy_blocks_taxonomies', array_values( get_taxonomies( $tax_args, OBJECT ) ) ); 67 wp_set_script_translations( 'taro-taxonomy-selector', 'taro-taxonomy-blocks' ); 67 68 wp_localize_script( 'taro-taxonomy-selector', 'TaroTaxonomySelector', [ 68 69 'taxonomies' => $taxonomies, … … 309 310 'taxonomy' => $taxonomy->name, 310 311 'field' => 'term_id', 311 'terms' => array_map( function ( $term ) {312 'terms' => array_map( function ( $term ) { 312 313 return $term->term_id; 313 314 }, $terms ), -
taro-taxonomy-blocks/tags/1.2.1/template-parts/taxonomy-blocks/term-list-hierarchical.php
r2999435 r3208360 8 8 9 9 $parent = empty( $args['parent'] ) ? 0 : $args['parent']; 10 $terms = array_values( array_filter( $args['terms'], function ( $term ) use ( $parent ) {10 $terms = array_values( array_filter( $args['terms'], function ( $term ) use ( $parent ) { 11 11 return (int) $parent === (int) $term->parent; 12 12 } ) ); -
taro-taxonomy-blocks/trunk/assets/js/block-posts-terms-query.js
r2999435 r3208360 48 48 /> 49 49 <TaxonomySelector value={ attributes.taxonomy } onChange={ ( taxonomy ) => setAttributes( { taxonomy } ) } /> 50 <TextControl value={ attributes.terms } label={ __( 'Term Slugs', ' label' ) }50 <TextControl value={ attributes.terms } label={ __( 'Term Slugs', 'taro-taxonomy-blocks' ) } 51 51 help={ __( 'Enter term slugs in CSV format. Default value is post\'s terms', 'taro-taxonomy-blocks' ) } 52 52 placeholder={ __( 'Post\'s terms.', 'taro-taxonomy-blocks' ) } … … 64 64 { ( ! attributes.taxonomy ) ? ( 65 65 <div style={ { margin: '40px 0' } }> 66 <p>{ __( 'No taxonomy set. Please choose one.', 'taro-taxonomy- ' ) }</p>66 <p>{ __( 'No taxonomy set. Please choose one.', 'taro-taxonomy-blocks' ) }</p> 67 67 <TaxonomySelector value={ attributes.taxonomy } onChange={ ( taxonomy ) => setAttributes( { taxonomy } ) } /> 68 68 </div> -
taro-taxonomy-blocks/trunk/assets/js/block-posts-terms.js
r2999435 r3208360 45 45 { ( ! attributes.taxonomy ) ? ( 46 46 <div style={ { margin: '40px 0' } }> 47 <p>{ __( 'No taxonomy set. Please choose one.', 'taro-taxonomy- ' ) }</p>47 <p>{ __( 'No taxonomy set. Please choose one.', 'taro-taxonomy-blocks' ) }</p> 48 48 <TaxonomySelector value={ attributes.taxonomy } onChange={ ( taxonomy ) => setAttributes( { taxonomy } ) } /> 49 49 </div> -
taro-taxonomy-blocks/trunk/assets/js/block-terms.js
r2999435 r3208360 48 48 { ( ! attributes.taxonomy ) ? ( 49 49 <div style={ { margin: '40px 0' } }> 50 <p>{ __( 'No taxonomy set. Please choose one.', 'taro-taxonomy- ' ) }</p>50 <p>{ __( 'No taxonomy set. Please choose one.', 'taro-taxonomy-blocks' ) }</p> 51 51 <TaxonomySelector value={ attributes.taxonomy } onChange={ ( taxonomy ) => setAttributes( { taxonomy } ) } /> 52 52 </div> -
taro-taxonomy-blocks/trunk/composer.json
r2999435 r3208360 23 23 "require-dev": { 24 24 "squizlabs/php_codesniffer": "^3.0", 25 "wp-coding-standards/wpcs": "^2.0", 26 "phpcompatibility/php-compatibility": "^9.3", 25 "wp-coding-standards/wpcs": "^3.0", 27 26 "dealerdirect/phpcodesniffer-composer-installer": "^1.0" 28 27 }, -
taro-taxonomy-blocks/trunk/dist/js/block-posts-terms-query.js
r2999435 r3208360 2 2 !function(){const{registerBlockType:e}=wp.blocks,{__:__,sprintf:sprintf}=wp.i18n,{select:t}=wp.data,{InspectorControls:o}=wp.blockEditor,{PanelBody:a,TextControl:r}=wp.components,{serverSideRender:l}=wp,{TaxonomySelector:n,OrderSelector:s,PostsOrderBySelector:c}=wp.taro;e("taro/post-terms-query",{title:__("Post Terms Query","taro-taxonomy-blocks"),icon:"tag",category:"widgets",example:{taxonomy:"category"},keywords:["term"],attributes:TaroPostTermsQueryBlockEditor.attributes,description:__("Display posts with same terms of this post in specified taxonomy.","taro-taxonomy-blocks"),edit(e){let{attributes:m,setAttributes:y}=e; 3 3 // translators: %s is post type. 4 const i=sprintf(__("Default: %s","taro-taxonomy-blocks"),t("core/editor").getCurrentPostType());return React.createElement(React.Fragment,null,React.createElement(o,null,React.createElement(a,{defaultOpen:!0,title:__("Taxonomy Setting","taro-taxonomy-blocks")},React.createElement(r,{label:__("Post Type","taro-taxonomy-blocks"),value:m.post_type,placeholder:i,onChange:e=>y({post_type:e}),help:__('Enter post types in csv format. "any" is also available. If empty, current post type will be used.',"taro-taxonomy-blocks")}),React.createElement(n,{value:m.taxonomy,onChange:e=>y({taxonomy:e})}),React.createElement(r,{value:m.terms,label:__("Term Slugs"," label"),help:__("Enter term slugs in CSV format. Default value is post's terms","taro-taxonomy-blocks"),placeholder:__("Post's terms.","taro-taxonomy-blocks"),onChange:e=>y({terms:e})}),React.createElement(r,{label:__("Number of Posts","taro-taxonomy-blocks"),type:"number",min:-1,value:m.limit,placeholder:10,onChange:e=>y({limit:parseInt(e)})}),React.createElement(c,{valu:m.orderby,onChange:e=>y({orderby:e})}),React.createElement(s,{value:m.order,onChange:e=>y({order:e})}))),m.taxonomy?React.createElement("div",{className:"taro-taxonomy-blocks-editor"},React.createElement(l,{block:"taro/post-terms-query",attributes:m})):React.createElement("div",{style:{margin:"40px 0"}},React.createElement("p",null,__("No taxonomy set. Please choose one.","taro-taxonomy-")),React.createElement(n,{value:m.taxonomy,onChange:e=>y({taxonomy:e})})))},save(){return null}})}();4 const i=sprintf(__("Default: %s","taro-taxonomy-blocks"),t("core/editor").getCurrentPostType());return React.createElement(React.Fragment,null,React.createElement(o,null,React.createElement(a,{defaultOpen:!0,title:__("Taxonomy Setting","taro-taxonomy-blocks")},React.createElement(r,{label:__("Post Type","taro-taxonomy-blocks"),value:m.post_type,placeholder:i,onChange:e=>y({post_type:e}),help:__('Enter post types in csv format. "any" is also available. If empty, current post type will be used.',"taro-taxonomy-blocks")}),React.createElement(n,{value:m.taxonomy,onChange:e=>y({taxonomy:e})}),React.createElement(r,{value:m.terms,label:__("Term Slugs","taro-taxonomy-blocks"),help:__("Enter term slugs in CSV format. Default value is post's terms","taro-taxonomy-blocks"),placeholder:__("Post's terms.","taro-taxonomy-blocks"),onChange:e=>y({terms:e})}),React.createElement(r,{label:__("Number of Posts","taro-taxonomy-blocks"),type:"number",min:-1,value:m.limit,placeholder:10,onChange:e=>y({limit:parseInt(e)})}),React.createElement(c,{valu:m.orderby,onChange:e=>y({orderby:e})}),React.createElement(s,{value:m.order,onChange:e=>y({order:e})}))),m.taxonomy?React.createElement("div",{className:"taro-taxonomy-blocks-editor"},React.createElement(l,{block:"taro/post-terms-query",attributes:m})):React.createElement("div",{style:{margin:"40px 0"}},React.createElement("p",null,__("No taxonomy set. Please choose one.","taro-taxonomy-blocks")),React.createElement(n,{value:m.taxonomy,onChange:e=>y({taxonomy:e})})))},save(){return null}})}(); -
taro-taxonomy-blocks/trunk/dist/js/block-posts-terms.js
r2999435 r3208360 1 1 /*! License information can be found in block-posts-terms.js.LICENSE.txt */ 2 !function(){const{registerBlockType:t}=wp.blocks,{__:__}=wp.i18n,{InspectorControls:e}=wp.blockEditor,{PanelBody:o}=wp.components,{serverSideRender:a}=wp,{TaxonomySelector:n}=wp.taro;t("taro/post-terms",{title:__("Post Terms","taro-taxonomy-blocks"),icon:"tag",category:"widgets",example:{taxonomy:"category"},keywords:["term"],attributes:TaroPostTermsBlockEditor.attributes,description:__("Display the list of terms assigned to this post in specified taxonomy.","taro-taxonomy-blocks"),edit(t){let{attributes:r,setAttributes:s}=t;return React.createElement(React.Fragment,null,React.createElement(e,null,React.createElement(o,{defaultOpen:!0,title:__("Taxonomy Setting","taro-taxonomy-blocks")},React.createElement(n,{value:r.taxonomy,onChange:t=>s({taxonomy:t})}))),r.taxonomy?React.createElement("div",{className:"taro-taxonomy-blocks-editor"},React.createElement(a,{block:"taro/post-terms",attributes:r})):React.createElement("div",{style:{margin:"40px 0"}},React.createElement("p",null,__("No taxonomy set. Please choose one.","taro-taxonomy- ")),React.createElement(n,{value:r.taxonomy,onChange:t=>s({taxonomy:t})})))},save(){return null}})}();2 !function(){const{registerBlockType:t}=wp.blocks,{__:__}=wp.i18n,{InspectorControls:e}=wp.blockEditor,{PanelBody:o}=wp.components,{serverSideRender:a}=wp,{TaxonomySelector:n}=wp.taro;t("taro/post-terms",{title:__("Post Terms","taro-taxonomy-blocks"),icon:"tag",category:"widgets",example:{taxonomy:"category"},keywords:["term"],attributes:TaroPostTermsBlockEditor.attributes,description:__("Display the list of terms assigned to this post in specified taxonomy.","taro-taxonomy-blocks"),edit(t){let{attributes:r,setAttributes:s}=t;return React.createElement(React.Fragment,null,React.createElement(e,null,React.createElement(o,{defaultOpen:!0,title:__("Taxonomy Setting","taro-taxonomy-blocks")},React.createElement(n,{value:r.taxonomy,onChange:t=>s({taxonomy:t})}))),r.taxonomy?React.createElement("div",{className:"taro-taxonomy-blocks-editor"},React.createElement(a,{block:"taro/post-terms",attributes:r})):React.createElement("div",{style:{margin:"40px 0"}},React.createElement("p",null,__("No taxonomy set. Please choose one.","taro-taxonomy-blocks")),React.createElement(n,{value:r.taxonomy,onChange:t=>s({taxonomy:t})})))},save(){return null}})}(); -
taro-taxonomy-blocks/trunk/dist/js/block-terms.js
r2999435 r3208360 1 1 /*! License information can be found in block-terms.js.LICENSE.txt */ 2 !function(){const{registerBlockType:e}=wp.blocks,{__:__}=wp.i18n,{InspectorControls:t}=wp.blockEditor,{PanelBody:o,ToggleControl:a,TextControl:r}=wp.components,{serverSideRender:n}=wp,{TaxonomySelector:l,OrderSelector:c,OrderBySelector:m}=wp.taro;e("taro/terms",{title:__("Terms","taro-taxonomy-blocks"),icon:"tag",category:"widgets",example:{taxonomy:"category"},keywords:["term"],attributes:TaroTermsBlockEditor.attributes,description:__("Display terms list in specified taxonomy.","taro-taxonomy-blocks"),edit(e){let{attributes:s,setAttributes:i}=e;return React.createElement(React.Fragment,null,React.createElement(t,null,React.createElement(o,{defaultOpen:!0,title:__("Taxonomy Setting","taro-taxonomy-blocks")},React.createElement(l,{value:s.taxonomy,onChange:e=>i({taxonomy:e})}),React.createElement(a,{checked:s.hide_empty,label:__("Hide Empty","taro-taxonomy-blocks"),onChange:e=>i({hide_empty:e})}),React.createElement("hr",null),React.createElement(m,{value:s.orderby,onChange:e=>i({orderby:e})}),React.createElement(r,{label:__("Custom Field(optional)","taro-taxonomy-blocks"),value:s.meta,onChange:e=>i({meta:e})}),React.createElement(c,{value:s.order,onChange:e=>i({order:e})}))),s.taxonomy?React.createElement("div",{className:"taro-taxonomy-blocks-editor"},React.createElement(n,{block:"taro/terms",attributes:s})):React.createElement("div",{style:{margin:"40px 0"}},React.createElement("p",null,__("No taxonomy set. Please choose one.","taro-taxonomy- ")),React.createElement(l,{value:s.taxonomy,onChange:e=>i({taxonomy:e})})))},save(){return null}})}();2 !function(){const{registerBlockType:e}=wp.blocks,{__:__}=wp.i18n,{InspectorControls:t}=wp.blockEditor,{PanelBody:o,ToggleControl:a,TextControl:r}=wp.components,{serverSideRender:n}=wp,{TaxonomySelector:l,OrderSelector:c,OrderBySelector:m}=wp.taro;e("taro/terms",{title:__("Terms","taro-taxonomy-blocks"),icon:"tag",category:"widgets",example:{taxonomy:"category"},keywords:["term"],attributes:TaroTermsBlockEditor.attributes,description:__("Display terms list in specified taxonomy.","taro-taxonomy-blocks"),edit(e){let{attributes:s,setAttributes:i}=e;return React.createElement(React.Fragment,null,React.createElement(t,null,React.createElement(o,{defaultOpen:!0,title:__("Taxonomy Setting","taro-taxonomy-blocks")},React.createElement(l,{value:s.taxonomy,onChange:e=>i({taxonomy:e})}),React.createElement(a,{checked:s.hide_empty,label:__("Hide Empty","taro-taxonomy-blocks"),onChange:e=>i({hide_empty:e})}),React.createElement("hr",null),React.createElement(m,{value:s.orderby,onChange:e=>i({orderby:e})}),React.createElement(r,{label:__("Custom Field(optional)","taro-taxonomy-blocks"),value:s.meta,onChange:e=>i({meta:e})}),React.createElement(c,{value:s.order,onChange:e=>i({order:e})}))),s.taxonomy?React.createElement("div",{className:"taro-taxonomy-blocks-editor"},React.createElement(n,{block:"taro/terms",attributes:s})):React.createElement("div",{style:{margin:"40px 0"}},React.createElement("p",null,__("No taxonomy set. Please choose one.","taro-taxonomy-blocks")),React.createElement(l,{value:s.taxonomy,onChange:e=>i({taxonomy:e})})))},save(){return null}})}(); -
taro-taxonomy-blocks/trunk/package.json
r2999435 r3208360 22 22 }, 23 23 "devDependencies": { 24 "@babel/core": "^7. 1.0",24 "@babel/core": "^7.23.9", 25 25 "@babel/eslint-parser": "^7.23.3", 26 26 "@babel/plugin-transform-react-jsx": "^7.0.0", 27 "@babel/preset-env": "^7. 1.0",27 "@babel/preset-env": "^7.23.9", 28 28 "@wordpress/env": "^8.0", 29 "@wordpress/eslint-plugin": "^17. 0",29 "@wordpress/eslint-plugin": "^17.7", 30 30 "babel-loader": "^9.1.3", 31 31 "eslint": "^8.53", -
taro-taxonomy-blocks/trunk/readme.txt
r2999435 r3208360 6 6 Requires at least: 5.9 7 7 Requires PHP: 7.2 8 Stable Tag: 1.2. 08 Stable Tag: 1.2.1 9 9 License: GPLv3 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-3.0.txt … … 71 71 == Changelog == 72 72 73 = 1.2.1 = 74 75 * Fix translations. 76 73 77 = 1.2.0 = 74 78 -
taro-taxonomy-blocks/trunk/taro-taxonomy-blocks.php
r2999435 r3208360 5 5 Description: Add 3 taxonomy blockshh for block editor. 6 6 Author: Tarosky INC. 7 Version: 1.2. 07 Version: 1.2.1 8 8 Author URI: https://tarosky.co.jp/ 9 9 License: GPL3 or later … … 65 65 ] ); 66 66 $taxonomies = apply_filters( 'taro_taxonomy_blocks_taxonomies', array_values( get_taxonomies( $tax_args, OBJECT ) ) ); 67 wp_set_script_translations( 'taro-taxonomy-selector', 'taro-taxonomy-blocks' ); 67 68 wp_localize_script( 'taro-taxonomy-selector', 'TaroTaxonomySelector', [ 68 69 'taxonomies' => $taxonomies, … … 309 310 'taxonomy' => $taxonomy->name, 310 311 'field' => 'term_id', 311 'terms' => array_map( function ( $term ) {312 'terms' => array_map( function ( $term ) { 312 313 return $term->term_id; 313 314 }, $terms ), -
taro-taxonomy-blocks/trunk/template-parts/taxonomy-blocks/term-list-hierarchical.php
r2999435 r3208360 8 8 9 9 $parent = empty( $args['parent'] ) ? 0 : $args['parent']; 10 $terms = array_values( array_filter( $args['terms'], function ( $term ) use ( $parent ) {10 $terms = array_values( array_filter( $args['terms'], function ( $term ) use ( $parent ) { 11 11 return (int) $parent === (int) $term->parent; 12 12 } ) );
Note: See TracChangeset
for help on using the changeset viewer.