Version Description
- Fix: Admitad module.
- Fix: Autoblogging default category.
Download this release
Release Info
Developer | keywordrush |
Plugin | Content Egg |
Version | 3.9.1 |
Comparing to | |
See all releases |
Code changes from version 3.9.0 to 3.9.1
- application/Plugin.php +1 -1
- application/WooIntegrator.php +10 -1
- application/admin/ToolsController.php +52 -0
- application/admin/views/_metabox_autoblog.php +4 -1
- application/admin/views/prefill.php +0 -1
- application/helpers/TemplateHelper.php +1 -1
- application/modules/AdmitadProducts/AdmitadProductsModule.php +2 -2
- content-egg.php +1 -1
- readme.txt +5 -1
- res/js/keywords.js +2 -2
application/Plugin.php
CHANGED
@@ -14,7 +14,7 @@ use ContentEgg\application\helpers\CurrencyHelper;
|
|
14 |
*/
|
15 |
class Plugin {
|
16 |
|
17 |
-
const version = '3.9.
|
18 |
const db_version = 33;
|
19 |
const wp_requires = '4.2.2';
|
20 |
const slug = 'content-egg';
|
14 |
*/
|
15 |
class Plugin {
|
16 |
|
17 |
+
const version = '3.9.1';
|
18 |
const db_version = 33;
|
19 |
const wp_requires = '4.2.2';
|
20 |
const slug = 'content-egg';
|
application/WooIntegrator.php
CHANGED
@@ -27,9 +27,17 @@ class WooIntegrator {
|
|
27 |
if (!function_exists('\wc_get_product'))
|
28 |
return;
|
29 |
|
|
|
30 |
\add_action('content_egg_save_data', array(__CLASS__, 'wooHandler'), 13, 4);
|
31 |
}
|
32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
public static function wooHandler($data, $module_id, $post_id, $is_last_iteration)
|
34 |
{
|
35 |
if (\get_post_type($post_id) != 'product' || !$product = \wc_get_product($post_id))
|
@@ -441,4 +449,5 @@ class WooIntegrator {
|
|
441 |
$item['module_id'] = $module_id;
|
442 |
return $item;
|
443 |
}
|
444 |
-
|
|
27 |
if (!function_exists('\wc_get_product'))
|
28 |
return;
|
29 |
|
30 |
+
\add_action('woocommerce_before_single_product', array(__CLASS__, 'touchEmptyPost'), 10);
|
31 |
\add_action('content_egg_save_data', array(__CLASS__, 'wooHandler'), 13, 4);
|
32 |
}
|
33 |
|
34 |
+
public static function touchEmptyPost()
|
35 |
+
{
|
36 |
+
global $post;
|
37 |
+
if (!$post->post_content)
|
38 |
+
$post->post_content = apply_filters('the_content', $post->post_content);
|
39 |
+
}
|
40 |
+
|
41 |
public static function wooHandler($data, $module_id, $post_id, $is_last_iteration)
|
42 |
{
|
43 |
if (\get_post_type($post_id) != 'product' || !$product = \wc_get_product($post_id))
|
449 |
$item['module_id'] = $module_id;
|
450 |
return $item;
|
451 |
}
|
452 |
+
|
453 |
+
}
|
application/admin/ToolsController.php
CHANGED
@@ -4,6 +4,9 @@ namespace ContentEgg\application\admin;
|
|
4 |
|
5 |
use ContentEgg\application\models\PriceAlertModel;
|
6 |
use ContentEgg\application\helpers\FileHelper;
|
|
|
|
|
|
|
7 |
|
8 |
/**
|
9 |
* ToolsController class file
|
@@ -33,6 +36,11 @@ class ToolsController {
|
|
33 |
{
|
34 |
$this->actionSubscribersExport();
|
35 |
}
|
|
|
|
|
|
|
|
|
|
|
36 |
}
|
37 |
|
38 |
public function actionSubscribersExport()
|
@@ -67,4 +75,48 @@ class ToolsController {
|
|
67 |
exit;
|
68 |
}
|
69 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
}
|
4 |
|
5 |
use ContentEgg\application\models\PriceAlertModel;
|
6 |
use ContentEgg\application\helpers\FileHelper;
|
7 |
+
use ContentEgg\application\helpers\TextHelper;
|
8 |
+
use ContentEgg\application\components\ContentManager;
|
9 |
+
use ContentEgg\application\components\ModuleManager;
|
10 |
|
11 |
/**
|
12 |
* ToolsController class file
|
36 |
{
|
37 |
$this->actionSubscribersExport();
|
38 |
}
|
39 |
+
|
40 |
+
if (!empty($_GET['action']) && $_GET['action'] == 'offer-urls-export')
|
41 |
+
{
|
42 |
+
$this->actionOfferUrlsExport();
|
43 |
+
}
|
44 |
}
|
45 |
|
46 |
public function actionSubscribersExport()
|
75 |
exit;
|
76 |
}
|
77 |
|
78 |
+
public function actionOfferUrlsExport()
|
79 |
+
{
|
80 |
+
if (!\current_user_can('administrator'))
|
81 |
+
die('You do not have permission to view this page.');
|
82 |
+
|
83 |
+
if (isset($_GET['module']))
|
84 |
+
$module_id = TextHelper::clear($_GET['module']);
|
85 |
+
else
|
86 |
+
die('Module param can not be empty.');
|
87 |
+
|
88 |
+
if (!ModuleManager::getInstance()->moduleExists($module_id))
|
89 |
+
die('The module does not exist.');
|
90 |
+
|
91 |
+
global $wpdb;
|
92 |
+
|
93 |
+
$sql = $wpdb->prepare('SELECT * FROM ' . $wpdb->postmeta . ' WHERE meta_key LIKE "%s"', ContentManager::META_PREFIX_DATA . $module_id);
|
94 |
+
$results = $wpdb->get_results($sql, \ARRAY_A);
|
95 |
+
|
96 |
+
$csv_arr = array();
|
97 |
+
foreach ($results as $result)
|
98 |
+
{
|
99 |
+
if (!$data = unserialize($result['meta_value']))
|
100 |
+
continue;
|
101 |
+
|
102 |
+
$csv_line = array();
|
103 |
+
$csv_line['post_id'] = $result['post_id'];
|
104 |
+
foreach ($data as $d)
|
105 |
+
{
|
106 |
+
$csv_line['title'] = $d['title'];
|
107 |
+
$csv_line['price'] = $d['price'];
|
108 |
+
$csv_line['priceOld'] = $d['priceOld'];
|
109 |
+
$csv_line['currencyCode'] = $d['currencyCode'];
|
110 |
+
$csv_line['url'] = $d['url'];
|
111 |
+
$csv_line['orig_url'] = $d['orig_url'];
|
112 |
+
$csv_line['img'] = $d['img'];
|
113 |
+
$csv_arr[] = $csv_line;
|
114 |
+
}
|
115 |
+
}
|
116 |
+
$filename = $module_id . '-data-' . date('d-m-Y') . '.csv';
|
117 |
+
FileHelper::sendDownloadHeaders($filename);
|
118 |
+
echo FileHelper::array2Csv($csv_arr);
|
119 |
+
exit;
|
120 |
+
}
|
121 |
+
|
122 |
}
|
application/admin/views/_metabox_autoblog.php
CHANGED
@@ -307,7 +307,10 @@ use ContentEgg\application\components\ModuleManager;
|
|
307 |
$opt = array('name' => 'item[category]', 'id' => 'category', 'selected' => $item['category'], 'hide_empty' => false);
|
308 |
//\wp_dropdown_categories($opt);
|
309 |
// categs + product categs
|
310 |
-
$
|
|
|
|
|
|
|
311 |
$categories = \get_terms($cat_args);
|
312 |
?>
|
313 |
|
307 |
$opt = array('name' => 'item[category]', 'id' => 'category', 'selected' => $item['category'], 'hide_empty' => false);
|
308 |
//\wp_dropdown_categories($opt);
|
309 |
// categs + product categs
|
310 |
+
$taxonomy = array('category');
|
311 |
+
if (taxonomy_exists('product_cat'))
|
312 |
+
$taxonomy[] = 'product_cat';
|
313 |
+
$cat_args = array('taxonomy' => $taxonomy, 'orderby' => 'name', 'order' => 'asc', 'hide_empty' => false);
|
314 |
$categories = \get_terms($cat_args);
|
315 |
?>
|
316 |
|
application/admin/views/prefill.php
CHANGED
@@ -97,7 +97,6 @@ use ContentEgg\application\admin\GeneralConfig;
|
|
97 |
</option>
|
98 |
<?php endforeach; ?>
|
99 |
</select>
|
100 |
-
<p class="description"><?php _e('You can set all supported post types in General settings -> Post Types.', 'content-egg'); ?></p>
|
101 |
</td>
|
102 |
</tr>
|
103 |
|
97 |
</option>
|
98 |
<?php endforeach; ?>
|
99 |
</select>
|
|
|
100 |
</td>
|
101 |
</tr>
|
102 |
|
application/helpers/TemplateHelper.php
CHANGED
@@ -327,7 +327,7 @@ class TemplateHelper {
|
|
327 |
'order' => 'date DESC'
|
328 |
);
|
329 |
$prices = PriceHistoryModel::model()->findAll($params);
|
330 |
-
|
331 |
$data = array(
|
332 |
'chartType' => 'Area',
|
333 |
'data' => $prices,
|
327 |
'order' => 'date DESC'
|
328 |
);
|
329 |
$prices = PriceHistoryModel::model()->findAll($params);
|
330 |
+
|
331 |
$data = array(
|
332 |
'chartType' => 'Area',
|
333 |
'data' => $prices,
|
application/modules/AdmitadProducts/AdmitadProductsModule.php
CHANGED
@@ -103,7 +103,8 @@ class AdmitadProductsModule extends AffiliateParserModule {
|
|
103 |
$content->orig_url = $orig_url;
|
104 |
$content->domain = TextHelper::parseDomain($r['url'], 'ulp');
|
105 |
|
106 |
-
$content->url =
|
|
|
107 |
$content->description = $r['description'];
|
108 |
if ($max_size = $this->config('description_size'))
|
109 |
$content->description = TextHelper::truncate($content->description, $max_size);
|
@@ -151,7 +152,6 @@ class AdmitadProductsModule extends AffiliateParserModule {
|
|
151 |
{
|
152 |
$items[$key]['priceOld'] = (float) $r['oldprice'];
|
153 |
$items[$key]['price'] = (float) $r['price'];
|
154 |
-
//$items[$key]['url'] = $this->createAffUrl($r['orig_url']);
|
155 |
break;
|
156 |
}
|
157 |
}
|
103 |
$content->orig_url = $orig_url;
|
104 |
$content->domain = TextHelper::parseDomain($r['url'], 'ulp');
|
105 |
|
106 |
+
$content->url = LinkHandler::createAffUrl($content->orig_url, $this->config('deeplink'), 'i=13');
|
107 |
+
|
108 |
$content->description = $r['description'];
|
109 |
if ($max_size = $this->config('description_size'))
|
110 |
$content->description = TextHelper::truncate($content->description, $max_size);
|
152 |
{
|
153 |
$items[$key]['priceOld'] = (float) $r['oldprice'];
|
154 |
$items[$key]['price'] = (float) $r['price'];
|
|
|
155 |
break;
|
156 |
}
|
157 |
}
|
content-egg.php
CHANGED
@@ -6,7 +6,7 @@ namespace ContentEgg;
|
|
6 |
Plugin Name: Content Egg
|
7 |
Plugin URI: http://www.keywordrush.com/contentegg
|
8 |
Description: Easily adding auto updating products from affiliate systems and additional content to posts.
|
9 |
-
Version: 3.9.
|
10 |
Author: keywordrush.com
|
11 |
Author URI: http://www.keywordrush.com
|
12 |
Text Domain: content-egg
|
6 |
Plugin Name: Content Egg
|
7 |
Plugin URI: http://www.keywordrush.com/contentegg
|
8 |
Description: Easily adding auto updating products from affiliate systems and additional content to posts.
|
9 |
+
Version: 3.9.1
|
10 |
Author: keywordrush.com
|
11 |
Author URI: http://www.keywordrush.com
|
12 |
Text Domain: content-egg
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: keywordrush,wpsoul
|
|
3 |
Tags: content, affiliate, autoblogging, amazon, affilinet, coupons, linkshare, shareasale, ozon, flickr, youtube, commission junction, aliexpress, cj, images, wikipedia, freebase, ecommerce, links, shortcode, monetize, search engine optimization, ebay, zanox, moneymaking, price comparison, google images, timesaving, clickbank, linkshare, pixabay, admitad, affilitewindow, optimisemedia, tradedoubler, flipkart, paytm, price alert, tracker, impactradius, pepperjam, pepperjamnetwork, udemy, envato, tradetracker, viglink
|
4 |
Requires at least: 4.2.2
|
5 |
Tested up to: 4.8
|
6 |
-
Stable tag: 3.9.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -110,6 +110,10 @@ If you can do any Wordpress page templates – you can do also templates for Con
|
|
110 |
|
111 |
== Changelog ==
|
112 |
|
|
|
|
|
|
|
|
|
113 |
= 3.9.0 =
|
114 |
* New: WooCommerce products synchronization.
|
115 |
* New: WooCommerce attributes synchronization (global and custom).
|
3 |
Tags: content, affiliate, autoblogging, amazon, affilinet, coupons, linkshare, shareasale, ozon, flickr, youtube, commission junction, aliexpress, cj, images, wikipedia, freebase, ecommerce, links, shortcode, monetize, search engine optimization, ebay, zanox, moneymaking, price comparison, google images, timesaving, clickbank, linkshare, pixabay, admitad, affilitewindow, optimisemedia, tradedoubler, flipkart, paytm, price alert, tracker, impactradius, pepperjam, pepperjamnetwork, udemy, envato, tradetracker, viglink
|
4 |
Requires at least: 4.2.2
|
5 |
Tested up to: 4.8
|
6 |
+
Stable tag: 3.9.1
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
110 |
|
111 |
== Changelog ==
|
112 |
|
113 |
+
= 3.9.1 =
|
114 |
+
* Fix: Admitad module.
|
115 |
+
* Fix: Autoblogging default category.
|
116 |
+
|
117 |
= 3.9.0 =
|
118 |
* New: WooCommerce products synchronization.
|
119 |
* New: WooCommerce attributes synchronization (global and custom).
|
res/js/keywords.js
CHANGED
@@ -322,7 +322,7 @@ function trend_google() {
|
|
322 |
|
323 |
var site = "https://www.google." + zone + "/trends/hottrends/atom/hourly";
|
324 |
var yql = "select * from htmlstring where url='" + site + "' AND xpath='.//a/text()'";
|
325 |
-
var url = "
|
326 |
|
327 |
jQuery.getJSON(url, function () {
|
328 |
}).done(function (data) {
|
@@ -344,7 +344,7 @@ function amazon_trends() {
|
|
344 |
|
345 |
var site = 'http://www.amazon.com/gp/rss/' + amazon_section + '/' + category_id + '/';
|
346 |
var yql = "select * from htmlstring where url='" + site + "' AND xpath='.//span/a/text()'";
|
347 |
-
var url = "
|
348 |
|
349 |
jQuery('#goods_keywords').empty();
|
350 |
jQuery.getJSON(url, function () {
|
322 |
|
323 |
var site = "https://www.google." + zone + "/trends/hottrends/atom/hourly";
|
324 |
var yql = "select * from htmlstring where url='" + site + "' AND xpath='.//a/text()'";
|
325 |
+
var url = "https://query.yahooapis.com/v1/public/yql?q=" + encodeURIComponent(yql) + "&format=json&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys";
|
326 |
|
327 |
jQuery.getJSON(url, function () {
|
328 |
}).done(function (data) {
|
344 |
|
345 |
var site = 'http://www.amazon.com/gp/rss/' + amazon_section + '/' + category_id + '/';
|
346 |
var yql = "select * from htmlstring where url='" + site + "' AND xpath='.//span/a/text()'";
|
347 |
+
var url = "https://query.yahooapis.com/v1/public/yql?q=" + encodeURIComponent(yql) + "&format=json&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys";
|
348 |
|
349 |
jQuery('#goods_keywords').empty();
|
350 |
jQuery.getJSON(url, function () {
|