CTX Feed – WooCommerce Product Feed Manager Plugin - Version 1.5.36

Version Description

Download this release

Release Info

Developer wahid0003
Plugin Icon 128x128 CTX Feed – WooCommerce Product Feed Manager Plugin
Version 1.5.36
Comparing to
See all releases

Code changes from version 1.5.15 to 1.5.36

Files changed (35) hide show
  1. README.txt +80 -7
  2. admin/class-woo-feed-admin.php +2 -0
  3. admin/css/woo-feed-admin.css +4 -0
  4. admin/js/woo-feed-admin.js +10 -2
  5. admin/partials/adwords/add-feed.php +688 -0
  6. admin/partials/amazon/add-feed.php +13 -13
  7. admin/partials/become/add-feed.php +9 -9
  8. admin/partials/bing/add-feed.php +6 -6
  9. admin/partials/connexity/add-feed.php +9 -9
  10. admin/partials/custom/add-feed.php +1 -1
  11. admin/partials/custom/edit-feed.php +10 -3
  12. admin/partials/facebook/add-feed.php +13 -13
  13. admin/partials/google/add-feed.php +14 -12
  14. admin/partials/kelkoo/add-feed.php +11 -11
  15. admin/partials/nextag/add-feed.php +8 -8
  16. admin/partials/pricegrabber/add-feed.php +12 -12
  17. admin/partials/shopbot/add-feed.php +885 -0
  18. admin/partials/shopmania/add-feed.php +13 -13
  19. admin/partials/shopping/add-feed.php +9 -9
  20. admin/partials/shopzilla/add-feed.php +9 -9
  21. admin/partials/woo-feed-admin-display.php +11 -7
  22. admin/partials/woo-feed-edit-template.php +10 -3
  23. admin/partials/woo-feed-manage-list.php +13 -5
  24. admin/partials/woo-feed-pro-vs-free.php +151 -0
  25. includes/class-woo-feed.php +6 -0
  26. includes/classes/class-woo-feed-default-attributes.php +2 -1
  27. includes/classes/class-woo-feed-engine.php +133 -40
  28. includes/classes/class-woo-feed-error-message.php +20 -0
  29. includes/classes/class-woo-feed-products.php +26 -16
  30. includes/classes/class-woo-feed-savefile.php +16 -5
  31. includes/classes/class-wp-screen.php +0 -1253
  32. includes/classes/screen.php +0 -224
  33. includes/classes/template.php +0 -2080
  34. includes/feeds/class-woo-feed-google.php +5 -2
  35. woo-feed.php +12 -1
README.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: wahid0003
3
  Donate link: https://webappick.com
4
  Tags: Google,Google Shopping Feed,Google Merchant Feed,Amazon,eBay,bing,pricegrabber,nextag,pricerunner,facebook,kelkoo,feed,Product feed,woocommerce feed,woocommerce product feed, txt export, csv export, xml export,woocommerce export,product export, newegg,rakuten,houzz,godatafeed,pricefalls,google merchant,google shopping,sell,sears,variation export,shareasale,etsy,Buy,Getprice,LeGuide,Twenga,Beslist,Kieskeurig,HotLine,Yandex.Market,product variation,connexity,Commission Junction,channel advisor,dealtime,shopbot,shopzilla,yahoo,Getprice,Gimme,Junglee,Myshopping,Priceme,Shopmania,Wine-searcher
5
  Requires at least: 3.6
6
- Tested up to: 4.5
7
  Stable tag: 4.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -43,6 +43,9 @@ In one word WooCommerce Product Feed is a revolution. Yah, it’s a revolution o
43
 
44
  [youtube https://www.youtube.com/watch?v=xw3R4v1LMe4]
45
 
 
 
 
46
  **AVAILABLE FEATURES:**
47
 
48
  * It is highly customizable, having access to 100+ merchant sites & also very responsive of user commands.
@@ -57,7 +60,7 @@ In one word WooCommerce Product Feed is a revolution. Yah, it’s a revolution o
57
  * Output Limitation. You can Limit output length according to your merchant feed specification.
58
  * Scheduled Feed Update
59
  * Auto Feed upload via FTP
60
- * Supported 100+ Merchants including
61
  * <a target="_blank" href="https://www.google.com/retail/merchant-center/">Google Shopping </a>
62
  * <a target="_blank" href="https://www.google.com/adwords/">Google Adwords </a>
63
  * <a target="_blank" href="https://www.facebook.com/business/a/online-sales/dynamic-product-ads"> Facebook Catalog </a>
@@ -72,6 +75,10 @@ In one word WooCommerce Product Feed is a revolution. Yah, it’s a revolution o
72
  * <a target="_blank" href="http://advertise.bingads.microsoft.com/en-uk/home">Bing Ads </a>
73
  * <a target="_blank" href="http://www.idealo.de/">Idealo.de </a>
74
  * <a target="_blank" href="https://www.beslist.nl/">Beslist.nl</a>
 
 
 
 
75
  * <a target="_blank" href="http://www.shopping.com/">Shopping.com</a>
76
  * <a target="_blank" href="http://www.shopzilla.com/">Shopzilla.com</a>
77
  * <a target="_blank" href="http://www.shopmania.com/">Shopmania.com</a>
@@ -82,7 +89,8 @@ In one word WooCommerce Product Feed is a revolution. Yah, it’s a revolution o
82
  * <a target="_blank" href="http://www.polyvore.com/">Polyvore.com</a>
83
  * <a target="_blank" href="http://opensky.com">Opensky.com</a>
84
  * <a target="_blank" href="http://opensky.com">11Main.com</a>
85
- * <a target="_blank" href="http://www.shopbot.ca/">shopbot.ca</a>
 
86
  * <a target="_blank" href="http://www.wine-searcher.com/">Wine-searcher.com</a>
87
  * <a target="_blank" href="http://ammoseek.com/">Ammoseek.com</a>
88
  * <a target="_blank" href="http://www.avantlink.com/">Avantlink.com</a>
@@ -100,6 +108,7 @@ In one word WooCommerce Product Feed is a revolution. Yah, it’s a revolution o
100
  * <a target="_blank" href="http://www.newegg.com/">Newegg.com</a>
101
  * <a target="_blank" href="http://www.webgains.com/">Webgains.com</a>
102
  * <a target="_blank" href="http://www.rakuten.com/">Rakuten.com</a>
 
103
  * <a target="_blank" href="http://www.mysmartprice.com/">Mysmartprice.com</a>
104
  * <a target="_blank" href="http://ae.pricena.com/en/">Pricena.com</a>
105
  * <a target="_blank" href="http://www.pricejugaad.com/">Pricejugaad.com</a>
@@ -138,10 +147,6 @@ Due to PHP execution time and memory limit its not possible to process Thousands
138
 
139
  It is possible to use any wp_options values into feed. Most of the plugins used to save data as option. So using premium version of our plugin user can use any other plugin data to make feed.
140
 
141
- **FREE FEED CONFIGURATION**
142
-
143
- We have developed a super easy user interface so that you can make feed using any woocommerce attribute and also other plugin attributes. If you still need assistant then we will configure your feed for any 2 merchant for free. So that you can start your marketing campaign within minutes.
144
-
145
  **SUPPORT TEAM**
146
 
147
  We’ve a dedicated team of coders and wordpress experts to make your journey to us friendlier & error free. So, if you want to use our plugin or if you are facing any problem with our plugin feel free to say us by emailing here: support@webappick.com.
@@ -205,6 +210,74 @@ Using pro version:
205
 
206
  == Changelog ==
207
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
208
  = 1.5.15(2016-05-27) =
209
  * Fixed: Compatible with PHP version 5.3
210
  * Improved: Pre Configured Template Loading Time
3
  Donate link: https://webappick.com
4
  Tags: Google,Google Shopping Feed,Google Merchant Feed,Amazon,eBay,bing,pricegrabber,nextag,pricerunner,facebook,kelkoo,feed,Product feed,woocommerce feed,woocommerce product feed, txt export, csv export, xml export,woocommerce export,product export, newegg,rakuten,houzz,godatafeed,pricefalls,google merchant,google shopping,sell,sears,variation export,shareasale,etsy,Buy,Getprice,LeGuide,Twenga,Beslist,Kieskeurig,HotLine,Yandex.Market,product variation,connexity,Commission Junction,channel advisor,dealtime,shopbot,shopzilla,yahoo,Getprice,Gimme,Junglee,Myshopping,Priceme,Shopmania,Wine-searcher
5
  Requires at least: 3.6
6
+ Tested up to: 4.7
7
  Stable tag: 4.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
43
 
44
  [youtube https://www.youtube.com/watch?v=xw3R4v1LMe4]
45
 
46
+ **Google Merchant Feed Upload**
47
+ [youtube https://www.youtube.com/watch?v=PTUYgF7DwEo]
48
+
49
  **AVAILABLE FEATURES:**
50
 
51
  * It is highly customizable, having access to 100+ merchant sites & also very responsive of user commands.
60
  * Output Limitation. You can Limit output length according to your merchant feed specification.
61
  * Scheduled Feed Update
62
  * Auto Feed upload via FTP
63
+ * Supported Merchants
64
  * <a target="_blank" href="https://www.google.com/retail/merchant-center/">Google Shopping </a>
65
  * <a target="_blank" href="https://www.google.com/adwords/">Google Adwords </a>
66
  * <a target="_blank" href="https://www.facebook.com/business/a/online-sales/dynamic-product-ads"> Facebook Catalog </a>
75
  * <a target="_blank" href="http://advertise.bingads.microsoft.com/en-uk/home">Bing Ads </a>
76
  * <a target="_blank" href="http://www.idealo.de/">Idealo.de </a>
77
  * <a target="_blank" href="https://www.beslist.nl/">Beslist.nl</a>
78
+ * <a target="_blank" href="https://www.ffshoppen.nl/">ffshoppen.nl</a>
79
+ * <a target="_blank" href="https://www.vergelijk.nl/">vergelijk.nl</a>
80
+ * <a target="_blank" href="https://siroop.ch/">siroop.ch</a>
81
+ * <a target="_blank" href="http://www.bizrate.com/">bizrate.com</a>
82
  * <a target="_blank" href="http://www.shopping.com/">Shopping.com</a>
83
  * <a target="_blank" href="http://www.shopzilla.com/">Shopzilla.com</a>
84
  * <a target="_blank" href="http://www.shopmania.com/">Shopmania.com</a>
89
  * <a target="_blank" href="http://www.polyvore.com/">Polyvore.com</a>
90
  * <a target="_blank" href="http://opensky.com">Opensky.com</a>
91
  * <a target="_blank" href="http://opensky.com">11Main.com</a>
92
+ * <a target="_blank" href="http://www.shopbot.ca/">Shopbot.ca</a>
93
+ * <a target="_blank" href="http://www.twenga.com/">Twenga.com/</a>
94
  * <a target="_blank" href="http://www.wine-searcher.com/">Wine-searcher.com</a>
95
  * <a target="_blank" href="http://ammoseek.com/">Ammoseek.com</a>
96
  * <a target="_blank" href="http://www.avantlink.com/">Avantlink.com</a>
108
  * <a target="_blank" href="http://www.newegg.com/">Newegg.com</a>
109
  * <a target="_blank" href="http://www.webgains.com/">Webgains.com</a>
110
  * <a target="_blank" href="http://www.rakuten.com/">Rakuten.com</a>
111
+ * <a target="_blank" href="https://www.quicksales.com.au/">Quicksales.com.au</a>
112
  * <a target="_blank" href="http://www.mysmartprice.com/">Mysmartprice.com</a>
113
  * <a target="_blank" href="http://ae.pricena.com/en/">Pricena.com</a>
114
  * <a target="_blank" href="http://www.pricejugaad.com/">Pricejugaad.com</a>
147
 
148
  It is possible to use any wp_options values into feed. Most of the plugins used to save data as option. So using premium version of our plugin user can use any other plugin data to make feed.
149
 
 
 
 
 
150
  **SUPPORT TEAM**
151
 
152
  We’ve a dedicated team of coders and wordpress experts to make your journey to us friendlier & error free. So, if you want to use our plugin or if you are facing any problem with our plugin feel free to say us by emailing here: support@webappick.com.
210
 
211
  == Changelog ==
212
 
213
+ = 1.5.36(2016-11-28) =
214
+ * Removed Promotional Message
215
+
216
+ = 1.5.35(2016-11-27) =
217
+ * Added: Functionality to Include Extra header information into feed
218
+
219
+ = 1.5.34(2016-11-23) =
220
+ * Fixed: Remove non UTF-8 character from attribute output value
221
+ * Added: Remove Short Codes from Product Description
222
+
223
+ = 1.5.33(2016-11-01) =
224
+ * Fixed: Output product category according to category hierarchy
225
+
226
+ = 1.5.32(2016-11-01) =
227
+ * Fixed: Removed the space between link attribute and suffix. For example, It's possible to add tracking code into url.
228
+
229
+ = 1.5.31(2016-10-14) =
230
+ * Added: Google Ad words Feed template
231
+ * Added: Shopbot feed template
232
+ * Added: Remove special character from the attribute output value
233
+
234
+ = 1.5.30(2016-10-10) =
235
+ * Added the difference between premium and free version
236
+
237
+ = 1.5.29(2016-10-04) =
238
+ * replace product description line break with space
239
+
240
+ = 1.5.28(2016-09-22) =
241
+ * class-woo-feed-error-message.php committed
242
+
243
+ = 1.5.27(2016-09-22) =
244
+ * Show error message if WordPress Upload directory is not writable
245
+
246
+ = 1.5.26(2016-09-10) =
247
+ * Remove space from beginning and ending of strings for CSV and TXT feed
248
+
249
+ = 1.5.25(2016-09-03) =
250
+ * Fixed: CSRF Security Vulnerability
251
+
252
+ = 1.5.24(2016-09-02) =
253
+ * Modified: Hex character encoding error for XML feed
254
+ * Fixed: CSRF Security Vulnerability
255
+
256
+ = 1.5.23(2016-08-26) =
257
+ * Modified: Hex character encoding error for XML feed
258
+
259
+ = 1.5.22(2016-08-23) =
260
+ * Fixed: Hex character encoding error for XML feed
261
+
262
+ = 1.5.21(2016-08-03) =
263
+ * Added: is_object checking for global variable product
264
+
265
+ = 1.5.20(2016-07-26) =
266
+ * Fixed: hard coded db query for product count
267
+
268
+ = 1.5.19(2016-07-25) =
269
+ * Fixed: return custom attribute value instead of slug
270
+
271
+ = 1.5.18(2016-07-21) =
272
+ * g:shipping_region attribute added to google merchant class.
273
+
274
+ = 1.5.17(2016-07-03) =
275
+ * Fixed: Fatal error: Call to a member function is_type()
276
+
277
+ = 1.5.16(2016-06-13) =
278
+ * Fixed: Blank Screen Error
279
+ * Improved: Feed Making Process
280
+
281
  = 1.5.15(2016-05-27) =
282
  * Fixed: Compatible with PHP version 5.3
283
  * Improved: Pre Configured Template Loading Time
admin/class-woo-feed-admin.php CHANGED
@@ -138,6 +138,8 @@ class Woo_Feed_Admin
138
  add_menu_page(__('Woo Feed', 'woo-feed'), __('Woo Feed', 'woo-feed'), 'manage_options', __FILE__, 'woo_feed_generate_feed', 'dashicons-rss');
139
  add_submenu_page(__FILE__, __('Make Feed', 'woo-feed'), __('Make Feed', 'woo-feed'), 'manage_options', __FILE__, 'woo_feed_generate_feed');
140
  add_submenu_page(__FILE__, __('Manage Feeds', 'woo-feed'), __('Manage Feeds', 'woo-feed'), 'manage_options', 'woo_feed_manage_feed', 'woo_feed_manage_feed');
 
141
  }
142
  }
 
143
  }
138
  add_menu_page(__('Woo Feed', 'woo-feed'), __('Woo Feed', 'woo-feed'), 'manage_options', __FILE__, 'woo_feed_generate_feed', 'dashicons-rss');
139
  add_submenu_page(__FILE__, __('Make Feed', 'woo-feed'), __('Make Feed', 'woo-feed'), 'manage_options', __FILE__, 'woo_feed_generate_feed');
140
  add_submenu_page(__FILE__, __('Manage Feeds', 'woo-feed'), __('Manage Feeds', 'woo-feed'), 'manage_options', 'woo_feed_manage_feed', 'woo_feed_manage_feed');
141
+ add_submenu_page(__FILE__, __('Premium', 'woo-feed'), __('Premium', 'woo-feed'), 'manage_options', 'woo_feed_pro_vs_free', 'woo_feed_pro_vs_free');
142
  }
143
  }
144
+
145
  }
admin/css/woo-feed-admin.css CHANGED
@@ -144,6 +144,10 @@
144
  width: 29px;
145
  }
146
 
 
 
 
 
147
  .wf_mattributes {
148
  width: 150px;
149
  left: 0;
144
  width: 29px;
145
  }
146
 
147
+ .wfnoempty{
148
+ width:120px;
149
+ }
150
+
151
  .wf_mattributes {
152
  width: 150px;
153
  left: 0;
admin/js/woo-feed-admin.js CHANGED
@@ -145,7 +145,11 @@
145
  });
146
 
147
  //Expand output type
148
- $(document).on('click', '.expandType', function (event) {
 
 
 
 
149
  $(this).closest('tr').find('.outputType').attr('multiple', 'multiple');
150
  $(this).closest('tr').find('.contractType').show();
151
  $(this).hide();
@@ -153,7 +157,11 @@
153
  });
154
 
155
  //Contract output type
156
- $(document).on('click', '.contractType', function (event) {
 
 
 
 
157
  $(this).closest('tr').find('.outputType').removeAttr('multiple');
158
  $(this).closest('tr').find('.expandType').show();
159
  $(this).hide();
145
  });
146
 
147
  //Expand output type
148
+ $(document).on('click', '.expandType', function () {
149
+ $('.outputType').each(function (index, element) {
150
+ //do stuff to each individually.
151
+ $(this).attr('name', "output_type[" + index + "][]");
152
+ });
153
  $(this).closest('tr').find('.outputType').attr('multiple', 'multiple');
154
  $(this).closest('tr').find('.contractType').show();
155
  $(this).hide();
157
  });
158
 
159
  //Contract output type
160
+ $(document).on('click', '.contractType', function () {
161
+ $('.outputType').each(function (index, element) {
162
+ //do stuff to each individually.
163
+ $(this).attr('name', "output_type[" + index + "][]");
164
+ });
165
  $(this).closest('tr').find('.outputType').removeAttr('multiple');
166
  $(this).closest('tr').find('.expandType').show();
167
  $(this).hide();
admin/partials/adwords/add-feed.php ADDED
@@ -0,0 +1,688 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <ul class="wf_tabs">
2
+ <li>
3
+ <input type="radio" name="wf_tabs" id="tab1" checked/>
4
+ <label class="wf-tab-name" for="tab1"><?php echo _e('Feed Config', 'woo-feed'); ?></label>
5
+
6
+ <div id="wf-tab-content1" class="wf-tab-content">
7
+ <table class="table tree widefat fixed sorted_table mtable" width="100%" id="table-1">
8
+ <thead>
9
+ <tr>
10
+ <th></th>
11
+ <th><?php echo ucfirst($provider); ?> <?php echo _e('Attributes', 'woo-feed'); ?></th>
12
+ <th><?php echo _e('Prefix', 'woo-feed'); ?></th>
13
+ <th><?php echo _e('Type', 'woo-feed'); ?></th>
14
+ <th><?php echo _e('Value', 'woo-feed'); ?></th>
15
+ <th><?php echo _e('Suffix', 'woo-feed'); ?></th>
16
+ <th><?php echo _e('Output Type', 'woo-feed'); ?></th>
17
+ <th><?php echo _e('Output Limit', 'woo-feed'); ?></th>
18
+ <th></th>
19
+ </tr>
20
+ </thead>
21
+ <tbody>
22
+ <tr>
23
+ <td>
24
+ <i class="wf_sortedtable dashicons dashicons-menu"></i>
25
+ </td>
26
+ <td>
27
+ <input type="text" name="mattributes[]" autocomplete="off" required
28
+ class="wf_validate_attr wf_mattributes" value="ID"/>
29
+ </td>
30
+ <td>
31
+ <input type="text" name="prefix[]" autocomplete="off" class="wf_ps"/>
32
+ </td>
33
+ <td>
34
+ <select name="type[]" class="attr_type wfnoempty">
35
+ <option value="attribute"> <?php echo _e('Attribute', 'woo-feed'); ?></option>
36
+ <option value="pattern"> <?php echo _e('Pattern', 'woo-feed'); ?></option>
37
+ </select>
38
+ </td>
39
+ <td>
40
+ <select name="attributes[]" id="" required="required"
41
+ class="wf_validate_attr wf_attr wf_attributes">
42
+ <?php echo $product->attributeDropdown('id'); ?>
43
+ </select>
44
+ <input type="text" name="default[]" autocomplete="off" class="wf_default wf_attributes"
45
+ style=" display: none;"/>
46
+ </td>
47
+ <td>
48
+ <input type="text" name="suffix[]" autocomplete="off" class="wf_ps"/>
49
+ </td>
50
+ <td>
51
+ <select name="output_type[][]" id="" class="outputType wfnoempty">
52
+ <option value="1">Default</option>
53
+ <option value="2">Strip Tags</option>
54
+ <option value="3">UTF-8 Encode</option>
55
+ <option value="4">htmlentities</option>
56
+ <option value="5">Integer</option>
57
+ <option value="6">Price</option>
58
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
59
+ <option value="8">CDATA</option>
60
+ </select>
61
+ <i class="dashicons dashicons-editor-expand expandType"></i>
62
+ <i style="display: none;" class="dashicons dashicons-editor-contract contractType"></i>
63
+ </td>
64
+ <td>
65
+ <input type="text" name="limit[]" class="wf_ps"/>
66
+ </td>
67
+ <td>
68
+ <i class="delRow dashicons dashicons-trash"></i>
69
+ </td>
70
+ </tr>
71
+ <tr>
72
+ <td>
73
+ <i class="wf_sortedtable dashicons dashicons-menu"></i>
74
+ </td>
75
+ <td>
76
+ <input type="text" name="mattributes[]" autocomplete="off" required
77
+ class="wf_validate_attr wf_mattributes" value="ID2"/>
78
+ </td>
79
+ <td>
80
+ <input type="text" name="prefix[]" autocomplete="off" class="wf_ps"/>
81
+ </td>
82
+ <td>
83
+ <select name="type[]" class="attr_type">
84
+ <option value="attribute"> <?php echo _e('Attribute', 'woo-feed'); ?></option>
85
+ <option value="pattern"> <?php echo _e('Pattern', 'woo-feed'); ?></option>
86
+ </select>
87
+ </td>
88
+ <td>
89
+ <select name="attributes[]" id="" required="required"
90
+ class="wf_validate_attr wf_attr wf_attributes">
91
+ <?php echo $product->attributeDropdown('sku'); ?>
92
+ </select>
93
+ <input type="text" name="default[]" autocomplete="off" class="wf_default wf_attributes"
94
+ style=" display: none;"/>
95
+ </td>
96
+ <td>
97
+ <input type="text" name="suffix[]" autocomplete="off" class="wf_ps"/>
98
+ </td>
99
+ <td>
100
+ <select name="output_type[][]" id="" class="outputType wfnoempty">
101
+ <option value="1">Default</option>
102
+ <option value="2">Strip Tags</option>
103
+ <option value="3">UTF-8 Encode</option>
104
+ <option value="4">htmlentities</option>
105
+ <option value="5">Integer</option>
106
+ <option value="6">Price</option>
107
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
108
+ <option value="8">CDATA</option>
109
+ </select>
110
+ <i class="dashicons dashicons-editor-expand expandType"></i>
111
+ <i style="display: none;" class="dashicons dashicons-editor-contract contractType"></i>
112
+ </td>
113
+ <td>
114
+ <input type="text" name="limit[]" class="wf_ps"/>
115
+ </td>
116
+ <td>
117
+ <i class="delRow dashicons dashicons-trash"></i>
118
+ </td>
119
+ </tr>
120
+ <tr>
121
+ <td>
122
+ <i class="wf_sortedtable dashicons dashicons-menu"></i>
123
+ </td>
124
+ <td>
125
+ <input type="text" name="mattributes[]" autocomplete="off" required
126
+ class="wf_validate_attr wf_mattributes" value="Item title"/>
127
+ </td>
128
+ <td>
129
+ <input type="text" name="prefix[]" autocomplete="off" class="wf_ps"/>
130
+ </td>
131
+ <td>
132
+ <select name="type[]" class="attr_type">
133
+ <option value="attribute"> <?php echo _e('Attribute', 'woo-feed'); ?></option>
134
+ <option value="pattern"> <?php echo _e('Pattern', 'woo-feed'); ?></option>
135
+ </select>
136
+ </td>
137
+ <td>
138
+ <select name="attributes[]" id="" required="required"
139
+ class="wf_validate_attr wf_attr wf_attributes">
140
+ <?php echo $product->attributeDropdown('title'); ?>
141
+ </select>
142
+ <input type="text" name="default[]" autocomplete="off" class="wf_default wf_attributes"
143
+ style=" display: none;"/>
144
+ </td>
145
+ <td>
146
+ <input type="text" name="suffix[]" autocomplete="off" class="wf_ps"/>
147
+ </td>
148
+ <td>
149
+ <select name="output_type[][]" id="" class="outputType wfnoempty">
150
+ <option value="1">Default</option>
151
+ <option value="2">Strip Tags</option>
152
+ <option value="3">UTF-8 Encode</option>
153
+ <option value="4">htmlentities</option>
154
+ <option value="5">Integer</option>
155
+ <option value="6">Price</option>
156
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
157
+ <option value="8">CDATA</option>
158
+ </select>
159
+ <i class="dashicons dashicons-editor-expand expandType"></i>
160
+ <i style="display: none;" class="dashicons dashicons-editor-contract contractType"></i>
161
+ </td>
162
+ <td>
163
+ <input type="text" name="limit[]" class="wf_ps"/>
164
+ </td>
165
+ <td>
166
+ <i class="delRow dashicons dashicons-trash"></i>
167
+ </td>
168
+ </tr>
169
+ <tr>
170
+ <td>
171
+ <i class="wf_sortedtable dashicons dashicons-menu"></i>
172
+ </td>
173
+ <td>
174
+ <input type="text" name="mattributes[]" autocomplete="off" required
175
+ class="wf_validate_attr wf_mattributes" value="Final URL"/>
176
+ </td>
177
+ <td>
178
+ <input type="text" name="prefix[]" autocomplete="off" class="wf_ps"/>
179
+ </td>
180
+ <td>
181
+ <select name="type[]" class="attr_type">
182
+ <option value="attribute"> <?php echo _e('Attribute', 'woo-feed'); ?></option>
183
+ <option value="pattern"> <?php echo _e('Pattern', 'woo-feed'); ?></option>
184
+ </select>
185
+ </td>
186
+ <td>
187
+ <select name="attributes[]" id="" required="required"
188
+ class="wf_validate_attr wf_attr wf_attributes">
189
+ <?php echo $product->attributeDropdown('link'); ?>
190
+ </select>
191
+ <input type="text" name="default[]" autocomplete="off" class="wf_default wf_attributes"
192
+ style=" display: none;"/>
193
+ </td>
194
+ <td>
195
+ <input type="text" name="suffix[]" autocomplete="off" class="wf_ps"/>
196
+ </td>
197
+ <td>
198
+ <select name="output_type[][]" id="" class="outputType wfnoempty">
199
+ <option value="1">Default</option>
200
+ <option value="2">Strip Tags</option>
201
+ <option value="3">UTF-8 Encode</option>
202
+ <option value="4">htmlentities</option>
203
+ <option value="5">Integer</option>
204
+ <option value="6">Price</option>
205
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
206
+ <option value="8">CDATA</option>
207
+ </select>
208
+ <i class="dashicons dashicons-editor-expand expandType"></i>
209
+ <i style="display: none;" class="dashicons dashicons-editor-contract contractType"></i>
210
+ </td>
211
+ <td>
212
+ <input type="text" name="limit[]" class="wf_ps"/>
213
+ </td>
214
+ <td>
215
+ <i class="delRow dashicons dashicons-trash"></i>
216
+ </td>
217
+ </tr>
218
+ <tr>
219
+ <td>
220
+ <i class="wf_sortedtable dashicons dashicons-menu"></i>
221
+ </td>
222
+ <td>
223
+ <input type="text" name="mattributes[]" autocomplete="off" required
224
+ class="wf_validate_attr wf_mattributes" value="Image URL"/>
225
+ </td>
226
+ <td>
227
+ <input type="text" name="prefix[]" autocomplete="off" class="wf_ps"/>
228
+ </td>
229
+ <td>
230
+ <select name="type[]" class="attr_type">
231
+ <option value="attribute"> <?php echo _e('Attribute', 'woo-feed'); ?></option>
232
+ <option value="pattern"> <?php echo _e('Pattern', 'woo-feed'); ?></option>
233
+ </select>
234
+ </td>
235
+ <td>
236
+ <select name="attributes[]" id="" required="required"
237
+ class="wf_validate_attr wf_attr wf_attributes">
238
+ <?php echo $product->attributeDropdown('image'); ?>
239
+ </select>
240
+ <input type="text" name="default[]" autocomplete="off" class="wf_default wf_attributes"
241
+ style=" display: none;"/>
242
+ </td>
243
+ <td>
244
+ <input type="text" name="suffix[]" autocomplete="off" class="wf_ps"/>
245
+ </td>
246
+ <td>
247
+ <select name="output_type[][]" id="" class="outputType wfnoempty">
248
+ <option value="1">Default</option>
249
+ <option value="2">Strip Tags</option>
250
+ <option value="3">UTF-8 Encode</option>
251
+ <option value="4">htmlentities</option>
252
+ <option value="5">Integer</option>
253
+ <option value="6">Price</option>
254
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
255
+ <option value="8">CDATA</option>
256
+ </select>
257
+ <i class="dashicons dashicons-editor-expand expandType"></i>
258
+ <i style="display: none;" class="dashicons dashicons-editor-contract contractType"></i>
259
+ </td>
260
+ <td>
261
+ <input type="text" name="limit[]" class="wf_ps"/>
262
+ </td>
263
+ <td>
264
+ <i class="delRow dashicons dashicons-trash"></i>
265
+ </td>
266
+ </tr>
267
+ <tr>
268
+ <td>
269
+ <i class="wf_sortedtable dashicons dashicons-menu"></i>
270
+ </td>
271
+ <td>
272
+ <input type="text" name="mattributes[]" autocomplete="off" required
273
+ class="wf_validate_attr wf_mattributes" value="Item subtitle"/>
274
+ </td>
275
+ <td>
276
+ <input type="text" name="prefix[]" autocomplete="off" class="wf_ps"/>
277
+ </td>
278
+ <td>
279
+ <select name="type[]" class="attr_type">
280
+ <option value="attribute"> <?php echo _e('Attribute', 'woo-feed'); ?></option>
281
+ <option value="pattern"> <?php echo _e('Pattern', 'woo-feed'); ?></option>
282
+ </select>
283
+ </td>
284
+ <td>
285
+ <select name="attributes[]" id="" required="required"
286
+ class="wf_validate_attr wf_attr wf_attributes">
287
+ <?php echo $product->attributeDropdown('short_description'); ?>
288
+ </select>
289
+ <input type="text" name="default[]" autocomplete="off" class="wf_default wf_attributes"
290
+ style=" display: none;"/>
291
+ </td>
292
+ <td>
293
+ <input type="text" name="suffix[]" autocomplete="off" class="wf_ps"/>
294
+ </td>
295
+ <td>
296
+ <select name="output_type[][]" id="" class="outputType wfnoempty">
297
+ <option value="1">Default</option>
298
+ <option value="2">Strip Tags</option>
299
+ <option value="3">UTF-8 Encode</option>
300
+ <option value="4">htmlentities</option>
301
+ <option value="5">Integer</option>
302
+ <option value="6">Price</option>
303
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
304
+ <option value="8">CDATA</option>
305
+ </select>
306
+ <i class="dashicons dashicons-editor-expand expandType"></i>
307
+ <i style="display: none;" class="dashicons dashicons-editor-contract contractType"></i>
308
+ </td>
309
+ <td>
310
+ <input type="text" name="limit[]" class="wf_ps"/>
311
+ </td>
312
+ <td>
313
+ <i class="delRow dashicons dashicons-trash"></i>
314
+ </td>
315
+ </tr>
316
+ <tr>
317
+ <td>
318
+ <i class="wf_sortedtable dashicons dashicons-menu"></i>
319
+ </td>
320
+ <td>
321
+ <input type="text" name="mattributes[]" autocomplete="off" required
322
+ class="wf_validate_attr wf_mattributes" value="Item description"/>
323
+ </td>
324
+ <td>
325
+ <input type="text" name="prefix[]" autocomplete="off" class="wf_ps"/>
326
+ </td>
327
+ <td>
328
+ <select name="type[]" class="attr_type">
329
+ <option value="attribute"> <?php echo _e('Attribute', 'woo-feed'); ?></option>
330
+ <option value="pattern"> <?php echo _e('Pattern', 'woo-feed'); ?></option>
331
+ </select>
332
+ </td>
333
+ <td>
334
+ <select name="attributes[]" id="" required="required"
335
+ class="wf_validate_attr wf_attr wf_attributes">
336
+ <?php echo $product->attributeDropdown("description"); ?>
337
+ </select>
338
+ <input type="text" name="default[]" autocomplete="off" class="wf_default wf_attributes"
339
+ style=" display: none;"/>
340
+ </td>
341
+ <td>
342
+ <input type="text" name="suffix[]" autocomplete="off" class="wf_ps"/>
343
+ </td>
344
+ <td>
345
+ <select name="output_type[][]" id="" class="outputType wfnoempty">
346
+ <option value="1">Default</option>
347
+ <option value="2">Strip Tags</option>
348
+ <option value="3">UTF-8 Encode</option>
349
+ <option value="4">htmlentities</option>
350
+ <option value="5">Integer</option>
351
+ <option value="6">Price</option>
352
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
353
+ <option value="8">CDATA</option>
354
+ </select>
355
+ <i class="dashicons dashicons-editor-expand expandType"></i>
356
+ <i style="display: none;" class="dashicons dashicons-editor-contract contractType"></i>
357
+ </td>
358
+ <td>
359
+ <input type="text" name="limit[]" class="wf_ps"/>
360
+ </td>
361
+ <td>
362
+ <i class="delRow dashicons dashicons-trash"></i>
363
+ </td>
364
+ </tr>
365
+ <tr>
366
+ <td>
367
+ <i class="wf_sortedtable dashicons dashicons-menu"></i>
368
+ </td>
369
+ <td>
370
+ <input type="text" name="mattributes[]" autocomplete="off" required
371
+ class="wf_validate_attr wf_mattributes" value="Item category"/>
372
+ </td>
373
+ <td>
374
+ <input type="text" name="prefix[]" autocomplete="off" class="wf_ps"/>
375
+ </td>
376
+ <td>
377
+ <select name="type[]" class="attr_type">
378
+ <option value="attribute"> <?php echo _e('Attribute', 'woo-feed'); ?></option>
379
+ <option value="pattern"> <?php echo _e('Pattern', 'woo-feed'); ?></option>
380
+ </select>
381
+ </td>
382
+ <td>
383
+ <select name="attributes[]" id="" required="required"
384
+ class="wf_validate_attr wf_attr wf_attributes">
385
+ <?php echo $product->attributeDropdown("product_type"); ?>
386
+ </select>
387
+ <input type="text" name="default[]" autocomplete="off" class="wf_default wf_attributes"
388
+ style=" display: none;"/>
389
+ </td>
390
+ <td>
391
+ <input type="text" name="suffix[]" autocomplete="off" class="wf_ps"/>
392
+ </td>
393
+ <td>
394
+ <select name="output_type[][]" id="" class="outputType wfnoempty">
395
+ <option value="1">Default</option>
396
+ <option value="2">Strip Tags</option>
397
+ <option value="3">UTF-8 Encode</option>
398
+ <option value="4">htmlentities</option>
399
+ <option value="5">Integer</option>
400
+ <option value="6">Price</option>
401
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
402
+ <option value="8">CDATA</option>
403
+ </select>
404
+ <i class="dashicons dashicons-editor-expand expandType"></i>
405
+ <i style="display: none;" class="dashicons dashicons-editor-contract contractType"></i>
406
+ </td>
407
+ <td>
408
+ <input type="text" name="limit[]" class="wf_ps"/>
409
+ </td>
410
+ <td>
411
+ <i class="delRow dashicons dashicons-trash"></i>
412
+ </td>
413
+ </tr>
414
+ <tr>
415
+ <td>
416
+ <i class="wf_sortedtable dashicons dashicons-menu"></i>
417
+ </td>
418
+ <td>
419
+ <input type="text" name="mattributes[]" autocomplete="off" required
420
+ class="wf_validate_attr wf_mattributes" value="Price"/>
421
+ </td>
422
+ <td>
423
+ <input type="text" name="prefix[]" autocomplete="off" class="wf_ps"/>
424
+ </td>
425
+ <td>
426
+ <select name="type[]" class="attr_type">
427
+ <option value="attribute"> <?php echo _e('Attribute', 'woo-feed'); ?></option>
428
+ <option value="pattern" > <?php echo _e('Pattern', 'woo-feed'); ?></option>
429
+ </select>
430
+ </td>
431
+ <td>
432
+ <select name="attributes[]" id="" required="required"
433
+ class="wf_validate_attr wf_attr wf_attributes">
434
+ <?php echo $product->attributeDropdown("price"); ?>
435
+ </select>
436
+ <input type="text" style=" display: none;" name="default[]" autocomplete="off" class="wf_default wf_attributes"
437
+ value="" />
438
+ </td>
439
+ <td>
440
+ <input type="text" name="suffix[]" autocomplete="off" class="wf_ps"/>
441
+ </td>
442
+ <td>
443
+ <select name="output_type[][]" id="" class="outputType wfnoempty">
444
+ <option value="1">Default</option>
445
+ <option value="2">Strip Tags</option>
446
+ <option value="3">UTF-8 Encode</option>
447
+ <option value="4">htmlentities</option>
448
+ <option value="5">Integer</option>
449
+ <option value="6">Price</option>
450
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
451
+ <option value="8">CDATA</option>
452
+ </select>
453
+ <i class="dashicons dashicons-editor-expand expandType"></i>
454
+ <i style="display: none;" class="dashicons dashicons-editor-contract contractType"></i>
455
+ </td>
456
+ <td>
457
+ <input type="text" name="limit[]" class="wf_ps"/>
458
+ </td>
459
+ <td>
460
+ <i class="delRow dashicons dashicons-trash"></i>
461
+ </td>
462
+ </tr>
463
+ <tr>
464
+ <td>
465
+ <i class="wf_sortedtable dashicons dashicons-menu"></i>
466
+ </td>
467
+ <td>
468
+ <input type="text" name="mattributes[]" autocomplete="off" required
469
+ class="wf_validate_attr wf_mattributes" value="Sale price"/>
470
+ </td>
471
+ <td>
472
+ <input type="text" name="prefix[]" autocomplete="off" class="wf_ps"/>
473
+ </td>
474
+ <td>
475
+ <select name="type[]" class="attr_type">
476
+ <option value="attribute"> <?php echo _e('Attribute', 'woo-feed'); ?></option>
477
+ <option value="pattern"> <?php echo _e('Pattern', 'woo-feed'); ?></option>
478
+ </select>
479
+ </td>
480
+ <td>
481
+ <select name="attributes[]" id="" required="required"
482
+ class="wf_validate_attr wf_attr wf_attributes">
483
+ <?php echo $product->attributeDropdown('sale_price'); ?>
484
+ </select>
485
+ <input type="text" name="default[]" autocomplete="off" class="wf_default wf_attributes"
486
+ style=" display: none;"/>
487
+ </td>
488
+ <td>
489
+ <input type="text" name="suffix[]" autocomplete="off" class="wf_ps"/>
490
+ </td>
491
+ <td>
492
+ <select name="output_type[][]" id="" class="outputType wfnoempty">
493
+ <option value="1">Default</option>
494
+ <option value="2">Strip Tags</option>
495
+ <option value="3">UTF-8 Encode</option>
496
+ <option value="4">htmlentities</option>
497
+ <option value="5">Integer</option>
498
+ <option value="6">Price</option>
499
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
500
+ <option value="8">CDATA</option>
501
+ </select>
502
+ <i class="dashicons dashicons-editor-expand expandType"></i>
503
+ <i style="display: none;" class="dashicons dashicons-editor-contract contractType"></i>
504
+ </td>
505
+ <td>
506
+ <input type="text" name="limit[]" class="wf_ps"/>
507
+ </td>
508
+ <td>
509
+ <i class="delRow dashicons dashicons-trash"></i>
510
+ </td>
511
+ </tr>
512
+ <tr>
513
+ <td>
514
+ <i class="wf_sortedtable dashicons dashicons-menu"></i>
515
+ </td>
516
+ <td>
517
+ <input type="text" name="mattributes[]" autocomplete="off" required
518
+ class="wf_validate_attr wf_mattributes" value="Contextual keywords"/>
519
+ </td>
520
+ <td>
521
+ <input type="text" name="prefix[]" autocomplete="off" class="wf_ps"/>
522
+ </td>
523
+ <td>
524
+ <select name="type[]" class="attr_type">
525
+ <option value="attribute"> <?php echo _e('Attribute', 'woo-feed'); ?></option>
526
+ <option selected value="pattern"> <?php echo _e('Pattern', 'woo-feed'); ?></option>
527
+ </select>
528
+ </td>
529
+ <td>
530
+ <select name="attributes[]" style="display: none;" id="" required="required"
531
+ class="wf_validate_attr wf_attr wf_attributes">
532
+ <?php echo $product->attributeDropdown(); ?>
533
+ </select>
534
+ <input type="text" name="default[]" autocomplete="off" class="wf_default wf_attributes"
535
+ />
536
+ </td>
537
+ <td>
538
+ <input type="text" name="suffix[]" autocomplete="off" class="wf_ps"/>
539
+ </td>
540
+ <td>
541
+ <select name="output_type[][]" id="" class="outputType wfnoempty">
542
+ <option value="1">Default</option>
543
+ <option value="2">Strip Tags</option>
544
+ <option value="3">UTF-8 Encode</option>
545
+ <option value="4">htmlentities</option>
546
+ <option value="5">Integer</option>
547
+ <option value="6">Price</option>
548
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
549
+ <option value="8">CDATA</option>
550
+ </select>
551
+ <i class="dashicons dashicons-editor-expand expandType"></i>
552
+ <i style="display: none;" class="dashicons dashicons-editor-contract contractType"></i>
553
+ </td>
554
+ <td>
555
+ <input type="text" name="limit[]" class="wf_ps"/>
556
+ </td>
557
+ <td>
558
+ <i class="delRow dashicons dashicons-trash"></i>
559
+ </td>
560
+ </tr>
561
+ <tr>
562
+ <td>
563
+ <i class="wf_sortedtable dashicons dashicons-menu"></i>
564
+ </td>
565
+ <td>
566
+ <input type="text" name="mattributes[]" autocomplete="off" required
567
+ class="wf_validate_attr wf_mattributes" value="Item address"/>
568
+ </td>
569
+ <td>
570
+ <input type="text" name="prefix[]" autocomplete="off" class="wf_ps"/>
571
+ </td>
572
+ <td>
573
+ <select name="type[]" class="attr_type">
574
+ <option value="attribute"> <?php echo _e('Attribute', 'woo-feed'); ?></option>
575
+ <option selected value="pattern"> <?php echo _e('Pattern', 'woo-feed'); ?></option>
576
+ </select>
577
+ </td>
578
+ <td>
579
+ <select name="attributes[]" style="display: none;" id="" required="required"
580
+ class="wf_validate_attr wf_attr wf_attributes">
581
+ <?php echo $product->attributeDropdown(); ?>
582
+ </select>
583
+ <input type="text" name="default[]" autocomplete="off" class="wf_default wf_attributes"
584
+ />
585
+ </td>
586
+ <td>
587
+ <input type="text" name="suffix[]" autocomplete="off" class="wf_ps"/>
588
+ </td>
589
+ <td>
590
+ <select name="output_type[][]" id="" class="outputType wfnoempty">
591
+ <option value="1">Default</option>
592
+ <option value="2">Strip Tags</option>
593
+ <option value="3">UTF-8 Encode</option>
594
+ <option value="4">htmlentities</option>
595
+ <option value="5">Integer</option>
596
+ <option value="6">Price</option>
597
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
598
+ <option value="8">CDATA</option>
599
+ </select>
600
+ <i class="dashicons dashicons-editor-expand expandType"></i>
601
+ <i style="display: none;" class="dashicons dashicons-editor-contract contractType"></i>
602
+ </td>
603
+ <td>
604
+ <input type="text" name="limit[]" class="wf_ps"/>
605
+ </td>
606
+ <td>
607
+ <i class="delRow dashicons dashicons-trash"></i>
608
+ </td>
609
+ </tr>
610
+ </tbody>
611
+ <tfoot>
612
+ <tr>
613
+ <td>
614
+ <button type="button" class="button-small button-primary" id="wf_newRow">
615
+ <?php echo _e('Add New Row', 'woo-feed'); ?>
616
+ </button>
617
+ </td>
618
+ <td colspan="8">
619
+
620
+ </td>
621
+ </tr>
622
+ </tfoot>
623
+ </table>
624
+ <table class=" widefat fixed">
625
+ <tr>
626
+ <td align="left" class="">
627
+ <div class="makeFeedResponse"></div>
628
+ <div class="makeFeedComplete"></div>
629
+ </td>
630
+ <td align="right">
631
+ <button type="submit" id="wf_submit" class="wfbtn">
632
+ <?php echo _e('Save & Generate Feed', 'woo-feed'); ?>
633
+ </button>
634
+ </td>
635
+ </tr>
636
+ </table>
637
+ </div>
638
+ </li>
639
+ <li>
640
+ <input type="radio" name="wf_tabs" id="tab3"/>
641
+ <label class="wf-tab-name" for="tab3"><?php echo _e('FTP', 'woo-feed'); ?></label>
642
+
643
+ <div id="wf-tab-content3" class="wf-tab-content">
644
+ <table class="table widefat fixed mtable" width="100%">
645
+ <tbody>
646
+ <tr>
647
+ <td><?php echo _e('Enabled', 'woo-feed'); ?></td>
648
+ <td>
649
+ <select name="ftpenabled" id="">
650
+ <option value="0"><?php echo _e('Disabled', 'woo-feed'); ?></option>
651
+ <option value="1"><?php echo _e('Enabled', 'woo-feed'); ?></option>
652
+ </select>
653
+ </td>
654
+ </tr>
655
+ <tr>
656
+ <td><?php echo _e('Host Name', 'woo-feed'); ?></td>
657
+ <td><input type="text" name="ftphost"/></td>
658
+ </tr>
659
+ <tr>
660
+ <td><?php echo _e('User Name', 'woo-feed'); ?></td>
661
+ <td><input type="text" name="ftpuser"/></td>
662
+ </tr>
663
+ <tr>
664
+ <td><?php echo _e('Password', 'woo-feed'); ?></td>
665
+ <td><input type="password" name="ftppassword"/></td>
666
+ </tr>
667
+ <tr>
668
+ <td><?php echo _e('Path', 'woo-feed'); ?></td>
669
+ <td><input type="text" name="ftppath"/></td>
670
+ </tr>
671
+ </tbody>
672
+ </table>
673
+ <table class=" widefat fixed">
674
+ <tr>
675
+ <td align="left" class="makeFeedResponse">
676
+
677
+ </td>
678
+ <td align="right">
679
+ <button type="submit" id="wf_submit" class="wfbtn">
680
+ <?php echo _e('Save & Generate Feed', 'woo-feed'); ?>
681
+ </button>
682
+ </td>
683
+ </tr>
684
+ </table>
685
+ </div>
686
+ </li>
687
+
688
+ </ul>
admin/partials/amazon/add-feed.php CHANGED
@@ -55,7 +55,7 @@
55
  <option value="4">htmlentities</option>
56
  <option value="5">Integer</option>
57
  <option value="6">Price</option>
58
- <option value="7">Remove Space</option>
59
  <option value="8">CDATA</option>
60
  </select>
61
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -104,7 +104,7 @@
104
  <option value="4">htmlentities</option>
105
  <option value="5">Integer</option>
106
  <option value="6">Price</option>
107
- <option value="7">Remove Space</option>
108
  <option value="8">CDATA</option>
109
  </select>
110
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -153,7 +153,7 @@
153
  <option value="4">htmlentities</option>
154
  <option value="5">Integer</option>
155
  <option value="6">Price</option>
156
- <option value="7">Remove Space</option>
157
  <option value="8">CDATA</option>
158
  </select>
159
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -202,7 +202,7 @@
202
  <option value="4">htmlentities</option>
203
  <option value="5">Integer</option>
204
  <option value="6">Price</option>
205
- <option value="7">Remove Space</option>
206
  <option value="8">CDATA</option>
207
  </select>
208
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -251,7 +251,7 @@
251
  <option value="4">htmlentities</option>
252
  <option value="5">Integer</option>
253
  <option value="6">Price</option>
254
- <option value="7">Remove Space</option>
255
  <option value="8">CDATA</option>
256
  </select>
257
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -300,7 +300,7 @@
300
  <option value="4">htmlentities</option>
301
  <option value="5">Integer</option>
302
  <option value="6">Price</option>
303
- <option value="7">Remove Space</option>
304
  <option value="8">CDATA</option>
305
  </select>
306
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -349,7 +349,7 @@
349
  <option value="4">htmlentities</option>
350
  <option value="5">Integer</option>
351
  <option value="6">Price</option>
352
- <option value="7">Remove Space</option>
353
  <option value="8">CDATA</option>
354
  </select>
355
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -398,7 +398,7 @@
398
  <option value="4">htmlentities</option>
399
  <option value="5">Integer</option>
400
  <option value="6">Price</option>
401
- <option value="7">Remove Space</option>
402
  <option value="8">CDATA</option>
403
  </select>
404
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -447,7 +447,7 @@
447
  <option value="4">htmlentities</option>
448
  <option value="5">Integer</option>
449
  <option value="6">Price</option>
450
- <option value="7">Remove Space</option>
451
  <option value="8">CDATA</option>
452
  </select>
453
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -496,7 +496,7 @@
496
  <option value="4">htmlentities</option>
497
  <option value="5">Integer</option>
498
  <option value="6">Price</option>
499
- <option value="7">Remove Space</option>
500
  <option value="8">CDATA</option>
501
  </select>
502
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -545,7 +545,7 @@
545
  <option value="4">htmlentities</option>
546
  <option value="5">Integer</option>
547
  <option value="6">Price</option>
548
- <option value="7">Remove Space</option>
549
  <option value="8">CDATA</option>
550
  </select>
551
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -594,7 +594,7 @@
594
  <option value="4">htmlentities</option>
595
  <option value="5">Integer</option>
596
  <option value="6">Price</option>
597
- <option value="7">Remove Space</option>
598
  <option value="8">CDATA</option>
599
  </select>
600
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -643,7 +643,7 @@
643
  <option value="4">htmlentities</option>
644
  <option value="5">Integer</option>
645
  <option value="6">Price</option>
646
- <option value="7">Remove Space</option>
647
  <option value="8">CDATA</option>
648
  </select>
649
  <i class="dashicons dashicons-editor-expand expandType"></i>
55
  <option value="4">htmlentities</option>
56
  <option value="5">Integer</option>
57
  <option value="6">Price</option>
58
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
59
  <option value="8">CDATA</option>
60
  </select>
61
  <i class="dashicons dashicons-editor-expand expandType"></i>
104
  <option value="4">htmlentities</option>
105
  <option value="5">Integer</option>
106
  <option value="6">Price</option>
107
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
108
  <option value="8">CDATA</option>
109
  </select>
110
  <i class="dashicons dashicons-editor-expand expandType"></i>
153
  <option value="4">htmlentities</option>
154
  <option value="5">Integer</option>
155
  <option value="6">Price</option>
156
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
157
  <option value="8">CDATA</option>
158
  </select>
159
  <i class="dashicons dashicons-editor-expand expandType"></i>
202
  <option value="4">htmlentities</option>
203
  <option value="5">Integer</option>
204
  <option value="6">Price</option>
205
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
206
  <option value="8">CDATA</option>
207
  </select>
208
  <i class="dashicons dashicons-editor-expand expandType"></i>
251
  <option value="4">htmlentities</option>
252
  <option value="5">Integer</option>
253
  <option value="6">Price</option>
254
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
255
  <option value="8">CDATA</option>
256
  </select>
257
  <i class="dashicons dashicons-editor-expand expandType"></i>
300
  <option value="4">htmlentities</option>
301
  <option value="5">Integer</option>
302
  <option value="6">Price</option>
303
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
304
  <option value="8">CDATA</option>
305
  </select>
306
  <i class="dashicons dashicons-editor-expand expandType"></i>
349
  <option value="4">htmlentities</option>
350
  <option value="5">Integer</option>
351
  <option value="6">Price</option>
352
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
353
  <option value="8">CDATA</option>
354
  </select>
355
  <i class="dashicons dashicons-editor-expand expandType"></i>
398
  <option value="4">htmlentities</option>
399
  <option value="5">Integer</option>
400
  <option value="6">Price</option>
401
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
402
  <option value="8">CDATA</option>
403
  </select>
404
  <i class="dashicons dashicons-editor-expand expandType"></i>
447
  <option value="4">htmlentities</option>
448
  <option value="5">Integer</option>
449
  <option value="6">Price</option>
450
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
451
  <option value="8">CDATA</option>
452
  </select>
453
  <i class="dashicons dashicons-editor-expand expandType"></i>
496
  <option value="4">htmlentities</option>
497
  <option value="5">Integer</option>
498
  <option value="6">Price</option>
499
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
500
  <option value="8">CDATA</option>
501
  </select>
502
  <i class="dashicons dashicons-editor-expand expandType"></i>
545
  <option value="4">htmlentities</option>
546
  <option value="5">Integer</option>
547
  <option value="6">Price</option>
548
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
549
  <option value="8">CDATA</option>
550
  </select>
551
  <i class="dashicons dashicons-editor-expand expandType"></i>
594
  <option value="4">htmlentities</option>
595
  <option value="5">Integer</option>
596
  <option value="6">Price</option>
597
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
598
  <option value="8">CDATA</option>
599
  </select>
600
  <i class="dashicons dashicons-editor-expand expandType"></i>
643
  <option value="4">htmlentities</option>
644
  <option value="5">Integer</option>
645
  <option value="6">Price</option>
646
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
647
  <option value="8">CDATA</option>
648
  </select>
649
  <i class="dashicons dashicons-editor-expand expandType"></i>
admin/partials/become/add-feed.php CHANGED
@@ -55,7 +55,7 @@
55
  <option value="4">htmlentities</option>
56
  <option value="5">Integer</option>
57
  <option value="6">Price</option>
58
- <option value="7">Remove Space</option>
59
  <option value="8">CDATA</option>
60
  </select>
61
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -104,7 +104,7 @@
104
  <option value="4">htmlentities</option>
105
  <option value="5">Integer</option>
106
  <option value="6">Price</option>
107
- <option value="7">Remove Space</option>
108
  <option value="8">CDATA</option>
109
  </select>
110
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -153,7 +153,7 @@
153
  <option value="4">htmlentities</option>
154
  <option value="5">Integer</option>
155
  <option value="6">Price</option>
156
- <option value="7">Remove Space</option>
157
  <option value="8">CDATA</option>
158
  </select>
159
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -202,7 +202,7 @@
202
  <option value="4">htmlentities</option>
203
  <option value="5">Integer</option>
204
  <option value="6">Price</option>
205
- <option value="7">Remove Space</option>
206
  <option value="8">CDATA</option>
207
  </select>
208
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -251,7 +251,7 @@
251
  <option value="4">htmlentities</option>
252
  <option value="5">Integer</option>
253
  <option value="6">Price</option>
254
- <option value="7">Remove Space</option>
255
  <option value="8">CDATA</option>
256
  </select>
257
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -300,7 +300,7 @@
300
  <option value="4">htmlentities</option>
301
  <option value="5">Integer</option>
302
  <option value="6">Price</option>
303
- <option value="7">Remove Space</option>
304
  <option value="8">CDATA</option>
305
  </select>
306
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -349,7 +349,7 @@
349
  <option value="4">htmlentities</option>
350
  <option value="5">Integer</option>
351
  <option value="6">Price</option>
352
- <option value="7">Remove Space</option>
353
  <option value="8">CDATA</option>
354
  </select>
355
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -398,7 +398,7 @@
398
  <option value="4">htmlentities</option>
399
  <option value="5">Integer</option>
400
  <option value="6">Price</option>
401
- <option value="7">Remove Space</option>
402
  <option value="8">CDATA</option>
403
  </select>
404
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -447,7 +447,7 @@
447
  <option value="4">htmlentities</option>
448
  <option value="5">Integer</option>
449
  <option value="6">Price</option>
450
- <option value="7">Remove Space</option>
451
  <option value="8">CDATA</option>
452
  </select>
453
  <i class="dashicons dashicons-editor-expand expandType"></i>
55
  <option value="4">htmlentities</option>
56
  <option value="5">Integer</option>
57
  <option value="6">Price</option>
58
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
59
  <option value="8">CDATA</option>
60
  </select>
61
  <i class="dashicons dashicons-editor-expand expandType"></i>
104
  <option value="4">htmlentities</option>
105
  <option value="5">Integer</option>
106
  <option value="6">Price</option>
107
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
108
  <option value="8">CDATA</option>
109
  </select>
110
  <i class="dashicons dashicons-editor-expand expandType"></i>
153
  <option value="4">htmlentities</option>
154
  <option value="5">Integer</option>
155
  <option value="6">Price</option>
156
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
157
  <option value="8">CDATA</option>
158
  </select>
159
  <i class="dashicons dashicons-editor-expand expandType"></i>
202
  <option value="4">htmlentities</option>
203
  <option value="5">Integer</option>
204
  <option value="6">Price</option>
205
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
206
  <option value="8">CDATA</option>
207
  </select>
208
  <i class="dashicons dashicons-editor-expand expandType"></i>
251
  <option value="4">htmlentities</option>
252
  <option value="5">Integer</option>
253
  <option value="6">Price</option>
254
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
255
  <option value="8">CDATA</option>
256
  </select>
257
  <i class="dashicons dashicons-editor-expand expandType"></i>
300
  <option value="4">htmlentities</option>
301
  <option value="5">Integer</option>
302
  <option value="6">Price</option>
303
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
304
  <option value="8">CDATA</option>
305
  </select>
306
  <i class="dashicons dashicons-editor-expand expandType"></i>
349
  <option value="4">htmlentities</option>
350
  <option value="5">Integer</option>
351
  <option value="6">Price</option>
352
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
353
  <option value="8">CDATA</option>
354
  </select>
355
  <i class="dashicons dashicons-editor-expand expandType"></i>
398
  <option value="4">htmlentities</option>
399
  <option value="5">Integer</option>
400
  <option value="6">Price</option>
401
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
402
  <option value="8">CDATA</option>
403
  </select>
404
  <i class="dashicons dashicons-editor-expand expandType"></i>
447
  <option value="4">htmlentities</option>
448
  <option value="5">Integer</option>
449
  <option value="6">Price</option>
450
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
451
  <option value="8">CDATA</option>
452
  </select>
453
  <i class="dashicons dashicons-editor-expand expandType"></i>
admin/partials/bing/add-feed.php CHANGED
@@ -55,7 +55,7 @@
55
  <option value="4">htmlentities</option>
56
  <option value="5">Integer</option>
57
  <option value="6">Price</option>
58
- <option value="7">Remove Space</option>
59
  <option value="8">CDATA</option>
60
  </select>
61
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -104,7 +104,7 @@
104
  <option value="4">htmlentities</option>
105
  <option value="5">Integer</option>
106
  <option value="6">Price</option>
107
- <option value="7">Remove Space</option>
108
  <option value="8">CDATA</option>
109
  </select>
110
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -153,7 +153,7 @@
153
  <option value="4">htmlentities</option>
154
  <option value="5">Integer</option>
155
  <option value="6">Price</option>
156
- <option value="7">Remove Space</option>
157
  <option value="8">CDATA</option>
158
  </select>
159
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -202,7 +202,7 @@
202
  <option value="4">htmlentities</option>
203
  <option value="5">Integer</option>
204
  <option value="6">Price</option>
205
- <option value="7">Remove Space</option>
206
  <option value="8">CDATA</option>
207
  </select>
208
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -251,7 +251,7 @@
251
  <option value="4">htmlentities</option>
252
  <option value="5">Integer</option>
253
  <option value="6">Price</option>
254
- <option value="7">Remove Space</option>
255
  <option value="8">CDATA</option>
256
  </select>
257
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -300,7 +300,7 @@
300
  <option value="4">htmlentities</option>
301
  <option value="5">Integer</option>
302
  <option value="6">Price</option>
303
- <option value="7">Remove Space</option>
304
  <option value="8">CDATA</option>
305
  </select>
306
  <i class="dashicons dashicons-editor-expand expandType"></i>
55
  <option value="4">htmlentities</option>
56
  <option value="5">Integer</option>
57
  <option value="6">Price</option>
58
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
59
  <option value="8">CDATA</option>
60
  </select>
61
  <i class="dashicons dashicons-editor-expand expandType"></i>
104
  <option value="4">htmlentities</option>
105
  <option value="5">Integer</option>
106
  <option value="6">Price</option>
107
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
108
  <option value="8">CDATA</option>
109
  </select>
110
  <i class="dashicons dashicons-editor-expand expandType"></i>
153
  <option value="4">htmlentities</option>
154
  <option value="5">Integer</option>
155
  <option value="6">Price</option>
156
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
157
  <option value="8">CDATA</option>
158
  </select>
159
  <i class="dashicons dashicons-editor-expand expandType"></i>
202
  <option value="4">htmlentities</option>
203
  <option value="5">Integer</option>
204
  <option value="6">Price</option>
205
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
206
  <option value="8">CDATA</option>
207
  </select>
208
  <i class="dashicons dashicons-editor-expand expandType"></i>
251
  <option value="4">htmlentities</option>
252
  <option value="5">Integer</option>
253
  <option value="6">Price</option>
254
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
255
  <option value="8">CDATA</option>
256
  </select>
257
  <i class="dashicons dashicons-editor-expand expandType"></i>
300
  <option value="4">htmlentities</option>
301
  <option value="5">Integer</option>
302
  <option value="6">Price</option>
303
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
304
  <option value="8">CDATA</option>
305
  </select>
306
  <i class="dashicons dashicons-editor-expand expandType"></i>
admin/partials/connexity/add-feed.php CHANGED
@@ -54,7 +54,7 @@
54
  <option value="4">htmlentities</option>
55
  <option value="5">Integer</option>
56
  <option value="6">Price</option>
57
- <option value="7">Remove Space</option>
58
  <option value="8">CDATA</option>
59
  </select>
60
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -103,7 +103,7 @@
103
  <option value="4">htmlentities</option>
104
  <option value="5">Integer</option>
105
  <option value="6">Price</option>
106
- <option value="7">Remove Space</option>
107
  <option value="8">CDATA</option>
108
  </select>
109
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -152,7 +152,7 @@
152
  <option value="4">htmlentities</option>
153
  <option value="5">Integer</option>
154
  <option value="6">Price</option>
155
- <option value="7">Remove Space</option>
156
  <option value="8">CDATA</option>
157
  </select>
158
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -201,7 +201,7 @@
201
  <option value="4">htmlentities</option>
202
  <option value="5">Integer</option>
203
  <option value="6">Price</option>
204
- <option value="7">Remove Space</option>
205
  <option value="8">CDATA</option>
206
  </select>
207
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -250,7 +250,7 @@
250
  <option value="4">htmlentities</option>
251
  <option value="5">Integer</option>
252
  <option value="6">Price</option>
253
- <option value="7">Remove Space</option>
254
  <option value="8">CDATA</option>
255
  </select>
256
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -299,7 +299,7 @@
299
  <option value="4">htmlentities</option>
300
  <option value="5">Integer</option>
301
  <option value="6">Price</option>
302
- <option value="7">Remove Space</option>
303
  <option value="8">CDATA</option>
304
  </select>
305
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -348,7 +348,7 @@
348
  <option value="4">htmlentities</option>
349
  <option value="5">Integer</option>
350
  <option value="6">Price</option>
351
- <option value="7">Remove Space</option>
352
  <option value="8">CDATA</option>
353
  </select>
354
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -397,7 +397,7 @@
397
  <option value="4">htmlentities</option>
398
  <option value="5">Integer</option>
399
  <option value="6">Price</option>
400
- <option value="7">Remove Space</option>
401
  <option value="8">CDATA</option>
402
  </select>
403
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -446,7 +446,7 @@
446
  <option value="4">htmlentities</option>
447
  <option value="5">Integer</option>
448
  <option value="6">Price</option>
449
- <option value="7">Remove Space</option>
450
  <option value="8">CDATA</option>
451
  </select>
452
  <i class="dashicons dashicons-editor-expand expandType"></i>
54
  <option value="4">htmlentities</option>
55
  <option value="5">Integer</option>
56
  <option value="6">Price</option>
57
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
58
  <option value="8">CDATA</option>
59
  </select>
60
  <i class="dashicons dashicons-editor-expand expandType"></i>
103
  <option value="4">htmlentities</option>
104
  <option value="5">Integer</option>
105
  <option value="6">Price</option>
106
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
107
  <option value="8">CDATA</option>
108
  </select>
109
  <i class="dashicons dashicons-editor-expand expandType"></i>
152
  <option value="4">htmlentities</option>
153
  <option value="5">Integer</option>
154
  <option value="6">Price</option>
155
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
156
  <option value="8">CDATA</option>
157
  </select>
158
  <i class="dashicons dashicons-editor-expand expandType"></i>
201
  <option value="4">htmlentities</option>
202
  <option value="5">Integer</option>
203
  <option value="6">Price</option>
204
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
205
  <option value="8">CDATA</option>
206
  </select>
207
  <i class="dashicons dashicons-editor-expand expandType"></i>
250
  <option value="4">htmlentities</option>
251
  <option value="5">Integer</option>
252
  <option value="6">Price</option>
253
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
254
  <option value="8">CDATA</option>
255
  </select>
256
  <i class="dashicons dashicons-editor-expand expandType"></i>
299
  <option value="4">htmlentities</option>
300
  <option value="5">Integer</option>
301
  <option value="6">Price</option>
302
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
303
  <option value="8">CDATA</option>
304
  </select>
305
  <i class="dashicons dashicons-editor-expand expandType"></i>
348
  <option value="4">htmlentities</option>
349
  <option value="5">Integer</option>
350
  <option value="6">Price</option>
351
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
352
  <option value="8">CDATA</option>
353
  </select>
354
  <i class="dashicons dashicons-editor-expand expandType"></i>
397
  <option value="4">htmlentities</option>
398
  <option value="5">Integer</option>
399
  <option value="6">Price</option>
400
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
401
  <option value="8">CDATA</option>
402
  </select>
403
  <i class="dashicons dashicons-editor-expand expandType"></i>
446
  <option value="4">htmlentities</option>
447
  <option value="5">Integer</option>
448
  <option value="6">Price</option>
449
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
450
  <option value="8">CDATA</option>
451
  </select>
452
  <i class="dashicons dashicons-editor-expand expandType"></i>
admin/partials/custom/add-feed.php CHANGED
@@ -55,7 +55,7 @@
55
  <option value="4">htmlentities</option>
56
  <option value="5">Integer</option>
57
  <option value="6">Price</option>
58
- <option value="7">Remove Space</option>
59
  <option value="8">CDATA</option>
60
  </select>
61
  <i class="dashicons dashicons-editor-expand expandType"></i>
55
  <option value="4">htmlentities</option>
56
  <option value="5">Integer</option>
57
  <option value="6">Price</option>
58
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
59
  <option value="8">CDATA</option>
60
  </select>
61
  <i class="dashicons dashicons-editor-expand expandType"></i>
admin/partials/custom/edit-feed.php CHANGED
@@ -1,6 +1,7 @@
1
  <?php
2
  $dropDown = new Woo_Feed_Dropdown();
3
  $product = new Woo_Feed_Products();
 
4
  ?>
5
  <div class="wrap" id="Feed">
6
  <h2><?php echo _e('WooCommerce Product Feed', 'woo-feed'); ?></h2>
@@ -74,11 +75,11 @@ $product = new Woo_Feed_Products();
74
  class="generalInput" required="required"/>
75
  </td>
76
  </tr>
77
- <tr class="itemWrapper" <?php echo ($feedRules['feedType'] != "xml") ? 'style="display: none;"' : ''; ?>>
78
  <td><b><?php echo _e('Extra Header', 'woo-feed'); ?> </b></td>
79
  <td>
80
- <textarea name="extraHeader" id="" cols="30"
81
- rows="3"><?php echo ($feedRules['feedType'] == "xml") && isset($feedRules['extraHeader']) ? sanitize_text_field($feedRules['extraHeader']) : ''; ?></textarea>
82
  </td>
83
  </tr>
84
  <tr class="wf_csvtxt" <?php echo ($feedRules['feedType'] == "xml") ? 'style="display: none;"' : ''; ?>>
@@ -229,6 +230,12 @@ $product = new Woo_Feed_Products();
229
  <option <?php echo (in_array('7', $outputType[$counter])) ? 'selected="selected"' : ''; ?>
230
  value="7">Remove Space
231
  </option>
 
 
 
 
 
 
232
  <option <?php echo (in_array('8', $outputType[$counter])) ? 'selected="selected"' : ''; ?>
233
  value="8">CDATA
234
  </option>
1
  <?php
2
  $dropDown = new Woo_Feed_Dropdown();
3
  $product = new Woo_Feed_Products();
4
+ $product->load_attributes();
5
  ?>
6
  <div class="wrap" id="Feed">
7
  <h2><?php echo _e('WooCommerce Product Feed', 'woo-feed'); ?></h2>
75
  class="generalInput" required="required"/>
76
  </td>
77
  </tr>
78
+ <tr class="itemWrapper" >
79
  <td><b><?php echo _e('Extra Header', 'woo-feed'); ?> </b></td>
80
  <td>
81
+ <textarea name="extraHeader" id="" style="width: 100%" placeholder="Insert Extra Header value. Press enter at the end of each line."
82
+ rows="3"><?php echo isset($feedRules['extraHeader']) ? $feedRules['extraHeader'] : ''; ?></textarea>
83
  </td>
84
  </tr>
85
  <tr class="wf_csvtxt" <?php echo ($feedRules['feedType'] == "xml") ? 'style="display: none;"' : ''; ?>>
230
  <option <?php echo (in_array('7', $outputType[$counter])) ? 'selected="selected"' : ''; ?>
231
  value="7">Remove Space
232
  </option>
233
+ <option <?php echo (in_array('10', $outputType[$counter])) ? 'selected="selected"' : ''; ?>
234
+ value="10">Remove ShortCodes
235
+ </option>
236
+ <option <?php echo (in_array('9', $outputType[$counter])) ? 'selected="selected"' : ''; ?>
237
+ value="9">Remove Special Character
238
+ </option>
239
  <option <?php echo (in_array('8', $outputType[$counter])) ? 'selected="selected"' : ''; ?>
240
  value="8">CDATA
241
  </option>
admin/partials/facebook/add-feed.php CHANGED
@@ -55,7 +55,7 @@
55
  <option value="4">htmlentities</option>
56
  <option value="5">Integer</option>
57
  <option value="6">Price</option>
58
- <option value="7">Remove Space</option>
59
  <option value="8">CDATA</option>
60
  </select>
61
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -104,7 +104,7 @@
104
  <option value="4">htmlentities</option>
105
  <option value="5">Integer</option>
106
  <option value="6">Price</option>
107
- <option value="7">Remove Space</option>
108
  <option value="8">CDATA</option>
109
  </select>
110
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -153,7 +153,7 @@
153
  <option value="4">htmlentities</option>
154
  <option value="5">Integer</option>
155
  <option value="6">Price</option>
156
- <option value="7">Remove Space</option>
157
  <option value="8">CDATA</option>
158
  </select>
159
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -202,7 +202,7 @@
202
  <option value="4">htmlentities</option>
203
  <option value="5">Integer</option>
204
  <option value="6">Price</option>
205
- <option value="7">Remove Space</option>
206
  <option value="8">CDATA</option>
207
  </select>
208
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -251,7 +251,7 @@
251
  <option value="4">htmlentities</option>
252
  <option value="5">Integer</option>
253
  <option value="6">Price</option>
254
- <option value="7">Remove Space</option>
255
  <option value="8">CDATA</option>
256
  </select>
257
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -300,7 +300,7 @@
300
  <option value="4">htmlentities</option>
301
  <option value="5">Integer</option>
302
  <option value="6">Price</option>
303
- <option value="7">Remove Space</option>
304
  <option value="8">CDATA</option>
305
  </select>
306
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -349,7 +349,7 @@
349
  <option value="4">htmlentities</option>
350
  <option value="5">Integer</option>
351
  <option value="6">Price</option>
352
- <option value="7">Remove Space</option>
353
  <option value="8">CDATA</option>
354
  </select>
355
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -398,7 +398,7 @@
398
  <option value="4">htmlentities</option>
399
  <option value="5">Integer</option>
400
  <option value="6">Price</option>
401
- <option value="7">Remove Space</option>
402
  <option value="8">CDATA</option>
403
  </select>
404
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -447,7 +447,7 @@
447
  <option value="4">htmlentities</option>
448
  <option value="5">Integer</option>
449
  <option value="6">Price</option>
450
- <option value="7">Remove Space</option>
451
  <option value="8">CDATA</option>
452
  </select>
453
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -496,7 +496,7 @@
496
  <option value="4">htmlentities</option>
497
  <option value="5">Integer</option>
498
  <option value="6">Price</option>
499
- <option value="7">Remove Space</option>
500
  <option value="8">CDATA</option>
501
  </select>
502
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -545,7 +545,7 @@
545
  <option value="4">htmlentities</option>
546
  <option value="5">Integer</option>
547
  <option selected value="6">Price</option>
548
- <option value="7">Remove Space</option>
549
  <option value="8">CDATA</option>
550
  </select>
551
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -594,7 +594,7 @@
594
  <option value="4">htmlentities</option>
595
  <option value="5">Integer</option>
596
  <option value="6">Price</option>
597
- <option value="7">Remove Space</option>
598
  <option value="8">CDATA</option>
599
  </select>
600
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -643,7 +643,7 @@
643
  <option value="4">htmlentities</option>
644
  <option value="5">Integer</option>
645
  <option value="6">Price</option>
646
- <option value="7">Remove Space</option>
647
  <option value="8">CDATA</option>
648
  </select>
649
  <i class="dashicons dashicons-editor-expand expandType"></i>
55
  <option value="4">htmlentities</option>
56
  <option value="5">Integer</option>
57
  <option value="6">Price</option>
58
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
59
  <option value="8">CDATA</option>
60
  </select>
61
  <i class="dashicons dashicons-editor-expand expandType"></i>
104
  <option value="4">htmlentities</option>
105
  <option value="5">Integer</option>
106
  <option value="6">Price</option>
107
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
108
  <option value="8">CDATA</option>
109
  </select>
110
  <i class="dashicons dashicons-editor-expand expandType"></i>
153
  <option value="4">htmlentities</option>
154
  <option value="5">Integer</option>
155
  <option value="6">Price</option>
156
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
157
  <option value="8">CDATA</option>
158
  </select>
159
  <i class="dashicons dashicons-editor-expand expandType"></i>
202
  <option value="4">htmlentities</option>
203
  <option value="5">Integer</option>
204
  <option value="6">Price</option>
205
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
206
  <option value="8">CDATA</option>
207
  </select>
208
  <i class="dashicons dashicons-editor-expand expandType"></i>
251
  <option value="4">htmlentities</option>
252
  <option value="5">Integer</option>
253
  <option value="6">Price</option>
254
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
255
  <option value="8">CDATA</option>
256
  </select>
257
  <i class="dashicons dashicons-editor-expand expandType"></i>
300
  <option value="4">htmlentities</option>
301
  <option value="5">Integer</option>
302
  <option value="6">Price</option>
303
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
304
  <option value="8">CDATA</option>
305
  </select>
306
  <i class="dashicons dashicons-editor-expand expandType"></i>
349
  <option value="4">htmlentities</option>
350
  <option value="5">Integer</option>
351
  <option value="6">Price</option>
352
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
353
  <option value="8">CDATA</option>
354
  </select>
355
  <i class="dashicons dashicons-editor-expand expandType"></i>
398
  <option value="4">htmlentities</option>
399
  <option value="5">Integer</option>
400
  <option value="6">Price</option>
401
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
402
  <option value="8">CDATA</option>
403
  </select>
404
  <i class="dashicons dashicons-editor-expand expandType"></i>
447
  <option value="4">htmlentities</option>
448
  <option value="5">Integer</option>
449
  <option value="6">Price</option>
450
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
451
  <option value="8">CDATA</option>
452
  </select>
453
  <i class="dashicons dashicons-editor-expand expandType"></i>
496
  <option value="4">htmlentities</option>
497
  <option value="5">Integer</option>
498
  <option value="6">Price</option>
499
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
500
  <option value="8">CDATA</option>
501
  </select>
502
  <i class="dashicons dashicons-editor-expand expandType"></i>
545
  <option value="4">htmlentities</option>
546
  <option value="5">Integer</option>
547
  <option selected value="6">Price</option>
548
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
549
  <option value="8">CDATA</option>
550
  </select>
551
  <i class="dashicons dashicons-editor-expand expandType"></i>
594
  <option value="4">htmlentities</option>
595
  <option value="5">Integer</option>
596
  <option value="6">Price</option>
597
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
598
  <option value="8">CDATA</option>
599
  </select>
600
  <i class="dashicons dashicons-editor-expand expandType"></i>
643
  <option value="4">htmlentities</option>
644
  <option value="5">Integer</option>
645
  <option value="6">Price</option>
646
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
647
  <option value="8">CDATA</option>
648
  </select>
649
  <i class="dashicons dashicons-editor-expand expandType"></i>
admin/partials/google/add-feed.php CHANGED
@@ -55,7 +55,7 @@
55
  <option value="4">htmlentities</option>
56
  <option value="5">Integer</option>
57
  <option value="6">Price</option>
58
- <option value="7">Remove Space</option>
59
  <option value="8">CDATA</option>
60
  </select>
61
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -104,7 +104,7 @@
104
  <option value="4">htmlentities</option>
105
  <option value="5">Integer</option>
106
  <option value="6">Price</option>
107
- <option value="7">Remove Space</option>
108
  <option value="8">CDATA</option>
109
  </select>
110
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -153,7 +153,7 @@
153
  <option value="4">htmlentities</option>
154
  <option value="5">Integer</option>
155
  <option value="6">Price</option>
156
- <option value="7">Remove Space</option>
157
  <option value="8">CDATA</option>
158
  </select>
159
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -202,7 +202,7 @@
202
  <option value="4">htmlentities</option>
203
  <option value="5">Integer</option>
204
  <option value="6">Price</option>
205
- <option value="7">Remove Space</option>
206
  <option value="8">CDATA</option>
207
  </select>
208
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -251,7 +251,7 @@
251
  <option value="4">htmlentities</option>
252
  <option value="5">Integer</option>
253
  <option value="6">Price</option>
254
- <option value="7">Remove Space</option>
255
  <option value="8">CDATA</option>
256
  </select>
257
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -300,7 +300,7 @@
300
  <option value="4">htmlentities</option>
301
  <option value="5">Integer</option>
302
  <option value="6">Price</option>
303
- <option value="7">Remove Space</option>
304
  <option value="8">CDATA</option>
305
  </select>
306
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -349,7 +349,7 @@
349
  <option value="4">htmlentities</option>
350
  <option value="5">Integer</option>
351
  <option value="6">Price</option>
352
- <option value="7">Remove Space</option>
353
  <option value="8">CDATA</option>
354
  </select>
355
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -398,7 +398,7 @@
398
  <option value="4">htmlentities</option>
399
  <option value="5">Integer</option>
400
  <option value="6">Price</option>
401
- <option value="7">Remove Space</option>
402
  <option value="8">CDATA</option>
403
  </select>
404
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -447,7 +447,7 @@
447
  <option value="4">htmlentities</option>
448
  <option value="5">Integer</option>
449
  <option value="6">Price</option>
450
- <option value="7">Remove Space</option>
451
  <option value="8">CDATA</option>
452
  </select>
453
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -496,7 +496,7 @@
496
  <option value="4">htmlentities</option>
497
  <option value="5">Integer</option>
498
  <option value="6">Price</option>
499
- <option value="7">Remove Space</option>
500
  <option value="8">CDATA</option>
501
  </select>
502
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -545,7 +545,7 @@
545
  <option value="4">htmlentities</option>
546
  <option value="5">Integer</option>
547
  <option selected value="6">Price</option>
548
- <option value="7">Remove Space</option>
549
  <option value="8">CDATA</option>
550
  </select>
551
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -595,7 +595,7 @@
595
  <option value="4">htmlentities</option>
596
  <option value="5">Integer</option>
597
  <option value="6">Price</option>
598
- <option value="7">Remove Space</option>
599
  <option value="8">CDATA</option>
600
  </select>
601
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -645,6 +645,8 @@
645
  <option value="5">Integer</option>
646
  <option value="6">Price</option>
647
  <option value="7">Remove Space</option>
 
 
648
  <option value="8">CDATA</option>
649
  </select>
650
  <i class="dashicons dashicons-editor-expand expandType"></i>
55
  <option value="4">htmlentities</option>
56
  <option value="5">Integer</option>
57
  <option value="6">Price</option>
58
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
59
  <option value="8">CDATA</option>
60
  </select>
61
  <i class="dashicons dashicons-editor-expand expandType"></i>
104
  <option value="4">htmlentities</option>
105
  <option value="5">Integer</option>
106
  <option value="6">Price</option>
107
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
108
  <option value="8">CDATA</option>
109
  </select>
110
  <i class="dashicons dashicons-editor-expand expandType"></i>
153
  <option value="4">htmlentities</option>
154
  <option value="5">Integer</option>
155
  <option value="6">Price</option>
156
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
157
  <option value="8">CDATA</option>
158
  </select>
159
  <i class="dashicons dashicons-editor-expand expandType"></i>
202
  <option value="4">htmlentities</option>
203
  <option value="5">Integer</option>
204
  <option value="6">Price</option>
205
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
206
  <option value="8">CDATA</option>
207
  </select>
208
  <i class="dashicons dashicons-editor-expand expandType"></i>
251
  <option value="4">htmlentities</option>
252
  <option value="5">Integer</option>
253
  <option value="6">Price</option>
254
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
255
  <option value="8">CDATA</option>
256
  </select>
257
  <i class="dashicons dashicons-editor-expand expandType"></i>
300
  <option value="4">htmlentities</option>
301
  <option value="5">Integer</option>
302
  <option value="6">Price</option>
303
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
304
  <option value="8">CDATA</option>
305
  </select>
306
  <i class="dashicons dashicons-editor-expand expandType"></i>
349
  <option value="4">htmlentities</option>
350
  <option value="5">Integer</option>
351
  <option value="6">Price</option>
352
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
353
  <option value="8">CDATA</option>
354
  </select>
355
  <i class="dashicons dashicons-editor-expand expandType"></i>
398
  <option value="4">htmlentities</option>
399
  <option value="5">Integer</option>
400
  <option value="6">Price</option>
401
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
402
  <option value="8">CDATA</option>
403
  </select>
404
  <i class="dashicons dashicons-editor-expand expandType"></i>
447
  <option value="4">htmlentities</option>
448
  <option value="5">Integer</option>
449
  <option value="6">Price</option>
450
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
451
  <option value="8">CDATA</option>
452
  </select>
453
  <i class="dashicons dashicons-editor-expand expandType"></i>
496
  <option value="4">htmlentities</option>
497
  <option value="5">Integer</option>
498
  <option value="6">Price</option>
499
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
500
  <option value="8">CDATA</option>
501
  </select>
502
  <i class="dashicons dashicons-editor-expand expandType"></i>
545
  <option value="4">htmlentities</option>
546
  <option value="5">Integer</option>
547
  <option selected value="6">Price</option>
548
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
549
  <option value="8">CDATA</option>
550
  </select>
551
  <i class="dashicons dashicons-editor-expand expandType"></i>
595
  <option value="4">htmlentities</option>
596
  <option value="5">Integer</option>
597
  <option value="6">Price</option>
598
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
599
  <option value="8">CDATA</option>
600
  </select>
601
  <i class="dashicons dashicons-editor-expand expandType"></i>
645
  <option value="5">Integer</option>
646
  <option value="6">Price</option>
647
  <option value="7">Remove Space</option>
648
+ <option value="10">Remove ShortCodes</option>
649
+ <option value="9">Remove Special Character</option>
650
  <option value="8">CDATA</option>
651
  </select>
652
  <i class="dashicons dashicons-editor-expand expandType"></i>
admin/partials/kelkoo/add-feed.php CHANGED
@@ -54,7 +54,7 @@
54
  <option value="4">htmlentities</option>
55
  <option value="5">Integer</option>
56
  <option value="6">Price</option>
57
- <option value="7">Remove Space</option>
58
  <option value="8">CDATA</option>
59
  </select>
60
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -103,7 +103,7 @@
103
  <option value="4">htmlentities</option>
104
  <option value="5">Integer</option>
105
  <option value="6">Price</option>
106
- <option value="7">Remove Space</option>
107
  <option value="8">CDATA</option>
108
  </select>
109
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -152,7 +152,7 @@
152
  <option value="4">htmlentities</option>
153
  <option value="5">Integer</option>
154
  <option value="6">Price</option>
155
- <option value="7">Remove Space</option>
156
  <option value="8">CDATA</option>
157
  </select>
158
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -201,7 +201,7 @@
201
  <option value="4">htmlentities</option>
202
  <option value="5">Integer</option>
203
  <option value="6">Price</option>
204
- <option value="7">Remove Space</option>
205
  <option value="8">CDATA</option>
206
  </select>
207
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -250,7 +250,7 @@
250
  <option value="4">htmlentities</option>
251
  <option value="5">Integer</option>
252
  <option value="6">Price</option>
253
- <option value="7">Remove Space</option>
254
  <option value="8">CDATA</option>
255
  </select>
256
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -299,7 +299,7 @@
299
  <option value="4">htmlentities</option>
300
  <option value="5">Integer</option>
301
  <option value="6">Price</option>
302
- <option value="7">Remove Space</option>
303
  <option value="8">CDATA</option>
304
  </select>
305
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -348,7 +348,7 @@
348
  <option value="4">htmlentities</option>
349
  <option value="5">Integer</option>
350
  <option value="6">Price</option>
351
- <option value="7">Remove Space</option>
352
  <option value="8">CDATA</option>
353
  </select>
354
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -397,7 +397,7 @@
397
  <option value="4">htmlentities</option>
398
  <option value="5">Integer</option>
399
  <option value="6">Price</option>
400
- <option value="7">Remove Space</option>
401
  <option value="8">CDATA</option>
402
  </select>
403
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -446,7 +446,7 @@
446
  <option value="4">htmlentities</option>
447
  <option value="5">Integer</option>
448
  <option value="6">Price</option>
449
- <option value="7">Remove Space</option>
450
  <option value="8">CDATA</option>
451
  </select>
452
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -495,7 +495,7 @@
495
  <option value="4">htmlentities</option>
496
  <option value="5">Integer</option>
497
  <option value="6">Price</option>
498
- <option value="7">Remove Space</option>
499
  <option value="8">CDATA</option>
500
  </select>
501
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -544,7 +544,7 @@
544
  <option value="4">htmlentities</option>
545
  <option value="5">Integer</option>
546
  <option value="6">Price</option>
547
- <option value="7">Remove Space</option>
548
  <option value="8">CDATA</option>
549
  </select>
550
  <i class="dashicons dashicons-editor-expand expandType"></i>
54
  <option value="4">htmlentities</option>
55
  <option value="5">Integer</option>
56
  <option value="6">Price</option>
57
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
58
  <option value="8">CDATA</option>
59
  </select>
60
  <i class="dashicons dashicons-editor-expand expandType"></i>
103
  <option value="4">htmlentities</option>
104
  <option value="5">Integer</option>
105
  <option value="6">Price</option>
106
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
107
  <option value="8">CDATA</option>
108
  </select>
109
  <i class="dashicons dashicons-editor-expand expandType"></i>
152
  <option value="4">htmlentities</option>
153
  <option value="5">Integer</option>
154
  <option value="6">Price</option>
155
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
156
  <option value="8">CDATA</option>
157
  </select>
158
  <i class="dashicons dashicons-editor-expand expandType"></i>
201
  <option value="4">htmlentities</option>
202
  <option value="5">Integer</option>
203
  <option value="6">Price</option>
204
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
205
  <option value="8">CDATA</option>
206
  </select>
207
  <i class="dashicons dashicons-editor-expand expandType"></i>
250
  <option value="4">htmlentities</option>
251
  <option value="5">Integer</option>
252
  <option value="6">Price</option>
253
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
254
  <option value="8">CDATA</option>
255
  </select>
256
  <i class="dashicons dashicons-editor-expand expandType"></i>
299
  <option value="4">htmlentities</option>
300
  <option value="5">Integer</option>
301
  <option value="6">Price</option>
302
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
303
  <option value="8">CDATA</option>
304
  </select>
305
  <i class="dashicons dashicons-editor-expand expandType"></i>
348
  <option value="4">htmlentities</option>
349
  <option value="5">Integer</option>
350
  <option value="6">Price</option>
351
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
352
  <option value="8">CDATA</option>
353
  </select>
354
  <i class="dashicons dashicons-editor-expand expandType"></i>
397
  <option value="4">htmlentities</option>
398
  <option value="5">Integer</option>
399
  <option value="6">Price</option>
400
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
401
  <option value="8">CDATA</option>
402
  </select>
403
  <i class="dashicons dashicons-editor-expand expandType"></i>
446
  <option value="4">htmlentities</option>
447
  <option value="5">Integer</option>
448
  <option value="6">Price</option>
449
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
450
  <option value="8">CDATA</option>
451
  </select>
452
  <i class="dashicons dashicons-editor-expand expandType"></i>
495
  <option value="4">htmlentities</option>
496
  <option value="5">Integer</option>
497
  <option value="6">Price</option>
498
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
499
  <option value="8">CDATA</option>
500
  </select>
501
  <i class="dashicons dashicons-editor-expand expandType"></i>
544
  <option value="4">htmlentities</option>
545
  <option value="5">Integer</option>
546
  <option value="6">Price</option>
547
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
548
  <option value="8">CDATA</option>
549
  </select>
550
  <i class="dashicons dashicons-editor-expand expandType"></i>
admin/partials/nextag/add-feed.php CHANGED
@@ -54,7 +54,7 @@
54
  <option value="4">htmlentities</option>
55
  <option value="5">Integer</option>
56
  <option value="6">Price</option>
57
- <option value="7">Remove Space</option>
58
  <option value="8">CDATA</option>
59
  </select>
60
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -103,7 +103,7 @@
103
  <option value="4">htmlentities</option>
104
  <option value="5">Integer</option>
105
  <option value="6">Price</option>
106
- <option value="7">Remove Space</option>
107
  <option value="8">CDATA</option>
108
  </select>
109
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -152,7 +152,7 @@
152
  <option value="4">htmlentities</option>
153
  <option value="5">Integer</option>
154
  <option value="6">Price</option>
155
- <option value="7">Remove Space</option>
156
  <option value="8">CDATA</option>
157
  </select>
158
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -201,7 +201,7 @@
201
  <option value="4">htmlentities</option>
202
  <option value="5">Integer</option>
203
  <option value="6">Price</option>
204
- <option value="7">Remove Space</option>
205
  <option value="8">CDATA</option>
206
  </select>
207
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -250,7 +250,7 @@
250
  <option value="4">htmlentities</option>
251
  <option value="5">Integer</option>
252
  <option value="6">Price</option>
253
- <option value="7">Remove Space</option>
254
  <option value="8">CDATA</option>
255
  </select>
256
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -299,7 +299,7 @@
299
  <option value="4">htmlentities</option>
300
  <option value="5">Integer</option>
301
  <option value="6">Price</option>
302
- <option value="7">Remove Space</option>
303
  <option value="8">CDATA</option>
304
  </select>
305
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -348,7 +348,7 @@
348
  <option value="4">htmlentities</option>
349
  <option value="5">Integer</option>
350
  <option value="6">Price</option>
351
- <option value="7">Remove Space</option>
352
  <option value="8">CDATA</option>
353
  </select>
354
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -397,7 +397,7 @@
397
  <option value="4">htmlentities</option>
398
  <option value="5">Integer</option>
399
  <option value="6">Price</option>
400
- <option value="7">Remove Space</option>
401
  <option value="8">CDATA</option>
402
  </select>
403
  <i class="dashicons dashicons-editor-expand expandType"></i>
54
  <option value="4">htmlentities</option>
55
  <option value="5">Integer</option>
56
  <option value="6">Price</option>
57
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
58
  <option value="8">CDATA</option>
59
  </select>
60
  <i class="dashicons dashicons-editor-expand expandType"></i>
103
  <option value="4">htmlentities</option>
104
  <option value="5">Integer</option>
105
  <option value="6">Price</option>
106
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
107
  <option value="8">CDATA</option>
108
  </select>
109
  <i class="dashicons dashicons-editor-expand expandType"></i>
152
  <option value="4">htmlentities</option>
153
  <option value="5">Integer</option>
154
  <option value="6">Price</option>
155
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
156
  <option value="8">CDATA</option>
157
  </select>
158
  <i class="dashicons dashicons-editor-expand expandType"></i>
201
  <option value="4">htmlentities</option>
202
  <option value="5">Integer</option>
203
  <option value="6">Price</option>
204
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
205
  <option value="8">CDATA</option>
206
  </select>
207
  <i class="dashicons dashicons-editor-expand expandType"></i>
250
  <option value="4">htmlentities</option>
251
  <option value="5">Integer</option>
252
  <option value="6">Price</option>
253
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
254
  <option value="8">CDATA</option>
255
  </select>
256
  <i class="dashicons dashicons-editor-expand expandType"></i>
299
  <option value="4">htmlentities</option>
300
  <option value="5">Integer</option>
301
  <option value="6">Price</option>
302
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
303
  <option value="8">CDATA</option>
304
  </select>
305
  <i class="dashicons dashicons-editor-expand expandType"></i>
348
  <option value="4">htmlentities</option>
349
  <option value="5">Integer</option>
350
  <option value="6">Price</option>
351
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
352
  <option value="8">CDATA</option>
353
  </select>
354
  <i class="dashicons dashicons-editor-expand expandType"></i>
397
  <option value="4">htmlentities</option>
398
  <option value="5">Integer</option>
399
  <option value="6">Price</option>
400
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
401
  <option value="8">CDATA</option>
402
  </select>
403
  <i class="dashicons dashicons-editor-expand expandType"></i>
admin/partials/pricegrabber/add-feed.php CHANGED
@@ -54,7 +54,7 @@
54
  <option value="4">htmlentities</option>
55
  <option value="5">Integer</option>
56
  <option value="6">Price</option>
57
- <option value="7">Remove Space</option>
58
  <option value="8">CDATA</option>
59
  </select>
60
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -103,7 +103,7 @@
103
  <option value="4">htmlentities</option>
104
  <option value="5">Integer</option>
105
  <option value="6">Price</option>
106
- <option value="7">Remove Space</option>
107
  <option value="8">CDATA</option>
108
  </select>
109
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -152,7 +152,7 @@
152
  <option value="4">htmlentities</option>
153
  <option value="5">Integer</option>
154
  <option value="6">Price</option>
155
- <option value="7">Remove Space</option>
156
  <option value="8">CDATA</option>
157
  </select>
158
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -201,7 +201,7 @@
201
  <option value="4">htmlentities</option>
202
  <option value="5">Integer</option>
203
  <option value="6">Price</option>
204
- <option value="7">Remove Space</option>
205
  <option value="8">CDATA</option>
206
  </select>
207
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -250,7 +250,7 @@
250
  <option value="4">htmlentities</option>
251
  <option value="5">Integer</option>
252
  <option value="6">Price</option>
253
- <option value="7">Remove Space</option>
254
  <option value="8">CDATA</option>
255
  </select>
256
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -299,7 +299,7 @@
299
  <option value="4">htmlentities</option>
300
  <option value="5">Integer</option>
301
  <option value="6">Price</option>
302
- <option value="7">Remove Space</option>
303
  <option value="8">CDATA</option>
304
  </select>
305
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -348,7 +348,7 @@
348
  <option value="4">htmlentities</option>
349
  <option value="5">Integer</option>
350
  <option value="6">Price</option>
351
- <option value="7">Remove Space</option>
352
  <option value="8">CDATA</option>
353
  </select>
354
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -397,7 +397,7 @@
397
  <option value="4">htmlentities</option>
398
  <option value="5">Integer</option>
399
  <option value="6">Price</option>
400
- <option value="7">Remove Space</option>
401
  <option value="8">CDATA</option>
402
  </select>
403
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -446,7 +446,7 @@
446
  <option value="4">htmlentities</option>
447
  <option value="5">Integer</option>
448
  <option value="6">Price</option>
449
- <option value="7">Remove Space</option>
450
  <option value="8">CDATA</option>
451
  </select>
452
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -495,7 +495,7 @@
495
  <option value="4">htmlentities</option>
496
  <option value="5">Integer</option>
497
  <option value="6">Price</option>
498
- <option value="7">Remove Space</option>
499
  <option value="8">CDATA</option>
500
  </select>
501
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -544,7 +544,7 @@
544
  <option value="4">htmlentities</option>
545
  <option value="5">Integer</option>
546
  <option value="6">Price</option>
547
- <option value="7">Remove Space</option>
548
  <option value="8">CDATA</option>
549
  </select>
550
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -593,7 +593,7 @@
593
  <option value="4">htmlentities</option>
594
  <option value="5">Integer</option>
595
  <option value="6">Price</option>
596
- <option value="7">Remove Space</option>
597
  <option value="8">CDATA</option>
598
  </select>
599
  <i class="dashicons dashicons-editor-expand expandType"></i>
54
  <option value="4">htmlentities</option>
55
  <option value="5">Integer</option>
56
  <option value="6">Price</option>
57
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
58
  <option value="8">CDATA</option>
59
  </select>
60
  <i class="dashicons dashicons-editor-expand expandType"></i>
103
  <option value="4">htmlentities</option>
104
  <option value="5">Integer</option>
105
  <option value="6">Price</option>
106
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
107
  <option value="8">CDATA</option>
108
  </select>
109
  <i class="dashicons dashicons-editor-expand expandType"></i>
152
  <option value="4">htmlentities</option>
153
  <option value="5">Integer</option>
154
  <option value="6">Price</option>
155
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
156
  <option value="8">CDATA</option>
157
  </select>
158
  <i class="dashicons dashicons-editor-expand expandType"></i>
201
  <option value="4">htmlentities</option>
202
  <option value="5">Integer</option>
203
  <option value="6">Price</option>
204
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
205
  <option value="8">CDATA</option>
206
  </select>
207
  <i class="dashicons dashicons-editor-expand expandType"></i>
250
  <option value="4">htmlentities</option>
251
  <option value="5">Integer</option>
252
  <option value="6">Price</option>
253
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
254
  <option value="8">CDATA</option>
255
  </select>
256
  <i class="dashicons dashicons-editor-expand expandType"></i>
299
  <option value="4">htmlentities</option>
300
  <option value="5">Integer</option>
301
  <option value="6">Price</option>
302
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
303
  <option value="8">CDATA</option>
304
  </select>
305
  <i class="dashicons dashicons-editor-expand expandType"></i>
348
  <option value="4">htmlentities</option>
349
  <option value="5">Integer</option>
350
  <option value="6">Price</option>
351
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
352
  <option value="8">CDATA</option>
353
  </select>
354
  <i class="dashicons dashicons-editor-expand expandType"></i>
397
  <option value="4">htmlentities</option>
398
  <option value="5">Integer</option>
399
  <option value="6">Price</option>
400
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
401
  <option value="8">CDATA</option>
402
  </select>
403
  <i class="dashicons dashicons-editor-expand expandType"></i>
446
  <option value="4">htmlentities</option>
447
  <option value="5">Integer</option>
448
  <option value="6">Price</option>
449
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
450
  <option value="8">CDATA</option>
451
  </select>
452
  <i class="dashicons dashicons-editor-expand expandType"></i>
495
  <option value="4">htmlentities</option>
496
  <option value="5">Integer</option>
497
  <option value="6">Price</option>
498
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
499
  <option value="8">CDATA</option>
500
  </select>
501
  <i class="dashicons dashicons-editor-expand expandType"></i>
544
  <option value="4">htmlentities</option>
545
  <option value="5">Integer</option>
546
  <option value="6">Price</option>
547
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
548
  <option value="8">CDATA</option>
549
  </select>
550
  <i class="dashicons dashicons-editor-expand expandType"></i>
593
  <option value="4">htmlentities</option>
594
  <option value="5">Integer</option>
595
  <option value="6">Price</option>
596
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
597
  <option value="8">CDATA</option>
598
  </select>
599
  <i class="dashicons dashicons-editor-expand expandType"></i>
admin/partials/shopbot/add-feed.php ADDED
@@ -0,0 +1,885 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <ul class="wf_tabs">
2
+ <li>
3
+ <input type="radio" name="wf_tabs" id="tab1" checked/>
4
+ <label class="wf-tab-name" for="tab1"><?php echo _e('Feed Config', 'woo-feed'); ?></label>
5
+
6
+ <div id="wf-tab-content1" class="wf-tab-content">
7
+ <table class="table tree widefat fixed sorted_table mtable" width="100%" id="table-1">
8
+ <thead>
9
+ <tr>
10
+ <th></th>
11
+ <th><?php echo ucfirst($provider); ?> <?php echo _e('Attributes', 'woo-feed'); ?></th>
12
+ <th><?php echo _e('Prefix', 'woo-feed'); ?></th>
13
+ <th><?php echo _e('Type', 'woo-feed'); ?></th>
14
+ <th><?php echo _e('Value', 'woo-feed'); ?></th>
15
+ <th><?php echo _e('Suffix', 'woo-feed'); ?></th>
16
+ <th><?php echo _e('Output Type', 'woo-feed'); ?></th>
17
+ <th><?php echo _e('Output Limit', 'woo-feed'); ?></th>
18
+ <th></th>
19
+ </tr>
20
+ </thead>
21
+ <tbody>
22
+ <tr>
23
+ <td>
24
+ <i class="wf_sortedtable dashicons dashicons-menu"></i>
25
+ </td>
26
+ <td>
27
+ <input type="text" name="mattributes[]" autocomplete="off" required
28
+ class="wf_validate_attr wf_mattributes" value="ID"/>
29
+ </td>
30
+ <td>
31
+ <input type="text" name="prefix[]" autocomplete="off" class="wf_ps"/>
32
+ </td>
33
+ <td>
34
+ <select name="type[]" class="attr_type wfnoempty">
35
+ <option value="attribute"> <?php echo _e('Attribute', 'woo-feed'); ?></option>
36
+ <option value="pattern"> <?php echo _e('Pattern', 'woo-feed'); ?></option>
37
+ </select>
38
+ </td>
39
+ <td>
40
+ <select name="attributes[]" id="" required="required"
41
+ class="wf_validate_attr wf_attr wf_attributes">
42
+ <?php echo $product->attributeDropdown('id'); ?>
43
+ </select>
44
+ <input type="text" name="default[]" autocomplete="off" class="wf_default wf_attributes"
45
+ style=" display: none;"/>
46
+ </td>
47
+ <td>
48
+ <input type="text" name="suffix[]" autocomplete="off" class="wf_ps"/>
49
+ </td>
50
+ <td>
51
+ <select name="output_type[][]" id="" class="outputType wfnoempty">
52
+ <option value="1">Default</option>
53
+ <option value="2">Strip Tags</option>
54
+ <option value="3">UTF-8 Encode</option>
55
+ <option value="4">htmlentities</option>
56
+ <option value="5">Integer</option>
57
+ <option value="6">Price</option>
58
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
59
+ <option value="8">CDATA</option>
60
+ </select>
61
+ <i class="dashicons dashicons-editor-expand expandType"></i>
62
+ <i style="display: none;" class="dashicons dashicons-editor-contract contractType"></i>
63
+ </td>
64
+ <td>
65
+ <input type="text" name="limit[]" class="wf_ps"/>
66
+ </td>
67
+ <td>
68
+ <i class="delRow dashicons dashicons-trash"></i>
69
+ </td>
70
+ </tr>
71
+ <tr>
72
+ <td>
73
+ <i class="wf_sortedtable dashicons dashicons-menu"></i>
74
+ </td>
75
+ <td>
76
+ <input type="text" name="mattributes[]" autocomplete="off" required
77
+ class="wf_validate_attr wf_mattributes" value="Product Name"/>
78
+ </td>
79
+ <td>
80
+ <input type="text" name="prefix[]" autocomplete="off" class="wf_ps"/>
81
+ </td>
82
+ <td>
83
+ <select name="type[]" class="attr_type wfnoempty">
84
+ <option value="attribute"> <?php echo _e('Attribute', 'woo-feed'); ?></option>
85
+ <option value="pattern"> <?php echo _e('Pattern', 'woo-feed'); ?></option>
86
+ </select>
87
+ </td>
88
+ <td>
89
+ <select name="attributes[]" id="" required="required"
90
+ class="wf_validate_attr wf_attr wf_attributes">
91
+ <?php echo $product->attributeDropdown('title'); ?>
92
+ </select>
93
+ <input type="text" name="default[]" autocomplete="off" class="wf_default wf_attributes"
94
+ style=" display: none;"/>
95
+ </td>
96
+ <td>
97
+ <input type="text" name="suffix[]" autocomplete="off" class="wf_ps"/>
98
+ </td>
99
+ <td>
100
+ <select name="output_type[][]" id="" class="outputType wfnoempty">
101
+ <option value="1">Default</option>
102
+ <option value="2">Strip Tags</option>
103
+ <option value="3">UTF-8 Encode</option>
104
+ <option value="4">htmlentities</option>
105
+ <option value="5">Integer</option>
106
+ <option value="6">Price</option>
107
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
108
+ <option value="8">CDATA</option>
109
+ </select>
110
+ <i class="dashicons dashicons-editor-expand expandType"></i>
111
+ <i style="display: none;" class="dashicons dashicons-editor-contract contractType"></i>
112
+ </td>
113
+ <td>
114
+ <input type="text" name="limit[]" class="wf_ps"/>
115
+ </td>
116
+ <td>
117
+ <i class="delRow dashicons dashicons-trash"></i>
118
+ </td>
119
+ </tr>
120
+ <tr>
121
+ <td>
122
+ <i class="wf_sortedtable dashicons dashicons-menu"></i>
123
+ </td>
124
+ <td>
125
+ <input type="text" name="mattributes[]" autocomplete="off" required
126
+ class="wf_validate_attr wf_mattributes" value="URL"/>
127
+ </td>
128
+ <td>
129
+ <input type="text" name="prefix[]" autocomplete="off" class="wf_ps"/>
130
+ </td>
131
+ <td>
132
+ <select name="type[]" class="attr_type wfnoempty">
133
+ <option value="attribute"> <?php echo _e('Attribute', 'woo-feed'); ?></option>
134
+ <option value="pattern"> <?php echo _e('Pattern', 'woo-feed'); ?></option>
135
+ </select>
136
+ </td>
137
+ <td>
138
+ <select name="attributes[]" id="" required="required"
139
+ class="wf_validate_attr wf_attr wf_attributes">
140
+ <?php echo $product->attributeDropdown('link'); ?>
141
+ </select>
142
+ <input type="text" name="default[]" autocomplete="off" class="wf_default wf_attributes"
143
+ style=" display: none;"/>
144
+ </td>
145
+ <td>
146
+ <input type="text" name="suffix[]" autocomplete="off" class="wf_ps"/>
147
+ </td>
148
+ <td>
149
+ <select name="output_type[][]" id="" class="outputType wfnoempty">
150
+ <option value="1">Default</option>
151
+ <option value="2">Strip Tags</option>
152
+ <option value="3">UTF-8 Encode</option>
153
+ <option value="4">htmlentities</option>
154
+ <option value="5">Integer</option>
155
+ <option value="6">Price</option>
156
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
157
+ <option value="8">CDATA</option>
158
+ </select>
159
+ <i class="dashicons dashicons-editor-expand expandType"></i>
160
+ <i style="display: none;" class="dashicons dashicons-editor-contract contractType"></i>
161
+ </td>
162
+ <td>
163
+ <input type="text" name="limit[]" class="wf_ps"/>
164
+ </td>
165
+ <td>
166
+ <i class="delRow dashicons dashicons-trash"></i>
167
+ </td>
168
+ </tr>
169
+ <tr>
170
+ <td>
171
+ <i class="wf_sortedtable dashicons dashicons-menu"></i>
172
+ </td>
173
+ <td>
174
+ <input type="text" name="mattributes[]" autocomplete="off" required
175
+ class="wf_validate_attr wf_mattributes" value="Category"/>
176
+ </td>
177
+ <td>
178
+ <input type="text" name="prefix[]" autocomplete="off" class="wf_ps"/>
179
+ </td>
180
+ <td>
181
+ <select name="type[]" class="attr_type wfnoempty">
182
+ <option value="attribute"> <?php echo _e('Attribute', 'woo-feed'); ?></option>
183
+ <option value="pattern"> <?php echo _e('Pattern', 'woo-feed'); ?></option>
184
+ </select>
185
+ </td>
186
+ <td>
187
+ <select name="attributes[]" id="" required="required"
188
+ class="wf_validate_attr wf_attr wf_attributes">
189
+ <?php echo $product->attributeDropdown('product_type'); ?>
190
+ </select>
191
+ <input type="text" name="default[]" autocomplete="off" class="wf_default wf_attributes"
192
+ style=" display: none;"/>
193
+ </td>
194
+ <td>
195
+ <input type="text" name="suffix[]" autocomplete="off" class="wf_ps"/>
196
+ </td>
197
+ <td>
198
+ <select name="output_type[][]" id="" class="outputType wfnoempty">
199
+ <option value="1">Default</option>
200
+ <option value="2">Strip Tags</option>
201
+ <option value="3">UTF-8 Encode</option>
202
+ <option value="4">htmlentities</option>
203
+ <option value="5">Integer</option>
204
+ <option value="6">Price</option>
205
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
206
+ <option value="8">CDATA</option>
207
+ </select>
208
+ <i class="dashicons dashicons-editor-expand expandType"></i>
209
+ <i style="display: none;" class="dashicons dashicons-editor-contract contractType"></i>
210
+ </td>
211
+ <td>
212
+ <input type="text" name="limit[]" class="wf_ps"/>
213
+ </td>
214
+ <td>
215
+ <i class="delRow dashicons dashicons-trash"></i>
216
+ </td>
217
+ </tr>
218
+ <tr>
219
+ <td>
220
+ <i class="wf_sortedtable dashicons dashicons-menu"></i>
221
+ </td>
222
+ <td>
223
+ <input type="text" name="mattributes[]" autocomplete="off" required
224
+ class="wf_validate_attr wf_mattributes" value="Photo URL"/>
225
+ </td>
226
+ <td>
227
+ <input type="text" name="prefix[]" autocomplete="off" class="wf_ps"/>
228
+ </td>
229
+ <td>
230
+ <select name="type[]" class="attr_type wfnoempty">
231
+ <option value="attribute"> <?php echo _e('Attribute', 'woo-feed'); ?></option>
232
+ <option value="pattern"> <?php echo _e('Pattern', 'woo-feed'); ?></option>
233
+ </select>
234
+ </td>
235
+ <td>
236
+ <select name="attributes[]" id="" required="required"
237
+ class="wf_validate_attr wf_attr wf_attributes">
238
+ <?php echo $product->attributeDropdown('image'); ?>
239
+ </select>
240
+ <input type="text" name="default[]" autocomplete="off" class="wf_default wf_attributes"
241
+ style=" display: none;"/>
242
+ </td>
243
+ <td>
244
+ <input type="text" name="suffix[]" autocomplete="off" class="wf_ps"/>
245
+ </td>
246
+ <td>
247
+ <select name="output_type[][]" id="" class="outputType wfnoempty">
248
+ <option value="1">Default</option>
249
+ <option value="2">Strip Tags</option>
250
+ <option value="3">UTF-8 Encode</option>
251
+ <option value="4">htmlentities</option>
252
+ <option value="5">Integer</option>
253
+ <option value="6">Price</option>
254
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
255
+ <option value="8">CDATA</option>
256
+ </select>
257
+ <i class="dashicons dashicons-editor-expand expandType"></i>
258
+ <i style="display: none;" class="dashicons dashicons-editor-contract contractType"></i>
259
+ </td>
260
+ <td>
261
+ <input type="text" name="limit[]" class="wf_ps"/>
262
+ </td>
263
+ <td>
264
+ <i class="delRow dashicons dashicons-trash"></i>
265
+ </td>
266
+ </tr>
267
+ <tr>
268
+ <td>
269
+ <i class="wf_sortedtable dashicons dashicons-menu"></i>
270
+ </td>
271
+ <td>
272
+ <input type="text" name="mattributes[]" autocomplete="off" required
273
+ class="wf_validate_attr wf_mattributes" value="Price"/>
274
+ </td>
275
+ <td>
276
+ <input type="text" name="prefix[]" autocomplete="off" class="wf_ps"/>
277
+ </td>
278
+ <td>
279
+ <select name="type[]" class="attr_type wfnoempty">
280
+ <option value="attribute"> <?php echo _e('Attribute', 'woo-feed'); ?></option>
281
+ <option value="pattern"> <?php echo _e('Pattern', 'woo-feed'); ?></option>
282
+ </select>
283
+ </td>
284
+ <td>
285
+ <select name="attributes[]" id="" required="required"
286
+ class="wf_validate_attr wf_attr wf_attributes">
287
+ <?php echo $product->attributeDropdown('sale_price'); ?>
288
+ </select>
289
+ <input type="text" name="default[]" autocomplete="off" class="wf_default wf_attributes"
290
+ style=" display: none;"/>
291
+ </td>
292
+ <td>
293
+ <input type="text" name="suffix[]" autocomplete="off" class="wf_ps"/>
294
+ </td>
295
+ <td>
296
+ <select name="output_type[][]" id="" class="outputType wfnoempty">
297
+ <option value="1">Default</option>
298
+ <option value="2">Strip Tags</option>
299
+ <option value="3">UTF-8 Encode</option>
300
+ <option value="4">htmlentities</option>
301
+ <option value="5">Integer</option>
302
+ <option value="6">Price</option>
303
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
304
+ <option value="8">CDATA</option>
305
+ </select>
306
+ <i class="dashicons dashicons-editor-expand expandType"></i>
307
+ <i style="display: none;" class="dashicons dashicons-editor-contract contractType"></i>
308
+ </td>
309
+ <td>
310
+ <input type="text" name="limit[]" class="wf_ps"/>
311
+ </td>
312
+ <td>
313
+ <i class="delRow dashicons dashicons-trash"></i>
314
+ </td>
315
+ </tr>
316
+ <tr>
317
+ <td>
318
+ <i class="wf_sortedtable dashicons dashicons-menu"></i>
319
+ </td>
320
+ <td>
321
+ <input type="text" name="mattributes[]" autocomplete="off" required
322
+ class="wf_validate_attr wf_mattributes" value="Original Price"/>
323
+ </td>
324
+ <td>
325
+ <input type="text" name="prefix[]" autocomplete="off" class="wf_ps"/>
326
+ </td>
327
+ <td>
328
+ <select name="type[]" class="attr_type wfnoempty">
329
+ <option value="attribute"> <?php echo _e('Attribute', 'woo-feed'); ?></option>
330
+ <option value="pattern"> <?php echo _e('Pattern', 'woo-feed'); ?></option>
331
+ </select>
332
+ </td>
333
+ <td>
334
+ <select name="attributes[]" id="" required="required"
335
+ class="wf_validate_attr wf_attr wf_attributes">
336
+ <?php echo $product->attributeDropdown("price"); ?>
337
+ </select>
338
+ <input type="text" name="default[]" autocomplete="off" class="wf_default wf_attributes"
339
+ style=" display: none;"/>
340
+ </td>
341
+ <td>
342
+ <input type="text" name="suffix[]" autocomplete="off" class="wf_ps"/>
343
+ </td>
344
+ <td>
345
+ <select name="output_type[][]" id="" class="outputType wfnoempty">
346
+ <option value="1">Default</option>
347
+ <option value="2">Strip Tags</option>
348
+ <option value="3">UTF-8 Encode</option>
349
+ <option value="4">htmlentities</option>
350
+ <option value="5">Integer</option>
351
+ <option value="6">Price</option>
352
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
353
+ <option value="8">CDATA</option>
354
+ </select>
355
+ <i class="dashicons dashicons-editor-expand expandType"></i>
356
+ <i style="display: none;" class="dashicons dashicons-editor-contract contractType"></i>
357
+ </td>
358
+ <td>
359
+ <input type="text" name="limit[]" class="wf_ps"/>
360
+ </td>
361
+ <td>
362
+ <i class="delRow dashicons dashicons-trash"></i>
363
+ </td>
364
+ </tr>
365
+ <tr>
366
+ <td>
367
+ <i class="wf_sortedtable dashicons dashicons-menu"></i>
368
+ </td>
369
+ <td>
370
+ <input type="text" name="mattributes[]" autocomplete="off" required
371
+ class="wf_validate_attr wf_mattributes" value="Description"/>
372
+ </td>
373
+ <td>
374
+ <input type="text" name="prefix[]" autocomplete="off" class="wf_ps"/>
375
+ </td>
376
+ <td>
377
+ <select name="type[]" class="attr_type wfnoempty">
378
+ <option value="attribute"> <?php echo _e('Attribute', 'woo-feed'); ?></option>
379
+ <option value="pattern"> <?php echo _e('Pattern', 'woo-feed'); ?></option>
380
+ </select>
381
+ </td>
382
+ <td>
383
+ <select name="attributes[]" id="" required="required"
384
+ class="wf_validate_attr wf_attr wf_attributes">
385
+ <?php echo $product->attributeDropdown("description"); ?>
386
+ </select>
387
+ <input type="text" name="default[]" autocomplete="off" class="wf_default wf_attributes"
388
+ style=" display: none;"/>
389
+ </td>
390
+ <td>
391
+ <input type="text" name="suffix[]" autocomplete="off" class="wf_ps"/>
392
+ </td>
393
+ <td>
394
+ <select name="output_type[][]" id="" class="outputType wfnoempty">
395
+ <option value="1">Default</option>
396
+ <option value="2">Strip Tags</option>
397
+ <option value="3">UTF-8 Encode</option>
398
+ <option value="4">htmlentities</option>
399
+ <option value="5">Integer</option>
400
+ <option value="6">Price</option>
401
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
402
+ <option value="8">CDATA</option>
403
+ </select>
404
+ <i class="dashicons dashicons-editor-expand expandType"></i>
405
+ <i style="display: none;" class="dashicons dashicons-editor-contract contractType"></i>
406
+ </td>
407
+ <td>
408
+ <input type="text" name="limit[]" class="wf_ps"/>
409
+ </td>
410
+ <td>
411
+ <i class="delRow dashicons dashicons-trash"></i>
412
+ </td>
413
+ </tr>
414
+ <tr>
415
+ <td>
416
+ <i class="wf_sortedtable dashicons dashicons-menu"></i>
417
+ </td>
418
+ <td>
419
+ <input type="text" name="mattributes[]" autocomplete="off" required
420
+ class="wf_validate_attr wf_mattributes" value="MPN"/>
421
+ </td>
422
+ <td>
423
+ <input type="text" name="prefix[]" autocomplete="off" class="wf_ps"/>
424
+ </td>
425
+ <td>
426
+ <select name="type[]" class="attr_type wfnoempty">
427
+ <option value="attribute"> <?php echo _e('Attribute', 'woo-feed'); ?></option>
428
+ <option value="pattern"> <?php echo _e('Pattern', 'woo-feed'); ?></option>
429
+ </select>
430
+ </td>
431
+ <td>
432
+ <select name="attributes[]" id="" required="required"
433
+ class="wf_validate_attr wf_attr wf_attributes">
434
+ <?php echo $product->attributeDropdown("sku"); ?>
435
+ </select>
436
+ <input type="text" name="default[]" autocomplete="off" class="wf_default wf_attributes"
437
+ value="mens, womens" style=" display: none;" />
438
+ </td>
439
+ <td>
440
+ <input type="text" name="suffix[]" autocomplete="off" class="wf_ps"/>
441
+ </td>
442
+ <td>
443
+ <select name="output_type[][]" id="" class="outputType wfnoempty">
444
+ <option value="1">Default</option>
445
+ <option value="2">Strip Tags</option>
446
+ <option value="3">UTF-8 Encode</option>
447
+ <option value="4">htmlentities</option>
448
+ <option value="5">Integer</option>
449
+ <option value="6">Price</option>
450
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
451
+ <option value="8">CDATA</option>
452
+ </select>
453
+ <i class="dashicons dashicons-editor-expand expandType"></i>
454
+ <i style="display: none;" class="dashicons dashicons-editor-contract contractType"></i>
455
+ </td>
456
+ <td>
457
+ <input type="text" name="limit[]" class="wf_ps"/>
458
+ </td>
459
+ <td>
460
+ <i class="delRow dashicons dashicons-trash"></i>
461
+ </td>
462
+ </tr>
463
+ <tr>
464
+ <td>
465
+ <i class="wf_sortedtable dashicons dashicons-menu"></i>
466
+ </td>
467
+ <td>
468
+ <input type="text" name="mattributes[]" autocomplete="off" required
469
+ class="wf_validate_attr wf_mattributes" value="Brand"/>
470
+ </td>
471
+ <td>
472
+ <input type="text" name="prefix[]" autocomplete="off" class="wf_ps"/>
473
+ </td>
474
+ <td>
475
+ <select name="type[]" class="attr_type wfnoempty">
476
+ <option value="attribute"> <?php echo _e('Attribute', 'woo-feed'); ?></option>
477
+ <option value="pattern"> <?php echo _e('Pattern', 'woo-feed'); ?></option>
478
+ </select>
479
+ </td>
480
+ <td>
481
+ <select name="attributes[]" id="" required="required"
482
+ class="wf_validate_attr wf_attr wf_attributes">
483
+ <?php echo $product->attributeDropdown(); ?>
484
+ </select>
485
+ <input type="text" name="default[]" autocomplete="off" class="wf_default wf_attributes"
486
+ style=" display: none;"/>
487
+ </td>
488
+ <td>
489
+ <input type="text" name="suffix[]" autocomplete="off" class="wf_ps"/>
490
+ </td>
491
+ <td>
492
+ <select name="output_type[][]" id="" class="outputType wfnoempty">
493
+ <option value="1">Default</option>
494
+ <option value="2">Strip Tags</option>
495
+ <option value="3">UTF-8 Encode</option>
496
+ <option value="4">htmlentities</option>
497
+ <option value="5">Integer</option>
498
+ <option value="6">Price</option>
499
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
500
+ <option value="8">CDATA</option>
501
+ </select>
502
+ <i class="dashicons dashicons-editor-expand expandType"></i>
503
+ <i style="display: none;" class="dashicons dashicons-editor-contract contractType"></i>
504
+ </td>
505
+ <td>
506
+ <input type="text" name="limit[]" class="wf_ps"/>
507
+ </td>
508
+ <td>
509
+ <i class="delRow dashicons dashicons-trash"></i>
510
+ </td>
511
+ </tr>
512
+ <tr>
513
+ <td>
514
+ <i class="wf_sortedtable dashicons dashicons-menu"></i>
515
+ </td>
516
+ <td>
517
+ <input type="text" name="mattributes[]" autocomplete="off" required
518
+ class="wf_validate_attr wf_mattributes" value="Shipment Cost"/>
519
+ </td>
520
+ <td>
521
+ <input type="text" name="prefix[]" autocomplete="off" class="wf_ps"/>
522
+ </td>
523
+ <td>
524
+ <select name="type[]" class="attr_type wfnoempty">
525
+ <option value="attribute"> <?php echo _e('Attribute', 'woo-feed'); ?></option>
526
+ <option value="pattern"> <?php echo _e('Pattern', 'woo-feed'); ?></option>
527
+ </select>
528
+ </td>
529
+ <td>
530
+ <select name="attributes[]" id="" required="required"
531
+ class="wf_validate_attr wf_attr wf_attributes">
532
+ <?php echo $product->attributeDropdown(); ?>
533
+ </select>
534
+ <input type="text" name="default[]" autocomplete="off" class="wf_default wf_attributes"
535
+ style=" display: none;"/>
536
+ </td>
537
+ <td>
538
+ <input type="text" name="suffix[]" autocomplete="off" class="wf_ps"/>
539
+ </td>
540
+ <td>
541
+ <select name="output_type[][]" id="" class="outputType wfnoempty">
542
+ <option value="1">Default</option>
543
+ <option value="2">Strip Tags</option>
544
+ <option value="3">UTF-8 Encode</option>
545
+ <option value="4">htmlentities</option>
546
+ <option value="5">Integer</option>
547
+ <option value="6">Price</option>
548
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
549
+ <option value="8">CDATA</option>
550
+ </select>
551
+ <i class="dashicons dashicons-editor-expand expandType"></i>
552
+ <i style="display: none;" class="dashicons dashicons-editor-contract contractType"></i>
553
+ </td>
554
+ <td>
555
+ <input type="text" name="limit[]" class="wf_ps"/>
556
+ </td>
557
+ <td>
558
+ <i class="delRow dashicons dashicons-trash"></i>
559
+ </td>
560
+ </tr>
561
+ <tr>
562
+ <td>
563
+ <i class="wf_sortedtable dashicons dashicons-menu"></i>
564
+ </td>
565
+ <td>
566
+ <input type="text" name="mattributes[]" autocomplete="off" required
567
+ class="wf_validate_attr wf_mattributes" value="Stock"/>
568
+ </td>
569
+ <td>
570
+ <input type="text" name="prefix[]" autocomplete="off" class="wf_ps"/>
571
+ </td>
572
+ <td>
573
+ <select name="type[]" class="attr_type wfnoempty">
574
+ <option value="attribute"> <?php echo _e('Attribute', 'woo-feed'); ?></option>
575
+ <option value="pattern"> <?php echo _e('Pattern', 'woo-feed'); ?></option>
576
+ </select>
577
+ </td>
578
+ <td>
579
+ <select name="attributes[]" id="" required="required"
580
+ class="wf_validate_attr wf_attr wf_attributes">
581
+ <?php echo $product->attributeDropdown("quantity"); ?>
582
+ </select>
583
+ <input type="text" name="default[]" autocomplete="off" class="wf_default wf_attributes"
584
+ style=" display: none;"/>
585
+ </td>
586
+ <td>
587
+ <input type="text" name="suffix[]" autocomplete="off" class="wf_ps"/>
588
+ </td>
589
+ <td>
590
+ <select name="output_type[][]" id="" class="outputType wfnoempty">
591
+ <option value="1">Default</option>
592
+ <option value="2">Strip Tags</option>
593
+ <option value="3">UTF-8 Encode</option>
594
+ <option value="4">htmlentities</option>
595
+ <option value="5">Integer</option>
596
+ <option value="6">Price</option>
597
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
598
+ <option value="8">CDATA</option>
599
+ </select>
600
+ <i class="dashicons dashicons-editor-expand expandType"></i>
601
+ <i style="display: none;" class="dashicons dashicons-editor-contract contractType"></i>
602
+ </td>
603
+ <td>
604
+ <input type="text" name="limit[]" class="wf_ps"/>
605
+ </td>
606
+ <td>
607
+ <i class="delRow dashicons dashicons-trash"></i>
608
+ </td>
609
+ </tr>
610
+ <tr>
611
+ <td>
612
+ <i class="wf_sortedtable dashicons dashicons-menu"></i>
613
+ </td>
614
+ <td>
615
+ <input type="text" name="mattributes[]" autocomplete="off" required
616
+ class="wf_validate_attr wf_mattributes" value="Promotional Phrase"/>
617
+ </td>
618
+ <td>
619
+ <input type="text" name="prefix[]" autocomplete="off" class="wf_ps"/>
620
+ </td>
621
+ <td>
622
+ <select name="type[]" class="attr_type wfnoempty">
623
+ <option value="attribute"> <?php echo _e('Attribute', 'woo-feed'); ?></option>
624
+ <option value="pattern" > <?php echo _e('Pattern', 'woo-feed'); ?></option>
625
+ </select>
626
+ </td>
627
+ <td>
628
+ <select name="attributes[]" id="" required="required"
629
+ class="wf_validate_attr wf_attr wf_attributes">
630
+ <?php echo $product->attributeDropdown(); ?>
631
+ </select>
632
+ <input type="text" name="default[]" autocomplete="off" class="wf_default wf_attributes"
633
+ value="" style=" display: none;" />
634
+ </td>
635
+ <td>
636
+ <input type="text" name="suffix[]" autocomplete="off" class="wf_ps"/>
637
+ </td>
638
+ <td>
639
+ <select name="output_type[][]" id="" class="outputType wfnoempty">
640
+ <option value="1">Default</option>
641
+ <option value="2">Strip Tags</option>
642
+ <option value="3">UTF-8 Encode</option>
643
+ <option value="4">htmlentities</option>
644
+ <option value="5">Integer</option>
645
+ <option value="6">Price</option>
646
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
647
+ <option value="8">CDATA</option>
648
+ </select>
649
+ <i class="dashicons dashicons-editor-expand expandType"></i>
650
+ <i style="display: none;" class="dashicons dashicons-editor-contract contractType"></i>
651
+ </td>
652
+ <td>
653
+ <input type="text" name="limit[]" class="wf_ps"/>
654
+ </td>
655
+ <td>
656
+ <i class="delRow dashicons dashicons-trash"></i>
657
+ </td>
658
+ </tr>
659
+ <tr>
660
+ <td>
661
+ <i class="wf_sortedtable dashicons dashicons-menu"></i>
662
+ </td>
663
+ <td>
664
+ <input type="text" name="mattributes[]" autocomplete="off" required
665
+ class="wf_validate_attr wf_mattributes" value="Model"/>
666
+ </td>
667
+ <td>
668
+ <input type="text" name="prefix[]" autocomplete="off" class="wf_ps"/>
669
+ </td>
670
+ <td>
671
+ <select name="type[]" class="attr_type wfnoempty">
672
+ <option value="attribute"> <?php echo _e('Attribute', 'woo-feed'); ?></option>
673
+ <option value="pattern" > <?php echo _e('Pattern', 'woo-feed'); ?></option>
674
+ </select>
675
+ </td>
676
+ <td>
677
+ <select name="attributes[]" id="" required="required"
678
+ class="wf_validate_attr wf_attr wf_attributes">
679
+ <?php echo $product->attributeDropdown(); ?>
680
+ </select>
681
+ <input type="text" name="default[]" autocomplete="off" class="wf_default wf_attributes"
682
+ value="" style=" display: none;" />
683
+ </td>
684
+ <td>
685
+ <input type="text" name="suffix[]" autocomplete="off" class="wf_ps"/>
686
+ </td>
687
+ <td>
688
+ <select name="output_type[][]" id="" class="outputType wfnoempty">
689
+ <option value="1">Default</option>
690
+ <option value="2">Strip Tags</option>
691
+ <option value="3">UTF-8 Encode</option>
692
+ <option value="4">htmlentities</option>
693
+ <option value="5">Integer</option>
694
+ <option value="6">Price</option>
695
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
696
+ <option value="8">CDATA</option>
697
+ </select>
698
+ <i class="dashicons dashicons-editor-expand expandType"></i>
699
+ <i style="display: none;" class="dashicons dashicons-editor-contract contractType"></i>
700
+ </td>
701
+ <td>
702
+ <input type="text" name="limit[]" class="wf_ps"/>
703
+ </td>
704
+ <td>
705
+ <i class="delRow dashicons dashicons-trash"></i>
706
+ </td>
707
+ </tr>
708
+ <tr>
709
+ <td>
710
+ <i class="wf_sortedtable dashicons dashicons-menu"></i>
711
+ </td>
712
+ <td>
713
+ <input type="text" name="mattributes[]" autocomplete="off" required
714
+ class="wf_validate_attr wf_mattributes" value="Color"/>
715
+ </td>
716
+ <td>
717
+ <input type="text" name="prefix[]" autocomplete="off" class="wf_ps"/>
718
+ </td>
719
+ <td>
720
+ <select name="type[]" class="attr_type wfnoempty">
721
+ <option value="attribute"> <?php echo _e('Attribute', 'woo-feed'); ?></option>
722
+ <option value="pattern" > <?php echo _e('Pattern', 'woo-feed'); ?></option>
723
+ </select>
724
+ </td>
725
+ <td>
726
+ <select name="attributes[]" id="" required="required"
727
+ class="wf_validate_attr wf_attr wf_attributes">
728
+ <?php echo $product->attributeDropdown(); ?>
729
+ </select>
730
+ <input type="text" name="default[]" autocomplete="off" class="wf_default wf_attributes"
731
+ value="" style=" display: none;" />
732
+ </td>
733
+ <td>
734
+ <input type="text" name="suffix[]" autocomplete="off" class="wf_ps"/>
735
+ </td>
736
+ <td>
737
+ <select name="output_type[][]" id="" class="outputType wfnoempty">
738
+ <option value="1">Default</option>
739
+ <option value="2">Strip Tags</option>
740
+ <option value="3">UTF-8 Encode</option>
741
+ <option value="4">htmlentities</option>
742
+ <option value="5">Integer</option>
743
+ <option value="6">Price</option>
744
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
745
+ <option value="8">CDATA</option>
746
+ </select>
747
+ <i class="dashicons dashicons-editor-expand expandType"></i>
748
+ <i style="display: none;" class="dashicons dashicons-editor-contract contractType"></i>
749
+ </td>
750
+ <td>
751
+ <input type="text" name="limit[]" class="wf_ps"/>
752
+ </td>
753
+ <td>
754
+ <i class="delRow dashicons dashicons-trash"></i>
755
+ </td>
756
+ </tr>
757
+ <tr>
758
+ <td>
759
+ <i class="wf_sortedtable dashicons dashicons-menu"></i>
760
+ </td>
761
+ <td>
762
+ <input type="text" name="mattributes[]" autocomplete="off" required
763
+ class="wf_validate_attr wf_mattributes" value="Product Type"/>
764
+ </td>
765
+ <td>
766
+ <input type="text" name="prefix[]" autocomplete="off" class="wf_ps"/>
767
+ </td>
768
+ <td>
769
+ <select name="type[]" class="attr_type wfnoempty">
770
+ <option value="attribute"> <?php echo _e('Attribute', 'woo-feed'); ?></option>
771
+ <option value="pattern" > <?php echo _e('Pattern', 'woo-feed'); ?></option>
772
+ </select>
773
+ </td>
774
+ <td>
775
+ <select name="attributes[]" id="" required="required"
776
+ class="wf_validate_attr wf_attr wf_attributes">
777
+ <?php echo $product->attributeDropdown(); ?>
778
+ </select>
779
+ <input type="text" name="default[]" autocomplete="off" class="wf_default wf_attributes"
780
+ value="" style=" display: none;" />
781
+ </td>
782
+ <td>
783
+ <input type="text" name="suffix[]" autocomplete="off" class="wf_ps"/>
784
+ </td>
785
+ <td>
786
+ <select name="output_type[][]" id="" class="outputType wfnoempty">
787
+ <option value="1">Default</option>
788
+ <option value="2">Strip Tags</option>
789
+ <option value="3">UTF-8 Encode</option>
790
+ <option value="4">htmlentities</option>
791
+ <option value="5">Integer</option>
792
+ <option value="6">Price</option>
793
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
794
+ <option value="8">CDATA</option>
795
+ </select>
796
+ <i class="dashicons dashicons-editor-expand expandType"></i>
797
+ <i style="display: none;" class="dashicons dashicons-editor-contract contractType"></i>
798
+ </td>
799
+ <td>
800
+ <input type="text" name="limit[]" class="wf_ps"/>
801
+ </td>
802
+ <td>
803
+ <i class="delRow dashicons dashicons-trash"></i>
804
+ </td>
805
+ </tr>
806
+ </tbody>
807
+ <tfoot>
808
+ <tr>
809
+ <td>
810
+ <button type="button" class="button-small button-primary" id="wf_newRow">
811
+ <?php echo _e('Add New Row', 'woo-feed'); ?>
812
+ </button>
813
+ </td>
814
+ <td colspan="8">
815
+
816
+ </td>
817
+ </tr>
818
+ </tfoot>
819
+ </table>
820
+ <table class=" widefat fixed">
821
+ <tr>
822
+ <td align="left" class="">
823
+ <div class="makeFeedResponse"></div>
824
+ <div class="makeFeedComplete"></div>
825
+ </td>
826
+ <td align="right">
827
+ <button type="submit" id="wf_submit" class="wfbtn">
828
+ <?php echo _e('Save & Generate Feed', 'woo-feed'); ?>
829
+ </button>
830
+ </td>
831
+ </tr>
832
+ </table>
833
+ </div>
834
+ </li>
835
+
836
+ <li>
837
+ <input type="radio" name="wf_tabs" id="tab3"/>
838
+ <label class="wf-tab-name" for="tab3"><?php echo _e('FTP', 'woo-feed'); ?></label>
839
+
840
+ <div id="wf-tab-content3" class="wf-tab-content">
841
+ <table class="table widefat fixed mtable" width="100%">
842
+ <tbody>
843
+ <tr>
844
+ <td><?php echo _e('Enabled', 'woo-feed'); ?></td>
845
+ <td>
846
+ <select name="ftpenabled" id="">
847
+ <option value="0"><?php echo _e('Disabled', 'woo-feed'); ?></option>
848
+ <option value="1"><?php echo _e('Enabled', 'woo-feed'); ?></option>
849
+ </select>
850
+ </td>
851
+ </tr>
852
+ <tr>
853
+ <td><?php echo _e('Host Name', 'woo-feed'); ?></td>
854
+ <td><input type="text" name="ftphost"/></td>
855
+ </tr>
856
+ <tr>
857
+ <td><?php echo _e('User Name', 'woo-feed'); ?></td>
858
+ <td><input type="text" name="ftpuser"/></td>
859
+ </tr>
860
+ <tr>
861
+ <td><?php echo _e('Password', 'woo-feed'); ?></td>
862
+ <td><input type="password" name="ftppassword"/></td>
863
+ </tr>
864
+ <tr>
865
+ <td><?php echo _e('Path', 'woo-feed'); ?></td>
866
+ <td><input type="text" name="ftppath"/></td>
867
+ </tr>
868
+ </tbody>
869
+ </table>
870
+ <table class=" widefat fixed">
871
+ <tr>
872
+ <td align="left" class="makeFeedResponse">
873
+
874
+ </td>
875
+ <td align="right">
876
+ <button type="submit" id="wf_submit" class="wfbtn">
877
+ <?php echo _e('Save & Generate Feed', 'woo-feed'); ?>
878
+ </button>
879
+ </td>
880
+ </tr>
881
+ </table>
882
+ </div>
883
+ </li>
884
+
885
+ </ul>
admin/partials/shopmania/add-feed.php CHANGED
@@ -54,7 +54,7 @@
54
  <option value="4">htmlentities</option>
55
  <option value="5">Integer</option>
56
  <option value="6">Price</option>
57
- <option value="7">Remove Space</option>
58
  <option value="8">CDATA</option>
59
  </select>
60
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -103,7 +103,7 @@
103
  <option value="4">htmlentities</option>
104
  <option value="5">Integer</option>
105
  <option value="6">Price</option>
106
- <option value="7">Remove Space</option>
107
  <option value="8">CDATA</option>
108
  </select>
109
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -152,7 +152,7 @@
152
  <option value="4">htmlentities</option>
153
  <option value="5">Integer</option>
154
  <option value="6">Price</option>
155
- <option value="7">Remove Space</option>
156
  <option value="8">CDATA</option>
157
  </select>
158
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -201,7 +201,7 @@
201
  <option value="4">htmlentities</option>
202
  <option value="5">Integer</option>
203
  <option value="6">Price</option>
204
- <option value="7">Remove Space</option>
205
  <option value="8">CDATA</option>
206
  </select>
207
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -250,7 +250,7 @@
250
  <option value="4">htmlentities</option>
251
  <option value="5">Integer</option>
252
  <option value="6">Price</option>
253
- <option value="7">Remove Space</option>
254
  <option value="8">CDATA</option>
255
  </select>
256
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -299,7 +299,7 @@
299
  <option value="4">htmlentities</option>
300
  <option value="5">Integer</option>
301
  <option value="6">Price</option>
302
- <option value="7">Remove Space</option>
303
  <option value="8">CDATA</option>
304
  </select>
305
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -348,7 +348,7 @@
348
  <option value="4">htmlentities</option>
349
  <option value="5">Integer</option>
350
  <option value="6">Price</option>
351
- <option value="7">Remove Space</option>
352
  <option value="8">CDATA</option>
353
  </select>
354
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -397,7 +397,7 @@
397
  <option value="4">htmlentities</option>
398
  <option value="5">Integer</option>
399
  <option value="6">Price</option>
400
- <option value="7">Remove Space</option>
401
  <option value="8">CDATA</option>
402
  </select>
403
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -446,7 +446,7 @@
446
  <option value="4">htmlentities</option>
447
  <option value="5">Integer</option>
448
  <option value="6">Price</option>
449
- <option value="7">Remove Space</option>
450
  <option value="8">CDATA</option>
451
  </select>
452
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -495,7 +495,7 @@
495
  <option value="4">htmlentities</option>
496
  <option value="5">Integer</option>
497
  <option value="6">Price</option>
498
- <option value="7">Remove Space</option>
499
  <option value="8">CDATA</option>
500
  </select>
501
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -544,7 +544,7 @@
544
  <option value="4">htmlentities</option>
545
  <option value="5">Integer</option>
546
  <option value="6">Price</option>
547
- <option value="7">Remove Space</option>
548
  <option value="8">CDATA</option>
549
  </select>
550
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -593,7 +593,7 @@
593
  <option value="4">htmlentities</option>
594
  <option value="5">Integer</option>
595
  <option value="6">Price</option>
596
- <option value="7">Remove Space</option>
597
  <option value="8">CDATA</option>
598
  </select>
599
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -642,7 +642,7 @@
642
  <option value="4">htmlentities</option>
643
  <option value="5">Integer</option>
644
  <option value="6">Price</option>
645
- <option value="7">Remove Space</option>
646
  <option value="8">CDATA</option>
647
  </select>
648
  <i class="dashicons dashicons-editor-expand expandType"></i>
54
  <option value="4">htmlentities</option>
55
  <option value="5">Integer</option>
56
  <option value="6">Price</option>
57
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
58
  <option value="8">CDATA</option>
59
  </select>
60
  <i class="dashicons dashicons-editor-expand expandType"></i>
103
  <option value="4">htmlentities</option>
104
  <option value="5">Integer</option>
105
  <option value="6">Price</option>
106
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
107
  <option value="8">CDATA</option>
108
  </select>
109
  <i class="dashicons dashicons-editor-expand expandType"></i>
152
  <option value="4">htmlentities</option>
153
  <option value="5">Integer</option>
154
  <option value="6">Price</option>
155
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
156
  <option value="8">CDATA</option>
157
  </select>
158
  <i class="dashicons dashicons-editor-expand expandType"></i>
201
  <option value="4">htmlentities</option>
202
  <option value="5">Integer</option>
203
  <option value="6">Price</option>
204
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
205
  <option value="8">CDATA</option>
206
  </select>
207
  <i class="dashicons dashicons-editor-expand expandType"></i>
250
  <option value="4">htmlentities</option>
251
  <option value="5">Integer</option>
252
  <option value="6">Price</option>
253
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
254
  <option value="8">CDATA</option>
255
  </select>
256
  <i class="dashicons dashicons-editor-expand expandType"></i>
299
  <option value="4">htmlentities</option>
300
  <option value="5">Integer</option>
301
  <option value="6">Price</option>
302
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
303
  <option value="8">CDATA</option>
304
  </select>
305
  <i class="dashicons dashicons-editor-expand expandType"></i>
348
  <option value="4">htmlentities</option>
349
  <option value="5">Integer</option>
350
  <option value="6">Price</option>
351
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
352
  <option value="8">CDATA</option>
353
  </select>
354
  <i class="dashicons dashicons-editor-expand expandType"></i>
397
  <option value="4">htmlentities</option>
398
  <option value="5">Integer</option>
399
  <option value="6">Price</option>
400
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
401
  <option value="8">CDATA</option>
402
  </select>
403
  <i class="dashicons dashicons-editor-expand expandType"></i>
446
  <option value="4">htmlentities</option>
447
  <option value="5">Integer</option>
448
  <option value="6">Price</option>
449
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
450
  <option value="8">CDATA</option>
451
  </select>
452
  <i class="dashicons dashicons-editor-expand expandType"></i>
495
  <option value="4">htmlentities</option>
496
  <option value="5">Integer</option>
497
  <option value="6">Price</option>
498
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
499
  <option value="8">CDATA</option>
500
  </select>
501
  <i class="dashicons dashicons-editor-expand expandType"></i>
544
  <option value="4">htmlentities</option>
545
  <option value="5">Integer</option>
546
  <option value="6">Price</option>
547
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
548
  <option value="8">CDATA</option>
549
  </select>
550
  <i class="dashicons dashicons-editor-expand expandType"></i>
593
  <option value="4">htmlentities</option>
594
  <option value="5">Integer</option>
595
  <option value="6">Price</option>
596
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
597
  <option value="8">CDATA</option>
598
  </select>
599
  <i class="dashicons dashicons-editor-expand expandType"></i>
642
  <option value="4">htmlentities</option>
643
  <option value="5">Integer</option>
644
  <option value="6">Price</option>
645
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
646
  <option value="8">CDATA</option>
647
  </select>
648
  <i class="dashicons dashicons-editor-expand expandType"></i>
admin/partials/shopping/add-feed.php CHANGED
@@ -54,7 +54,7 @@
54
  <option value="4">htmlentities</option>
55
  <option value="5">Integer</option>
56
  <option value="6">Price</option>
57
- <option value="7">Remove Space</option>
58
  <option value="8">CDATA</option>
59
  </select>
60
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -103,7 +103,7 @@
103
  <option value="4">htmlentities</option>
104
  <option value="5">Integer</option>
105
  <option value="6">Price</option>
106
- <option value="7">Remove Space</option>
107
  <option value="8">CDATA</option>
108
  </select>
109
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -152,7 +152,7 @@
152
  <option value="4">htmlentities</option>
153
  <option value="5">Integer</option>
154
  <option value="6">Price</option>
155
- <option value="7">Remove Space</option>
156
  <option value="8">CDATA</option>
157
  </select>
158
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -201,7 +201,7 @@
201
  <option value="4">htmlentities</option>
202
  <option value="5">Integer</option>
203
  <option value="6">Price</option>
204
- <option value="7">Remove Space</option>
205
  <option value="8">CDATA</option>
206
  </select>
207
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -250,7 +250,7 @@
250
  <option value="4">htmlentities</option>
251
  <option value="5">Integer</option>
252
  <option value="6">Price</option>
253
- <option value="7">Remove Space</option>
254
  <option value="8">CDATA</option>
255
  </select>
256
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -299,7 +299,7 @@
299
  <option value="4">htmlentities</option>
300
  <option value="5">Integer</option>
301
  <option value="6">Price</option>
302
- <option value="7">Remove Space</option>
303
  <option value="8">CDATA</option>
304
  </select>
305
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -348,7 +348,7 @@
348
  <option value="4">htmlentities</option>
349
  <option value="5">Integer</option>
350
  <option value="6">Price</option>
351
- <option value="7">Remove Space</option>
352
  <option value="8">CDATA</option>
353
  </select>
354
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -397,7 +397,7 @@
397
  <option value="4">htmlentities</option>
398
  <option value="5">Integer</option>
399
  <option value="6">Price</option>
400
- <option value="7">Remove Space</option>
401
  <option value="8">CDATA</option>
402
  </select>
403
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -446,7 +446,7 @@
446
  <option value="4">htmlentities</option>
447
  <option value="5">Integer</option>
448
  <option value="6">Price</option>
449
- <option value="7">Remove Space</option>
450
  <option value="8">CDATA</option>
451
  </select>
452
  <i class="dashicons dashicons-editor-expand expandType"></i>
54
  <option value="4">htmlentities</option>
55
  <option value="5">Integer</option>
56
  <option value="6">Price</option>
57
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
58
  <option value="8">CDATA</option>
59
  </select>
60
  <i class="dashicons dashicons-editor-expand expandType"></i>
103
  <option value="4">htmlentities</option>
104
  <option value="5">Integer</option>
105
  <option value="6">Price</option>
106
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
107
  <option value="8">CDATA</option>
108
  </select>
109
  <i class="dashicons dashicons-editor-expand expandType"></i>
152
  <option value="4">htmlentities</option>
153
  <option value="5">Integer</option>
154
  <option value="6">Price</option>
155
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
156
  <option value="8">CDATA</option>
157
  </select>
158
  <i class="dashicons dashicons-editor-expand expandType"></i>
201
  <option value="4">htmlentities</option>
202
  <option value="5">Integer</option>
203
  <option value="6">Price</option>
204
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
205
  <option value="8">CDATA</option>
206
  </select>
207
  <i class="dashicons dashicons-editor-expand expandType"></i>
250
  <option value="4">htmlentities</option>
251
  <option value="5">Integer</option>
252
  <option value="6">Price</option>
253
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
254
  <option value="8">CDATA</option>
255
  </select>
256
  <i class="dashicons dashicons-editor-expand expandType"></i>
299
  <option value="4">htmlentities</option>
300
  <option value="5">Integer</option>
301
  <option value="6">Price</option>
302
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
303
  <option value="8">CDATA</option>
304
  </select>
305
  <i class="dashicons dashicons-editor-expand expandType"></i>
348
  <option value="4">htmlentities</option>
349
  <option value="5">Integer</option>
350
  <option value="6">Price</option>
351
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
352
  <option value="8">CDATA</option>
353
  </select>
354
  <i class="dashicons dashicons-editor-expand expandType"></i>
397
  <option value="4">htmlentities</option>
398
  <option value="5">Integer</option>
399
  <option value="6">Price</option>
400
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
401
  <option value="8">CDATA</option>
402
  </select>
403
  <i class="dashicons dashicons-editor-expand expandType"></i>
446
  <option value="4">htmlentities</option>
447
  <option value="5">Integer</option>
448
  <option value="6">Price</option>
449
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
450
  <option value="8">CDATA</option>
451
  </select>
452
  <i class="dashicons dashicons-editor-expand expandType"></i>
admin/partials/shopzilla/add-feed.php CHANGED
@@ -55,7 +55,7 @@
55
  <option value="4">htmlentities</option>
56
  <option value="5">Integer</option>
57
  <option value="6">Price</option>
58
- <option value="7">Remove Space</option>
59
  <option value="8">CDATA</option>
60
  </select>
61
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -104,7 +104,7 @@
104
  <option value="4">htmlentities</option>
105
  <option value="5">Integer</option>
106
  <option value="6">Price</option>
107
- <option value="7">Remove Space</option>
108
  <option value="8">CDATA</option>
109
  </select>
110
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -153,7 +153,7 @@
153
  <option value="4">htmlentities</option>
154
  <option value="5">Integer</option>
155
  <option value="6">Price</option>
156
- <option value="7">Remove Space</option>
157
  <option value="8">CDATA</option>
158
  </select>
159
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -202,7 +202,7 @@
202
  <option value="4">htmlentities</option>
203
  <option value="5">Integer</option>
204
  <option value="6">Price</option>
205
- <option value="7">Remove Space</option>
206
  <option value="8">CDATA</option>
207
  </select>
208
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -251,7 +251,7 @@
251
  <option value="4">htmlentities</option>
252
  <option value="5">Integer</option>
253
  <option value="6">Price</option>
254
- <option value="7">Remove Space</option>
255
  <option value="8">CDATA</option>
256
  </select>
257
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -300,7 +300,7 @@
300
  <option value="4">htmlentities</option>
301
  <option value="5">Integer</option>
302
  <option value="6">Price</option>
303
- <option value="7">Remove Space</option>
304
  <option value="8">CDATA</option>
305
  </select>
306
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -349,7 +349,7 @@
349
  <option value="4">htmlentities</option>
350
  <option value="5">Integer</option>
351
  <option value="6">Price</option>
352
- <option value="7">Remove Space</option>
353
  <option value="8">CDATA</option>
354
  </select>
355
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -398,7 +398,7 @@
398
  <option value="4">htmlentities</option>
399
  <option value="5">Integer</option>
400
  <option value="6">Price</option>
401
- <option value="7">Remove Space</option>
402
  <option value="8">CDATA</option>
403
  </select>
404
  <i class="dashicons dashicons-editor-expand expandType"></i>
@@ -447,7 +447,7 @@
447
  <option value="4">htmlentities</option>
448
  <option value="5">Integer</option>
449
  <option value="6">Price</option>
450
- <option value="7">Remove Space</option>
451
  <option value="8">CDATA</option>
452
  </select>
453
  <i class="dashicons dashicons-editor-expand expandType"></i>
55
  <option value="4">htmlentities</option>
56
  <option value="5">Integer</option>
57
  <option value="6">Price</option>
58
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
59
  <option value="8">CDATA</option>
60
  </select>
61
  <i class="dashicons dashicons-editor-expand expandType"></i>
104
  <option value="4">htmlentities</option>
105
  <option value="5">Integer</option>
106
  <option value="6">Price</option>
107
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
108
  <option value="8">CDATA</option>
109
  </select>
110
  <i class="dashicons dashicons-editor-expand expandType"></i>
153
  <option value="4">htmlentities</option>
154
  <option value="5">Integer</option>
155
  <option value="6">Price</option>
156
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
157
  <option value="8">CDATA</option>
158
  </select>
159
  <i class="dashicons dashicons-editor-expand expandType"></i>
202
  <option value="4">htmlentities</option>
203
  <option value="5">Integer</option>
204
  <option value="6">Price</option>
205
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
206
  <option value="8">CDATA</option>
207
  </select>
208
  <i class="dashicons dashicons-editor-expand expandType"></i>
251
  <option value="4">htmlentities</option>
252
  <option value="5">Integer</option>
253
  <option value="6">Price</option>
254
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
255
  <option value="8">CDATA</option>
256
  </select>
257
  <i class="dashicons dashicons-editor-expand expandType"></i>
300
  <option value="4">htmlentities</option>
301
  <option value="5">Integer</option>
302
  <option value="6">Price</option>
303
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
304
  <option value="8">CDATA</option>
305
  </select>
306
  <i class="dashicons dashicons-editor-expand expandType"></i>
349
  <option value="4">htmlentities</option>
350
  <option value="5">Integer</option>
351
  <option value="6">Price</option>
352
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
353
  <option value="8">CDATA</option>
354
  </select>
355
  <i class="dashicons dashicons-editor-expand expandType"></i>
398
  <option value="4">htmlentities</option>
399
  <option value="5">Integer</option>
400
  <option value="6">Price</option>
401
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
402
  <option value="8">CDATA</option>
403
  </select>
404
  <i class="dashicons dashicons-editor-expand expandType"></i>
447
  <option value="4">htmlentities</option>
448
  <option value="5">Integer</option>
449
  <option value="6">Price</option>
450
+ <option value="7">Remove Space</option><option value="10">Remove ShortCodes</option><option value="9">Remove Special Character</option>
451
  <option value="8">CDATA</option>
452
  </select>
453
  <i class="dashicons dashicons-editor-expand expandType"></i>
admin/partials/woo-feed-admin-display.php CHANGED
@@ -13,6 +13,7 @@
13
 
14
  $dropDown = new Woo_Feed_Dropdown();
15
  $product = new Woo_Feed_Products();
 
16
  ?>
17
 
18
  <div class="wrap" id="Feed">
@@ -20,13 +21,15 @@ $product = new Woo_Feed_Products();
20
  <table class="widefat fixed">
21
  <tbody>
22
  <tr>
23
- <td align="center"><b><a target="_blank"
24
- href="http://webappick.helpscoutdocs.com/article/17-woocommerce-product-feed">Help
25
- & Docs</a></b></td>
 
26
  <td align="center"><b><a style="color:#ee264a;" target="_blank"
27
  href="https://www.youtube.com/channel/UCzy3G9pA3yVgo0YZc-yJmfw">VIDEOS</a></b>
28
  </td>
29
- <td>Contact <b style="color:#2CC185;">support@webappick.com</b> for support.</td>
 
30
  </tr>
31
  </tbody>
32
  </table>
@@ -76,10 +79,10 @@ $product = new Woo_Feed_Products();
76
  <td><input name="itemWrapper" type="text" value="product" class="generalInput" required="required"/>
77
  </td>
78
  </tr>
79
- <tr class="itemWrapper" style="display: none;">
80
  <td><b><?php echo _e('Extra Header', 'woo-feed'); ?> </b></td>
81
  <td>
82
- <textarea name="extraHeader" id="" cols="30" rows="3"></textarea>
83
  </td>
84
  </tr>
85
  <tr class="wf_csvtxt" style="display: none;">
@@ -100,11 +103,12 @@ $product = new Woo_Feed_Products();
100
  <td>
101
  <select name="enclosure" id="enclosure" class="generalInput">
102
  <option value='double'>"</option>
103
- <option value=" ">None</option>
104
  <option value="single">'</option>
 
105
  </select>
106
  </td>
107
  </tr>
 
108
  </tbody>
109
  </table>
110
  <br/><br/>
13
 
14
  $dropDown = new Woo_Feed_Dropdown();
15
  $product = new Woo_Feed_Products();
16
+ $product->load_attributes();
17
  ?>
18
 
19
  <div class="wrap" id="Feed">
21
  <table class="widefat fixed">
22
  <tbody>
23
  <tr>
24
+ <td align="center"><b><a target="_blank" style="color:#e96656;"
25
+ href="https://webappick.com/plugin/woocommerce-product-feed-pro/">GET PREMIUM</a></b></td>
26
+ <td align="center"><b><a target="_blank" style="color:#0073aa;"
27
+ href="http://webappick.helpscoutdocs.com/article/17-woocommerce-product-feed">DOCUMENTATION</a></b></td>
28
  <td align="center"><b><a style="color:#ee264a;" target="_blank"
29
  href="https://www.youtube.com/channel/UCzy3G9pA3yVgo0YZc-yJmfw">VIDEOS</a></b>
30
  </td>
31
+ <td align="center"><b><a target="_blank" style="color:#0DD41E;"
32
+ href="https://webappick.com/support/">SUPPORT</a></b></td>
33
  </tr>
34
  </tbody>
35
  </table>
79
  <td><input name="itemWrapper" type="text" value="product" class="generalInput" required="required"/>
80
  </td>
81
  </tr>
82
+ <tr class="itemWrapper" >
83
  <td><b><?php echo _e('Extra Header', 'woo-feed'); ?> </b></td>
84
  <td>
85
+ <textarea name="extraHeader" id="" style="width: 100%" placeholder="Insert Extra Header value. Press enter at the end of each line." rows="3"></textarea>
86
  </td>
87
  </tr>
88
  <tr class="wf_csvtxt" style="display: none;">
103
  <td>
104
  <select name="enclosure" id="enclosure" class="generalInput">
105
  <option value='double'>"</option>
 
106
  <option value="single">'</option>
107
+ <option value=" ">None</option>
108
  </select>
109
  </td>
110
  </tr>
111
+
112
  </tbody>
113
  </table>
114
  <br/><br/>
admin/partials/woo-feed-edit-template.php CHANGED
@@ -13,6 +13,7 @@
13
 
14
  $dropDown = new Woo_Feed_Dropdown();
15
  $product = new Woo_Feed_Products();
 
16
  $AttributesDropdown = $feedRules['provider'] . "AttributesDropdown";
17
  //echo "<pre>";print_r($feedRules);
18
  ?>
@@ -86,11 +87,11 @@ $AttributesDropdown = $feedRules['provider'] . "AttributesDropdown";
86
  class="generalInput" required="required"/>
87
  </td>
88
  </tr>
89
- <tr class="itemWrapper" <?php echo ($feedRules['feedType'] != "xml") ? 'style="display: none;"' : ''; ?>>
90
  <td><b><?php echo _e('Extra Header', 'woo-feed'); ?> </b></td>
91
  <td>
92
- <textarea name="extraHeader" id="" cols="30"
93
- rows="3"><?php echo ($feedRules['feedType'] == "xml") && isset($feedRules['extraHeader']) ? sanitize_text_field($feedRules['extraHeader']) : ''; ?></textarea>
94
  </td>
95
  </tr>
96
  <tr class="wf_csvtxt" <?php echo ($feedRules['feedType'] == "xml") ? 'style="display: none;"' : ''; ?>>
@@ -240,6 +241,12 @@ $AttributesDropdown = $feedRules['provider'] . "AttributesDropdown";
240
  <option <?php echo (in_array('7', $outputType[$counter])) ? 'selected="selected"' : ''; ?>
241
  value="7">Remove Space
242
  </option>
 
 
 
 
 
 
243
  <option <?php echo (in_array('8', $outputType[$counter])) ? 'selected="selected"' : ''; ?>
244
  value="8">CDATA
245
  </option>
13
 
14
  $dropDown = new Woo_Feed_Dropdown();
15
  $product = new Woo_Feed_Products();
16
+ $product->load_attributes();
17
  $AttributesDropdown = $feedRules['provider'] . "AttributesDropdown";
18
  //echo "<pre>";print_r($feedRules);
19
  ?>
87
  class="generalInput" required="required"/>
88
  </td>
89
  </tr>
90
+ <tr class="itemWrapper" >
91
  <td><b><?php echo _e('Extra Header', 'woo-feed'); ?> </b></td>
92
  <td>
93
+ <textarea name="extraHeader" id="" style="width: 100%" placeholder="Insert Extra Header value. Press enter at the end of each line."
94
+ rows="3"><?php echo isset($feedRules['extraHeader']) ? $feedRules['extraHeader'] : ''; ?></textarea>
95
  </td>
96
  </tr>
97
  <tr class="wf_csvtxt" <?php echo ($feedRules['feedType'] == "xml") ? 'style="display: none;"' : ''; ?>>
241
  <option <?php echo (in_array('7', $outputType[$counter])) ? 'selected="selected"' : ''; ?>
242
  value="7">Remove Space
243
  </option>
244
+ <option <?php echo (in_array('10', $outputType[$counter])) ? 'selected="selected"' : ''; ?>
245
+ value="10">Remove ShortCodes
246
+ </option>
247
+ <option <?php echo (in_array('9', $outputType[$counter])) ? 'selected="selected"' : ''; ?>
248
+ value="9">Remove Special Character
249
+ </option>
250
  <option <?php echo (in_array('8', $outputType[$counter])) ? 'selected="selected"' : ''; ?>
251
  value="8">CDATA
252
  </option>
admin/partials/woo-feed-manage-list.php CHANGED
@@ -22,22 +22,30 @@ $myListTable = new Woo_Feed_Manage_list();
22
  <table class="widefat fixed">
23
  <tbody>
24
  <tr>
25
- <td align="center"><b><a target="_blank"
26
- href="http://webappick.helpscoutdocs.com/article/17-woocommerce-product-feed">Help
27
- & Docs</a></b></td>
 
28
  <td align="center"><b><a style="color:#ee264a;" target="_blank"
29
  href="https://www.youtube.com/channel/UCzy3G9pA3yVgo0YZc-yJmfw">VIDEOS</a></b>
30
  </td>
31
- <td>Contact <b style="color:#2CC185;">support@webappick.com</b> for support.</td>
 
32
  </tr>
33
  </tbody>
34
  </table>
35
  <br/>
36
  <?php
 
37
  if (isset($_GET['wpf_message']) && $_GET['wpf_message'] === 'success') {
38
  echo "<div class='updated'><p>" . __(get_option('wpf_message'), 'woo-feed') . "</p></div>";
39
  } elseif (isset($_GET['wpf_message']) && $_GET['wpf_message'] === 'error') {
40
- echo "<div class='error'><p>" . __(get_option('wpf_message'), 'woo-feed') . "</p></div>";
 
 
 
 
 
41
  }
42
  $myListTable->prepare_items();
43
  ?>
22
  <table class="widefat fixed">
23
  <tbody>
24
  <tr>
25
+ <td align="center"><b><a target="_blank" style="color:#e96656;"
26
+ href="https://webappick.com/plugin/woocommerce-product-feed-pro/">GET PREMIUM</a></b></td>
27
+ <td align="center"><b><a target="_blank" style="color:#0073aa;"
28
+ href="http://webappick.helpscoutdocs.com/article/17-woocommerce-product-feed">DOCUMENTATION</a></b></td>
29
  <td align="center"><b><a style="color:#ee264a;" target="_blank"
30
  href="https://www.youtube.com/channel/UCzy3G9pA3yVgo0YZc-yJmfw">VIDEOS</a></b>
31
  </td>
32
+ <td align="center"><b><a target="_blank" style="color:#0DD41E;"
33
+ href="https://webappick.com/support/">SUPPORT</a></b></td>
34
  </tr>
35
  </tbody>
36
  </table>
37
  <br/>
38
  <?php
39
+
40
  if (isset($_GET['wpf_message']) && $_GET['wpf_message'] === 'success') {
41
  echo "<div class='updated'><p>" . __(get_option('wpf_message'), 'woo-feed') . "</p></div>";
42
  } elseif (isset($_GET['wpf_message']) && $_GET['wpf_message'] === 'error') {
43
+ $dir=get_option("WPF_DIRECTORY_PERMISSION_CHECK");
44
+ if($dir && !empty($dir)){
45
+ echo "<div class='error'><p>" . __(get_option('wpf_message').$dir, 'woo-feed') . "</p></div>";
46
+ }else{
47
+ echo "<div class='error'><p>" . __(get_option('wpf_message'), 'woo-feed') . "</p></div>";
48
+ }
49
  }
50
  $myListTable->prepare_items();
51
  ?>
admin/partials/woo-feed-pro-vs-free.php ADDED
@@ -0,0 +1,151 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Premium vs Free version
4
+ *
5
+ * @link https://webappick.com/
6
+ * @since 1.0.0
7
+ *
8
+ * @package Woo_Feed
9
+ * @subpackage Woo_Feed/admin/partial
10
+ * @author Ohidul Islam <wahid@webappick.com>
11
+ */
12
+ ?>
13
+ <div class="wrap">
14
+ <h2><?php echo _e('Pro vs Free', 'woo-feed'); ?></h2>
15
+ <table class="widefat fixed" >
16
+ <thead>
17
+ <tr>
18
+ <th><h3>Features</h3></th>
19
+ <th style="width: 30%;text-align: center;"><h3>Free</h3></th>
20
+ <th style="width: 30%;text-align: center;"><h3>Premium</h3></th>
21
+ </tr>
22
+ </thead>
23
+ <tbody>
24
+ <tr>
25
+ <td><b>Export Product Variations</b></td>
26
+ <td style="text-align: center;"><b><span style="font-size: 25px;color: green;" class="dashicons dashicons-yes"></span></b></td>
27
+ <td style="text-align: center;"><b><span style="font-size: 25px;color: green;" class="dashicons dashicons-yes"></span></b></td>
28
+ </tr>
29
+ <tr>
30
+ <td><b>Custom Feed Template</b></td>
31
+ <td style="text-align: center;"><b><span style="font-size: 25px;color: green;" class="dashicons dashicons-yes"></span></b></td>
32
+ <td style="text-align: center;"><b><span style="font-size: 25px;color: green;" class="dashicons dashicons-yes"></span></b></td>
33
+ </tr>
34
+ <tr>
35
+ <td><b>Support All Comparison Shopping Engines</b></td>
36
+ <td style="text-align: center;"><b><span style="font-size: 25px;color: green;" class="dashicons dashicons-yes"></span></b></td>
37
+ <td style="text-align: center;"><b><span style="font-size: 25px;color: green;" class="dashicons dashicons-yes"></span></b></td>
38
+ </tr>
39
+ <tr>
40
+ <td><b>Support All Affiliate Networks</b></td>
41
+ <td style="text-align: center;"><b><span style="font-size: 25px;color: green;" class="dashicons dashicons-yes"></span></b></td>
42
+ <td style="text-align: center;"><b><span style="font-size: 25px;color: green;" class="dashicons dashicons-yes"></span></b></td>
43
+ </tr>
44
+ <tr>
45
+ <td><b>Auto Feed Update</b></td>
46
+ <td style="text-align: center;"><b><span style="font-size: 25px;color: green;" class="dashicons dashicons-yes"></span></b></td>
47
+ <td style="text-align: center;"><b><span style="font-size: 25px;color: green;" class="dashicons dashicons-yes"></span></b></td>
48
+ </tr>
49
+ <tr>
50
+ <td><b>Product Attributes</b></td>
51
+ <td style="text-align: center;"><b><span style="font-size: 25px;color: green;" class="dashicons dashicons-yes"></span></b></td>
52
+ <td style="text-align: center;"><b><span style="font-size: 25px;color: green;" class="dashicons dashicons-yes"></span></b></td>
53
+ </tr>
54
+ <tr>
55
+ <td><b>Unlimited Feed</b></td>
56
+ <td style="text-align: center;"><b><span style="font-size: 25px;color: green;" class="dashicons dashicons-yes"></span></b></td>
57
+ <td style="text-align: center;"><b><span style="font-size: 25px;color: green;" class="dashicons dashicons-yes"></span></b></td>
58
+ </tr>
59
+ <tr>
60
+ <td><b>CSV, TXT and XML Feed</b></td>
61
+ <td style="text-align: center;"><b><span style="font-size: 25px;color: green;" class="dashicons dashicons-yes"></span></b></td>
62
+ <td style="text-align: center;"><b><span style="font-size: 25px;color: green;" class="dashicons dashicons-yes"></span></b></td>
63
+ </tr>
64
+ <tr>
65
+ <td><b>Pre Configured Feed Template</b></td>
66
+ <td style="text-align: center;"><b><span style="font-size: 25px;color: green;" class="dashicons dashicons-yes"></span></b></td>
67
+ <td style="text-align: center;"><b><span style="font-size: 25px;color: green;" class="dashicons dashicons-yes"></span></b></td>
68
+ </tr>
69
+ <tr>
70
+ <td><b>Variations & Custom Attribute Value</b></td>
71
+ <td style="text-align: center;"><b><span style="font-size: 25px;color: green;" class="dashicons dashicons-yes"></span></b></td>
72
+ <td style="text-align: center;"><b><span style="font-size: 25px;color: green;" class="dashicons dashicons-yes"></span></b></td>
73
+ </tr>
74
+ <tr>
75
+ <td><b>Upload Feed via FTP</b></td>
76
+ <td style="text-align: center;"><b><span style="font-size: 25px;color: green;" class="dashicons dashicons-yes"></span></b></td>
77
+ <td style="text-align: center;"><b><span style="font-size: 25px;color: green;" class="dashicons dashicons-yes"></span></b></td>
78
+ </tr>
79
+ <tr>
80
+ <td><b>Product Taxonomy value</b></td>
81
+ <td style="text-align: center;"><b><span style="font-size: 25px;color:red;" class="dashicons dashicons-no"></span></b></td>
82
+ <td style="text-align: center;"><b><span style="font-size: 25px;color: green;" class="dashicons dashicons-yes"></span></b></td>
83
+ </tr>
84
+ <tr>
85
+ <td><b>Unlimited Products</b></td>
86
+ <td style="text-align: center;"><b><span style="font-size: 25px;color:red;" class="dashicons dashicons-no"></span></b></td>
87
+ <td style="text-align: center;"><b><span style="font-size: 25px;color: green;" class="dashicons dashicons-yes"></span></b></td>
88
+ </tr>
89
+ <tr>
90
+ <td><b>Feed By Category</b></td>
91
+ <td style="text-align: center;"><b><span style="font-size: 25px;color:red;" class="dashicons dashicons-no"></span></b></td>
92
+ <td style="text-align: center;"><b><span style="font-size: 25px;color: green;" class="dashicons dashicons-yes"></span></b></td>
93
+ </tr>
94
+ <tr>
95
+ <td><b>Customized Product Title</b></td>
96
+ <td style="text-align: center;"><b><span style="font-size: 25px;color:red;" class="dashicons dashicons-no"></span></b></td>
97
+ <td style="text-align: center;"><b><span style="font-size: 25px;color: green;" class="dashicons dashicons-yes"></span></b></td>
98
+ </tr>
99
+ <tr>
100
+ <td><b>Remove Variation Products</b></td>
101
+ <td style="text-align: center;"><b><span style="font-size: 25px;color:red;" class="dashicons dashicons-no"></span></b></td>
102
+ <td style="text-align: center;"><b><span style="font-size: 25px;color: green;" class="dashicons dashicons-yes"></span></b></td>
103
+ </tr>
104
+ <tr>
105
+ <td><b>Remove Parent Products</b></td>
106
+ <td style="text-align: center;"><b><span style="font-size: 25px;color:red;" class="dashicons dashicons-no"></span></b></td>
107
+ <td style="text-align: center;"><b><span style="font-size: 25px;color: green;" class="dashicons dashicons-yes"></span></b></td>
108
+ </tr>
109
+ <tr>
110
+ <td><b>Category Mapping</b></td>
111
+ <td style="text-align: center;"><b><span style="font-size: 25px;color:red;" class="dashicons dashicons-no"></span></b></td>
112
+ <td style="text-align: center;"><b><span style="font-size: 25px;color: green;" class="dashicons dashicons-yes"></span></b></td>
113
+ </tr>
114
+ <tr>
115
+ <td><b>Dynamic Attributes</b></td>
116
+ <td style="text-align: center;"><b><span style="font-size: 25px;color:red;" class="dashicons dashicons-no"></span></b></td>
117
+ <td style="text-align: center;"><b><span style="font-size: 25px;color: green;" class="dashicons dashicons-yes"></span></b></td>
118
+ </tr>
119
+ <tr>
120
+ <td><b>Price With Tax</b></td>
121
+ <td style="text-align: center;"><b><span style="font-size: 25px;color:red;" class="dashicons dashicons-no"></span></b></td>
122
+ <td style="text-align: center;"><b><span style="font-size: 25px;color: green;" class="dashicons dashicons-yes"></span></b></td>
123
+ </tr>
124
+ <tr>
125
+ <td><b>Conditional Pricing</b></td>
126
+ <td style="text-align: center;"><b><span style="font-size: 25px;color:red;" class="dashicons dashicons-no"></span></b></td>
127
+ <td style="text-align: center;"><b><span style="font-size: 25px;color: green;" class="dashicons dashicons-yes"></span></b></td>
128
+ </tr>
129
+ <tr>
130
+ <td><b>WP Post Meta Value</b></td>
131
+ <td style="text-align: center;"><b><span style="font-size: 25px;color:red;" class="dashicons dashicons-no"></span></b></td>
132
+ <td style="text-align: center;"><b><span style="font-size: 25px;color: green;" class="dashicons dashicons-yes"></span></b></td>
133
+ </tr>
134
+ <tr>
135
+ <td><b>WP Options Value</b></td>
136
+ <td style="text-align: center;"><b><span style="font-size: 25px;color:red;" class="dashicons dashicons-no"></span></b></td>
137
+ <td style="text-align: center;"><b><span style="font-size: 25px;color: green;" class="dashicons dashicons-yes"></span></b></td>
138
+ </tr>
139
+ <tr>
140
+ <td><b>Product Filtering</b></td>
141
+ <td style="text-align: center;"><b><span style="font-size: 25px;color:red;" class="dashicons dashicons-no"></span></b></td>
142
+ <td style="text-align: center;"><b><span style="font-size: 25px;color: green;" class="dashicons dashicons-yes"></span></b></td>
143
+ </tr>
144
+ <tr>
145
+ <td></td>
146
+ <td></td>
147
+ <td style="text-align: center;"><a href="https://webappick.com/plugin/woocommerce-product-feed-pro/" target="_blank"><button class="button button-primary">Buy Now</button></a></td>
148
+ </tr>
149
+ </tbody>
150
+ </table>
151
+ </div>
includes/class-woo-feed.php CHANGED
@@ -174,6 +174,12 @@ class Woo_Feed
174
 
175
  require_once plugin_dir_path(dirname(__FILE__)) . 'includes/classes/class-woo-feed-list-table.php';
176
 
 
 
 
 
 
 
177
  /**
178
  * The class responsible for making feed list
179
  */
174
 
175
  require_once plugin_dir_path(dirname(__FILE__)) . 'includes/classes/class-woo-feed-list-table.php';
176
 
177
+ /**
178
+ * The class responsible for making list table
179
+ */
180
+
181
+ require_once plugin_dir_path(dirname(__FILE__)) . 'includes/classes/class-woo-feed-error-message.php';
182
+
183
  /**
184
  * The class responsible for making feed list
185
  */
includes/classes/class-woo-feed-default-attributes.php CHANGED
@@ -33,7 +33,7 @@ class Woo_Feed_Default_Attributes
33
 
34
  "--2" => "Feed Template",
35
  "google" =>"Google Shopping",
36
- "adword" =>"Google Adwords",
37
  "facebook" =>"Facebook",
38
  "amazon" =>"Amazon",
39
  "shopping" =>"eBay (shopping.com)",
@@ -188,6 +188,7 @@ class Woo_Feed_Default_Attributes
188
  "--5" => "Tax & Shipping",
189
  "tax" => "Tax[tax]",
190
  "shipping_country" => "Shipping Country",
 
191
  "shipping_service" => "Shipping Service",
192
  "shipping_price" => "Shipping Price",
193
  "weight" => "Shipping Weight[shipping_weight]",
33
 
34
  "--2" => "Feed Template",
35
  "google" =>"Google Shopping",
36
+ "adwords" =>"Google Adwords",
37
  "facebook" =>"Facebook",
38
  "amazon" =>"Amazon",
39
  "shopping" =>"eBay (shopping.com)",
188
  "--5" => "Tax & Shipping",
189
  "tax" => "Tax[tax]",
190
  "shipping_country" => "Shipping Country",
191
+ "shipping_region" => "Shipping Region",
192
  "shipping_service" => "Shipping Service",
193
  "shipping_price" => "Shipping Price",
194
  "weight" => "Shipping Weight[shipping_weight]",
includes/classes/class-woo-feed-engine.php CHANGED
@@ -52,9 +52,26 @@ class WF_Engine
52
  {
53
  $this->rules = $rules;
54
  $this->storeProducts = $Products;
55
- $productClass = new Woo_Feed_Products();
56
  }
57
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58
 
59
  /**
60
  * Configure the feed according to the rules
@@ -75,9 +92,6 @@ class WF_Engine
75
 
76
  $wf_attr = array();
77
  $wf_cattr = array();
78
- $wf_taxo = array();
79
- $wf_dattribute = array();
80
- $wf_cmapping = array();
81
 
82
  # Map Merchant Attributes and Woo Attributes
83
  $countAttr = 0;
@@ -163,22 +177,29 @@ class WF_Engine
163
  if (array_key_exists($rules['value'], $value)) {
164
  $output = $value[$rules['value']];
165
  if (!empty($output)) {
166
- foreach ($rules['type'] as $key22 => $value22) {
167
- # Format Output According to output type
168
- if ($value22 == 2) { # Strip Tags
169
- $output = strip_tags(html_entity_decode($output));
170
- } elseif ($value22 == 3) { # UTF-8 Encode
171
- $output = utf8_encode($output);
172
- } elseif ($value22 == 4) { # htmlentities
173
- $output = htmlentities($output, ENT_QUOTES, 'UTF-8');
174
- } elseif ($value22 == 5) { # Integer
175
- $output = absint($output);
176
- } elseif ($value22 == 6) { # Price
177
- $output = number_format($output, 2, '.', '');
178
- } elseif ($value22 == 7) { # Delete Space
179
- $output = trim($output);
180
- } elseif ($value22 == 8) { # CDATA
181
- $output = '<![CDATA[' . $output . ']]>';
 
 
 
 
 
 
 
182
  }
183
  }
184
 
@@ -210,21 +231,28 @@ class WF_Engine
210
  $output = str_replace("wf_pattern_", "", $rules['value']);
211
  if (!empty($output)) {
212
  # Format Output According to output type
213
- foreach ($rules['type'] as $key22 => $value22) {
214
- if ($value22 == 2) { # Strip Tags
215
- $output = strip_tags(html_entity_decode($output));
216
- } elseif ($value22 == 3) { # UTF-8 Encode
217
- $output = utf8_encode($output);
218
- } elseif ($value22 == 4) { # htmlentities
219
- $output = htmlentities($output, ENT_QUOTES, 'UTF-8');
220
- } elseif ($value22 == 5) { # Integer
221
- $output = absint($output);
222
- } elseif ($value22 == 6) { # Price
223
- $output = number_format($output, 2, '.', '');
224
- } elseif ($value22 == 7) { # Delete Space
225
- $output = trim($output);
226
- } elseif ($value22 == 8) { # CDATA
227
- $output = '<![CDATA[' . $output . ']]>';
 
 
 
 
 
 
 
228
  }
229
  }
230
 
@@ -240,10 +268,18 @@ class WF_Engine
240
  # Prefix and Suffix Assign
241
  if (strpos($output, "<![CDATA[") !== false) {
242
  $output = str_replace(array("<![CDATA[", "]]>"), array("", ""), $output);
243
- $output = $rules['prefix'] . $output . " " . $rules['suffix'];
 
 
 
 
244
  $output = '<![CDATA[' . $output . ']]>';
245
  } else {
246
- $output = $rules['prefix'] . " " . $output . " " . $rules['suffix'];
 
 
 
 
247
  }
248
  }
249
  $attr = trim($attr);
@@ -339,6 +375,49 @@ class WF_Engine
339
  return $footer;
340
  }
341
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
342
 
343
  /**
344
  * Responsible to make TXT feed
@@ -369,12 +448,19 @@ class WF_Engine
369
 
370
 
371
  if (count($this->storeProducts)) {
 
 
 
 
 
 
 
372
  $headers = array_keys($this->storeProducts[0]);
373
  $feed[] = $headers;
374
  foreach ($this->storeProducts as $no => $product) {
375
  $row = array();
376
  foreach ($headers as $key => $header) {
377
- $row[] = isset($product[$header]) ? $product[$header] : "";
378
  }
379
  $feed[] = $row;
380
  }
@@ -396,16 +482,23 @@ class WF_Engine
396
  public function get_csv_feed()
397
  {
398
  if (count($this->storeProducts)) {
 
 
 
 
 
 
 
 
399
  $headers = array_keys($this->storeProducts[0]);
400
  $feed[] = $headers;
401
  foreach ($this->storeProducts as $no => $product) {
402
  $row = array();
403
  foreach ($headers as $key => $header) {
404
- $row[] = isset($product[$header]) ? $product[$header] : "";;
405
  }
406
  $feed[] = $row;
407
  }
408
-
409
  return $feed;
410
  }
411
  return false;
52
  {
53
  $this->rules = $rules;
54
  $this->storeProducts = $Products;
 
55
  }
56
 
57
+ public function stripInvalidXml($value) {
58
+ $ret = "";
59
+ $current="";
60
+ if (empty($value)) {
61
+ return $ret;
62
+ }
63
+ $length = strlen($value);
64
+ for ($i=0; $i < $length; $i++) {
65
+ $current = ord($value{$i});
66
+ if (($current == 0x9) || ($current == 0xA) || ($current == 0xD) || (($current >= 0x20) && ($current <= 0xD7FF)) || (($current >= 0xE000) && ($current <= 0xFFFD)) || (($current >= 0x10000) && ($current <= 0x10FFFF))) {
67
+ $ret .= chr($current);
68
+ }
69
+ else {
70
+ $ret .= "";
71
+ }
72
+ }
73
+ return $ret;
74
+ }
75
 
76
  /**
77
  * Configure the feed according to the rules
92
 
93
  $wf_attr = array();
94
  $wf_cattr = array();
 
 
 
95
 
96
  # Map Merchant Attributes and Woo Attributes
97
  $countAttr = 0;
177
  if (array_key_exists($rules['value'], $value)) {
178
  $output = $value[$rules['value']];
179
  if (!empty($output)) {
180
+ if(count($rules['type'])){
181
+ foreach ($rules['type'] as $key22 => $value22) {
182
+ # Format Output According to output type
183
+ if ($value22 == 2) { # Strip Tags
184
+ $output = strip_tags(html_entity_decode($output));
185
+ } elseif ($value22 == 3) { # UTF-8 Encode
186
+ $output = utf8_encode($output);
187
+ } elseif ($value22 == 4) { # htmlentities
188
+ $output = htmlentities($output, ENT_QUOTES, 'UTF-8');
189
+ } elseif ($value22 == 5) { # Integer
190
+ $output = absint($output);
191
+ } elseif ($value22 == 6) { # Price
192
+ $output = number_format($output, 2, '.', '');
193
+ } elseif ($value22 == 7) { # Delete Space
194
+ $output = trim($output);
195
+ } elseif ($value22 == 8) { # CDATA
196
+ $output = '<![CDATA[' . $output . ']]>';
197
+ }elseif ($value22 == 9) {
198
+ $output=$this->stripInvalidXml($output);
199
+ //$output = preg_replace( '/[^[:print:]]/',' ',$output);
200
+ }else if($value22 == 10){
201
+ $output=preg_replace("/\[[^]]+\]/","",$output);
202
+ }
203
  }
204
  }
205
 
231
  $output = str_replace("wf_pattern_", "", $rules['value']);
232
  if (!empty($output)) {
233
  # Format Output According to output type
234
+ if(count($rules['type'])){
235
+ foreach ($rules['type'] as $key22 => $value22) {
236
+ if ($value22 == 2) { # Strip Tags
237
+ $output = strip_tags(html_entity_decode($output));
238
+ } elseif ($value22 == 3) { # UTF-8 Encode
239
+ $output = utf8_encode($output);
240
+ } elseif ($value22 == 4) { # htmlentities
241
+ $output = htmlentities($output, ENT_QUOTES, 'UTF-8');
242
+ } elseif ($value22 == 5) { # Integer
243
+ $output = absint($output);
244
+ } elseif ($value22 == 6) { # Price
245
+ $output = number_format($output, 2, '.', '');
246
+ } elseif ($value22 == 7) { # Delete Space
247
+ $output = trim($output);
248
+ } elseif ($value22 == 8) { # CDATA
249
+ $output = '<![CDATA[' . $output . ']]>';
250
+ }elseif ($value22 == 9) {
251
+ $output=$this->stripInvalidXml($output);
252
+ //$output = preg_replace( '/[^[:print:]]/',' ',$output);
253
+ }else if($value22 == 10){
254
+ $output=preg_replace("/\[[^]]+\]/","",$output);
255
+ }
256
  }
257
  }
258
 
268
  # Prefix and Suffix Assign
269
  if (strpos($output, "<![CDATA[") !== false) {
270
  $output = str_replace(array("<![CDATA[", "]]>"), array("", ""), $output);
271
+ if(substr($output, 0, 4 ) === "http"){
272
+ $output = $rules['prefix'] . " " . $output.$rules['suffix'];
273
+ }else{
274
+ $output = $rules['prefix'] . " " . $output . " " . $rules['suffix'];
275
+ }
276
  $output = '<![CDATA[' . $output . ']]>';
277
  } else {
278
+ if(substr($output, 0, 4 ) === "http"){
279
+ $output = $rules['prefix'] . " " . $output.$rules['suffix'];
280
+ }else{
281
+ $output = $rules['prefix'] . " " . $output . " " . $rules['suffix'];
282
+ }
283
  }
284
  }
285
  $attr = trim($attr);
375
  return $footer;
376
  }
377
 
378
+ /**
379
+ * Process string for CSV
380
+ * @param $string
381
+ * @return mixed|string
382
+ */
383
+ public function processStringForCSV($string){
384
+ if(!empty($string)){
385
+ $string = str_replace( "\n", ' ', $string );
386
+ $string = str_replace( "\r", ' ', $string );
387
+ $string =trim($string);
388
+ return $string;
389
+ }else{
390
+ return "";
391
+ }
392
+ }
393
+
394
+ /**
395
+ * Process string for TXT
396
+ * @param $string
397
+ * @return mixed|string
398
+ */
399
+ public function processStringForTXT($string){
400
+ if(!empty($string)){
401
+ $string = html_entity_decode( $string, ENT_HTML401 | ENT_QUOTES ); // Convert any HTML entities
402
+ $string = iconv(
403
+ 'UTF-8',
404
+ 'ASCII//TRANSLIT',
405
+ $string
406
+ );
407
+
408
+ if (stristr( $string,'"' ) ) {
409
+ $string = str_replace( '"', '""', $string );
410
+ }
411
+ $string = str_replace( "\n", ' ', $string );
412
+ $string = str_replace( "\r", ' ', $string );
413
+ $string = trim($string);
414
+
415
+ return $string;
416
+ }else{
417
+ return "";
418
+ }
419
+ }
420
+
421
 
422
  /**
423
  * Responsible to make TXT feed
448
 
449
 
450
  if (count($this->storeProducts)) {
451
+ if(!empty($this->rules['extraHeader'])){
452
+ $headers=explode("\n",$this->rules['extraHeader']);
453
+ foreach($headers as $header){
454
+ $header =trim(preg_replace('/\s+/', ' ', $header));
455
+ $feed[]=explode(',',$header);
456
+ }
457
+ }
458
  $headers = array_keys($this->storeProducts[0]);
459
  $feed[] = $headers;
460
  foreach ($this->storeProducts as $no => $product) {
461
  $row = array();
462
  foreach ($headers as $key => $header) {
463
+ $row[] = isset($product[$header]) ? $this->processStringForTXT($product[$header]):"";
464
  }
465
  $feed[] = $row;
466
  }
482
  public function get_csv_feed()
483
  {
484
  if (count($this->storeProducts)) {
485
+ if(!empty($this->rules['extraHeader'])){
486
+ $headers=explode("\n",$this->rules['extraHeader']);
487
+ foreach($headers as $header){
488
+ $header =trim(preg_replace('/\s+/', ' ', $header));
489
+ if(!empty($header))
490
+ $feed[]=explode(',',$header);
491
+ }
492
+ }
493
  $headers = array_keys($this->storeProducts[0]);
494
  $feed[] = $headers;
495
  foreach ($this->storeProducts as $no => $product) {
496
  $row = array();
497
  foreach ($headers as $key => $header) {
498
+ $row[] = isset($product[$header])?$this->processStringForCSV($product[$header]): "";;
499
  }
500
  $feed[] = $row;
501
  }
 
502
  return $feed;
503
  }
504
  return false;
includes/classes/class-woo-feed-error-message.php ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * The file that defines the error messages
4
+ *
5
+ * @link https://webappick.com/
6
+ * @since 1.0.0
7
+ *
8
+ * @package Woo_Feed
9
+ * @subpackage Woo_Feed/includes
10
+ * @author Ohidul Islam <wahid@webappick.com>
11
+ */
12
+
13
+ class Woo_Feed_Errors
14
+ {
15
+ public $SaveFile=array();
16
+
17
+ public function set_saveFileError($message){
18
+ return $this->SaveFile[]=$message;
19
+ }
20
+ }
includes/classes/class-woo-feed-products.php CHANGED
@@ -64,11 +64,6 @@ class Woo_Feed_Products
64
  */
65
  public $attributeList;
66
 
67
- public function __construct()
68
- {
69
- $this->load_attributes();
70
- }
71
-
72
  /**
73
  * Get WooCommerce Products
74
  * @return array
@@ -80,30 +75,36 @@ class Woo_Feed_Products
80
  array(
81
  'post_type' => array('product', 'product_variation'),
82
  'post_status' => 'publish',
83
- 'posts_per_page' => -1,
84
  )
85
  );
 
86
  $i = 0;
 
87
  while ($loop->have_posts()) : $loop->the_post();
88
 
89
  $this->childID = get_the_ID();
90
  $this->parentID = wp_get_post_parent_id($this->childID);
91
 
92
  global $product;
 
 
 
 
93
  $type1 = "";
94
- if ($product->is_type('simple')) {
95
  # No variations to product
96
  $type1 = "simple";
97
- } elseif ($product->is_type('variable')) {
98
  # Product has variations
99
  $type1 = "variable";
100
- } elseif ($product->is_type('grouped')) {
101
  $type1 = "grouped";
102
- } elseif ($product->is_type('external')) {
103
  $type1 = "external";
104
- } elseif ($product->is_downloadable()) {
105
  $type1 = "downloadable";
106
- } elseif ($product->is_virtual()) {
107
  $type1 = "virtual";
108
  }
109
 
@@ -201,7 +202,7 @@ class Woo_Feed_Products
201
  $this->productsList[$i]['id'] = $product->id;
202
  $this->productsList[$i]['variation_type'] = "simple";
203
  $this->productsList[$i]['title'] = $product->get_title();
204
- $this->productsList[$i]['description'] = $post->post_content;
205
 
206
  $this->productsList[$i]['short_description'] = $post->post_excerpt;
207
  $this->productsList[$i]['product_type'] = $this->get_product_term_list($post->ID, 'product_cat', "", ">");// $this->categories($this->parentID);//TODO
@@ -269,7 +270,7 @@ class Woo_Feed_Products
269
  $this->productsList[$i]['id'] = $product->id;
270
  $this->productsList[$i]['variation_type'] = "parent";
271
  $this->productsList[$i]['title'] = $product->get_title();
272
- $this->productsList[$i]['description'] = $post->post_content;
273
 
274
  $this->productsList[$i]['short_description'] = $post->post_excerpt;
275
  $this->productsList[$i]['product_type'] = $this->get_product_term_list($post->ID, 'product_cat', "", ">");// $this->categories($this->parentID);//TODO
@@ -356,6 +357,7 @@ class Woo_Feed_Products
356
  return $url;
357
  }
358
 
 
359
  /**
360
  * Get formatted product date
361
  *
@@ -418,7 +420,7 @@ class Woo_Feed_Products
418
  foreach ($terms as $term) {
419
  $links[] = $term->name;
420
  }
421
-
422
  return $before . join($sep, $links) . $after;
423
  }
424
 
@@ -473,7 +475,15 @@ class Woo_Feed_Products
473
  */
474
  public function getAttributeValue($id, $name)
475
  {
476
- return get_post_meta($id, $name, true);
 
 
 
 
 
 
 
 
477
  }
478
 
479
  /**
64
  */
65
  public $attributeList;
66
 
 
 
 
 
 
67
  /**
68
  * Get WooCommerce Products
69
  * @return array
75
  array(
76
  'post_type' => array('product', 'product_variation'),
77
  'post_status' => 'publish',
78
+ 'posts_per_page' =>2000,
79
  )
80
  );
81
+
82
  $i = 0;
83
+
84
  while ($loop->have_posts()) : $loop->the_post();
85
 
86
  $this->childID = get_the_ID();
87
  $this->parentID = wp_get_post_parent_id($this->childID);
88
 
89
  global $product;
90
+ if(!is_object($product)){
91
+ continue;
92
+ }
93
+
94
  $type1 = "";
95
+ if (is_object($product) && $product->is_type('simple')) {
96
  # No variations to product
97
  $type1 = "simple";
98
+ } elseif (is_object($product) && $product->is_type('variable')) {
99
  # Product has variations
100
  $type1 = "variable";
101
+ } elseif (is_object($product) && $product->is_type('grouped')) {
102
  $type1 = "grouped";
103
+ } elseif (is_object($product) && $product->is_type('external')) {
104
  $type1 = "external";
105
+ } elseif (is_object($product) && $product->is_downloadable()) {
106
  $type1 = "downloadable";
107
+ } elseif (is_object($product) && $product->is_virtual()) {
108
  $type1 = "virtual";
109
  }
110
 
202
  $this->productsList[$i]['id'] = $product->id;
203
  $this->productsList[$i]['variation_type'] = "simple";
204
  $this->productsList[$i]['title'] = $product->get_title();
205
+ $this->productsList[$i]['description'] =$post->post_content;
206
 
207
  $this->productsList[$i]['short_description'] = $post->post_excerpt;
208
  $this->productsList[$i]['product_type'] = $this->get_product_term_list($post->ID, 'product_cat', "", ">");// $this->categories($this->parentID);//TODO
270
  $this->productsList[$i]['id'] = $product->id;
271
  $this->productsList[$i]['variation_type'] = "parent";
272
  $this->productsList[$i]['title'] = $product->get_title();
273
+ $this->productsList[$i]['description'] =$post->post_content;
274
 
275
  $this->productsList[$i]['short_description'] = $post->post_excerpt;
276
  $this->productsList[$i]['product_type'] = $this->get_product_term_list($post->ID, 'product_cat', "", ">");// $this->categories($this->parentID);//TODO
357
  return $url;
358
  }
359
 
360
+
361
  /**
362
  * Get formatted product date
363
  *
420
  foreach ($terms as $term) {
421
  $links[] = $term->name;
422
  }
423
+ ksort($links);
424
  return $before . join($sep, $links) . $after;
425
  }
426
 
475
  */
476
  public function getAttributeValue($id, $name)
477
  {
478
+ if (strpos($name, 'attribute_pa') !== false) {
479
+ $taxonomy = str_replace("attribute_","",$name);
480
+ $meta = get_post_meta($id,$name, true);
481
+ $term = get_term_by('slug', $meta, $taxonomy);
482
+ return $term->name;
483
+ }else{
484
+ return get_post_meta($id, $name, true);
485
+ }
486
+
487
  }
488
 
489
  /**
includes/classes/class-woo-feed-savefile.php CHANGED
@@ -25,6 +25,9 @@ class Woo_Feed_Savefile
25
  return true;
26
  }
27
 
 
 
 
28
  /**
29
  * Save CSV Feed file
30
  *
@@ -42,7 +45,7 @@ class Woo_Feed_Savefile
42
  if ($info['delimiter'] == 'tab') {
43
  $delimiter = "\t";
44
  } else {
45
- $delimiter = $info['delimiter'];
46
  }
47
 
48
  if (!empty($info['enclosure'])) {
@@ -55,18 +58,22 @@ class Woo_Feed_Savefile
55
  if (count($content)) {
56
  foreach ($content as $fields) {
57
  if ($enclosure == "double")
58
- fputcsv($fp, $fields, $delimiter, chr(34));
59
  else if ($enclosure == "single")
60
- fputcsv($fp, $fields, $delimiter, chr(39));
61
  else{
62
- fputs($fp, implode($fields,$delimiter)."\n");
63
  }
64
  }
65
  }
66
 
67
  fclose($fp);
 
68
  return true;
69
  } else {
 
 
 
70
  return false;
71
  }
72
  }
@@ -85,9 +92,13 @@ class Woo_Feed_Savefile
85
  $fp = fopen($file, "wb");
86
  fwrite($fp, $content);
87
  fclose($fp);
 
88
  return true;
89
  } else {
 
 
 
90
  return false;
91
  }
92
  }
93
- }
25
  return true;
26
  }
27
 
28
+
29
+
30
+
31
  /**
32
  * Save CSV Feed file
33
  *
45
  if ($info['delimiter'] == 'tab') {
46
  $delimiter = "\t";
47
  } else {
48
+ $delimiter = !empty($info['delimiter'])?trim($info['delimiter']):$info['delimiter'];
49
  }
50
 
51
  if (!empty($info['enclosure'])) {
58
  if (count($content)) {
59
  foreach ($content as $fields) {
60
  if ($enclosure == "double")
61
+ fputcsv($fp,$fields,$delimiter,chr(34));
62
  else if ($enclosure == "single")
63
+ fputcsv($fp,$fields,$delimiter,chr(39));
64
  else{
65
+ fputs($fp,implode($fields,$delimiter)."\n");
66
  }
67
  }
68
  }
69
 
70
  fclose($fp);
71
+ update_option("WPF_DIRECTORY_PERMISSION_CHECK","");
72
  return true;
73
  } else {
74
+ $upload_dir = wp_upload_dir();
75
+ $user_dirname = $upload_dir['basedir'];
76
+ update_option("WPF_DIRECTORY_PERMISSION_CHECK"," <b>Directory $user_dirname is not writable</b>");
77
  return false;
78
  }
79
  }
92
  $fp = fopen($file, "wb");
93
  fwrite($fp, $content);
94
  fclose($fp);
95
+ update_option("WPF_DIRECTORY_PERMISSION_CHECK","");
96
  return true;
97
  } else {
98
+ $upload_dir = wp_upload_dir();
99
+ $user_dirname = $upload_dir['basedir'];
100
+ update_option("WPF_DIRECTORY_PERMISSION_CHECK"," <b>Directory $user_dirname is not writable</b>");
101
  return false;
102
  }
103
  }
104
+ }
includes/classes/class-wp-screen.php DELETED
@@ -1,1253 +0,0 @@
1
- <?php
2
- /**
3
- * Screen API: WP_Screen class
4
- *
5
- * @package WordPress
6
- * @subpackage Administration
7
- * @since 4.4.0
8
- */
9
-
10
- /**
11
- * Core class used to implement an admin screen API.
12
- *
13
- * @since 3.3.0
14
- */
15
- final class WP_Screen {
16
- /**
17
- * Any action associated with the screen. 'add' for *-add.php and *-new.php screens. Empty otherwise.
18
- *
19
- * @since 3.3.0
20
- * @var string
21
- * @access public
22
- */
23
- public $action;
24
-
25
- /**
26
- * The base type of the screen. This is typically the same as $id but with any post types and taxonomies stripped.
27
- * For example, for an $id of 'edit-post' the base is 'edit'.
28
- *
29
- * @since 3.3.0
30
- * @var string
31
- * @access public
32
- */
33
- public $base;
34
-
35
- /**
36
- * The number of columns to display. Access with get_columns().
37
- *
38
- * @since 3.4.0
39
- * @var int
40
- * @access private
41
- */
42
- private $columns = 0;
43
-
44
- /**
45
- * The unique ID of the screen.
46
- *
47
- * @since 3.3.0
48
- * @var string
49
- * @access public
50
- */
51
- public $id;
52
-
53
- /**
54
- * Which admin the screen is in. network | user | site | false
55
- *
56
- * @since 3.5.0
57
- * @var string
58
- * @access protected
59
- */
60
- protected $in_admin;
61
-
62
- /**
63
- * Whether the screen is in the network admin.
64
- *
65
- * Deprecated. Use in_admin() instead.
66
- *
67
- * @since 3.3.0
68
- * @deprecated 3.5.0
69
- * @var bool
70
- * @access public
71
- */
72
- public $is_network;
73
-
74
- /**
75
- * Whether the screen is in the user admin.
76
- *
77
- * Deprecated. Use in_admin() instead.
78
- *
79
- * @since 3.3.0
80
- * @deprecated 3.5.0
81
- * @var bool
82
- * @access public
83
- */
84
- public $is_user;
85
-
86
- /**
87
- * The base menu parent.
88
- * This is derived from $parent_file by removing the query string and any .php extension.
89
- * $parent_file values of 'edit.php?post_type=page' and 'edit.php?post_type=post' have a $parent_base of 'edit'.
90
- *
91
- * @since 3.3.0
92
- * @var string
93
- * @access public
94
- */
95
- public $parent_base;
96
-
97
- /**
98
- * The parent_file for the screen per the admin menu system.
99
- * Some $parent_file values are 'edit.php?post_type=page', 'edit.php', and 'options-general.php'.
100
- *
101
- * @since 3.3.0
102
- * @var string
103
- * @access public
104
- */
105
- public $parent_file;
106
-
107
- /**
108
- * The post type associated with the screen, if any.
109
- * The 'edit.php?post_type=page' screen has a post type of 'page'.
110
- * The 'edit-tags.php?taxonomy=$taxonomy&post_type=page' screen has a post type of 'page'.
111
- *
112
- * @since 3.3.0
113
- * @var string
114
- * @access public
115
- */
116
- public $post_type;
117
-
118
- /**
119
- * The taxonomy associated with the screen, if any.
120
- * The 'edit-tags.php?taxonomy=category' screen has a taxonomy of 'category'.
121
- * @since 3.3.0
122
- * @var string
123
- * @access public
124
- */
125
- public $taxonomy;
126
-
127
- /**
128
- * The help tab data associated with the screen, if any.
129
- *
130
- * @since 3.3.0
131
- * @var array
132
- * @access private
133
- */
134
- private $_help_tabs = array();
135
-
136
- /**
137
- * The help sidebar data associated with screen, if any.
138
- *
139
- * @since 3.3.0
140
- * @var string
141
- * @access private
142
- */
143
- private $_help_sidebar = '';
144
-
145
- /**
146
- * The accessible hidden headings and text associated with the screen, if any.
147
- *
148
- * @since 4.4.0
149
- * @access private
150
- * @var array
151
- */
152
- private $_screen_reader_content = array();
153
-
154
- /**
155
- * Stores old string-based help.
156
- *
157
- * @static
158
- * @access private
159
- *
160
- * @var array
161
- */
162
- private static $_old_compat_help = array();
163
-
164
- /**
165
- * The screen options associated with screen, if any.
166
- *
167
- * @since 3.3.0
168
- * @var array
169
- * @access private
170
- */
171
- private $_options = array();
172
-
173
- /**
174
- * The screen object registry.
175
- *
176
- * @since 3.3.0
177
- *
178
- * @static
179
- * @access private
180
- *
181
- * @var array
182
- */
183
- private static $_registry = array();
184
-
185
- /**
186
- * Stores the result of the public show_screen_options function.
187
- *
188
- * @since 3.3.0
189
- * @var bool
190
- * @access private
191
- */
192
- private $_show_screen_options;
193
-
194
- /**
195
- * Stores the 'screen_settings' section of screen options.
196
- *
197
- * @since 3.3.0
198
- * @var string
199
- * @access private
200
- */
201
- private $_screen_settings;
202
-
203
- /**
204
- * Fetches a screen object.
205
- *
206
- * @since 3.3.0
207
- * @access public
208
- *
209
- * @static
210
- *
211
- * @global string $hook_suffix
212
- *
213
- * @param string|WP_Screen $hook_name Optional. The hook name (also known as the hook suffix) used to determine the screen.
214
- * Defaults to the current $hook_suffix global.
215
- * @return WP_Screen Screen object.
216
- */
217
- public static function get( $hook_name = '' ) {
218
- if ( $hook_name instanceof WP_Screen ) {
219
- return $hook_name;
220
- }
221
-
222
- $post_type = $taxonomy = null;
223
- $in_admin = false;
224
- $action = '';
225
-
226
- if ( $hook_name )
227
- $id = $hook_name;
228
- else
229
- $id = $GLOBALS['hook_suffix'];
230
-
231
- // For those pesky meta boxes.
232
- if ( $hook_name && post_type_exists( $hook_name ) ) {
233
- $post_type = $id;
234
- $id = 'post'; // changes later. ends up being $base.
235
- } else {
236
- if ( '.php' == substr( $id, -4 ) )
237
- $id = substr( $id, 0, -4 );
238
-
239
- if ( 'post-new' == $id || 'link-add' == $id || 'media-new' == $id || 'user-new' == $id ) {
240
- $id = substr( $id, 0, -4 );
241
- $action = 'add';
242
- }
243
- }
244
-
245
- if ( ! $post_type && $hook_name ) {
246
- if ( '-network' == substr( $id, -8 ) ) {
247
- $id = substr( $id, 0, -8 );
248
- $in_admin = 'network';
249
- } elseif ( '-user' == substr( $id, -5 ) ) {
250
- $id = substr( $id, 0, -5 );
251
- $in_admin = 'user';
252
- }
253
-
254
- $id = sanitize_key( $id );
255
- if ( 'edit-comments' != $id && 'edit-tags' != $id && 'edit-' == substr( $id, 0, 5 ) ) {
256
- $maybe = substr( $id, 5 );
257
- if ( taxonomy_exists( $maybe ) ) {
258
- $id = 'edit-tags';
259
- $taxonomy = $maybe;
260
- } elseif ( post_type_exists( $maybe ) ) {
261
- $id = 'edit';
262
- $post_type = $maybe;
263
- }
264
- }
265
-
266
- if ( ! $in_admin )
267
- $in_admin = 'site';
268
- } else {
269
- if ( defined( 'WP_NETWORK_ADMIN' ) && WP_NETWORK_ADMIN )
270
- $in_admin = 'network';
271
- elseif ( defined( 'WP_USER_ADMIN' ) && WP_USER_ADMIN )
272
- $in_admin = 'user';
273
- else
274
- $in_admin = 'site';
275
- }
276
-
277
- if ( 'index' == $id )
278
- $id = 'dashboard';
279
- elseif ( 'front' == $id )
280
- $in_admin = false;
281
-
282
- $base = $id;
283
-
284
- // If this is the current screen, see if we can be more accurate for post types and taxonomies.
285
- if ( ! $hook_name ) {
286
- if ( isset( $_REQUEST['post_type'] ) )
287
- $post_type = post_type_exists( $_REQUEST['post_type'] ) ? $_REQUEST['post_type'] : false;
288
- if ( isset( $_REQUEST['taxonomy'] ) )
289
- $taxonomy = taxonomy_exists( $_REQUEST['taxonomy'] ) ? $_REQUEST['taxonomy'] : false;
290
-
291
- switch ( $base ) {
292
- case 'post' :
293
- if ( isset( $_GET['post'] ) )
294
- $post_id = (int) $_GET['post'];
295
- elseif ( isset( $_POST['post_ID'] ) )
296
- $post_id = (int) $_POST['post_ID'];
297
- else
298
- $post_id = 0;
299
-
300
- if ( $post_id ) {
301
- $post = get_post( $post_id );
302
- if ( $post )
303
- $post_type = $post->post_type;
304
- }
305
- break;
306
- case 'edit-tags' :
307
- if ( null === $post_type && is_object_in_taxonomy( 'post', $taxonomy ? $taxonomy : 'post_tag' ) )
308
- $post_type = 'post';
309
- break;
310
- }
311
- }
312
-
313
- switch ( $base ) {
314
- case 'post' :
315
- if ( null === $post_type )
316
- $post_type = 'post';
317
- $id = $post_type;
318
- break;
319
- case 'edit' :
320
- if ( null === $post_type )
321
- $post_type = 'post';
322
- $id .= '-' . $post_type;
323
- break;
324
- case 'edit-tags' :
325
- if ( null === $taxonomy )
326
- $taxonomy = 'post_tag';
327
- // The edit-tags ID does not contain the post type. Look for it in the request.
328
- if ( null === $post_type ) {
329
- $post_type = 'post';
330
- if ( isset( $_REQUEST['post_type'] ) && post_type_exists( $_REQUEST['post_type'] ) )
331
- $post_type = $_REQUEST['post_type'];
332
- }
333
-
334
- $id = 'edit-' . $taxonomy;
335
- break;
336
- }
337
-
338
- if ( 'network' == $in_admin ) {
339
- $id .= '-network';
340
- $base .= '-network';
341
- } elseif ( 'user' == $in_admin ) {
342
- $id .= '-user';
343
- $base .= '-user';
344
- }
345
-
346
- if ( isset( self::$_registry[ $id ] ) ) {
347
- $screen = self::$_registry[ $id ];
348
- if ( $screen === get_current_screen() )
349
- return $screen;
350
- } else {
351
- $screen = new WP_Screen();
352
- $screen->id = $id;
353
- }
354
-
355
- $screen->base = $base;
356
- $screen->action = $action;
357
- $screen->post_type = (string) $post_type;
358
- $screen->taxonomy = (string) $taxonomy;
359
- $screen->is_user = ( 'user' == $in_admin );
360
- $screen->is_network = ( 'network' == $in_admin );
361
- $screen->in_admin = $in_admin;
362
-
363
- self::$_registry[ $id ] = $screen;
364
-
365
- return $screen;
366
- }
367
-
368
- /**
369
- * Makes the screen object the current screen.
370
- *
371
- * @see set_current_screen()
372
- * @since 3.3.0
373
- *
374
- * @global WP_Screen $current_screen
375
- * @global string $taxnow
376
- * @global string $typenow
377
- */
378
- public function set_current_screen() {
379
- global $current_screen, $taxnow, $typenow;
380
- $current_screen = $this;
381
- $taxnow = $this->taxonomy;
382
- $typenow = $this->post_type;
383
-
384
- /**
385
- * Fires after the current screen has been set.
386
- *
387
- * @since 3.0.0
388
- *
389
- * @param WP_Screen $current_screen Current WP_Screen object.
390
- */
391
- do_action( 'current_screen', $current_screen );
392
- }
393
-
394
- /**
395
- * Constructor
396
- *
397
- * @since 3.3.0
398
- * @access private
399
- */
400
- private function __construct() {}
401
-
402
- /**
403
- * Indicates whether the screen is in a particular admin
404
- *
405
- * @since 3.5.0
406
- *
407
- * @param string $admin The admin to check against (network | user | site).
408
- * If empty any of the three admins will result in true.
409
- * @return bool True if the screen is in the indicated admin, false otherwise.
410
- */
411
- public function in_admin( $admin = null ) {
412
- if ( empty( $admin ) )
413
- return (bool) $this->in_admin;
414
-
415
- return ( $admin == $this->in_admin );
416
- }
417
-
418
- /**
419
- * Sets the old string-based contextual help for the screen.
420
- *
421
- * For backwards compatibility.
422
- *
423
- * @since 3.3.0
424
- *
425
- * @static
426
- *
427
- * @param WP_Screen $screen A screen object.
428
- * @param string $help Help text.
429
- */
430
- public static function add_old_compat_help( $screen, $help ) {
431
- self::$_old_compat_help[ $screen->id ] = $help;
432
- }
433
-
434
- /**
435
- * Set the parent information for the screen.
436
- * This is called in admin-header.php after the menu parent for the screen has been determined.
437
- *
438
- * @since 3.3.0
439
- *
440
- * @param string $parent_file The parent file of the screen. Typically the $parent_file global.
441
- */
442
- public function set_parentage( $parent_file ) {
443
- $this->parent_file = $parent_file;
444
- list( $this->parent_base ) = explode( '?', $parent_file );
445
- $this->parent_base = str_replace( '.php', '', $this->parent_base );
446
- }
447
-
448
- /**
449
- * Adds an option for the screen.
450
- * Call this in template files after admin.php is loaded and before admin-header.php is loaded to add screen options.
451
- *
452
- * @since 3.3.0
453
- *
454
- * @param string $option Option ID
455
- * @param mixed $args Option-dependent arguments.
456
- */
457
- public function add_option( $option, $args = array() ) {
458
- $this->_options[ $option ] = $args;
459
- }
460
-
461
- /**
462
- * Remove an option from the screen.
463
- *
464
- * @since 3.8.0
465
- *
466
- * @param string $option Option ID.
467
- */
468
- public function remove_option( $option ) {
469
- unset( $this->_options[ $option ] );
470
- }
471
-
472
- /**
473
- * Remove all options from the screen.
474
- *
475
- * @since 3.8.0
476
- */
477
- public function remove_options() {
478
- $this->_options = array();
479
- }
480
-
481
- /**
482
- * Get the options registered for the screen.
483
- *
484
- * @since 3.8.0
485
- *
486
- * @return array Options with arguments.
487
- */
488
- public function get_options() {
489
- return $this->_options;
490
- }
491
-
492
- /**
493
- * Gets the arguments for an option for the screen.
494
- *
495
- * @since 3.3.0
496
- *
497
- * @param string $option Option name.
498
- * @param string $key Optional. Specific array key for when the option is an array.
499
- * Default false.
500
- * @return string The option value if set, null otherwise.
501
- */
502
- public function get_option( $option, $key = false ) {
503
- if ( ! isset( $this->_options[ $option ] ) )
504
- return null;
505
- if ( $key ) {
506
- if ( isset( $this->_options[ $option ][ $key ] ) )
507
- return $this->_options[ $option ][ $key ];
508
- return null;
509
- }
510
- return $this->_options[ $option ];
511
- }
512
-
513
- /**
514
- * Gets the help tabs registered for the screen.
515
- *
516
- * @since 3.4.0
517
- * @since 4.4.0 Help tabs are ordered by their priority.
518
- *
519
- * @return array Help tabs with arguments.
520
- */
521
- public function get_help_tabs() {
522
- $help_tabs = $this->_help_tabs;
523
-
524
- $priorities = array();
525
- foreach ( $help_tabs as $help_tab ) {
526
- if ( isset( $priorities[ $help_tab['priority'] ] ) ) {
527
- $priorities[ $help_tab['priority'] ][] = $help_tab;
528
- } else {
529
- $priorities[ $help_tab['priority'] ] = array( $help_tab );
530
- }
531
- }
532
-
533
- ksort( $priorities );
534
-
535
- $sorted = array();
536
- foreach ( $priorities as $list ) {
537
- foreach ( $list as $tab ) {
538
- $sorted[ $tab['id'] ] = $tab;
539
- }
540
- }
541
-
542
- return $sorted;
543
- }
544
-
545
- /**
546
- * Gets the arguments for a help tab.
547
- *
548
- * @since 3.4.0
549
- *
550
- * @param string $id Help Tab ID.
551
- * @return array Help tab arguments.
552
- */
553
- public function get_help_tab( $id ) {
554
- if ( ! isset( $this->_help_tabs[ $id ] ) )
555
- return null;
556
- return $this->_help_tabs[ $id ];
557
- }
558
-
559
- /**
560
- * Add a help tab to the contextual help for the screen.
561
- * Call this on the load-$pagenow hook for the relevant screen.
562
- *
563
- * @since 3.3.0
564
- * @since 4.4.0 The `$priority` argument was added.
565
- *
566
- * @param array $args {
567
- * Array of arguments used to display the help tab.
568
- *
569
- * @type string $title Title for the tab. Default false.
570
- * @type string $id Tab ID. Must be HTML-safe. Default false.
571
- * @type string $content Optional. Help tab content in plain text or HTML. Default empty string.
572
- * @type string $callback Optional. A callback to generate the tab content. Default false.
573
- * @type int $priority Optional. The priority of the tab, used for ordering. Default 10.
574
- * }
575
- */
576
- public function add_help_tab( $args ) {
577
- $defaults = array(
578
- 'title' => false,
579
- 'id' => false,
580
- 'content' => '',
581
- 'callback' => false,
582
- 'priority' => 10,
583
- );
584
- $args = wp_parse_args( $args, $defaults );
585
-
586
- $args['id'] = sanitize_html_class( $args['id'] );
587
-
588
- // Ensure we have an ID and title.
589
- if ( ! $args['id'] || ! $args['title'] )
590
- return;
591
-
592
- // Allows for overriding an existing tab with that ID.
593
- $this->_help_tabs[ $args['id'] ] = $args;
594
- }
595
-
596
- /**
597
- * Removes a help tab from the contextual help for the screen.
598
- *
599
- * @since 3.3.0
600
- *
601
- * @param string $id The help tab ID.
602
- */
603
- public function remove_help_tab( $id ) {
604
- unset( $this->_help_tabs[ $id ] );
605
- }
606
-
607
- /**
608
- * Removes all help tabs from the contextual help for the screen.
609
- *
610
- * @since 3.3.0
611
- */
612
- public function remove_help_tabs() {
613
- $this->_help_tabs = array();
614
- }
615
-
616
- /**
617
- * Gets the content from a contextual help sidebar.
618
- *
619
- * @since 3.4.0
620
- *
621
- * @return string Contents of the help sidebar.
622
- */
623
- public function get_help_sidebar() {
624
- return $this->_help_sidebar;
625
- }
626
-
627
- /**
628
- * Add a sidebar to the contextual help for the screen.
629
- * Call this in template files after admin.php is loaded and before admin-header.php is loaded to add a sidebar to the contextual help.
630
- *
631
- * @since 3.3.0
632
- *
633
- * @param string $content Sidebar content in plain text or HTML.
634
- */
635
- public function set_help_sidebar( $content ) {
636
- $this->_help_sidebar = $content;
637
- }
638
-
639
- /**
640
- * Gets the number of layout columns the user has selected.
641
- *
642
- * The layout_columns option controls the max number and default number of
643
- * columns. This method returns the number of columns within that range selected
644
- * by the user via Screen Options. If no selection has been made, the default
645
- * provisioned in layout_columns is returned. If the screen does not support
646
- * selecting the number of layout columns, 0 is returned.
647
- *
648
- * @since 3.4.0
649
- *
650
- * @return int Number of columns to display.
651
- */
652
- public function get_columns() {
653
- return $this->columns;
654
- }
655
-
656
- /**
657
- * Get the accessible hidden headings and text used in the screen.
658
- *
659
- * @since 4.4.0
660
- *
661
- * @see set_screen_reader_content() For more information on the array format.
662
- *
663
- * @return array An associative array of screen reader text strings.
664
- */
665
- public function get_screen_reader_content() {
666
- return $this->_screen_reader_content;
667
- }
668
-
669
- /**
670
- * Get a screen reader text string.
671
- *
672
- * @since 4.4.0
673
- *
674
- * @param string $key Screen reader text array named key.
675
- * @return string Screen reader text string.
676
- */
677
- public function get_screen_reader_text( $key ) {
678
- if ( ! isset( $this->_screen_reader_content[ $key ] ) ) {
679
- return null;
680
- }
681
- return $this->_screen_reader_content[ $key ];
682
- }
683
-
684
- /**
685
- * Add accessible hidden headings and text for the screen.
686
- *
687
- * @since 4.4.0
688
- *
689
- * @param array $content {
690
- * An associative array of screen reader text strings.
691
- *
692
- * @type string $heading_views Screen reader text for the filter links heading.
693
- * Default 'Filter items list'.
694
- * @type string $heading_pagination Screen reader text for the pagination heading.
695
- * Default 'Items list navigation'.
696
- * @type string heading_list Screen reader text for the items list heading.
697
- * Default 'Items list'.
698
- * }
699
- */
700
- public function set_screen_reader_content( $content = array() ) {
701
- $defaults = array(
702
- 'heading_views' => __( 'Filter items list' ),
703
- 'heading_pagination' => __( 'Items list navigation' ),
704
- 'heading_list' => __( 'Items list' ),
705
- );
706
- $content = wp_parse_args( $content, $defaults );
707
-
708
- $this->_screen_reader_content = $content;
709
- }
710
-
711
- /**
712
- * Remove all the accessible hidden headings and text for the screen.
713
- *
714
- * @since 4.4.0
715
- */
716
- public function remove_screen_reader_content() {
717
- $this->_screen_reader_content = array();
718
- }
719
-
720
- /**
721
- * Render the screen's help section.
722
- *
723
- * This will trigger the deprecated filters for backwards compatibility.
724
- *
725
- * @since 3.3.0
726
- *
727
- * @global string $screen_layout_columns
728
- */
729
- public function render_screen_meta() {
730
-
731
- /**
732
- * Filter the legacy contextual help list.
733
- *
734
- * @since 2.7.0
735
- * @deprecated 3.3.0 Use get_current_screen()->add_help_tab() or
736
- * get_current_screen()->remove_help_tab() instead.
737
- *
738
- * @param array $old_compat_help Old contextual help.
739
- * @param WP_Screen $this Current WP_Screen instance.
740
- */
741
- self::$_old_compat_help = apply_filters( 'contextual_help_list', self::$_old_compat_help, $this );
742
-
743
- $old_help = isset( self::$_old_compat_help[ $this->id ] ) ? self::$_old_compat_help[ $this->id ] : '';
744
-
745
- /**
746
- * Filter the legacy contextual help text.
747
- *
748
- * @since 2.7.0
749
- * @deprecated 3.3.0 Use get_current_screen()->add_help_tab() or
750
- * get_current_screen()->remove_help_tab() instead.
751
- *
752
- * @param string $old_help Help text that appears on the screen.
753
- * @param string $screen_id Screen ID.
754
- * @param WP_Screen $this Current WP_Screen instance.
755
- *
756
- */
757
- $old_help = apply_filters( 'contextual_help', $old_help, $this->id, $this );
758
-
759
- // Default help only if there is no old-style block of text and no new-style help tabs.
760
- if ( empty( $old_help ) && ! $this->get_help_tabs() ) {
761
-
762
- /**
763
- * Filter the default legacy contextual help text.
764
- *
765
- * @since 2.8.0
766
- * @deprecated 3.3.0 Use get_current_screen()->add_help_tab() or
767
- * get_current_screen()->remove_help_tab() instead.
768
- *
769
- * @param string $old_help_default Default contextual help text.
770
- */
771
- $default_help = apply_filters( 'default_contextual_help', '' );
772
- if ( $default_help )
773
- $old_help = '<p>' . $default_help . '</p>';
774
- }
775
-
776
- if ( $old_help ) {
777
- $this->add_help_tab( array(
778
- 'id' => 'old-contextual-help',
779
- 'title' => __('Overview'),
780
- 'content' => $old_help,
781
- ) );
782
- }
783
-
784
- $help_sidebar = $this->get_help_sidebar();
785
-
786
- $help_class = 'hidden';
787
- if ( ! $help_sidebar )
788
- $help_class .= ' no-sidebar';
789
-
790
- // Time to render!
791
- ?>
792
- <div id="screen-meta" class="metabox-prefs">
793
-
794
- <div id="contextual-help-wrap" class="<?php echo esc_attr( $help_class ); ?>" tabindex="-1" aria-label="<?php esc_attr_e('Contextual Help Tab'); ?>">
795
- <div id="contextual-help-back"></div>
796
- <div id="contextual-help-columns">
797
- <div class="contextual-help-tabs">
798
- <ul>
799
- <?php
800
- $class = ' class="active"';
801
- foreach ( $this->get_help_tabs() as $tab ) :
802
- $link_id = "tab-link-{$tab['id']}";
803
- $panel_id = "tab-panel-{$tab['id']}";
804
- ?>
805
-
806
- <li id="<?php echo esc_attr( $link_id ); ?>"<?php echo $class; ?>>
807
- <a href="<?php echo esc_url( "#$panel_id" ); ?>" aria-controls="<?php echo esc_attr( $panel_id ); ?>">
808
- <?php echo esc_html( $tab['title'] ); ?>
809
- </a>
810
- </li>
811
- <?php
812
- $class = '';
813
- endforeach;
814
- ?>
815
- </ul>
816
- </div>
817
-
818
- <?php if ( $help_sidebar ) : ?>
819
- <div class="contextual-help-sidebar">
820
- <?php echo $help_sidebar; ?>
821
- </div>
822
- <?php endif; ?>
823
-
824
- <div class="contextual-help-tabs-wrap">
825
- <?php
826
- $classes = 'help-tab-content active';
827
- foreach ( $this->get_help_tabs() as $tab ):
828
- $panel_id = "tab-panel-{$tab['id']}";
829
- ?>
830
-
831
- <div id="<?php echo esc_attr( $panel_id ); ?>" class="<?php echo $classes; ?>">
832
- <?php
833
- // Print tab content.
834
- echo $tab['content'];
835
-
836
- // If it exists, fire tab callback.
837
- if ( ! empty( $tab['callback'] ) )
838
- call_user_func_array( $tab['callback'], array( $this, $tab ) );
839
- ?>
840
- </div>
841
- <?php
842
- $classes = 'help-tab-content';
843
- endforeach;
844
- ?>
845
- </div>
846
- </div>
847
- </div>
848
- <?php
849
- // Setup layout columns
850
-
851
- /**
852
- * Filter the array of screen layout columns.
853
- *
854
- * This hook provides back-compat for plugins using the back-compat
855
- * filter instead of add_screen_option().
856
- *
857
- * @since 2.8.0
858
- *
859
- * @param array $empty_columns Empty array.
860
- * @param string $screen_id Screen ID.
861
- * @param WP_Screen $this Current WP_Screen instance.
862
- */
863
- $columns = apply_filters( 'screen_layout_columns', array(), $this->id, $this );
864
-
865
- if ( ! empty( $columns ) && isset( $columns[ $this->id ] ) )
866
- $this->add_option( 'layout_columns', array('max' => $columns[ $this->id ] ) );
867
-
868
- if ( $this->get_option( 'layout_columns' ) ) {
869
- $this->columns = (int) get_user_option("screen_layout_$this->id");
870
-
871
- if ( ! $this->columns && $this->get_option( 'layout_columns', 'default' ) )
872
- $this->columns = $this->get_option( 'layout_columns', 'default' );
873
- }
874
- $GLOBALS[ 'screen_layout_columns' ] = $this->columns; // Set the global for back-compat.
875
-
876
- // Add screen options
877
- if ( $this->show_screen_options() )
878
- $this->render_screen_options();
879
- ?>
880
- </div>
881
- <?php
882
- if ( ! $this->get_help_tabs() && ! $this->show_screen_options() )
883
- return;
884
- ?>
885
- <div id="screen-meta-links">
886
- <?php if ( $this->get_help_tabs() ) : ?>
887
- <div id="contextual-help-link-wrap" class="hide-if-no-js screen-meta-toggle">
888
- <button type="button" id="contextual-help-link" class="button show-settings" aria-controls="contextual-help-wrap" aria-expanded="false"><?php _e( 'Help' ); ?></button>
889
- </div>
890
- <?php endif;
891
- if ( $this->show_screen_options() ) : ?>
892
- <div id="screen-options-link-wrap" class="hide-if-no-js screen-meta-toggle">
893
- <button type="button" id="show-settings-link" class="button show-settings" aria-controls="screen-options-wrap" aria-expanded="false"><?php _e( 'Screen Options' ); ?></button>
894
- </div>
895
- <?php endif; ?>
896
- </div>
897
- <?php
898
- }
899
-
900
- /**
901
- *
902
- * @global array $wp_meta_boxes
903
- *
904
- * @return bool
905
- */
906
- public function show_screen_options() {
907
- global $wp_meta_boxes;
908
-
909
- if ( is_bool( $this->_show_screen_options ) )
910
- return $this->_show_screen_options;
911
-
912
- $columns = get_column_headers( $this );
913
-
914
- $show_screen = ! empty( $wp_meta_boxes[ $this->id ] ) || $columns || $this->get_option( 'per_page' );
915
-
916
- switch ( $this->base ) {
917
- case 'widgets':
918
- $this->_screen_settings = '<p><a id="access-on" href="widgets.php?widgets-access=on">' . __('Enable accessibility mode') . '</a><a id="access-off" href="widgets.php?widgets-access=off">' . __('Disable accessibility mode') . "</a></p>\n";
919
- break;
920
- case 'post' :
921
- $expand = '<fieldset class="editor-expand hidden"><legend>' . __( 'Additional settings' ) . '</legend><label for="editor-expand-toggle">';
922
- $expand .= '<input type="checkbox" id="editor-expand-toggle"' . checked( get_user_setting( 'editor_expand', 'on' ), 'on', false ) . ' />';
923
- $expand .= __( 'Enable full-height editor and distraction-free functionality.' ) . '</label></fieldset>';
924
- $this->_screen_settings = $expand;
925
- break;
926
- default:
927
- $this->_screen_settings = '';
928
- break;
929
- }
930
-
931
- /**
932
- * Filter the screen settings text displayed in the Screen Options tab.
933
- *
934
- * This filter is currently only used on the Widgets screen to enable
935
- * accessibility mode.
936
- *
937
- * @since 3.0.0
938
- *
939
- * @param string $screen_settings Screen settings.
940
- * @param WP_Screen $this WP_Screen object.
941
- */
942
- $this->_screen_settings = apply_filters( 'screen_settings', $this->_screen_settings, $this );
943
-
944
- if ( $this->_screen_settings || $this->_options )
945
- $show_screen = true;
946
-
947
- /**
948
- * Filter whether to show the Screen Options tab.
949
- *
950
- * @since 3.2.0
951
- *
952
- * @param bool $show_screen Whether to show Screen Options tab.
953
- * Default true.
954
- * @param WP_Screen $this Current WP_Screen instance.
955
- */
956
- $this->_show_screen_options = apply_filters( 'screen_options_show_screen', $show_screen, $this );
957
- return $this->_show_screen_options;
958
- }
959
-
960
- /**
961
- * Render the screen options tab.
962
- *
963
- * @since 3.3.0
964
- *
965
- * @param array $options {
966
- * @type bool $wrap Whether the screen-options-wrap div will be included. Defaults to true.
967
- * }
968
- */
969
- public function render_screen_options( $options = array() ) {
970
- $options = wp_parse_args( $options, array(
971
- 'wrap' => true,
972
- ) );
973
-
974
- $wrapper_start = $wrapper_end = $form_start = $form_end = '';
975
-
976
- // Output optional wrapper.
977
- if ( $options['wrap'] ) {
978
- $wrapper_start = '<div id="screen-options-wrap" class="hidden" tabindex="-1" aria-label="' . esc_attr__( 'Screen Options Tab' ) . '">';
979
- $wrapper_end = '</div>';
980
- }
981
-
982
- // Don't output the form and nonce for the widgets accessibility mode links.
983
- if ( 'widgets' !== $this->base ) {
984
- $form_start = "\n<form id='adv-settings' method='post'>\n";
985
- $form_end = "\n" . wp_nonce_field( 'screen-options-nonce', 'screenoptionnonce', false, false ) . "\n</form>\n";
986
- }
987
-
988
- echo $wrapper_start . $form_start;
989
-
990
- $this->render_meta_boxes_preferences();
991
- $this->render_list_table_columns_preferences();
992
- $this->render_screen_layout();
993
- $this->render_per_page_options();
994
- $this->render_view_mode();
995
- echo $this->_screen_settings;
996
-
997
- /**
998
- * Filter whether to show the Screen Options submit button.
999
- *
1000
- * @since 4.4.0
1001
- *
1002
- * @param bool $show_button Whether to show Screen Options submit button.
1003
- * Default false.
1004
- * @param WP_Screen $this Current WP_Screen instance.
1005
- */
1006
- $show_button = apply_filters( 'screen_options_show_submit', false, $this );
1007
-
1008
- if ( $show_button ) {
1009
- submit_button( __( 'Apply' ), 'primary', 'screen-options-apply', true );
1010
- }
1011
-
1012
- echo $form_end . $wrapper_end;
1013
- }
1014
-
1015
- /**
1016
- * Render the meta boxes preferences.
1017
- *
1018
- * @since 4.4.0
1019
- *
1020
- * @global array $wp_meta_boxes
1021
- */
1022
- public function render_meta_boxes_preferences() {
1023
- global $wp_meta_boxes;
1024
-
1025
- if ( ! isset( $wp_meta_boxes[ $this->id ] ) ) {
1026
- return;
1027
- }
1028
- ?>
1029
- <fieldset class="metabox-prefs">
1030
- <legend><?php _e( 'Boxes' ); ?></legend>
1031
- <?php
1032
- meta_box_prefs( $this );
1033
-
1034
- if ( 'dashboard' === $this->id && has_action( 'welcome_panel' ) && current_user_can( 'edit_theme_options' ) ) {
1035
- if ( isset( $_GET['welcome'] ) ) {
1036
- $welcome_checked = empty( $_GET['welcome'] ) ? 0 : 1;
1037
- update_user_meta( get_current_user_id(), 'show_welcome_panel', $welcome_checked );
1038
- } else {
1039
- $welcome_checked = get_user_meta( get_current_user_id(), 'show_welcome_panel', true );
1040
- if ( 2 == $welcome_checked && wp_get_current_user()->user_email != get_option( 'admin_email' ) ) {
1041
- $welcome_checked = false;
1042
- }
1043
- }
1044
- echo '<label for="wp_welcome_panel-hide">';
1045
- echo '<input type="checkbox" id="wp_welcome_panel-hide"' . checked( (bool) $welcome_checked, true, false ) . ' />';
1046
- echo _x( 'Welcome', 'Welcome panel' ) . "</label>\n";
1047
- }
1048
- ?>
1049
- </fieldset>
1050
- <?php
1051
- }
1052
-
1053
- /**
1054
- * Render the list table columns preferences.
1055
- *
1056
- * @since 4.4.0
1057
- */
1058
- public function render_list_table_columns_preferences() {
1059
-
1060
- $columns = get_column_headers( $this );
1061
- $hidden = get_hidden_columns( $this );
1062
-
1063
- if ( ! $columns ) {
1064
- return;
1065
- }
1066
-
1067
- $legend = ! empty( $columns['_title'] ) ? $columns['_title'] : __( 'Columns' );
1068
- ?>
1069
- <fieldset class="metabox-prefs">
1070
- <legend><?php echo $legend; ?></legend>
1071
- <?php
1072
- $special = array( '_title', 'cb', 'comment', 'media', 'name', 'title', 'username', 'blogname' );
1073
-
1074
- foreach ( $columns as $column => $title ) {
1075
- // Can't hide these for they are special
1076
- if ( in_array( $column, $special ) ) {
1077
- continue;
1078
- }
1079
-
1080
- if ( empty( $title ) ) {
1081
- continue;
1082
- }
1083
-
1084
- if ( 'comments' == $column ) {
1085
- $title = __( 'Comments' );
1086
- }
1087
-
1088
- $id = "$column-hide";
1089
- echo '<label>';
1090
- echo '<input class="hide-column-tog" name="' . $id . '" type="checkbox" id="' . $id . '" value="' . $column . '"' . checked( ! in_array( $column, $hidden ), true, false ) . ' />';
1091
- echo "$title</label>\n";
1092
- }
1093
- ?>
1094
- </fieldset>
1095
- <?php
1096
- }
1097
-
1098
- /**
1099
- * Render the option for number of columns on the page
1100
- *
1101
- * @since 3.3.0
1102
- */
1103
- public function render_screen_layout() {
1104
- if ( ! $this->get_option( 'layout_columns' ) ) {
1105
- return;
1106
- }
1107
-
1108
- $screen_layout_columns = $this->get_columns();
1109
- $num = $this->get_option( 'layout_columns', 'max' );
1110
-
1111
- ?>
1112
- <fieldset class='columns-prefs'>
1113
- <legend class="screen-layout"><?php _e( 'Layout' ); ?></legend><?php
1114
- for ( $i = 1; $i <= $num; ++$i ):
1115
- ?>
1116
- <label class="columns-prefs-<?php echo $i; ?>">
1117
- <input type='radio' name='screen_columns' value='<?php echo esc_attr( $i ); ?>'
1118
- <?php checked( $screen_layout_columns, $i ); ?> />
1119
- <?php printf( _n( '%s column', '%s columns', $i ), number_format_i18n( $i ) ); ?>
1120
- </label>
1121
- <?php
1122
- endfor; ?>
1123
- </fieldset>
1124
- <?php
1125
- }
1126
-
1127
- /**
1128
- * Render the items per page option
1129
- *
1130
- * @since 3.3.0
1131
- */
1132
- public function render_per_page_options() {
1133
- if ( null === $this->get_option( 'per_page' ) ) {
1134
- return;
1135
- }
1136
-
1137
- $per_page_label = $this->get_option( 'per_page', 'label' );
1138
- if ( null === $per_page_label ) {
1139
- $per_page_label = __( 'Number of items per page:' );
1140
- }
1141
-
1142
- $option = $this->get_option( 'per_page', 'option' );
1143
- if ( ! $option ) {
1144
- $option = str_replace( '-', '_', "{$this->id}_per_page" );
1145
- }
1146
-
1147
- $per_page = (int) get_user_option( $option );
1148
- if ( empty( $per_page ) || $per_page < 1 ) {
1149
- $per_page = $this->get_option( 'per_page', 'default' );
1150
- if ( ! $per_page ) {
1151
- $per_page = 20;
1152
- }
1153
- }
1154
-
1155
- if ( 'edit_comments_per_page' == $option ) {
1156
- $comment_status = isset( $_REQUEST['comment_status'] ) ? $_REQUEST['comment_status'] : 'all';
1157
-
1158
- /** This filter is documented in wp-admin/includes/class-wp-comments-list-table.php */
1159
- $per_page = apply_filters( 'comments_per_page', $per_page, $comment_status );
1160
- } elseif ( 'categories_per_page' == $option ) {
1161
- /** This filter is documented in wp-admin/includes/class-wp-terms-list-table.php */
1162
- $per_page = apply_filters( 'edit_categories_per_page', $per_page );
1163
- } else {
1164
- /** This filter is documented in wp-admin/includes/class-wp-list-table.php */
1165
- $per_page = apply_filters( $option, $per_page );
1166
- }
1167
-
1168
- // Back compat
1169
- if ( isset( $this->post_type ) ) {
1170
- /** This filter is documented in wp-admin/includes/post.php */
1171
- $per_page = apply_filters( 'edit_posts_per_page', $per_page, $this->post_type );
1172
- }
1173
-
1174
- // This needs a submit button
1175
- add_filter( 'screen_options_show_submit', '__return_true' );
1176
-
1177
- ?>
1178
- <fieldset class="screen-options">
1179
- <legend><?php _e( 'Pagination' ); ?></legend>
1180
- <?php if ( $per_page_label ) : ?>
1181
- <label for="<?php echo esc_attr( $option ); ?>"><?php echo $per_page_label; ?></label>
1182
- <input type="number" step="1" min="1" max="999" class="screen-per-page" name="wp_screen_options[value]"
1183
- id="<?php echo esc_attr( $option ); ?>" maxlength="3"
1184
- value="<?php echo esc_attr( $per_page ); ?>" />
1185
- <?php endif; ?>
1186
- <input type="hidden" name="wp_screen_options[option]" value="<?php echo esc_attr( $option ); ?>" />
1187
- </fieldset>
1188
- <?php
1189
- }
1190
-
1191
- /**
1192
- * Render the list table view mode preferences.
1193
- *
1194
- * @since 4.4.0
1195
- */
1196
- public function render_view_mode() {
1197
- $screen = get_current_screen();
1198
-
1199
- // Currently only enabled for posts lists
1200
- if ( 'edit' !== $screen->base ) {
1201
- return;
1202
- }
1203
-
1204
- /**
1205
- * Filter the post types that have different view mode options.
1206
- *
1207
- * @since 4.4.0
1208
- *
1209
- * @param array $view_mode_post_types Array of post types that can change view modes.
1210
- * Default hierarchical post types with show_ui on.
1211
- */
1212
- $view_mode_post_types = get_post_types( array( 'hierarchical' => false, 'show_ui' => true ) );
1213
- $view_mode_post_types = apply_filters( 'view_mode_post_types', $view_mode_post_types );
1214
-
1215
- if ( ! in_array( $this->post_type, $view_mode_post_types ) ) {
1216
- return;
1217
- }
1218
-
1219
- global $mode;
1220
-
1221
- // This needs a submit button
1222
- add_filter( 'screen_options_show_submit', '__return_true' );
1223
- ?>
1224
- <fieldset class="metabox-prefs view-mode">
1225
- <legend><?php _e( 'View Mode' ); ?></legend>
1226
- <label for="list-view-mode">
1227
- <input id="list-view-mode" type="radio" name="mode" value="list" <?php checked( 'list', $mode ); ?> />
1228
- <?php _e( 'List View' ); ?>
1229
- </label>
1230
- <label for="excerpt-view-mode">
1231
- <input id="excerpt-view-mode" type="radio" name="mode" value="excerpt" <?php checked( 'excerpt', $mode ); ?> />
1232
- <?php _e( 'Excerpt View' ); ?>
1233
- </label>
1234
- </fieldset>
1235
- <?php
1236
- }
1237
-
1238
- /**
1239
- * Render screen reader text.
1240
- *
1241
- * @since 4.4.0
1242
- *
1243
- * @param string $key The screen reader text array named key.
1244
- * @param string $tag Optional. The HTML tag to wrap the screen reader text. Default h2.
1245
- */
1246
- public function render_screen_reader_content( $key = '', $tag = 'h2' ) {
1247
-
1248
- if ( ! isset( $this->_screen_reader_content[ $key ] ) ) {
1249
- return;
1250
- }
1251
- echo "<$tag class='screen-reader-text'>" . $this->_screen_reader_content[ $key ] . "</$tag>";
1252
- }
1253
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/classes/screen.php DELETED
@@ -1,224 +0,0 @@
1
- <?php
2
- /**
3
- * WordPress Administration Screen API.
4
- *
5
- * @package WordPress
6
- * @subpackage Administration
7
- */
8
-
9
- /**
10
- * Get the column headers for a screen
11
- *
12
- * @since 2.7.0
13
- *
14
- * @staticvar array $column_headers
15
- *
16
- * @param string|WP_Screen $screen The screen you want the headers for
17
- * @return array Containing the headers in the format id => UI String
18
- */
19
- function get_column_headers( $screen ) {
20
- if ( is_string( $screen ) )
21
- $screen = convert_to_screen( $screen );
22
-
23
- static $column_headers = array();
24
-
25
- if ( ! isset( $column_headers[ $screen->id ] ) ) {
26
-
27
- /**
28
- * Filter the column headers for a list table on a specific screen.
29
- *
30
- * The dynamic portion of the hook name, `$screen->id`, refers to the
31
- * ID of a specific screen. For example, the screen ID for the Posts
32
- * list table is edit-post, so the filter for that screen would be
33
- * manage_edit-post_columns.
34
- *
35
- * @since 3.0.0
36
- *
37
- * @param array $columns An array of column headers. Default empty.
38
- */
39
- $column_headers[ $screen->id ] = apply_filters( "manage_{$screen->id}_columns", array() );
40
- }
41
-
42
- return $column_headers[ $screen->id ];
43
- }
44
-
45
- /**
46
- * Get a list of hidden columns.
47
- *
48
- * @since 2.7.0
49
- *
50
- * @param string|WP_Screen $screen The screen you want the hidden columns for
51
- * @return array
52
- */
53
- function get_hidden_columns( $screen ) {
54
- if ( is_string( $screen ) ) {
55
- $screen = convert_to_screen( $screen );
56
- }
57
-
58
- $hidden = get_user_option( 'manage' . $screen->id . 'columnshidden' );
59
-
60
- $use_defaults = ! is_array( $hidden );
61
-
62
- if ( $use_defaults ) {
63
- $hidden = array();
64
-
65
- /**
66
- * Filter the default list of hidden columns.
67
- *
68
- * @since 4.4.0
69
- *
70
- * @param array $hidden An array of columns hidden by default.
71
- * @param WP_Screen $screen WP_Screen object of the current screen.
72
- */
73
- $hidden = apply_filters( 'default_hidden_columns', $hidden, $screen );
74
- }
75
-
76
- /**
77
- * Filter the list of hidden columns.
78
- *
79
- * @since 4.4.0
80
- * @since 4.4.1 Added the `use_defaults` parameter.
81
- *
82
- * @param array $hidden An array of hidden columns.
83
- * @param WP_Screen $screen WP_Screen object of the current screen.
84
- * @param bool $use_defaults Whether to show the default columns.
85
- */
86
- return apply_filters( 'hidden_columns', $hidden, $screen, $use_defaults );
87
- }
88
-
89
- /**
90
- * Prints the meta box preferences for screen meta.
91
- *
92
- * @since 2.7.0
93
- *
94
- * @global array $wp_meta_boxes
95
- *
96
- * @param WP_Screen $screen
97
- */
98
- function meta_box_prefs( $screen ) {
99
- global $wp_meta_boxes;
100
-
101
- if ( is_string( $screen ) )
102
- $screen = convert_to_screen( $screen );
103
-
104
- if ( empty($wp_meta_boxes[$screen->id]) )
105
- return;
106
-
107
- $hidden = get_hidden_meta_boxes($screen);
108
-
109
- foreach ( array_keys( $wp_meta_boxes[ $screen->id ] ) as $context ) {
110
- foreach ( array( 'high', 'core', 'default', 'low' ) as $priority ) {
111
- if ( ! isset( $wp_meta_boxes[ $screen->id ][ $context ][ $priority ] ) ) {
112
- continue;
113
- }
114
- foreach ( $wp_meta_boxes[ $screen->id ][ $context ][ $priority ] as $box ) {
115
- if ( false == $box || ! $box['title'] )
116
- continue;
117
- // Submit box cannot be hidden
118
- if ( 'submitdiv' == $box['id'] || 'linksubmitdiv' == $box['id'] )
119
- continue;
120
- $box_id = $box['id'];
121
- echo '<label for="' . $box_id . '-hide">';
122
- echo '<input class="hide-postbox-tog" name="' . $box_id . '-hide" type="checkbox" id="' . $box_id . '-hide" value="' . $box_id . '"' . (! in_array($box_id, $hidden) ? ' checked="checked"' : '') . ' />';
123
- echo "{$box['title']}</label>\n";
124
- }
125
- }
126
- }
127
- }
128
-
129
- /**
130
- * Get Hidden Meta Boxes
131
- *
132
- * @since 2.7.0
133
- *
134
- * @param string|WP_Screen $screen Screen identifier
135
- * @return array Hidden Meta Boxes
136
- */
137
- function get_hidden_meta_boxes( $screen ) {
138
- if ( is_string( $screen ) )
139
- $screen = convert_to_screen( $screen );
140
-
141
- $hidden = get_user_option( "metaboxhidden_{$screen->id}" );
142
-
143
- $use_defaults = ! is_array( $hidden );
144
-
145
- // Hide slug boxes by default
146
- if ( $use_defaults ) {
147
- $hidden = array();
148
- if ( 'post' == $screen->base ) {
149
- if ( 'post' == $screen->post_type || 'page' == $screen->post_type || 'attachment' == $screen->post_type )
150
- $hidden = array('slugdiv', 'trackbacksdiv', 'postcustom', 'postexcerpt', 'commentstatusdiv', 'commentsdiv', 'authordiv', 'revisionsdiv');
151
- else
152
- $hidden = array( 'slugdiv' );
153
- }
154
-
155
- /**
156
- * Filter the default list of hidden meta boxes.
157
- *
158
- * @since 3.1.0
159
- *
160
- * @param array $hidden An array of meta boxes hidden by default.
161
- * @param WP_Screen $screen WP_Screen object of the current screen.
162
- */
163
- $hidden = apply_filters( 'default_hidden_meta_boxes', $hidden, $screen );
164
- }
165
-
166
- /**
167
- * Filter the list of hidden meta boxes.
168
- *
169
- * @since 3.3.0
170
- *
171
- * @param array $hidden An array of hidden meta boxes.
172
- * @param WP_Screen $screen WP_Screen object of the current screen.
173
- * @param bool $use_defaults Whether to show the default meta boxes.
174
- * Default true.
175
- */
176
- return apply_filters( 'hidden_meta_boxes', $hidden, $screen, $use_defaults );
177
- }
178
-
179
- /**
180
- * Register and configure an admin screen option
181
- *
182
- * @since 3.1.0
183
- *
184
- * @param string $option An option name.
185
- * @param mixed $args Option-dependent arguments.
186
- */
187
- function add_screen_option( $option, $args = array() ) {
188
- $current_screen = get_current_screen();
189
-
190
- if ( ! $current_screen )
191
- return;
192
-
193
- $current_screen->add_option( $option, $args );
194
- }
195
-
196
- /**
197
- * Get the current screen object
198
- *
199
- * @since 3.1.0
200
- *
201
- * @global WP_Screen $current_screen
202
- *
203
- * @return WP_Screen Current screen object
204
- */
205
- function get_current_screen() {
206
- global $current_screen;
207
-
208
- if ( ! isset( $current_screen ) )
209
- return null;
210
-
211
- return $current_screen;
212
- }
213
-
214
- /**
215
- * Set the current screen object
216
- *
217
- * @since 3.0.0
218
- *
219
- * @param mixed $hook_name Optional. The hook name (also known as the hook suffix) used to determine the screen,
220
- * or an existing screen object.
221
- */
222
- function set_current_screen( $hook_name = '' ) {
223
- WP_Screen::get( $hook_name )->set_current_screen();
224
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/classes/template.php DELETED
@@ -1,2080 +0,0 @@
1
- <?php
2
- /**
3
- * Template WordPress Administration API.
4
- *
5
- * A Big Mess. Also some neat functions that are nicely written.
6
- *
7
- * @package WordPress
8
- * @subpackage Administration
9
- */
10
-
11
- /** Walker_Category_Checklist class */
12
- require_once( ABSPATH . 'wp-admin/includes/class-walker-category-checklist.php' );
13
-
14
- /** WP_Internal_Pointers class */
15
- require_once( ABSPATH . 'wp-admin/includes/class-wp-internal-pointers.php' );
16
-
17
- //
18
- // Category Checklists
19
- //
20
-
21
- /**
22
- * Output an unordered list of checkbox input elements labeled with category names.
23
- *
24
- * @since 2.5.1
25
- *
26
- * @see wp_terms_checklist()
27
- *
28
- * @param int $post_id Optional. Post to generate a categories checklist for. Default 0.
29
- * $selected_cats must not be an array. Default 0.
30
- * @param int $descendants_and_self Optional. ID of the category to output along with its descendants.
31
- * Default 0.
32
- * @param array $selected_cats Optional. List of categories to mark as checked. Default false.
33
- * @param array $popular_cats Optional. List of categories to receive the "popular-category" class.
34
- * Default false.
35
- * @param object $walker Optional. Walker object to use to build the output.
36
- * Default is a Walker_Category_Checklist instance.
37
- * @param bool $checked_ontop Optional. Whether to move checked items out of the hierarchy and to
38
- * the top of the list. Default true.
39
- */
40
- function wp_category_checklist( $post_id = 0, $descendants_and_self = 0, $selected_cats = false, $popular_cats = false, $walker = null, $checked_ontop = true ) {
41
- wp_terms_checklist( $post_id, array(
42
- 'taxonomy' => 'category',
43
- 'descendants_and_self' => $descendants_and_self,
44
- 'selected_cats' => $selected_cats,
45
- 'popular_cats' => $popular_cats,
46
- 'walker' => $walker,
47
- 'checked_ontop' => $checked_ontop
48
- ) );
49
- }
50
-
51
- /**
52
- * Output an unordered list of checkbox input elements labelled with term names.
53
- *
54
- * Taxonomy-independent version of wp_category_checklist().
55
- *
56
- * @since 3.0.0
57
- * @since 4.4.0 Introduced the `$echo` argument.
58
- *
59
- * @param int $post_id Optional. Post ID. Default 0.
60
- * @param array|string $args {
61
- * Optional. Array or string of arguments for generating a terms checklist. Default empty array.
62
- *
63
- * @type int $descendants_and_self ID of the category to output along with its descendants.
64
- * Default 0.
65
- * @type array $selected_cats List of categories to mark as checked. Default false.
66
- * @type array $popular_cats List of categories to receive the "popular-category" class.
67
- * Default false.
68
- * @type object $walker Walker object to use to build the output.
69
- * Default is a Walker_Category_Checklist instance.
70
- * @type string $taxonomy Taxonomy to generate the checklist for. Default 'category'.
71
- * @type bool $checked_ontop Whether to move checked items out of the hierarchy and to
72
- * the top of the list. Default true.
73
- * @type bool $echo Whether to echo the generated markup. False to return the markup instead
74
- * of echoing it. Default true.
75
- * }
76
- */
77
- function wp_terms_checklist( $post_id = 0, $args = array() ) {
78
- $defaults = array(
79
- 'descendants_and_self' => 0,
80
- 'selected_cats' => false,
81
- 'popular_cats' => false,
82
- 'walker' => null,
83
- 'taxonomy' => 'category',
84
- 'checked_ontop' => true,
85
- 'echo' => true,
86
- );
87
-
88
- /**
89
- * Filter the taxonomy terms checklist arguments.
90
- *
91
- * @since 3.4.0
92
- *
93
- * @see wp_terms_checklist()
94
- *
95
- * @param array $args An array of arguments.
96
- * @param int $post_id The post ID.
97
- */
98
- $params = apply_filters( 'wp_terms_checklist_args', $args, $post_id );
99
-
100
- $r = wp_parse_args( $params, $defaults );
101
-
102
- if ( empty( $r['walker'] ) || ! ( $r['walker'] instanceof Walker ) ) {
103
- $walker = new Walker_Category_Checklist;
104
- } else {
105
- $walker = $r['walker'];
106
- }
107
-
108
- $taxonomy = $r['taxonomy'];
109
- $descendants_and_self = (int) $r['descendants_and_self'];
110
-
111
- $args = array( 'taxonomy' => $taxonomy );
112
-
113
- $tax = get_taxonomy( $taxonomy );
114
- $args['disabled'] = ! current_user_can( $tax->cap->assign_terms );
115
-
116
- $args['list_only'] = ! empty( $r['list_only'] );
117
-
118
- if ( is_array( $r['selected_cats'] ) ) {
119
- $args['selected_cats'] = $r['selected_cats'];
120
- } elseif ( $post_id ) {
121
- $args['selected_cats'] = wp_get_object_terms( $post_id, $taxonomy, array_merge( $args, array( 'fields' => 'ids' ) ) );
122
- } else {
123
- $args['selected_cats'] = array();
124
- }
125
- if ( is_array( $r['popular_cats'] ) ) {
126
- $args['popular_cats'] = $r['popular_cats'];
127
- } else {
128
- $args['popular_cats'] = get_terms( $taxonomy, array(
129
- 'fields' => 'ids',
130
- 'orderby' => 'count',
131
- 'order' => 'DESC',
132
- 'number' => 10,
133
- 'hierarchical' => false
134
- ) );
135
- }
136
- if ( $descendants_and_self ) {
137
- $categories = (array) get_terms( $taxonomy, array(
138
- 'child_of' => $descendants_and_self,
139
- 'hierarchical' => 0,
140
- 'hide_empty' => 0
141
- ) );
142
- $self = get_term( $descendants_and_self, $taxonomy );
143
- array_unshift( $categories, $self );
144
- } else {
145
- $categories = (array) get_terms( $taxonomy, array( 'get' => 'all' ) );
146
- }
147
-
148
- $output = '';
149
-
150
- if ( $r['checked_ontop'] ) {
151
- // Post process $categories rather than adding an exclude to the get_terms() query to keep the query the same across all posts (for any query cache)
152
- $checked_categories = array();
153
- $keys = array_keys( $categories );
154
-
155
- foreach ( $keys as $k ) {
156
- if ( in_array( $categories[$k]->term_id, $args['selected_cats'] ) ) {
157
- $checked_categories[] = $categories[$k];
158
- unset( $categories[$k] );
159
- }
160
- }
161
-
162
- // Put checked cats on top
163
- $output .= call_user_func_array( array( $walker, 'walk' ), array( $checked_categories, 0, $args ) );
164
- }
165
- // Then the rest of them
166
- $output .= call_user_func_array( array( $walker, 'walk' ), array( $categories, 0, $args ) );
167
-
168
- if ( $r['echo'] ) {
169
- echo $output;
170
- }
171
-
172
- return $output;
173
- }
174
-
175
- /**
176
- * Retrieve a list of the most popular terms from the specified taxonomy.
177
- *
178
- * If the $echo argument is true then the elements for a list of checkbox
179
- * `<input>` elements labelled with the names of the selected terms is output.
180
- * If the $post_ID global isn't empty then the terms associated with that
181
- * post will be marked as checked.
182
- *
183
- * @since 2.5.0
184
- *
185
- * @param string $taxonomy Taxonomy to retrieve terms from.
186
- * @param int $default Not used.
187
- * @param int $number Number of terms to retrieve. Defaults to 10.
188
- * @param bool $echo Optionally output the list as well. Defaults to true.
189
- * @return array List of popular term IDs.
190
- */
191
- function wp_popular_terms_checklist( $taxonomy, $default = 0, $number = 10, $echo = true ) {
192
- $post = get_post();
193
-
194
- if ( $post && $post->ID )
195
- $checked_terms = wp_get_object_terms($post->ID, $taxonomy, array('fields'=>'ids'));
196
- else
197
- $checked_terms = array();
198
-
199
- $terms = get_terms( $taxonomy, array( 'orderby' => 'count', 'order' => 'DESC', 'number' => $number, 'hierarchical' => false ) );
200
-
201
- $tax = get_taxonomy($taxonomy);
202
-
203
- $popular_ids = array();
204
- foreach ( (array) $terms as $term ) {
205
- $popular_ids[] = $term->term_id;
206
- if ( !$echo ) // hack for AJAX use
207
- continue;
208
- $id = "popular-$taxonomy-$term->term_id";
209
- $checked = in_array( $term->term_id, $checked_terms ) ? 'checked="checked"' : '';
210
- ?>
211
-
212
- <li id="<?php echo $id; ?>" class="popular-category">
213
- <label class="selectit">
214
- <input id="in-<?php echo $id; ?>" type="checkbox" <?php echo $checked; ?> value="<?php echo (int) $term->term_id; ?>" <?php disabled( ! current_user_can( $tax->cap->assign_terms ) ); ?> />
215
- <?php
216
- /** This filter is documented in wp-includes/category-template.php */
217
- echo esc_html( apply_filters( 'the_category', $term->name ) );
218
- ?>
219
- </label>
220
- </li>
221
-
222
- <?php
223
- }
224
- return $popular_ids;
225
- }
226
-
227
- /**
228
- * Outputs a link category checklist element.
229
- *
230
- * @since 2.5.1
231
- *
232
- * @param int $link_id
233
- */
234
- function wp_link_category_checklist( $link_id = 0 ) {
235
- $default = 1;
236
-
237
- $checked_categories = array();
238
-
239
- if ( $link_id ) {
240
- $checked_categories = wp_get_link_cats( $link_id );
241
- // No selected categories, strange
242
- if ( ! count( $checked_categories ) ) {
243
- $checked_categories[] = $default;
244
- }
245
- } else {
246
- $checked_categories[] = $default;
247
- }
248
-
249
- $categories = get_terms( 'link_category', array( 'orderby' => 'name', 'hide_empty' => 0 ) );
250
-
251
- if ( empty( $categories ) )
252
- return;
253
-
254
- foreach ( $categories as $category ) {
255
- $cat_id = $category->term_id;
256
-
257
- /** This filter is documented in wp-includes/category-template.php */
258
- $name = esc_html( apply_filters( 'the_category', $category->name ) );
259
- $checked = in_array( $cat_id, $checked_categories ) ? ' checked="checked"' : '';
260
- echo '<li id="link-category-', $cat_id, '"><label for="in-link-category-', $cat_id, '" class="selectit"><input value="', $cat_id, '" type="checkbox" name="link_category[]" id="in-link-category-', $cat_id, '"', $checked, '/> ', $name, "</label></li>";
261
- }
262
- }
263
-
264
- /**
265
- * Adds hidden fields with the data for use in the inline editor for posts and pages.
266
- *
267
- * @since 2.7.0
268
- *
269
- * @param WP_Post $post Post object.
270
- */
271
- function get_inline_data($post) {
272
- $post_type_object = get_post_type_object($post->post_type);
273
- if ( ! current_user_can( 'edit_post', $post->ID ) )
274
- return;
275
-
276
- $title = esc_textarea( trim( $post->post_title ) );
277
-
278
- /** This filter is documented in wp-admin/edit-tag-form.php */
279
- echo '
280
- <div class="hidden" id="inline_' . $post->ID . '">
281
- <div class="post_title">' . $title . '</div>' .
282
- /** This filter is documented in wp-admin/edit-tag-form.php */
283
- '<div class="post_name">' . apply_filters( 'editable_slug', $post->post_name, $post ) . '</div>
284
- <div class="post_author">' . $post->post_author . '</div>
285
- <div class="comment_status">' . esc_html( $post->comment_status ) . '</div>
286
- <div class="ping_status">' . esc_html( $post->ping_status ) . '</div>
287
- <div class="_status">' . esc_html( $post->post_status ) . '</div>
288
- <div class="jj">' . mysql2date( 'd', $post->post_date, false ) . '</div>
289
- <div class="mm">' . mysql2date( 'm', $post->post_date, false ) . '</div>
290
- <div class="aa">' . mysql2date( 'Y', $post->post_date, false ) . '</div>
291
- <div class="hh">' . mysql2date( 'H', $post->post_date, false ) . '</div>
292
- <div class="mn">' . mysql2date( 'i', $post->post_date, false ) . '</div>
293
- <div class="ss">' . mysql2date( 's', $post->post_date, false ) . '</div>
294
- <div class="post_password">' . esc_html( $post->post_password ) . '</div>';
295
-
296
- if ( $post_type_object->hierarchical )
297
- echo '<div class="post_parent">' . $post->post_parent . '</div>';
298
-
299
- if ( $post->post_type == 'page' )
300
- echo '<div class="page_template">' . esc_html( get_post_meta( $post->ID, '_wp_page_template', true ) ) . '</div>';
301
-
302
- if ( post_type_supports( $post->post_type, 'page-attributes' ) )
303
- echo '<div class="menu_order">' . $post->menu_order . '</div>';
304
-
305
- $taxonomy_names = get_object_taxonomies( $post->post_type );
306
- foreach ( $taxonomy_names as $taxonomy_name) {
307
- $taxonomy = get_taxonomy( $taxonomy_name );
308
-
309
- if ( $taxonomy->hierarchical && $taxonomy->show_ui ) {
310
-
311
- $terms = get_object_term_cache( $post->ID, $taxonomy_name );
312
- if ( false === $terms ) {
313
- $terms = wp_get_object_terms( $post->ID, $taxonomy_name );
314
- wp_cache_add( $post->ID, $terms, $taxonomy_name . '_relationships' );
315
- }
316
- $term_ids = empty( $terms ) ? array() : wp_list_pluck( $terms, 'term_id' );
317
-
318
- echo '<div class="post_category" id="' . $taxonomy_name . '_' . $post->ID . '">' . implode( ',', $term_ids ) . '</div>';
319
-
320
- } elseif ( $taxonomy->show_ui ) {
321
-
322
- $terms_to_edit = get_terms_to_edit( $post->ID, $taxonomy_name );
323
- if ( ! is_string( $terms_to_edit ) ) {
324
- $terms_to_edit = '';
325
- }
326
-
327
- echo '<div class="tags_input" id="'.$taxonomy_name.'_'.$post->ID.'">'
328
- . esc_html( str_replace( ',', ', ', $terms_to_edit ) ) . '</div>';
329
-
330
- }
331
- }
332
-
333
- if ( !$post_type_object->hierarchical )
334
- echo '<div class="sticky">' . (is_sticky($post->ID) ? 'sticky' : '') . '</div>';
335
-
336
- if ( post_type_supports( $post->post_type, 'post-formats' ) )
337
- echo '<div class="post_format">' . esc_html( get_post_format( $post->ID ) ) . '</div>';
338
-
339
- echo '</div>';
340
- }
341
-
342
- /**
343
- * Outputs the in-line comment reply-to form in the Comments list table.
344
- *
345
- * @since 2.7.0
346
- *
347
- * @global WP_List_Table $wp_list_table
348
- *
349
- * @param int $position
350
- * @param bool $checkbox
351
- * @param string $mode
352
- * @param bool $table_row
353
- */
354
- function wp_comment_reply( $position = 1, $checkbox = false, $mode = 'single', $table_row = true ) {
355
- global $wp_list_table;
356
- /**
357
- * Filter the in-line comment reply-to form output in the Comments
358
- * list table.
359
- *
360
- * Returning a non-empty value here will short-circuit display
361
- * of the in-line comment-reply form in the Comments list table,
362
- * echoing the returned value instead.
363
- *
364
- * @since 2.7.0
365
- *
366
- * @see wp_comment_reply()
367
- *
368
- * @param string $content The reply-to form content.
369
- * @param array $args An array of default args.
370
- */
371
- $content = apply_filters( 'wp_comment_reply', '', array( 'position' => $position, 'checkbox' => $checkbox, 'mode' => $mode ) );
372
-
373
- if ( ! empty($content) ) {
374
- echo $content;
375
- return;
376
- }
377
-
378
- if ( ! $wp_list_table ) {
379
- if ( $mode == 'single' ) {
380
- $wp_list_table = _get_list_table('WP_Post_Comments_List_Table');
381
- } else {
382
- $wp_list_table = _get_list_table('WP_Comments_List_Table');
383
- }
384
- }
385
-
386
- ?>
387
- <form method="get">
388
- <?php if ( $table_row ) : ?>
389
- <table style="display:none;"><tbody id="com-reply"><tr id="replyrow" class="inline-edit-row" style="display:none;"><td colspan="<?php echo $wp_list_table->get_column_count(); ?>" class="colspanchange">
390
- <?php else : ?>
391
- <div id="com-reply" style="display:none;"><div id="replyrow" style="display:none;">
392
- <?php endif; ?>
393
- <fieldset class="comment-reply">
394
- <legend>
395
- <span class="hidden" id="editlegend"><?php _e( 'Edit Comment' ); ?></span>
396
- <span class="hidden" id="replyhead"><?php _e( 'Reply to Comment' ); ?></span>
397
- <span class="hidden" id="addhead"><?php _e( 'Add new Comment' ); ?></span>
398
- </legend>
399
-
400
- <div id="replycontainer">
401
- <label for="replycontent" class="screen-reader-text"><?php _e( 'Comment' ); ?></label>
402
- <?php
403
- $quicktags_settings = array( 'buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code,close' );
404
- wp_editor( '', 'replycontent', array( 'media_buttons' => false, 'tinymce' => false, 'quicktags' => $quicktags_settings ) );
405
- ?>
406
- </div>
407
-
408
- <div id="edithead" style="display:none;">
409
- <div class="inside">
410
- <label for="author-name"><?php _e( 'Name' ) ?></label>
411
- <input type="text" name="newcomment_author" size="50" value="" id="author-name" />
412
- </div>
413
-
414
- <div class="inside">
415
- <label for="author-email"><?php _e('Email') ?></label>
416
- <input type="text" name="newcomment_author_email" size="50" value="" id="author-email" />
417
- </div>
418
-
419
- <div class="inside">
420
- <label for="author-url"><?php _e('URL') ?></label>
421
- <input type="text" id="author-url" name="newcomment_author_url" class="code" size="103" value="" />
422
- </div>
423
- </div>
424
-
425
- <p id="replysubmit" class="submit">
426
- <a href="#comments-form" class="save button-primary alignright">
427
- <span id="addbtn" style="display:none;"><?php _e('Add Comment'); ?></span>
428
- <span id="savebtn" style="display:none;"><?php _e('Update Comment'); ?></span>
429
- <span id="replybtn" style="display:none;"><?php _e('Submit Reply'); ?></span></a>
430
- <a href="#comments-form" class="cancel button-secondary alignleft"><?php _e('Cancel'); ?></a>
431
- <span class="waiting spinner"></span>
432
- <span class="error" style="display:none;"></span>
433
- </p>
434
-
435
- <input type="hidden" name="action" id="action" value="" />
436
- <input type="hidden" name="comment_ID" id="comment_ID" value="" />
437
- <input type="hidden" name="comment_post_ID" id="comment_post_ID" value="" />
438
- <input type="hidden" name="status" id="status" value="" />
439
- <input type="hidden" name="position" id="position" value="<?php echo $position; ?>" />
440
- <input type="hidden" name="checkbox" id="checkbox" value="<?php echo $checkbox ? 1 : 0; ?>" />
441
- <input type="hidden" name="mode" id="mode" value="<?php echo esc_attr($mode); ?>" />
442
- <?php
443
- wp_nonce_field( 'replyto-comment', '_ajax_nonce-replyto-comment', false );
444
- if ( current_user_can( 'unfiltered_html' ) )
445
- wp_nonce_field( 'unfiltered-html-comment', '_wp_unfiltered_html_comment', false );
446
- ?>
447
- </fieldset>
448
- <?php if ( $table_row ) : ?>
449
- </td></tr></tbody></table>
450
- <?php else : ?>
451
- </div></div>
452
- <?php endif; ?>
453
- </form>
454
- <?php
455
- }
456
-
457
- /**
458
- * Output 'undo move to trash' text for comments
459
- *
460
- * @since 2.9.0
461
- */
462
- function wp_comment_trashnotice() {
463
- ?>
464
- <div class="hidden" id="trash-undo-holder">
465
- <div class="trash-undo-inside"><?php printf(__('Comment by %s moved to the trash.'), '<strong></strong>'); ?> <span class="undo untrash"><a href="#"><?php _e('Undo'); ?></a></span></div>
466
- </div>
467
- <div class="hidden" id="spam-undo-holder">
468
- <div class="spam-undo-inside"><?php printf(__('Comment by %s marked as spam.'), '<strong></strong>'); ?> <span class="undo unspam"><a href="#"><?php _e('Undo'); ?></a></span></div>
469
- </div>
470
- <?php
471
- }
472
-
473
- /**
474
- * Outputs a post's public meta data in the Custom Fields meta box.
475
- *
476
- * @since 1.2.0
477
- *
478
- * @param array $meta
479
- */
480
- function list_meta( $meta ) {
481
- // Exit if no meta
482
- if ( ! $meta ) {
483
- echo '
484
- <table id="list-table" style="display: none;">
485
- <thead>
486
- <tr>
487
- <th class="left">' . _x( 'Name', 'meta name' ) . '</th>
488
- <th>' . __( 'Value' ) . '</th>
489
- </tr>
490
- </thead>
491
- <tbody id="the-list" data-wp-lists="list:meta">
492
- <tr><td></td></tr>
493
- </tbody>
494
- </table>'; //TBODY needed for list-manipulation JS
495
- return;
496
- }
497
- $count = 0;
498
- ?>
499
- <table id="list-table">
500
- <thead>
501
- <tr>
502
- <th class="left"><?php _ex( 'Name', 'meta name' ) ?></th>
503
- <th><?php _e( 'Value' ) ?></th>
504
- </tr>
505
- </thead>
506
- <tbody id='the-list' data-wp-lists='list:meta'>
507
- <?php
508
- foreach ( $meta as $entry )
509
- echo _list_meta_row( $entry, $count );
510
- ?>
511
- </tbody>
512
- </table>
513
- <?php
514
- }
515
-
516
- /**
517
- * Outputs a single row of public meta data in the Custom Fields meta box.
518
- *
519
- * @since 2.5.0
520
- *
521
- * @staticvar string $update_nonce
522
- *
523
- * @param array $entry
524
- * @param int $count
525
- * @return string
526
- */
527
- function _list_meta_row( $entry, &$count ) {
528
- static $update_nonce = '';
529
-
530
- if ( is_protected_meta( $entry['meta_key'], 'post' ) )
531
- return '';
532
-
533
- if ( ! $update_nonce )
534
- $update_nonce = wp_create_nonce( 'add-meta' );
535
-
536
- $r = '';
537
- ++ $count;
538
-
539
- if ( is_serialized( $entry['meta_value'] ) ) {
540
- if ( is_serialized_string( $entry['meta_value'] ) ) {
541
- // This is a serialized string, so we should display it.
542
- $entry['meta_value'] = maybe_unserialize( $entry['meta_value'] );
543
- } else {
544
- // This is a serialized array/object so we should NOT display it.
545
- --$count;
546
- return '';
547
- }
548
- }
549
-
550
- $entry['meta_key'] = esc_attr($entry['meta_key']);
551
- $entry['meta_value'] = esc_textarea( $entry['meta_value'] ); // using a <textarea />
552
- $entry['meta_id'] = (int) $entry['meta_id'];
553
-
554
- $delete_nonce = wp_create_nonce( 'delete-meta_' . $entry['meta_id'] );
555
-
556
- $r .= "\n\t<tr id='meta-{$entry['meta_id']}'>";
557
- $r .= "\n\t\t<td class='left'><label class='screen-reader-text' for='meta-{$entry['meta_id']}-key'>" . __( 'Key' ) . "</label><input name='meta[{$entry['meta_id']}][key]' id='meta-{$entry['meta_id']}-key' type='text' size='20' value='{$entry['meta_key']}' />";
558
-
559
- $r .= "\n\t\t<div class='submit'>";
560
- $r .= get_submit_button( __( 'Delete' ), 'deletemeta small', "deletemeta[{$entry['meta_id']}]", false, array( 'data-wp-lists' => "delete:the-list:meta-{$entry['meta_id']}::_ajax_nonce=$delete_nonce" ) );
561
- $r .= "\n\t\t";
562
- $r .= get_submit_button( __( 'Update' ), 'updatemeta small', "meta-{$entry['meta_id']}-submit", false, array( 'data-wp-lists' => "add:the-list:meta-{$entry['meta_id']}::_ajax_nonce-add-meta=$update_nonce" ) );
563
- $r .= "</div>";
564
- $r .= wp_nonce_field( 'change-meta', '_ajax_nonce', false, false );
565
- $r .= "</td>";
566
-
567
- $r .= "\n\t\t<td><label class='screen-reader-text' for='meta-{$entry['meta_id']}-value'>" . __( 'Value' ) . "</label><textarea name='meta[{$entry['meta_id']}][value]' id='meta-{$entry['meta_id']}-value' rows='2' cols='30'>{$entry['meta_value']}</textarea></td>\n\t</tr>";
568
- return $r;
569
- }
570
-
571
- /**
572
- * Prints the form in the Custom Fields meta box.
573
- *
574
- * @since 1.2.0
575
- *
576
- * @global wpdb $wpdb WordPress database abstraction object.
577
- *
578
- * @param WP_Post $post Optional. The post being edited.
579
- */
580
- function meta_form( $post = null ) {
581
- global $wpdb;
582
- $post = get_post( $post );
583
-
584
- /**
585
- * Filter values for the meta key dropdown in the Custom Fields meta box.
586
- *
587
- * Returning a non-null value will effectively short-circuit and avoid a
588
- * potentially expensive query against postmeta.
589
- *
590
- * @since 4.4.0
591
- *
592
- * @param array|null $keys Pre-defined meta keys to be used in place of a postmeta query. Default null.
593
- * @param WP_Post $post The current post object.
594
- */
595
- $keys = apply_filters( 'postmeta_form_keys', null, $post );
596
-
597
- if ( null === $keys ) {
598
- /**
599
- * Filter the number of custom fields to retrieve for the drop-down
600
- * in the Custom Fields meta box.
601
- *
602
- * @since 2.1.0
603
- *
604
- * @param int $limit Number of custom fields to retrieve. Default 30.
605
- */
606
- $limit = apply_filters( 'postmeta_form_limit', 30 );
607
- $sql = "SELECT DISTINCT meta_key
608
- FROM $wpdb->postmeta
609
- WHERE meta_key NOT BETWEEN '_' AND '_z'
610
- HAVING meta_key NOT LIKE %s
611
- ORDER BY meta_key
612
- LIMIT %d";
613
- $keys = $wpdb->get_col( $wpdb->prepare( $sql, $wpdb->esc_like( '_' ) . '%', $limit ) );
614
- }
615
-
616
- if ( $keys ) {
617
- natcasesort( $keys );
618
- $meta_key_input_id = 'metakeyselect';
619
- } else {
620
- $meta_key_input_id = 'metakeyinput';
621
- }
622
- ?>
623
- <p><strong><?php _e( 'Add New Custom Field:' ) ?></strong></p>
624
- <table id="newmeta">
625
- <thead>
626
- <tr>
627
- <th class="left"><label for="<?php echo $meta_key_input_id; ?>"><?php _ex( 'Name', 'meta name' ) ?></label></th>
628
- <th><label for="metavalue"><?php _e( 'Value' ) ?></label></th>
629
- </tr>
630
- </thead>
631
-
632
- <tbody>
633
- <tr>
634
- <td id="newmetaleft" class="left">
635
- <?php if ( $keys ) { ?>
636
- <select id="metakeyselect" name="metakeyselect">
637
- <option value="#NONE#"><?php _e( '&mdash; Select &mdash;' ); ?></option>
638
- <?php
639
-
640
- foreach ( $keys as $key ) {
641
- if ( is_protected_meta( $key, 'post' ) || ! current_user_can( 'add_post_meta', $post->ID, $key ) )
642
- continue;
643
- echo "\n<option value='" . esc_attr($key) . "'>" . esc_html($key) . "</option>";
644
- }
645
- ?>
646
- </select>
647
- <input class="hide-if-js" type="text" id="metakeyinput" name="metakeyinput" value="" />
648
- <a href="#postcustomstuff" class="hide-if-no-js" onclick="jQuery('#metakeyinput, #metakeyselect, #enternew, #cancelnew').toggle();return false;">
649
- <span id="enternew"><?php _e('Enter new'); ?></span>
650
- <span id="cancelnew" class="hidden"><?php _e('Cancel'); ?></span></a>
651
- <?php } else { ?>
652
- <input type="text" id="metakeyinput" name="metakeyinput" value="" />
653
- <?php } ?>
654
- </td>
655
- <td><textarea id="metavalue" name="metavalue" rows="2" cols="25"></textarea></td>
656
- </tr>
657
-
658
- <tr><td colspan="2">
659
- <div class="submit">
660
- <?php submit_button( __( 'Add Custom Field' ), 'secondary', 'addmeta', false, array( 'id' => 'newmeta-submit', 'data-wp-lists' => 'add:the-list:newmeta' ) ); ?>
661
- </div>
662
- <?php wp_nonce_field( 'add-meta', '_ajax_nonce-add-meta', false ); ?>
663
- </td></tr>
664
- </tbody>
665
- </table>
666
- <?php
667
-
668
- }
669
-
670
- /**
671
- * Print out HTML form date elements for editing post or comment publish date.
672
- *
673
- * @since 0.71
674
- * @since 4.4.0 Converted to use get_comment() instead of the global `$comment`.
675
- *
676
- * @global WP_Locale $wp_locale
677
- *
678
- * @param int|bool $edit Accepts 1|true for editing the date, 0|false for adding the date.
679
- * @param int|bool $for_post Accepts 1|true for applying the date to a post, 0|false for a comment.
680
- * @param int $tab_index The tabindex attribute to add. Default 0.
681
- * @param int|bool $multi Optional. Whether the additional fields and buttons should be added.
682
- * Default 0|false.
683
- */
684
- function touch_time( $edit = 1, $for_post = 1, $tab_index = 0, $multi = 0 ) {
685
- global $wp_locale;
686
- $post = get_post();
687
-
688
- if ( $for_post )
689
- $edit = ! ( in_array($post->post_status, array('draft', 'pending') ) && (!$post->post_date_gmt || '0000-00-00 00:00:00' == $post->post_date_gmt ) );
690
-
691
- $tab_index_attribute = '';
692
- if ( (int) $tab_index > 0 )
693
- $tab_index_attribute = " tabindex=\"$tab_index\"";
694
-
695
- // todo: Remove this?
696
- // echo '<label for="timestamp" style="display: block;"><input type="checkbox" class="checkbox" name="edit_date" value="1" id="timestamp"'.$tab_index_attribute.' /> '.__( 'Edit timestamp' ).'</label><br />';
697
-
698
- $time_adj = current_time('timestamp');
699
- $post_date = ($for_post) ? $post->post_date : get_comment()->comment_date;
700
- $jj = ($edit) ? mysql2date( 'd', $post_date, false ) : gmdate( 'd', $time_adj );
701
- $mm = ($edit) ? mysql2date( 'm', $post_date, false ) : gmdate( 'm', $time_adj );
702
- $aa = ($edit) ? mysql2date( 'Y', $post_date, false ) : gmdate( 'Y', $time_adj );
703
- $hh = ($edit) ? mysql2date( 'H', $post_date, false ) : gmdate( 'H', $time_adj );
704
- $mn = ($edit) ? mysql2date( 'i', $post_date, false ) : gmdate( 'i', $time_adj );
705
- $ss = ($edit) ? mysql2date( 's', $post_date, false ) : gmdate( 's', $time_adj );
706
-
707
- $cur_jj = gmdate( 'd', $time_adj );
708
- $cur_mm = gmdate( 'm', $time_adj );
709
- $cur_aa = gmdate( 'Y', $time_adj );
710
- $cur_hh = gmdate( 'H', $time_adj );
711
- $cur_mn = gmdate( 'i', $time_adj );
712
-
713
- $month = '<label><span class="screen-reader-text">' . __( 'Month' ) . '</span><select ' . ( $multi ? '' : 'id="mm" ' ) . 'name="mm"' . $tab_index_attribute . ">\n";
714
- for ( $i = 1; $i < 13; $i = $i +1 ) {
715
- $monthnum = zeroise($i, 2);
716
- $monthtext = $wp_locale->get_month_abbrev( $wp_locale->get_month( $i ) );
717
- $month .= "\t\t\t" . '<option value="' . $monthnum . '" data-text="' . $monthtext . '" ' . selected( $monthnum, $mm, false ) . '>';
718
- /* translators: 1: month number (01, 02, etc.), 2: month abbreviation */
719
- $month .= sprintf( __( '%1$s-%2$s' ), $monthnum, $monthtext ) . "</option>\n";
720
- }
721
- $month .= '</select></label>';
722
-
723
- $day = '<label><span class="screen-reader-text">' . __( 'Day' ) . '</span><input type="text" ' . ( $multi ? '' : 'id="jj" ' ) . 'name="jj" value="' . $jj . '" size="2" maxlength="2"' . $tab_index_attribute . ' autocomplete="off" /></label>';
724
- $year = '<label><span class="screen-reader-text">' . __( 'Year' ) . '</span><input type="text" ' . ( $multi ? '' : 'id="aa" ' ) . 'name="aa" value="' . $aa . '" size="4" maxlength="4"' . $tab_index_attribute . ' autocomplete="off" /></label>';
725
- $hour = '<label><span class="screen-reader-text">' . __( 'Hour' ) . '</span><input type="text" ' . ( $multi ? '' : 'id="hh" ' ) . 'name="hh" value="' . $hh . '" size="2" maxlength="2"' . $tab_index_attribute . ' autocomplete="off" /></label>';
726
- $minute = '<label><span class="screen-reader-text">' . __( 'Minute' ) . '</span><input type="text" ' . ( $multi ? '' : 'id="mn" ' ) . 'name="mn" value="' . $mn . '" size="2" maxlength="2"' . $tab_index_attribute . ' autocomplete="off" /></label>';
727
-
728
- echo '<div class="timestamp-wrap">';
729
- /* translators: 1: month, 2: day, 3: year, 4: hour, 5: minute */
730
- printf( __( '%1$s %2$s, %3$s @ %4$s:%5$s' ), $month, $day, $year, $hour, $minute );
731
-
732
- echo '</div><input type="hidden" id="ss" name="ss" value="' . $ss . '" />';
733
-
734
- if ( $multi ) return;
735
-
736
- echo "\n\n";
737
- $map = array(
738
- 'mm' => array( $mm, $cur_mm ),
739
- 'jj' => array( $jj, $cur_jj ),
740
- 'aa' => array( $aa, $cur_aa ),
741
- 'hh' => array( $hh, $cur_hh ),
742
- 'mn' => array( $mn, $cur_mn ),
743
- );
744
- foreach ( $map as $timeunit => $value ) {
745
- list( $unit, $curr ) = $value;
746
-
747
- echo '<input type="hidden" id="hidden_' . $timeunit . '" name="hidden_' . $timeunit . '" value="' . $unit . '" />' . "\n";
748
- $cur_timeunit = 'cur_' . $timeunit;
749
- echo '<input type="hidden" id="' . $cur_timeunit . '" name="' . $cur_timeunit . '" value="' . $curr . '" />' . "\n";
750
- }
751
- ?>
752
-
753
- <p>
754
- <a href="#edit_timestamp" class="save-timestamp hide-if-no-js button"><?php _e('OK'); ?></a>
755
- <a href="#edit_timestamp" class="cancel-timestamp hide-if-no-js button-cancel"><?php _e('Cancel'); ?></a>
756
- </p>
757
- <?php
758
- }
759
-
760
- /**
761
- * Print out option HTML elements for the page templates drop-down.
762
- *
763
- * @since 1.5.0
764
- *
765
- * @param string $default Optional. The template file name. Default empty.
766
- */
767
- function page_template_dropdown( $default = '' ) {
768
- $templates = get_page_templates( get_post() );
769
- ksort( $templates );
770
- foreach ( array_keys( $templates ) as $template ) {
771
- $selected = selected( $default, $templates[ $template ], false );
772
- echo "\n\t<option value='" . $templates[ $template ] . "' $selected>$template</option>";
773
- }
774
- }
775
-
776
- /**
777
- * Print out option HTML elements for the page parents drop-down.
778
- *
779
- * @since 1.5.0
780
- * @since 4.4.0 `$post` argument was added.
781
- *
782
- * @global wpdb $wpdb WordPress database abstraction object.
783
- *
784
- * @param int $default Optional. The default page ID to be pre-selected. Default 0.
785
- * @param int $parent Optional. The parent page ID. Default 0.
786
- * @param int $level Optional. Page depth level. Default 0.
787
- * @param int|WP_Post $post Post ID or WP_Post object.
788
- *
789
- * @return null|false Boolean False if page has no children, otherwise print out html elements
790
- */
791
- function parent_dropdown( $default = 0, $parent = 0, $level = 0, $post = null ) {
792
- global $wpdb;
793
- $post = get_post( $post );
794
- $items = $wpdb->get_results( $wpdb->prepare("SELECT ID, post_parent, post_title FROM $wpdb->posts WHERE post_parent = %d AND post_type = 'page' ORDER BY menu_order", $parent) );
795
-
796
- if ( $items ) {
797
- foreach ( $items as $item ) {
798
- // A page cannot be its own parent.
799
- if ( $post && $post->ID && $item->ID == $post->ID )
800
- continue;
801
-
802
- $pad = str_repeat( '&nbsp;', $level * 3 );
803
- $selected = selected( $default, $item->ID, false );
804
-
805
- echo "\n\t<option class='level-$level' value='$item->ID' $selected>$pad " . esc_html($item->post_title) . "</option>";
806
- parent_dropdown( $default, $item->ID, $level +1 );
807
- }
808
- } else {
809
- return false;
810
- }
811
- }
812
-
813
- /**
814
- * Print out option html elements for role selectors.
815
- *
816
- * @since 2.1.0
817
- *
818
- * @param string $selected Slug for the role that should be already selected.
819
- */
820
- function wp_dropdown_roles( $selected = '' ) {
821
- $p = '';
822
- $r = '';
823
-
824
- $editable_roles = array_reverse( get_editable_roles() );
825
-
826
- foreach ( $editable_roles as $role => $details ) {
827
- $name = translate_user_role($details['name'] );
828
- if ( $selected == $role ) // preselect specified role
829
- $p = "\n\t<option selected='selected' value='" . esc_attr($role) . "'>$name</option>";
830
- else
831
- $r .= "\n\t<option value='" . esc_attr($role) . "'>$name</option>";
832
- }
833
- echo $p . $r;
834
- }
835
-
836
- /**
837
- * Outputs the form used by the importers to accept the data to be imported
838
- *
839
- * @since 2.0.0
840
- *
841
- * @param string $action The action attribute for the form.
842
- */
843
- function wp_import_upload_form( $action ) {
844
-
845
- /**
846
- * Filter the maximum allowed upload size for import files.
847
- *
848
- * @since 2.3.0
849
- *
850
- * @see wp_max_upload_size()
851
- *
852
- * @param int $max_upload_size Allowed upload size. Default 1 MB.
853
- */
854
- $bytes = apply_filters( 'import_upload_size_limit', wp_max_upload_size() );
855
- $size = size_format( $bytes );
856
- $upload_dir = wp_upload_dir();
857
- if ( ! empty( $upload_dir['error'] ) ) :
858
- ?><div class="error"><p><?php _e('Before you can upload your import file, you will need to fix the following error:'); ?></p>
859
- <p><strong><?php echo $upload_dir['error']; ?></strong></p></div><?php
860
- else :
861
- ?>
862
- <form enctype="multipart/form-data" id="import-upload-form" method="post" class="wp-upload-form" action="<?php echo esc_url( wp_nonce_url( $action, 'import-upload' ) ); ?>">
863
- <p>
864
- <label for="upload"><?php _e( 'Choose a file from your computer:' ); ?></label> (<?php printf( __('Maximum size: %s' ), $size ); ?>)
865
- <input type="file" id="upload" name="import" size="25" />
866
- <input type="hidden" name="action" value="save" />
867
- <input type="hidden" name="max_file_size" value="<?php echo $bytes; ?>" />
868
- </p>
869
- <?php submit_button( __('Upload file and import'), 'primary' ); ?>
870
- </form>
871
- <?php
872
- endif;
873
- }
874
-
875
- /**
876
- * Adds a meta box to one or more screens.
877
- *
878
- * @since 2.5.0
879
- * @since 4.4.0 The `$screen` parameter now accepts an array of screen IDs.
880
- *
881
- * @global array $wp_meta_boxes
882
- *
883
- * @param string $id Meta box ID (used in the 'id' attribute for the meta box).
884
- * @param string $title Title of the meta box.
885
- * @param callable $callback Function that fills the box with the desired content.
886
- * The function should echo its output.
887
- * @param string|array|WP_Screen $screen Optional. The screen or screens on which to show the box
888
- * (such as a post type, 'link', or 'comment'). Accepts a single
889
- * screen ID, WP_Screen object, or array of screen IDs. Default
890
- * is the current screen.
891
- * @param string $context Optional. The context within the screen where the boxes
892
- * should display. Available contexts vary from screen to
893
- * screen. Post edit screen contexts include 'normal', 'side',
894
- * and 'advanced'. Comments screen contexts include 'normal'
895
- * and 'side'. Menus meta boxes (accordion sections) all use
896
- * the 'side' context. Global default is 'advanced'.
897
- * @param string $priority Optional. The priority within the context where the boxes
898
- * should show ('high', 'low'). Default 'default'.
899
- * @param array $callback_args Optional. Data that should be set as the $args property
900
- * of the box array (which is the second parameter passed
901
- * to your callback). Default null.
902
- */
903
- function add_meta_box( $id, $title, $callback, $screen = null, $context = 'advanced', $priority = 'default', $callback_args = null ) {
904
- global $wp_meta_boxes;
905
-
906
- if ( empty( $screen ) ) {
907
- $screen = get_current_screen();
908
- } elseif ( is_string( $screen ) ) {
909
- $screen = convert_to_screen( $screen );
910
- } elseif ( is_array( $screen ) ) {
911
- foreach ( $screen as $single_screen ) {
912
- add_meta_box( $id, $title, $callback, $single_screen, $context, $priority, $callback_args );
913
- }
914
- }
915
-
916
- if ( ! isset( $screen->id ) ) {
917
- return;
918
- }
919
-
920
- $page = $screen->id;
921
-
922
- if ( !isset($wp_meta_boxes) )
923
- $wp_meta_boxes = array();
924
- if ( !isset($wp_meta_boxes[$page]) )
925
- $wp_meta_boxes[$page] = array();
926
- if ( !isset($wp_meta_boxes[$page][$context]) )
927
- $wp_meta_boxes[$page][$context] = array();
928
-
929
- foreach ( array_keys($wp_meta_boxes[$page]) as $a_context ) {
930
- foreach ( array('high', 'core', 'default', 'low') as $a_priority ) {
931
- if ( !isset($wp_meta_boxes[$page][$a_context][$a_priority][$id]) )
932
- continue;
933
-
934
- // If a core box was previously added or removed by a plugin, don't add.
935
- if ( 'core' == $priority ) {
936
- // If core box previously deleted, don't add
937
- if ( false === $wp_meta_boxes[$page][$a_context][$a_priority][$id] )
938
- return;
939
-
940
- /*
941
- * If box was added with default priority, give it core priority to
942
- * maintain sort order.
943
- */
944
- if ( 'default' == $a_priority ) {
945
- $wp_meta_boxes[$page][$a_context]['core'][$id] = $wp_meta_boxes[$page][$a_context]['default'][$id];
946
- unset($wp_meta_boxes[$page][$a_context]['default'][$id]);
947
- }
948
- return;
949
- }
950
- // If no priority given and id already present, use existing priority.
951
- if ( empty($priority) ) {
952
- $priority = $a_priority;
953
- /*
954
- * Else, if we're adding to the sorted priority, we don't know the title
955
- * or callback. Grab them from the previously added context/priority.
956
- */
957
- } elseif ( 'sorted' == $priority ) {
958
- $title = $wp_meta_boxes[$page][$a_context][$a_priority][$id]['title'];
959
- $callback = $wp_meta_boxes[$page][$a_context][$a_priority][$id]['callback'];
960
- $callback_args = $wp_meta_boxes[$page][$a_context][$a_priority][$id]['args'];
961
- }
962
- // An id can be in only one priority and one context.
963
- if ( $priority != $a_priority || $context != $a_context )
964
- unset($wp_meta_boxes[$page][$a_context][$a_priority][$id]);
965
- }
966
- }
967
-
968
- if ( empty($priority) )
969
- $priority = 'low';
970
-
971
- if ( !isset($wp_meta_boxes[$page][$context][$priority]) )
972
- $wp_meta_boxes[$page][$context][$priority] = array();
973
-
974
- $wp_meta_boxes[$page][$context][$priority][$id] = array('id' => $id, 'title' => $title, 'callback' => $callback, 'args' => $callback_args);
975
- }
976
-
977
- /**
978
- * Meta-Box template function
979
- *
980
- * @since 2.5.0
981
- *
982
- * @global array $wp_meta_boxes
983
- *
984
- * @staticvar bool $already_sorted
985
- * @param string|WP_Screen $screen Screen identifier
986
- * @param string $context box context
987
- * @param mixed $object gets passed to the box callback function as first parameter
988
- * @return int number of meta_boxes
989
- */
990
- function do_meta_boxes( $screen, $context, $object ) {
991
- global $wp_meta_boxes;
992
- static $already_sorted = false;
993
-
994
- if ( empty( $screen ) )
995
- $screen = get_current_screen();
996
- elseif ( is_string( $screen ) )
997
- $screen = convert_to_screen( $screen );
998
-
999
- $page = $screen->id;
1000
-
1001
- $hidden = get_hidden_meta_boxes( $screen );
1002
-
1003
- printf('<div id="%s-sortables" class="meta-box-sortables">', htmlspecialchars($context));
1004
-
1005
- // Grab the ones the user has manually sorted. Pull them out of their previous context/priority and into the one the user chose
1006
- if ( ! $already_sorted && $sorted = get_user_option( "meta-box-order_$page" ) ) {
1007
- foreach ( $sorted as $box_context => $ids ) {
1008
- foreach ( explode( ',', $ids ) as $id ) {
1009
- if ( $id && 'dashboard_browser_nag' !== $id ) {
1010
- add_meta_box( $id, null, null, $screen, $box_context, 'sorted' );
1011
- }
1012
- }
1013
- }
1014
- }
1015
-
1016
- $already_sorted = true;
1017
-
1018
- $i = 0;
1019
-
1020
- if ( isset( $wp_meta_boxes[ $page ][ $context ] ) ) {
1021
- foreach ( array( 'high', 'sorted', 'core', 'default', 'low' ) as $priority ) {
1022
- if ( isset( $wp_meta_boxes[ $page ][ $context ][ $priority ]) ) {
1023
- foreach ( (array) $wp_meta_boxes[ $page ][ $context ][ $priority ] as $box ) {
1024
- if ( false == $box || ! $box['title'] )
1025
- continue;
1026
- $i++;
1027
- $hidden_class = in_array($box['id'], $hidden) ? ' hide-if-js' : '';
1028
- echo '<div id="' . $box['id'] . '" class="postbox ' . postbox_classes($box['id'], $page) . $hidden_class . '" ' . '>' . "\n";
1029
- if ( 'dashboard_browser_nag' != $box['id'] ) {
1030
- echo '<button type="button" class="handlediv button-link" aria-expanded="true">';
1031
- echo '<span class="screen-reader-text">' . sprintf( __( 'Toggle panel: %s' ), $box['title'] ) . '</span>';
1032
- echo '<span class="toggle-indicator" aria-hidden="true"></span>';
1033
- echo '</button>';
1034
- }
1035
- echo "<h2 class='hndle'><span>{$box['title']}</span></h2>\n";
1036
- echo '<div class="inside">' . "\n";
1037
- call_user_func($box['callback'], $object, $box);
1038
- echo "</div>\n";
1039
- echo "</div>\n";
1040
- }
1041
- }
1042
- }
1043
- }
1044
-
1045
- echo "</div>";
1046
-
1047
- return $i;
1048
-
1049
- }
1050
-
1051
- /**
1052
- * Removes a meta box from one or more screens.
1053
- *
1054
- * @since 2.6.0
1055
- * @since 4.4.0 The `$screen` parameter now accepts an array of screen IDs.
1056
- *
1057
- * @global array $wp_meta_boxes
1058
- *
1059
- * @param string $id Meta box ID (used in the 'id' attribute for the meta box).
1060
- * @param string|array|WP_Screen $screen The screen or screens on which the meta box is shown (such as a
1061
- * post type, 'link', or 'comment'). Accepts a single screen ID,
1062
- * WP_Screen object, or array of screen IDs.
1063
- * @param string $context Optional. The context within the screen where the boxes
1064
- * should display. Available contexts vary from screen to
1065
- * screen. Post edit screen contexts include 'normal', 'side',
1066
- * and 'advanced'. Comments screen contexts include 'normal'
1067
- * and 'side'. Menus meta boxes (accordion sections) all use
1068
- * the 'side' context. Global default is 'advanced'.
1069
- */
1070
- function remove_meta_box( $id, $screen, $context ) {
1071
- global $wp_meta_boxes;
1072
-
1073
- if ( empty( $screen ) ) {
1074
- $screen = get_current_screen();
1075
- } elseif ( is_string( $screen ) ) {
1076
- $screen = convert_to_screen( $screen );
1077
- } elseif ( is_array( $screen ) ) {
1078
- foreach ( $screen as $single_screen ) {
1079
- remove_meta_box( $id, $single_screen, $context );
1080
- }
1081
- }
1082
-
1083
- if ( ! isset( $screen->id ) ) {
1084
- return;
1085
- }
1086
-
1087
- $page = $screen->id;
1088
-
1089
- if ( !isset($wp_meta_boxes) )
1090
- $wp_meta_boxes = array();
1091
- if ( !isset($wp_meta_boxes[$page]) )
1092
- $wp_meta_boxes[$page] = array();
1093
- if ( !isset($wp_meta_boxes[$page][$context]) )
1094
- $wp_meta_boxes[$page][$context] = array();
1095
-
1096
- foreach ( array('high', 'core', 'default', 'low') as $priority )
1097
- $wp_meta_boxes[$page][$context][$priority][$id] = false;
1098
- }
1099
-
1100
- /**
1101
- * Meta Box Accordion Template Function
1102
- *
1103
- * Largely made up of abstracted code from {@link do_meta_boxes()}, this
1104
- * function serves to build meta boxes as list items for display as
1105
- * a collapsible accordion.
1106
- *
1107
- * @since 3.6.0
1108
- *
1109
- * @uses global $wp_meta_boxes Used to retrieve registered meta boxes.
1110
- *
1111
- * @param string|object $screen The screen identifier.
1112
- * @param string $context The meta box context.
1113
- * @param mixed $object gets passed to the section callback function as first parameter.
1114
- * @return int number of meta boxes as accordion sections.
1115
- */
1116
- function do_accordion_sections( $screen, $context, $object ) {
1117
- global $wp_meta_boxes;
1118
-
1119
- wp_enqueue_script( 'accordion' );
1120
-
1121
- if ( empty( $screen ) )
1122
- $screen = get_current_screen();
1123
- elseif ( is_string( $screen ) )
1124
- $screen = convert_to_screen( $screen );
1125
-
1126
- $page = $screen->id;
1127
-
1128
- $hidden = get_hidden_meta_boxes( $screen );
1129
- ?>
1130
- <div id="side-sortables" class="accordion-container">
1131
- <ul class="outer-border">
1132
- <?php
1133
- $i = 0;
1134
- $first_open = false;
1135
-
1136
- if ( isset( $wp_meta_boxes[ $page ][ $context ] ) ) {
1137
- foreach ( array( 'high', 'core', 'default', 'low' ) as $priority ) {
1138
- if ( isset( $wp_meta_boxes[ $page ][ $context ][ $priority ] ) ) {
1139
- foreach ( $wp_meta_boxes[ $page ][ $context ][ $priority ] as $box ) {
1140
- if ( false == $box || ! $box['title'] )
1141
- continue;
1142
- $i++;
1143
- $hidden_class = in_array( $box['id'], $hidden ) ? 'hide-if-js' : '';
1144
-
1145
- $open_class = '';
1146
- if ( ! $first_open && empty( $hidden_class ) ) {
1147
- $first_open = true;
1148
- $open_class = 'open';
1149
- }
1150
- ?>
1151
- <li class="control-section accordion-section <?php echo $hidden_class; ?> <?php echo $open_class; ?> <?php echo esc_attr( $box['id'] ); ?>" id="<?php echo esc_attr( $box['id'] ); ?>">
1152
- <h3 class="accordion-section-title hndle" tabindex="0">
1153
- <?php echo esc_html( $box['title'] ); ?>
1154
- <span class="screen-reader-text"><?php _e( 'Press return or enter to open this section' ); ?></span>
1155
- </h3>
1156
- <div class="accordion-section-content <?php postbox_classes( $box['id'], $page ); ?>">
1157
- <div class="inside">
1158
- <?php call_user_func( $box['callback'], $object, $box ); ?>
1159
- </div><!-- .inside -->
1160
- </div><!-- .accordion-section-content -->
1161
- </li><!-- .accordion-section -->
1162
- <?php
1163
- }
1164
- }
1165
- }
1166
- }
1167
- ?>
1168
- </ul><!-- .outer-border -->
1169
- </div><!-- .accordion-container -->
1170
- <?php
1171
- return $i;
1172
- }
1173
-
1174
- /**
1175
- * Add a new section to a settings page.
1176
- *
1177
- * Part of the Settings API. Use this to define new settings sections for an admin page.
1178
- * Show settings sections in your admin page callback function with do_settings_sections().
1179
- * Add settings fields to your section with add_settings_field()
1180
- *
1181
- * The $callback argument should be the name of a function that echoes out any
1182
- * content you want to show at the top of the settings section before the actual
1183
- * fields. It can output nothing if you want.
1184
- *
1185
- * @since 2.7.0
1186
- *
1187
- * @global $wp_settings_sections Storage array of all settings sections added to admin pages
1188
- *
1189
- * @param string $id Slug-name to identify the section. Used in the 'id' attribute of tags.
1190
- * @param string $title Formatted title of the section. Shown as the heading for the section.
1191
- * @param string $callback Function that echos out any content at the top of the section (between heading and fields).
1192
- * @param string $page The slug-name of the settings page on which to show the section. Built-in pages include 'general', 'reading', 'writing', 'discussion', 'media', etc. Create your own using add_options_page();
1193
- */
1194
- function add_settings_section($id, $title, $callback, $page) {
1195
- global $wp_settings_sections;
1196
-
1197
- if ( 'misc' == $page ) {
1198
- _deprecated_argument( __FUNCTION__, '3.0', sprintf( __( 'The "%s" options group has been removed. Use another settings group.' ), 'misc' ) );
1199
- $page = 'general';
1200
- }
1201
-
1202
- if ( 'privacy' == $page ) {
1203
- _deprecated_argument( __FUNCTION__, '3.5', sprintf( __( 'The "%s" options group has been removed. Use another settings group.' ), 'privacy' ) );
1204
- $page = 'reading';
1205
- }
1206
-
1207
- $wp_settings_sections[$page][$id] = array('id' => $id, 'title' => $title, 'callback' => $callback);
1208
- }
1209
-
1210
- /**
1211
- * Add a new field to a section of a settings page
1212
- *
1213
- * Part of the Settings API. Use this to define a settings field that will show
1214
- * as part of a settings section inside a settings page. The fields are shown using
1215
- * do_settings_fields() in do_settings-sections()
1216
- *
1217
- * The $callback argument should be the name of a function that echoes out the
1218
- * html input tags for this setting field. Use get_option() to retrieve existing
1219
- * values to show.
1220
- *
1221
- * @since 2.7.0
1222
- * @since 4.2.0 The `$class` argument was added.
1223
- *
1224
- * @global $wp_settings_fields Storage array of settings fields and info about their pages/sections
1225
- *
1226
- * @param string $id Slug-name to identify the field. Used in the 'id' attribute of tags.
1227
- * @param string $title Formatted title of the field. Shown as the label for the field
1228
- * during output.
1229
- * @param string $callback Function that fills the field with the desired form inputs. The
1230
- * function should echo its output.
1231
- * @param string $page The slug-name of the settings page on which to show the section
1232
- * (general, reading, writing, ...).
1233
- * @param string $section Optional. The slug-name of the section of the settings page
1234
- * in which to show the box. Default 'default'.
1235
- * @param array $args {
1236
- * Optional. Extra arguments used when outputting the field.
1237
- *
1238
- * @type string $label_for When supplied, the setting title will be wrapped
1239
- * in a `<label>` element, its `for` attribute populated
1240
- * with this value.
1241
- * @type string $class CSS Class to be added to the `<tr>` element when the
1242
- * field is output.
1243
- * }
1244
- */
1245
- function add_settings_field($id, $title, $callback, $page, $section = 'default', $args = array()) {
1246
- global $wp_settings_fields;
1247
-
1248
- if ( 'misc' == $page ) {
1249
- _deprecated_argument( __FUNCTION__, '3.0', __( 'The miscellaneous options group has been removed. Use another settings group.' ) );
1250
- $page = 'general';
1251
- }
1252
-
1253
- if ( 'privacy' == $page ) {
1254
- _deprecated_argument( __FUNCTION__, '3.5', __( 'The privacy options group has been removed. Use another settings group.' ) );
1255
- $page = 'reading';
1256
- }
1257
-
1258
- $wp_settings_fields[$page][$section][$id] = array('id' => $id, 'title' => $title, 'callback' => $callback, 'args' => $args);
1259
- }
1260
-
1261
- /**
1262
- * Prints out all settings sections added to a particular settings page
1263
- *
1264
- * Part of the Settings API. Use this in a settings page callback function
1265
- * to output all the sections and fields that were added to that $page with
1266
- * add_settings_section() and add_settings_field()
1267
- *
1268
- * @global $wp_settings_sections Storage array of all settings sections added to admin pages
1269
- * @global $wp_settings_fields Storage array of settings fields and info about their pages/sections
1270
- * @since 2.7.0
1271
- *
1272
- * @param string $page The slug name of the page whose settings sections you want to output
1273
- */
1274
- function do_settings_sections( $page ) {
1275
- global $wp_settings_sections, $wp_settings_fields;
1276
-
1277
- if ( ! isset( $wp_settings_sections[$page] ) )
1278
- return;
1279
-
1280
- foreach ( (array) $wp_settings_sections[$page] as $section ) {
1281
- if ( $section['title'] )
1282
- echo "<h2>{$section['title']}</h2>\n";
1283
-
1284
- if ( $section['callback'] )
1285
- call_user_func( $section['callback'], $section );
1286
-
1287
- if ( ! isset( $wp_settings_fields ) || !isset( $wp_settings_fields[$page] ) || !isset( $wp_settings_fields[$page][$section['id']] ) )
1288
- continue;
1289
- echo '<table class="form-table">';
1290
- do_settings_fields( $page, $section['id'] );
1291
- echo '</table>';
1292
- }
1293
- }
1294
-
1295
- /**
1296
- * Print out the settings fields for a particular settings section
1297
- *
1298
- * Part of the Settings API. Use this in a settings page to output
1299
- * a specific section. Should normally be called by do_settings_sections()
1300
- * rather than directly.
1301
- *
1302
- * @global $wp_settings_fields Storage array of settings fields and their pages/sections
1303
- *
1304
- * @since 2.7.0
1305
- *
1306
- * @param string $page Slug title of the admin page who's settings fields you want to show.
1307
- * @param string $section Slug title of the settings section who's fields you want to show.
1308
- */
1309
- function do_settings_fields($page, $section) {
1310
- global $wp_settings_fields;
1311
-
1312
- if ( ! isset( $wp_settings_fields[$page][$section] ) )
1313
- return;
1314
-
1315
- foreach ( (array) $wp_settings_fields[$page][$section] as $field ) {
1316
- $class = '';
1317
-
1318
- if ( ! empty( $field['args']['class'] ) ) {
1319
- $class = ' class="' . esc_attr( $field['args']['class'] ) . '"';
1320
- }
1321
-
1322
- echo "<tr{$class}>";
1323
-
1324
- if ( ! empty( $field['args']['label_for'] ) ) {
1325
- echo '<th scope="row"><label for="' . esc_attr( $field['args']['label_for'] ) . '">' . $field['title'] . '</label></th>';
1326
- } else {
1327
- echo '<th scope="row">' . $field['title'] . '</th>';
1328
- }
1329
-
1330
- echo '<td>';
1331
- call_user_func($field['callback'], $field['args']);
1332
- echo '</td>';
1333
- echo '</tr>';
1334
- }
1335
- }
1336
-
1337
- /**
1338
- * Register a settings error to be displayed to the user
1339
- *
1340
- * Part of the Settings API. Use this to show messages to users about settings validation
1341
- * problems, missing settings or anything else.
1342
- *
1343
- * Settings errors should be added inside the $sanitize_callback function defined in
1344
- * register_setting() for a given setting to give feedback about the submission.
1345
- *
1346
- * By default messages will show immediately after the submission that generated the error.
1347
- * Additional calls to settings_errors() can be used to show errors even when the settings
1348
- * page is first accessed.
1349
- *
1350
- * @since 3.0.0
1351
- *
1352
- * @global array $wp_settings_errors Storage array of errors registered during this pageload
1353
- *
1354
- * @param string $setting Slug title of the setting to which this error applies
1355
- * @param string $code Slug-name to identify the error. Used as part of 'id' attribute in HTML output.
1356
- * @param string $message The formatted message text to display to the user (will be shown inside styled
1357
- * `<div>` and `<p>` tags).
1358
- * @param string $type Optional. Message type, controls HTML class. Accepts 'error' or 'updated'.
1359
- * Default 'error'.
1360
- */
1361
- function add_settings_error( $setting, $code, $message, $type = 'error' ) {
1362
- global $wp_settings_errors;
1363
-
1364
- $wp_settings_errors[] = array(
1365
- 'setting' => $setting,
1366
- 'code' => $code,
1367
- 'message' => $message,
1368
- 'type' => $type
1369
- );
1370
- }
1371
-
1372
- /**
1373
- * Fetch settings errors registered by add_settings_error()
1374
- *
1375
- * Checks the $wp_settings_errors array for any errors declared during the current
1376
- * pageload and returns them.
1377
- *
1378
- * If changes were just submitted ($_GET['settings-updated']) and settings errors were saved
1379
- * to the 'settings_errors' transient then those errors will be returned instead. This
1380
- * is used to pass errors back across pageloads.
1381
- *
1382
- * Use the $sanitize argument to manually re-sanitize the option before returning errors.
1383
- * This is useful if you have errors or notices you want to show even when the user
1384
- * hasn't submitted data (i.e. when they first load an options page, or in admin_notices action hook)
1385
- *
1386
- * @since 3.0.0
1387
- *
1388
- * @global array $wp_settings_errors Storage array of errors registered during this pageload
1389
- *
1390
- * @param string $setting Optional slug title of a specific setting who's errors you want.
1391
- * @param boolean $sanitize Whether to re-sanitize the setting value before returning errors.
1392
- * @return array Array of settings errors
1393
- */
1394
- function get_settings_errors( $setting = '', $sanitize = false ) {
1395
- global $wp_settings_errors;
1396
-
1397
- /*
1398
- * If $sanitize is true, manually re-run the sanitization for this option
1399
- * This allows the $sanitize_callback from register_setting() to run, adding
1400
- * any settings errors you want to show by default.
1401
- */
1402
- if ( $sanitize )
1403
- sanitize_option( $setting, get_option( $setting ) );
1404
-
1405
- // If settings were passed back from options.php then use them.
1406
- if ( isset( $_GET['settings-updated'] ) && $_GET['settings-updated'] && get_transient( 'settings_errors' ) ) {
1407
- $wp_settings_errors = array_merge( (array) $wp_settings_errors, get_transient( 'settings_errors' ) );
1408
- delete_transient( 'settings_errors' );
1409
- }
1410
-
1411
- // Check global in case errors have been added on this pageload.
1412
- if ( ! count( $wp_settings_errors ) )
1413
- return array();
1414
-
1415
- // Filter the results to those of a specific setting if one was set.
1416
- if ( $setting ) {
1417
- $setting_errors = array();
1418
- foreach ( (array) $wp_settings_errors as $key => $details ) {
1419
- if ( $setting == $details['setting'] )
1420
- $setting_errors[] = $wp_settings_errors[$key];
1421
- }
1422
- return $setting_errors;
1423
- }
1424
-
1425
- return $wp_settings_errors;
1426
- }
1427
-
1428
- /**
1429
- * Display settings errors registered by {@see add_settings_error()}.
1430
- *
1431
- * Part of the Settings API. Outputs a div for each error retrieved by
1432
- * {@see get_settings_errors()}.
1433
- *
1434
- * This is called automatically after a settings page based on the
1435
- * Settings API is submitted. Errors should be added during the validation
1436
- * callback function for a setting defined in {@see register_setting()}
1437
- *
1438
- * The $sanitize option is passed into {@see get_settings_errors()} and will
1439
- * re-run the setting sanitization
1440
- * on its current value.
1441
- *
1442
- * The $hide_on_update option will cause errors to only show when the settings
1443
- * page is first loaded. if the user has already saved new values it will be
1444
- * hidden to avoid repeating messages already shown in the default error
1445
- * reporting after submission. This is useful to show general errors like
1446
- * missing settings when the user arrives at the settings page.
1447
- *
1448
- * @since 3.0.0
1449
- *
1450
- * @param string $setting Optional slug title of a specific setting who's errors you want.
1451
- * @param bool $sanitize Whether to re-sanitize the setting value before returning errors.
1452
- * @param bool $hide_on_update If set to true errors will not be shown if the settings page has already been submitted.
1453
- */
1454
- function settings_errors( $setting = '', $sanitize = false, $hide_on_update = false ) {
1455
-
1456
- if ( $hide_on_update && ! empty( $_GET['settings-updated'] ) )
1457
- return;
1458
-
1459
- $settings_errors = get_settings_errors( $setting, $sanitize );
1460
-
1461
- if ( empty( $settings_errors ) )
1462
- return;
1463
-
1464
- $output = '';
1465
- foreach ( $settings_errors as $key => $details ) {
1466
- $css_id = 'setting-error-' . $details['code'];
1467
- $css_class = $details['type'] . ' settings-error notice is-dismissible';
1468
- $output .= "<div id='$css_id' class='$css_class'> \n";
1469
- $output .= "<p><strong>{$details['message']}</strong></p>";
1470
- $output .= "</div> \n";
1471
- }
1472
- echo $output;
1473
- }
1474
-
1475
- /**
1476
- * Outputs the modal window used for attaching media to posts or pages in the media-listing screen.
1477
- *
1478
- * @since 2.7.0
1479
- *
1480
- * @param string $found_action
1481
- */
1482
- function find_posts_div($found_action = '') {
1483
- ?>
1484
- <div id="find-posts" class="find-box" style="display: none;">
1485
- <div id="find-posts-head" class="find-box-head">
1486
- <?php _e( 'Find Posts or Pages' ); ?>
1487
- <div id="find-posts-close"></div>
1488
- </div>
1489
- <div class="find-box-inside">
1490
- <div class="find-box-search">
1491
- <?php if ( $found_action ) { ?>
1492
- <input type="hidden" name="found_action" value="<?php echo esc_attr($found_action); ?>" />
1493
- <?php } ?>
1494
- <input type="hidden" name="affected" id="affected" value="" />
1495
- <?php wp_nonce_field( 'find-posts', '_ajax_nonce', false ); ?>
1496
- <label class="screen-reader-text" for="find-posts-input"><?php _e( 'Search' ); ?></label>
1497
- <input type="text" id="find-posts-input" name="ps" value="" />
1498
- <span class="spinner"></span>
1499
- <input type="button" id="find-posts-search" value="<?php esc_attr_e( 'Search' ); ?>" class="button" />
1500
- <div class="clear"></div>
1501
- </div>
1502
- <div id="find-posts-response"></div>
1503
- </div>
1504
- <div class="find-box-buttons">
1505
- <?php submit_button( __( 'Select' ), 'button-primary alignright', 'find-posts-submit', false ); ?>
1506
- <div class="clear"></div>
1507
- </div>
1508
- </div>
1509
- <?php
1510
- }
1511
-
1512
- /**
1513
- * Display the post password.
1514
- *
1515
- * The password is passed through {@link esc_attr()} to ensure that it
1516
- * is safe for placing in an html attribute.
1517
- *
1518
- * @since 2.7.0
1519
- */
1520
- function the_post_password() {
1521
- $post = get_post();
1522
- if ( isset( $post->post_password ) )
1523
- echo esc_attr( $post->post_password );
1524
- }
1525
-
1526
- /**
1527
- * Get the post title.
1528
- *
1529
- * The post title is fetched and if it is blank then a default string is
1530
- * returned.
1531
- *
1532
- * @since 2.7.0
1533
- *
1534
- * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global $post.
1535
- * @return string The post title if set.
1536
- */
1537
- function _draft_or_post_title( $post = 0 ) {
1538
- $title = get_the_title( $post );
1539
- if ( empty( $title ) )
1540
- $title = __( '(no title)' );
1541
- return esc_html( $title );
1542
- }
1543
-
1544
- /**
1545
- * Display the search query.
1546
- *
1547
- * A simple wrapper to display the "s" parameter in a GET URI. This function
1548
- * should only be used when {@link the_search_query()} cannot.
1549
- *
1550
- * @since 2.7.0
1551
- */
1552
- function _admin_search_query() {
1553
- echo isset($_REQUEST['s']) ? esc_attr( wp_unslash( $_REQUEST['s'] ) ) : '';
1554
- }
1555
-
1556
- /**
1557
- * Generic Iframe header for use with Thickbox
1558
- *
1559
- * @since 2.7.0
1560
- *
1561
- * @global string $hook_suffix
1562
- * @global string $admin_body_class
1563
- * @global WP_Locale $wp_locale
1564
- *
1565
- * @param string $title Optional. Title of the Iframe page. Default empty.
1566
- * @param bool $deprecated Not used.
1567
- */
1568
- function iframe_header( $title = '', $deprecated = false ) {
1569
- show_admin_bar( false );
1570
- global $hook_suffix, $admin_body_class, $wp_locale;
1571
- $admin_body_class = preg_replace('/[^a-z0-9_-]+/i', '-', $hook_suffix);
1572
-
1573
- $current_screen = get_current_screen();
1574
-
1575
- @header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ) );
1576
- _wp_admin_html_begin();
1577
- ?>
1578
- <title><?php bloginfo('name') ?> &rsaquo; <?php echo $title ?> &#8212; <?php _e('WordPress'); ?></title>
1579
- <?php
1580
- wp_enqueue_style( 'colors' );
1581
- ?>
1582
- <script type="text/javascript">
1583
- addLoadEvent = function(func){if(typeof jQuery!="undefined")jQuery(document).ready(func);else if(typeof wpOnload!='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}};
1584
- function tb_close(){var win=window.dialogArguments||opener||parent||top;win.tb_remove();}
1585
- var ajaxurl = '<?php echo admin_url( 'admin-ajax.php', 'relative' ); ?>',
1586
- pagenow = '<?php echo $current_screen->id; ?>',
1587
- typenow = '<?php echo $current_screen->post_type; ?>',
1588
- adminpage = '<?php echo $admin_body_class; ?>',
1589
- thousandsSeparator = '<?php echo addslashes( $wp_locale->number_format['thousands_sep'] ); ?>',
1590
- decimalPoint = '<?php echo addslashes( $wp_locale->number_format['decimal_point'] ); ?>',
1591
- isRtl = <?php echo (int) is_rtl(); ?>;
1592
- </script>
1593
- <?php
1594
- /** This action is documented in wp-admin/admin-header.php */
1595
- do_action( 'admin_enqueue_scripts', $hook_suffix );
1596
-
1597
- /** This action is documented in wp-admin/admin-header.php */
1598
- do_action( "admin_print_styles-$hook_suffix" );
1599
-
1600
- /** This action is documented in wp-admin/admin-header.php */
1601
- do_action( 'admin_print_styles' );
1602
-
1603
- /** This action is documented in wp-admin/admin-header.php */
1604
- do_action( "admin_print_scripts-$hook_suffix" );
1605
-
1606
- /** This action is documented in wp-admin/admin-header.php */
1607
- do_action( 'admin_print_scripts' );
1608
-
1609
- /** This action is documented in wp-admin/admin-header.php */
1610
- do_action( "admin_head-$hook_suffix" );
1611
-
1612
- /** This action is documented in wp-admin/admin-header.php */
1613
- do_action( 'admin_head' );
1614
-
1615
- $admin_body_class .= ' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_locale() ) ) );
1616
-
1617
- if ( is_rtl() )
1618
- $admin_body_class .= ' rtl';
1619
-
1620
- ?>
1621
- </head>
1622
- <?php
1623
- /** This filter is documented in wp-admin/admin-header.php */
1624
- $admin_body_classes = apply_filters( 'admin_body_class', '' );
1625
- ?>
1626
- <body<?php
1627
- /**
1628
- * @global string $body_id
1629
- */
1630
- if ( isset($GLOBALS['body_id']) ) echo ' id="' . $GLOBALS['body_id'] . '"'; ?> class="wp-admin wp-core-ui no-js iframe <?php echo $admin_body_classes . ' ' . $admin_body_class; ?>">
1631
- <script type="text/javascript">
1632
- (function(){
1633
- var c = document.body.className;
1634
- c = c.replace(/no-js/, 'js');
1635
- document.body.className = c;
1636
- })();
1637
- </script>
1638
- <?php
1639
- }
1640
-
1641
- /**
1642
- * Generic Iframe footer for use with Thickbox
1643
- *
1644
- * @since 2.7.0
1645
- */
1646
- function iframe_footer() {
1647
- /*
1648
- * We're going to hide any footer output on iFrame pages,
1649
- * but run the hooks anyway since they output JavaScript
1650
- * or other needed content.
1651
- */
1652
- ?>
1653
- <div class="hidden">
1654
- <?php
1655
- /** This action is documented in wp-admin/admin-footer.php */
1656
- do_action( 'admin_footer', '' );
1657
-
1658
- /** This action is documented in wp-admin/admin-footer.php */
1659
- do_action( 'admin_print_footer_scripts' );
1660
- ?>
1661
- </div>
1662
- <script type="text/javascript">if(typeof wpOnload=="function")wpOnload();</script>
1663
- </body>
1664
- </html>
1665
- <?php
1666
- }
1667
-
1668
- /**
1669
- *
1670
- * @param WP_Post $post
1671
- */
1672
- function _post_states($post) {
1673
- $post_states = array();
1674
- if ( isset( $_REQUEST['post_status'] ) )
1675
- $post_status = $_REQUEST['post_status'];
1676
- else
1677
- $post_status = '';
1678
-
1679
- if ( !empty($post->post_password) )
1680
- $post_states['protected'] = __('Password protected');
1681
- if ( 'private' == $post->post_status && 'private' != $post_status )
1682
- $post_states['private'] = __('Private');
1683
- if ( 'draft' == $post->post_status && 'draft' != $post_status )
1684
- $post_states['draft'] = __('Draft');
1685
- if ( 'pending' == $post->post_status && 'pending' != $post_status )
1686
- /* translators: post state */
1687
- $post_states['pending'] = _x('Pending', 'post state');
1688
- if ( is_sticky($post->ID) )
1689
- $post_states['sticky'] = __('Sticky');
1690
-
1691
- if ( 'future' === $post->post_status ) {
1692
- $post_states['scheduled'] = __( 'Scheduled' );
1693
- }
1694
-
1695
- if ( 'page' === get_option( 'show_on_front' ) ) {
1696
- if ( intval( get_option( 'page_on_front' ) ) === $post->ID ) {
1697
- $post_states['page_on_front'] = __( 'Front Page' );
1698
- }
1699
-
1700
- if ( intval( get_option( 'page_for_posts' ) ) === $post->ID ) {
1701
- $post_states['page_for_posts'] = __( 'Posts Page' );
1702
- }
1703
- }
1704
-
1705
- /**
1706
- * Filter the default post display states used in the posts list table.
1707
- *
1708
- * @since 2.8.0
1709
- *
1710
- * @param array $post_states An array of post display states.
1711
- * @param WP_Post $post The current post object.
1712
- */
1713
- $post_states = apply_filters( 'display_post_states', $post_states, $post );
1714
-
1715
- if ( ! empty($post_states) ) {
1716
- $state_count = count($post_states);
1717
- $i = 0;
1718
- echo ' &mdash; ';
1719
- foreach ( $post_states as $state ) {
1720
- ++$i;
1721
- ( $i == $state_count ) ? $sep = '' : $sep = ', ';
1722
- echo "<span class='post-state'>$state$sep</span>";
1723
- }
1724
- }
1725
-
1726
- }
1727
-
1728
- /**
1729
- *
1730
- * @param WP_Post $post
1731
- */
1732
- function _media_states( $post ) {
1733
- $media_states = array();
1734
- $stylesheet = get_option('stylesheet');
1735
-
1736
- if ( current_theme_supports( 'custom-header') ) {
1737
- $meta_header = get_post_meta($post->ID, '_wp_attachment_is_custom_header', true );
1738
- if ( ! empty( $meta_header ) && $meta_header == $stylesheet )
1739
- $media_states[] = __( 'Header Image' );
1740
- }
1741
-
1742
- if ( current_theme_supports( 'custom-background') ) {
1743
- $meta_background = get_post_meta($post->ID, '_wp_attachment_is_custom_background', true );
1744
- if ( ! empty( $meta_background ) && $meta_background == $stylesheet )
1745
- $media_states[] = __( 'Background Image' );
1746
- }
1747
-
1748
- if ( $post->ID == get_option( 'site_icon' ) ) {
1749
- $media_states[] = __( 'Site Icon' );
1750
- }
1751
-
1752
- /**
1753
- * Filter the default media display states for items in the Media list table.
1754
- *
1755
- * @since 3.2.0
1756
- *
1757
- * @param array $media_states An array of media states. Default 'Header Image',
1758
- * 'Background Image', 'Site Icon'.
1759
- */
1760
- $media_states = apply_filters( 'display_media_states', $media_states );
1761
-
1762
- if ( ! empty( $media_states ) ) {
1763
- $state_count = count( $media_states );
1764
- $i = 0;
1765
- echo ' &mdash; ';
1766
- foreach ( $media_states as $state ) {
1767
- ++$i;
1768
- ( $i == $state_count ) ? $sep = '' : $sep = ', ';
1769
- echo "<span class='post-state'>$state$sep</span>";
1770
- }
1771
- }
1772
- }
1773
-
1774
- /**
1775
- * Test support for compressing JavaScript from PHP
1776
- *
1777
- * Outputs JavaScript that tests if compression from PHP works as expected
1778
- * and sets an option with the result. Has no effect when the current user
1779
- * is not an administrator. To run the test again the option 'can_compress_scripts'
1780
- * has to be deleted.
1781
- *
1782
- * @since 2.8.0
1783
- */
1784
- function compression_test() {
1785
- ?>
1786
- <script type="text/javascript">
1787
- var testCompression = {
1788
- get : function(test) {
1789
- var x;
1790
- if ( window.XMLHttpRequest ) {
1791
- x = new XMLHttpRequest();
1792
- } else {
1793
- try{x=new ActiveXObject('Msxml2.XMLHTTP');}catch(e){try{x=new ActiveXObject('Microsoft.XMLHTTP');}catch(e){};}
1794
- }
1795
-
1796
- if (x) {
1797
- x.onreadystatechange = function() {
1798
- var r, h;
1799
- if ( x.readyState == 4 ) {
1800
- r = x.responseText.substr(0, 18);
1801
- h = x.getResponseHeader('Content-Encoding');
1802
- testCompression.check(r, h, test);
1803
- }
1804
- };
1805
-
1806
- x.open('GET', ajaxurl + '?action=wp-compression-test&test='+test+'&'+(new Date()).getTime(), true);
1807
- x.send('');
1808
- }
1809
- },
1810
-
1811
- check : function(r, h, test) {
1812
- if ( ! r && ! test )
1813
- this.get(1);
1814
-
1815
- if ( 1 == test ) {
1816
- if ( h && ( h.match(/deflate/i) || h.match(/gzip/i) ) )
1817
- this.get('no');
1818
- else
1819
- this.get(2);
1820
-
1821
- return;
1822
- }
1823
-
1824
- if ( 2 == test ) {
1825
- if ( '"wpCompressionTest' == r )
1826
- this.get('yes');
1827
- else
1828
- this.get('no');
1829
- }
1830
- }
1831
- };
1832
- testCompression.check();
1833
- </script>
1834
- <?php
1835
- }
1836
-
1837
- /**
1838
- * Echoes a submit button, with provided text and appropriate class(es).
1839
- *
1840
- * @since 3.1.0
1841
- *
1842
- * @see get_submit_button()
1843
- *
1844
- * @param string $text The text of the button (defaults to 'Save Changes')
1845
- * @param string $type Optional. The type and CSS class(es) of the button. Core values
1846
- * include 'primary', 'secondary', 'delete'. Default 'primary'
1847
- * @param string $name The HTML name of the submit button. Defaults to "submit". If no
1848
- * id attribute is given in $other_attributes below, $name will be
1849
- * used as the button's id.
1850
- * @param bool $wrap True if the output button should be wrapped in a paragraph tag,
1851
- * false otherwise. Defaults to true
1852
- * @param array|string $other_attributes Other attributes that should be output with the button, mapping
1853
- * attributes to their values, such as setting tabindex to 1, etc.
1854
- * These key/value attribute pairs will be output as attribute="value",
1855
- * where attribute is the key. Other attributes can also be provided
1856
- * as a string such as 'tabindex="1"', though the array format is
1857
- * preferred. Default null.
1858
- */
1859
- function submit_button( $text = null, $type = 'primary', $name = 'submit', $wrap = true, $other_attributes = null ) {
1860
- echo get_submit_button( $text, $type, $name, $wrap, $other_attributes );
1861
- }
1862
-
1863
- /**
1864
- * Returns a submit button, with provided text and appropriate class
1865
- *
1866
- * @since 3.1.0
1867
- *
1868
- * @param string $text Optional. The text of the button. Default 'Save Changes'.
1869
- * @param string $type Optional. The type of button. Accepts 'primary', 'secondary',
1870
- * or 'delete'. Default 'primary large'.
1871
- * @param string $name Optional. The HTML name of the submit button. Defaults to "submit".
1872
- * If no id attribute is given in $other_attributes below, `$name` will
1873
- * be used as the button's id. Default 'submit'.
1874
- * @param bool $wrap Optional. True if the output button should be wrapped in a paragraph
1875
- * tag, false otherwise. Default true.
1876
- * @param array|string $other_attributes Optional. Other attributes that should be output with the button,
1877
- * mapping attributes to their values, such as `array( 'tabindex' => '1' )`.
1878
- * These attributes will be output as `attribute="value"`, such as
1879
- * `tabindex="1"`. Other attributes can also be provided as a string such
1880
- * as `tabindex="1"`, though the array format is typically cleaner.
1881
- * Default empty.
1882
- * @return string Submit button HTML.
1883
- */
1884
- function get_submit_button( $text = '', $type = 'primary large', $name = 'submit', $wrap = true, $other_attributes = '' ) {
1885
- if ( ! is_array( $type ) )
1886
- $type = explode( ' ', $type );
1887
-
1888
- $button_shorthand = array( 'primary', 'small', 'large' );
1889
- $classes = array( 'button' );
1890
- foreach ( $type as $t ) {
1891
- if ( 'secondary' === $t || 'button-secondary' === $t )
1892
- continue;
1893
- $classes[] = in_array( $t, $button_shorthand ) ? 'button-' . $t : $t;
1894
- }
1895
- $class = implode( ' ', array_unique( $classes ) );
1896
-
1897
- if ( 'delete' === $type )
1898
- $class = 'button-secondary delete';
1899
-
1900
- $text = $text ? $text : __( 'Save Changes' );
1901
-
1902
- // Default the id attribute to $name unless an id was specifically provided in $other_attributes
1903
- $id = $name;
1904
- if ( is_array( $other_attributes ) && isset( $other_attributes['id'] ) ) {
1905
- $id = $other_attributes['id'];
1906
- unset( $other_attributes['id'] );
1907
- }
1908
-
1909
- $attributes = '';
1910
- if ( is_array( $other_attributes ) ) {
1911
- foreach ( $other_attributes as $attribute => $value ) {
1912
- $attributes .= $attribute . '="' . esc_attr( $value ) . '" '; // Trailing space is important
1913
- }
1914
- } elseif ( ! empty( $other_attributes ) ) { // Attributes provided as a string
1915
- $attributes = $other_attributes;
1916
- }
1917
-
1918
- // Don't output empty name and id attributes.
1919
- $name_attr = $name ? ' name="' . esc_attr( $name ) . '"' : '';
1920
- $id_attr = $id ? ' id="' . esc_attr( $id ) . '"' : '';
1921
-
1922
- $button = '<input type="submit"' . $name_attr . $id_attr . ' class="' . esc_attr( $class );
1923
- $button .= '" value="' . esc_attr( $text ) . '" ' . $attributes . ' />';
1924
-
1925
- if ( $wrap ) {
1926
- $button = '<p class="submit">' . $button . '</p>';
1927
- }
1928
-
1929
- return $button;
1930
- }
1931
-
1932
- /**
1933
- *
1934
- * @global bool $is_IE
1935
- */
1936
- function _wp_admin_html_begin() {
1937
- global $is_IE;
1938
-
1939
- $admin_html_class = ( is_admin_bar_showing() ) ? 'wp-toolbar' : '';
1940
-
1941
- if ( $is_IE )
1942
- @header('X-UA-Compatible: IE=edge');
1943
-
1944
- ?>
1945
- <!DOCTYPE html>
1946
- <!--[if IE 8]>
1947
- <html xmlns="http://www.w3.org/1999/xhtml" class="ie8 <?php echo $admin_html_class; ?>" <?php
1948
- /**
1949
- * Fires inside the HTML tag in the admin header.
1950
- *
1951
- * @since 2.2.0
1952
- */
1953
- do_action( 'admin_xml_ns' );
1954
- ?> <?php language_attributes(); ?>>
1955
- <![endif]-->
1956
- <!--[if !(IE 8) ]><!-->
1957
- <html xmlns="http://www.w3.org/1999/xhtml" class="<?php echo $admin_html_class; ?>" <?php
1958
- /** This action is documented in wp-admin/includes/template.php */
1959
- do_action( 'admin_xml_ns' );
1960
- ?> <?php language_attributes(); ?>>
1961
- <!--<![endif]-->
1962
- <head>
1963
- <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
1964
- <?php
1965
- }
1966
-
1967
- /**
1968
- * Convert a screen string to a screen object
1969
- *
1970
- * @since 3.0.0
1971
- *
1972
- * @param string $hook_name The hook name (also known as the hook suffix) used to determine the screen.
1973
- * @return WP_Screen Screen object.
1974
- */
1975
- function convert_to_screen( $hook_name ) {
1976
- if ( ! class_exists( 'WP_Screen', false ) ) {
1977
- _doing_it_wrong( 'convert_to_screen(), add_meta_box()', __( "Likely direct inclusion of wp-admin/includes/template.php in order to use add_meta_box(). This is very wrong. Hook the add_meta_box() call into the add_meta_boxes action instead." ), '3.3' );
1978
- return (object) array( 'id' => '_invalid', 'base' => '_are_belong_to_us' );
1979
- }
1980
-
1981
- return WP_Screen::get( $hook_name );
1982
- }
1983
-
1984
- /**
1985
- * Output the HTML for restoring the post data from DOM storage
1986
- *
1987
- * @since 3.6.0
1988
- * @access private
1989
- */
1990
- function _local_storage_notice() {
1991
- ?>
1992
- <div id="local-storage-notice" class="hidden notice">
1993
- <p class="local-restore">
1994
- <?php _e('The backup of this post in your browser is different from the version below.'); ?>
1995
- <a class="restore-backup" href="#"><?php _e('Restore the backup.'); ?></a>
1996
- </p>
1997
- <p class="undo-restore hidden">
1998
- <?php _e('Post restored successfully.'); ?>
1999
- <a class="undo-restore-backup" href="#"><?php _e('Undo.'); ?></a>
2000
- </p>
2001
- </div>
2002
- <?php
2003
- }
2004
-
2005
- /**
2006
- * Output a HTML element with a star rating for a given rating.
2007
- *
2008
- * Outputs a HTML element with the star rating exposed on a 0..5 scale in
2009
- * half star increments (ie. 1, 1.5, 2 stars). Optionally, if specified, the
2010
- * number of ratings may also be displayed by passing the $number parameter.
2011
- *
2012
- * @since 3.8.0
2013
- * @since 4.4.0 Introduced the `echo` parameter.
2014
- *
2015
- * @param array $args {
2016
- * Optional. Array of star ratings arguments.
2017
- *
2018
- * @type int $rating The rating to display, expressed in either a 0.5 rating increment,
2019
- * or percentage. Default 0.
2020
- * @type string $type Format that the $rating is in. Valid values are 'rating' (default),
2021
- * or, 'percent'. Default 'rating'.
2022
- * @type int $number The number of ratings that makes up this rating. Default 0.
2023
- * @type bool $echo Whether to echo the generated markup. False to return the markup instead
2024
- * of echoing it. Default true.
2025
- * }
2026
- */
2027
- function wp_star_rating( $args = array() ) {
2028
- $defaults = array(
2029
- 'rating' => 0,
2030
- 'type' => 'rating',
2031
- 'number' => 0,
2032
- 'echo' => true,
2033
- );
2034
- $r = wp_parse_args( $args, $defaults );
2035
-
2036
- // Non-english decimal places when the $rating is coming from a string
2037
- $rating = str_replace( ',', '.', $r['rating'] );
2038
-
2039
- // Convert Percentage to star rating, 0..5 in .5 increments
2040
- if ( 'percent' == $r['type'] ) {
2041
- $rating = round( $rating / 10, 0 ) / 2;
2042
- }
2043
-
2044
- // Calculate the number of each type of star needed
2045
- $full_stars = floor( $rating );
2046
- $half_stars = ceil( $rating - $full_stars );
2047
- $empty_stars = 5 - $full_stars - $half_stars;
2048
-
2049
- if ( $r['number'] ) {
2050
- /* translators: 1: The rating, 2: The number of ratings */
2051
- $format = _n( '%1$s rating based on %2$s rating', '%1$s rating based on %2$s ratings', $r['number'] );
2052
- $title = sprintf( $format, number_format_i18n( $rating, 1 ), number_format_i18n( $r['number'] ) );
2053
- } else {
2054
- /* translators: 1: The rating */
2055
- $title = sprintf( __( '%s rating' ), number_format_i18n( $rating, 1 ) );
2056
- }
2057
-
2058
- $output = '<div class="star-rating" title="' . esc_attr( $title ) . '">';
2059
- $output .= '<span class="screen-reader-text">' . $title . '</span>';
2060
- $output .= str_repeat( '<div class="star star-full"></div>', $full_stars );
2061
- $output .= str_repeat( '<div class="star star-half"></div>', $half_stars );
2062
- $output .= str_repeat( '<div class="star star-empty"></div>', $empty_stars );
2063
- $output .= '</div>';
2064
-
2065
- if ( $r['echo'] ) {
2066
- echo $output;
2067
- }
2068
-
2069
- return $output;
2070
- }
2071
-
2072
- /**
2073
- * Output a notice when editing the page for posts (internal use only).
2074
- *
2075
- * @ignore
2076
- * @since 4.2.0
2077
- */
2078
- function _wp_posts_page_notice() {
2079
- echo '<div class="notice notice-warning inline"><p>' . __( 'You are currently editing the page that shows your latest posts.' ) . '</p></div>';
2080
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/feeds/class-woo-feed-google.php CHANGED
@@ -166,6 +166,7 @@ class Woo_Feed_Google
166
  $this->mapAttribute('height', 'g:shipping_height', false);
167
  $this->mapAttribute('shipping_label', 'g:shipping_label', false);
168
  $this->mapAttribute('shipping_country', 'g:shipping_country', false);
 
169
  $this->mapAttribute('shipping_service', 'g:shipping_service', false);
170
  $this->mapAttribute('shipping_price', 'g:shipping_price', false);
171
 
@@ -266,6 +267,7 @@ class Woo_Feed_Google
266
  $this->mapAttribute('height', 'shipping height', false);
267
  $this->mapAttribute('shipping_label', 'shipping label', false);
268
  $this->mapAttribute('shipping_country', 'shipping country', false);
 
269
  $this->mapAttribute('shipping_service', 'shipping service', false);
270
  $this->mapAttribute('shipping_price', 'shipping price', false);
271
 
@@ -353,7 +355,7 @@ class Woo_Feed_Google
353
 
354
  public function process_google_shipping_attribute_for_xml()
355
  {
356
- $shipping = array('g:shipping_country', 'g:shipping_service', 'g:shipping_price');
357
  $shippingAttr = array();
358
  $i = 0;
359
  if ($this->products) {
@@ -381,7 +383,7 @@ class Woo_Feed_Google
381
 
382
  public function process_google_shipping_attribute_for_CSVTXT()
383
  {
384
- $shipping = array('shipping country', 'shipping service', 'shipping price');
385
  $shippingAttr = array();
386
  $i = 0;
387
  if ($this->products) {
@@ -397,6 +399,7 @@ class Woo_Feed_Google
397
  foreach ($shippingAttr as $key => $attributes) {
398
  foreach ($attributes as $keyAttr => $valueAttr) {
399
  $country = ($keyAttr == "shipping country") ? $str .= $valueAttr . ":" : "";
 
400
  $service = ($keyAttr == "shipping service") ? $str .= $valueAttr . ":" : "";
401
  $price = ($keyAttr == "shipping price") ? $str .= $valueAttr : "";
402
  }
166
  $this->mapAttribute('height', 'g:shipping_height', false);
167
  $this->mapAttribute('shipping_label', 'g:shipping_label', false);
168
  $this->mapAttribute('shipping_country', 'g:shipping_country', false);
169
+ $this->mapAttribute('shipping_region', 'g:shipping_region', false);
170
  $this->mapAttribute('shipping_service', 'g:shipping_service', false);
171
  $this->mapAttribute('shipping_price', 'g:shipping_price', false);
172
 
267
  $this->mapAttribute('height', 'shipping height', false);
268
  $this->mapAttribute('shipping_label', 'shipping label', false);
269
  $this->mapAttribute('shipping_country', 'shipping country', false);
270
+ $this->mapAttribute('shipping_region', 'shipping region', false);
271
  $this->mapAttribute('shipping_service', 'shipping service', false);
272
  $this->mapAttribute('shipping_price', 'shipping price', false);
273
 
355
 
356
  public function process_google_shipping_attribute_for_xml()
357
  {
358
+ $shipping = array('g:shipping_country', 'g:shipping_service', 'g:shipping_price','g:shipping_region');
359
  $shippingAttr = array();
360
  $i = 0;
361
  if ($this->products) {
383
 
384
  public function process_google_shipping_attribute_for_CSVTXT()
385
  {
386
+ $shipping = array('shipping country', 'shipping service', 'shipping price','shipping region');
387
  $shippingAttr = array();
388
  $i = 0;
389
  if ($this->products) {
399
  foreach ($shippingAttr as $key => $attributes) {
400
  foreach ($attributes as $keyAttr => $valueAttr) {
401
  $country = ($keyAttr == "shipping country") ? $str .= $valueAttr . ":" : "";
402
+ $region = ($keyAttr == "shipping region") ? $str .= $valueAttr . ":" : "";
403
  $service = ($keyAttr == "shipping service") ? $str .= $valueAttr . ":" : "";
404
  $price = ($keyAttr == "shipping price") ? $str .= $valueAttr : "";
405
  }
woo-feed.php CHANGED
@@ -16,7 +16,7 @@
16
  * Plugin Name: WooCommerce Product Feed
17
  * Plugin URI: https://webappick.com/
18
  * Description: This is a wordpress plugin to generate woocommerce product feed for Shopping Engines like Google Shopping,eBay,Amazon,Pricegrabber and many more..
19
- * Version: 1.5.15
20
  * Author: WebAppick
21
  * Author URI: https://webappick.com/
22
  * License: GPL v2
@@ -245,6 +245,8 @@ function woo_feed_add_update($info = "", $name = "")
245
  $merchant = "Woo_Feed_Custom";
246
  }
247
 
 
 
248
  $feedService = sanitize_text_field($info['provider']);
249
  $fileName = str_replace(" ", "", sanitize_text_field($info['filename']));
250
  $type = sanitize_text_field($info['feedType']);
@@ -342,6 +344,7 @@ function woo_feed_array_sanitize($array)
342
  return $newArray;
343
  }
344
 
 
345
  /**
346
  * Generate Feed
347
  */
@@ -353,6 +356,7 @@ function woo_feed_generate_feed()
353
  ini_set('display_startup_errors', 1);
354
  error_reporting(E_ALL);
355
  $process = woo_feed_add_update($_POST);
 
356
  if ($process) {
357
  $message = "<b>Feed Making Complete. Feed URL: <a style='font-weight: bold;color:green;' target='_blank' href=$process>$process</a></b>";
358
  update_option('wpf_message', $message);
@@ -362,6 +366,7 @@ function woo_feed_generate_feed()
362
  wp_redirect(admin_url("admin.php?page=woo_feed_manage_feed&wpf_message=error"));
363
  }
364
  } else {
 
365
  require plugin_dir_path(__FILE__) . 'admin/partials/woo-feed-admin-display.php';
366
  }
367
  }
@@ -411,6 +416,10 @@ function woo_feed_manage_feed()
411
  }
412
  }
413
 
 
 
 
 
414
 
415
  /*
416
  * Scheduled Action Hook
@@ -426,3 +435,5 @@ function woo_feed_cron_update_feed()
426
  woo_feed_add_update($feedInfo['feedrules']);
427
  }
428
  }
 
 
16
  * Plugin Name: WooCommerce Product Feed
17
  * Plugin URI: https://webappick.com/
18
  * Description: This is a wordpress plugin to generate woocommerce product feed for Shopping Engines like Google Shopping,eBay,Amazon,Pricegrabber and many more..
19
+ * Version: 1.5.36
20
  * Author: WebAppick
21
  * Author URI: https://webappick.com/
22
  * License: GPL v2
245
  $merchant = "Woo_Feed_Custom";
246
  }
247
 
248
+
249
+
250
  $feedService = sanitize_text_field($info['provider']);
251
  $fileName = str_replace(" ", "", sanitize_text_field($info['filename']));
252
  $type = sanitize_text_field($info['feedType']);
344
  return $newArray;
345
  }
346
 
347
+
348
  /**
349
  * Generate Feed
350
  */
356
  ini_set('display_startup_errors', 1);
357
  error_reporting(E_ALL);
358
  $process = woo_feed_add_update($_POST);
359
+
360
  if ($process) {
361
  $message = "<b>Feed Making Complete. Feed URL: <a style='font-weight: bold;color:green;' target='_blank' href=$process>$process</a></b>";
362
  update_option('wpf_message', $message);
366
  wp_redirect(admin_url("admin.php?page=woo_feed_manage_feed&wpf_message=error"));
367
  }
368
  } else {
369
+ echo "<div class='notice notice-warning is-dismissible'><p>" . __("You are awesome for using <b>WooCommerce Product Feed</b>. Free version works great for up to <b>2000 products including variations.</b>", 'woo-feed') . "</p></div>";
370
  require plugin_dir_path(__FILE__) . 'admin/partials/woo-feed-admin-display.php';
371
  }
372
  }
416
  }
417
  }
418
 
419
+ function woo_feed_pro_vs_free(){
420
+ require plugin_dir_path(__FILE__) . 'admin/partials/woo-feed-pro-vs-free.php';
421
+ }
422
+
423
 
424
  /*
425
  * Scheduled Action Hook
435
  woo_feed_add_update($feedInfo['feedrules']);
436
  }
437
  }
438
+
439
+