name = 'wysiwyg'; $this->title = __("Wysiwyg Editor",'acf'); add_action( 'acf_head-input', array( $this, 'acf_head') ); add_filter( 'acf/fields/wysiwyg/toolbars', array( $this, 'toolbars'), 1, 1 ); } /* * get_toolbars * * @description: * @since: 3.5.7 * @created: 10/01/13 */ function toolbars( $toolbars ) { $editor_id = 'acf_settings'; // Full $toolbars['Full'] = array(); $toolbars['Full'][1] = apply_filters('mce_buttons', array('bold', 'italic', 'strikethrough', 'bullist', 'numlist', 'blockquote', 'justifyleft', 'justifycenter', 'justifyright', 'link', 'unlink', 'wp_more', 'spellchecker', 'fullscreen', 'wp_adv' ), $editor_id); $toolbars['Full'][2] = apply_filters('mce_buttons_2', array( 'formatselect', 'underline', 'justifyfull', 'forecolor', 'pastetext', 'pasteword', 'removeformat', 'charmap', 'outdent', 'indent', 'undo', 'redo', 'wp_help', 'code' ), $editor_id); $toolbars['Full'][3] = apply_filters('mce_buttons_3', array(), $editor_id); $toolbars['Full'][4] = apply_filters('mce_buttons_4', array(), $editor_id); // Basic $toolbars['Basic'] = array(); $toolbars['Basic'][1] = apply_filters( 'teeny_mce_buttons', array('bold', 'italic', 'underline', 'blockquote', 'strikethrough', 'bullist', 'numlist', 'justifyleft', 'justifycenter', 'justifyright', 'undo', 'redo', 'link', 'unlink', 'fullscreen'), $editor_id ); // Custom - can be added with acf/fields/wysiwyg/toolbars filter return $toolbars; } /*-------------------------------------------------------------------------------------- * * admin_head * - Add the settings for a WYSIWYG editor (as used in wp_editor / wp_tiny_mce) * * @author Elliot Condon * @since 3.2.3 * *-------------------------------------------------------------------------------------*/ function acf_head() { add_action( 'admin_footer', array( $this, 'admin_footer') ); } function admin_footer() { ?>
'full', 'media_upload' => 'yes', 'the_content' => 'yes', 'default_value' => '', ); $field = array_merge($defaults, $field); ?>