Gutenberg Blocks and Template Library by Otter - Version 1.2.5

Version Description

  • 2019-09-10
Download this release

Release Info

Developer themeisle
Plugin Icon wp plugin Gutenberg Blocks and Template Library by Otter
Version 1.2.5
Comparing to
See all releases

Code changes from version 1.2.4 to 1.2.5

CHANGELOG.md CHANGED
@@ -1,4 +1,8 @@
1
2
### v1.2.4 - 2019-07-30
3
**Changes:**
4
* Fix Internet Explorer incompatibility
1
2
+ ### v1.2.5 - 2019-09-10
3
+ **Changes:**
4
+ * Fix AMP compatibility errors.
5
+
6
### v1.2.4 - 2019-07-30
7
**Changes:**
8
* Fix Internet Explorer incompatibility
otter-blocks.php CHANGED
@@ -3,7 +3,7 @@
3
* Plugin Name: Gutenberg Blocks and Template Library by Otter
4
* Plugin URI: https://themeisle.com/plugins/otter-blocks
5
* Description: Create beautiful and attracting posts, pages, and landing pages with Gutenberg Blocks and Template Library by Otter. Otter comes with dozens of Gutenberg blocks that are all you need to build beautiful pages.
6
- * Version: 1.2.4
7
* Author: ThemeIsle
8
* Author URI: https://themeisle.com
9
* License: GPL-2.0+
@@ -22,7 +22,7 @@ if ( ! defined( 'WPINC' ) ) {
22
define( 'OTTER_BLOCKS_BASEFILE', __FILE__ );
23
define( 'OTTER_BLOCKS_URL', plugins_url( '/', __FILE__ ) );
24
define( 'OTTER_BLOCKS_PATH', dirname( __FILE__ ) );
25
- define( 'OTTER_BLOCKS_VERSION', '1.2.4' );
26
define( 'OTTER_BLOCKS_DEV', false );
27
28
$vendor_file = OTTER_BLOCKS_PATH . '/vendor/autoload.php';
3
* Plugin Name: Gutenberg Blocks and Template Library by Otter
4
* Plugin URI: https://themeisle.com/plugins/otter-blocks
5
* Description: Create beautiful and attracting posts, pages, and landing pages with Gutenberg Blocks and Template Library by Otter. Otter comes with dozens of Gutenberg blocks that are all you need to build beautiful pages.
6
+ * Version: 1.2.5
7
* Author: ThemeIsle
8
* Author URI: https://themeisle.com
9
* License: GPL-2.0+
22
define( 'OTTER_BLOCKS_BASEFILE', __FILE__ );
23
define( 'OTTER_BLOCKS_URL', plugins_url( '/', __FILE__ ) );
24
define( 'OTTER_BLOCKS_PATH', dirname( __FILE__ ) );
25
+ define( 'OTTER_BLOCKS_VERSION', '1.2.5' );
26
define( 'OTTER_BLOCKS_DEV', false );
27
28
$vendor_file = OTTER_BLOCKS_PATH . '/vendor/autoload.php';
readme.md CHANGED
@@ -1,6 +1,6 @@
1
# Gutenberg Blocks and Template Library by Otter #
2
**Contributors:** [themeisle](https://profiles.wordpress.org/themeisle), [hardeepasrani](https://profiles.wordpress.org/hardeepasrani)
3
- **Tags:** gutenberg, block, services block, pricing block, testimonials block, post grid block, google map block, font awesome block, sharing icons block, about author block, columns block, advanced columns, section, columds, row, layout
4
**Requires at least:** 5.0
5
**Tested up to:** 5.2
6
**Requires PHP:** 5.4
@@ -39,12 +39,16 @@ It has:
39
40
## Screenshots ##
41
42
- 1. Otter Blocks
43
- 2. Section Block
44
- 3. Template Library
45
- 4. Pre-built Section
46
47
## Changelog ##
48
### 1.2.4 - 2019-07-30 ###
49
50
* Fix Internet Explorer incompatibility
1
# Gutenberg Blocks and Template Library by Otter #
2
**Contributors:** [themeisle](https://profiles.wordpress.org/themeisle), [hardeepasrani](https://profiles.wordpress.org/hardeepasrani)
3
+ **Tags:** gutenberg blocks, gutenberg, block,post grid block, google map block, columns block, advanced columns, section, row, layout
4
**Requires at least:** 5.0
5
**Tested up to:** 5.2
6
**Requires PHP:** 5.4
39
40
## Screenshots ##
41
42
+ 1. Section Block
43
+ 2. Google Map Block
44
+ 3. Posts Block
45
46
## Changelog ##
47
+ ### 1.2.5 - 2019-09-10 ###
48
+
49
+ * Fix AMP compatibility errors.
50
+
51
+
52
### 1.2.4 - 2019-07-30 ###
53
54
* Fix Internet Explorer incompatibility
readme.txt CHANGED
@@ -1,6 +1,6 @@
1
=== Gutenberg Blocks and Template Library by Otter ===
2
Contributors: themeisle, hardeepasrani
3
- Tags: gutenberg, block, services block, pricing block, testimonials block, post grid block, google map block, font awesome block, sharing icons block, about author block, columns block, advanced columns, section, columds, row, layout
4
Requires at least: 5.0
5
Tested up to: 5.2
6
Requires PHP: 5.4
@@ -39,12 +39,16 @@ It has:
39
40
== Screenshots ==
41
42
- 1. Otter Blocks
43
- 2. Section Block
44
- 3. Template Library
45
- 4. Pre-built Section
46
47
== Changelog ==
48
= 1.2.4 - 2019-07-30 =
49
50
* Fix Internet Explorer incompatibility
1
=== Gutenberg Blocks and Template Library by Otter ===
2
Contributors: themeisle, hardeepasrani
3
+ Tags: gutenberg blocks, gutenberg, block,post grid block, google map block, columns block, advanced columns, section, row, layout
4
Requires at least: 5.0
5
Tested up to: 5.2
6
Requires PHP: 5.4
39
40
== Screenshots ==
41
42
+ 1. Section Block
43
+ 2. Google Map Block
44
+ 3. Posts Block
45
46
== Changelog ==
47
+ = 1.2.5 - 2019-09-10 =
48
+
49
+ * Fix AMP compatibility errors.
50
+
51
+
52
= 1.2.4 - 2019-07-30 =
53
54
* Fix Internet Explorer incompatibility
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
5
require_once __DIR__ . '/composer' . '/autoload_real.php';
6
7
- return ComposerAutoloaderInit515ef929ab8adb028bd1f847224e571e::getLoader();
4
5
require_once __DIR__ . '/composer' . '/autoload_real.php';
6
7
+ return ComposerAutoloaderInitdace1cf96a42d5dbfc274f534aba464d::getLoader();
vendor/codeinwp/gutenberg-animation/class-gutenberg-animation.php CHANGED
@@ -62,6 +62,10 @@ if ( ! class_exists( '\ThemeIsle\GutenbergAnimation' ) ) {
62
* @access public
63
*/
64
public function enqueue_block_frontend_assets() {
65
wp_enqueue_style(
66
'animate-css',
67
plugin_dir_url( $this->get_dir() ) . $this->slug . '/assets/css/animate.min.css'
62
* @access public
63
*/
64
public function enqueue_block_frontend_assets() {
65
+ if ( function_exists( 'is_amp_endpoint' ) && is_amp_endpoint() ) {
66
+ return;
67
+ }
68
+
69
wp_enqueue_style(
70
'animate-css',
71
plugin_dir_url( $this->get_dir() ) . $this->slug . '/assets/css/animate.min.css'
vendor/codeinwp/gutenberg-animation/load.php CHANGED
@@ -8,7 +8,7 @@
8
* @since 1.0.0
9
*/
10
11
- define( 'THEMEISLE_GUTENBERG_ANIMATION_VERSION', '1.0.1' );
12
define( 'THEMEISLE_GUTENBERG_ANIMATION_DEV', false );
13
14
add_action(
8
* @since 1.0.0
9
*/
10
11
+ define( 'THEMEISLE_GUTENBERG_ANIMATION_VERSION', '1.0.2' );
12
define( 'THEMEISLE_GUTENBERG_ANIMATION_DEV', false );
13
14
add_action(
vendor/codeinwp/themeisle-sdk/CHANGELOG.md CHANGED
@@ -1,3 +1,53 @@
1
## [3.0.10](https://github.com/Codeinwp/themeisle-sdk/compare/v3.0.9...v3.0.10) (2019-07-16)
2
3
1
+ ## [3.1.4](https://github.com/Codeinwp/themeisle-sdk/compare/v3.1.3...v3.1.4) (2019-08-23)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * license key was missing on get_version call ([365cde6](https://github.com/Codeinwp/themeisle-sdk/commit/365cde6))
7
+ * license key was missing on get_version call ([c02f225](https://github.com/Codeinwp/themeisle-sdk/commit/c02f225))
8
+
9
+ ## [3.1.3](https://github.com/Codeinwp/themeisle-sdk/compare/v3.1.2...v3.1.3) (2019-08-20)
10
+
11
+
12
+ ### Bug Fixes
13
+
14
+ * license deactivation behaviour https://github.com/Codeinwp/visua… ([59c4afe](https://github.com/Codeinwp/themeisle-sdk/commit/59c4afe))
15
+ * license deactivation behaviour https://github.com/Codeinwp/visualizer-pro/issues/192 ([f641e18](https://github.com/Codeinwp/themeisle-sdk/commit/f641e18))
16
+
17
+ ## [3.1.2](https://github.com/Codeinwp/themeisle-sdk/compare/v3.1.1...v3.1.2) (2019-08-12)
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * phpunit test case ([efe851c](https://github.com/Codeinwp/themeisle-sdk/commit/efe851c))
23
+ * url format for license endpoint, improve changelog handling and license checks ([a492c68](https://github.com/Codeinwp/themeisle-sdk/commit/a492c68))
24
+
25
+ ## [3.1.1](https://github.com/Codeinwp/themeisle-sdk/compare/v3.1.0...v3.1.1) (2019-08-08)
26
+
27
+
28
+ ### Bug Fixes
29
+
30
+ * adds is_file for file existence check ([d1205c4](https://github.com/Codeinwp/themeisle-sdk/commit/d1205c4))
31
+ * adds is_file for file existence check ([be119c1](https://github.com/Codeinwp/themeisle-sdk/commit/be119c1))
32
+
33
+ # [3.1.0](https://github.com/Codeinwp/themeisle-sdk/compare/v3.0.10...v3.1.0) (2019-08-05)
34
+
35
+
36
+ ### Bug Fixes
37
+
38
+ * adds extra comments for rest of the options, fix [#64](https://github.com/Codeinwp/themeisle-sdk/issues/64) ([018b22f](https://github.com/Codeinwp/themeisle-sdk/commit/018b22f))
39
+ * hide license key when active under a password mask, fix [#67](https://github.com/Codeinwp/themeisle-sdk/issues/67) ([c0633c2](https://github.com/Codeinwp/themeisle-sdk/commit/c0633c2))
40
+ * new uninstall feedback popup issues ([5bda4bd](https://github.com/Codeinwp/themeisle-sdk/commit/5bda4bd))
41
+ * phpcs indentation errors ([d59ed4f](https://github.com/Codeinwp/themeisle-sdk/commit/d59ed4f))
42
+ * undefined notices on license check, fix [#60](https://github.com/Codeinwp/themeisle-sdk/issues/60) ([7f56a97](https://github.com/Codeinwp/themeisle-sdk/commit/7f56a97))
43
+ * uninstall feedback popup placement [[#61](https://github.com/Codeinwp/themeisle-sdk/issues/61)] ([1102d6c](https://github.com/Codeinwp/themeisle-sdk/commit/1102d6c))
44
+
45
+
46
+ ### Features
47
+
48
+ * new product feedback popup ([f0dbab3](https://github.com/Codeinwp/themeisle-sdk/commit/f0dbab3))
49
+ * new uninstall feedback form for themes ([8a29f21](https://github.com/Codeinwp/themeisle-sdk/commit/8a29f21))
50
+
51
## [3.0.10](https://github.com/Codeinwp/themeisle-sdk/compare/v3.0.9...v3.0.10) (2019-07-16)
52
53
vendor/codeinwp/themeisle-sdk/load.php CHANGED
@@ -14,7 +14,7 @@ if ( ! defined( 'ABSPATH' ) ) {
14
return;
15
}
16
// Current SDK version and path.
17
- $themeisle_sdk_version = '3.0.10';
18
$themeisle_sdk_path = dirname( __FILE__ );
19
20
global $themeisle_sdk_max_version;
@@ -24,7 +24,7 @@ global $themeisle_sdk_max_path;
24
$themeisle_sdk_relative_licenser_path = '/src/Modules/Licenser.php';
25
26
global $themeisle_sdk_abs_licenser_path;
27
- if ( ! file_exists( $themeisle_sdk_path . $themeisle_sdk_relative_licenser_path ) && file_exists( $themeisle_sdk_max_path . $themeisle_sdk_relative_licenser_path ) ) {
28
$themeisle_sdk_abs_licenser_path = $themeisle_sdk_max_path . $themeisle_sdk_relative_licenser_path;
29
add_filter( 'themeisle_sdk_required_files', 'themeisle_sdk_load_licenser_if_present' );
30
}
14
return;
15
}
16
// Current SDK version and path.
17
+ $themeisle_sdk_version = '3.1.4';
18
$themeisle_sdk_path = dirname( __FILE__ );
19
20
global $themeisle_sdk_max_version;
24
$themeisle_sdk_relative_licenser_path = '/src/Modules/Licenser.php';
25
26
global $themeisle_sdk_abs_licenser_path;
27
+ if ( ! is_file( $themeisle_sdk_path . $themeisle_sdk_relative_licenser_path ) && is_file( $themeisle_sdk_max_path . $themeisle_sdk_relative_licenser_path ) ) {
28
$themeisle_sdk_abs_licenser_path = $themeisle_sdk_max_path . $themeisle_sdk_relative_licenser_path;
29
add_filter( 'themeisle_sdk_required_files', 'themeisle_sdk_load_licenser_if_present' );
30
}
vendor/codeinwp/themeisle-sdk/src/Loader.php CHANGED
@@ -84,7 +84,7 @@ final class Loader {
84
*/
85
public static function add_product( $base_file ) {
86
87
- if ( ! is_readable( $base_file ) ) {
88
return self::$instance;
89
}
90
$product = new Product( $base_file );
84
*/
85
public static function add_product( $base_file ) {
86
87
+ if ( ! is_file( $base_file ) ) {
88
return self::$instance;
89
}
90
$product = new Product( $base_file );
vendor/codeinwp/themeisle-sdk/src/Modules/Licenser.php CHANGED
@@ -109,8 +109,66 @@ class Licenser extends Abstract_Module {
109
$valid_string = apply_filters( $this->product->get_key() . '_lc_valid_string', 'Valid' );
110
$invalid_string = apply_filters( $this->product->get_key() . '_lc_invalid_string', 'Invalid' );
111
$license_message = apply_filters( $this->product->get_key() . '_lc_license_message', 'Enter your license from %s purchase history in order to get %s updates' );
112
113
- echo '<p ><input ' . ( ( 'valid' === $status ) ? ( 'style="border:1px solid #7ad03a; "' ) : '' ) . ' type="text" id="' . $this->product->get_key() . '_license" name="' . $this->product->get_key() . '_license" value="' . $value . '" /><a ' . ( ( 'valid' === $status ) ? ( 'style="color:#fff;background: #7ad03a; display: inline-block;text-decoration: none;font-size: 13px;line-height: 26px;height: 26px; margin-left:5px; padding: 0 10px 1px; -webkit-border-radius: 3px;border-radius: 3px; ">' . $valid_string ) : ( 'style="color:#fff;background: #dd3d36; display: inline-block;text-decoration: none;font-size: 13px;line-height: 26px;height: 26px; margin-left:5px; padding: 0 10px 1px; -webkit-border-radius: 3px;border-radius: 3px; ">' . $invalid_string ) ) . ' </a>&nbsp;&nbsp;&nbsp;<button name="' . $this->product->get_key() . '_btn_trigger" ' . ( ( 'valid' === $status ) ? ( ' class="button button-primary">' . $deactivate_string ) : ( ' class="button button-primary" value="yes" type="submit" >' . $activate_string ) ) . ' </button></p><p class="description">' . sprintf( $license_message, '<a href="' . $this->get_api_url() . '">' . $this->get_distributor_name() . '</a> ', $this->product->get_type() ) . '</p>';
114
115
}
116
@@ -424,7 +482,7 @@ class Licenser extends Abstract_Module {
424
function update_nag() {
425
$theme = wp_get_theme( $this->product->get_slug() );
426
$api_response = get_transient( $this->product_key );
427
- if ( false === $api_response ) {
428
return;
429
}
430
$update_url = wp_nonce_url( 'update.php?action=upgrade-theme&amp;theme=' . urlencode( $this->product->get_slug() ), 'upgrade-theme_' . $this->product->get_slug() );
@@ -436,7 +494,7 @@ class Licenser extends Abstract_Module {
436
'<strong>%1$s %2$s</strong> is available. <a href="%3$s" class="thickbox" title="%4s">Check out what\'s new</a> or <a href="%5$s"%6$s>update now</a>.',
437
$theme->get( 'Name' ),
438
$api_response->new_version,
439
- '#TB_inline?width=640&amp;inlineId=' . $this->product->get_version() . '_changelog',
440
$theme->get( 'Name' ),
441
$update_url,
442
$update_onclick
@@ -486,7 +544,7 @@ class Licenser extends Abstract_Module {
486
487
return false;
488
}
489
- $update_data->sections = maybe_unserialize( $update_data->sections );
490
491
set_transient( $this->product_key, $update_data, 12 * HOUR_IN_SECONDS );
492
}
@@ -509,18 +567,17 @@ class Licenser extends Abstract_Module {
509
$api_params = array(
510
'edd_action' => 'get_version',
511
'version' => $this->product->get_version(),
512
- 'license' => $this->license_key,
513
- 'name' => $this->product->get_name(),
514
'slug' => $this->product->get_slug(),
515
- 'author' => $this->get_distributor_name(),
516
'url' => rawurlencode( home_url() ),
517
);
518
$response = wp_remote_get(
519
- $this->get_api_url(),
520
array(
521
'timeout' => 15,
522
'sslverify' => false,
523
- 'body' => $api_params,
524
)
525
);
526
if ( is_wp_error( $response ) || 200 != wp_remote_retrieve_response_code( $response ) ) {
109
$valid_string = apply_filters( $this->product->get_key() . '_lc_valid_string', 'Valid' );
110
$invalid_string = apply_filters( $this->product->get_key() . '_lc_invalid_string', 'Invalid' );
111
$license_message = apply_filters( $this->product->get_key() . '_lc_license_message', 'Enter your license from %s purchase history in order to get %s updates' );
112
+ ?>
113
+ <style type="text/css">
114
+ input.themeisle-sdk-text-input-valid {
115
+ border: 1px solid #7ad03a;
116
+ }
117
+
118
+ input.themeisle-sdk-license-input {
119
+ width: 300px;
120
+ padding: 5px;
121
+ }
122
+
123
+ .themeisle-sdk-license-deactivate-cta {
124
+ color: #fff;
125
+ background: #7ad03a;
126
+ display: inline-block;
127
+ text-decoration: none;
128
+ font-size: 13px;
129
+ line-height: 30px;
130
+ height: 26px;
131
+ margin-left: 5px;
132
+ padding: 0 10px 3px;
133
+ -webkit-border-radius: 3px;
134
+ border-radius: 3px;
135
+ }
136
+
137
+ .themeisle-sdk-license-activate-cta {
138
+ color: #fff;
139
+ background: #dd3d36;
140
+ display: inline-block;
141
+ text-decoration: none;
142
+ font-size: 13px;
143
+ line-height: 30px;
144
+ height: 26px;
145
+ margin-left: 5px;
146
+ padding: 0 10px 3px;
147
+ -webkit-border-radius: 3px;
148
+ border-radius: 3px;
149
+ }
150
+
151
+ button.button.themeisle-sdk-licenser-button-cta {
152
+ line-height: 26px;
153
+ height: 29px;
154
+ vertical-align: top;
155
+ }
156
157
+ </style>
158
+ <?php
159
+ echo sprintf(
160
+ '<p>%s<input class="themeisle-sdk-license-input %s" type="text" id="%s_license" name="%s_license" value="%s" /><a class="%s">%s</a>&nbsp;&nbsp;&nbsp;<button name="%s_btn_trigger" class="button button-primary themeisle-sdk-licenser-button-cta" value="yes" type="submit" >%s</button></p><p class="description">%s</p>',
161
+ ( ( 'valid' === $status ) ? sprintf( '<input type="hidden" value="%s" name="%s_license" />', $value, $this->product->get_key() ) : '' ),
162
+ ( ( 'valid' === $status ) ? 'themeisle-sdk-text-input-valid' : '' ),
163
+ $this->product->get_key(),
164
+ ( ( 'valid' === $status ) ? $this->product->get_key() . '_mask' : $this->product->get_key() ),
165
+ ( ( 'valid' === $status ) ? ( str_repeat( '*', 30 ) . substr( $value, - 5 ) ) : $value ),
166
+ ( 'valid' === $status ? 'themeisle-sdk-license-deactivate-cta' : 'themeisle-sdk-license-activate-cta' ),
167
+ ( 'valid' === $status ? $valid_string : $invalid_string ),
168
+ $this->product->get_key(),
169
+ ( 'valid' === $status ? $deactivate_string : $activate_string ),
170
+ sprintf( $license_message, '<a href="' . $this->get_api_url() . '">' . $this->get_distributor_name() . '</a> ', $this->product->get_type() )
171
+ );
172
173
}
174
482
function update_nag() {
483
$theme = wp_get_theme( $this->product->get_slug() );
484
$api_response = get_transient( $this->product_key );
485
+ if ( false === $api_response || ! isset( $api_response->new_version ) ) {
486
return;
487
}
488
$update_url = wp_nonce_url( 'update.php?action=upgrade-theme&amp;theme=' . urlencode( $this->product->get_slug() ), 'upgrade-theme_' . $this->product->get_slug() );
494
'<strong>%1$s %2$s</strong> is available. <a href="%3$s" class="thickbox" title="%4s">Check out what\'s new</a> or <a href="%5$s"%6$s>update now</a>.',
495
$theme->get( 'Name' ),
496
$api_response->new_version,
497
+ sprintf( '%s&TB_iframe=true&amp;width=1024&amp;height=800', $this->product->get_changelog() ),
498
$theme->get( 'Name' ),
499
$update_url,
500
$update_onclick
544
545
return false;
546
}
547
+ $update_data->sections = isset( $update_data->sections ) ? maybe_unserialize( $update_data->sections ) : null;
548
549
set_transient( $this->product_key, $update_data, 12 * HOUR_IN_SECONDS );
550
}
567
$api_params = array(
568
'edd_action' => 'get_version',
569
'version' => $this->product->get_version(),
570
+ 'license' => empty( $this->license_key ) ? 'free' : $this->license_key,
571
+ 'name' => rawurlencode( $this->product->get_name() ),
572
'slug' => $this->product->get_slug(),
573
+ 'author' => rawurlencode( $this->get_distributor_name() ),
574
'url' => rawurlencode( home_url() ),
575
);
576
$response = wp_remote_get(
577
+ add_query_arg( $api_params, $this->get_api_url() ),
578
array(
579
'timeout' => 15,
580
'sslverify' => false,
581
)
582
);
583
if ( is_wp_error( $response ) || 200 != wp_remote_retrieve_response_code( $response ) ) {
vendor/codeinwp/themeisle-sdk/src/Modules/Uninstall_feedback.php CHANGED
@@ -54,7 +54,9 @@ class Uninstall_Feedback extends Abstract_Module {
54
'placeholder' => 'What\'s the plugin\'s name?',
55
),
56
'I could not get the plugin to work' => array(
57
- 'id' => 4,
58
),
59
'I no longer need the plugin' => array(
60
'id' => 5,
@@ -62,7 +64,9 @@ class Uninstall_Feedback extends Abstract_Module {
62
'placeholder' => 'If you could improve one thing about our product, what would it be?',
63
),
64
'It\'s a temporary deactivation. I\'m just debugging an issue.' => array(
65
- 'id' => 6,
66
),
67
);
68
/**
@@ -75,7 +79,9 @@ class Uninstall_Feedback extends Abstract_Module {
75
'id' => 7,
76
),
77
'It lacks options' => array(
78
- 'id' => 8,
79
),
80
'Is not working with a plugin that I need' => array(
81
'id' => 9,
@@ -95,7 +101,7 @@ class Uninstall_Feedback extends Abstract_Module {
95
'Other' => array(
96
'id' => 999,
97
'type' => 'textarea',
98
- 'placeholder' => 'cmon cmon tell us',
99
),
100
);
101
/**
@@ -103,13 +109,13 @@ class Uninstall_Feedback extends Abstract_Module {
103
*
104
* @var string $heading_plugin The heading of the modal
105
*/
106
- private $heading_plugin = 'Quick Feedback <span>Because we care about our clients, please leave us feedback.</span>';
107
/**
108
* Default heading for theme.
109
*
110
* @var string $heading_theme The heading of the modal
111
*/
112
- private $heading_theme = 'Looking to change {theme}? <span> What does not work for you?</span>';
113
/**
114
* Default submit button action text.
115
*
@@ -133,342 +139,338 @@ class Uninstall_Feedback extends Abstract_Module {
133
return;
134
}
135
136
- add_thickbox();
137
138
- $id = $this->product->get_key() . '_deactivate';
139
140
- $this->add_css( $this->product->get_type(), $this->product->get_key() );
141
- $this->add_js( $this->product->get_type(), $this->product->get_key(), '#TB_inline?' . apply_filters( $this->product->get_key() . '_feedback_deactivate_attributes', 'width=600&height=550' ) . '&inlineId=' . $id );
142
143
- echo '<div id="' . $id . '" style="display:none;" class="themeisle-deactivate-box">' . $this->get_html( $this->product->get_type(), $this->product->get_key() ) . '</div>';
144
}
145
146
/**
147
- * Loads the css
148
- *
149
- * @param string $type The type of product.
150
- * @param string $key The product key.
151
*/
152
- function add_css( $type, $key ) {
153
- $key = esc_attr( $key );
154
- $suffix = Product::THEME_TYPE === $type ? 'theme-install-php' : 'plugins-php';
155
- $icon = esc_attr( apply_filters( $this->product->get_slug() . '_uninstall_feedback_icon', '' ) );
156
- if ( empty( $icon ) ) {
157
- $icon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAYfklEQVR4Xu1dCZRdRZn+677Xrzudzh7JQjrpAJ2dLUAEZxwciIB7JMFRURCXGVRUBscFCTiIuB9cWY4oyDYeEQJEYc6gWQZQHKIgZCdLN0mnO2TppJNO9+u33Jrv++vet6U7Q8h7/Z5nXiWVW7durd9X//9X1a37IlJ1VQSqCFQRqCJQRaCKQBWBKgJVBKoIVBGoIlB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H/DTZnjdG5LDp1zV/mykMT3ajEN6/Faj7EManDPEygc/yQRSd+Ce5dZkPxY65raWoICKIwRkrJG4bXKfqAFIfmXLv1MBMsjRcx9uYnr7zD0r+dKoB+d0d/rDJsNAy9WWpx5HInYY8u5CRnfuQb9FNPxZtBrDb6sq1hV1c7EovYybbwK8Hv0psfCDToKKua1JAlD+QEBK1uGt4vLc+rCLfyeeJfR5eJwN+Uio4ckwfjsSl06Jm7uK0s4SFVJxhETOaPmj6TPvAIjrTLt1AHN006YQbHpfnjEfa8k7RWg+um0dSNuq6g3Emf0Z8vAZG14MQPJM3Lw1clpLW4mwLEqxFUcIe+Vd2LrS9EbOMB1mJrZfr4OaajMttgcjv1OlJDXACcIk5IqExeWAfkuYkl04sf4FfFt4uunxzvLmtz5fFNRKWEjFzbIG6qu996Q6OS4Vs1327XLA7vQ+sW1lYVr/55OvllGmB/8t0hK73x9phsdazYLNZd0KKWxj9b6KQBWBKgJVBKoIVBGoIlBFoIpAFYEqAlUEqghUEagiUEWgikAVgSoCVQT+PyDwvzu4/j1uyQmRAAAAAElFTkSuQmCC';
158
- }
159
?>
160
- <style type="text/css" id="<?php echo $key; ?>ti-deactivate-css">
161
- input[name="ti-deactivate-option"] ~ div {
162
- display: none;
163
}
164
165
- input[name="ti-deactivate-option"]:checked ~ div {
166
- display: block;
167
- }
168
169
- body.<?php echo $suffix; ?> .<?php echo $key; ?>-container #TB_window.thickbox-loading:before {
170
- background: none !important;
171
}
172
173
- body.<?php echo $suffix; ?> .<?php echo $key; ?>-container #TB_title {
174
- background: url('<?php echo $icon; ?>') 23px 0px no-repeat;
175
- border: none;
176
- box-sizing: border-box;
177
- color: #373e40;
178
- font-size: 24px;
179
- font-weight: 700;
180
- height: 90px;
181
- padding: 40px 40px 0 120px;
182
- text-transform: uppercase;
183
- width: 100%;
184
}
185
186
- body.<?php echo $suffix; ?> .<?php echo $key; ?>-container #<?php echo $key; ?>-info-disclosure-content ul i {
187
- padding-left: 5px;
188
- margin: 0 1px;
189
}
190
191
- body.<?php echo $suffix; ?> .<?php echo $key; ?>-container #<?php echo $key; ?>-info-disclosure-content ul strong {
192
- width: 125px;
193
- display: block;
194
margin: 0;
195
- float: left;
196
}
197
198
- body.<?php echo $suffix; ?> .<?php echo $key; ?>-container #<?php echo $key; ?>-info-disclosure-content ul {
199
- margin-left: 39px;
200
- margin-top: 2px;
201
- padding-top: 0px;
202
}
203
204
- body.<?php echo $suffix; ?> .<?php echo $key; ?>-container #<?php echo $key; ?>-info-disclosure-content p {
205
- font-style: italic;
206
- margin-bottom: 0px;
207
}
208
209
- body.<?php echo $suffix; ?> .<?php echo $key; ?>-container #<?php echo $key; ?>-info-disclosure-content {
210
display: none;
211
- }
212
- body.<?php echo $suffix; ?> .<?php echo $key; ?>-container.<?php echo $key; ?>-container-disc-open #<?php echo $key; ?>-info-disclosure-content {
213
- display: block;
214
- position:absolute;
215
- bottom: 100px;
216
}
217
218
- body.<?php echo $suffix; ?> .<?php echo $key; ?>-container.<?php echo $key; ?>-container-disc-open #<?php echo $key; ?>-info-disclosure {
219
- top: -130px;
220
}
221
222
- body.<?php echo $suffix; ?> .<?php echo $key; ?>-container.<?php echo $key; ?>-container-disc-open {
223
- height: 590px !important;
224
- }
225
- body.<?php echo $suffix; ?> .<?php echo $key; ?>-container #<?php echo $key; ?>-info-disclosure {
226
- position: absolute;
227
- top: -50px;
228
- font-size: 13px;
229
- color: #8d9192;
230
- font-weight: 400;
231
- right: 40px;
232
}
233
234
- body.<?php echo $suffix; ?> .<?php echo $key; ?>-container div.actions {
235
- box-sizing: border-box;
236
- padding: 30px 40px;
237
- background-color: #eaeaea;
238
}
239
240
- body.<?php echo $suffix; ?> .<?php echo $key; ?>-container input.button {
241
- background: #ec5d60;
242
- border: none;
243
- box-shadow: none;
244
- color: #ffffff;
245
- font-size: 15px;
246
- font-weight: 700;
247
- height: auto;
248
- line-height: 20px;
249
- padding: 10px 15px;
250
- text-transform: uppercase;
251
- -webkit-transition: 0.3s ease;
252
- -moz-transition: 0.3s ease;
253
- -ms-transition: 0.3s ease;
254
- -o-transition: 0.3s ease;
255
- transition: 0.3s ease;
256
}
257
258
- body.<?php echo $suffix; ?> .<?php echo $key; ?>-container input.button.button-primary {
259
- background: transparent;
260
- box-shadow: none;
261
- color: #8d9192;
262
- font-weight: 400;
263
- float: right;
264
- line-height: 40px;
265
- padding: 0;
266
- text-decoration: underline;
267
- text-shadow: none;
268
- text-transform: none;
269
}
270
271
- body.<?php echo $suffix; ?> .<?php echo $key; ?>-container input.button:hover {
272
- background: #e83f42;
273
}
274
275
- body.<?php echo $suffix; ?> .<?php echo $key; ?>-container input.button.button-primary:hover {
276
- background: transparent;
277
}
278
279
- body.<?php echo $suffix; ?> .<?php echo $key; ?>-container input.button:focus {
280
- box-shadow: none;
281
- outline: none;
282
}
283
284
- body.<?php echo $suffix; ?> .<?php echo $key; ?>-container input.button:active {
285
- box-shadow: none;
286
- transform: translateY(0);
287
}
288
289
- body.<?php echo $suffix; ?> .<?php echo $key; ?>-container input.button:disabled {
290
- cursor: not-allowed;
291
}
292
293
- body.<?php echo $suffix; ?> .<?php echo $key; ?>-container input.button.button-primary:hover {
294
- text-decoration: none;
295
}
296
297
- body.<?php echo $suffix; ?> .<?php echo $key; ?>-container div.revive_network-container {
298
- background-color: #ffffff;
299
}
300
301
- body.<?php echo $suffix; ?> .<?php echo $key; ?>-container ul.ti-list {
302
- margin: 0;
303
}
304
305
- body.<?php echo $suffix; ?> .<?php echo $key; ?>-container ul.ti-list li {
306
- color: #373e40;
307
- font-size: 13px;
308
- margin-bottom: 5px;
309
}
310
311
- body.<?php echo $suffix; ?> .<?php echo $key; ?>-container ul.ti-list li label {
312
- margin-left: 10px;
313
- line-height: 28px;
314
- font-size: 15px;
315
}
316
317
- body.<?php echo $suffix; ?> .<?php echo $key; ?>-container ul.ti-list input[type=radio] {
318
- margin-top: 1px;
319
}
320
321
- body.<?php echo $suffix; ?> .<?php echo $key; ?>-container #TB_ajaxContent {
322
- box-sizing: border-box;
323
- height: auto !important;
324
- padding: 20px 40px;
325
- width: 100% !important;
326
}
327
328
- body.<?php echo $suffix; ?> .<?php echo $key; ?>-container li div textarea {
329
- padding: 10px 15px;
330
- width: 100%;
331
}
332
333
- body.<?php echo $suffix; ?> .<?php echo $key; ?>-container ul.ti-list li div {
334
- margin: 10px 30px;
335
}
336
337
- .<?php echo $key; ?>-container #TB_title #TB_ajaxWindowTitle {
338
- box-sizing: border-box;
339
- display: block;
340
- float: none;
341
- font-weight: 700;
342
- line-height: 1;
343
- padding: 0;
344
- text-align: left;
345
- width: 100%;
346
}
347
348
- .<?php echo $key; ?>-container #TB_title #TB_ajaxWindowTitle span {
349
- color: #8d9192;
350
- display: block;
351
- font-size: 15px;
352
- font-weight: 400;
353
- margin-top: 5px;
354
- text-transform: none;
355
- }
356
357
- body.<?php echo $suffix; ?> .<?php echo $key; ?>-container .actions {
358
- width: 100%;
359
display: block;
360
position: absolute;
361
- left: 0;
362
- bottom: 0;
363
}
364
365
- .theme-install-php .<?php echo $key; ?>-container #TB_closeWindowButton .tb-close-icon:before {
366
- font-size: 32px;
367
}
368
369
- .<?php echo $key; ?>-container #TB_closeWindowButton .tb-close-icon {
370
- color: #eee;
371
}
372
373
- .<?php echo $key; ?>-container #TB_closeWindowButton {
374
- left: auto;
375
- right: -5px;
376
- top: -35px;
377
- color: #eee;
378
}
379
380
- .<?php echo $key; ?>-container #TB_closeWindowButton .tb-close-icon {
381
- text-align: right;
382
- line-height: 25px;
383
- width: 25px;
384
- height: 25px;
385
- }
386
387
- .<?php echo $key; ?>-container #TB_closeWindowButton:focus .tb-close-icon {
388
- box-shadow: none;
389
- outline: none;
390
}
391
392
- .<?php echo $key; ?>-container #TB_closeWindowButton .tb-close-icon:before {
393
- font: normal 25px dashicons;
394
}
395
396
- body.<?php echo $suffix; ?> .<?php echo $key; ?>-container {
397
- margin: auto !important;
398
- height: 500px !important;
399
- top: 0 !important;
400
- left: 0 !important;
401
- bottom: 0 !important;
402
- right: 0 !important;
403
- width: 600px !important;
404
}
405
</style>
406
<?php
407
- do_action( $this->product->get_key() . '_uninstall_feedback_after_css' );
408
}
409
410
/**
411
- * Loads the js.
412
- *
413
- * @param string $type The type of product.
414
- * @param string $key The product key.
415
- * @param string $src The url that will hijack the deactivate button url.
416
*/
417
- function add_js( $type, $key, $src ) {
418
- $heading = Product::PLUGIN_TYPE === $type ? $this->heading_plugin : str_replace( '{theme}', $this->product->get_name(), $this->heading_theme );
419
- $key = esc_attr( $key );
420
- $heading = apply_filters( $this->product->get_key() . '_feedback_deactivate_heading', $heading );
421
?>
422
<script type="text/javascript" id="ti-deactivate-js">
423
(function ($) {
424
$(document).ready(function () {
425
- var auto_trigger = false;
426
- var target_element = 'tr[data-plugin^="<?php echo $this->product->get_slug(); ?>/"] span.deactivate a';
427
- <?php
428
- if ( 'theme' === $type ) {
429
- ?>
430
- auto_trigger = true;
431
- if ($('a.ti-auto-anchor').length == 0) {
432
- $('body').append($('<a class="ti-auto-anchor" href=""></a>'));
433
- }
434
- target_element = 'a.ti-auto-anchor';
435
- <?php
436
- }
437
- ?>
438
439
- if (auto_trigger) {
440
- setTimeout(function () {
441
- $('a.ti-auto-anchor').trigger('click');
442
- }, <?php echo self::AUTO_TRIGGER_DEACTIVATE_WINDOW_SECONDS * 1000; ?> );
443
- }
444
- $(document).on('thickbox:removed', function () {
445
- $.post(ajaxurl, {
446
- 'action': '<?php echo $key . '_uninstall_feedback'; ?>',
447
- 'nonce': '<?php echo wp_create_nonce( (string) __CLASS__ ); ?>',
448
- 'type': '<?php echo $type; ?>',
449
- 'key': '<?php echo $key; ?>'
450
- });
451
- });
452
- var href = $(target_element).attr('href');
453
- $('#<?php echo $key; ?>ti-deactivate-no').attr('data-ti-action', href).on('click', function (e) {
454
e.preventDefault();
455
- e.stopPropagation();
456
-
457
- $('body').unbind('thickbox:removed');
458
- tb_remove();
459
- var redirect = $(this).attr('data-ti-action');
460
- if (redirect !== '') {
461
- location.href = redirect;
462
- }
463
});
464
465
- $('#<?php echo $key; ?> ul.ti-list label, #<?php echo $key; ?> ul.ti-list input[name="ti-deactivate-option"]').on('click', function (e) {
466
- $('#<?php echo $key; ?>ti-deactivate-yes').val($('#<?php echo $key; ?>ti-deactivate-yes').attr('data-after-text'));
467
468
- var radio = $(this).prop('tagName') === 'LABEL' ? $(this).parent() : $(this);
469
- if (radio.parent().find('textarea').length > 0 && radio.parent().find('textarea').val().length === 0) {
470
$('#<?php echo $key; ?>ti-deactivate-yes').attr('disabled', 'disabled');
471
- radio.parent().find('textarea').on('keyup', function (ee) {
472
if ($(this).val().length === 0) {
473
$('#<?php echo $key; ?>ti-deactivate-yes').attr('disabled', 'disabled');
474
} else {
@@ -479,127 +481,236 @@ class Uninstall_Feedback extends Abstract_Module {
479
$('#<?php echo $key; ?>ti-deactivate-yes').removeAttr('disabled');
480
}
481
});
482
- $("#<?php echo $key; ?>-info-disclosure").on('click', function () {
483
- $("#TB_window").toggleClass("<?php echo $key; ?>-container-disc-open");
484
- return false;
485
- });
486
- $('#<?php echo $key; ?>ti-deactivate-yes').attr('data-ti-action', href).on('click', function (e) {
487
e.preventDefault();
488
e.stopPropagation();
489
$.post(ajaxurl, {
490
- 'action': '<?php echo $key . '_uninstall_feedback'; ?>',
491
'nonce': '<?php echo wp_create_nonce( (string) __CLASS__ ); ?>',
492
- 'id': $('#<?php echo $key; ?> input[name="ti-deactivate-option"]:checked').parent().attr('ti-option-id'),
493
- 'msg': $('#<?php echo $key; ?> input[name="ti-deactivate-option"]:checked').parent().find('textarea').val(),
494
- 'type': '<?php echo $type; ?>',
495
});
496
- var redirect = $(this).attr('data-ti-action');
497
- if (redirect != '') {
498
- location.href = redirect;
499
} else {
500
- $('body').unbind('thickbox:removed');
501
- tb_remove();
502
}
503
});
504
505
- $(target_element).attr('name', '<?php echo wp_kses( $heading, array( 'span' => array() ) ); ?>').attr('href', '<?php echo $src; ?>').addClass('thickbox');
506
- var thicbox_timer;
507
- $(target_element).on('click', function () {
508
- tiBindThickbox();
509
});
510
511
- function tiBindThickbox() {
512
- var thicbox_timer = setTimeout(function () {
513
- if ($("#<?php echo esc_html( $key ); ?>").is(":visible")) {
514
- $("body").trigger('thickbox:iframe:loaded');
515
- $("#TB_window").addClass("<?php echo $key; ?>-container");
516
- clearTimeout(thicbox_timer);
517
- $('body').unbind('thickbox:removed');
518
- } else {
519
- tiBindThickbox();
520
}
521
- }, 100);
522
- }
523
});
524
})(jQuery);
525
</script>
526
<?php
527
-
528
do_action( $this->product->get_key() . '_uninstall_feedback_after_js' );
529
}
530
531
/**
532
- * Generates the HTML.
533
*
534
- * @param string $type The type of product.
535
- * @param string $key The product key.
536
*/
537
- function get_html( $type, $key ) {
538
- $options = Product::PLUGIN_TYPE === $type ? $this->options_plugin : $this->options_theme;
539
- $button_cancel = Product::PLUGIN_TYPE === $type ? $this->button_cancel : 'Skip';
540
- $button_submit = Product::PLUGIN_TYPE === $type ? $this->button_submit : 'Submit';
541
- $options = $this->randomize_options( apply_filters( $this->product->get_key() . '_feedback_deactivate_options', $options ) );
542
- $button_submit = apply_filters( $this->product->get_key() . '_feedback_deactivate_button_submit', $button_submit );
543
- $button_cancel = apply_filters( $this->product->get_key() . '_feedback_deactivate_button_cancel', $button_cancel );
544
-
545
- $options += $this->other;
546
-
547
- $list = '';
548
- foreach ( $options as $title => $attributes ) {
549
- $id = $attributes['id'];
550
- $list .= '<li ti-option-id="' . $id . '"><input type="radio" name="ti-deactivate-option" id="' . $key . $id . '"><label for="' . $key . $id . '">' . str_replace( '{theme}', $this->product->get_name(), $title ) . '</label>';
551
- if ( array_key_exists( 'type', $attributes ) ) {
552
- $list .= '<div>';
553
- $placeholder = array_key_exists( 'placeholder', $attributes ) ? $attributes['placeholder'] : '';
554
- switch ( $attributes['type'] ) {
555
- case 'text':
556
- $list .= '<textarea style="width: 100%" rows="1" name="comments" placeholder="' . $placeholder . '"></textarea>';
557
- break;
558
- case 'textarea':
559
- $list .= '<textarea style="width: 100%" rows="2" name="comments" placeholder="' . $placeholder . '"></textarea>';
560
- break;
561
- }
562
- $list .= '</div>';
563
- }
564
- $list .= '</li>';
565
- }
566
-
567
$disclosure_new_labels = apply_filters( $this->product->get_slug() . '_themeisle_sdk_disclosure_content_labels', [], $this->product );
568
$disclosure_labels = array_merge(
569
[
570
'title' => 'Below is a detailed view of all data that ThemeIsle will receive if you fill in this survey. No domain name, email address or IP addresses are transmited after you submit the survey.',
571
'items' => [
572
sprintf( '%s %s version %s %s %s %s', '<strong>', ucwords( $this->product->get_type() ), '</strong>', '<code>', $this->product->get_version(), '</code>' ),
573
- sprintf( '%s Uninstall reason %s %s Selected reson from the above survey %s ', '<strong>', '</strong>', '<i>', '</i>' ),
574
],
575
],
576
$disclosure_new_labels
577
);
578
579
- $info_disclosure_link = '<a href="#" id="' . $this->product->get_key() . '-info-disclosure">' . apply_filters( $this->product->get_slug() . '_themeisle_sdk_info_collect_cta', 'What info do we collect?' ) . '</a>';
580
- $info_disclosure_content = '<div id="' . $this->product->get_key() . '-info-disclosure-content"><p>' . wp_kses_post( $disclosure_labels['title'] ) . '</p><ul>';
581
foreach ( $disclosure_labels['items'] as $disclosure_item ) {
582
$info_disclosure_content .= sprintf( '<li>%s</li>', wp_kses_post( $disclosure_item ) );
583
}
584
$info_disclosure_content .= '</ul></div>';
585
586
- return
587
- '<div id="' . $this->product->get_key() . '"><ul class="ti-list">' . $list . '</ul>'
588
- . $info_disclosure_content
589
- . '<div class="actions">'
590
- . get_submit_button(
591
- $button_submit,
592
- 'secondary',
593
- $this->product->get_key() . 'ti-deactivate-yes',
594
- false,
595
- array(
596
- 'data-after-text' => $button_submit,
597
- 'disabled' => true,
598
- )
599
- )
600
- . wp_kses_post( $info_disclosure_link )
601
- . get_submit_button( $button_cancel, 'primary', $this->product->get_key() . 'ti-deactivate-no', false )
602
- . '</div></div>';
603
}
604
605
/**
54
'placeholder' => 'What\'s the plugin\'s name?',
55
),
56
'I could not get the plugin to work' => array(
57
+ 'type' => 'textarea',
58
+ 'placeholder' => 'What problem are you experiencing?',
59
+ 'id' => 4,
60
),
61
'I no longer need the plugin' => array(
62
'id' => 5,
64
'placeholder' => 'If you could improve one thing about our product, what would it be?',
65
),
66
'It\'s a temporary deactivation. I\'m just debugging an issue.' => array(
67
+ 'type' => 'textarea',
68
+ 'placeholder' => 'What problem are you experiencing?',
69
+ 'id' => 6,
70
),
71
);
72
/**
79
'id' => 7,
80
),
81
'It lacks options' => array(
82
+ 'placeholder' => 'What option is missing?',
83
+ 'type' => 'text',
84
+ 'id' => 8,
85
),
86
'Is not working with a plugin that I need' => array(
87
'id' => 9,
101
'Other' => array(
102
'id' => 999,
103
'type' => 'textarea',
104
+ 'placeholder' => 'What can we do better?',
105
),
106
);
107
/**
109
*
110
* @var string $heading_plugin The heading of the modal
111
*/
112
+ private $heading_plugin = 'What’s wrong?';
113
/**
114
* Default heading for theme.
115
*
116
* @var string $heading_theme The heading of the modal
117
*/
118
+ private $heading_theme = 'What does not work for you in {theme}?';
119
/**
120
* Default submit button action text.
121
*
139
return;
140
}
141
142
+ $this->add_feedback_popup_style();
143
144
+ if ( $this->product->get_type() === 'theme' ) {
145
+ $this->add_theme_feedback_drawer_js();
146
+ $this->render_theme_feedback_popup();
147
148
+ return;
149
+ }
150
+ $this->add_plugin_feedback_popup_js();
151
+ $this->render_plugin_feedback_popup();
152
+ }
153
+
154
+ /**
155
+ * Render theme feedback drawer.
156
+ */
157
+ private function render_theme_feedback_popup() {
158
+ $heading = str_replace( '{theme}', $this->product->get_name(), $this->heading_theme );
159
+ $button_submit = apply_filters( $this->product->get_key() . '_feedback_deactivate_button_submit', 'Submit' );
160
+ $options = $this->options_theme;
161
+ $options = $this->randomize_options( apply_filters( $this->product->get_key() . '_feedback_deactivate_options', $options ) );
162
+ $info_disclosure_link = '<a href="#" class="info-disclosure-link">' . apply_filters( $this->product->get_slug() . '_themeisle_sdk_info_collect_cta', 'What info do we collect?' ) . '</a>';
163
+
164
+ $options += $this->other;
165
166
+ ?>
167
+ <div class="ti-theme-uninstall-feedback-drawer ti-feedback">
168
+ <div class="popup--header">
169
+ <h5><?php echo wp_kses( $heading, array( 'span' => true ) ); ?> </h5>
170
+ <button class="toggle"><span>&times;</span></button>
171
+ </div><!--/.popup--header-->
172
+ <div class="popup--body">
173
+ <?php $this->render_options_list( $options ); ?>
174
+ </div><!--/.popup--body-->
175
+ <div class="popup--footer">
176
+ <div class="actions">
177
+ <?php
178
+ echo wp_kses_post( $info_disclosure_link );
179
+ echo wp_kses_post( $this->get_disclosure_labels() );
180
+ echo '<div class="buttons">';
181
+ echo get_submit_button(
182
+ $button_submit,
183
+ 'secondary',
184
+ $this->product->get_key() . 'ti-deactivate-yes',
185
+ false,
186
+ array(
187
+ 'data-after-text' => $button_submit,
188
+ 'disabled' => true,
189
+ )
190
+ );
191
+ echo '</div>';
192
+ ?>
193
+ </div><!--/.actions-->
194
+ </div><!--/.popup--footer-->
195
+ </div>
196
+ <?php
197
}
198
199
/**
200
+ * Add feedback styles.
201
*/
202
+ private function add_feedback_popup_style() {
203
?>
204
+ <style>
205
+ .ti-feedback {
206
+ background: #fff;
207
+ max-width: 400px;
208
+ z-index: 10000;
209
+ box-shadow: 0 0 15px -5px rgba(0, 0, 0, .5);
210
+ transition: all .3s ease-out;
211
}
212
213
214
+ .ti-feedback .popup--header {
215
+ position: relative;
216
+ background-color: #23A1CE;
217
}
218
219
+ .ti-feedback .popup--header h5 {
220
+ margin: 0;
221
+ font-size: 16px;
222
+ padding: 15px;
223
+ color: #fff;
224
+ font-weight: 600;
225
+ text-align: center;
226
+ letter-spacing: .3px;
227
}
228
229
+ .ti-feedback .popup--body {
230
+ padding: 15px;
231
}
232
233
+ .ti-feedback .popup--form {
234
margin: 0;
235
+ font-size: 13px;
236
}
237
238
+ .ti-feedback .popup--form input[type="radio"] {
239
+ margin: 0 10px 0 0;
240
}
241
242
+ .ti-feedback .popup--form input[type="radio"]:checked ~ textarea {
243
+ display: block;
244
}
245
246
+ .ti-feedback .popup--form textarea {
247
+ width: 100%;
248
+ margin: 10px 0 0;
249
display: none;
250
+ max-height: 150px;
251
}
252
253
+ .ti-feedback li {
254
+ display: flex;
255
+ align-items: center;
256
+ margin-bottom: 15px;
257
+ flex-wrap: wrap;
258
}
259
260
+ .ti-feedback li label {
261
+ max-width: 90%;
262
}
263
264
+ .ti-feedback li:last-child {
265
+ margin-bottom: 0;
266
}
267
268
+ .ti-feedback .popup--footer {
269
+ padding: 0 15px 15px;
270
}
271
272
+ .ti-feedback .actions {
273
+ display: flex;
274
+ flex-wrap: wrap;
275
}
276
277
+ .info-disclosure-link {
278
+ width: 100%;
279
+ margin-bottom: 15px;
280
}
281
282
+ .ti-feedback .info-disclosure-content {
283
+ max-height: 0;
284
+ overflow: hidden;
285
+ width: 100%;
286
+ transition: .3s ease;
287
}
288
289
+ .ti-feedback .info-disclosure-content.active {
290
+ max-height: 300px;
291
}
292
293
+ .ti-feedback .info-disclosure-content p {
294
+ margin: 0;
295
}
296
297
+ .ti-feedback .info-disclosure-content ul {
298
+ margin: 10px 0;
299
+ border-radius: 3px;
300
}
301
302
+ .ti-feedback .info-disclosure-content ul li {
303
+ display: flex;
304
+ align-items: center;
305
+ justify-content: space-between;
306
+ margin-bottom: 0;
307
+ padding: 5px 0;
308
+ border-bottom: 1px solid #ccc;
309
}
310
311
+ .ti-feedback .buttons {
312
+ display: flex;
313
+ width: 100%;
314
}
315
316
+ .ti-feedback .buttons input:last-child {
317
+ margin-left: auto;
318
}
319
320
+ .ti-theme-uninstall-feedback-drawer {
321
+ border-top-left-radius: 5px;
322
+ position: fixed;
323
+ top: 100%;
324
+ right: 15px;
325
}
326
327
+ .ti-theme-uninstall-feedback-drawer.active {
328
+ transform: translateY(-100%);
329
}
330
331
+ .ti-theme-uninstall-feedback-drawer .popup--header {
332
+ border-top-left-radius: 5px;
333
}
334
335
+ .ti-theme-uninstall-feedback-drawer .popup--header .toggle {
336
+ position: absolute;
337
+ padding: 3px 0;
338
+ width: 30px;
339
+ top: -26px;
340
+ right: 0;
341
+ cursor: pointer;
342
+ border-top-left-radius: 5px;
343
+ border-top-right-radius: 5px;
344
+ font-size: 20px;
345
+ background-color: #23A1CE;
346
+ color: #fff;
347
+ border: none;
348
+ line-height: 20px;
349
}
350
351
+ .ti-theme-uninstall-feedback-drawer .toggle span {
352
+ margin: 0;
353
+ display: inline-block;
354
}
355
356
+ .ti-theme-uninstall-feedback-drawer:not(.active) .toggle span {
357
+ transform: rotate(45deg);
358
}
359
360
+ .ti-theme-uninstall-feedback-drawer .popup--header .toggle:hover {
361
+ background-color: #1880a5;
362
}
363
364
365
+ .ti-plugin-uninstall-feedback-popup .popup--header:before {
366
+ content: "";
367
display: block;
368
position: absolute;
369
+ border: 20px solid #23A1CE;
370
+ left: -10px;
371
+ top: 50%;
372
+ border-top: 20px solid transparent;
373
+ border-bottom: 20px solid transparent;
374
+ border-left: 0;
375
+ transform: translateY(-50%);
376
}
377
378
+ .ti-plugin-uninstall-feedback-popup {
379
+ display: none;
380
+ position: absolute;
381
+ white-space: normal;
382
+ width: 400px;
383
+ left: 100%;
384
+ top: -15px;
385
}
386
387
+ .ti-plugin-uninstall-feedback-popup.sending-feedback .popup--body i {
388
+ animation: rotation 2s infinite linear;
389
+ display: block;
390
+ float: none;
391
+ align-items: center;
392
+ width: 100%;
393
+ margin: 0 auto;
394
+ height: 100%;
395
+ background: transparent;
396
+ padding: 0;
397
}
398
399
+ .ti-plugin-uninstall-feedback-popup.sending-feedback .popup--body i:before {
400
+ padding: 0;
401
+ background: transparent;
402
+ box-shadow: none;
403
+ color: #b4b9be
404
}
405
406
407
+ .ti-plugin-uninstall-feedback-popup.active {
408
+ display: block;
409
}
410
411
+ tr[data-plugin^="<?php echo $this->product->get_slug(); ?>"] .deactivate {
412
+ position: relative;
413
}
414
415
+ body.ti-feedback-open .ti-feedback-overlay {
416
+ content: "";
417
+ display: block;
418
+ background-color: rgba(0, 0, 0, 0.5);
419
+ top: 0;
420
+ bottom: 0;
421
+ right: 0;
422
+ left: 0;
423
+ z-index: 10000;
424
+ position: fixed;
425
+ }
426
+
427
+ @media (max-width: 768px) {
428
+ .ti-plugin-uninstall-feedback-popup {
429
+ position: fixed;
430
+ max-width: 100%;
431
+ margin: 0 auto;
432
+ left: 50%;
433
+ top: 50px;
434
+ transform: translateX(-50%);
435
+ }
436
+
437
+ .ti-plugin-uninstall-feedback-popup .popup--header:before {
438
+ display: none;
439
+ }
440
}
441
</style>
442
<?php
443
}
444
445
/**
446
+ * Theme feedback drawer JS.
447
*/
448
+ private function add_theme_feedback_drawer_js() {
449
+ $key = $this->product->get_key();
450
?>
451
<script type="text/javascript" id="ti-deactivate-js">
452
(function ($) {
453
$(document).ready(function () {
454
+ setTimeout(function () {
455
+ $('.ti-theme-uninstall-feedback-drawer').addClass('active');
456
+ }, <?php echo absint( self::AUTO_TRIGGER_DEACTIVATE_WINDOW_SECONDS * 1000 ); ?> );
457
458
+ $('.ti-theme-uninstall-feedback-drawer .toggle').on('click', function (e) {
459
e.preventDefault();
460
+ $('.ti-theme-uninstall-feedback-drawer').toggleClass('active');
461
});
462
463
+ $('.info-disclosure-link').on('click', function (e) {
464
+ e.preventDefault();
465
+ $('.info-disclosure-content').toggleClass('active');
466
+ });
467
468
+ $('.ti-theme-uninstall-feedback-drawer input[type="radio"]').on('change', function () {
469
+ var radio = $(this);
470
+ if (radio.parent().find('textarea').length > 0 &&
471
+ radio.parent().find('textarea').val().length === 0) {
472
$('#<?php echo $key; ?>ti-deactivate-yes').attr('disabled', 'disabled');
473
+ radio.parent().find('textarea').on('keyup', function (e) {
474
if ($(this).val().length === 0) {
475
$('#<?php echo $key; ?>ti-deactivate-yes').attr('disabled', 'disabled');
476
} else {
481
$('#<?php echo $key; ?>ti-deactivate-yes').removeAttr('disabled');
482
}
483
});
484
+
485
+ $('#<?php echo $key; ?>ti-deactivate-yes').on('click', function (e) {
486
e.preventDefault();
487
e.stopPropagation();
488
+
489
+ var selectedOption = $(
490
+ '.ti-theme-uninstall-feedback-drawer input[name="ti-deactivate-option"]:checked');
491
$.post(ajaxurl, {
492
+ 'action': '<?php echo esc_attr( $key ) . '_uninstall_feedback'; ?>',
493
'nonce': '<?php echo wp_create_nonce( (string) __CLASS__ ); ?>',
494
+ 'id': selectedOption.parent().attr('ti-option-id'),
495
+ 'msg': selectedOption.parent().find('textarea').val(),
496
+ 'type': 'theme',
497
+ 'key': '<?php echo esc_attr( $key ); ?>'
498
});
499
+ $('.ti-theme-uninstall-feedback-drawer').fadeOut();
500
+ });
501
+ });
502
+ })(jQuery);
503
+
504
+ </script>
505
+ <?php
506
+ do_action( $this->product->get_key() . '_uninstall_feedback_after_js' );
507
+ }
508
+
509
+ /**
510
+ * Render the options list.
511
+ *
512
+ * @param array $options the options for the feedback form.
513
+ */
514
+ private function render_options_list( $options ) {
515
+ $key = $this->product->get_key();
516
+ $inputs_row_map = [
517
+ 'text' => 1,
518
+ 'textarea' => 2,
519
+ ];
520
+ ?>
521
+ <ul class="popup--form">
522
+ <?php foreach ( $options as $title => $attributes ) { ?>
523
+ <li ti-option-id="<?php echo esc_attr( $attributes['id'] ); ?>">
524
+ <input type="radio" name="ti-deactivate-option" id="<?php echo esc_attr( $key . $attributes['id'] ); ?>">
525
+ <label for="<?php echo esc_attr( $key . $attributes['id'] ); ?>">
526
+ <?php echo str_replace( '{theme}', $this->product->get_name(), $title ); ?>
527
+ </label>
528
+ <?php
529
+ if ( array_key_exists( 'type', $attributes ) ) {
530
+ $placeholder = array_key_exists( 'placeholder', $attributes ) ? $attributes['placeholder'] : '';
531
+ echo '<textarea width="100%" rows="' . $inputs_row_map[ $attributes['type'] ] . '" name="comments" placeholder="' . esc_attr( $placeholder ) . '"></textarea>';
532
+ }
533
+ ?>
534
+ </li>
535
+ <?php } ?>
536
+ </ul>
537
+ <?php
538
+ }
539
+
540
+ /**
541
+ * Render plugin feedback popup.
542
+ */
543
+ private function render_plugin_feedback_popup() {
544
+ $button_cancel = apply_filters( $this->product->get_key() . '_feedback_deactivate_button_cancel', $this->button_cancel );
545
+ $button_submit = apply_filters( $this->product->get_key() . '_feedback_deactivate_button_submit', $this->button_submit );
546
+ $options = $this->randomize_options( apply_filters( $this->product->get_key() . '_feedback_deactivate_options', $this->options_plugin ) );
547
+ $info_disclosure_link = '<a href="#" class="info-disclosure-link">' . apply_filters( $this->product->get_slug() . '_themeisle_sdk_info_collect_cta', 'What info do we collect?' ) . '</a>';
548
+
549
+ $options += $this->other;
550
+ ?>
551
+ <div class="ti-plugin-uninstall-feedback-popup ti-feedback" id="<?php echo esc_attr( $this->product->get_slug() . '_uninstall_feedback_popup' ); ?>">
552
+ <div class="popup--header">
553
+ <h5><?php echo wp_kses( $this->heading_plugin, array( 'span' => true ) ); ?> </h5>
554
+ </div><!--/.popup--header-->
555
+ <div class="popup--body">
556
+ <?php $this->render_options_list( $options ); ?>
557
+ </div><!--/.popup--body-->
558
+ <div class="popup--footer">
559
+ <div class="actions">
560
+ <?php
561
+ echo wp_kses_post( $info_disclosure_link );
562
+ echo wp_kses_post( $this->get_disclosure_labels() );
563
+ echo '<div class="buttons">';
564
+ echo get_submit_button(
565
+ $button_cancel,
566
+ 'secondary',
567
+ $this->product->get_key() . 'ti-deactivate-no',
568
+ false
569
+ );
570
+ echo get_submit_button(
571
+ $button_submit,
572
+ 'primary',
573
+ $this->product->get_key() . 'ti-deactivate-yes',
574
+ false,
575
+ array(
576
+ 'data-after-text' => $button_submit,
577
+ 'disabled' => true,
578
+ )
579
+ );
580
+ echo '</div>';
581
+ ?>
582
+ </div><!--/.actions-->
583
+ </div><!--/.popup--footer-->
584
+ </div>
585
+
586
+ <?php
587
+ }
588
+
589
+ /**
590
+ * Add plugin feedback popup JS
591
+ */
592
+ private function add_plugin_feedback_popup_js() {
593
+ $popup_id = '#' . $this->product->get_slug() . '_uninstall_feedback_popup';
594
+ $key = $this->product->get_key();
595
+ ?>
596
+ <script type="text/javascript" id="ti-deactivate-js">
597
+ (function ($) {
598
+ $(document).ready(function () {
599
+ var targetElement = 'tr[data-plugin^="<?php echo $this->product->get_slug(); ?>/"] span.deactivate a';
600
+ var redirectUrl = $(targetElement).attr('href');
601
+ if ($('.ti-feedback-overlay').length === 0) {
602
+ $('body').prepend('<div class="ti-feedback-overlay"></div>');
603
+ }
604
+ $('<?php echo esc_attr( $popup_id ); ?> ').appendTo($(targetElement).parent());
605
+
606
+ $(targetElement).on('click', function (e) {
607
+ e.preventDefault();
608
+ $('<?php echo esc_attr( $popup_id ); ?> ').addClass('active');
609
+ $('body').addClass('ti-feedback-open');
610
+ $('.ti-feedback-overlay').on('click', function () {
611
+ $('<?php echo esc_attr( $popup_id ); ?> ').removeClass('active');
612
+ $('body').removeClass('ti-feedback-open');
613
+ });
614
+ });
615
+
616
+ $('<?php echo esc_attr( $popup_id ); ?> .info-disclosure-link').on('click', function (e) {
617
+ e.preventDefault();
618
+ $(this).parent().find('.info-disclosure-content').toggleClass('active');
619
+ });
620
+
621
+ $('<?php echo esc_attr( $popup_id ); ?> input[type="radio"]').on('change', function () {
622
+ var radio = $(this);
623
+ if (radio.parent().find('textarea').length > 0 &&
624
+ radio.parent().find('textarea').val().length === 0) {
625
+ $('<?php echo esc_attr( $popup_id ); ?> #<?php echo $key; ?>ti-deactivate-yes').attr('disabled', 'disabled');
626
+ radio.parent().find('textarea').on('keyup', function (e) {
627
+ if ($(this).val().length === 0) {
628
+ $('<?php echo esc_attr( $popup_id ); ?> #<?php echo $key; ?>ti-deactivate-yes').attr('disabled', 'disabled');
629
+ } else {
630
+ $('<?php echo esc_attr( $popup_id ); ?> #<?php echo $key; ?>ti-deactivate-yes').removeAttr('disabled');
631
+ }
632
+ });
633
} else {
634
+ $('<?php echo esc_attr( $popup_id ); ?> #<?php echo $key; ?>ti-deactivate-yes').removeAttr('disabled');
635
}
636
});
637
638
+ $('<?php echo esc_attr( $popup_id ); ?> #<?php echo $key; ?>ti-deactivate-no').on('click', function (e) {
639
+ e.preventDefault();
640
+ e.stopPropagation();
641
+ $(targetElement).unbind('click');
642
+ $('body').removeClass('ti-feedback-open');
643
+ $('<?php echo esc_attr( $popup_id ); ?>').remove();
644
+ if (redirectUrl !== '') {
645
+ location.href = redirectUrl;
646
+ }
647
});
648
649
+ $('<?php echo esc_attr( $popup_id ); ?> #<?php echo $key; ?>ti-deactivate-yes').on('click', function (e) {
650
+ e.preventDefault();
651
+ e.stopPropagation();
652
+ $(targetElement).unbind('click');
653
+ var selectedOption = $(
654
+ '<?php echo esc_attr( $popup_id ); ?> input[name="ti-deactivate-option"]:checked');
655
+ var data = {
656
+ 'action': '<?php echo esc_attr( $key ) . '_uninstall_feedback'; ?>',
657
+ 'nonce': '<?php echo wp_create_nonce( (string) __CLASS__ ); ?>',
658
+ 'id': selectedOption.parent().attr('ti-option-id'),
659
+ 'msg': selectedOption.parent().find('textarea').val(),
660
+ 'type': 'plugin',
661
+ 'key': '<?php echo esc_attr( $key ); ?>'
662
+ };
663
+ $.ajax({
664
+ type: 'POST',
665
+ url: ajaxurl,
666
+ data: data,
667
+ complete() {
668
+ $('body').removeClass('ti-feedback-open');
669
+ $('<?php echo esc_attr( $popup_id ); ?>').remove();
670
+ if (redirectUrl !== '') {
671
+ location.href = redirectUrl;
672
+ }
673
+ },
674
+ beforeSend() {
675
+ $('<?php echo esc_attr( $popup_id ); ?>').addClass('sending-feedback');
676
+ $('<?php echo esc_attr( $popup_id ); ?> .popup--footer').remove();
677
+ $('<?php echo esc_attr( $popup_id ); ?> .popup--body').html('<i class="dashicons dashicons-update-alt"></i>');
678
}
679
+ });
680
+ });
681
});
682
})(jQuery);
683
+
684
</script>
685
<?php
686
do_action( $this->product->get_key() . '_uninstall_feedback_after_js' );
687
}
688
689
/**
690
+ * Get the disclosure labels markup.
691
*
692
+ * @return string
693
*/
694
+ private function get_disclosure_labels() {
695
$disclosure_new_labels = apply_filters( $this->product->get_slug() . '_themeisle_sdk_disclosure_content_labels', [], $this->product );
696
$disclosure_labels = array_merge(
697
[
698
'title' => 'Below is a detailed view of all data that ThemeIsle will receive if you fill in this survey. No domain name, email address or IP addresses are transmited after you submit the survey.',
699
'items' => [
700
sprintf( '%s %s version %s %s %s %s', '<strong>', ucwords( $this->product->get_type() ), '</strong>', '<code>', $this->product->get_version(), '</code>' ),
701
+ sprintf( '%s Uninstall reason %s %s Selected reason from the above survey %s ', '<strong>', '</strong>', '<i>', '</i>' ),
702
],
703
],
704
$disclosure_new_labels
705
);
706
707
+ $info_disclosure_content = '<div class="info-disclosure-content"><p>' . wp_kses_post( $disclosure_labels['title'] ) . '</p><ul>';
708
foreach ( $disclosure_labels['items'] as $disclosure_item ) {
709
$info_disclosure_content .= sprintf( '<li>%s</li>', wp_kses_post( $disclosure_item ) );
710
}
711
$info_disclosure_content .= '</ul></div>';
712
713
+ return $info_disclosure_content;
714
}
715
716
/**
vendor/codeinwp/themeisle-sdk/src/Product.php CHANGED
@@ -114,7 +114,7 @@ class Product {
114
*/
115
public function __construct( $basefile ) {
116
if ( ! empty( $basefile ) ) {
117
- if ( is_readable( $basefile ) ) {
118
$this->basefile = $basefile;
119
$this->setup_from_path();
120
$this->setup_from_fileheaders();
@@ -345,7 +345,7 @@ class Product {
345
public function get_store_url() {
346
347
if ( strpos( $this->store_url, '/themeisle.com' ) !== false ) {
348
- return 'https://store.themeisle.com';
349
}
350
351
return $this->store_url;
@@ -360,6 +360,21 @@ class Product {
360
return $this->basefile;
361
}
362
363
/**
364
* Returns product filename.
365
*
114
*/
115
public function __construct( $basefile ) {
116
if ( ! empty( $basefile ) ) {
117
+ if ( is_file( $basefile ) ) {
118
$this->basefile = $basefile;
119
$this->setup_from_path();
120
$this->setup_from_fileheaders();
345
public function get_store_url() {
346
347
if ( strpos( $this->store_url, '/themeisle.com' ) !== false ) {
348
+ return 'https://store.themeisle.com/';
349
}
350
351
return $this->store_url;
360
return $this->basefile;
361
}
362
363
+ /**
364
+ * Get changelog url.
365
+ *
366
+ * @return string Changelog url.
367
+ */
368
+ public function get_changelog() {
369
+ return add_query_arg(
370
+ [
371
+ 'name' => rawurlencode( $this->get_name() ),
372
+ 'edd_action' => 'view_changelog',
373
+ ],
374
+ $this->get_store_url()
375
+ );
376
+ }
377
+
378
/**
379
* Returns product filename.
380
*
vendor/codeinwp/themeisle-sdk/start.php CHANGED
@@ -37,7 +37,7 @@ $files_to_load = [
37
$files_to_load = array_merge( $files_to_load, apply_filters( 'themeisle_sdk_required_files', [] ) );
38
39
foreach ( $files_to_load as $file ) {
40
- if ( is_readable( $file ) ) {
41
require_once $file;
42
}
43
}
37
$files_to_load = array_merge( $files_to_load, apply_filters( 'themeisle_sdk_required_files', [] ) );
38
39
foreach ( $files_to_load as $file ) {
40
+ if ( is_file( $file ) ) {
41
require_once $file;
42
}
43
}
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
3
// autoload_real.php @generated by Composer
4
5
- class ComposerAutoloaderInit515ef929ab8adb028bd1f847224e571e
6
{
7
private static $loader;
8
@@ -19,9 +19,9 @@ class ComposerAutoloaderInit515ef929ab8adb028bd1f847224e571e
19
return self::$loader;
20
}
21
22
- spl_autoload_register(array('ComposerAutoloaderInit515ef929ab8adb028bd1f847224e571e', 'loadClassLoader'), true, true);
23
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInit515ef929ab8adb028bd1f847224e571e', 'loadClassLoader'));
25
26
$map = require __DIR__ . '/autoload_namespaces.php';
27
foreach ($map as $namespace => $path) {
@@ -42,14 +42,14 @@ class ComposerAutoloaderInit515ef929ab8adb028bd1f847224e571e
42
43
$includeFiles = require __DIR__ . '/autoload_files.php';
44
foreach ($includeFiles as $fileIdentifier => $file) {
45
- composerRequire515ef929ab8adb028bd1f847224e571e($fileIdentifier, $file);
46
}
47
48
return $loader;
49
}
50
}
51
52
- function composerRequire515ef929ab8adb028bd1f847224e571e($fileIdentifier, $file)
53
{
54
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
55
require $file;
2
3
// autoload_real.php @generated by Composer
4
5
+ class ComposerAutoloaderInitdace1cf96a42d5dbfc274f534aba464d
6
{
7
private static $loader;
8
19
return self::$loader;
20
}
21
22
+ spl_autoload_register(array('ComposerAutoloaderInitdace1cf96a42d5dbfc274f534aba464d', 'loadClassLoader'), true, true);
23
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInitdace1cf96a42d5dbfc274f534aba464d', 'loadClassLoader'));
25
26
$map = require __DIR__ . '/autoload_namespaces.php';
27
foreach ($map as $namespace => $path) {
42
43
$includeFiles = require __DIR__ . '/autoload_files.php';
44
foreach ($includeFiles as $fileIdentifier => $file) {
45
+ composerRequiredace1cf96a42d5dbfc274f534aba464d($fileIdentifier, $file);
46
}
47
48
return $loader;
49
}
50
}
51
52
+ function composerRequiredace1cf96a42d5dbfc274f534aba464d($fileIdentifier, $file)
53
{
54
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
55
require $file;
vendor/composer/installed.json CHANGED
@@ -80,15 +80,15 @@
80
"source": {
81
"type": "git",
82
"url": "https://github.com/Codeinwp/gutenberg-animation.git",
83
- "reference": "4673befcf3b292128a8c6365b1f3883a31a38963"
84
},
85
"dist": {
86
"type": "zip",
87
- "url": "https://api.github.com/repos/Codeinwp/gutenberg-animation/zipball/4673befcf3b292128a8c6365b1f3883a31a38963",
88
- "reference": "4673befcf3b292128a8c6365b1f3883a31a38963",
89
"shasum": ""
90
},
91
- "time": "2019-05-24 23:08:36",
92
"type": "library",
93
"installation-source": "source",
94
"autoload": {
@@ -117,12 +117,12 @@
117
"source": {
118
"type": "git",
119
"url": "https://github.com/Codeinwp/themeisle-sdk.git",
120
- "reference": "3e96da74027d8a5f1ebd40642eb6b791bcde9bfe"
121
},
122
"dist": {
123
"type": "zip",
124
- "url": "https://api.github.com/repos/Codeinwp/themeisle-sdk/zipball/3e96da74027d8a5f1ebd40642eb6b791bcde9bfe",
125
- "reference": "3e96da74027d8a5f1ebd40642eb6b791bcde9bfe",
126
"shasum": ""
127
},
128
"require-dev": {
@@ -130,7 +130,7 @@
130
"squizlabs/php_codesniffer": "^3.1",
131
"wp-coding-standards/wpcs": "^1.0.0"
132
},
133
- "time": "2019-07-16 16:44:55",
134
"type": "library",
135
"installation-source": "source",
136
"notification-url": "https://packagist.org/downloads/",
80
"source": {
81
"type": "git",
82
"url": "https://github.com/Codeinwp/gutenberg-animation.git",
83
+ "reference": "2d7789ceac8e6b81048d1ab801d2bc644e3b6fe6"
84
},
85
"dist": {
86
"type": "zip",
87
+ "url": "https://api.github.com/repos/Codeinwp/gutenberg-animation/zipball/2d7789ceac8e6b81048d1ab801d2bc644e3b6fe6",
88
+ "reference": "2d7789ceac8e6b81048d1ab801d2bc644e3b6fe6",
89
"shasum": ""
90
},
91
+ "time": "2019-09-10 12:22:28",
92
"type": "library",
93
"installation-source": "source",
94
"autoload": {
117
"source": {
118
"type": "git",
119
"url": "https://github.com/Codeinwp/themeisle-sdk.git",
120
+ "reference": "ede4dbdb119ad5b5d317f3866d68c90a45fe8179"
121
},
122
"dist": {
123
"type": "zip",
124
+ "url": "https://api.github.com/repos/Codeinwp/themeisle-sdk/zipball/ede4dbdb119ad5b5d317f3866d68c90a45fe8179",
125
+ "reference": "ede4dbdb119ad5b5d317f3866d68c90a45fe8179",
126
"shasum": ""
127
},
128
"require-dev": {
130
"squizlabs/php_codesniffer": "^3.1",
131
"wp-coding-standards/wpcs": "^1.0.0"
132
},
133
+ "time": "2019-08-23 08:47:43",
134
"type": "library",
135
"installation-source": "source",
136
"notification-url": "https://packagist.org/downloads/",