Version Description
View Release Notes
- Updated: freemius sdk
Download this release
Release Info
Developer | intoxstudio |
Plugin | Content Aware Sidebars – Unlimited Widget Areas |
Version | 3.7.3 |
Comparing to | |
See all releases |
Code changes from version 3.7.2 to 3.7.3
- app.php +1 -1
- content-aware-sidebars.php +1 -1
- gulpfile.js +15 -5
- lib/freemius/.codeclimate.yml +0 -19
- lib/freemius/.travis.yml +0 -11
- lib/freemius/config.php +3 -0
- lib/freemius/includes/class-freemius.php +34 -16
- lib/freemius/start.php +2 -2
- lib/freemius/templates/forms/affiliation.php +9 -5
- package.json +1 -0
- readme.txt +6 -2
app.php
CHANGED
@@ -15,7 +15,7 @@ final class CAS_App {
|
|
15 |
/**
|
16 |
* Plugin version
|
17 |
*/
|
18 |
-
const PLUGIN_VERSION = '3.7.
|
19 |
|
20 |
/**
|
21 |
* Prefix for sidebar id
|
15 |
/**
|
16 |
* Plugin version
|
17 |
*/
|
18 |
+
const PLUGIN_VERSION = '3.7.3';
|
19 |
|
20 |
/**
|
21 |
* Prefix for sidebar id
|
content-aware-sidebars.php
CHANGED
@@ -9,7 +9,7 @@
|
|
9 |
Plugin Name: Content Aware Sidebars
|
10 |
Plugin URI: https://dev.institute/wordpress-sidebars/
|
11 |
Description: Unlimited custom sidebars and widget areas for any post, page, category etc.
|
12 |
-
Version: 3.7.
|
13 |
Author: Joachim Jensen
|
14 |
Author URI: https://dev.institute
|
15 |
Text Domain: content-aware-sidebars
|
9 |
Plugin Name: Content Aware Sidebars
|
10 |
Plugin URI: https://dev.institute/wordpress-sidebars/
|
11 |
Description: Unlimited custom sidebars and widget areas for any post, page, category etc.
|
12 |
+
Version: 3.7.3
|
13 |
Author: Joachim Jensen
|
14 |
Author URI: https://dev.institute
|
15 |
Text Domain: content-aware-sidebars
|
gulpfile.js
CHANGED
@@ -1,7 +1,9 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
|
|
|
|
5 |
|
6 |
gulp.task('less', function (done) {
|
7 |
return gulp.src('css/style.less')
|
@@ -14,7 +16,7 @@ gulp.task('less', function (done) {
|
|
14 |
.pipe(gulp.dest('css'));
|
15 |
});
|
16 |
|
17 |
-
gulp.task('uglify', function (
|
18 |
return gulp.src(['js/*.js','!js/*.min.js'])
|
19 |
.pipe(uglify({
|
20 |
compress: {
|
@@ -32,6 +34,12 @@ gulp.task('uglify', function (cb) {
|
|
32 |
.pipe(gulp.dest('js'));
|
33 |
});
|
34 |
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
gulp.task('watch', function() {
|
36 |
gulp.watch('css/style.less', gulp.parallel('less'));
|
37 |
gulp.watch(['js/*.js','!js/*.min.js'], gulp.parallel('uglify'));
|
@@ -39,5 +47,7 @@ gulp.task('watch', function() {
|
|
39 |
|
40 |
gulp.task('build', gulp.parallel('less','uglify'));
|
41 |
|
|
|
|
|
42 |
gulp.task('default', gulp.parallel('build'));
|
43 |
|
1 |
+
'use strict';
|
2 |
+
const gulp = require('gulp');
|
3 |
+
const less = require('gulp-less');
|
4 |
+
const uglify = require('gulp-uglify');
|
5 |
+
const rename = require("gulp-rename");
|
6 |
+
const zip = require("gulp-zip");
|
7 |
|
8 |
gulp.task('less', function (done) {
|
9 |
return gulp.src('css/style.less')
|
16 |
.pipe(gulp.dest('css'));
|
17 |
});
|
18 |
|
19 |
+
gulp.task('uglify', function () {
|
20 |
return gulp.src(['js/*.js','!js/*.min.js'])
|
21 |
.pipe(uglify({
|
22 |
compress: {
|
34 |
.pipe(gulp.dest('js'));
|
35 |
});
|
36 |
|
37 |
+
gulp.task('zip', function() {
|
38 |
+
return gulp.src(['**','!build{,/**}','!**/node_modules{,/**}'],{base:'../'})
|
39 |
+
.pipe(zip('content-aware-sidebars.zip'))
|
40 |
+
.pipe(gulp.dest('build'));
|
41 |
+
});
|
42 |
+
|
43 |
gulp.task('watch', function() {
|
44 |
gulp.watch('css/style.less', gulp.parallel('less'));
|
45 |
gulp.watch(['js/*.js','!js/*.min.js'], gulp.parallel('uglify'));
|
47 |
|
48 |
gulp.task('build', gulp.parallel('less','uglify'));
|
49 |
|
50 |
+
gulp.task('deploy', gulp.series('build','zip'));
|
51 |
+
|
52 |
gulp.task('default', gulp.parallel('build'));
|
53 |
|
lib/freemius/.codeclimate.yml
DELETED
@@ -1,19 +0,0 @@
|
|
1 |
-
engines:
|
2 |
-
phpcodesniffer:
|
3 |
-
enabled: true
|
4 |
-
config:
|
5 |
-
standard: "WordPress"
|
6 |
-
checks:
|
7 |
-
Squiz Commenting InlineComment InvalidEndChar:
|
8 |
-
enabled: false
|
9 |
-
Squiz Commenting InlineComment SpacingBefore:
|
10 |
-
enabled: false
|
11 |
-
Squiz Commenting InlineComment WrongStyle:
|
12 |
-
enabled: false
|
13 |
-
Generic Commenting DocComment MissingShort:
|
14 |
-
enabled: false
|
15 |
-
Generic WhiteSpace ScopeIndent IncorrectExact:
|
16 |
-
enabled: false
|
17 |
-
ratings:
|
18 |
-
paths:
|
19 |
-
- "**.php"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/freemius/.travis.yml
DELETED
@@ -1,11 +0,0 @@
|
|
1 |
-
sudo: false
|
2 |
-
|
3 |
-
language: php
|
4 |
-
|
5 |
-
php:
|
6 |
-
- 5.3
|
7 |
-
- 5.4
|
8 |
-
- 5.5
|
9 |
-
- 5.6
|
10 |
-
- 7.0
|
11 |
-
- hhvm
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/freemius/config.php
CHANGED
@@ -285,6 +285,9 @@
|
|
285 |
if ( ! defined( 'WP_FS__TIME_24_HOURS_IN_SEC' ) ) {
|
286 |
define( 'WP_FS__TIME_24_HOURS_IN_SEC', 86400 );
|
287 |
}
|
|
|
|
|
|
|
288 |
|
289 |
#--------------------------------------------------------------------------------
|
290 |
#region Debugging
|
285 |
if ( ! defined( 'WP_FS__TIME_24_HOURS_IN_SEC' ) ) {
|
286 |
define( 'WP_FS__TIME_24_HOURS_IN_SEC', 86400 );
|
287 |
}
|
288 |
+
if ( ! defined( 'WP_FS__TIME_WEEK_IN_SEC' ) ) {
|
289 |
+
define( 'WP_FS__TIME_WEEK_IN_SEC', 7 * WP_FS__TIME_24_HOURS_IN_SEC );
|
290 |
+
}
|
291 |
|
292 |
#--------------------------------------------------------------------------------
|
293 |
#region Debugging
|
lib/freemius/includes/class-freemius.php
CHANGED
@@ -3009,10 +3009,6 @@
|
|
3009 |
|
3010 |
$this->parse_settings( $plugin_info );
|
3011 |
|
3012 |
-
if ( $this->has_affiliate_program() ) {
|
3013 |
-
$this->fetch_affiliate_and_terms();
|
3014 |
-
}
|
3015 |
-
|
3016 |
if ( ! self::is_ajax() ) {
|
3017 |
if ( ! $this->is_addon() || $this->is_only_premium() ) {
|
3018 |
add_action( 'admin_menu', array( &$this, '_prepare_admin_menu' ), WP_FS__LOWEST_PRIORITY );
|
@@ -7357,14 +7353,12 @@
|
|
7357 |
|
7358 |
/**
|
7359 |
* @author Leo Fajardo (@leorw)
|
7360 |
-
* @since 1.2.
|
7361 |
*/
|
7362 |
-
private function
|
7363 |
-
$this->_logger->entrance();
|
7364 |
-
|
7365 |
if ( ! is_object( $this->plugin_affiliate_terms ) ) {
|
7366 |
$plugins_api = $this->get_api_plugin_scope();
|
7367 |
-
$affiliate_terms = $plugins_api->get( '/aff.json?type=affiliation',
|
7368 |
|
7369 |
if ( ! $this->is_api_result_entity( $affiliate_terms ) ) {
|
7370 |
return;
|
@@ -7372,20 +7366,30 @@
|
|
7372 |
|
7373 |
$this->plugin_affiliate_terms = new FS_AffiliateTerms( $affiliate_terms );
|
7374 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7375 |
|
7376 |
-
if ( $this->is_registered() ) {
|
7377 |
$users_api = $this->get_api_user_scope();
|
7378 |
-
$result = $users_api->get( "/plugins/{$this->_plugin->id}/aff/{$this->plugin_affiliate_terms->id}/affiliates.json",
|
7379 |
if ( $this->is_api_result_object( $result, 'affiliates' ) ) {
|
7380 |
if ( ! empty( $result->affiliates ) ) {
|
7381 |
$affiliate = new FS_Affiliate( $result->affiliates[0] );
|
7382 |
|
7383 |
-
if ( ! $
|
7384 |
-
|
|
|
7385 |
}
|
7386 |
|
7387 |
if ( $affiliate->is_using_custom_terms ) {
|
7388 |
-
$affiliate_terms = $users_api->get( "/plugins/{$this->_plugin->id}/affiliates/{$affiliate->id}/aff/{$affiliate->custom_affiliate_terms_id}.json",
|
7389 |
if ( $this->is_api_result_entity( $affiliate_terms ) ) {
|
7390 |
$this->custom_affiliate_terms = new FS_AffiliateTerms( $affiliate_terms );
|
7391 |
}
|
@@ -7397,6 +7401,17 @@
|
|
7397 |
}
|
7398 |
}
|
7399 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7400 |
/**
|
7401 |
* @author Leo Fajardo
|
7402 |
* @since 1.2.3
|
@@ -7469,6 +7484,8 @@
|
|
7469 |
}
|
7470 |
}
|
7471 |
|
|
|
|
|
7472 |
$api = $this->get_api_user_scope();
|
7473 |
$result = $api->call(
|
7474 |
( "/plugins/{$this->_plugin->id}/aff/{$this->plugin_affiliate_terms->id}/affiliates.json" ),
|
@@ -7490,6 +7507,7 @@
|
|
7490 |
}
|
7491 |
|
7492 |
$affiliate_application_data = array(
|
|
|
7493 |
'stats_description' => $affiliate['stats_description'],
|
7494 |
'promotion_method_description' => $affiliate['promotion_method_description'],
|
7495 |
);
|
@@ -12671,6 +12689,8 @@
|
|
12671 |
function _affiliation_page_render() {
|
12672 |
$this->_logger->entrance();
|
12673 |
|
|
|
|
|
12674 |
fs_enqueue_local_style( 'fs_affiliation', '/admin/affiliation.css' );
|
12675 |
|
12676 |
$vars = array( 'id' => $this->_module_id );
|
@@ -13160,8 +13180,6 @@
|
|
13160 |
if (
|
13161 |
// Product has no affiliate program.
|
13162 |
! $this->has_affiliate_program() ||
|
13163 |
-
// User is already an affiliate.
|
13164 |
-
is_object( $this->affiliate ) ||
|
13165 |
// User has applied for an affiliate account.
|
13166 |
! empty( $this->_storage->affiliate_application_data ) ) {
|
13167 |
return false;
|
3009 |
|
3010 |
$this->parse_settings( $plugin_info );
|
3011 |
|
|
|
|
|
|
|
|
|
3012 |
if ( ! self::is_ajax() ) {
|
3013 |
if ( ! $this->is_addon() || $this->is_only_premium() ) {
|
3014 |
add_action( 'admin_menu', array( &$this, '_prepare_admin_menu' ), WP_FS__LOWEST_PRIORITY );
|
7353 |
|
7354 |
/**
|
7355 |
* @author Leo Fajardo (@leorw)
|
7356 |
+
* @since 1.2.4
|
7357 |
*/
|
7358 |
+
private function fetch_affiliate_terms() {
|
|
|
|
|
7359 |
if ( ! is_object( $this->plugin_affiliate_terms ) ) {
|
7360 |
$plugins_api = $this->get_api_plugin_scope();
|
7361 |
+
$affiliate_terms = $plugins_api->get( '/aff.json?type=affiliation', false, WP_FS__TIME_WEEK_IN_SEC );
|
7362 |
|
7363 |
if ( ! $this->is_api_result_entity( $affiliate_terms ) ) {
|
7364 |
return;
|
7366 |
|
7367 |
$this->plugin_affiliate_terms = new FS_AffiliateTerms( $affiliate_terms );
|
7368 |
}
|
7369 |
+
}
|
7370 |
+
|
7371 |
+
/**
|
7372 |
+
* @author Leo Fajardo (@leorw)
|
7373 |
+
* @since 1.2.4
|
7374 |
+
*/
|
7375 |
+
private function fetch_affiliate_and_custom_terms() {
|
7376 |
+
if ( ! empty( $this->_storage->affiliate_application_data ) ) {
|
7377 |
+
$application_data = $this->_storage->affiliate_application_data;
|
7378 |
+
$flush = ( ! isset( $application_data['status'] ) || 'pending' === $application_data['status'] );
|
7379 |
|
|
|
7380 |
$users_api = $this->get_api_user_scope();
|
7381 |
+
$result = $users_api->get( "/plugins/{$this->_plugin->id}/aff/{$this->plugin_affiliate_terms->id}/affiliates.json", $flush, WP_FS__TIME_WEEK_IN_SEC );
|
7382 |
if ( $this->is_api_result_object( $result, 'affiliates' ) ) {
|
7383 |
if ( ! empty( $result->affiliates ) ) {
|
7384 |
$affiliate = new FS_Affiliate( $result->affiliates[0] );
|
7385 |
|
7386 |
+
if ( ! isset( $application_data['status'] ) || $application_data['status'] !== $affiliate->status ) {
|
7387 |
+
$application_data['status'] = $affiliate->status;
|
7388 |
+
$this->_storage->affiliate_application_data = $application_data;
|
7389 |
}
|
7390 |
|
7391 |
if ( $affiliate->is_using_custom_terms ) {
|
7392 |
+
$affiliate_terms = $users_api->get( "/plugins/{$this->_plugin->id}/affiliates/{$affiliate->id}/aff/{$affiliate->custom_affiliate_terms_id}.json", $flush, WP_FS__TIME_WEEK_IN_SEC );
|
7393 |
if ( $this->is_api_result_entity( $affiliate_terms ) ) {
|
7394 |
$this->custom_affiliate_terms = new FS_AffiliateTerms( $affiliate_terms );
|
7395 |
}
|
7401 |
}
|
7402 |
}
|
7403 |
|
7404 |
+
/**
|
7405 |
+
* @author Leo Fajardo (@leorw)
|
7406 |
+
* @since 1.2.3
|
7407 |
+
*/
|
7408 |
+
private function fetch_affiliate_and_terms() {
|
7409 |
+
$this->_logger->entrance();
|
7410 |
+
|
7411 |
+
$this->fetch_affiliate_terms();
|
7412 |
+
$this->fetch_affiliate_and_custom_terms();
|
7413 |
+
}
|
7414 |
+
|
7415 |
/**
|
7416 |
* @author Leo Fajardo
|
7417 |
* @since 1.2.3
|
7484 |
}
|
7485 |
}
|
7486 |
|
7487 |
+
$this->fetch_affiliate_terms();
|
7488 |
+
|
7489 |
$api = $this->get_api_user_scope();
|
7490 |
$result = $api->call(
|
7491 |
( "/plugins/{$this->_plugin->id}/aff/{$this->plugin_affiliate_terms->id}/affiliates.json" ),
|
7507 |
}
|
7508 |
|
7509 |
$affiliate_application_data = array(
|
7510 |
+
'status' => 'pending',
|
7511 |
'stats_description' => $affiliate['stats_description'],
|
7512 |
'promotion_method_description' => $affiliate['promotion_method_description'],
|
7513 |
);
|
12689 |
function _affiliation_page_render() {
|
12690 |
$this->_logger->entrance();
|
12691 |
|
12692 |
+
$this->fetch_affiliate_and_terms();
|
12693 |
+
|
12694 |
fs_enqueue_local_style( 'fs_affiliation', '/admin/affiliation.css' );
|
12695 |
|
12696 |
$vars = array( 'id' => $this->_module_id );
|
13180 |
if (
|
13181 |
// Product has no affiliate program.
|
13182 |
! $this->has_affiliate_program() ||
|
|
|
|
|
13183 |
// User has applied for an affiliate account.
|
13184 |
! empty( $this->_storage->affiliate_application_data ) ) {
|
13185 |
return false;
|
lib/freemius/start.php
CHANGED
@@ -15,7 +15,7 @@
|
|
15 |
*
|
16 |
* @var string
|
17 |
*/
|
18 |
-
$this_sdk_version = '1.2.
|
19 |
|
20 |
#region SDK Selection Logic --------------------------------------------------------------------
|
21 |
|
@@ -498,4 +498,4 @@
|
|
498 |
function fs_dump_log() {
|
499 |
FS_Logger::dump();
|
500 |
}
|
501 |
-
}
|
15 |
*
|
16 |
* @var string
|
17 |
*/
|
18 |
+
$this_sdk_version = '1.2.4';
|
19 |
|
20 |
#region SDK Selection Logic --------------------------------------------------------------------
|
21 |
|
498 |
function fs_dump_log() {
|
499 |
FS_Logger::dump();
|
500 |
}
|
501 |
+
}
|
lib/freemius/templates/forms/affiliation.php
CHANGED
@@ -99,11 +99,15 @@
|
|
99 |
<?php if ( $affiliate->is_active() ) : ?>
|
100 |
<div class="updated">
|
101 |
<p><strong><?php
|
102 |
-
echo
|
103 |
-
|
104 |
$plugin_title,
|
105 |
-
sprintf(
|
106 |
-
|
|
|
|
|
|
|
|
|
107 |
?></strong></p>
|
108 |
</div>
|
109 |
<?php else : ?>
|
@@ -361,7 +365,7 @@
|
|
361 |
beforeSend: function() {
|
362 |
$cancelButton.addClass( 'disabled' );
|
363 |
$submitButton.addClass( 'disabled' );
|
364 |
-
$submitButton.text( '<?php
|
365 |
},
|
366 |
success : function( result ) {
|
367 |
if ( result.success ) {
|
99 |
<?php if ( $affiliate->is_active() ) : ?>
|
100 |
<div class="updated">
|
101 |
<p><strong><?php
|
102 |
+
echo sprintf(
|
103 |
+
fs_esc_html_inline( "Your affiliate application for %s has been accepted! Log in to your affiliate area at: %s.", 'affiliate-application-accepted', $slug ),
|
104 |
$plugin_title,
|
105 |
+
sprintf(
|
106 |
+
'<a href="%s" target="_blank">%s</a>',
|
107 |
+
$members_dashboard_login_url,
|
108 |
+
$members_dashboard_login_url
|
109 |
+
)
|
110 |
+
);
|
111 |
?></strong></p>
|
112 |
</div>
|
113 |
<?php else : ?>
|
365 |
beforeSend: function() {
|
366 |
$cancelButton.addClass( 'disabled' );
|
367 |
$submitButton.addClass( 'disabled' );
|
368 |
+
$submitButton.text( '<?php fs_esc_js_echo_inline( 'Processing', 'processing' ) ?>...' );
|
369 |
},
|
370 |
success : function( result ) {
|
371 |
if ( result.success ) {
|
package.json
CHANGED
@@ -16,6 +16,7 @@
|
|
16 |
"gulp-less": "^3.4.0",
|
17 |
"gulp-rename": "^1.2.2",
|
18 |
"gulp-uglify": "^3.0.0",
|
|
|
19 |
"less-plugin-autoprefix": "^1.5.1",
|
20 |
"less-plugin-clean-css": "^1.5.1"
|
21 |
}
|
16 |
"gulp-less": "^3.4.0",
|
17 |
"gulp-rename": "^1.2.2",
|
18 |
"gulp-uglify": "^3.0.0",
|
19 |
+
"gulp-zip": "^4.1.0",
|
20 |
"less-plugin-autoprefix": "^1.5.1",
|
21 |
"less-plugin-clean-css": "^1.5.1"
|
22 |
}
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: custom sidebars, sidebar, hide sidebar, display widgets, widget, bbpress,
|
|
5 |
Requires at least: 4.1
|
6 |
Requires PHP: 5.2.4
|
7 |
Tested up to: 4.9
|
8 |
-
Stable tag: 3.7.
|
9 |
License: GPLv3
|
10 |
|
11 |
Display widget areas and custom sidebars on any post, page, category etc. Supports bbPress, BuddyPress, WooCommerce, WPML, and more.
|
@@ -161,10 +161,14 @@ Of course! Check out the links below:
|
|
161 |
|
162 |
== Changelog ==
|
163 |
|
164 |
-
= 3.7.
|
165 |
|
166 |
[View Release Notes](https://dev.institute/blog/design-insert-widget-areas-content-aware-sidebars-3-7/?utm_source=readme&utm_medium=referral&utm_content=changelog&utm_campaign=cas)
|
167 |
|
|
|
|
|
|
|
|
|
168 |
* Added: redirect to current tab on sidebar update
|
169 |
* Added: better display of hierarchical items in conditions
|
170 |
* Added: UI improvements
|
5 |
Requires at least: 4.1
|
6 |
Requires PHP: 5.2.4
|
7 |
Tested up to: 4.9
|
8 |
+
Stable tag: 3.7.3
|
9 |
License: GPLv3
|
10 |
|
11 |
Display widget areas and custom sidebars on any post, page, category etc. Supports bbPress, BuddyPress, WooCommerce, WPML, and more.
|
161 |
|
162 |
== Changelog ==
|
163 |
|
164 |
+
= 3.7.3 =
|
165 |
|
166 |
[View Release Notes](https://dev.institute/blog/design-insert-widget-areas-content-aware-sidebars-3-7/?utm_source=readme&utm_medium=referral&utm_content=changelog&utm_campaign=cas)
|
167 |
|
168 |
+
* Updated: freemius sdk
|
169 |
+
|
170 |
+
= 3.7.2 =
|
171 |
+
|
172 |
* Added: redirect to current tab on sidebar update
|
173 |
* Added: better display of hierarchical items in conditions
|
174 |
* Added: UI improvements
|