CTX Feed – WooCommerce Product Feed Manager Plugin - Version 3.1.36

Version Description

(2019-10-14) = * Documentation Menu Added

Download this release

Release Info

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

Code changes from version 3.1.35 to 3.1.36

README.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://webappick.com
4
  Tags:woocommerce,google product feed,facebook product feed,woocommerce product feed,woocommerce,
5
  Requires at least: 3.6
6
  Tested Up To: 5.2
7
- Stable tag: 3.1.35
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -304,6 +304,9 @@ Using pro version:
304
 
305
  == Changelog ==
306
 
 
 
 
307
  = 3.1.35 (2019-10-10) =
308
  * remove echo used with _e()
309
  * fix generating new db entry on update feed config
4
  Tags:woocommerce,google product feed,facebook product feed,woocommerce product feed,woocommerce,
5
  Requires at least: 3.6
6
  Tested Up To: 5.2
7
+ Stable tag: 3.1.36
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
304
 
305
  == Changelog ==
306
 
307
+ = 3.1.36 (2019-10-14) =
308
+ * Documentation Menu Added
309
+
310
  = 3.1.35 (2019-10-10) =
311
  * remove echo used with _e()
312
  * fix generating new db entry on update feed config
admin/class-woo-feed-admin.php CHANGED
@@ -123,8 +123,7 @@ class Woo_Feed_Admin
123
  *
124
  * @since 1.0.0
125
  */
126
- public function load_admin_pages()
127
- {
128
  /**
129
  * This function is provided for making admin pages into admin area.
130
  *
@@ -136,13 +135,13 @@ class Woo_Feed_Admin
136
  * between the defined hooks and the functions defined in this
137
  * class.
138
  */
139
-
140
  if ( function_exists('add_options_page') ) {
141
  add_menu_page( __('Woo Feed', 'woo-feed'), __('Woo Feed', 'woo-feed'), 'manage_woocommerce', 'webappick-manage-feeds', 'woo_feed_manage_feed', 'dashicons-rss' );
142
  add_submenu_page( 'webappick-manage-feeds', __('Manage Feeds', 'woo-feed'), __('Manage Feeds', 'woo-feed'), 'manage_woocommerce', 'webappick-manage-feeds', 'woo_feed_manage_feed' );
143
  add_submenu_page( 'webappick-manage-feeds', __('Make Feed', 'woo-feed'), __('Make Feed', 'woo-feed'), 'manage_woocommerce', 'webappick-new-feed', 'woo_feed_generate_feed' );
144
  add_submenu_page( 'webappick-manage-feeds', __('Settings', 'woo-feed'), __('Settings', 'woo-feed'), 'manage_woocommerce', 'webappick-feed-settings', 'woo_feed_config_feed' );
145
- add_submenu_page( 'webappick-manage-feeds', __('Premium', 'woo-feed'), __('Premium', 'woo-feed'), 'manage_woocommerce', 'webappick-feed-pro-vs-free', 'woo_feed_pro_vs_free' );
 
146
  }
147
  }
148
 
123
  *
124
  * @since 1.0.0
125
  */
126
+ public function load_admin_pages() {
 
127
  /**
128
  * This function is provided for making admin pages into admin area.
129
  *
135
  * between the defined hooks and the functions defined in this
136
  * class.
137
  */
 
138
  if ( function_exists('add_options_page') ) {
139
  add_menu_page( __('Woo Feed', 'woo-feed'), __('Woo Feed', 'woo-feed'), 'manage_woocommerce', 'webappick-manage-feeds', 'woo_feed_manage_feed', 'dashicons-rss' );
140
  add_submenu_page( 'webappick-manage-feeds', __('Manage Feeds', 'woo-feed'), __('Manage Feeds', 'woo-feed'), 'manage_woocommerce', 'webappick-manage-feeds', 'woo_feed_manage_feed' );
141
  add_submenu_page( 'webappick-manage-feeds', __('Make Feed', 'woo-feed'), __('Make Feed', 'woo-feed'), 'manage_woocommerce', 'webappick-new-feed', 'woo_feed_generate_feed' );
142
  add_submenu_page( 'webappick-manage-feeds', __('Settings', 'woo-feed'), __('Settings', 'woo-feed'), 'manage_woocommerce', 'webappick-feed-settings', 'woo_feed_config_feed' );
143
+ add_submenu_page( 'webappick-manage-feeds', __('Documents', 'woo-feed'), '<span class="woo-feed-docs">' . __('Docs', 'woo-feed') . '</span>', 'manage_woocommerce', 'webappick-feed-docs', array( WooFeedDocs::getInstance(), 'woo_feed_docs' ) );
144
+ add_submenu_page( 'webappick-manage-feeds', __('Premium', 'woo-feed'), __('Premium', 'woo-feed'), 'manage_woocommerce', 'webappick-feed-pro-vs-free', 'woo_feed_pro_vs_free' );
145
  }
146
  }
