Метод |
Описание |
|
__construct ( string $button_slug, array $js_button_data, array $args = [] ) |
Button name |
|
__get ( string $property ) : mixed |
Magic getter for our object. |
|
add_button ( $plugin_array ) |
and tell tinymce where it lives |
|
add_modal_form ( ) |
Include our button form in a modal |
|
add_quicktag_button_script ( ) |
Enqueue our quicktag/general purpose button script, and localize our button data |
|
ajax_parse_shortcode ( ) |
Parse shortcode for display within a TinyMCE view. |
|
button_init ( ) |
Hook our buttons in to tinymce |
|
do_cmb_form ( ) |
Use CMB2 cmb2_metabox_form to output form display |
|
filter_form_fields ( $updated, $allvalues = [] ) : array |
Pass values through a variable filter hook before sending back to JS
"{$button_slug}_shortcode_fields" |
|
form_callback ( ) : mixed |
Check button data for form dislay callback |
|
get_cmb_config ( ) : mixed |
Get the cmb config array from button args |
|
get_cmb_object ( ) : mixed |
Use the passed-in CMB2 form args to retrieve a CMB2 object |
|
hooks ( ) |
Hook it all in. non-ajax hooks check for a conditional callback |
|
process_cmb_form ( array $fields ) |
CMB2 form processing. |
|
process_form ( ) |
Ajax form processing. |
|
register_button ( $buttons ) |
register it with tinymce |
|
sanitize_cmb_fields ( array $fields ) : array |
Uses CMB2 field processing to sanitize fields
(Only applies if cmb_metabox_config parameter exists) |
|
send_json_success ( $send ) |
|
|
url ( string $path = '' ) : string |
Get script url |
|