jtsternberg / Shortcode_Button

Tinymce and Quicktag buttons for outputting shortcodes. Built to work with CMB2.
81 stars 7 forks source link

text_small and text_medium fields don't populate correctly when editing #20

Closed JiveDig closed 7 years ago

JiveDig commented 7 years ago

Simple solution is to just use a text field.

When i use text_small or text_medium (tested standard, and as a number field), I can create the shortcode fine, but when I got to edit the shortcode it does not populate the value correctly.

A workaround that I'm currently using is to just add the small class manually

array(
    'name'       => __( 'Number', 'mai-pro-engine' ),
    'desc'       => __( 'The number of entries', 'mai-pro-engine' ),
    'default'    => 12,
    'id'         => 'number',
    'type'       => 'text',
    'attributes' => array(
        'class'   => 'cmb2-text-small',
        'type'    => 'number',
        'pattern' => '\d*',
    ),
),