147
 
admin/css/woo-feed-admin.css CHANGED
@@ -708,3 +708,36 @@ input[class=woo_feed_status_input]:checked + label:before{
708
  font-size: 14px;
709
  color: #32373c;
710
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
708
  font-size: 14px;
709
  color: #32373c;
710
  }
711
+
712
+ /** Admin Page Wrapper **/
713
+ .wapk-admin, .wapk-admin * { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; }
714
+ .wapk-admin { position: relative; display: block; margin: 0 auto; padding: 0 20px 0 0; width: 100%; }
715
+
716
+ /** PostBox **/
717
+ .wp-submenu li span.woo-feed-docs { font-weight: bold; color: #f18500; }
718
+ .wp-submenu li:hover span.woo-feed-docs,
719
+ .wp-submenu li.current span.woo-feed-docs { color: #ce7304; }
720
+ .wapk-admin .wapk-wrapper {margin-top: 15px;position: relative;display: block;float: left;width: 100%;}
721
+ .wapk-admin .postbox { width: 355px; margin-right: 20px; display: inline-block; vertical-align: top; }
722
+ @media only screen and (max-width: 850px) {
723
+ .wapk-admin .postbox { display: block; width: auto; float: none; margin-right: auto; }
724
+ }
725
+ .wapk-admin .postbox .hndle { font-size: 14px; padding: 8px 12px; margin: 0; line-height: 1.4; cursor: default; }
726
+ .wapk-admin .postbox .dashicons { color: #ccc }
727
+ .wapk-admin .postbox a { text-decoration: none; }
728
+ .wapk-admin .postbox .inside,
729
+ .wapk-admin .postbox ul { margin-bottom: 0; }
730
+ .wapk-admin .postbox .toggle-indicator:before { content: "\F142"; display: inline-block; font: 400 20px/1 dashicons; speak: none; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-decoration: none!important; }
731
+ .wapk-admin .postbox.closed .toggle-indicator:before { content: "\F140"; }
732
+
733
+ /** Admin Call-To-Action **/
734
+ .wapk-cta { position: relative; display: flex; width: 100%; padding: 15px; background: #c2efef; justify-content: center; align-items: center; }
735
+ .wapk-cta-icon .dashicons { font-size: 100px; width: 100px; height: auto; margin: 0 10px -8px 0; color: #0085ba; }
736
+ .wapk-cta-content {width: 50%;}
737
+ .wapk-cta-content h2 { font-size: 2em; margin: 0.5em 0; }
738
+ .wapk-cta-action {}
739
+ .wapk-cta-action a.button { font-size: 24px; height: auto !important; padding: 10px 20px; }
740
+ @media (max-width: 600px) {
741
+ .wapk-cta { display: block; text-align: center; padding: 2em 0; }
742
+ .wapk-cta-content { width: 100%; margin: 2em 0; }
743
+ }
admin/js/woo-feed-admin.js CHANGED
@@ -49,7 +49,13 @@
49
 
50
  $(window).load(function () {
51
  // noinspection ES6ConvertVarToLetConst
52
- var $copyBtn = $('.toClipboard');
 
 
 
 
 
 
53
  if( ! ClipboardJS.isSupported() || /iPhone|iPad/i.test(navigator.userAgent) ) {
54
  $copyBtn.find('img').hide(0);
55
  } else {
49
 
50
  $(window).load(function () {
51
  // noinspection ES6ConvertVarToLetConst
52
+ var $copyBtn = $('.toClipboard'),
53
+ $adminPage = $('.wapk-admin');
54
+ $adminPage.find('.postbox .handlediv').on( 'click', function( event ) {
55
+ event.preventDefault();
56
+ $(this).closest('.postbox').toggleClass('closed');
57
+ } );
58
+
59
  if( ! ClipboardJS.isSupported() || /iPhone|iPad/i.test(navigator.userAgent) ) {
60
  $copyBtn.find('img').hide(0);
61
  } else {
includes/class-woo-feed-docs.php ADDED
@@ -0,0 +1,136 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Feed Docs Page Renderer
4
+ * @version 1.0.0
5
+ * @package WooFeed
6
+ * @since 3.1.36
7
+ */
8
+ if( ! function_exists( 'add_action' ) ) {
9
+ die();
10
+ }
11
+ if( ! class_exists( 'WooFeedDocs' ) ) {
12
+ class WooFeedDocs {
13
+ /**
14
+ * Singleton instance holder
15
+ * @var WooFeedDocs
16
+ */
17
+ private static $instance;
18
+
19
+ /**
20
+ * Get Class Instance
21
+ * @return WooFeedDocs
22
+ */
23
+ public static function getInstance() {
24
+ if( self::$instance === null ) self::$instance = new self();
25
+ return self::$instance;
26
+ }
27
+ private function __construct() {
28
+ add_filter( 'removable_query_args', array( $this, 'filter_removable_query_args' ), 10, 1 );
29
+ }
30
+
31
+ /**
32
+ * Render Docs Page
33
+ * @see Woo_Feed_Admin::load_admin_pages()
34
+ * @return void
35
+ */
36
+ function woo_feed_docs() {
37
+ $faqs = $this->__get_feed_help();
38
+ ?>
39
+ <div class="wrap wapk-admin">
40
+ <h1><?php echo esc_html( get_admin_page_title() ); ?></h1>
41
+ <?php if( ! empty( $faqs ) ) { ?>
42
+ <div class="wapk-wrapper">
43
+ <?php foreach( $faqs as $faq ) { ?>
44
+ <div class="postbox">
45
+ <button type="button" class="handlediv" aria-expanded="true">
46
+ <span class="screen-reader-text"><?php printf( esc_html__( 'Toggle panel: %s', 'woo-feed' ), $faq->title ) ?></span>
47
+ <span class="toggle-indicator" aria-hidden="true"></span>
48
+ </button>
49
+ <h2 class="hndle"><?php if( isset( $faq->icon ) && ! empty( $faq->icon ) ) {
50
+ ?><span class="<?php printf( '%s%s',
51
+ ( strpos( $faq->icon, 'dashicons' ) !== false ) ? 'dashicons ' : '',
52
+ esc_attr( $faq->icon ) ); ?>" aria-hidden="true"></span> <?php
53
+ } ?><span><?php echo esc_html( $faq->title ); ?></span></h2>
54
+ <div class="inside">
55
+ <div class="main">
56
+ <ul>
57
+ <?php foreach( $faq->questions as $qa ) { ?>
58
+ <li>
59
+ <span class="<?php if( isset( $qa->icon ) ) {
60
+ printf( '%s%s',
61
+ ( strpos( $qa->icon, 'dashicons' ) !== false ) ? 'dashicons ' : '',
62
+ esc_attr( $qa->icon ) );
63
+ } else { ?>dashicons dashicons-media-text<?php } ?>" aria-hidden="true"></span>
64
+ <a href="<?php echo esc_url( $qa->link ); ?>" target="_blank"><?php echo esc_html( $qa->title ); ?></a>
65
+ </li>
66
+ <?php } ?>
67
+ </ul>
68
+ </div>
69
+ </div>
70
+ </div>
71
+ <?php } ?>
72
+ </div>
73
+ <div class="clear"></div>
74
+ <div class="wapk-wrapper">
75
+ <div class="wapk-cta wapk-feed-cta">
76
+ <div class="wapk-cta-icon">
77
+ <span class="dashicons dashicons-editor-help" aria-hidden="true"></span>
78
+ </div>
79
+ <div class="wapk-cta-content">
80
+ <h2><?php _e( 'Still need help?', 'woo-feed' ); ?></h2>
81
+ <p><?php _e( 'Have we not answered your question?<br>Don\'t worry, you can contact us for more information...', 'woo-feed') ?></p>
82
+ </div>
83
+ <div class="wapk-cta-action">
84
+ <a href="https://webappick.com/support/" class="button button-primary" target="_blank"><?php _e( 'Get Support', 'woo-feed' ); ?></a>
85
+ </div>
86
+ </div>
87
+ </div>
88
+ <?php } else { ?>
89
+ <div class="notice notice-warning">
90
+ <p><?php printf(
91
+ __( 'There\'s some problem loading the docs. Please Click <a href="%s">Here</a> To Fetch Again.', 'woo-feed' ),
92
+ admin_url( 'admin.php?page=webappick-feed-docs&reload=1&_nonce=' . wp_create_nonce( 'webappick-feed-docs' ) )
93
+ ); ?></p>
94
+ <p><?php printf( __( 'If the problem persist please contact <a href="%s">our support</a>.', 'woo-feed' ), 'https://webappick.com/support/' ); ?></p>
95
+ </div>
96
+ <?php } ?>
97
+ </div>
98
+ <?php
99
+ }
100
+
101
+ /**
102
+ * Get Docs Data
103
+ * @return array
104
+ */
105
+ private function __get_feed_help() {
106
+ // force fetch docs json.
107
+ if( isset( $_GET['reload'], $_GET['_nonce'] ) && wp_verify_nonce( $_GET['_nonce'], 'webappick-feed-docs' ) ) {
108
+ $help_docs = false;
109
+ } else $help_docs = get_transient( 'webappick_feed_help_docs' );
110
+ if ( false === $help_docs ) {
111
+ // bitbucket cache-control: max-age=900 (15 minutes)
112
+ $help_url = 'https://api.bitbucket.org/2.0/snippets/woofeed/jLRxxB/files/woo-feed-docs.json';
113
+ $response = wp_remote_get( $help_url, array( 'timeout' => 15 ) );
114
+ $help_docs = wp_remote_retrieve_body( $response );
115
+ if ( is_wp_error( $response ) || $response['response']['code'] != 200 ) $help_docs = '[]';
116
+ set_transient( 'webappick_feed_help_docs', $help_docs, 12 * HOUR_IN_SECONDS );
117
+ }
118
+ $help_docs = json_decode( trim( $help_docs ) );
119
+ return $help_docs;
120
+ }
121
+
122
+ /**
123
+ * Add items to removable query args array
124
+ * @param array $removable_query_args
125
+ * @return array
126
+ */
127
+ function filter_removable_query_args( $removable_query_args ) {
128
+ global $pagenow, $plugin_page;
129
+ if( $pagenow === 'admin.php' && $plugin_page === 'webappick-feed-docs' ) {
130
+ $removable_query_args = array_merge( $removable_query_args, array( 'reload', '_nonce' ) );
131
+ }
132
+ return $removable_query_args;
133
+ }
134
+ }
135
+ }
136
+ // End of file class-woo-feed-docs.php
includes/class-woo-feed.php CHANGED
@@ -169,8 +169,11 @@ class Woo_Feed
169
  require_once plugin_dir_path(dirname(__FILE__)) . 'includes/feeds/class-woo-feed-become.php';
170
  require_once plugin_dir_path(dirname(__FILE__)) . 'includes/feeds/class-woo-feed-connexity.php';
171
  require_once plugin_dir_path(dirname(__FILE__)) . 'includes/feeds/class-woo-feed-custom.php';
172
-
173
- /**
 
 
 
174
  * The class responsible for defining all actions that occur in the admin area.
175
  */
176
  require_once plugin_dir_path(dirname(__FILE__)) . 'admin/class-woo-feed-admin.php';
169
  require_once plugin_dir_path(dirname(__FILE__)) . 'includes/feeds/class-woo-feed-become.php';
170
  require_once plugin_dir_path(dirname(__FILE__)) . 'includes/feeds/class-woo-feed-connexity.php';
171
  require_once plugin_dir_path(dirname(__FILE__)) . 'includes/feeds/class-woo-feed-custom.php';
172
+ /**
173
+ * Docs Page Class
174
+ */
175
+ require_once plugin_dir_path(dirname(__FILE__)) . 'includes/class-woo-feed-docs.php';
176
+ /**
177
  * The class responsible for defining all actions that occur in the admin area.
178
  */
179
  require_once plugin_dir_path(dirname(__FILE__)) . 'admin/class-woo-feed-admin.php';
woo-feed.php CHANGED
@@ -15,7 +15,7 @@
15
  * Plugin Name: WooCommerce Product Feed
16
  * Plugin URI: https://webappick.com/
17
  * Description: This plugin generate WooCommerce product feed for Shopping Engines like Google Shopping,Facebook Product Feed,eBay,Amazon,Idealo and many more..
18
- * Version: 3.1.35
19
  * Author: WebAppick
20
  * Author URI: https://webappick.com/
21
  * License: GPL v2
@@ -34,7 +34,7 @@ if (!defined('ABSPATH')) die();
34
  * Plugin Version
35
  * @var string
36
  */
37
- define( 'WOO_FEED_VERSION', '3.1.35' );
38
 
39
  /**
40
  * Plugin Path with trailing slash
15
  * Plugin Name: WooCommerce Product Feed
16
  * Plugin URI: https://webappick.com/
17
  * Description: This plugin generate WooCommerce product feed for Shopping Engines like Google Shopping,Facebook Product Feed,eBay,Amazon,Idealo and many more..
18
+ * Version: 3.1.36
19
  * Author: WebAppick
20
  * Author URI: https://webappick.com/
21
  * License: GPL v2
34
  * Plugin Version
35
  * @var string
36
  */
37
+ define( 'WOO_FEED_VERSION', '3.1.36' );
38
 
39
  /**
40
  * Plugin Path with trailing slash