Plugin Directory

Changeset 2751481


Ignore:
Timestamp:
07/04/2022 09:09:53 AM (4 years ago)
Author:
janwidmer
Message:

Update to version 2.4.0 from GitHub

Location:
lzb-select-dynamic
Files:
10 edited
1 copied

Legend:

Unmodified
Added
Removed
  • lzb-select-dynamic/tags/2.4.0/assets/js/select-dynamic.min.js

    r2674158 r2751481  
    1 !function(){"use strict";const{withSelect:e}=wp.data,{Component:t}=wp.element,{__:a}=wp.i18n,{withInstanceId:o,compose:n}=wp.compose,{SelectControl:l}=wp.components,p=["pages","media","blocks","menu-items","navigation","templates","template-parts","lazyblocks","lazyblocks_templates"];var y=n([o,e(((e,t)=>{let a="",o="",n={per_page:-1};return"post"===t.entityType?(a="postType",o=t.postType||"post"):"page"===t.entityType?(a="postType",o="page"):"taxonomy"===t.entityType&&(a="taxonomy",o=t.taxonomyType||"category"),("page"===t.entityType||"taxonomy"===t.entityType&&"tag"!==t.taxonomyType)&&t.parentEntity&&(n.parent=t.parentEntity),"post-type"===t.entityType?{items:e("core").getPostTypes({per_page:-1})}:"taxonomy-type"===t.entityType?{items:e("core").getTaxonomies()}:{items:e("core").getEntityRecords(a,o,n)}}))])(class extends t{render(){const{label:e,value:t,help:o,entityType:n,onChange:y=(()=>{}),items:s}=this.props;let i=[];if(s)if(0===s.length)i.push({value:"",label:a("No items found","lzb-select-dynamic")});else{for(const e of s)"post"===n||"page"===n?i.push({label:e.title.rendered,value:e.id}):"taxonomy"===n?i.push({label:e.name,value:e.id}):"post-type"===n?-1===p.indexOf(e.rest_base)&&i.push({label:e.labels.singular_name,value:e.slug}):"taxonomy-type"===n&&i.push({label:e.labels.singular_name,value:e.slug});i=[{value:"",label:a("Please Select","lzb-select-dynamic")},...i]}else i.push({value:"",label:a("Loading..","lzb-select-dynamic")});return React.createElement("div",{className:"ww-lzb-control_select_dynamic"},React.createElement(l,{label:e,options:i,help:o,value:t,className:"lzb-gutenberg-select",onChange:e=>{y(e)}}))}});const{addFilter:s}=wp.hooks,{__:i}=wp.i18n,{Fragment:m}=wp.element,{PanelBody:c,BaseControl:r,RadioControl:d}=wp.components;s("lzb.editor.control.select_dynamic.render","lzb.editor",((e,t)=>React.createElement(y,{label:t.data.label,help:t.data.help,entityType:t.data.entity_type,postType:t.data.post_type,taxonomyType:t.data.taxonomy_type,parentEntity:t.data.parent_entity,value:t.getValue(),onChange:t.onChange}))),s("lzb.constructor.control.select_dynamic.settings","lzb.constructor",((e,t)=>{const{updateData:a,data:o}=t;return React.createElement(m,null,React.createElement(c,null,React.createElement(r,{label:i("Entity Type","lzb-select-dynamic"),help:i("Allows you to select the entity type to render as select options","lzb-select-dynamic")},React.createElement(d,{options:[{label:i("Post Type","lzb-select-dynamic"),value:"post-type"},{label:i("Taxonomy Type","lzb-select-dynamic"),value:"taxonomy-type"},{label:i("Post","lzb-select-dynamic"),value:"post"},{label:i("Page","lzb-select-dynamic"),value:"page"},{label:i("Taxonomy","lzb-select-dynamic"),value:"taxonomy"}],selected:o.entity_type||"",onChange:e=>a({entity_type:e})})),t.data.entity_type&&"post"===t.data.entity_type&&React.createElement(r,{label:i("Post type","lzb-select-dynamic"),help:i('Allows you to select a custom post type. Defaults to "Post" if nothing is selected',"lzb-select-dynamic")},React.createElement(y,{entityType:"post-type",value:t.data.post_type,onChange:e=>a({post_type:e})})),t.data.entity_type&&"taxonomy"===t.data.entity_type&&React.createElement(r,{label:i("Taxonomy type","lzb-select-dynamic"),help:i('Allows you to select a taxonomy type. Defaults to "Category" if nothing is selected',"lzb-select-dynamic")},React.createElement(y,{entityType:"taxonomy-type",value:t.data.taxonomy_type,onChange:e=>a({taxonomy_type:e})})),(t.data.entity_type&&"page"===t.data.entity_type||t.data.taxonomy_type&&"tags"!==t.data.taxonomy_type)&&React.createElement(r,{label:i("Parent entity","lzb-select-dynamic"),help:i("Allows you to restrict the select options to a certain parent entity, otherwise leave blank","lzb-select-dynamic")},React.createElement(y,{entityType:t.data.entity_type,postType:t.data.post_type,taxonomyType:t.data.taxonomy_type,value:t.data.parent_entity,onChange:e=>a({parent_entity:e})}))))}))}();
     1!function(){"use strict";const{withSelect:e}=wp.data,{Component:t}=wp.element,{__:a}=wp.i18n,{withInstanceId:n,compose:o}=wp.compose,{SelectControl:l}=wp.components,p=["pages","media","blocks","menu-items","navigation","templates","template-parts","lazyblocks","lazyblocks_templates"];var y=o([n,e(((e,t)=>{let a="",n="",o={per_page:-1};return"post"===t.entityType?(a="postType",n=t.postType||"post"):"page"===t.entityType?(a="postType",n="page"):"taxonomy"===t.entityType&&(a="taxonomy",n=t.taxonomyType||"category"),("page"===t.entityType||"taxonomy"===t.entityType&&"tag"!==t.taxonomyType)&&t.parentEntity&&(o.parent=t.parentEntity),"post-type"===t.entityType?{items:e("core").getPostTypes({per_page:-1})}:"taxonomy-type"===t.entityType?{items:e("core").getTaxonomies()}:{items:e("core").getEntityRecords(a,n,o)}}))])(class extends t{render(){const{label:e,value:t,help:n,entityType:o,multiple:y,onChange:s=(()=>{}),items:i}=this.props;let m=[];if(i)if(0===i.length)m.push({value:"",label:a("No items found","lzb-select-dynamic")});else{for(const e of i)"post"===o||"page"===o?m.push({label:e.title.rendered,value:e.id}):"taxonomy"===o?m.push({label:e.name,value:e.id}):"post-type"===o?-1===p.indexOf(e.rest_base)&&m.push({label:e.labels.singular_name,value:e.slug}):"taxonomy-type"===o&&m.push({label:e.labels.singular_name,value:e.slug});m=[{value:"",label:a("Please Select","lzb-select-dynamic")},...m]}else m.push({value:"",label:a("Loading..","lzb-select-dynamic")});return React.createElement("div",{className:"ww-lzb-control_select_dynamic"},React.createElement(l,{label:e,options:m,help:n,value:t,multiple:y,className:"lzb-gutenberg-select",onChange:e=>{s(e)}}))}});const{addFilter:s}=wp.hooks,{__:i}=wp.i18n,{Fragment:m}=wp.element,{PanelBody:c,BaseControl:r,RadioControl:d,CheckboxControl:u}=wp.components;s("lzb.editor.control.select_dynamic.render","lzb.editor",((e,t)=>React.createElement(y,{label:t.data.label,help:t.data.help,entityType:t.data.entity_type,postType:t.data.post_type,taxonomyType:t.data.taxonomy_type,parentEntity:t.data.parent_entity,multiple:"true"===t.data.multiple,value:t.getValue(),onChange:t.onChange}))),s("lzb.constructor.control.select_dynamic.settings","lzb.constructor",((e,t)=>{const{updateData:a,data:n}=t;return React.createElement(m,null,React.createElement(c,null,React.createElement(r,{label:i("Entity Type","lzb-select-dynamic"),help:i("Allows you to select the entity type to render as select options","lzb-select-dynamic")},React.createElement(d,{options:[{label:i("Post Type","lzb-select-dynamic"),value:"post-type"},{label:i("Taxonomy Type","lzb-select-dynamic"),value:"taxonomy-type"},{label:i("Post","lzb-select-dynamic"),value:"post"},{label:i("Page","lzb-select-dynamic"),value:"page"},{label:i("Taxonomy","lzb-select-dynamic"),value:"taxonomy"}],selected:n.entity_type||"",onChange:e=>a({entity_type:e})})),t.data.entity_type&&"post"===t.data.entity_type&&React.createElement(r,{label:i("Post type","lzb-select-dynamic"),help:i('Allows you to select a custom post type. Defaults to "Post" if nothing is selected',"lzb-select-dynamic")},React.createElement(y,{entityType:"post-type",value:t.data.post_type,onChange:e=>a({post_type:e})})),t.data.entity_type&&"taxonomy"===t.data.entity_type&&React.createElement(r,{label:i("Taxonomy type","lzb-select-dynamic"),help:i('Allows you to select a taxonomy type. Defaults to "Category" if nothing is selected',"lzb-select-dynamic")},React.createElement(y,{entityType:"taxonomy-type",value:t.data.taxonomy_type,onChange:e=>a({taxonomy_type:e})})),(t.data.entity_type&&"page"===t.data.entity_type||t.data.taxonomy_type&&"tags"!==t.data.taxonomy_type)&&React.createElement(r,{label:i("Parent entity","lzb-select-dynamic"),help:i("Allows you to restrict the select options to a certain parent entity, otherwise leave blank","lzb-select-dynamic")},React.createElement(y,{entityType:t.data.entity_type,postType:t.data.post_type,taxonomyType:t.data.taxonomy_type,value:t.data.parent_entity,onChange:e=>a({parent_entity:e})}))),t.data.entity_type&&("post"===t.data.entity_type||"page"===t.data.entity_type||"taxonomy"===t.data.entity_type)&&React.createElement(c,null,React.createElement(r,{label:i("Multiple","lzb-select-dynamic"),help:i("Allows you to select multiple values","lzb-select-dynamic")},React.createElement(u,{label:i("Yes","lzb-select-dynamic"),checked:"true"===n.multiple,onChange:e=>a({multiple:e?"true":"false"})}))))}))}();
  • lzb-select-dynamic/tags/2.4.0/controls/select-dynamic.php

    r2405296 r2751481  
    5151            // Optional additional attributes, that will be saved in control data.
    5252            $this->attributes = array(
    53                 'select_dynamic_custom_attribute' => 'default_value',
     53                'multiple'      => 'false',
    5454            );
     55
     56            // Filters.
     57            add_filter( 'lzb/prepare_block_attribute', array( $this, 'filter_lzb_prepare_block_attribute' ), 10, 2 );
    5558
    5659            parent::__construct();
     
    9396            return array( 'ww-lzb-control-select_dynamic' );
    9497        }
     98
     99        /**
     100         * Filter block attribute.
     101         *
     102         * @param string $attribute_data - attribute data.
     103         * @param mixed  $control - control data.
     104         *
     105         * @return array filtered attribute data.
     106         */
     107        public function filter_lzb_prepare_block_attribute( $attribute_data, $control ) {
     108            if (
     109                ! $control ||
     110                ! isset( $control['type'] ) ||
     111                $this->name !== $control['type'] ||
     112                ! isset( $control['multiple'] )
     113            ) {
     114                return $attribute_data;
     115            }
     116
     117            if ( 'true' === $control['multiple'] ) {
     118                $attribute_data['type']    = 'array';
     119                $attribute_data['items']   = array( 'type' => 'string' );
     120                $attribute_data['default'] = explode( ',', $attribute_data['default'] );
     121            }
     122
     123            return $attribute_data;
     124        }
    95125    }
    96126
  • lzb-select-dynamic/tags/2.4.0/languages/lzb-select-dynamic.json

    r2545974 r2751481  
    7171         "Allows you to restrict the select options to a certain parent entity, otherwise leave blank": [
    7272            ""
     73         ],
     74         "Multiple": [
     75            ""
     76         ],
     77         "Allows you to select multiple values": [
     78            ""
     79         ],
     80         "Yes": [
     81            ""
    7382         ]
    7483      }
  • lzb-select-dynamic/tags/2.4.0/lzb-select-dynamic.php

    r2674158 r2751481  
    44 * Description:  lazy-blocks custom control to offer a dynamic select containing wordpress posts, pages or categories
    55 * Plugin URI:   https://github.com/janwidmer/lzb-select-dynamic
    6  * Version:      2.2.1
     6 * Version:      2.4.0
    77 * Author:       Jan Widmer
    88 * Author URI:   https://github.com/janwidmer
  • lzb-select-dynamic/tags/2.4.0/readme.md

    r2674158 r2751481  
    44* Tags: lazy-blocks, lazy blocks, custom control, select dynamic
    55* Requires at least: 5.8
    6 * Tested up to: 5.9.0
     6* Tested up to: 6.1.0
    77* Requires PHP: 7.2
    8 * Stable tag: 2.2.1
     8* Stable tag: 2.4.0
    99* License: GPLv2 or later
    1010* License URI: <http://www.gnu.org/licenses/gpl-2.0.html>
     
    2929
    3030### Restrictions
     31
     32#### Select Multiple Restrictions
     33
     34* The option "Select Multiple" is only available for the entity type `Post` / `Pages` / `Taxonomy`
     35
     36#### Max Item Restriction
    3137
    3238The custom control is using the `getEntityRecords` method.
     
    6874## Changelog
    6975
     76= 2.4.0 =
     77
     78* Add option to select multiple items for Entity Types `post` | `page` | `taxonomy`
     79* changed compatibility to WP version to 6.1.0
     80
    7081= 2.2.1 =
    7182
  • lzb-select-dynamic/trunk/assets/js/select-dynamic.min.js

    r2674158 r2751481  
    1 !function(){"use strict";const{withSelect:e}=wp.data,{Component:t}=wp.element,{__:a}=wp.i18n,{withInstanceId:o,compose:n}=wp.compose,{SelectControl:l}=wp.components,p=["pages","media","blocks","menu-items","navigation","templates","template-parts","lazyblocks","lazyblocks_templates"];var y=n([o,e(((e,t)=>{let a="",o="",n={per_page:-1};return"post"===t.entityType?(a="postType",o=t.postType||"post"):"page"===t.entityType?(a="postType",o="page"):"taxonomy"===t.entityType&&(a="taxonomy",o=t.taxonomyType||"category"),("page"===t.entityType||"taxonomy"===t.entityType&&"tag"!==t.taxonomyType)&&t.parentEntity&&(n.parent=t.parentEntity),"post-type"===t.entityType?{items:e("core").getPostTypes({per_page:-1})}:"taxonomy-type"===t.entityType?{items:e("core").getTaxonomies()}:{items:e("core").getEntityRecords(a,o,n)}}))])(class extends t{render(){const{label:e,value:t,help:o,entityType:n,onChange:y=(()=>{}),items:s}=this.props;let i=[];if(s)if(0===s.length)i.push({value:"",label:a("No items found","lzb-select-dynamic")});else{for(const e of s)"post"===n||"page"===n?i.push({label:e.title.rendered,value:e.id}):"taxonomy"===n?i.push({label:e.name,value:e.id}):"post-type"===n?-1===p.indexOf(e.rest_base)&&i.push({label:e.labels.singular_name,value:e.slug}):"taxonomy-type"===n&&i.push({label:e.labels.singular_name,value:e.slug});i=[{value:"",label:a("Please Select","lzb-select-dynamic")},...i]}else i.push({value:"",label:a("Loading..","lzb-select-dynamic")});return React.createElement("div",{className:"ww-lzb-control_select_dynamic"},React.createElement(l,{label:e,options:i,help:o,value:t,className:"lzb-gutenberg-select",onChange:e=>{y(e)}}))}});const{addFilter:s}=wp.hooks,{__:i}=wp.i18n,{Fragment:m}=wp.element,{PanelBody:c,BaseControl:r,RadioControl:d}=wp.components;s("lzb.editor.control.select_dynamic.render","lzb.editor",((e,t)=>React.createElement(y,{label:t.data.label,help:t.data.help,entityType:t.data.entity_type,postType:t.data.post_type,taxonomyType:t.data.taxonomy_type,parentEntity:t.data.parent_entity,value:t.getValue(),onChange:t.onChange}))),s("lzb.constructor.control.select_dynamic.settings","lzb.constructor",((e,t)=>{const{updateData:a,data:o}=t;return React.createElement(m,null,React.createElement(c,null,React.createElement(r,{label:i("Entity Type","lzb-select-dynamic"),help:i("Allows you to select the entity type to render as select options","lzb-select-dynamic")},React.createElement(d,{options:[{label:i("Post Type","lzb-select-dynamic"),value:"post-type"},{label:i("Taxonomy Type","lzb-select-dynamic"),value:"taxonomy-type"},{label:i("Post","lzb-select-dynamic"),value:"post"},{label:i("Page","lzb-select-dynamic"),value:"page"},{label:i("Taxonomy","lzb-select-dynamic"),value:"taxonomy"}],selected:o.entity_type||"",onChange:e=>a({entity_type:e})})),t.data.entity_type&&"post"===t.data.entity_type&&React.createElement(r,{label:i("Post type","lzb-select-dynamic"),help:i('Allows you to select a custom post type. Defaults to "Post" if nothing is selected',"lzb-select-dynamic")},React.createElement(y,{entityType:"post-type",value:t.data.post_type,onChange:e=>a({post_type:e})})),t.data.entity_type&&"taxonomy"===t.data.entity_type&&React.createElement(r,{label:i("Taxonomy type","lzb-select-dynamic"),help:i('Allows you to select a taxonomy type. Defaults to "Category" if nothing is selected',"lzb-select-dynamic")},React.createElement(y,{entityType:"taxonomy-type",value:t.data.taxonomy_type,onChange:e=>a({taxonomy_type:e})})),(t.data.entity_type&&"page"===t.data.entity_type||t.data.taxonomy_type&&"tags"!==t.data.taxonomy_type)&&React.createElement(r,{label:i("Parent entity","lzb-select-dynamic"),help:i("Allows you to restrict the select options to a certain parent entity, otherwise leave blank","lzb-select-dynamic")},React.createElement(y,{entityType:t.data.entity_type,postType:t.data.post_type,taxonomyType:t.data.taxonomy_type,value:t.data.parent_entity,onChange:e=>a({parent_entity:e})}))))}))}();
     1!function(){"use strict";const{withSelect:e}=wp.data,{Component:t}=wp.element,{__:a}=wp.i18n,{withInstanceId:n,compose:o}=wp.compose,{SelectControl:l}=wp.components,p=["pages","media","blocks","menu-items","navigation","templates","template-parts","lazyblocks","lazyblocks_templates"];var y=o([n,e(((e,t)=>{let a="",n="",o={per_page:-1};return"post"===t.entityType?(a="postType",n=t.postType||"post"):"page"===t.entityType?(a="postType",n="page"):"taxonomy"===t.entityType&&(a="taxonomy",n=t.taxonomyType||"category"),("page"===t.entityType||"taxonomy"===t.entityType&&"tag"!==t.taxonomyType)&&t.parentEntity&&(o.parent=t.parentEntity),"post-type"===t.entityType?{items:e("core").getPostTypes({per_page:-1})}:"taxonomy-type"===t.entityType?{items:e("core").getTaxonomies()}:{items:e("core").getEntityRecords(a,n,o)}}))])(class extends t{render(){const{label:e,value:t,help:n,entityType:o,multiple:y,onChange:s=(()=>{}),items:i}=this.props;let m=[];if(i)if(0===i.length)m.push({value:"",label:a("No items found","lzb-select-dynamic")});else{for(const e of i)"post"===o||"page"===o?m.push({label:e.title.rendered,value:e.id}):"taxonomy"===o?m.push({label:e.name,value:e.id}):"post-type"===o?-1===p.indexOf(e.rest_base)&&m.push({label:e.labels.singular_name,value:e.slug}):"taxonomy-type"===o&&m.push({label:e.labels.singular_name,value:e.slug});m=[{value:"",label:a("Please Select","lzb-select-dynamic")},...m]}else m.push({value:"",label:a("Loading..","lzb-select-dynamic")});return React.createElement("div",{className:"ww-lzb-control_select_dynamic"},React.createElement(l,{label:e,options:m,help:n,value:t,multiple:y,className:"lzb-gutenberg-select",onChange:e=>{s(e)}}))}});const{addFilter:s}=wp.hooks,{__:i}=wp.i18n,{Fragment:m}=wp.element,{PanelBody:c,BaseControl:r,RadioControl:d,CheckboxControl:u}=wp.components;s("lzb.editor.control.select_dynamic.render","lzb.editor",((e,t)=>React.createElement(y,{label:t.data.label,help:t.data.help,entityType:t.data.entity_type,postType:t.data.post_type,taxonomyType:t.data.taxonomy_type,parentEntity:t.data.parent_entity,multiple:"true"===t.data.multiple,value:t.getValue(),onChange:t.onChange}))),s("lzb.constructor.control.select_dynamic.settings","lzb.constructor",((e,t)=>{const{updateData:a,data:n}=t;return React.createElement(m,null,React.createElement(c,null,React.createElement(r,{label:i("Entity Type","lzb-select-dynamic"),help:i("Allows you to select the entity type to render as select options","lzb-select-dynamic")},React.createElement(d,{options:[{label:i("Post Type","lzb-select-dynamic"),value:"post-type"},{label:i("Taxonomy Type","lzb-select-dynamic"),value:"taxonomy-type"},{label:i("Post","lzb-select-dynamic"),value:"post"},{label:i("Page","lzb-select-dynamic"),value:"page"},{label:i("Taxonomy","lzb-select-dynamic"),value:"taxonomy"}],selected:n.entity_type||"",onChange:e=>a({entity_type:e})})),t.data.entity_type&&"post"===t.data.entity_type&&React.createElement(r,{label:i("Post type","lzb-select-dynamic"),help:i('Allows you to select a custom post type. Defaults to "Post" if nothing is selected',"lzb-select-dynamic")},React.createElement(y,{entityType:"post-type",value:t.data.post_type,onChange:e=>a({post_type:e})})),t.data.entity_type&&"taxonomy"===t.data.entity_type&&React.createElement(r,{label:i("Taxonomy type","lzb-select-dynamic"),help:i('Allows you to select a taxonomy type. Defaults to "Category" if nothing is selected',"lzb-select-dynamic")},React.createElement(y,{entityType:"taxonomy-type",value:t.data.taxonomy_type,onChange:e=>a({taxonomy_type:e})})),(t.data.entity_type&&"page"===t.data.entity_type||t.data.taxonomy_type&&"tags"!==t.data.taxonomy_type)&&React.createElement(r,{label:i("Parent entity","lzb-select-dynamic"),help:i("Allows you to restrict the select options to a certain parent entity, otherwise leave blank","lzb-select-dynamic")},React.createElement(y,{entityType:t.data.entity_type,postType:t.data.post_type,taxonomyType:t.data.taxonomy_type,value:t.data.parent_entity,onChange:e=>a({parent_entity:e})}))),t.data.entity_type&&("post"===t.data.entity_type||"page"===t.data.entity_type||"taxonomy"===t.data.entity_type)&&React.createElement(c,null,React.createElement(r,{label:i("Multiple","lzb-select-dynamic"),help:i("Allows you to select multiple values","lzb-select-dynamic")},React.createElement(u,{label:i("Yes","lzb-select-dynamic"),checked:"true"===n.multiple,onChange:e=>a({multiple:e?"true":"false"})}))))}))}();
  • lzb-select-dynamic/trunk/controls/select-dynamic.php

    r2405296 r2751481  
    5151            // Optional additional attributes, that will be saved in control data.
    5252            $this->attributes = array(
    53                 'select_dynamic_custom_attribute' => 'default_value',
     53                'multiple'      => 'false',
    5454            );
     55
     56            // Filters.
     57            add_filter( 'lzb/prepare_block_attribute', array( $this, 'filter_lzb_prepare_block_attribute' ), 10, 2 );
    5558
    5659            parent::__construct();
     
    9396            return array( 'ww-lzb-control-select_dynamic' );
    9497        }
     98
     99        /**
     100         * Filter block attribute.
     101         *
     102         * @param string $attribute_data - attribute data.
     103         * @param mixed  $control - control data.
     104         *
     105         * @return array filtered attribute data.
     106         */
     107        public function filter_lzb_prepare_block_attribute( $attribute_data, $control ) {
     108            if (
     109                ! $control ||
     110                ! isset( $control['type'] ) ||
     111                $this->name !== $control['type'] ||
     112                ! isset( $control['multiple'] )
     113            ) {
     114                return $attribute_data;
     115            }
     116
     117            if ( 'true' === $control['multiple'] ) {
     118                $attribute_data['type']    = 'array';
     119                $attribute_data['items']   = array( 'type' => 'string' );
     120                $attribute_data['default'] = explode( ',', $attribute_data['default'] );
     121            }
     122
     123            return $attribute_data;
     124        }
    95125    }
    96126
  • lzb-select-dynamic/trunk/languages/lzb-select-dynamic.json

    r2545974 r2751481  
    7171         "Allows you to restrict the select options to a certain parent entity, otherwise leave blank": [
    7272            ""
     73         ],
     74         "Multiple": [
     75            ""
     76         ],
     77         "Allows you to select multiple values": [
     78            ""
     79         ],
     80         "Yes": [
     81            ""
    7382         ]
    7483      }
  • lzb-select-dynamic/trunk/lzb-select-dynamic.php

    r2674158 r2751481  
    44 * Description:  lazy-blocks custom control to offer a dynamic select containing wordpress posts, pages or categories
    55 * Plugin URI:   https://github.com/janwidmer/lzb-select-dynamic
    6  * Version:      2.2.1
     6 * Version:      2.4.0
    77 * Author:       Jan Widmer
    88 * Author URI:   https://github.com/janwidmer
  • lzb-select-dynamic/trunk/readme.md

    r2674158 r2751481  
    44* Tags: lazy-blocks, lazy blocks, custom control, select dynamic
    55* Requires at least: 5.8
    6 * Tested up to: 5.9.0
     6* Tested up to: 6.1.0
    77* Requires PHP: 7.2
    8 * Stable tag: 2.2.1
     8* Stable tag: 2.4.0
    99* License: GPLv2 or later
    1010* License URI: <http://www.gnu.org/licenses/gpl-2.0.html>
     
    2929
    3030### Restrictions
     31
     32#### Select Multiple Restrictions
     33
     34* The option "Select Multiple" is only available for the entity type `Post` / `Pages` / `Taxonomy`
     35
     36#### Max Item Restriction
    3137
    3238The custom control is using the `getEntityRecords` method.
     
    6874## Changelog
    6975
     76= 2.4.0 =
     77
     78* Add option to select multiple items for Entity Types `post` | `page` | `taxonomy`
     79* changed compatibility to WP version to 6.1.0
     80
    7081= 2.2.1 =
    7182
Note: See TracChangeset for help on using the changeset viewer.