Changeset 2999435
- Timestamp:
- 11/21/2023 09:13:55 AM (2 years ago)
- Location:
- taro-taxonomy-blocks
- Files:
-
- 39 edited
- 1 copied
-
assets/icon.svg (modified) (1 prop)
-
tags/1.2.0 (copied) (copied from taro-taxonomy-blocks/trunk)
-
tags/1.2.0/assets/js/block-posts-terms-query.js (modified) (2 diffs)
-
tags/1.2.0/assets/js/block-posts-terms.js (modified) (1 diff)
-
tags/1.2.0/assets/js/block-terms.js (modified) (1 diff)
-
tags/1.2.0/assets/js/taxonomy-selector.js (modified) (6 diffs)
-
tags/1.2.0/composer.json (modified) (2 diffs)
-
tags/1.2.0/dist/css/editor-block-terms.css (modified) (1 diff)
-
tags/1.2.0/dist/css/map/editor-block-terms.css.map (modified) (1 diff)
-
tags/1.2.0/dist/css/map/style-block-terms.css.map (modified) (1 diff)
-
tags/1.2.0/dist/css/style-block-terms.css (modified) (1 diff)
-
tags/1.2.0/dist/js/block-posts-terms-query.js (modified) (1 diff)
-
tags/1.2.0/dist/js/block-posts-terms.js (modified) (1 diff)
-
tags/1.2.0/dist/js/block-terms.js (modified) (1 diff)
-
tags/1.2.0/dist/js/taxonomy-selector.js (modified) (1 diff)
-
tags/1.2.0/gulpfile.js (modified) (3 diffs)
-
tags/1.2.0/package.json (modified) (1 diff)
-
tags/1.2.0/readme.txt (modified) (2 diffs)
-
tags/1.2.0/taro-taxonomy-blocks.php (modified) (3 diffs)
-
tags/1.2.0/template-parts/taxonomy-blocks/term-list-hierarchical.php (modified) (2 diffs)
-
tags/1.2.0/template-parts/taxonomy-blocks/term-list.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/assets/js/taxonomy-selector.js (modified) (6 diffs)
-
trunk/composer.json (modified) (2 diffs)
-
trunk/dist/css/editor-block-terms.css (modified) (1 diff)
-
trunk/dist/css/map/editor-block-terms.css.map (modified) (1 diff)
-
trunk/dist/css/map/style-block-terms.css.map (modified) (1 diff)
-
trunk/dist/css/style-block-terms.css (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/dist/js/taxonomy-selector.js (modified) (1 diff)
-
trunk/gulpfile.js (modified) (3 diffs)
-
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) (2 diffs)
-
trunk/template-parts/taxonomy-blocks/term-list.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
taro-taxonomy-blocks/assets/icon.svg
-
Property
svn:mime-type
set to
image/svg+xml
-
Property
svn:mime-type
set to
-
taro-taxonomy-blocks/tags/1.2.0/assets/js/block-posts-terms-query.js
r2657652 r2999435 47 47 help={ __( 'Enter post types in csv format. "any" is also available. If empty, current post type will be used.', 'taro-taxonomy-blocks' ) } 48 48 /> 49 <TaxonomySelector value={ attributes.taxonomy } onChange={ taxonomy=> setAttributes( { taxonomy } ) } />49 <TaxonomySelector value={ attributes.taxonomy } onChange={ ( taxonomy ) => setAttributes( { taxonomy } ) } /> 50 50 <TextControl value={ attributes.terms } label={ __( 'Term Slugs', 'label' ) } 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' ) } 53 onChange={ ( terms ) => setAttributes( { terms } ) } />53 onChange={ ( terms ) => setAttributes( { terms } ) } /> 54 54 <TextControl label={ __( 'Number of Posts', 'taro-taxonomy-blocks' ) } type="number" min={ -1 } 55 55 value={ attributes.limit } … … 63 63 64 64 { ( ! attributes.taxonomy ) ? ( 65 <div style={ { margin: "40px 0"} }>65 <div style={ { margin: '40px 0' } }> 66 66 <p>{ __( 'No taxonomy set. Please choose one.', 'taro-taxonomy-' ) }</p> 67 <TaxonomySelector value={ attributes.taxonomy } onChange={ taxonomy=> setAttributes( { taxonomy } ) } />67 <TaxonomySelector value={ attributes.taxonomy } onChange={ ( taxonomy ) => setAttributes( { taxonomy } ) } /> 68 68 </div> 69 69 ) : ( -
taro-taxonomy-blocks/tags/1.2.0/assets/js/block-posts-terms.js
r2605922 r2999435 39 39 <InspectorControls> 40 40 <PanelBody defaultOpen={ true } title={ __( 'Taxonomy Setting', 'taro-taxonomy-blocks' ) } > 41 <TaxonomySelector value={ attributes.taxonomy } onChange={ taxonomy=> setAttributes( { taxonomy } ) } />41 <TaxonomySelector value={ attributes.taxonomy } onChange={ ( taxonomy ) => setAttributes( { taxonomy } ) } /> 42 42 </PanelBody> 43 43 </InspectorControls> 44 44 45 45 { ( ! attributes.taxonomy ) ? ( 46 <div style={ { margin: "40px 0"} }>46 <div style={ { margin: '40px 0' } }> 47 47 <p>{ __( 'No taxonomy set. Please choose one.', 'taro-taxonomy-' ) }</p> 48 <TaxonomySelector value={ attributes.taxonomy } onChange={ taxonomy=> setAttributes( { taxonomy } ) } />48 <TaxonomySelector value={ attributes.taxonomy } onChange={ ( taxonomy ) => setAttributes( { taxonomy } ) } /> 49 49 </div> 50 50 ) : ( -
taro-taxonomy-blocks/tags/1.2.0/assets/js/block-terms.js
r2605922 r2999435 37 37 <InspectorControls> 38 38 <PanelBody defaultOpen={ true } title={ __( 'Taxonomy Setting', 'taro-taxonomy-blocks' ) } > 39 <TaxonomySelector value={ attributes.taxonomy } onChange={ taxonomy=> setAttributes( { taxonomy } ) } />39 <TaxonomySelector value={ attributes.taxonomy } onChange={ ( taxonomy ) => setAttributes( { taxonomy } ) } /> 40 40 <ToggleControl checked={ attributes.hide_empty } label={ __( 'Hide Empty', 'taro-taxonomy-blocks' ) } onChange={ ( hideEmpty ) => setAttributes( { hide_empty: hideEmpty } ) } /> 41 41 <hr /> 42 42 <OrderBySelector value={ attributes.orderby } onChange={ ( orderby ) => setAttributes( { orderby } ) } /> 43 <TextControl label={ __( 'Custom Field(optional)', 'taro-taxonomy-blocks' ) } value={ attributes.meta } onChange={ meta=> setAttributes( { meta } ) } />43 <TextControl label={ __( 'Custom Field(optional)', 'taro-taxonomy-blocks' ) } value={ attributes.meta } onChange={ ( meta ) => setAttributes( { meta } ) } /> 44 44 <OrderSelector value={ attributes.order } onChange={ ( order ) => setAttributes( { order } ) } /> 45 45 </PanelBody> 46 46 </InspectorControls> 47 47 48 { ( ! attributes.taxonomy ) ? (49 <div style={ { margin: "40px 0"} }>50 <p>{ __( 'No taxonomy set. Please choose one.', 'taro-taxonomy-' ) }</p>51 <TaxonomySelector value={ attributes.taxonomy } onChange={ taxonomy=> setAttributes( { taxonomy } ) } />52 </div>53 ) : (54 <div className="taro-taxonomy-blocks-editor">55 <ServerSideRender block="taro/terms" attributes={ attributes } />56 </div>57 ) }48 { ( ! attributes.taxonomy ) ? ( 49 <div style={ { margin: '40px 0' } }> 50 <p>{ __( 'No taxonomy set. Please choose one.', 'taro-taxonomy-' ) }</p> 51 <TaxonomySelector value={ attributes.taxonomy } onChange={ ( taxonomy ) => setAttributes( { taxonomy } ) } /> 52 </div> 53 ) : ( 54 <div className="taro-taxonomy-blocks-editor"> 55 <ServerSideRender block="taro/terms" attributes={ attributes } /> 56 </div> 57 ) } 58 58 </> 59 59 ); -
taro-taxonomy-blocks/tags/1.2.0/assets/js/taxonomy-selector.js
r2605922 r2999435 12 12 label: __( 'Please Select', 'taro-taxonomy-blocks' ), 13 13 value: '', 14 } 14 }, 15 15 ]; 16 16 … … 24 24 const TaxonomySelector = ( { value, onChange } ) => { 25 25 return ( 26 <SelectControl label={ __( 'Taxonomy', 'taro-taxonomy-blocks' ) } options={ taxonomyOptions } value={ value } onChange={ taxonomy=> onChange( taxonomy ) } />26 <SelectControl label={ __( 'Taxonomy', 'taro-taxonomy-blocks' ) } options={ taxonomyOptions } value={ value } onChange={ ( taxonomy ) => onChange( taxonomy ) } /> 27 27 ); 28 28 }; … … 30 30 const OrderSelector = ( { value, onChange } ) => { 31 31 return ( 32 <SelectControl label={ __( 'Order', 'taro-taxonomy-blocks' ) } onChange={ order=> onChange( order ) }32 <SelectControl label={ __( 'Order', 'taro-taxonomy-blocks' ) } onChange={ ( order ) => onChange( order ) } 33 33 value={ value } 34 34 options={ [ … … 41 41 value: 'DESC', 42 42 }, 43 ] } />43 ] } /> 44 44 ); 45 45 }; … … 47 47 const OrderBySelector = ( { value, onChange } ) => { 48 48 return ( 49 <SelectControl label={ __( 'Order By', 'taro-taxonomy-blocks' ) } onChange={ orderby=> onChange( orderby ) }49 <SelectControl label={ __( 'Order By', 'taro-taxonomy-blocks' ) } onChange={ ( orderby ) => onChange( orderby ) } 50 50 value={ value } 51 51 options={ [ … … 70 70 const PostsOrderBySelector = ( { value, onChange } ) => { 71 71 return ( 72 <SelectControl label={ __( 'Order By', 'taro-taxonomy-blocks' ) } onChange={ orderby=> onChange( orderby ) }72 <SelectControl label={ __( 'Order By', 'taro-taxonomy-blocks' ) } onChange={ ( orderby ) => onChange( orderby ) } 73 73 value={ value } 74 74 options={ [ -
taro-taxonomy-blocks/tags/1.2.0/composer.json
r2605922 r2999435 5 5 "license": "GPL-3.0-or-later", 6 6 "scripts": { 7 "test": [ 8 "phpcs --config-set installed_paths $(pwd)/vendor/wp-coding-standards/wpcs", 7 "lint": [ 9 8 "phpcs --standard=phpcs.ruleset.xml $(find ./ -name '*.php')" 10 9 ], 11 10 "fix": [ 12 "phpcs --config-set installed_paths $(pwd)/vendor/wp-coding-standards/wpcs",13 11 "phpcbf --standard=phpcs.ruleset.xml $(find ./ -name '*.php')" 14 12 ] … … 21 19 ], 22 20 "require": { 23 "php": " ^5.6|^7.0"21 "php": ">=7.2" 24 22 }, 25 23 "require-dev": { 26 24 "squizlabs/php_codesniffer": "^3.0", 27 "wp-coding-standards/wpcs": "^2.0" 25 "wp-coding-standards/wpcs": "^2.0", 26 "phpcompatibility/php-compatibility": "^9.3", 27 "dealerdirect/phpcodesniffer-composer-installer": "^1.0" 28 }, 29 "config": { 30 "allow-plugins": { 31 "dealerdirect/phpcodesniffer-composer-installer": true 32 } 28 33 } 29 34 } -
taro-taxonomy-blocks/tags/1.2.0/dist/css/editor-block-terms.css
r2605922 r2999435 1 1 .taro-taxonomy-blocks-editor{position:relative}.taro-taxonomy-blocks-editor::after{content:"";display:block;position:absolute;top:0;left:0;right:0;bottom:0;z-index:10} 2 3 2 /*# sourceMappingURL=map/editor-block-terms.css.map */ -
taro-taxonomy-blocks/tags/1.2.0/dist/css/map/editor-block-terms.css.map
r2605922 r2999435 1 {"version":3,"sources":["editor-block-terms.scss"],"names":[],"mappings":"AAAA,6BAEC,iBAA kB,CAFnB,oCAKE,UAAW,CACX,aAAc,CACd,iBAAkB,CAClB,KAAM,CACN,MAAO,CACP,OAAQ,CACR,QAAS,CACT,UAAW","file":"../editor-block-terms.css","sourcesContent":[".taro-taxonomy-blocks-editor {\n\n\tposition: relative;\n\n\t&::after {\n\t\tcontent: \"\";\n\t\tdisplay: block;\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\tleft: 0;\n\t\tright: 0;\n\t\tbottom: 0;\n\t\tz-index: 10;\n\t}\n}\n"]}1 {"version":3,"sources":["editor-block-terms.scss"],"names":[],"mappings":"AAAA,6BAEC,iBAAA,CAEA,oCACC,UAAA,CACA,aAAA,CACA,iBAAA,CACA,KAAA,CACA,MAAA,CACA,OAAA,CACA,QAAA,CACA,UAAA","file":"../editor-block-terms.css","sourcesContent":[".taro-taxonomy-blocks-editor {\n\n\tposition: relative;\n\n\t&::after {\n\t\tcontent: \"\";\n\t\tdisplay: block;\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\tleft: 0;\n\t\tright: 0;\n\t\tbottom: 0;\n\t\tz-index: 10;\n\t}\n}\n"]} -
taro-taxonomy-blocks/tags/1.2.0/dist/css/map/style-block-terms.css.map
r2605922 r2999435 1 {"version":3,"sources":["style-block-terms.scss"],"names":[],"mappings":"AAEC,oBACC,SAA U,CACV,aAAc,CAEd,0BACC,aAAc,CADd,oDAIC,QAAS,CACT,oBAAqB,CALtB,mEAQE,eAAgB,CAChB,oBAMH,eAAgB,CAChB,oBAAqB,CACrB,kBAAmB,CAEnB,2BACC,aAAc,CACd,YAAa,CACb,yBAGA,eAAgB,CAChB,oBAAqB,CACrB,oBAAqB,CACrB,6BAA8B,CAC9B,iBAAkB,CAClB,+BAAgC,CANhC,+DAUC,sCAAyC,CACzC,2BAQF,SAAU,CACV,iBAAkB,CAClB,YAAa,CACb,cAAe,CACf,0BAGA,eAAgB,CAChB,YAAa,CACb,YAAa,CAEb,0CALD,0BAME,YAAa,CAKd,CAHA,0CARD,0BASE,aAAc,CAEf,CAED,0BACC,aAAc,CACd,sCAAyC,CACzC,YAAa,CACb,+BAAgC,CAJhC,iEAQC,sCAAyC,CACzC,2BAID,aAAc,CACd,eAAgB,CAChB,0BAGA,aAAc,CACd,eAAgB","file":"../style-block-terms.css","sourcesContent":[".taro-taxonomy {\n\n\t&-list {\n\t\tpadding: 0;\n\t\tmargin: 40px 0;\n\n\t\t&-child {\n\t\t\tmargin: 20px 0;\n\n\t\t\t& & {\n\t\t\t\tmargin: 0;\n\t\t\t\tdisplay: inline-block;\n\n\t\t\t\tli:first-child {\n\t\t\t\t\tmargin-left: 1em;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t&-item {\n\t\tlist-style: none;\n\t\tdisplay: inline-block;\n\t\tmargin: 0 1em 1em 0;\n\n\t\t&-parent {\n\t\t\tdisplay: block;\n\t\t\tmargin: 1em 0;\n\t\t}\n\n\t\t&-link {\n\t\t\tfont-size: .85em;\n\t\t\tdisplay: inline-block;\n\t\t\tpadding: 0.25em 0.5em;\n\t\t\tborder: 1px solid currentColor;\n\t\t\tborder-radius: 1em;\n\t\t\ttext-decoration: none !important;\n\n\t\t\t&:hover,\n\t\t\t&:active {\n\t\t\t\tbackground-color: rgba(255, 255, 255, .2);\n\t\t\t}\n\t\t}\n\t}\n}\n\n.taro-taxonomy-query {\n\n\t&-block {\n\t\tpadding: 0;\n\t\tmargin: 40px -10px;\n\t\tdisplay: flex;\n\t\tflex-wrap: wrap;\n\t}\n\n\t&-item {\n\t\tlist-style: none;\n\t\tflex: 0 1 33%;\n\t\tpadding: 10px;\n\n\t\t@media only screen and ( max-width: 767px ) {\n\t\t\tflex: 0 1 50%;\n\t\t}\n\t\t@media only screen and ( max-width: 420px ) {\n\t\t\tflex: 0 1 100%;\n\t\t}\n\t}\n\n\t&-link {\n\t\tdisplay: block;\n\t\tbackground-color: rgba(255, 255, 255, .4);\n\t\tpadding: 10px;\n\t\ttext-decoration: none !important;\n\n\t\t&:hover,\n\t\t&:active {\n\t\t\tbackground-color: rgba(255, 255, 255, .8);\n\t\t}\n\t}\n\n\t&-title {\n\t\tdisplay: block;\n\t\tfont-weight: 700;\n\t}\n\n\t&-date {\n\t\tdisplay: block;\n\t\tfont-size: 0.8em;\n\t}\n}\n"]}1 {"version":3,"sources":["style-block-terms.scss"],"names":[],"mappings":"AAEC,oBACC,SAAA,CACA,aAAA,CAEA,0BACC,aAAA,CAEA,oDACC,QAAA,CACA,oBAAA,CAEA,mEACC,eAAA,CAMJ,oBACC,eAAA,CACA,oBAAA,CACA,kBAAA,CAEA,2BACC,aAAA,CACA,YAAA,CAGD,yBACC,eAAA,CACA,oBAAA,CACA,kBAAA,CACA,6BAAA,CACA,iBAAA,CACA,+BAAA,CAEA,+DAEC,qCAAA,CAQH,2BACC,SAAA,CACA,iBAAA,CACA,YAAA,CACA,cAAA,CAGD,0BACC,eAAA,CACA,YAAA,CACA,YAAA,CAEA,0CALD,0BAME,YAAA,CAAA,CAED,0CARD,0BASE,aAAA,CAAA,CAIF,0BACC,aAAA,CACA,qCAAA,CACA,YAAA,CACA,+BAAA,CAEA,iEAEC,qCAAA,CAIF,2BACC,aAAA,CACA,eAAA,CAGD,0BACC,aAAA,CACA,cAAA","file":"../style-block-terms.css","sourcesContent":[".taro-taxonomy {\n\n\t&-list {\n\t\tpadding: 0;\n\t\tmargin: 40px 0;\n\n\t\t&-child {\n\t\t\tmargin: 20px 0;\n\n\t\t\t& & {\n\t\t\t\tmargin: 0;\n\t\t\t\tdisplay: inline-block;\n\n\t\t\t\tli:first-child {\n\t\t\t\t\tmargin-left: 1em;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t&-item {\n\t\tlist-style: none;\n\t\tdisplay: inline-block;\n\t\tmargin: 0 1em 1em 0;\n\n\t\t&-parent {\n\t\t\tdisplay: block;\n\t\t\tmargin: 1em 0;\n\t\t}\n\n\t\t&-link {\n\t\t\tfont-size: .85em;\n\t\t\tdisplay: inline-block;\n\t\t\tpadding: 0.25em 0.5em;\n\t\t\tborder: 1px solid currentColor;\n\t\t\tborder-radius: 1em;\n\t\t\ttext-decoration: none !important;\n\n\t\t\t&:hover,\n\t\t\t&:active {\n\t\t\t\tbackground-color: rgba(255, 255, 255, .2);\n\t\t\t}\n\t\t}\n\t}\n}\n\n.taro-taxonomy-query {\n\n\t&-block {\n\t\tpadding: 0;\n\t\tmargin: 40px -10px;\n\t\tdisplay: flex;\n\t\tflex-wrap: wrap;\n\t}\n\n\t&-item {\n\t\tlist-style: none;\n\t\tflex: 0 1 33%;\n\t\tpadding: 10px;\n\n\t\t@media only screen and ( max-width: 767px ) {\n\t\t\tflex: 0 1 50%;\n\t\t}\n\t\t@media only screen and ( max-width: 420px ) {\n\t\t\tflex: 0 1 100%;\n\t\t}\n\t}\n\n\t&-link {\n\t\tdisplay: block;\n\t\tbackground-color: rgba(255, 255, 255, .4);\n\t\tpadding: 10px;\n\t\ttext-decoration: none !important;\n\n\t\t&:hover,\n\t\t&:active {\n\t\t\tbackground-color: rgba(255, 255, 255, .8);\n\t\t}\n\t}\n\n\t&-title {\n\t\tdisplay: block;\n\t\tfont-weight: 700;\n\t}\n\n\t&-date {\n\t\tdisplay: block;\n\t\tfont-size: 0.8em;\n\t}\n}\n"]} -
taro-taxonomy-blocks/tags/1.2.0/dist/css/style-block-terms.css
r2605922 r2999435 1 .taro-taxonomy-list{padding:0;margin:40px 0}.taro-taxonomy-list-child{margin:20px 0}.taro-taxonomy-list-child .taro-taxonomy-list-child{margin:0;display:inline-block}.taro-taxonomy-list-child .taro-taxonomy-list-child li:first-child{margin-left:1em}.taro-taxonomy-item{list-style:none;display:inline-block;margin:0 1em 1em 0}.taro-taxonomy-item-parent{display:block;margin:1em 0}.taro-taxonomy-item-link{font-size:.85em;display:inline-block;padding:0.25em 0.5em;border:1px solid currentColor;border-radius:1em;text-decoration:none !important}.taro-taxonomy-item-link:hover,.taro-taxonomy-item-link:active{background-color:rgba(255,255,255,0.2)}.taro-taxonomy-query-block{padding:0;margin:40px -10px;display:flex;flex-wrap:wrap}.taro-taxonomy-query-item{list-style:none;flex:0 1 33%;padding:10px}@media only screen and (max-width: 767px){.taro-taxonomy-query-item{flex:0 1 50%}}@media only screen and (max-width: 420px){.taro-taxonomy-query-item{flex:0 1 100%}}.taro-taxonomy-query-link{display:block;background-color:rgba(255,255,255,0.4);padding:10px;text-decoration:none !important}.taro-taxonomy-query-link:hover,.taro-taxonomy-query-link:active{background-color:rgba(255,255,255,0.8)}.taro-taxonomy-query-title{display:block;font-weight:700}.taro-taxonomy-query-date{display:block;font-size:0.8em} 2 1 .taro-taxonomy-list{padding:0;margin:40px 0}.taro-taxonomy-list-child{margin:20px 0}.taro-taxonomy-list-child .taro-taxonomy-list-child{margin:0;display:inline-block}.taro-taxonomy-list-child .taro-taxonomy-list-child li:first-child{margin-left:1em}.taro-taxonomy-item{list-style:none;display:inline-block;margin:0 1em 1em 0}.taro-taxonomy-item-parent{display:block;margin:1em 0}.taro-taxonomy-item-link{font-size:.85em;display:inline-block;padding:.25em .5em;border:1px solid currentColor;border-radius:1em;text-decoration:none !important}.taro-taxonomy-item-link:hover,.taro-taxonomy-item-link:active{background-color:rgba(255,255,255,.2)}.taro-taxonomy-query-block{padding:0;margin:40px -10px;display:flex;flex-wrap:wrap}.taro-taxonomy-query-item{list-style:none;flex:0 1 33%;padding:10px}@media only screen and (max-width: 767px){.taro-taxonomy-query-item{flex:0 1 50%}}@media only screen and (max-width: 420px){.taro-taxonomy-query-item{flex:0 1 100%}}.taro-taxonomy-query-link{display:block;background-color:rgba(255,255,255,.4);padding:10px;text-decoration:none !important}.taro-taxonomy-query-link:hover,.taro-taxonomy-query-link:active{background-color:rgba(255,255,255,.8)}.taro-taxonomy-query-title{display:block;font-weight:700}.taro-taxonomy-query-date{display:block;font-size:.8em} 3 2 /*# sourceMappingURL=map/style-block-terms.css.map */ -
taro-taxonomy-blocks/tags/1.2.0/dist/js/block-posts-terms-query.js
r2657652 r2999435 1 1 /*! License information can be found in block-posts-terms-query.js.LICENSE.txt */ 2 !function(){ var e=wp.blocks.registerBlockType,t=wp.i18n,__=t.__,sprintf=t.sprintf,o=wp.data.select,a=wp.blockEditor.InspectorControls,r=wp.components,n=r.PanelBody,l=r.TextControl,s=wp.serverSideRender,c=wp.taro,m=c.TaxonomySelector,i=c.OrderSelector,u=c.PostsOrderBySelector;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:function(e){var t=e.attributes,r=e.setAttributes,c=sprintf(__("Default: %s","taro-taxonomy-blocks"),o("core/editor").getCurrentPostType());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 return React.createElement(React.Fragment,null,React.createElement(a,null,React.createElement(n,{defaultOpen:!0,title:__("Taxonomy Setting","taro-taxonomy-blocks")},React.createElement(l,{label:__("Post Type","taro-taxonomy-blocks"),value:t.post_type,placeholder:c,onChange:function(e){return r({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(m,{value:t.taxonomy,onChange:function(e){return r({taxonomy:e})}}),React.createElement(l,{value:t.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:function(e){return r({terms:e})}}),React.createElement(l,{label:__("Number of Posts","taro-taxonomy-blocks"),type:"number",min:-1,value:t.limit,placeholder:10,onChange:function(e){return r({limit:parseInt(e)})}}),React.createElement(u,{valu:t.orderby,onChange:function(e){return r({orderby:e})}}),React.createElement(i,{value:t.order,onChange:function(e){return r({order:e})}}))),t.taxonomy?React.createElement("div",{className:"taro-taxonomy-blocks-editor"},React.createElement(s,{block:"taro/post-terms-query",attributes:t})):React.createElement("div",{style:{margin:"40px 0"}},React.createElement("p",null,__("No taxonomy set. Please choose one.","taro-taxonomy-")),React.createElement(m,{value:t.taxonomy,onChange:function(e){return r({taxonomy:e})}})))},save:function(){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","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}})}(); -
taro-taxonomy-blocks/tags/1.2.0/dist/js/block-posts-terms.js
r2627101 r2999435 1 1 /*! License information can be found in block-posts-terms.js.LICENSE.txt */ 2 !function(){ var t=wp.blocks.registerBlockType,__=wp.i18n.__,e=wp.blockEditor.InspectorControls,o=wp.components.PanelBody,a=wp.serverSideRender,n=wp.taro.TaxonomySelector;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:function(t){var r=t.attributes,c=t.setAttributes;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:function(t){return c({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:function(t){return c({taxonomy:t})}})))},save:function(){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-")),React.createElement(n,{value:r.taxonomy,onChange:t=>s({taxonomy:t})})))},save(){return null}})}(); -
taro-taxonomy-blocks/tags/1.2.0/dist/js/block-terms.js
r2627101 r2999435 1 1 /*! License information can be found in block-terms.js.LICENSE.txt */ 2 !function(){ var e=wp.blocks.registerBlockType,__=wp.i18n.__,t=wp.blockEditor.InspectorControls,o=wp.components,a=o.PanelBody,n=o.ToggleControl,r=o.TextControl,c=wp.serverSideRender,l=wp.taro,m=l.TaxonomySelector,i=l.OrderSelector,s=l.OrderBySelector;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:function(e){var o=e.attributes,l=e.setAttributes;return React.createElement(React.Fragment,null,React.createElement(t,null,React.createElement(a,{defaultOpen:!0,title:__("Taxonomy Setting","taro-taxonomy-blocks")},React.createElement(m,{value:o.taxonomy,onChange:function(e){return l({taxonomy:e})}}),React.createElement(n,{checked:o.hide_empty,label:__("Hide Empty","taro-taxonomy-blocks"),onChange:function(e){return l({hide_empty:e})}}),React.createElement("hr",null),React.createElement(s,{value:o.orderby,onChange:function(e){return l({orderby:e})}}),React.createElement(r,{label:__("Custom Field(optional)","taro-taxonomy-blocks"),value:o.meta,onChange:function(e){return l({meta:e})}}),React.createElement(i,{value:o.order,onChange:function(e){return l({order:e})}}))),o.taxonomy?React.createElement("div",{className:"taro-taxonomy-blocks-editor"},React.createElement(c,{block:"taro/terms",attributes:o})):React.createElement("div",{style:{margin:"40px 0"}},React.createElement("p",null,__("No taxonomy set. Please choose one.","taro-taxonomy-")),React.createElement(m,{value:o.taxonomy,onChange:function(e){return l({taxonomy:e})}})))},save:function(){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-")),React.createElement(l,{value:s.taxonomy,onChange:e=>i({taxonomy:e})})))},save(){return null}})}(); -
taro-taxonomy-blocks/tags/1.2.0/dist/js/taxonomy-selector.js
r2627101 r2999435 1 1 /*! License information can be found in taxonomy-selector.js.LICENSE.txt */ 2 !function(){ var __=wp.i18n.__,o=wp.components.SelectControl,e=[{label:__("Please Select","taro-taxonomy-blocks"),value:""}];TaroTaxonomySelector.taxonomies.forEach((function(o){e.push({label:o.label,value:o.name})}));wp.taro||(wp.taro={}),wp.taro.TaxonomySelector=function(a){var t=a.value,n=a.onChange;return React.createElement(o,{label:__("Taxonomy","taro-taxonomy-blocks"),options:e,value:t,onChange:function(o){return n(o)}})},wp.taro.OrderSelector=function(e){var a=e.value,t=e.onChange;return React.createElement(o,{label:__("Order","taro-taxonomy-blocks"),onChange:function(o){return t(o)},value:a,options:[{label:__("Ascending","taro-taxonomy-blocks"),value:"ASC"},{label:__("Descending","taro-taxonomy-blocks"),value:"DESC"}]})},wp.taro.OrderBySelector=function(e){var a=e.value,t=e.onChange;return React.createElement(o,{label:__("Order By","taro-taxonomy-blocks"),onChange:function(o){return t(o)},value:a,options:[{label:__("Name","taro-taxonomy-blocks"),value:"name"},{label:__("Slug","taro-taxonomy-blocks"),value:"slug"},{label:__("Count","taro-taxonomy-blocks"),value:"count"}],help:__("To use custom fields for sort, enter the field name above.","taro-taxonomy-blocks")})},wp.taro.PostsOrderBySelector=function(e){var a=e.value,t=e.onChange;return React.createElement(o,{label:__("Order By","taro-taxonomy-blocks"),onChange:function(o){return t(o)},value:a,options:[{label:__("Date","taro-taxonomy-blocks"),value:"date"},{label:__("Random","taro-taxonomy-blocks"),value:"rand"},{label:__("Menu Order","taro-taxonomy-blocks"),value:"menu_order"}],help:__("To use custom fields for sort, enter the field name above.","taro-taxonomy-blocks")})}}();2 !function(){const{__:__}=wp.i18n,{SelectControl:e}=wp.components,o=[{label:__("Please Select","taro-taxonomy-blocks"),value:""}];TaroTaxonomySelector.taxonomies.forEach((e=>{o.push({label:e.label,value:e.name})}));wp.taro||(wp.taro={}),wp.taro.TaxonomySelector=a=>{let{value:l,onChange:t}=a;return React.createElement(e,{label:__("Taxonomy","taro-taxonomy-blocks"),options:o,value:l,onChange:e=>t(e)})},wp.taro.OrderSelector=o=>{let{value:a,onChange:l}=o;return React.createElement(e,{label:__("Order","taro-taxonomy-blocks"),onChange:e=>l(e),value:a,options:[{label:__("Ascending","taro-taxonomy-blocks"),value:"ASC"},{label:__("Descending","taro-taxonomy-blocks"),value:"DESC"}]})},wp.taro.OrderBySelector=o=>{let{value:a,onChange:l}=o;return React.createElement(e,{label:__("Order By","taro-taxonomy-blocks"),onChange:e=>l(e),value:a,options:[{label:__("Name","taro-taxonomy-blocks"),value:"name"},{label:__("Slug","taro-taxonomy-blocks"),value:"slug"},{label:__("Count","taro-taxonomy-blocks"),value:"count"}],help:__("To use custom fields for sort, enter the field name above.","taro-taxonomy-blocks")})},wp.taro.PostsOrderBySelector=o=>{let{value:a,onChange:l}=o;return React.createElement(e,{label:__("Order By","taro-taxonomy-blocks"),onChange:e=>l(e),value:a,options:[{label:__("Date","taro-taxonomy-blocks"),value:"date"},{label:__("Random","taro-taxonomy-blocks"),value:"rand"},{label:__("Menu Order","taro-taxonomy-blocks"),value:"menu_order"}],help:__("To use custom fields for sort, enter the field name above.","taro-taxonomy-blocks")})}}(); -
taro-taxonomy-blocks/tags/1.2.0/gulpfile.js
r2605922 r2999435 1 1 const gulp = require( 'gulp' ); 2 const fs = require( 'fs' );3 2 const $ = require( 'gulp-load-plugins' )(); 4 3 const webpack = require( 'webpack-stream' ); 5 4 const webpackBundle = require( 'webpack' ); 6 5 const named = require( 'vinyl-named' ); 6 const sass = require( 'gulp-sass' )( require( 'sass' ) ); 7 7 8 8 9 let plumber = true; … … 10 11 // Sassのタスク 11 12 gulp.task( 'sass', function () { 12 13 13 return gulp.src( [ './assets/scss/**/*.scss' ] ) 14 14 .pipe( $.plumber( { 15 15 errorHandler: $.notify.onError( '<%= error.message %>' ) 16 16 } ) ) 17 .pipe( $.sassGlob() )18 17 .pipe( $.sourcemaps.init() ) 19 .pipe( $.sass( {18 .pipe( sass( { 20 19 errLogToConsole: true, 21 20 outputStyle: 'compressed', … … 24 23 includePaths: [ 25 24 './assets/sass', 26 './vendor', 27 './node_modules/bootstrap-sass/assets/stylesheets', 28 './vendor/hametuha' 29 ] 25 ], 30 26 } ) ) 31 27 .pipe( $.autoprefixer() ) -
taro-taxonomy-blocks/tags/1.2.0/package.json
r2605922 r2999435 18 18 "author": "Hametuha inc.", 19 19 "license": "LGPL-3.0-or-later", 20 "engines": { 21 "node": ">=16.0.0" 22 }, 20 23 "devDependencies": { 21 24 "@babel/core": "^7.1.0", 25 "@babel/eslint-parser": "^7.23.3", 22 26 "@babel/plugin-transform-react-jsx": "^7.0.0", 23 27 "@babel/preset-env": "^7.1.0", 24 "@wordpress/env": "^4.0", 25 "@wordpress/eslint-plugin": "^9.0", 26 "babel-eslint": "^10.0.1", 27 "babel-loader": "^8.0.5", 28 "eslint": "^7.13", 28 "@wordpress/env": "^8.0", 29 "@wordpress/eslint-plugin": "^17.0", 30 "babel-loader": "^9.1.3", 31 "eslint": "^8.53", 29 32 "gulp": "^4.0.0", 30 "gulp-autoprefixer": "^ 7.0.0",33 "gulp-autoprefixer": "^8.0.0", 31 34 "gulp-eslint": "^6.0.0", 32 35 "gulp-load-plugins": "^2.0", 33 "gulp-notify": "^ 3.2.0",36 "gulp-notify": "^4.0.0", 34 37 "gulp-plumber": "^1.2.0", 35 "gulp-rename": "^1.4.0", 36 "gulp-sass": "^4.0.2", 37 "gulp-sass-glob": "^1.0.9", 38 "gulp-rename": "^2.0.0", 39 "gulp-sass": "^5.1.0", 38 40 "gulp-sourcemaps": "^3.0", 39 41 "gulp-stylelint": "^13.0.0", 42 "sass": "1.69.5", 40 43 "stylelint": "^13.13.1", 41 44 "stylelint-config-wordpress": "^17.0.0", 42 45 "vinyl-named": "^1.1.0", 43 46 "webpack": "^5.3", 44 "webpack-stream": "^6.1" 45 }, 46 "dependencies": {} 47 "webpack-stream": "^7.0" 48 } 47 49 } -
taro-taxonomy-blocks/tags/1.2.0/readme.txt
r2667262 r2999435 3 3 Tags: gutenberg, block editor, iframe 4 4 Contributors: tarosky, Takahashi_Fumiki 5 Tested up to: 5.86 Requires at least: 5. 47 Requires PHP: 5.68 Stable Tag: 1. 1.25 Tested up to: 6.4 6 Requires at least: 5.9 7 Requires PHP: 7.2 8 Stable Tag: 1.2.0 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.0 = 74 75 * Drop support under PHP 7.2 76 * Add support for advanced class setting in the editor. 77 73 78 = 1.1.2 = 74 79 -
taro-taxonomy-blocks/tags/1.2.0/taro-taxonomy-blocks.php
r2667262 r2999435 5 5 Description: Add 3 taxonomy blockshh for block editor. 6 6 Author: Tarosky INC. 7 Version: 1. 1.27 Version: 1.2.0 8 8 Author URI: https://tarosky.co.jp/ 9 9 License: GPL3 or later … … 90 90 function taro_taxonomy_terms_blocks_option( $target = '' ) { 91 91 $args = [ 92 'taxonomy' => [ 92 'taxonomy' => [ 93 'type' => 'string', 94 'default' => '', 95 ], 96 'className' => [ 93 97 'type' => 'string', 94 98 'default' => '', … … 223 227 if ( $taxonomy->hierarchical ) { 224 228 taro_taxonomy_blocks_get_template_part( 'template-parts/taxonomy-blocks/term-list-hierarchical', $taxonomy->name, [ 225 'terms' => $terms, 226 'parent' => 0, 229 'terms' => $terms, 230 'parent' => 0, 231 'className' => $attributes['className'], 227 232 ] ); 228 233 } else { 229 234 taro_taxonomy_blocks_get_template_part( 'template-parts/taxonomy-blocks/term-list', $taxonomy->name, [ 230 'terms' => $terms, 235 'terms' => $terms, 236 'className' => $attributes['className'], 231 237 ] ); 232 238 } -
taro-taxonomy-blocks/tags/1.2.0/template-parts/taxonomy-blocks/term-list-hierarchical.php
r2605922 r2999435 4 4 * 5 5 * @package taro-taxonomy-blocks 6 * @var array{ parent: int, terms: WP_Term[] } $args6 * @var array{ parent: int, terms: WP_Term[], className: string } $args 7 7 */ 8 8 … … 18 18 $list_classes = [ 'taro-taxonomy-list', 'taro-taxonomy-list-hierarchical' ]; 19 19 $list_classes[] = $parent ? 'taro-taxonomy-list-child' : 'taro-taxonomy-list-parent'; 20 if ( $args['className'] ) { 21 $list_classes[] = $args['className']; 22 } 20 23 ?> 21 24 -
taro-taxonomy-blocks/tags/1.2.0/template-parts/taxonomy-blocks/term-list.php
r2605922 r2999435 4 4 * 5 5 * @package taro-taxonomy-blocks 6 * @var array{ terms: WP_Term[] } $args6 * @var array{ terms: WP_Term[], className: string } $args 7 7 */ 8 8 9 9 ?> 10 10 11 <ul class="taro-taxonomy-list ">11 <ul class="taro-taxonomy-list<?php echo $args['className'] ? esc_attr( ' ' . $args['className'] ) : ''; ?>"> 12 12 <?php foreach ( $args['terms'] as $term ) : ?> 13 13 <li class="taro-taxonomy-item taro-taxonomy-item" data-taxonomy="<?php echo esc_attr( $term->taxonomy ); ?>"> -
taro-taxonomy-blocks/trunk/assets/js/block-posts-terms-query.js
r2657652 r2999435 47 47 help={ __( 'Enter post types in csv format. "any" is also available. If empty, current post type will be used.', 'taro-taxonomy-blocks' ) } 48 48 /> 49 <TaxonomySelector value={ attributes.taxonomy } onChange={ taxonomy=> setAttributes( { taxonomy } ) } />49 <TaxonomySelector value={ attributes.taxonomy } onChange={ ( taxonomy ) => setAttributes( { taxonomy } ) } /> 50 50 <TextControl value={ attributes.terms } label={ __( 'Term Slugs', 'label' ) } 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' ) } 53 onChange={ ( terms ) => setAttributes( { terms } ) } />53 onChange={ ( terms ) => setAttributes( { terms } ) } /> 54 54 <TextControl label={ __( 'Number of Posts', 'taro-taxonomy-blocks' ) } type="number" min={ -1 } 55 55 value={ attributes.limit } … … 63 63 64 64 { ( ! attributes.taxonomy ) ? ( 65 <div style={ { margin: "40px 0"} }>65 <div style={ { margin: '40px 0' } }> 66 66 <p>{ __( 'No taxonomy set. Please choose one.', 'taro-taxonomy-' ) }</p> 67 <TaxonomySelector value={ attributes.taxonomy } onChange={ taxonomy=> setAttributes( { taxonomy } ) } />67 <TaxonomySelector value={ attributes.taxonomy } onChange={ ( taxonomy ) => setAttributes( { taxonomy } ) } /> 68 68 </div> 69 69 ) : ( -
taro-taxonomy-blocks/trunk/assets/js/block-posts-terms.js
r2605922 r2999435 39 39 <InspectorControls> 40 40 <PanelBody defaultOpen={ true } title={ __( 'Taxonomy Setting', 'taro-taxonomy-blocks' ) } > 41 <TaxonomySelector value={ attributes.taxonomy } onChange={ taxonomy=> setAttributes( { taxonomy } ) } />41 <TaxonomySelector value={ attributes.taxonomy } onChange={ ( taxonomy ) => setAttributes( { taxonomy } ) } /> 42 42 </PanelBody> 43 43 </InspectorControls> 44 44 45 45 { ( ! attributes.taxonomy ) ? ( 46 <div style={ { margin: "40px 0"} }>46 <div style={ { margin: '40px 0' } }> 47 47 <p>{ __( 'No taxonomy set. Please choose one.', 'taro-taxonomy-' ) }</p> 48 <TaxonomySelector value={ attributes.taxonomy } onChange={ taxonomy=> setAttributes( { taxonomy } ) } />48 <TaxonomySelector value={ attributes.taxonomy } onChange={ ( taxonomy ) => setAttributes( { taxonomy } ) } /> 49 49 </div> 50 50 ) : ( -
taro-taxonomy-blocks/trunk/assets/js/block-terms.js
r2605922 r2999435 37 37 <InspectorControls> 38 38 <PanelBody defaultOpen={ true } title={ __( 'Taxonomy Setting', 'taro-taxonomy-blocks' ) } > 39 <TaxonomySelector value={ attributes.taxonomy } onChange={ taxonomy=> setAttributes( { taxonomy } ) } />39 <TaxonomySelector value={ attributes.taxonomy } onChange={ ( taxonomy ) => setAttributes( { taxonomy } ) } /> 40 40 <ToggleControl checked={ attributes.hide_empty } label={ __( 'Hide Empty', 'taro-taxonomy-blocks' ) } onChange={ ( hideEmpty ) => setAttributes( { hide_empty: hideEmpty } ) } /> 41 41 <hr /> 42 42 <OrderBySelector value={ attributes.orderby } onChange={ ( orderby ) => setAttributes( { orderby } ) } /> 43 <TextControl label={ __( 'Custom Field(optional)', 'taro-taxonomy-blocks' ) } value={ attributes.meta } onChange={ meta=> setAttributes( { meta } ) } />43 <TextControl label={ __( 'Custom Field(optional)', 'taro-taxonomy-blocks' ) } value={ attributes.meta } onChange={ ( meta ) => setAttributes( { meta } ) } /> 44 44 <OrderSelector value={ attributes.order } onChange={ ( order ) => setAttributes( { order } ) } /> 45 45 </PanelBody> 46 46 </InspectorControls> 47 47 48 { ( ! attributes.taxonomy ) ? (49 <div style={ { margin: "40px 0"} }>50 <p>{ __( 'No taxonomy set. Please choose one.', 'taro-taxonomy-' ) }</p>51 <TaxonomySelector value={ attributes.taxonomy } onChange={ taxonomy=> setAttributes( { taxonomy } ) } />52 </div>53 ) : (54 <div className="taro-taxonomy-blocks-editor">55 <ServerSideRender block="taro/terms" attributes={ attributes } />56 </div>57 ) }48 { ( ! attributes.taxonomy ) ? ( 49 <div style={ { margin: '40px 0' } }> 50 <p>{ __( 'No taxonomy set. Please choose one.', 'taro-taxonomy-' ) }</p> 51 <TaxonomySelector value={ attributes.taxonomy } onChange={ ( taxonomy ) => setAttributes( { taxonomy } ) } /> 52 </div> 53 ) : ( 54 <div className="taro-taxonomy-blocks-editor"> 55 <ServerSideRender block="taro/terms" attributes={ attributes } /> 56 </div> 57 ) } 58 58 </> 59 59 ); -
taro-taxonomy-blocks/trunk/assets/js/taxonomy-selector.js
r2605922 r2999435 12 12 label: __( 'Please Select', 'taro-taxonomy-blocks' ), 13 13 value: '', 14 } 14 }, 15 15 ]; 16 16 … … 24 24 const TaxonomySelector = ( { value, onChange } ) => { 25 25 return ( 26 <SelectControl label={ __( 'Taxonomy', 'taro-taxonomy-blocks' ) } options={ taxonomyOptions } value={ value } onChange={ taxonomy=> onChange( taxonomy ) } />26 <SelectControl label={ __( 'Taxonomy', 'taro-taxonomy-blocks' ) } options={ taxonomyOptions } value={ value } onChange={ ( taxonomy ) => onChange( taxonomy ) } /> 27 27 ); 28 28 }; … … 30 30 const OrderSelector = ( { value, onChange } ) => { 31 31 return ( 32 <SelectControl label={ __( 'Order', 'taro-taxonomy-blocks' ) } onChange={ order=> onChange( order ) }32 <SelectControl label={ __( 'Order', 'taro-taxonomy-blocks' ) } onChange={ ( order ) => onChange( order ) } 33 33 value={ value } 34 34 options={ [ … … 41 41 value: 'DESC', 42 42 }, 43 ] } />43 ] } /> 44 44 ); 45 45 }; … … 47 47 const OrderBySelector = ( { value, onChange } ) => { 48 48 return ( 49 <SelectControl label={ __( 'Order By', 'taro-taxonomy-blocks' ) } onChange={ orderby=> onChange( orderby ) }49 <SelectControl label={ __( 'Order By', 'taro-taxonomy-blocks' ) } onChange={ ( orderby ) => onChange( orderby ) } 50 50 value={ value } 51 51 options={ [ … … 70 70 const PostsOrderBySelector = ( { value, onChange } ) => { 71 71 return ( 72 <SelectControl label={ __( 'Order By', 'taro-taxonomy-blocks' ) } onChange={ orderby=> onChange( orderby ) }72 <SelectControl label={ __( 'Order By', 'taro-taxonomy-blocks' ) } onChange={ ( orderby ) => onChange( orderby ) } 73 73 value={ value } 74 74 options={ [ -
taro-taxonomy-blocks/trunk/composer.json
r2605922 r2999435 5 5 "license": "GPL-3.0-or-later", 6 6 "scripts": { 7 "test": [ 8 "phpcs --config-set installed_paths $(pwd)/vendor/wp-coding-standards/wpcs", 7 "lint": [ 9 8 "phpcs --standard=phpcs.ruleset.xml $(find ./ -name '*.php')" 10 9 ], 11 10 "fix": [ 12 "phpcs --config-set installed_paths $(pwd)/vendor/wp-coding-standards/wpcs",13 11 "phpcbf --standard=phpcs.ruleset.xml $(find ./ -name '*.php')" 14 12 ] … … 21 19 ], 22 20 "require": { 23 "php": " ^5.6|^7.0"21 "php": ">=7.2" 24 22 }, 25 23 "require-dev": { 26 24 "squizlabs/php_codesniffer": "^3.0", 27 "wp-coding-standards/wpcs": "^2.0" 25 "wp-coding-standards/wpcs": "^2.0", 26 "phpcompatibility/php-compatibility": "^9.3", 27 "dealerdirect/phpcodesniffer-composer-installer": "^1.0" 28 }, 29 "config": { 30 "allow-plugins": { 31 "dealerdirect/phpcodesniffer-composer-installer": true 32 } 28 33 } 29 34 } -
taro-taxonomy-blocks/trunk/dist/css/editor-block-terms.css
r2605922 r2999435 1 1 .taro-taxonomy-blocks-editor{position:relative}.taro-taxonomy-blocks-editor::after{content:"";display:block;position:absolute;top:0;left:0;right:0;bottom:0;z-index:10} 2 3 2 /*# sourceMappingURL=map/editor-block-terms.css.map */ -
taro-taxonomy-blocks/trunk/dist/css/map/editor-block-terms.css.map
r2605922 r2999435 1 {"version":3,"sources":["editor-block-terms.scss"],"names":[],"mappings":"AAAA,6BAEC,iBAA kB,CAFnB,oCAKE,UAAW,CACX,aAAc,CACd,iBAAkB,CAClB,KAAM,CACN,MAAO,CACP,OAAQ,CACR,QAAS,CACT,UAAW","file":"../editor-block-terms.css","sourcesContent":[".taro-taxonomy-blocks-editor {\n\n\tposition: relative;\n\n\t&::after {\n\t\tcontent: \"\";\n\t\tdisplay: block;\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\tleft: 0;\n\t\tright: 0;\n\t\tbottom: 0;\n\t\tz-index: 10;\n\t}\n}\n"]}1 {"version":3,"sources":["editor-block-terms.scss"],"names":[],"mappings":"AAAA,6BAEC,iBAAA,CAEA,oCACC,UAAA,CACA,aAAA,CACA,iBAAA,CACA,KAAA,CACA,MAAA,CACA,OAAA,CACA,QAAA,CACA,UAAA","file":"../editor-block-terms.css","sourcesContent":[".taro-taxonomy-blocks-editor {\n\n\tposition: relative;\n\n\t&::after {\n\t\tcontent: \"\";\n\t\tdisplay: block;\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\tleft: 0;\n\t\tright: 0;\n\t\tbottom: 0;\n\t\tz-index: 10;\n\t}\n}\n"]} -
taro-taxonomy-blocks/trunk/dist/css/map/style-block-terms.css.map
r2605922 r2999435 1 {"version":3,"sources":["style-block-terms.scss"],"names":[],"mappings":"AAEC,oBACC,SAA U,CACV,aAAc,CAEd,0BACC,aAAc,CADd,oDAIC,QAAS,CACT,oBAAqB,CALtB,mEAQE,eAAgB,CAChB,oBAMH,eAAgB,CAChB,oBAAqB,CACrB,kBAAmB,CAEnB,2BACC,aAAc,CACd,YAAa,CACb,yBAGA,eAAgB,CAChB,oBAAqB,CACrB,oBAAqB,CACrB,6BAA8B,CAC9B,iBAAkB,CAClB,+BAAgC,CANhC,+DAUC,sCAAyC,CACzC,2BAQF,SAAU,CACV,iBAAkB,CAClB,YAAa,CACb,cAAe,CACf,0BAGA,eAAgB,CAChB,YAAa,CACb,YAAa,CAEb,0CALD,0BAME,YAAa,CAKd,CAHA,0CARD,0BASE,aAAc,CAEf,CAED,0BACC,aAAc,CACd,sCAAyC,CACzC,YAAa,CACb,+BAAgC,CAJhC,iEAQC,sCAAyC,CACzC,2BAID,aAAc,CACd,eAAgB,CAChB,0BAGA,aAAc,CACd,eAAgB","file":"../style-block-terms.css","sourcesContent":[".taro-taxonomy {\n\n\t&-list {\n\t\tpadding: 0;\n\t\tmargin: 40px 0;\n\n\t\t&-child {\n\t\t\tmargin: 20px 0;\n\n\t\t\t& & {\n\t\t\t\tmargin: 0;\n\t\t\t\tdisplay: inline-block;\n\n\t\t\t\tli:first-child {\n\t\t\t\t\tmargin-left: 1em;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t&-item {\n\t\tlist-style: none;\n\t\tdisplay: inline-block;\n\t\tmargin: 0 1em 1em 0;\n\n\t\t&-parent {\n\t\t\tdisplay: block;\n\t\t\tmargin: 1em 0;\n\t\t}\n\n\t\t&-link {\n\t\t\tfont-size: .85em;\n\t\t\tdisplay: inline-block;\n\t\t\tpadding: 0.25em 0.5em;\n\t\t\tborder: 1px solid currentColor;\n\t\t\tborder-radius: 1em;\n\t\t\ttext-decoration: none !important;\n\n\t\t\t&:hover,\n\t\t\t&:active {\n\t\t\t\tbackground-color: rgba(255, 255, 255, .2);\n\t\t\t}\n\t\t}\n\t}\n}\n\n.taro-taxonomy-query {\n\n\t&-block {\n\t\tpadding: 0;\n\t\tmargin: 40px -10px;\n\t\tdisplay: flex;\n\t\tflex-wrap: wrap;\n\t}\n\n\t&-item {\n\t\tlist-style: none;\n\t\tflex: 0 1 33%;\n\t\tpadding: 10px;\n\n\t\t@media only screen and ( max-width: 767px ) {\n\t\t\tflex: 0 1 50%;\n\t\t}\n\t\t@media only screen and ( max-width: 420px ) {\n\t\t\tflex: 0 1 100%;\n\t\t}\n\t}\n\n\t&-link {\n\t\tdisplay: block;\n\t\tbackground-color: rgba(255, 255, 255, .4);\n\t\tpadding: 10px;\n\t\ttext-decoration: none !important;\n\n\t\t&:hover,\n\t\t&:active {\n\t\t\tbackground-color: rgba(255, 255, 255, .8);\n\t\t}\n\t}\n\n\t&-title {\n\t\tdisplay: block;\n\t\tfont-weight: 700;\n\t}\n\n\t&-date {\n\t\tdisplay: block;\n\t\tfont-size: 0.8em;\n\t}\n}\n"]}1 {"version":3,"sources":["style-block-terms.scss"],"names":[],"mappings":"AAEC,oBACC,SAAA,CACA,aAAA,CAEA,0BACC,aAAA,CAEA,oDACC,QAAA,CACA,oBAAA,CAEA,mEACC,eAAA,CAMJ,oBACC,eAAA,CACA,oBAAA,CACA,kBAAA,CAEA,2BACC,aAAA,CACA,YAAA,CAGD,yBACC,eAAA,CACA,oBAAA,CACA,kBAAA,CACA,6BAAA,CACA,iBAAA,CACA,+BAAA,CAEA,+DAEC,qCAAA,CAQH,2BACC,SAAA,CACA,iBAAA,CACA,YAAA,CACA,cAAA,CAGD,0BACC,eAAA,CACA,YAAA,CACA,YAAA,CAEA,0CALD,0BAME,YAAA,CAAA,CAED,0CARD,0BASE,aAAA,CAAA,CAIF,0BACC,aAAA,CACA,qCAAA,CACA,YAAA,CACA,+BAAA,CAEA,iEAEC,qCAAA,CAIF,2BACC,aAAA,CACA,eAAA,CAGD,0BACC,aAAA,CACA,cAAA","file":"../style-block-terms.css","sourcesContent":[".taro-taxonomy {\n\n\t&-list {\n\t\tpadding: 0;\n\t\tmargin: 40px 0;\n\n\t\t&-child {\n\t\t\tmargin: 20px 0;\n\n\t\t\t& & {\n\t\t\t\tmargin: 0;\n\t\t\t\tdisplay: inline-block;\n\n\t\t\t\tli:first-child {\n\t\t\t\t\tmargin-left: 1em;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t&-item {\n\t\tlist-style: none;\n\t\tdisplay: inline-block;\n\t\tmargin: 0 1em 1em 0;\n\n\t\t&-parent {\n\t\t\tdisplay: block;\n\t\t\tmargin: 1em 0;\n\t\t}\n\n\t\t&-link {\n\t\t\tfont-size: .85em;\n\t\t\tdisplay: inline-block;\n\t\t\tpadding: 0.25em 0.5em;\n\t\t\tborder: 1px solid currentColor;\n\t\t\tborder-radius: 1em;\n\t\t\ttext-decoration: none !important;\n\n\t\t\t&:hover,\n\t\t\t&:active {\n\t\t\t\tbackground-color: rgba(255, 255, 255, .2);\n\t\t\t}\n\t\t}\n\t}\n}\n\n.taro-taxonomy-query {\n\n\t&-block {\n\t\tpadding: 0;\n\t\tmargin: 40px -10px;\n\t\tdisplay: flex;\n\t\tflex-wrap: wrap;\n\t}\n\n\t&-item {\n\t\tlist-style: none;\n\t\tflex: 0 1 33%;\n\t\tpadding: 10px;\n\n\t\t@media only screen and ( max-width: 767px ) {\n\t\t\tflex: 0 1 50%;\n\t\t}\n\t\t@media only screen and ( max-width: 420px ) {\n\t\t\tflex: 0 1 100%;\n\t\t}\n\t}\n\n\t&-link {\n\t\tdisplay: block;\n\t\tbackground-color: rgba(255, 255, 255, .4);\n\t\tpadding: 10px;\n\t\ttext-decoration: none !important;\n\n\t\t&:hover,\n\t\t&:active {\n\t\t\tbackground-color: rgba(255, 255, 255, .8);\n\t\t}\n\t}\n\n\t&-title {\n\t\tdisplay: block;\n\t\tfont-weight: 700;\n\t}\n\n\t&-date {\n\t\tdisplay: block;\n\t\tfont-size: 0.8em;\n\t}\n}\n"]} -
taro-taxonomy-blocks/trunk/dist/css/style-block-terms.css
r2605922 r2999435 1 .taro-taxonomy-list{padding:0;margin:40px 0}.taro-taxonomy-list-child{margin:20px 0}.taro-taxonomy-list-child .taro-taxonomy-list-child{margin:0;display:inline-block}.taro-taxonomy-list-child .taro-taxonomy-list-child li:first-child{margin-left:1em}.taro-taxonomy-item{list-style:none;display:inline-block;margin:0 1em 1em 0}.taro-taxonomy-item-parent{display:block;margin:1em 0}.taro-taxonomy-item-link{font-size:.85em;display:inline-block;padding:0.25em 0.5em;border:1px solid currentColor;border-radius:1em;text-decoration:none !important}.taro-taxonomy-item-link:hover,.taro-taxonomy-item-link:active{background-color:rgba(255,255,255,0.2)}.taro-taxonomy-query-block{padding:0;margin:40px -10px;display:flex;flex-wrap:wrap}.taro-taxonomy-query-item{list-style:none;flex:0 1 33%;padding:10px}@media only screen and (max-width: 767px){.taro-taxonomy-query-item{flex:0 1 50%}}@media only screen and (max-width: 420px){.taro-taxonomy-query-item{flex:0 1 100%}}.taro-taxonomy-query-link{display:block;background-color:rgba(255,255,255,0.4);padding:10px;text-decoration:none !important}.taro-taxonomy-query-link:hover,.taro-taxonomy-query-link:active{background-color:rgba(255,255,255,0.8)}.taro-taxonomy-query-title{display:block;font-weight:700}.taro-taxonomy-query-date{display:block;font-size:0.8em} 2 1 .taro-taxonomy-list{padding:0;margin:40px 0}.taro-taxonomy-list-child{margin:20px 0}.taro-taxonomy-list-child .taro-taxonomy-list-child{margin:0;display:inline-block}.taro-taxonomy-list-child .taro-taxonomy-list-child li:first-child{margin-left:1em}.taro-taxonomy-item{list-style:none;display:inline-block;margin:0 1em 1em 0}.taro-taxonomy-item-parent{display:block;margin:1em 0}.taro-taxonomy-item-link{font-size:.85em;display:inline-block;padding:.25em .5em;border:1px solid currentColor;border-radius:1em;text-decoration:none !important}.taro-taxonomy-item-link:hover,.taro-taxonomy-item-link:active{background-color:rgba(255,255,255,.2)}.taro-taxonomy-query-block{padding:0;margin:40px -10px;display:flex;flex-wrap:wrap}.taro-taxonomy-query-item{list-style:none;flex:0 1 33%;padding:10px}@media only screen and (max-width: 767px){.taro-taxonomy-query-item{flex:0 1 50%}}@media only screen and (max-width: 420px){.taro-taxonomy-query-item{flex:0 1 100%}}.taro-taxonomy-query-link{display:block;background-color:rgba(255,255,255,.4);padding:10px;text-decoration:none !important}.taro-taxonomy-query-link:hover,.taro-taxonomy-query-link:active{background-color:rgba(255,255,255,.8)}.taro-taxonomy-query-title{display:block;font-weight:700}.taro-taxonomy-query-date{display:block;font-size:.8em} 3 2 /*# sourceMappingURL=map/style-block-terms.css.map */ -
taro-taxonomy-blocks/trunk/dist/js/block-posts-terms-query.js
r2657652 r2999435 1 1 /*! License information can be found in block-posts-terms-query.js.LICENSE.txt */ 2 !function(){ var e=wp.blocks.registerBlockType,t=wp.i18n,__=t.__,sprintf=t.sprintf,o=wp.data.select,a=wp.blockEditor.InspectorControls,r=wp.components,n=r.PanelBody,l=r.TextControl,s=wp.serverSideRender,c=wp.taro,m=c.TaxonomySelector,i=c.OrderSelector,u=c.PostsOrderBySelector;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:function(e){var t=e.attributes,r=e.setAttributes,c=sprintf(__("Default: %s","taro-taxonomy-blocks"),o("core/editor").getCurrentPostType());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 return React.createElement(React.Fragment,null,React.createElement(a,null,React.createElement(n,{defaultOpen:!0,title:__("Taxonomy Setting","taro-taxonomy-blocks")},React.createElement(l,{label:__("Post Type","taro-taxonomy-blocks"),value:t.post_type,placeholder:c,onChange:function(e){return r({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(m,{value:t.taxonomy,onChange:function(e){return r({taxonomy:e})}}),React.createElement(l,{value:t.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:function(e){return r({terms:e})}}),React.createElement(l,{label:__("Number of Posts","taro-taxonomy-blocks"),type:"number",min:-1,value:t.limit,placeholder:10,onChange:function(e){return r({limit:parseInt(e)})}}),React.createElement(u,{valu:t.orderby,onChange:function(e){return r({orderby:e})}}),React.createElement(i,{value:t.order,onChange:function(e){return r({order:e})}}))),t.taxonomy?React.createElement("div",{className:"taro-taxonomy-blocks-editor"},React.createElement(s,{block:"taro/post-terms-query",attributes:t})):React.createElement("div",{style:{margin:"40px 0"}},React.createElement("p",null,__("No taxonomy set. Please choose one.","taro-taxonomy-")),React.createElement(m,{value:t.taxonomy,onChange:function(e){return r({taxonomy:e})}})))},save:function(){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","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}})}(); -
taro-taxonomy-blocks/trunk/dist/js/block-posts-terms.js
r2627101 r2999435 1 1 /*! License information can be found in block-posts-terms.js.LICENSE.txt */ 2 !function(){ var t=wp.blocks.registerBlockType,__=wp.i18n.__,e=wp.blockEditor.InspectorControls,o=wp.components.PanelBody,a=wp.serverSideRender,n=wp.taro.TaxonomySelector;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:function(t){var r=t.attributes,c=t.setAttributes;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:function(t){return c({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:function(t){return c({taxonomy:t})}})))},save:function(){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-")),React.createElement(n,{value:r.taxonomy,onChange:t=>s({taxonomy:t})})))},save(){return null}})}(); -
taro-taxonomy-blocks/trunk/dist/js/block-terms.js
r2627101 r2999435 1 1 /*! License information can be found in block-terms.js.LICENSE.txt */ 2 !function(){ var e=wp.blocks.registerBlockType,__=wp.i18n.__,t=wp.blockEditor.InspectorControls,o=wp.components,a=o.PanelBody,n=o.ToggleControl,r=o.TextControl,c=wp.serverSideRender,l=wp.taro,m=l.TaxonomySelector,i=l.OrderSelector,s=l.OrderBySelector;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:function(e){var o=e.attributes,l=e.setAttributes;return React.createElement(React.Fragment,null,React.createElement(t,null,React.createElement(a,{defaultOpen:!0,title:__("Taxonomy Setting","taro-taxonomy-blocks")},React.createElement(m,{value:o.taxonomy,onChange:function(e){return l({taxonomy:e})}}),React.createElement(n,{checked:o.hide_empty,label:__("Hide Empty","taro-taxonomy-blocks"),onChange:function(e){return l({hide_empty:e})}}),React.createElement("hr",null),React.createElement(s,{value:o.orderby,onChange:function(e){return l({orderby:e})}}),React.createElement(r,{label:__("Custom Field(optional)","taro-taxonomy-blocks"),value:o.meta,onChange:function(e){return l({meta:e})}}),React.createElement(i,{value:o.order,onChange:function(e){return l({order:e})}}))),o.taxonomy?React.createElement("div",{className:"taro-taxonomy-blocks-editor"},React.createElement(c,{block:"taro/terms",attributes:o})):React.createElement("div",{style:{margin:"40px 0"}},React.createElement("p",null,__("No taxonomy set. Please choose one.","taro-taxonomy-")),React.createElement(m,{value:o.taxonomy,onChange:function(e){return l({taxonomy:e})}})))},save:function(){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-")),React.createElement(l,{value:s.taxonomy,onChange:e=>i({taxonomy:e})})))},save(){return null}})}(); -
taro-taxonomy-blocks/trunk/dist/js/taxonomy-selector.js
r2627101 r2999435 1 1 /*! License information can be found in taxonomy-selector.js.LICENSE.txt */ 2 !function(){ var __=wp.i18n.__,o=wp.components.SelectControl,e=[{label:__("Please Select","taro-taxonomy-blocks"),value:""}];TaroTaxonomySelector.taxonomies.forEach((function(o){e.push({label:o.label,value:o.name})}));wp.taro||(wp.taro={}),wp.taro.TaxonomySelector=function(a){var t=a.value,n=a.onChange;return React.createElement(o,{label:__("Taxonomy","taro-taxonomy-blocks"),options:e,value:t,onChange:function(o){return n(o)}})},wp.taro.OrderSelector=function(e){var a=e.value,t=e.onChange;return React.createElement(o,{label:__("Order","taro-taxonomy-blocks"),onChange:function(o){return t(o)},value:a,options:[{label:__("Ascending","taro-taxonomy-blocks"),value:"ASC"},{label:__("Descending","taro-taxonomy-blocks"),value:"DESC"}]})},wp.taro.OrderBySelector=function(e){var a=e.value,t=e.onChange;return React.createElement(o,{label:__("Order By","taro-taxonomy-blocks"),onChange:function(o){return t(o)},value:a,options:[{label:__("Name","taro-taxonomy-blocks"),value:"name"},{label:__("Slug","taro-taxonomy-blocks"),value:"slug"},{label:__("Count","taro-taxonomy-blocks"),value:"count"}],help:__("To use custom fields for sort, enter the field name above.","taro-taxonomy-blocks")})},wp.taro.PostsOrderBySelector=function(e){var a=e.value,t=e.onChange;return React.createElement(o,{label:__("Order By","taro-taxonomy-blocks"),onChange:function(o){return t(o)},value:a,options:[{label:__("Date","taro-taxonomy-blocks"),value:"date"},{label:__("Random","taro-taxonomy-blocks"),value:"rand"},{label:__("Menu Order","taro-taxonomy-blocks"),value:"menu_order"}],help:__("To use custom fields for sort, enter the field name above.","taro-taxonomy-blocks")})}}();2 !function(){const{__:__}=wp.i18n,{SelectControl:e}=wp.components,o=[{label:__("Please Select","taro-taxonomy-blocks"),value:""}];TaroTaxonomySelector.taxonomies.forEach((e=>{o.push({label:e.label,value:e.name})}));wp.taro||(wp.taro={}),wp.taro.TaxonomySelector=a=>{let{value:l,onChange:t}=a;return React.createElement(e,{label:__("Taxonomy","taro-taxonomy-blocks"),options:o,value:l,onChange:e=>t(e)})},wp.taro.OrderSelector=o=>{let{value:a,onChange:l}=o;return React.createElement(e,{label:__("Order","taro-taxonomy-blocks"),onChange:e=>l(e),value:a,options:[{label:__("Ascending","taro-taxonomy-blocks"),value:"ASC"},{label:__("Descending","taro-taxonomy-blocks"),value:"DESC"}]})},wp.taro.OrderBySelector=o=>{let{value:a,onChange:l}=o;return React.createElement(e,{label:__("Order By","taro-taxonomy-blocks"),onChange:e=>l(e),value:a,options:[{label:__("Name","taro-taxonomy-blocks"),value:"name"},{label:__("Slug","taro-taxonomy-blocks"),value:"slug"},{label:__("Count","taro-taxonomy-blocks"),value:"count"}],help:__("To use custom fields for sort, enter the field name above.","taro-taxonomy-blocks")})},wp.taro.PostsOrderBySelector=o=>{let{value:a,onChange:l}=o;return React.createElement(e,{label:__("Order By","taro-taxonomy-blocks"),onChange:e=>l(e),value:a,options:[{label:__("Date","taro-taxonomy-blocks"),value:"date"},{label:__("Random","taro-taxonomy-blocks"),value:"rand"},{label:__("Menu Order","taro-taxonomy-blocks"),value:"menu_order"}],help:__("To use custom fields for sort, enter the field name above.","taro-taxonomy-blocks")})}}(); -
taro-taxonomy-blocks/trunk/gulpfile.js
r2605922 r2999435 1 1 const gulp = require( 'gulp' ); 2 const fs = require( 'fs' );3 2 const $ = require( 'gulp-load-plugins' )(); 4 3 const webpack = require( 'webpack-stream' ); 5 4 const webpackBundle = require( 'webpack' ); 6 5 const named = require( 'vinyl-named' ); 6 const sass = require( 'gulp-sass' )( require( 'sass' ) ); 7 7 8 8 9 let plumber = true; … … 10 11 // Sassのタスク 11 12 gulp.task( 'sass', function () { 12 13 13 return gulp.src( [ './assets/scss/**/*.scss' ] ) 14 14 .pipe( $.plumber( { 15 15 errorHandler: $.notify.onError( '<%= error.message %>' ) 16 16 } ) ) 17 .pipe( $.sassGlob() )18 17 .pipe( $.sourcemaps.init() ) 19 .pipe( $.sass( {18 .pipe( sass( { 20 19 errLogToConsole: true, 21 20 outputStyle: 'compressed', … … 24 23 includePaths: [ 25 24 './assets/sass', 26 './vendor', 27 './node_modules/bootstrap-sass/assets/stylesheets', 28 './vendor/hametuha' 29 ] 25 ], 30 26 } ) ) 31 27 .pipe( $.autoprefixer() ) -
taro-taxonomy-blocks/trunk/package.json
r2605922 r2999435 18 18 "author": "Hametuha inc.", 19 19 "license": "LGPL-3.0-or-later", 20 "engines": { 21 "node": ">=16.0.0" 22 }, 20 23 "devDependencies": { 21 24 "@babel/core": "^7.1.0", 25 "@babel/eslint-parser": "^7.23.3", 22 26 "@babel/plugin-transform-react-jsx": "^7.0.0", 23 27 "@babel/preset-env": "^7.1.0", 24 "@wordpress/env": "^4.0", 25 "@wordpress/eslint-plugin": "^9.0", 26 "babel-eslint": "^10.0.1", 27 "babel-loader": "^8.0.5", 28 "eslint": "^7.13", 28 "@wordpress/env": "^8.0", 29 "@wordpress/eslint-plugin": "^17.0", 30 "babel-loader": "^9.1.3", 31 "eslint": "^8.53", 29 32 "gulp": "^4.0.0", 30 "gulp-autoprefixer": "^ 7.0.0",33 "gulp-autoprefixer": "^8.0.0", 31 34 "gulp-eslint": "^6.0.0", 32 35 "gulp-load-plugins": "^2.0", 33 "gulp-notify": "^ 3.2.0",36 "gulp-notify": "^4.0.0", 34 37 "gulp-plumber": "^1.2.0", 35 "gulp-rename": "^1.4.0", 36 "gulp-sass": "^4.0.2", 37 "gulp-sass-glob": "^1.0.9", 38 "gulp-rename": "^2.0.0", 39 "gulp-sass": "^5.1.0", 38 40 "gulp-sourcemaps": "^3.0", 39 41 "gulp-stylelint": "^13.0.0", 42 "sass": "1.69.5", 40 43 "stylelint": "^13.13.1", 41 44 "stylelint-config-wordpress": "^17.0.0", 42 45 "vinyl-named": "^1.1.0", 43 46 "webpack": "^5.3", 44 "webpack-stream": "^6.1" 45 }, 46 "dependencies": {} 47 "webpack-stream": "^7.0" 48 } 47 49 } -
taro-taxonomy-blocks/trunk/readme.txt
r2667262 r2999435 3 3 Tags: gutenberg, block editor, iframe 4 4 Contributors: tarosky, Takahashi_Fumiki 5 Tested up to: 5.86 Requires at least: 5. 47 Requires PHP: 5.68 Stable Tag: 1. 1.25 Tested up to: 6.4 6 Requires at least: 5.9 7 Requires PHP: 7.2 8 Stable Tag: 1.2.0 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.0 = 74 75 * Drop support under PHP 7.2 76 * Add support for advanced class setting in the editor. 77 73 78 = 1.1.2 = 74 79 -
taro-taxonomy-blocks/trunk/taro-taxonomy-blocks.php
r2667262 r2999435 5 5 Description: Add 3 taxonomy blockshh for block editor. 6 6 Author: Tarosky INC. 7 Version: 1. 1.27 Version: 1.2.0 8 8 Author URI: https://tarosky.co.jp/ 9 9 License: GPL3 or later … … 90 90 function taro_taxonomy_terms_blocks_option( $target = '' ) { 91 91 $args = [ 92 'taxonomy' => [ 92 'taxonomy' => [ 93 'type' => 'string', 94 'default' => '', 95 ], 96 'className' => [ 93 97 'type' => 'string', 94 98 'default' => '', … … 223 227 if ( $taxonomy->hierarchical ) { 224 228 taro_taxonomy_blocks_get_template_part( 'template-parts/taxonomy-blocks/term-list-hierarchical', $taxonomy->name, [ 225 'terms' => $terms, 226 'parent' => 0, 229 'terms' => $terms, 230 'parent' => 0, 231 'className' => $attributes['className'], 227 232 ] ); 228 233 } else { 229 234 taro_taxonomy_blocks_get_template_part( 'template-parts/taxonomy-blocks/term-list', $taxonomy->name, [ 230 'terms' => $terms, 235 'terms' => $terms, 236 'className' => $attributes['className'], 231 237 ] ); 232 238 } -
taro-taxonomy-blocks/trunk/template-parts/taxonomy-blocks/term-list-hierarchical.php
r2605922 r2999435 4 4 * 5 5 * @package taro-taxonomy-blocks 6 * @var array{ parent: int, terms: WP_Term[] } $args6 * @var array{ parent: int, terms: WP_Term[], className: string } $args 7 7 */ 8 8 … … 18 18 $list_classes = [ 'taro-taxonomy-list', 'taro-taxonomy-list-hierarchical' ]; 19 19 $list_classes[] = $parent ? 'taro-taxonomy-list-child' : 'taro-taxonomy-list-parent'; 20 if ( $args['className'] ) { 21 $list_classes[] = $args['className']; 22 } 20 23 ?> 21 24 -
taro-taxonomy-blocks/trunk/template-parts/taxonomy-blocks/term-list.php
r2605922 r2999435 4 4 * 5 5 * @package taro-taxonomy-blocks 6 * @var array{ terms: WP_Term[] } $args6 * @var array{ terms: WP_Term[], className: string } $args 7 7 */ 8 8 9 9 ?> 10 10 11 <ul class="taro-taxonomy-list ">11 <ul class="taro-taxonomy-list<?php echo $args['className'] ? esc_attr( ' ' . $args['className'] ) : ''; ?>"> 12 12 <?php foreach ( $args['terms'] as $term ) : ?> 13 13 <li class="taro-taxonomy-item taro-taxonomy-item" data-taxonomy="<?php echo esc_attr( $term->taxonomy ); ?>">
Note: See TracChangeset
for help on using the changeset viewer.