Skip to content
Snippets Groups Projects
Select Git revision
  • d6da5f9f2a50b61ebd1b58a8c74d68b5d6d5dc9e
  • master default protected
  • lintian-fixes
  • renovate/github.com-miekg-dns-1.x
  • renovate/golang.org-x-crypto-digest
5 results

postinst

Blame
  • Forked from ai3 / tools / acmeserver
    Source project has a limited visibility.
    class-wp-editor.php 59.59 KiB
    <?php
    /**
     * Facilitates adding of the WordPress editor as used on the Write and Edit screens.
     *
     * @package WordPress
     * @since 3.3.0
     *
     * Private, not included by default. See wp_editor() in wp-includes/general-template.php.
     */
    
    final class _WP_Editors {
    	public static $mce_locale;
    
    	private static $mce_settings = array();
    	private static $qt_settings = array();
    	private static $plugins = array();
    	private static $qt_buttons = array();
    	private static $ext_plugins;
    	private static $baseurl;
    	private static $first_init;
    	private static $this_tinymce = false;
    	private static $this_quicktags = false;
    	private static $has_tinymce = false;
    	private static $has_quicktags = false;
    	private static $has_medialib = false;
    	private static $editor_buttons_css = true;
    	private static $drag_drop_upload = false;
    	private static $old_dfw_compat = false;
    	private static $translation;
    	private static $tinymce_scripts_printed = false;
    	private static $link_dialog_printed = false;
    
    	private function __construct() {}
    
    	/**
    	 * Parse default arguments for the editor instance.
    	 *
    	 * @static
    	 * @param string $editor_id ID for the current editor instance.
    	 * @param array  $settings {
    	 *     Array of editor arguments.
    	 *
    	 *     @type bool       $wpautop           Whether to use wpautop(). Default true.
    	 *     @type bool       $media_buttons     Whether to show the Add Media/other media buttons.
    	 *     @type string     $default_editor    When both TinyMCE and Quicktags are used, set which
    	 *                                         editor is shown on page load. Default empty.
    	 *     @type bool       $drag_drop_upload  Whether to enable drag & drop on the editor uploading. Default false.
    	 *                                         Requires the media modal.
    	 *     @type string     $textarea_name     Give the textarea a unique name here. Square brackets
    	 *                                         can be used here. Default $editor_id.
    	 *     @type int        $textarea_rows     Number rows in the editor textarea. Default 20.
    	 *     @type string|int $tabindex          Tabindex value to use. Default empty.
    	 *     @type string     $tabfocus_elements The previous and next element ID to move the focus to
    	 *                                         when pressing the Tab key in TinyMCE. Default ':prev,:next'.
    	 *     @type string     $editor_css        Intended for extra styles for both Visual and Text editors.
    	 *                                         Should include `<style>` tags, and can use "scoped". Default empty.
    	 *     @type string     $editor_class      Extra classes to add to the editor textarea element. Default empty.
    	 *     @type bool       $teeny             Whether to output the minimal editor config. Examples include
    	 *                                         Press This and the Comment editor. Default false.
    	 *     @type bool       $dfw               Deprecated in 4.1. Since 4.3 used only to enqueue wp-fullscreen-stub.js
    	 *                                         for backward compatibility.
    	 *     @type bool|array $tinymce           Whether to load TinyMCE. Can be used to pass settings directly to
    	 *                                         TinyMCE using an array. Default true.
    	 *     @type bool|array $quicktags         Whether to load Quicktags. Can be used to pass settings directly to
    	 *                                         Quicktags using an array. Default true.
    	 * }
    	 * @return array Parsed arguments array.
    	 */
    	public static function parse_settings( $editor_id, $settings ) {