| @@ -59,11 +59,11 @@ | ||
| 59 | 59 | |
| 60 | 60 | // Define shortcode. |
| 61 | 61 | $shortcode = $shortcodes[ $shortcode_name ]; |
| 62 | 62 | |
| 63 | - // Show a message in the modal if no API Key is specified. | |
| 64 | - if ( array_key_exists( 'has_api_key', $shortcode ) && ! $shortcode['has_api_key'] ) { | |
| 65 | - $notice = $shortcode['no_api_key']; | |
| 63 | + // Show a message in the modal if no Access Token is specified. | |
| 64 | + if ( array_key_exists( 'has_access_token', $shortcode ) && ! $shortcode['has_access_token'] ) { | |
| 65 | + $notice = $shortcode['no_access_token']; | |
| 66 | 66 | require_once CONVERTKIT_PLUGIN_PATH . '/views/backend/tinymce/modal-notice.php'; |
| 67 | 67 | die(); |
| 68 | 68 | } |
| 69 | 69 | |
| @@ -101,9 +101,9 @@ | ||
| 101 | 101 | return; |
| 102 | 102 | } |
| 103 | 103 | |
| 104 | 104 | // Enqueue Quicktag JS. |
| 105 | - wp_enqueue_script( 'convertkit-admin-quicktags', CONVERTKIT_PLUGIN_URL . 'resources/backend/js/quicktags.js', array( 'jquery', 'quicktags' ), CONVERTKIT_PLUGIN_VERSION, true ); | |
| 105 | + wp_enqueue_script( 'convertkit-admin-quicktags', CONVERTKIT_PLUGIN_URL . 'resources/backend/js/quicktags.js', array( 'quicktags' ), CONVERTKIT_PLUGIN_VERSION, true ); | |
| 106 | 106 | |
| 107 | 107 | // Make shortcodes available as convertkit_quicktags JS variable. |
| 108 | 108 | wp_localize_script( 'convertkit-admin-quicktags', 'convertkit_quicktags', $shortcodes ); |
| 109 | 109 | |
| @@ -118,12 +118,8 @@ | ||
| 118 | 118 | |
| 119 | 119 | // Enqueue Quicktag CSS. |
| 120 | 120 | wp_enqueue_style( 'convertkit-admin-quicktags', CONVERTKIT_PLUGIN_URL . 'resources/backend/css/quicktags.css', array(), CONVERTKIT_PLUGIN_VERSION ); |
| 121 | 121 | |
| 122 | - // Enqueue WordPress JS and CSS. | |
| 123 | - wp_enqueue_script( 'wp-color-picker' ); | |
| 124 | - wp_enqueue_style( 'wp-color-picker' ); | |
| 125 | - | |
| 126 | 122 | // Output Backbone View Template. |
| 127 | 123 | add_action( 'wp_print_footer_scripts', array( $this, 'output_quicktags_modal' ) ); |
| 128 | 124 | add_action( 'admin_print_footer_scripts', array( $this, 'output_quicktags_modal' ) ); |
| 129 | 125 | |
| @@ -148,10 +144,10 @@ | ||
| 148 | 144 | } |
| 149 | 145 | |
| 150 | 146 | // Enqueue TinyMCE CSS and JS. |
| 151 | 147 | wp_enqueue_script( 'convertkit-admin-tabs', CONVERTKIT_PLUGIN_URL . 'resources/backend/js/tabs.js', array( 'jquery' ), CONVERTKIT_PLUGIN_VERSION, true ); |
| 152 | - wp_enqueue_script( 'convertkit-admin-tinymce', CONVERTKIT_PLUGIN_URL . 'resources/backend/js/tinymce.js', array( 'jquery' ), CONVERTKIT_PLUGIN_VERSION, true ); | |
| 153 | - wp_enqueue_script( 'convertkit-admin-modal', CONVERTKIT_PLUGIN_URL . 'resources/backend/js/modal.js', array( 'jquery' ), CONVERTKIT_PLUGIN_VERSION, true ); | |
| 148 | + wp_enqueue_script( 'convertkit-admin-tinymce', CONVERTKIT_PLUGIN_URL . 'resources/backend/js/tinymce.js', array(), CONVERTKIT_PLUGIN_VERSION, true ); | |
| 149 | + wp_enqueue_script( 'convertkit-admin-modal', CONVERTKIT_PLUGIN_URL . 'resources/backend/js/modal.js', array(), CONVERTKIT_PLUGIN_VERSION, true ); | |
| 154 | 150 | wp_enqueue_style( 'convertkit-admin-tinymce', CONVERTKIT_PLUGIN_URL . 'resources/backend/css/tinymce.css', array(), CONVERTKIT_PLUGIN_VERSION ); |
| 155 | 151 | |
| 156 | 152 | // Register JS variable convertkit_admin_tinymce.nonce for AJAX calls. |
| 157 | 153 | wp_localize_script( |