2014-02-03 14:35:26 +00:00
|
|
|
!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)}();
|