diff --git a/assets/js/admin/editor_plugin.js b/assets/js/admin/editor_plugin.js deleted file mode 100644 index 637751b8ba6..00000000000 --- a/assets/js/admin/editor_plugin.js +++ /dev/null @@ -1,52 +0,0 @@ -( - function(){ - - tinymce.create( - "tinymce.plugins.WooCommerceShortcodes", - { - init: function(d,e) {}, - createControl:function(d,e) - { - - var ed = tinymce.activeEditor; - - if(d=="woocommerce_shortcodes_button"){ - - d=e.createMenuButton( "woocommerce_shortcodes_button",{ - title: ed.getLang('woocommerce.insert'), - icons: false - }); - - var a=this;d.onRenderMenu.add(function(c,b){ - - a.addImmediate(b, ed.getLang('woocommerce.order_tracking'), '[' + ed.getLang('woocommerce.order_tracking_shortcode') + ']' ); - a.addImmediate(b, ed.getLang('woocommerce.price_button'), '[add_to_cart id="" sku=""]'); - a.addImmediate(b, ed.getLang('woocommerce.product_by_sku'), '[product id="" sku=""]'); - a.addImmediate(b, ed.getLang('woocommerce.products_by_sku'), '[products ids="" skus=""]'); - a.addImmediate(b, ed.getLang('woocommerce.product_categories'), '[product_categories number=""]'); - a.addImmediate(b, ed.getLang('woocommerce.products_by_cat_slug'), '[product_category category="" per_page="12" columns="4" orderby="date" order="desc"]'); - - b.addSeparator(); - - a.addImmediate(b, ed.getLang('woocommerce.recent_products'), '[recent_products per_page="12" columns="4" orderby="date" order="desc"]'); - a.addImmediate(b, ed.getLang('woocommerce.featured_products'), '[featured_products per_page="12" columns="4" orderby="date" order="desc"]'); - - b.addSeparator(); - - a.addImmediate(b, ed.getLang('woocommerce.shop_messages'), '[' + ed.getLang('woocommerce.shop_messages_shortcode') + ']'); - }); - return d - - } // End IF Statement - - return null - }, - - addImmediate:function(d,e,a){d.add({title:e,onclick:function(){tinyMCE.activeEditor.execCommand( "mceInsertContent",false,a)}})} - - } - ); - - tinymce.PluginManager.add( "WooCommerceShortcodes", tinymce.plugins.WooCommerceShortcodes); - } -)(); \ No newline at end of file diff --git a/assets/js/admin/editor_plugin.min.js b/assets/js/admin/editor_plugin.min.js deleted file mode 100644 index f2e66f7b307..00000000000 --- a/assets/js/admin/editor_plugin.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(){tinymce.create("tinymce.plugins.WooCommerceShortcodes",{init:function(){},createControl:function(a,b){var c=tinymce.activeEditor;if("woocommerce_shortcodes_button"==a){a=b.createMenuButton("woocommerce_shortcodes_button",{title:c.getLang("woocommerce.insert"),icons:!1});var d=this;return a.onRenderMenu.add(function(a,b){d.addImmediate(b,c.getLang("woocommerce.order_tracking"),"["+c.getLang("woocommerce.order_tracking_shortcode")+"]"),d.addImmediate(b,c.getLang("woocommerce.price_button"),'[add_to_cart id="" sku=""]'),d.addImmediate(b,c.getLang("woocommerce.product_by_sku"),'[product id="" sku=""]'),d.addImmediate(b,c.getLang("woocommerce.products_by_sku"),'[products ids="" skus=""]'),d.addImmediate(b,c.getLang("woocommerce.product_categories"),'[product_categories number=""]'),d.addImmediate(b,c.getLang("woocommerce.products_by_cat_slug"),'[product_category category="" per_page="12" columns="4" orderby="date" order="desc"]'),b.addSeparator(),d.addImmediate(b,c.getLang("woocommerce.recent_products"),'[recent_products per_page="12" columns="4" orderby="date" order="desc"]'),d.addImmediate(b,c.getLang("woocommerce.featured_products"),'[featured_products per_page="12" columns="4" orderby="date" order="desc"]'),b.addSeparator(),d.addImmediate(b,c.getLang("woocommerce.shop_messages"),"["+c.getLang("woocommerce.shop_messages_shortcode")+"]")}),a}return null},addImmediate:function(a,b,c){a.add({title:b,onclick:function(){tinyMCE.activeEditor.execCommand("mceInsertContent",!1,c)}})}}),tinymce.PluginManager.add("WooCommerceShortcodes",tinymce.plugins.WooCommerceShortcodes)}(); \ No newline at end of file diff --git a/assets/js/admin/editor_plugin_lang.php b/assets/js/admin/editor_plugin_lang.php deleted file mode 100644 index 5c77be0e8c4..00000000000 --- a/assets/js/admin/editor_plugin_lang.php +++ /dev/null @@ -1,19 +0,0 @@ -plugin_path() . '/assets/js/admin/editor_plugin_lang.php'; - return $arr; - } - - /** - * Register the shortcode button. - * - * @param array $buttons - * @return array - */ - public function register_shortcode_button( $buttons ) { - array_push( $buttons, "|", "woocommerce_shortcodes_button" ); - return $buttons; - } - - /** - * Add the shortcode button to TinyMCE - * - * @param array $plugin_array - * @return array - */ - public function add_shortcode_tinymce_plugin( $plugin_array ) { - $plugin_array['WooCommerceShortcodes'] = WC()->plugin_url() . '/assets/js/admin/editor_plugin.js'; - return $plugin_array; - } - - /** - * Force TinyMCE to refresh. - * - * @param int $ver - * @return int - */ - public function refresh_mce( $ver ) { - $ver += 3; - return $ver; - } - -} - -new WC_Admin_Editor(); diff --git a/includes/admin/class-wc-admin.php b/includes/admin/class-wc-admin.php index 4ac02e57d10..cbe1541f03d 100644 --- a/includes/admin/class-wc-admin.php +++ b/includes/admin/class-wc-admin.php @@ -45,7 +45,6 @@ class WC_Admin { include( 'class-wc-admin-notices.php' ); include( 'class-wc-admin-assets.php' ); include( 'class-wc-admin-permalink-settings.php' ); - include( 'class-wc-admin-editor.php' ); // Help if ( apply_filters( 'woocommerce_enable_admin_help_tab', true ) )