Version Description
- 2018-11-27
Download this release
Release Info
Developer | themeisle |
Plugin | Page Templater For Elementor |
Version | 1.2.7 |
Comparing to | |
See all releases |
Code changes from version 1.2.6 to 1.2.7
- CHANGELOG.md +2 -2
- assets/custom.css +14 -7
- custom-posttype-class.php +1 -1
- elementemplater-class.php +47 -0
- elementemplator.php +18 -2
- inc/class-tgm-plugin-activation.php +3 -1
- inc/elementemplater-functions.php +1 -1
- inc/settings.php +5 -4
- languages/elementor-templater.pot +464 -0
- readme.md +5 -0
- readme.txt +5 -0
- themeisle-hash.json +1 -1
- vendor/autoload.php +0 -7
- vendor/codeinwp/full-width-page-templates/builders/class-elementor-full-width-templates.php +0 -121
- vendor/codeinwp/full-width-page-templates/class-full-width-templates.php +0 -203
- vendor/codeinwp/full-width-page-templates/composer.json +0 -23
- vendor/codeinwp/full-width-page-templates/load.php +0 -11
- vendor/codeinwp/full-width-page-templates/templates/builder-fullwidth-std.php +0 -16
- vendor/codeinwp/full-width-page-templates/templates/builder-fullwidth.php +0 -32
- vendor/codeinwp/full-width-page-templates/themes/actions/inline-style.php +0 -15
- vendor/codeinwp/full-width-page-templates/themes/ashe/inline-style.php +0 -10
- vendor/codeinwp/full-width-page-templates/themes/astra/inline-style.php +0 -10
- vendor/codeinwp/full-width-page-templates/themes/avant/inline-style.php +0 -13
- vendor/codeinwp/full-width-page-templates/themes/colormag/inline-style.php +0 -18
- vendor/codeinwp/full-width-page-templates/themes/consulting/inline-style.php +0 -15
- vendor/codeinwp/full-width-page-templates/themes/edge/inline-style.php +0 -19
- vendor/codeinwp/full-width-page-templates/themes/editorial/inline-style.php +0 -17
- vendor/codeinwp/full-width-page-templates/themes/enlightenment/inline-style.php +0 -11
- vendor/codeinwp/full-width-page-templates/themes/envo-business/inline-style.php +0 -9
- vendor/codeinwp/full-width-page-templates/themes/envy-blog/inline-style.php +0 -13
- vendor/codeinwp/full-width-page-templates/themes/experon/inline-style.php +0 -14
- vendor/codeinwp/full-width-page-templates/themes/flash/inline-style.php +0 -17
- vendor/codeinwp/full-width-page-templates/themes/generatepress/inline-style.php +0 -15
- vendor/codeinwp/full-width-page-templates/themes/genesis/inline-style.php +0 -24
- vendor/codeinwp/full-width-page-templates/themes/hestia/inline-style.php +0 -8
- vendor/codeinwp/full-width-page-templates/themes/hitmag/inline-style.php +0 -30
- vendor/codeinwp/full-width-page-templates/themes/hueman/inline-style.php +0 -21
- vendor/codeinwp/full-width-page-templates/themes/kale/inline-style.php +0 -13
- vendor/codeinwp/full-width-page-templates/themes/lodestar/inline-style.php +0 -8
- vendor/codeinwp/full-width-page-templates/themes/maxstore/inline-style.php +0 -9
- vendor/codeinwp/full-width-page-templates/themes/news-portal/inline-style.php +0 -17
- vendor/codeinwp/full-width-page-templates/themes/nikko-portfolio/inline-style.php +0 -8
- vendor/codeinwp/full-width-page-templates/themes/oceanwp/inline-style.php +0 -8
- vendor/codeinwp/full-width-page-templates/themes/online-shop/inline-style.php +0 -19
- vendor/codeinwp/full-width-page-templates/themes/poseidon/inline-style.php +0 -16
- vendor/codeinwp/full-width-page-templates/themes/primer/inline-style.php +0 -12
- vendor/codeinwp/full-width-page-templates/themes/renden/inline-style.php +0 -16
- vendor/codeinwp/full-width-page-templates/themes/shapely/inline-style.php +0 -21
- vendor/codeinwp/full-width-page-templates/themes/spacious/inline-style.php +0 -41
- vendor/codeinwp/full-width-page-templates/themes/storefront/inline-style.php +0 -17
- vendor/codeinwp/full-width-page-templates/themes/sydney/inline-style.php +0 -19
- vendor/codeinwp/full-width-page-templates/themes/total/inline-style.php +0 -8
- vendor/codeinwp/full-width-page-templates/themes/twentyfifteen/inline-style.php +0 -23
- vendor/codeinwp/full-width-page-templates/themes/twentyfourteen/inline-style.php +0 -14
- vendor/codeinwp/full-width-page-templates/themes/twentyseventeen/inline-style.php +0 -15
- vendor/codeinwp/full-width-page-templates/themes/twentysixteen/inline-style.php +0 -59
- vendor/codeinwp/full-width-page-templates/themes/twentythirteen/inline-style.php +0 -17
- vendor/codeinwp/full-width-page-templates/themes/twentytwelve/inline-style.php +0 -13
- vendor/codeinwp/full-width-page-templates/themes/vantage/inline-style.php +0 -15
- vendor/codeinwp/full-width-page-templates/themes/virtue/inline-style.php +0 -14
- vendor/codeinwp/full-width-page-templates/themes/vogue/inline-style.php +0 -13
- vendor/codeinwp/full-width-page-templates/themes/vt-blogging/inline-style.php +0 -10
- vendor/codeinwp/full-width-page-templates/themes/writee/inline-style.php +0 -9
- vendor/codeinwp/full-width-page-templates/themes/zerif-lite/functions.php +0 -9
- vendor/codeinwp/full-width-page-templates/themes/zerif-lite/inline-style.php +0 -13
- vendor/codeinwp/themeisle-sdk/LICENSE +0 -674
- vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-endpoints.php +0 -312
- vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback-deactivate.php +0 -556
- vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback-factory.php +0 -50
- vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback-review.php +0 -209
- vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback-translate.php +0 -983
- vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback.php +0 -90
- vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-licenser.php +0 -686
- vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-loader.php +0 -96
- vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-logger.php +0 -227
- vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-notification-manager.php +0 -105
- vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-product.php +0 -635
- vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-rollback.php +0 -223
- vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-widget-dashboard-blog.php +0 -412
- vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-widget.php +0 -50
- vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-widgets-factory.php +0 -37
- vendor/codeinwp/themeisle-sdk/composer.json +0 -24
- vendor/codeinwp/themeisle-sdk/index.php +0 -5
- vendor/codeinwp/themeisle-sdk/load.php +0 -35
- vendor/codeinwp/themeisle-sdk/start.php +0 -38
- vendor/composer/ClassLoader.php +0 -413
- vendor/composer/LICENSE +0 -21
- vendor/composer/autoload_classmap.php +0 -9
- vendor/composer/autoload_files.php +0 -11
- vendor/composer/autoload_namespaces.php +0 -9
- vendor/composer/autoload_psr4.php +0 -9
- vendor/composer/autoload_real.php +0 -59
- vendor/composer/installed.json +0 -79
CHANGELOG.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
|
2 |
-
### v1.2.
|
3 |
**Changes:**
|
4 |
-
*
|
5 |
|
6 |
### v1.2.6 - 2018-10-09
|
7 |
**Changes:**
|
1 |
|
2 |
+
### v1.2.7 - 2018-11-27
|
3 |
**Changes:**
|
4 |
+
* Update recommended theme link
|
5 |
|
6 |
### v1.2.6 - 2018-10-09
|
7 |
**Changes:**
|
assets/custom.css
CHANGED
@@ -11,7 +11,6 @@
|
|
11 |
.anchor-menu a,
|
12 |
.anchor-menu a:visited {
|
13 |
color: #29292a;
|
14 |
-
-webkit-transition: color 0.2s;
|
15 |
transition: color 0.2s;
|
16 |
}
|
17 |
|
@@ -61,7 +60,9 @@
|
|
61 |
top: 0;
|
62 |
width: 100%;
|
63 |
z-index: 3;
|
|
|
64 |
transition: transform 0.2s;
|
|
|
65 |
}
|
66 |
|
67 |
.anchor-menu-fixed.elementor-widget-wp-widget-nav_menu,
|
@@ -77,7 +78,8 @@
|
|
77 |
-webkit-animation: header-down 0.2s ease-in;
|
78 |
animation: header-down 0.2s ease-in;
|
79 |
-webkit-transform: translate(0);
|
80 |
-
transform: translate(0);
|
|
|
81 |
}
|
82 |
|
83 |
.site-header-hidden.anchor-menu,
|
@@ -85,7 +87,8 @@
|
|
85 |
-webkit-animation: header-up 0.5s ease-in;
|
86 |
animation: header-up 0.5s ease-in;
|
87 |
-webkit-transform: translate(-100%);
|
88 |
-
transform: translate(-100%);
|
|
|
89 |
}
|
90 |
|
91 |
.admin-bar .anchor-menu-fixed.anchor-menu,
|
@@ -105,11 +108,13 @@
|
|
105 |
|
106 |
@keyframes header-down {
|
107 |
from {
|
108 |
-
transform: translate(0, -100%);
|
|
|
109 |
}
|
110 |
|
111 |
to {
|
112 |
-
transform: translate(0);
|
|
|
113 |
}
|
114 |
}
|
115 |
|
@@ -125,11 +130,13 @@
|
|
125 |
|
126 |
@keyframes header-up {
|
127 |
from {
|
128 |
-
transform: translate(0);
|
|
|
129 |
}
|
130 |
|
131 |
to {
|
132 |
-
transform: translate(0, -100%);
|
|
|
133 |
}
|
134 |
}
|
135 |
|
11 |
.anchor-menu a,
|
12 |
.anchor-menu a:visited {
|
13 |
color: #29292a;
|
|
|
14 |
transition: color 0.2s;
|
15 |
}
|
16 |
|
60 |
top: 0;
|
61 |
width: 100%;
|
62 |
z-index: 3;
|
63 |
+
transition: -webkit-transform 0.2s;
|
64 |
transition: transform 0.2s;
|
65 |
+
transition: transform 0.2s, -webkit-transform 0.2s;
|
66 |
}
|
67 |
|
68 |
.anchor-menu-fixed.elementor-widget-wp-widget-nav_menu,
|
78 |
-webkit-animation: header-down 0.2s ease-in;
|
79 |
animation: header-down 0.2s ease-in;
|
80 |
-webkit-transform: translate(0);
|
81 |
+
-ms-transform: translate(0);
|
82 |
+
transform: translate(0);
|
83 |
}
|
84 |
|
85 |
.site-header-hidden.anchor-menu,
|
87 |
-webkit-animation: header-up 0.5s ease-in;
|
88 |
animation: header-up 0.5s ease-in;
|
89 |
-webkit-transform: translate(-100%);
|
90 |
+
-ms-transform: translate(-100%);
|
91 |
+
transform: translate(-100%);
|
92 |
}
|
93 |
|
94 |
.admin-bar .anchor-menu-fixed.anchor-menu,
|
108 |
|
109 |
@keyframes header-down {
|
110 |
from {
|
111 |
+
-webkit-transform: translate(0, -100%);
|
112 |
+
transform: translate(0, -100%);
|
113 |
}
|
114 |
|
115 |
to {
|
116 |
+
-webkit-transform: translate(0);
|
117 |
+
transform: translate(0);
|
118 |
}
|
119 |
}
|
120 |
|
130 |
|
131 |
@keyframes header-up {
|
132 |
from {
|
133 |
+
-webkit-transform: translate(0);
|
134 |
+
transform: translate(0);
|
135 |
}
|
136 |
|
137 |
to {
|
138 |
+
-webkit-transform: translate(0, -100%);
|
139 |
+
transform: translate(0, -100%);
|
140 |
}
|
141 |
}
|
142 |
|
custom-posttype-class.php
CHANGED
@@ -72,7 +72,7 @@ class EL_CustomTemplates {
|
|
72 |
><?php echo $name; ?></option>
|
73 |
<?php } ?>
|
74 |
</select>
|
75 |
-
|
76 |
} else {
|
77 |
echo '<p>No Custom Templates Found!</p>';
|
78 |
}
|
72 |
><?php echo $name; ?></option>
|
73 |
<?php } ?>
|
74 |
</select>
|
75 |
+
<?php
|
76 |
} else {
|
77 |
echo '<p>No Custom Templates Found!</p>';
|
78 |
}
|
elementemplater-class.php
CHANGED
@@ -27,6 +27,14 @@ class ElemenTemplater {
|
|
27 |
add_action( 'init', array( $this, 'load_composer_lib' ), 9 );
|
28 |
add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_styles' ), 998 );
|
29 |
add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ), 9999 );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
}
|
31 |
|
32 |
public function elementemplater_load_plugin_textdomain() {
|
@@ -60,6 +68,45 @@ class ElemenTemplater {
|
|
60 |
wp_enqueue_script( 'builder-fullwidth-js', plugins_url( 'assets/custom.js', __FILE__ ), array( 'jquery' ), '', true );
|
61 |
}
|
62 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
}
|
64 |
|
65 |
add_action( 'plugins_loaded', array( 'ElemenTemplater', 'get_instance' ) );
|
27 |
add_action( 'init', array( $this, 'load_composer_lib' ), 9 );
|
28 |
add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_styles' ), 998 );
|
29 |
add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ), 9999 );
|
30 |
+
|
31 |
+
$current_theme = wp_get_theme();
|
32 |
+
$theme_name = $current_theme->get( 'TextDomain' );
|
33 |
+
$template = $current_theme->get( 'Template' );
|
34 |
+
if ( $theme_name !== 'neve' && $template !== 'neve' ) {
|
35 |
+
add_action( 'admin_notices', array($this, 'simple_notice') );
|
36 |
+
add_action( 'admin_init', array($this, 'elementemplater_dismiss_notice') );
|
37 |
+
}
|
38 |
}
|
39 |
|
40 |
public function elementemplater_load_plugin_textdomain() {
|
68 |
wp_enqueue_script( 'builder-fullwidth-js', plugins_url( 'assets/custom.js', __FILE__ ), array( 'jquery' ), '', true );
|
69 |
}
|
70 |
}
|
71 |
+
|
72 |
+
public function simple_notice() {
|
73 |
+
global $current_user;
|
74 |
+
$user_id = $current_user->ID;
|
75 |
+
$ignored_notice = get_user_meta( $user_id, 'elementemplater_ignore_neve_notice' );
|
76 |
+
|
77 |
+
if ( ! empty( $ignored_notice ) ) {
|
78 |
+
return;
|
79 |
+
}
|
80 |
+
|
81 |
+
$dismiss_button = sprintf(
|
82 |
+
'<a href="%s" class="notice-dismiss" style="text-decoration:none;"></a>',
|
83 |
+
'?elementemplater_ignore_notice=0'
|
84 |
+
);
|
85 |
+
|
86 |
+
$message = sprintf(
|
87 |
+
esc_html__( 'Do you enjoy working with Elementor? %1$s %2$s', 'elementor-templater' ),
|
88 |
+
sprintf( '<br>Page Templater For Elementor recommends <strong>Neve</strong>, our new <strong>FREE multipurpose theme</strong>. It\'s simple, fast and fully compatible with both Elementor and Gutenberg. See the' ),
|
89 |
+
sprintf(
|
90 |
+
'<a target="_blank" href="%1$s">%2$s</a>',
|
91 |
+
esc_url( admin_url( 'theme-install.php?theme=neve' ) ),
|
92 |
+
esc_html__( 'live preview.', 'elementor-templater' )
|
93 |
+
)
|
94 |
+
);
|
95 |
+
|
96 |
+
printf(
|
97 |
+
'<div class="notice updated" style="position:relative;">%1$s<p>%2$s</p></div>',
|
98 |
+
$dismiss_button,
|
99 |
+
$message
|
100 |
+
);
|
101 |
+
}
|
102 |
+
|
103 |
+
public function elementemplater_dismiss_notice() {
|
104 |
+
global $current_user;
|
105 |
+
$user_id = $current_user->ID;
|
106 |
+
if ( isset( $_GET['elementemplater_ignore_notice'] ) && '0' == $_GET['elementemplater_ignore_notice'] ) {
|
107 |
+
add_user_meta( $user_id, 'elementemplater_ignore_neve_notice', 'true', true );
|
108 |
+
}
|
109 |
+
}
|
110 |
}
|
111 |
|
112 |
add_action( 'plugins_loaded', array( 'ElemenTemplater', 'get_instance' ) );
|
elementemplator.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Page Templater For Elementor
|
4 |
* Plugin URI: https://themeisle.com/
|
5 |
* Description: A helper plugin for users of Elementor Pagebuilder. Adds 2 new templates for complete full width experience while using the page builder - support for a number of popular themes is built-in.
|
6 |
-
* Version: 1.2.
|
7 |
* Author: ThemeIsle
|
8 |
* Author URI: https://themeisle.com/
|
9 |
* Requires at least: 4.4
|
@@ -22,7 +22,7 @@ if ( ! defined( 'WPINC' ) ) {
|
|
22 |
------------------------------------------ */
|
23 |
|
24 |
/* Set plugin version constant. */
|
25 |
-
define( 'ET_VERSION', '1.2.
|
26 |
|
27 |
/* Set constant path to the plugin directory. */
|
28 |
define( 'ET_PATH', trailingslashit( plugin_dir_path( __FILE__ ) ) );
|
@@ -91,3 +91,19 @@ function elementor_templater_register_sdk( $products ) {
|
|
91 |
return $products;
|
92 |
}
|
93 |
add_filter( 'themeisle_sdk_products', 'elementor_templater_register_sdk', 10, 1 );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
* Plugin Name: Page Templater For Elementor
|
4 |
* Plugin URI: https://themeisle.com/
|
5 |
* Description: A helper plugin for users of Elementor Pagebuilder. Adds 2 new templates for complete full width experience while using the page builder - support for a number of popular themes is built-in.
|
6 |
+
* Version: 1.2.7
|
7 |
* Author: ThemeIsle
|
8 |
* Author URI: https://themeisle.com/
|
9 |
* Requires at least: 4.4
|
22 |
------------------------------------------ */
|
23 |
|
24 |
/* Set plugin version constant. */
|
25 |
+
define( 'ET_VERSION', '1.2.7' );
|
26 |
|
27 |
/* Set constant path to the plugin directory. */
|
28 |
define( 'ET_PATH', trailingslashit( plugin_dir_path( __FILE__ ) ) );
|
91 |
return $products;
|
92 |
}
|
93 |
add_filter( 'themeisle_sdk_products', 'elementor_templater_register_sdk', 10, 1 );
|
94 |
+
|
95 |
+
/**
|
96 |
+
* Delete user meta 'elementemplater_ignore_neve_notice' on plugin uninstall
|
97 |
+
*/
|
98 |
+
function elementor_templater_uninstall() {
|
99 |
+
$all_users = get_users(
|
100 |
+
array(
|
101 |
+
'meta_key' => 'elementemplater_ignore_neve_notice',
|
102 |
+
'meta_value' => 'true',
|
103 |
+
)
|
104 |
+
);
|
105 |
+
foreach ( $all_users as $user ) {
|
106 |
+
delete_user_meta( $user->ID, 'elementemplater_ignore_neve_notice' );
|
107 |
+
}
|
108 |
+
}
|
109 |
+
register_uninstall_hook( __FILE__, 'elementor_templater_uninstall' );
|
inc/class-tgm-plugin-activation.php
CHANGED
@@ -3408,7 +3408,9 @@ if ( ! function_exists( 'tgmpa_load_bulk_installer' ) ) {
|
|
3408 |
* }
|
3409 |
*/
|
3410 |
do_action(
|
3411 |
-
'upgrader_process_complete',
|
|
|
|
|
3412 |
'action' => 'install', // [TGMPA + ] adjusted.
|
3413 |
'type' => 'plugin',
|
3414 |
'bulk' => true,
|
3408 |
* }
|
3409 |
*/
|
3410 |
do_action(
|
3411 |
+
'upgrader_process_complete',
|
3412 |
+
$this,
|
3413 |
+
array(
|
3414 |
'action' => 'install', // [TGMPA + ] adjusted.
|
3415 |
'type' => 'plugin',
|
3416 |
'bulk' => true,
|
inc/elementemplater-functions.php
CHANGED
@@ -14,7 +14,7 @@ if ( 'GeneratePress' == $theme || 'generatepress' == $theme ) {
|
|
14 |
<?php the_title( '<h1 class="entry-title" itemprop="headline">', '</h1>' ); ?>
|
15 |
</div>
|
16 |
</header><!-- .entry-header -->
|
17 |
-
|
18 |
endif;
|
19 |
}
|
20 |
}
|
14 |
<?php the_title( '<h1 class="entry-title" itemprop="headline">', '</h1>' ); ?>
|
15 |
</div>
|
16 |
</header><!-- .entry-header -->
|
17 |
+
<?php
|
18 |
endif;
|
19 |
}
|
20 |
}
|
inc/settings.php
CHANGED
@@ -19,7 +19,7 @@ $cpt_pts = isset( $cpt_options['objects'] ) ? $cpt_options['objects'] : arra
|
|
19 |
<?php
|
20 |
if ( function_exists( 'wp_nonce_field' ) ) {
|
21 |
wp_nonce_field( 'nonce_elcpt' );}
|
22 |
-
?>
|
23 |
|
24 |
<div id="cpt_select_objects">
|
25 |
|
@@ -34,7 +34,8 @@ $cpt_pts = isset( $cpt_options['objects'] ) ? $cpt_options['objects'] : arra
|
|
34 |
$post_types = get_post_types(
|
35 |
array(
|
36 |
'public' => true,
|
37 |
-
),
|
|
|
38 |
);
|
39 |
|
40 |
foreach ( $post_types as $post_type ) {
|
@@ -49,11 +50,11 @@ $cpt_pts = isset( $cpt_options['objects'] ) ? $cpt_options['objects'] : arra
|
|
49 |
echo 'checked="checked"';
|
50 |
}
|
51 |
}
|
52 |
-
|
53 |
> <?php echo $post_type->label; ?></label><br>
|
54 |
<?php
|
55 |
}
|
56 |
-
|
57 |
</td>
|
58 |
</tr>
|
59 |
</tbody>
|
19 |
<?php
|
20 |
if ( function_exists( 'wp_nonce_field' ) ) {
|
21 |
wp_nonce_field( 'nonce_elcpt' );}
|
22 |
+
?>
|
23 |
|
24 |
<div id="cpt_select_objects">
|
25 |
|
34 |
$post_types = get_post_types(
|
35 |
array(
|
36 |
'public' => true,
|
37 |
+
),
|
38 |
+
'objects'
|
39 |
);
|
40 |
|
41 |
foreach ( $post_types as $post_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2018 ThemeIsle
|
2 |
+
# This file is distributed under the no.
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"Project-Id-Version: Page Templater For Elementor 1.2.6\n"
|
6 |
+
"Report-Msgid-Bugs-To: "
|
7 |
+
"https://github.com/Codeinwp/elementor-templater/issues\n"
|
8 |
+
"POT-Creation-Date: 2018-11-07 17:31:48+00:00\n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=utf-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"PO-Revision-Date: 2018-MO-DA HO:MI+ZONE\n"
|
13 |
+
"Last-Translator: Themeisle Translate Team <friends@themeisle.com>\n"
|
14 |
+
"Language-Team: Themeisle Translate <friends@themeisle.com>\n"
|
15 |
+
"X-Generator: grunt-wp-i18n 0.5.4\n"
|
16 |
+
"X-Poedit-KeywordsList: "
|
17 |
+
"__;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;_nx_noop:1,2,3c;esc_"
|
18 |
+
"attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;esc_html_x:1,2c;\n"
|
19 |
+
"Language: en\n"
|
20 |
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
21 |
+
"X-Poedit-Country: United States\n"
|
22 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
23 |
+
"X-Poedit-Basepath: ../\n"
|
24 |
+
"X-Poedit-SearchPath-0: .\n"
|
25 |
+
"X-Poedit-Bookmarks: \n"
|
26 |
+
"X-Textdomain-Support: yes\n"
|
27 |
+
|
28 |
+
#: custom-posttype-class.php:20
|
29 |
+
msgid "Post Type Template"
|
30 |
+
msgstr ""
|
31 |
+
|
32 |
+
#: custom-posttype-class.php:35
|
33 |
+
msgid "Custom Template"
|
34 |
+
msgstr ""
|
35 |
+
|
36 |
+
#: custom-posttype-class.php:53
|
37 |
+
msgid "Choose Template"
|
38 |
+
msgstr ""
|
39 |
+
|
40 |
+
#: custom-posttype-class.php:63
|
41 |
+
msgid "Default Template"
|
42 |
+
msgstr ""
|
43 |
+
|
44 |
+
#: elementemplater-class.php:82
|
45 |
+
msgid "Do you enjoy working with Elementor? %1$s %2$s"
|
46 |
+
msgstr ""
|
47 |
+
|
48 |
+
#: elementemplater-class.php:87
|
49 |
+
msgid "theme demo."
|
50 |
+
msgstr ""
|
51 |
+
|
52 |
+
#: inc/class-tgm-plugin-activation.php:334
|
53 |
+
msgid "Install Required Plugins"
|
54 |
+
msgstr ""
|
55 |
+
|
56 |
+
#: inc/class-tgm-plugin-activation.php:335
|
57 |
+
msgid "Install Plugins"
|
58 |
+
msgstr ""
|
59 |
+
|
60 |
+
#: inc/class-tgm-plugin-activation.php:337
|
61 |
+
#. translators: %s: plugin name.
|
62 |
+
msgid "Installing Plugin: %s"
|
63 |
+
msgstr ""
|
64 |
+
|
65 |
+
#: inc/class-tgm-plugin-activation.php:339
|
66 |
+
#. translators: %s: plugin name.
|
67 |
+
msgid "Updating Plugin: %s"
|
68 |
+
msgstr ""
|
69 |
+
|
70 |
+
#: inc/class-tgm-plugin-activation.php:340
|
71 |
+
msgid "Something went wrong with the plugin API."
|
72 |
+
msgstr ""
|
73 |
+
|
74 |
+
#: inc/class-tgm-plugin-activation.php:377
|
75 |
+
#. translators: 1: plugin name(s).
|
76 |
+
msgid "Begin installing plugin"
|
77 |
+
msgid_plural "Begin installing plugins"
|
78 |
+
msgstr[0] ""
|
79 |
+
msgstr[1] ""
|
80 |
+
|
81 |
+
#: inc/class-tgm-plugin-activation.php:382
|
82 |
+
msgid "Begin updating plugin"
|
83 |
+
msgid_plural "Begin updating plugins"
|
84 |
+
msgstr[0] ""
|
85 |
+
msgstr[1] ""
|
86 |
+
|
87 |
+
#: inc/class-tgm-plugin-activation.php:387
|
88 |
+
msgid "Begin activating plugin"
|
89 |
+
msgid_plural "Begin activating plugins"
|
90 |
+
msgstr[0] ""
|
91 |
+
msgstr[1] ""
|
92 |
+
|
93 |
+
#: inc/class-tgm-plugin-activation.php:392
|
94 |
+
msgid "Return to Required Plugins Installer"
|
95 |
+
msgstr ""
|
96 |
+
|
97 |
+
#: inc/class-tgm-plugin-activation.php:393
|
98 |
+
#: inc/class-tgm-plugin-activation.php:920
|
99 |
+
#: inc/class-tgm-plugin-activation.php:2626
|
100 |
+
#: inc/class-tgm-plugin-activation.php:3677
|
101 |
+
msgid "Return to the Dashboard"
|
102 |
+
msgstr ""
|
103 |
+
|
104 |
+
#: inc/class-tgm-plugin-activation.php:394
|
105 |
+
#: inc/class-tgm-plugin-activation.php:3252
|
106 |
+
msgid "Plugin activated successfully."
|
107 |
+
msgstr ""
|
108 |
+
|
109 |
+
#: inc/class-tgm-plugin-activation.php:395
|
110 |
+
#: inc/class-tgm-plugin-activation.php:3045
|
111 |
+
msgid "The following plugin was activated successfully:"
|
112 |
+
msgstr ""
|
113 |
+
|
114 |
+
#: inc/class-tgm-plugin-activation.php:397
|
115 |
+
#. translators: 1: plugin name.
|
116 |
+
msgid "No action taken. Plugin %1$s was already active."
|
117 |
+
msgstr ""
|
118 |
+
|
119 |
+
#: inc/class-tgm-plugin-activation.php:399
|
120 |
+
#. translators: 1: plugin name.
|
121 |
+
msgid ""
|
122 |
+
"Plugin not activated. A higher version of %s is needed for this theme. "
|
123 |
+
"Please update the plugin."
|
124 |
+
msgstr ""
|
125 |
+
|
126 |
+
#: inc/class-tgm-plugin-activation.php:401
|
127 |
+
#. translators: 1: dashboard link.
|
128 |
+
msgid "All plugins installed and activated successfully. %1$s"
|
129 |
+
msgstr ""
|
130 |
+
|
131 |
+
#: inc/class-tgm-plugin-activation.php:402
|
132 |
+
msgid "Dismiss this notice"
|
133 |
+
msgstr ""
|
134 |
+
|
135 |
+
#: inc/class-tgm-plugin-activation.php:403
|
136 |
+
msgid ""
|
137 |
+
"There are one or more required or recommended plugins to install, update or "
|
138 |
+
"activate."
|
139 |
+
msgstr ""
|
140 |
+
|
141 |
+
#: inc/class-tgm-plugin-activation.php:404
|
142 |
+
msgid "Please contact the administrator of this site for help."
|
143 |
+
msgstr ""
|
144 |
+
|
145 |
+
#: inc/class-tgm-plugin-activation.php:607
|
146 |
+
msgid "This plugin needs to be updated to be compatible with your theme."
|
147 |
+
msgstr ""
|
148 |
+
|
149 |
+
#: inc/class-tgm-plugin-activation.php:608
|
150 |
+
msgid "Update Required"
|
151 |
+
msgstr ""
|
152 |
+
|
153 |
+
#: inc/class-tgm-plugin-activation.php:725
|
154 |
+
msgid "Set the parent_slug config variable instead."
|
155 |
+
msgstr ""
|
156 |
+
|
157 |
+
#: inc/class-tgm-plugin-activation.php:1027
|
158 |
+
msgid ""
|
159 |
+
"The remote plugin package does not contain a folder with the desired slug "
|
160 |
+
"and renaming did not work."
|
161 |
+
msgstr ""
|
162 |
+
|
163 |
+
#: inc/class-tgm-plugin-activation.php:1027
|
164 |
+
#: inc/class-tgm-plugin-activation.php:1030
|
165 |
+
msgid ""
|
166 |
+
"Please contact the plugin provider and ask them to package their plugin "
|
167 |
+
"according to the WordPress guidelines."
|
168 |
+
msgstr ""
|
169 |
+
|
170 |
+
#: inc/class-tgm-plugin-activation.php:1030
|
171 |
+
msgid ""
|
172 |
+
"The remote plugin package consists of more than one file, but the files are "
|
173 |
+
"not packaged in a folder."
|
174 |
+
msgstr ""
|
175 |
+
|
176 |
+
#: inc/class-tgm-plugin-activation.php:2075
|
177 |
+
#. translators: %s: version number
|
178 |
+
msgid "TGMPA v%s"
|
179 |
+
msgstr ""
|
180 |
+
|
181 |
+
#: inc/class-tgm-plugin-activation.php:2366
|
182 |
+
msgid "Required"
|
183 |
+
msgstr ""
|
184 |
+
|
185 |
+
#: inc/class-tgm-plugin-activation.php:2369
|
186 |
+
msgid "Recommended"
|
187 |
+
msgstr ""
|
188 |
+
|
189 |
+
#: inc/class-tgm-plugin-activation.php:2385
|
190 |
+
msgid "WordPress Repository"
|
191 |
+
msgstr ""
|
192 |
+
|
193 |
+
#: inc/class-tgm-plugin-activation.php:2388
|
194 |
+
msgid "External Source"
|
195 |
+
msgstr ""
|
196 |
+
|
197 |
+
#: inc/class-tgm-plugin-activation.php:2391
|
198 |
+
msgid "Pre-Packaged"
|
199 |
+
msgstr ""
|
200 |
+
|
201 |
+
#: inc/class-tgm-plugin-activation.php:2408
|
202 |
+
msgid "Not Installed"
|
203 |
+
msgstr ""
|
204 |
+
|
205 |
+
#: inc/class-tgm-plugin-activation.php:2412
|
206 |
+
msgid "Installed But Not Activated"
|
207 |
+
msgstr ""
|
208 |
+
|
209 |
+
#: inc/class-tgm-plugin-activation.php:2414
|
210 |
+
msgid "Active"
|
211 |
+
msgstr ""
|
212 |
+
|
213 |
+
#: inc/class-tgm-plugin-activation.php:2420
|
214 |
+
msgid "Required Update not Available"
|
215 |
+
msgstr ""
|
216 |
+
|
217 |
+
#: inc/class-tgm-plugin-activation.php:2423
|
218 |
+
msgid "Requires Update"
|
219 |
+
msgstr ""
|
220 |
+
|
221 |
+
#: inc/class-tgm-plugin-activation.php:2426
|
222 |
+
msgid "Update recommended"
|
223 |
+
msgstr ""
|
224 |
+
|
225 |
+
#: inc/class-tgm-plugin-activation.php:2485
|
226 |
+
#. translators: 1: number of plugins.
|
227 |
+
msgid "To Install <span class=\"count\">(%s)</span>"
|
228 |
+
msgid_plural "To Install <span class=\"count\">(%s)</span>"
|
229 |
+
msgstr[0] ""
|
230 |
+
msgstr[1] ""
|
231 |
+
|
232 |
+
#: inc/class-tgm-plugin-activation.php:2489
|
233 |
+
#. translators: 1: number of plugins.
|
234 |
+
msgid "Update Available <span class=\"count\">(%s)</span>"
|
235 |
+
msgid_plural "Update Available <span class=\"count\">(%s)</span>"
|
236 |
+
msgstr[0] ""
|
237 |
+
msgstr[1] ""
|
238 |
+
|
239 |
+
#: inc/class-tgm-plugin-activation.php:2493
|
240 |
+
#. translators: 1: number of plugins.
|
241 |
+
msgid "To Activate <span class=\"count\">(%s)</span>"
|
242 |
+
msgid_plural "To Activate <span class=\"count\">(%s)</span>"
|
243 |
+
msgstr[0] ""
|
244 |
+
msgstr[1] ""
|
245 |
+
|
246 |
+
#: inc/class-tgm-plugin-activation.php:2583
|
247 |
+
msgid "Installed version:"
|
248 |
+
msgstr ""
|
249 |
+
|
250 |
+
#: inc/class-tgm-plugin-activation.php:2591
|
251 |
+
msgid "Minimum required version:"
|
252 |
+
msgstr ""
|
253 |
+
|
254 |
+
#: inc/class-tgm-plugin-activation.php:2603
|
255 |
+
msgid "Available version:"
|
256 |
+
msgstr ""
|
257 |
+
|
258 |
+
#: inc/class-tgm-plugin-activation.php:2626
|
259 |
+
msgid "No plugins to install, update or activate."
|
260 |
+
msgstr ""
|
261 |
+
|
262 |
+
#: inc/class-tgm-plugin-activation.php:2640
|
263 |
+
msgid "Plugin"
|
264 |
+
msgstr ""
|
265 |
+
|
266 |
+
#: inc/class-tgm-plugin-activation.php:2641
|
267 |
+
msgid "Source"
|
268 |
+
msgstr ""
|
269 |
+
|
270 |
+
#: inc/class-tgm-plugin-activation.php:2642
|
271 |
+
msgid "Type"
|
272 |
+
msgstr ""
|
273 |
+
|
274 |
+
#: inc/class-tgm-plugin-activation.php:2646
|
275 |
+
msgid "Version"
|
276 |
+
msgstr ""
|
277 |
+
|
278 |
+
#: inc/class-tgm-plugin-activation.php:2647
|
279 |
+
msgid "Status"
|
280 |
+
msgstr ""
|
281 |
+
|
282 |
+
#: inc/class-tgm-plugin-activation.php:2696
|
283 |
+
#. translators: %2$s: plugin name in screen reader markup
|
284 |
+
msgid "Install %2$s"
|
285 |
+
msgstr ""
|
286 |
+
|
287 |
+
#: inc/class-tgm-plugin-activation.php:2701
|
288 |
+
#. translators: %2$s: plugin name in screen reader markup
|
289 |
+
msgid "Update %2$s"
|
290 |
+
msgstr ""
|
291 |
+
|
292 |
+
#: inc/class-tgm-plugin-activation.php:2707
|
293 |
+
#. translators: %2$s: plugin name in screen reader markup
|
294 |
+
msgid "Activate %2$s"
|
295 |
+
msgstr ""
|
296 |
+
|
297 |
+
#: inc/class-tgm-plugin-activation.php:2777
|
298 |
+
msgid "Upgrade message from the plugin author:"
|
299 |
+
msgstr ""
|
300 |
+
|
301 |
+
#: inc/class-tgm-plugin-activation.php:2810
|
302 |
+
msgid "Install"
|
303 |
+
msgstr ""
|
304 |
+
|
305 |
+
#: inc/class-tgm-plugin-activation.php:2816
|
306 |
+
msgid "Update"
|
307 |
+
msgstr ""
|
308 |
+
|
309 |
+
#: inc/class-tgm-plugin-activation.php:2819
|
310 |
+
msgid "Activate"
|
311 |
+
msgstr ""
|
312 |
+
|
313 |
+
#: inc/class-tgm-plugin-activation.php:2850
|
314 |
+
msgid "No plugins were selected to be installed. No action taken."
|
315 |
+
msgstr ""
|
316 |
+
|
317 |
+
#: inc/class-tgm-plugin-activation.php:2852
|
318 |
+
msgid "No plugins were selected to be updated. No action taken."
|
319 |
+
msgstr ""
|
320 |
+
|
321 |
+
#: inc/class-tgm-plugin-activation.php:2893
|
322 |
+
msgid "No plugins are available to be installed at this time."
|
323 |
+
msgstr ""
|
324 |
+
|
325 |
+
#: inc/class-tgm-plugin-activation.php:2895
|
326 |
+
msgid "No plugins are available to be updated at this time."
|
327 |
+
msgstr ""
|
328 |
+
|
329 |
+
#: inc/class-tgm-plugin-activation.php:3001
|
330 |
+
msgid "No plugins were selected to be activated. No action taken."
|
331 |
+
msgstr ""
|
332 |
+
|
333 |
+
#: inc/class-tgm-plugin-activation.php:3027
|
334 |
+
msgid "No plugins are available to be activated at this time."
|
335 |
+
msgstr ""
|
336 |
+
|
337 |
+
#: inc/class-tgm-plugin-activation.php:3251
|
338 |
+
msgid "Plugin activation failed."
|
339 |
+
msgstr ""
|
340 |
+
|
341 |
+
#: inc/class-tgm-plugin-activation.php:3595
|
342 |
+
#. translators: 1: plugin name, 2: action number 3: total number of actions.
|
343 |
+
msgid "Updating Plugin %1$s (%2$d/%3$d)"
|
344 |
+
msgstr ""
|
345 |
+
|
346 |
+
#: inc/class-tgm-plugin-activation.php:3598
|
347 |
+
#. translators: 1: plugin name, 2: error message.
|
348 |
+
msgid "An error occurred while installing %1$s: <strong>%2$s</strong>."
|
349 |
+
msgstr ""
|
350 |
+
|
351 |
+
#: inc/class-tgm-plugin-activation.php:3600
|
352 |
+
#. translators: 1: plugin name.
|
353 |
+
msgid "The installation of %1$s failed."
|
354 |
+
msgstr ""
|
355 |
+
|
356 |
+
#: inc/class-tgm-plugin-activation.php:3604
|
357 |
+
msgid ""
|
358 |
+
"The installation and activation process is starting. This process may take "
|
359 |
+
"a while on some hosts, so please be patient."
|
360 |
+
msgstr ""
|
361 |
+
|
362 |
+
#: inc/class-tgm-plugin-activation.php:3606
|
363 |
+
#. translators: 1: plugin name.
|
364 |
+
msgid "%1$s installed and activated successfully."
|
365 |
+
msgstr ""
|
366 |
+
|
367 |
+
#: inc/class-tgm-plugin-activation.php:3606
|
368 |
+
#: inc/class-tgm-plugin-activation.php:3614
|
369 |
+
msgid "Show Details"
|
370 |
+
msgstr ""
|
371 |
+
|
372 |
+
#: inc/class-tgm-plugin-activation.php:3606
|
373 |
+
#: inc/class-tgm-plugin-activation.php:3614
|
374 |
+
msgid "Hide Details"
|
375 |
+
msgstr ""
|
376 |
+
|
377 |
+
#: inc/class-tgm-plugin-activation.php:3607
|
378 |
+
msgid "All installations and activations have been completed."
|
379 |
+
msgstr ""
|
380 |
+
|
381 |
+
#: inc/class-tgm-plugin-activation.php:3609
|
382 |
+
#. translators: 1: plugin name, 2: action number 3: total number of actions.
|
383 |
+
msgid "Installing and Activating Plugin %1$s (%2$d/%3$d)"
|
384 |
+
msgstr ""
|
385 |
+
|
386 |
+
#: inc/class-tgm-plugin-activation.php:3612
|
387 |
+
msgid ""
|
388 |
+
"The installation process is starting. This process may take a while on some "
|
389 |
+
"hosts, so please be patient."
|
390 |
+
msgstr ""
|
391 |
+
|
392 |
+
#: inc/class-tgm-plugin-activation.php:3614
|
393 |
+
#. translators: 1: plugin name.
|
394 |
+
msgid "%1$s installed successfully."
|
395 |
+
msgstr ""
|
396 |
+
|
397 |
+
#: inc/class-tgm-plugin-activation.php:3615
|
398 |
+
msgid "All installations have been completed."
|
399 |
+
msgstr ""
|
400 |
+
|
401 |
+
#: inc/class-tgm-plugin-activation.php:3617
|
402 |
+
#. translators: 1: plugin name, 2: action number 3: total number of actions.
|
403 |
+
msgid "Installing Plugin %1$s (%2$d/%3$d)"
|
404 |
+
msgstr ""
|
405 |
+
|
406 |
+
#: inc/settings.php:8
|
407 |
+
msgid "Post Type Template Settings"
|
408 |
+
msgstr ""
|
409 |
+
|
410 |
+
#: inc/settings.php:12
|
411 |
+
msgid "Settings Updated."
|
412 |
+
msgstr ""
|
413 |
+
|
414 |
+
#: inc/settings.php:29
|
415 |
+
msgid "Check to Apply Templates to Custom Post Types"
|
416 |
+
msgstr ""
|
417 |
+
|
418 |
+
#: inc/settings.php:66
|
419 |
+
msgid "Save Changes"
|
420 |
+
msgstr ""
|
421 |
+
|
422 |
+
#. Plugin Name of the plugin/theme
|
423 |
+
msgid "Page Templater For Elementor"
|
424 |
+
msgstr ""
|
425 |
+
|
426 |
+
#. Author URI of the plugin/theme
|
427 |
+
msgid "https://themeisle.com/"
|
428 |
+
msgstr ""
|
429 |
+
|
430 |
+
#. Description of the plugin/theme
|
431 |
+
msgid ""
|
432 |
+
"A helper plugin for users of Elementor Pagebuilder. Adds 2 new templates "
|
433 |
+
"for complete full width experience while using the page builder - support "
|
434 |
+
"for a number of popular themes is built-in."
|
435 |
+
msgstr ""
|
436 |
+
|
437 |
+
#. Author of the plugin/theme
|
438 |
+
msgid "ThemeIsle"
|
439 |
+
msgstr ""
|
440 |
+
|
441 |
+
#: inc/class-tgm-plugin-activation.php:1214
|
442 |
+
#: inc/class-tgm-plugin-activation.php:3041
|
443 |
+
msgctxt "plugin A *and* plugin B"
|
444 |
+
msgid "and"
|
445 |
+
msgstr ""
|
446 |
+
|
447 |
+
#: inc/class-tgm-plugin-activation.php:2435
|
448 |
+
#. translators: 1: install status, 2: update status
|
449 |
+
msgctxt "Install/Update Status"
|
450 |
+
msgid "%1$s, %2$s"
|
451 |
+
msgstr ""
|
452 |
+
|
453 |
+
#: inc/class-tgm-plugin-activation.php:2481
|
454 |
+
#. translators: 1: number of plugins.
|
455 |
+
msgctxt "plugins"
|
456 |
+
msgid "All <span class=\"count\">(%s)</span>"
|
457 |
+
msgid_plural "All <span class=\"count\">(%s)</span>"
|
458 |
+
msgstr[0] ""
|
459 |
+
msgstr[1] ""
|
460 |
+
|
461 |
+
#: inc/class-tgm-plugin-activation.php:2575
|
462 |
+
msgctxt "as in: \"version nr unknown\""
|
463 |
+
msgid "unknown"
|
464 |
+
msgstr ""
|
readme.md
CHANGED
@@ -130,6 +130,11 @@ Further details will be available near the time of the release.
|
|
130 |
2. Fullwidth no Header no Footer
|
131 |
|
132 |
## Changelog ##
|
|
|
|
|
|
|
|
|
|
|
133 |
### 1.2.6 - 2018-10-09 ###
|
134 |
|
135 |
* support for Neve
|
130 |
2. Fullwidth no Header no Footer
|
131 |
|
132 |
## Changelog ##
|
133 |
+
### 1.2.7 - 2018-11-27 ###
|
134 |
+
|
135 |
+
* Update recommended theme link
|
136 |
+
|
137 |
+
|
138 |
### 1.2.6 - 2018-10-09 ###
|
139 |
|
140 |
* support for Neve
|
readme.txt
CHANGED
@@ -130,6 +130,11 @@ Further details will be available near the time of the release.
|
|
130 |
2. Fullwidth no Header no Footer
|
131 |
|
132 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
133 |
= 1.2.6 - 2018-10-09 =
|
134 |
|
135 |
* support for Neve
|
130 |
2. Fullwidth no Header no Footer
|
131 |
|
132 |
== Changelog ==
|
133 |
+
= 1.2.7 - 2018-11-27 =
|
134 |
+
|
135 |
+
* Update recommended theme link
|
136 |
+
|
137 |
+
|
138 |
= 1.2.6 - 2018-10-09 =
|
139 |
|
140 |
* support for Neve
|
themeisle-hash.json
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"custom-posttype-class.php":"
|
1 |
+
{"custom-posttype-class.php":"3fde4cfce9b92dbabb408eb375d12ab2","elementemplater-class.php":"e035c0c012a8fc7d76e7df8af765bd74","elementemplator.php":"9a0d059ebee0e82d397b19858f027946"}
|
vendor/autoload.php
DELETED
@@ -1,7 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
// autoload.php @generated by Composer
|
4 |
-
|
5 |
-
require_once __DIR__ . '/composer' . '/autoload_real.php';
|
6 |
-
|
7 |
-
return ComposerAutoloaderInit46281624ddf3d14e02b3fb68c4c2e8fb::getLoader();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/full-width-page-templates/builders/class-elementor-full-width-templates.php
DELETED
@@ -1,121 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Class ThemeIsle\FullWidthTemplates\Elementor
|
4 |
-
*
|
5 |
-
* @package ThemeIsle\FullWidthTemplates\Elementor
|
6 |
-
* @copyright Copyright (c) 2017, Andrei Lupu
|
7 |
-
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
8 |
-
* @since 1.0.0
|
9 |
-
*/
|
10 |
-
|
11 |
-
namespace ThemeIsle\FullWidthTemplates;
|
12 |
-
|
13 |
-
class Elementor {
|
14 |
-
/**
|
15 |
-
* @var Elementor
|
16 |
-
*/
|
17 |
-
public static $instance = null;
|
18 |
-
|
19 |
-
protected function init(){
|
20 |
-
// for the blank template
|
21 |
-
add_action( 'fwpt_blank_before_content', array( $this, 'render_blank_before_content' ) );
|
22 |
-
add_action( 'fwpt_blank_content', array( $this, 'render_content' ) );
|
23 |
-
add_action( 'fwpt_blank_after_content', array( $this, 'render_blank_after_content' ) );
|
24 |
-
|
25 |
-
// for the standard template
|
26 |
-
add_action( 'fwpt_std_content', array( $this, 'render_content' ) );
|
27 |
-
add_action( 'fwpt_std_before_content', array( $this, 'render_std_before_content' ) );
|
28 |
-
add_action( 'fwpt_std_after_content', array( $this, 'render_std_after_content' ) );
|
29 |
-
|
30 |
-
// @TODO We should move this into a function to keep compat?
|
31 |
-
add_action( 'elementor_page_elements', array( $this, 'elementor_page_content' ), 20 );
|
32 |
-
}
|
33 |
-
|
34 |
-
/**
|
35 |
-
* Display the WordPress loop
|
36 |
-
*/
|
37 |
-
public function render_content() {
|
38 |
-
while ( have_posts() ) : the_post();
|
39 |
-
do_action( 'elementor_page_elements' ); // Give your elements priorities so that they hook in the right place.
|
40 |
-
endwhile;
|
41 |
-
}
|
42 |
-
|
43 |
-
/**
|
44 |
-
* Display the header of the Blank template
|
45 |
-
*/
|
46 |
-
public function render_blank_before_content() {
|
47 |
-
do_action( 'elementor_content_body_before' );
|
48 |
-
do_action( 'elementor_before_content_wrapper' );
|
49 |
-
}
|
50 |
-
|
51 |
-
/**
|
52 |
-
* Display the footer of the blank template
|
53 |
-
*/
|
54 |
-
public function render_blank_after_content() {
|
55 |
-
do_action( 'elementor_after_content_wrapper' );
|
56 |
-
do_action( 'elementor_content_body_after' );
|
57 |
-
}
|
58 |
-
|
59 |
-
/**
|
60 |
-
* Display the header of the standard template
|
61 |
-
*/
|
62 |
-
public function render_std_before_content() {
|
63 |
-
get_header();
|
64 |
-
do_action( 'elementor_before_content_wrapper' );
|
65 |
-
}
|
66 |
-
|
67 |
-
/**
|
68 |
-
* Display the footer of the standard template
|
69 |
-
*/
|
70 |
-
public function render_std_after_content() {
|
71 |
-
do_action( 'elementor_after_content_wrapper' );
|
72 |
-
get_footer();
|
73 |
-
}
|
74 |
-
|
75 |
-
// @TODO We should move this into a function to keep compat?
|
76 |
-
function elementor_page_content() {
|
77 |
-
the_content();
|
78 |
-
}
|
79 |
-
|
80 |
-
/**
|
81 |
-
* @static
|
82 |
-
* @since 1.0.0
|
83 |
-
* @access public
|
84 |
-
* @return Elementor
|
85 |
-
*/
|
86 |
-
public static function instance() {
|
87 |
-
if ( is_null( self::$instance ) ) {
|
88 |
-
self::$instance = new self();
|
89 |
-
self::$instance->init();
|
90 |
-
}
|
91 |
-
|
92 |
-
return self::$instance;
|
93 |
-
}
|
94 |
-
|
95 |
-
/**
|
96 |
-
* Throw error on object clone
|
97 |
-
*
|
98 |
-
* The whole idea of the singleton design pattern is that there is a single
|
99 |
-
* object therefore, we don't want the object to be cloned.
|
100 |
-
*
|
101 |
-
* @access public
|
102 |
-
* @since 1.0.0
|
103 |
-
* @return void
|
104 |
-
*/
|
105 |
-
public function __clone() {
|
106 |
-
// Cloning instances of the class is forbidden.
|
107 |
-
_doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin’ huh?', 'elementor-templater' ), '1.0.0' );
|
108 |
-
}
|
109 |
-
|
110 |
-
/**
|
111 |
-
* Disable unserializing of the class
|
112 |
-
*
|
113 |
-
* @access public
|
114 |
-
* @since 1.0.0
|
115 |
-
* @return void
|
116 |
-
*/
|
117 |
-
public function __wakeup() {
|
118 |
-
// Unserializing instances of the class is forbidden.
|
119 |
-
_doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin’ huh?', 'elementor-templater' ), '1.0.0' );
|
120 |
-
}
|
121 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/full-width-page-templates/class-full-width-templates.php
DELETED
@@ -1,203 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Class ThemeIsle\FullWidthTemplates
|
4 |
-
*
|
5 |
-
* @package ThemeIsle\FullWidthTemplates
|
6 |
-
* @copyright Copyright (c) 2017, Andrei Lupu
|
7 |
-
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
8 |
-
* @since 1.0.0
|
9 |
-
*/
|
10 |
-
|
11 |
-
namespace ThemeIsle;
|
12 |
-
|
13 |
-
if ( ! class_exists( '\ThemeIsle\FullWidthTemplates' ) ) {
|
14 |
-
|
15 |
-
class FullWidthTemplates {
|
16 |
-
/**
|
17 |
-
* @var FullWidthTemplates
|
18 |
-
*/
|
19 |
-
public static $instance = null;
|
20 |
-
|
21 |
-
/**
|
22 |
-
* The version of this library
|
23 |
-
* @var string
|
24 |
-
*/
|
25 |
-
public static $version = '1.0.1';
|
26 |
-
|
27 |
-
/**
|
28 |
-
* The array of templates injected.
|
29 |
-
*/
|
30 |
-
protected $templates;
|
31 |
-
|
32 |
-
/**
|
33 |
-
* Defines the library behaviour
|
34 |
-
*/
|
35 |
-
protected function init() {
|
36 |
-
// Add your templates to this array.
|
37 |
-
$this->templates = apply_filters( 'fwpt_templates_list', array(
|
38 |
-
'templates/builder-fullwidth.php' => '↔ ' . __( 'Page Builder - Full Width - Blank', 'elementor-templater' ),
|
39 |
-
'templates/builder-fullwidth-std.php' => '↔ ' . __( 'Page Builder - Full Width', 'elementor-templater' ),
|
40 |
-
) );
|
41 |
-
|
42 |
-
add_filter( 'theme_page_templates', array( $this, 'add_pages_in_dropdown' ) );
|
43 |
-
|
44 |
-
// Add a filter to the template include to determine if the page has our
|
45 |
-
// template assigned and return it's path
|
46 |
-
add_filter( 'template_include', array( $this, 'redirect_page_template' ) );
|
47 |
-
|
48 |
-
// Add a filter to the save post to inject out template into the page cache
|
49 |
-
add_filter( 'wp_insert_post_data', array( $this, 'register_project_templates' ) );
|
50 |
-
|
51 |
-
add_action( 'wp_enqueue_scripts', array( $this, 'load_theme_overwrites' ) );
|
52 |
-
|
53 |
-
$this->add_support_for_elementor();
|
54 |
-
}
|
55 |
-
|
56 |
-
/**
|
57 |
-
* Adds our template to the page dropdown
|
58 |
-
*
|
59 |
-
* @param $templates
|
60 |
-
*
|
61 |
-
* @return array
|
62 |
-
*/
|
63 |
-
public function add_pages_in_dropdown( $templates ) {
|
64 |
-
$templates = array_merge( $templates, $this->templates );
|
65 |
-
return $templates;
|
66 |
-
}
|
67 |
-
|
68 |
-
/**
|
69 |
-
* Hook into the page view and change the page template path if the selected page template
|
70 |
-
* comes from our library
|
71 |
-
*/
|
72 |
-
public function redirect_page_template( $template ) {
|
73 |
-
global $post;
|
74 |
-
|
75 |
-
if ( empty( $post ) ) {
|
76 |
-
return $template;
|
77 |
-
}
|
78 |
-
|
79 |
-
$current_template = get_post_meta( $post->ID, '_wp_page_template', true );
|
80 |
-
|
81 |
-
if ( empty( $this->templates[ $current_template ] ) ) {
|
82 |
-
return $template;
|
83 |
-
}
|
84 |
-
|
85 |
-
$file = plugin_dir_path( __FILE__ ) . $current_template;
|
86 |
-
|
87 |
-
// Just to be safe, we check if the file exist first
|
88 |
-
if ( file_exists( $file ) ) {
|
89 |
-
return $file;
|
90 |
-
}
|
91 |
-
|
92 |
-
return $template;
|
93 |
-
}
|
94 |
-
|
95 |
-
protected function guess_builder(){
|
96 |
-
$builder = 'elementor';
|
97 |
-
return $builder;
|
98 |
-
}
|
99 |
-
|
100 |
-
/**
|
101 |
-
* Adds our template to the pages cache in order to trick WordPress
|
102 |
-
* into thinking the template file exists where it doesn't really exist.
|
103 |
-
*/
|
104 |
-
public function register_project_templates( $atts ) {
|
105 |
-
|
106 |
-
// Create the key used for the themes cache
|
107 |
-
$cache_key = 'page_templates-' . md5( get_theme_root() . '/' . get_stylesheet() );
|
108 |
-
|
109 |
-
// Retrieve the cache list.
|
110 |
-
// If it doesn't exist, or it's empty prepare an array
|
111 |
-
$templates = wp_get_theme()->get_page_templates();
|
112 |
-
if ( empty( $templates ) ) {
|
113 |
-
$templates = array();
|
114 |
-
}
|
115 |
-
|
116 |
-
// New cache, therefore remove the old one
|
117 |
-
wp_cache_delete( $cache_key, 'themes' );
|
118 |
-
|
119 |
-
// Now add our template to the list of templates by merging our templates
|
120 |
-
// with the existing templates array from the cache.
|
121 |
-
$templates = array_merge( $templates, $this->templates );
|
122 |
-
|
123 |
-
// Add the modified cache to allow WordPress to pick it up for listing
|
124 |
-
// available templates
|
125 |
-
wp_cache_add( $cache_key, $templates, 'themes', 1800 );
|
126 |
-
|
127 |
-
return $atts;
|
128 |
-
}
|
129 |
-
|
130 |
-
/**
|
131 |
-
* Enqueue CSS for active theme.
|
132 |
-
*
|
133 |
-
* @since 1.0.0
|
134 |
-
* @return void
|
135 |
-
*/
|
136 |
-
public function load_theme_overwrites() {
|
137 |
-
$theme = get_option( 'template' );
|
138 |
-
$style_filename = plugin_dir_path( __FILE__ ) . 'themes/' . $theme . '/inline-style.php';
|
139 |
-
if ( file_exists( $style_filename ) ) {
|
140 |
-
include_once( $style_filename );
|
141 |
-
}
|
142 |
-
|
143 |
-
$func_filename = plugin_dir_path( __FILE__ ) . 'themes/' . $theme . '/functions.php';
|
144 |
-
if ( file_exists( $func_filename ) ) {
|
145 |
-
include_once( $func_filename );
|
146 |
-
}
|
147 |
-
}
|
148 |
-
|
149 |
-
/**
|
150 |
-
* Add support for Elementor and call the class
|
151 |
-
*/
|
152 |
-
public function add_support_for_elementor(){
|
153 |
-
|
154 |
-
// We check if the Elementor plugin has been installed / activated.
|
155 |
-
if ( defined( 'ELEMENTOR_PATH' ) && class_exists( 'Elementor\Widget_Base' ) ) {
|
156 |
-
require_once( dirname( __FILE__ ) . '/builders/class-elementor-full-width-templates.php' );
|
157 |
-
FullWidthTemplates\Elementor::instance();
|
158 |
-
}
|
159 |
-
}
|
160 |
-
|
161 |
-
/**
|
162 |
-
* @static
|
163 |
-
* @since 1.0.0
|
164 |
-
* @access public
|
165 |
-
* @return FullWidthTemplates
|
166 |
-
*/
|
167 |
-
public static function instance() {
|
168 |
-
if ( is_null( self::$instance ) ) {
|
169 |
-
self::$instance = new self();
|
170 |
-
self::$instance->init();
|
171 |
-
}
|
172 |
-
|
173 |
-
return self::$instance;
|
174 |
-
}
|
175 |
-
|
176 |
-
/**
|
177 |
-
* Throw error on object clone
|
178 |
-
*
|
179 |
-
* The whole idea of the singleton design pattern is that there is a single
|
180 |
-
* object therefore, we don't want the object to be cloned.
|
181 |
-
*
|
182 |
-
* @access public
|
183 |
-
* @since 1.0.0
|
184 |
-
* @return void
|
185 |
-
*/
|
186 |
-
public function __clone() {
|
187 |
-
// Cloning instances of the class is forbidden.
|
188 |
-
_doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin’ huh?', 'elementor-templater' ), '1.0.0' );
|
189 |
-
}
|
190 |
-
|
191 |
-
/**
|
192 |
-
* Disable unserializing of the class
|
193 |
-
*
|
194 |
-
* @access public
|
195 |
-
* @since 1.0.0
|
196 |
-
* @return void
|
197 |
-
*/
|
198 |
-
public function __wakeup() {
|
199 |
-
// Unserializing instances of the class is forbidden.
|
200 |
-
_doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin’ huh?', 'elementor-templater' ), '1.0.0' );
|
201 |
-
}
|
202 |
-
}
|
203 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/full-width-page-templates/composer.json
DELETED
@@ -1,23 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"name": "codeinwp/full-width-page-templates",
|
3 |
-
"description": "A WordPress library to create full width page templates.",
|
4 |
-
"type": "library",
|
5 |
-
"version": "1.0.2",
|
6 |
-
"license": "GPL-2.0-or-later",
|
7 |
-
"homepage": "https://github.com/Codeinwp/full-width-page-templates",
|
8 |
-
"authors": [
|
9 |
-
{
|
10 |
-
"name": "ThemeIsle team",
|
11 |
-
"email": "friends@themeisle.com",
|
12 |
-
"homepage": "https://themeisle.com"
|
13 |
-
}
|
14 |
-
],
|
15 |
-
"autoload": {
|
16 |
-
"files": [
|
17 |
-
"load.php"
|
18 |
-
]
|
19 |
-
},
|
20 |
-
"support": {
|
21 |
-
"issues": "https://github.com/Codeinwp/full-width-page-templates/issues"
|
22 |
-
}
|
23 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/full-width-page-templates/load.php
DELETED
@@ -1,11 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Loader for the ThemeIsle\FullWidthTemplates
|
4 |
-
*
|
5 |
-
* @package ThemeIsle\FullWidthTemplates
|
6 |
-
* @copyright Copyright (c) 2017, Andrei Lupu
|
7 |
-
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
8 |
-
* @since 1.0.0
|
9 |
-
*/
|
10 |
-
|
11 |
-
require_once( dirname( __FILE__ ) . '/class-full-width-templates.php' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/full-width-page-templates/templates/builder-fullwidth-std.php
DELETED
@@ -1,16 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Template Name: Full Width Standard
|
4 |
-
* Template Post Type: page
|
5 |
-
*
|
6 |
-
* A full width template inherited from the active theme
|
7 |
-
*
|
8 |
-
* @since 1.0.0
|
9 |
-
* @version 1.0.0
|
10 |
-
*/
|
11 |
-
|
12 |
-
do_action('fwpt_std_before_content');
|
13 |
-
|
14 |
-
do_action('fwpt_std_content');
|
15 |
-
|
16 |
-
do_action('fwpt_std_after_content');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/full-width-page-templates/templates/builder-fullwidth.php
DELETED
@@ -1,32 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Template Name: Full Width Blank
|
4 |
-
* Template Post Type: page
|
5 |
-
*
|
6 |
-
* Blank template with minimal HTML required for a page to run
|
7 |
-
*
|
8 |
-
* @since 1.0.0
|
9 |
-
* @version 1.0.0
|
10 |
-
*/
|
11 |
-
?><!DOCTYPE html>
|
12 |
-
<html <?php language_attributes(); ?>>
|
13 |
-
<head>
|
14 |
-
<meta charset="<?php bloginfo( 'charset' ); ?>">
|
15 |
-
<meta name="viewport" content="width=device-width, initial-scale=1">
|
16 |
-
<link rel="profile" href="http://gmpg.org/xfn/11">
|
17 |
-
<?php wp_head(); ?>
|
18 |
-
</head>
|
19 |
-
|
20 |
-
<body <?php body_class(); ?>>
|
21 |
-
<?php
|
22 |
-
do_action('fwpt_blank_before_content');
|
23 |
-
|
24 |
-
do_action('fwpt_blank_content');
|
25 |
-
|
26 |
-
do_action('fwpt_blank_after_content');
|
27 |
-
|
28 |
-
wp_footer();
|
29 |
-
?>
|
30 |
-
</body>
|
31 |
-
</html>
|
32 |
-
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/full-width-page-templates/themes/actions/inline-style.php
DELETED
@@ -1,15 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/* Support for Actions theme */
|
3 |
-
$style = '
|
4 |
-
.page-template-builder-fullwidth .main-content-area .main,
|
5 |
-
.page-template-builder-fullwidth-std .main-content-area .main {
|
6 |
-
margin: 0 auto;
|
7 |
-
width: 100%;
|
8 |
-
max-width: 100%;
|
9 |
-
}
|
10 |
-
';
|
11 |
-
if ( is_child_theme() || ! is_admin() ) {
|
12 |
-
wp_add_inline_style( 'actions-child-style', $style );
|
13 |
-
} else {
|
14 |
-
wp_add_inline_style( 'actions-style', $style );
|
15 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/full-width-page-templates/themes/ashe/inline-style.php
DELETED
@@ -1,10 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/* Support for Ashe theme */
|
3 |
-
$ashe = '
|
4 |
-
@media (min-width: 979px) {
|
5 |
-
.page-template-builder-fullwidth-std #main-nav {
|
6 |
-
overflow: hidden;
|
7 |
-
}
|
8 |
-
}
|
9 |
-
';
|
10 |
-
wp_add_inline_style( 'ashe-style', $ashe);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/full-width-page-templates/themes/astra/inline-style.php
DELETED
@@ -1,10 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/* Support for Astra theme */
|
3 |
-
$astra = '
|
4 |
-
.page-template-builder-fullwidth-std #content .ast-container {
|
5 |
-
max-width: 100%;
|
6 |
-
padding: 0;
|
7 |
-
margin: 0;
|
8 |
-
}
|
9 |
-
';
|
10 |
-
wp_add_inline_style( 'astra-theme-css', $astra );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/full-width-page-templates/themes/avant/inline-style.php
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/* Support for Avant theme */
|
3 |
-
$avant = '
|
4 |
-
.page-template-builder-fullwidth-std #page > .site-container {
|
5 |
-
padding: 0;
|
6 |
-
margin: 0;
|
7 |
-
max-width: 100%;
|
8 |
-
}
|
9 |
-
.page-template-builder-fullwidth-std .site-footer {
|
10 |
-
margin: 0;
|
11 |
-
}
|
12 |
-
';
|
13 |
-
wp_add_inline_style( 'avant-style', $avant );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/full-width-page-templates/themes/colormag/inline-style.php
DELETED
@@ -1,18 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/* Support for Colormag theme */
|
3 |
-
$colormag = '
|
4 |
-
.page-template-builder-fullwidth-std #main {
|
5 |
-
padding: 0;
|
6 |
-
}
|
7 |
-
.page-template-builder-fullwidth-std #main .inner-wrap {
|
8 |
-
margin: 0;
|
9 |
-
max-width: 100%;
|
10 |
-
}
|
11 |
-
@media (max-width: 1190px) {
|
12 |
-
.page-template-builder-fullwidth-std #main .inner-wrap {
|
13 |
-
margin: 0;
|
14 |
-
width: 100%;
|
15 |
-
}
|
16 |
-
}
|
17 |
-
';
|
18 |
-
wp_add_inline_style( 'colormag_style', $colormag );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/full-width-page-templates/themes/consulting/inline-style.php
DELETED
@@ -1,15 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/* Support for Consulting theme */
|
3 |
-
$consulting = '
|
4 |
-
.page-template-builder-fullwidth-std #site-header #intro {
|
5 |
-
display: none;
|
6 |
-
}
|
7 |
-
.page-template-builder-fullwidth-std #content {
|
8 |
-
padding: 0;
|
9 |
-
}
|
10 |
-
.page-template-builder-fullwidth-std #content #content-core {
|
11 |
-
margin: 0;
|
12 |
-
max-width: 100%;
|
13 |
-
}
|
14 |
-
';
|
15 |
-
wp_add_inline_style( 'consulting-thinkup-style', $consulting );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/full-width-page-templates/themes/edge/inline-style.php
DELETED
@@ -1,19 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/* Support for Virtue theme */
|
3 |
-
$edge = '
|
4 |
-
.page-template-builder-fullwidth-std #content {
|
5 |
-
padding: 0;
|
6 |
-
}
|
7 |
-
.page-template-builder-fullwidth-std #content .container {
|
8 |
-
max-width: 100%;
|
9 |
-
}
|
10 |
-
.page-template-builder-fullwidth-std .page-header {
|
11 |
-
display: none;
|
12 |
-
}
|
13 |
-
@media only screen and (max-width: 1023px) {
|
14 |
-
.page-template-builder-fullwidth-std #content .container {
|
15 |
-
width: 100%;
|
16 |
-
}
|
17 |
-
}
|
18 |
-
';
|
19 |
-
wp_add_inline_style( 'edge-style', $edge );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/full-width-page-templates/themes/editorial/inline-style.php
DELETED
@@ -1,17 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/* Support for Editorial theme */
|
3 |
-
$editorial = '
|
4 |
-
.page-template-builder-fullwidth-std {
|
5 |
-
display: none;
|
6 |
-
}
|
7 |
-
.page-template-builder-fullwidth-std #masthead {
|
8 |
-
margin-bottom: 0;
|
9 |
-
}
|
10 |
-
.page-template-builder-fullwidth-std #page > .site-content .mt-container {
|
11 |
-
padding: 0;
|
12 |
-
margin: 0;
|
13 |
-
width: 100%;
|
14 |
-
}
|
15 |
-
';
|
16 |
-
wp_add_inline_style( 'editorial-style', $editorial);
|
17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/full-width-page-templates/themes/enlightenment/inline-style.php
DELETED
@@ -1,11 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/* Support for Actions theme */
|
3 |
-
$style = '
|
4 |
-
.elementor-body .site {
|
5 |
-
overflow-x: visible;
|
6 |
-
}
|
7 |
-
.elementor-body .navbar-fixed-top {
|
8 |
-
z-index: 1;
|
9 |
-
}
|
10 |
-
';
|
11 |
-
wp_add_inline_style( 'elementor-frontend', $style );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/full-width-page-templates/themes/envo-business/inline-style.php
DELETED
@@ -1,9 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/* Support for Envo Business theme */
|
3 |
-
$envob = '
|
4 |
-
.page-template-builder-fullwidth-std .main-container {
|
5 |
-
padding: 0;
|
6 |
-
width: 100%;
|
7 |
-
}
|
8 |
-
';
|
9 |
-
wp_add_inline_style( 'envo-business-stylesheet', $envob );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/full-width-page-templates/themes/envy-blog/inline-style.php
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/* Support for Envy Blog theme */
|
3 |
-
$envyblog = '
|
4 |
-
.page-template-builder-fullwidth-std .container {
|
5 |
-
padding: 0;
|
6 |
-
margin: 0;
|
7 |
-
width: 100%;
|
8 |
-
}
|
9 |
-
.page-template-builder-fullwidth-std #breadcrumb {
|
10 |
-
display: none;
|
11 |
-
}
|
12 |
-
';
|
13 |
-
wp_add_inline_style( 'envy-blog-style', $envyblog );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/full-width-page-templates/themes/experon/inline-style.php
DELETED
@@ -1,14 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/* Support for Virtue theme */
|
3 |
-
$experon = '
|
4 |
-
.page-template-builder-fullwidth-std #content {
|
5 |
-
padding: 0;
|
6 |
-
}
|
7 |
-
.page-template-builder-fullwidth-std #content-core {
|
8 |
-
max-width: 100%;
|
9 |
-
}
|
10 |
-
.page-template-builder-fullwidth-std #intro {
|
11 |
-
display: none;
|
12 |
-
}
|
13 |
-
';
|
14 |
-
wp_add_inline_style( 'thinkup-style', $experon );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/full-width-page-templates/themes/flash/inline-style.php
DELETED
@@ -1,17 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/* Support for Flash theme */
|
3 |
-
$flash = '
|
4 |
-
.page-template-builder-fullwidth-std #page #flash-breadcrumbs {
|
5 |
-
display: none;
|
6 |
-
}
|
7 |
-
.page-template-builder-fullwidth-std .site-content .tg-container {
|
8 |
-
max-width: 100%;
|
9 |
-
}
|
10 |
-
@media (max-width: 1200px) {
|
11 |
-
.page-template-builder-fullwidth-std .site-content .tg-container {
|
12 |
-
padding: 0;
|
13 |
-
width: 100%;
|
14 |
-
}
|
15 |
-
}
|
16 |
-
';
|
17 |
-
wp_add_inline_style( 'flash-style', $flash );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/full-width-page-templates/themes/generatepress/inline-style.php
DELETED
@@ -1,15 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/* Support for GeneratePress theme */
|
3 |
-
$style = '
|
4 |
-
.page-template-builder-fullwidth-std #page {
|
5 |
-
margin: 0;
|
6 |
-
max-width: 100%;
|
7 |
-
}
|
8 |
-
.page-template-builder-fullwidth-std .entry-header .grid-container .entry-title {
|
9 |
-
display: none;
|
10 |
-
}
|
11 |
-
.page-template-builder-fullwidth .entry-header {
|
12 |
-
display: none;
|
13 |
-
}
|
14 |
-
';
|
15 |
-
wp_add_inline_style( 'generate-style', $style );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/full-width-page-templates/themes/genesis/inline-style.php
DELETED
@@ -1,24 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/* Support for Genesis theme */
|
3 |
-
$genesis = '
|
4 |
-
.page-template-builder-fullwidth .site-inner,
|
5 |
-
.page-template-builder-fullwidth-std .site-inner {
|
6 |
-
max-width: 100%;
|
7 |
-
width: 100%;
|
8 |
-
padding: 0;
|
9 |
-
margin: 0;
|
10 |
-
}
|
11 |
-
.page-template-builder-fullwidth .elementor-page,
|
12 |
-
.page-template-builder-fullwidth-std .elementor-page .site-inner {
|
13 |
-
padding-top: 0;
|
14 |
-
max-width: 100%;
|
15 |
-
width: 100%;
|
16 |
-
overflow: hidden;
|
17 |
-
}
|
18 |
-
@media only screen and (max-width: 860px) {
|
19 |
-
.page-template-builder-fullwidth-std .site-inner {
|
20 |
-
padding: 0;
|
21 |
-
}
|
22 |
-
}
|
23 |
-
';
|
24 |
-
wp_add_inline_style( 'elementor-frontend', $genesis );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/full-width-page-templates/themes/hestia/inline-style.php
DELETED
@@ -1,8 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/* Support for Hestia theme */
|
3 |
-
$hestia = '
|
4 |
-
.page-template-builder-fullwidth-std .header > .elementor {
|
5 |
-
padding-top: 70px;
|
6 |
-
}
|
7 |
-
';
|
8 |
-
wp_add_inline_style( 'hestia_style', $hestia);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/full-width-page-templates/themes/hitmag/inline-style.php
DELETED
@@ -1,30 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/* Support for HitMag theme */
|
3 |
-
$hitmag = '
|
4 |
-
.page-template-builder-fullwidth-std .hitmag-wrapper {
|
5 |
-
margin: 0;
|
6 |
-
max-width: 100%;
|
7 |
-
}
|
8 |
-
.page-template-builder-fullwidth-std .hitmag-wrapper .site-content {
|
9 |
-
padding: 0;
|
10 |
-
}
|
11 |
-
.page-template-builder-fullwidth-std .hitmag-wrapper .site-header .hm-container {
|
12 |
-
padding: 0 40px;
|
13 |
-
}
|
14 |
-
.page-template-builder-fullwidth-std .hitmag-wrapper .hm-container {
|
15 |
-
padding: 0;
|
16 |
-
margin: 0;
|
17 |
-
max-width: 100%;
|
18 |
-
}
|
19 |
-
.page-template-builder-fullwidth-std .hm-top-bar {
|
20 |
-
display: none;
|
21 |
-
}
|
22 |
-
.page-template-builder-fullwidth-std .site-header {
|
23 |
-
margin: 0;
|
24 |
-
}
|
25 |
-
.page-template-builder-fullwidth-std .hitmag-wrapper .site-footer {
|
26 |
-
padding: 0 40px;
|
27 |
-
background-color: #222;
|
28 |
-
}
|
29 |
-
';
|
30 |
-
wp_add_inline_style( 'hitmag-style', $hitmag );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/full-width-page-templates/themes/hueman/inline-style.php
DELETED
@@ -1,21 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/* Support for Hueman theme */
|
3 |
-
$hueman = '
|
4 |
-
.page-template-builder-fullwidth-std #header {
|
5 |
-
padding-bottom: 0;
|
6 |
-
}
|
7 |
-
.page-template-builder-fullwidth-std #wrapper #page {
|
8 |
-
padding: 0;
|
9 |
-
margin: 0;
|
10 |
-
}
|
11 |
-
.page-template-builder-fullwidth-std #wrapper #page .container-inner {
|
12 |
-
max-width: 100%;
|
13 |
-
}
|
14 |
-
.page-template-builder-fullwidth-std #wrapper #page .container-inner .main-inner {
|
15 |
-
padding: 0;
|
16 |
-
}
|
17 |
-
.page-template-builder-fullwidth-std #footer #nav-footer {
|
18 |
-
border-top: none;
|
19 |
-
}
|
20 |
-
';
|
21 |
-
wp_add_inline_style( 'hueman-main-style', $hueman );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/full-width-page-templates/themes/kale/inline-style.php
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/* Support for Kyle theme */
|
3 |
-
$kyle = '
|
4 |
-
.page-template-builder-fullwidth-std .main-wrapper .container {
|
5 |
-
padding: 0;
|
6 |
-
margin: 0;
|
7 |
-
width: 100%;
|
8 |
-
}
|
9 |
-
.page-template-builder-fullwidth-std .header > *:last-child {
|
10 |
-
margin-bottom: 0;
|
11 |
-
}
|
12 |
-
';
|
13 |
-
wp_add_inline_style( 'kale-style', $kyle );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/full-width-page-templates/themes/lodestar/inline-style.php
DELETED
@@ -1,8 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/* Support for Lodestar theme */
|
3 |
-
$lodestar = '
|
4 |
-
.page-template-builder-fullwidth-std .site-content {
|
5 |
-
padding: 0;
|
6 |
-
}
|
7 |
-
';
|
8 |
-
wp_add_inline_style( 'lodestar-style', $lodestar);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/full-width-page-templates/themes/maxstore/inline-style.php
DELETED
@@ -1,9 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/* Support for MaxStore theme */
|
3 |
-
$maxstore = '
|
4 |
-
.page-template-builder-fullwidth-std .rsrc-footer .rsrc-author-credits {
|
5 |
-
border-top: none;
|
6 |
-
}
|
7 |
-
';
|
8 |
-
wp_add_inline_style( 'maxstore-stylesheet', $maxstore);
|
9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/full-width-page-templates/themes/news-portal/inline-style.php
DELETED
@@ -1,17 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/* Support for News Portal theme */
|
3 |
-
$newsportal = '
|
4 |
-
.page-template-builder-fullwidth-std #page .site-content,
|
5 |
-
.page-template-builder-fullwidth-std #page .site-footer {
|
6 |
-
margin: 0;
|
7 |
-
}
|
8 |
-
.page-template-builder-fullwidth-std #page .site-content .mt-container {
|
9 |
-
width: 100%;
|
10 |
-
}
|
11 |
-
@media (max-width: 1200px) {
|
12 |
-
.page-template-builder-fullwidth-std #page .site-content .mt-container {
|
13 |
-
padding: 0;
|
14 |
-
}
|
15 |
-
}
|
16 |
-
';
|
17 |
-
wp_add_inline_style( 'news-portal-style', $newsportal );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/full-width-page-templates/themes/nikko-portfolio/inline-style.php
DELETED
@@ -1,8 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/* Support for Nikko Portfolio theme */
|
3 |
-
$style = '
|
4 |
-
.page-template-builder-fullwidth-std #page {
|
5 |
-
padding: 0;
|
6 |
-
}
|
7 |
-
';
|
8 |
-
wp_add_inline_style( 'nikko-portfolio-style', $style );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/full-width-page-templates/themes/oceanwp/inline-style.php
DELETED
@@ -1,8 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/* Support for OceanWP theme */
|
3 |
-
$oceanwp = '
|
4 |
-
.page-template-builder-fullwidth-std .page-header {
|
5 |
-
display: none;
|
6 |
-
}
|
7 |
-
';
|
8 |
-
wp_add_inline_style( 'oceanwp-style', $oceanwp );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/full-width-page-templates/themes/online-shop/inline-style.php
DELETED
@@ -1,19 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/* Support for Online Shop theme */
|
3 |
-
$style = '
|
4 |
-
.page-template-builder-fullwidth-std .site-header .header-wrapper {
|
5 |
-
padding-bottom: 0;
|
6 |
-
}
|
7 |
-
.page-template-builder-fullwidth-std .site-content {
|
8 |
-
width: 100%;
|
9 |
-
}
|
10 |
-
.page-template-builder-fullwidth-std .site-content .breadcrumbs {
|
11 |
-
display: none;
|
12 |
-
}
|
13 |
-
@media (max-width: 992px) {
|
14 |
-
.page-template-builder-fullwidth-std .site-content {
|
15 |
-
padding: 0;
|
16 |
-
}
|
17 |
-
}
|
18 |
-
';
|
19 |
-
wp_add_inline_style( 'online-shop-style', $style );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/full-width-page-templates/themes/poseidon/inline-style.php
DELETED
@@ -1,16 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/* Support for Poseidon theme */
|
3 |
-
$poseidon = '
|
4 |
-
.page-template-builder-fullwidth-std .site-header {
|
5 |
-
border-bottom: none;
|
6 |
-
}
|
7 |
-
.page-template-builder-fullwidth-std .site-content {
|
8 |
-
padding: 0;
|
9 |
-
margin: 0;
|
10 |
-
max-width: 100%;
|
11 |
-
}
|
12 |
-
.page-template-builder-fullwidth-std .footer-wrap {
|
13 |
-
border-top: none;
|
14 |
-
}
|
15 |
-
';
|
16 |
-
wp_add_inline_style( 'poseidon-stylesheet', $poseidon );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/full-width-page-templates/themes/primer/inline-style.php
DELETED
@@ -1,12 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/* Support for Primer theme */
|
3 |
-
$primer = '
|
4 |
-
.page-template-builder-fullwidth-std .page-title-container {
|
5 |
-
display: none;
|
6 |
-
}
|
7 |
-
.page-template-builder-fullwidth-std .site-content {
|
8 |
-
margin: 0;
|
9 |
-
max-width: 100%;
|
10 |
-
}
|
11 |
-
';
|
12 |
-
wp_add_inline_style( 'primer', $primer );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/full-width-page-templates/themes/renden/inline-style.php
DELETED
@@ -1,16 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/* Support for Renden theme */
|
3 |
-
$renden = '
|
4 |
-
.page-template-builder-fullwidth-std #site-header #intro {
|
5 |
-
display: none;
|
6 |
-
}
|
7 |
-
.page-template-builder-fullwidth-std #body-core #content {
|
8 |
-
padding: 0;
|
9 |
-
}
|
10 |
-
.page-template-builder-fullwidth-std #body-core #content #content-core {
|
11 |
-
padding: 0;
|
12 |
-
margin: 0;
|
13 |
-
max-width: 100%;
|
14 |
-
}
|
15 |
-
';
|
16 |
-
wp_add_inline_style( 'thinkup-style', $renden );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/full-width-page-templates/themes/shapely/inline-style.php
DELETED
@@ -1,21 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/* Support for Shapely theme */
|
3 |
-
$shapely = '
|
4 |
-
.page-template-builder-fullwidth-std .site .main-container .page-title-section {
|
5 |
-
display: none;
|
6 |
-
}
|
7 |
-
.page-template-builder-fullwidth-std .site .main-container .content-area {
|
8 |
-
padding: 0;
|
9 |
-
}
|
10 |
-
.page-template-builder-fullwidth-std .site .main-container .content-area .container {
|
11 |
-
padding: 0;
|
12 |
-
margin: 0;
|
13 |
-
width: 100%;
|
14 |
-
}
|
15 |
-
.page-template-builder-fullwidth-std section {
|
16 |
-
padding: 0;
|
17 |
-
position: initial;
|
18 |
-
overflow: initial;
|
19 |
-
}
|
20 |
-
';
|
21 |
-
wp_add_inline_style( 'shapely-style', $shapely );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/full-width-page-templates/themes/spacious/inline-style.php
DELETED
@@ -1,41 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/* Support for Spacious theme */
|
3 |
-
$spacious = '
|
4 |
-
.page-template-builder-fullwidth-std {
|
5 |
-
padding: 0;
|
6 |
-
}
|
7 |
-
.page-template-builder-fullwidth-std #page {
|
8 |
-
margin: 0;
|
9 |
-
max-width: 100%;
|
10 |
-
}
|
11 |
-
.page-template-builder-fullwidth-std #page #main {
|
12 |
-
padding: 0;
|
13 |
-
}
|
14 |
-
.page-template-builder-fullwidth-std #page #main .inner-wrap {
|
15 |
-
max-width: 100%;
|
16 |
-
}
|
17 |
-
@media (max-width: 1308px) {
|
18 |
-
.page-template-builder-fullwidth-std #page,
|
19 |
-
.page-template-builder-fullwidth-std #page #main .inner-wrap {
|
20 |
-
width: 100%;
|
21 |
-
}
|
22 |
-
}
|
23 |
-
@media (max-width: 768px) {
|
24 |
-
.page-template-builder-fullwidth-std .site-header #header-text-nav-container {
|
25 |
-
border-bottom: none;
|
26 |
-
}
|
27 |
-
.page-template-builder-fullwidth-std .site-header .inner-wrap {
|
28 |
-
width: 100%;
|
29 |
-
}
|
30 |
-
.page-template-builder-fullwidth-std .site-header .inner-wrap #header-text-nav-wrap {
|
31 |
-
padding: 0;
|
32 |
-
}
|
33 |
-
}
|
34 |
-
.page-template-builder-fullwidth-std .site-header .header-post-title-container {
|
35 |
-
display: none;
|
36 |
-
}
|
37 |
-
.page-template-builder-fullwidth {
|
38 |
-
padding: 0;
|
39 |
-
}
|
40 |
-
';
|
41 |
-
wp_add_inline_style( 'spacious_style', $spacious );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/full-width-page-templates/themes/storefront/inline-style.php
DELETED
@@ -1,17 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/* Support for Storefront theme */
|
3 |
-
$css = '
|
4 |
-
.page-template-builder-fullwidth-std .site-header {
|
5 |
-
border: none;
|
6 |
-
}
|
7 |
-
.page-template-builder-fullwidth-std .site-content .col-full {
|
8 |
-
max-width: 100%;
|
9 |
-
padding: 0;
|
10 |
-
margin: 0;
|
11 |
-
}
|
12 |
-
|
13 |
-
.page-template-builder-fullwidth-std .site-header {
|
14 |
-
margin-bottom: 0;
|
15 |
-
}
|
16 |
-
';
|
17 |
-
wp_add_inline_style( 'storefront-style', $css );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/full-width-page-templates/themes/sydney/inline-style.php
DELETED
@@ -1,19 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/* Support for Sydney theme */
|
3 |
-
$sydney = '
|
4 |
-
.page-template-builder-fullwidth-std .page-wrap,
|
5 |
-
.page-template-builder-fullwidth-std .page-wrap .content-wrapper {
|
6 |
-
padding: 0;
|
7 |
-
margin: 0;
|
8 |
-
width: 100%
|
9 |
-
}
|
10 |
-
.page-template-builder-fullwidth-std.elementor-page .page-wrap .container {
|
11 |
-
width: 100%;
|
12 |
-
overflow: hidden;
|
13 |
-
}
|
14 |
-
.page-template-builder-fullwidth-std .page .entry-header,
|
15 |
-
.page-template-builder-fullwidth-std .page .entry-footer {
|
16 |
-
display: none;
|
17 |
-
}
|
18 |
-
';
|
19 |
-
wp_add_inline_style( 'sydney-style', $sydney );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/full-width-page-templates/themes/total/inline-style.php
DELETED
@@ -1,8 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/* Support for Total theme */
|
3 |
-
$total = '
|
4 |
-
.page-template-builder-fullwidth-std #ht-colophon {
|
5 |
-
margin: 0;
|
6 |
-
}
|
7 |
-
';
|
8 |
-
wp_add_inline_style( 'total-style', $total );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/full-width-page-templates/themes/twentyfifteen/inline-style.php
DELETED
@@ -1,23 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/* Support for Twenty Fifteen theme */
|
3 |
-
$style = '
|
4 |
-
body.page-template-builder-fullwidth:before {
|
5 |
-
display: none;
|
6 |
-
}
|
7 |
-
.page-template-builder-fullwidth .site,
|
8 |
-
.page-template-builder-fullwidth-std .site {
|
9 |
-
max-width: 100%;
|
10 |
-
margin: 0;
|
11 |
-
}
|
12 |
-
.page-template-builder-fullwidth .elementor-page {
|
13 |
-
overflow: hidden;
|
14 |
-
}
|
15 |
-
body.page-template-builder-fullwidth-std:before {
|
16 |
-
width: 29.4118%;
|
17 |
-
}
|
18 |
-
.page-template-builder-fullwidth-std .site-footer {
|
19 |
-
width: 71%;
|
20 |
-
margin-left: 29%;
|
21 |
-
}
|
22 |
-
';
|
23 |
-
wp_add_inline_style( 'twentyfifteen-style', $style );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/full-width-page-templates/themes/twentyfourteen/inline-style.php
DELETED
@@ -1,14 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/* Support for Twenty Fourteen theme */
|
3 |
-
$style = '
|
4 |
-
.page-template-builder-fullwidth-std #page {
|
5 |
-
max-width: 100%;
|
6 |
-
}
|
7 |
-
.page-template-builder-fullwidth-std .site::before {
|
8 |
-
display: none;
|
9 |
-
}
|
10 |
-
.page-template-builder-fullwidth-std .site-header {
|
11 |
-
max-width: 100%;
|
12 |
-
}
|
13 |
-
';
|
14 |
-
wp_add_inline_style( 'twentyfourteen-style', $style );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/full-width-page-templates/themes/twentyseventeen/inline-style.php
DELETED
@@ -1,15 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/* Support for Twenty Seventeen theme */
|
3 |
-
$style = '.elementor-editor-active .site-content {
|
4 |
-
padding: 2.5em 0 0;
|
5 |
-
}
|
6 |
-
.elementor-page .site-content {
|
7 |
-
padding: 0;
|
8 |
-
}
|
9 |
-
.elementor-page.page:not(.home) #content {
|
10 |
-
padding-bottom: 0;
|
11 |
-
}
|
12 |
-
.elementor-page .site-footer {
|
13 |
-
margin-top: 0;
|
14 |
-
}';
|
15 |
-
wp_add_inline_style( 'twentyseventeen-style', $style );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/full-width-page-templates/themes/twentysixteen/inline-style.php
DELETED
@@ -1,59 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/* Support for Twenty Sixteen theme */
|
3 |
-
$style = '
|
4 |
-
body.page-template-builder-fullwidth.elementor-page,
|
5 |
-
body.page-template-builder-fullwidth-std.elementor-page {
|
6 |
-
background: transparent;
|
7 |
-
}
|
8 |
-
.page-template-builder-fullwidth-std .site {
|
9 |
-
margin: 0;
|
10 |
-
}
|
11 |
-
.page-template-builder-fullwidth .elementor-page,
|
12 |
-
.page-template-builder-fullwidth-std .elementor-page {
|
13 |
-
overflow: hidden;
|
14 |
-
}
|
15 |
-
.page-template-builder-fullwidth .full-width,
|
16 |
-
.page-template-builder-fullwidth-std .full-width {
|
17 |
-
width: 100%;
|
18 |
-
}
|
19 |
-
.page-template-builder-fullwidth .site-inner,
|
20 |
-
.page-template-builder-fullwidth-std .site-inner {
|
21 |
-
max-width: 100%;
|
22 |
-
}
|
23 |
-
.page-template-builder-fullwidth .site-content,
|
24 |
-
.page-template-builder-fullwidth-std .site-content {
|
25 |
-
padding: 0;
|
26 |
-
}
|
27 |
-
.page-template-builder-fullwidth header#masthead,
|
28 |
-
.page-template-builder-fullwidth footer#colophon,
|
29 |
-
.page-template-builder-fullwidth-std header#masthead,
|
30 |
-
.page-template-builder-fullwidth-std footer#colophon {
|
31 |
-
margin: 0 auto;
|
32 |
-
max-width: 1320px;
|
33 |
-
}
|
34 |
-
.page-template-builder-fullwidth .entry-content,
|
35 |
-
.page-template-builder-fullwidth-std .entry-content {
|
36 |
-
margin-right: auto;
|
37 |
-
margin-left: auto;
|
38 |
-
}
|
39 |
-
@media screen and (min-width: 56.875em) {
|
40 |
-
.admin-bar .anchor-menu {
|
41 |
-
top: 20px;
|
42 |
-
}
|
43 |
-
.admin-bar .anchor-menu-fixed.anchor-menu, .admin-bar .anchor-menu-fixed.elementor-widget-wp-widget-nav_menu {
|
44 |
-
top: 54px !important;
|
45 |
-
}
|
46 |
-
.page-template-builder-fullwidth .entry-content,
|
47 |
-
.page-template-builder-fullwidth-std .entry-content {
|
48 |
-
margin-right: auto;
|
49 |
-
margin-left: auto;
|
50 |
-
}
|
51 |
-
}
|
52 |
-
@media screen and (min-width: 44.375em) {
|
53 |
-
.page-template-builder-fullwidth .entry-content,
|
54 |
-
.page-template-builder-fullwidth-std .entry-content {
|
55 |
-
margin-right: auto;;
|
56 |
-
}
|
57 |
-
}
|
58 |
-
';
|
59 |
-
wp_add_inline_style( 'twentysixteen-style', $style );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/full-width-page-templates/themes/twentythirteen/inline-style.php
DELETED
@@ -1,17 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/* Support for Twenty Thirteen theme */
|
3 |
-
$thirteen = '
|
4 |
-
.page-template-builder-fullwidth-std .site {
|
5 |
-
max-width: 100%;
|
6 |
-
border: none;
|
7 |
-
}
|
8 |
-
.page-template-builder-fullwidth-std .site-header {
|
9 |
-
max-width: 100%;
|
10 |
-
background-size: 3200px auto;
|
11 |
-
}
|
12 |
-
.page-template-builder-fullwidth-std .navbar {
|
13 |
-
max-width: 100%;
|
14 |
-
width: 100%;
|
15 |
-
}
|
16 |
-
';
|
17 |
-
wp_add_inline_style( 'twentythirteen-style', $thirteen );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/full-width-page-templates/themes/twentytwelve/inline-style.php
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/* Support for Twenty Twelve theme */
|
3 |
-
$style = '
|
4 |
-
.page-template-builder-fullwidth-std #page {
|
5 |
-
padding: 0;
|
6 |
-
margin: 0;
|
7 |
-
max-width: 100%;
|
8 |
-
}
|
9 |
-
.page-template-builder-fullwidth-std #page .site-header {
|
10 |
-
padding: 0 2.857142857rem;
|
11 |
-
}
|
12 |
-
';
|
13 |
-
wp_add_inline_style( 'twentytwelve-style', $style );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/full-width-page-templates/themes/vantage/inline-style.php
DELETED
@@ -1,15 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/* Support for Vantage theme */
|
3 |
-
$vantage = '
|
4 |
-
.page-template-builder-fullwidth-std #main {
|
5 |
-
padding: 0;
|
6 |
-
max-width: 100%;
|
7 |
-
}
|
8 |
-
|
9 |
-
.page-template-builder-fullwidth-std.responsive.layout-full #main .full-container {
|
10 |
-
max-width: 100%;
|
11 |
-
margin-left: auto;
|
12 |
-
margin-right: auto;
|
13 |
-
}
|
14 |
-
';
|
15 |
-
wp_add_inline_style( 'vantage-style', $vantage );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/full-width-page-templates/themes/virtue/inline-style.php
DELETED
@@ -1,14 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/* Support for Virtue theme */
|
3 |
-
$virtue = '.page-template-builder-fullwidth .headerclass,
|
4 |
-
.page-template-builder-fullwidth .footerclass {
|
5 |
-
display: none;
|
6 |
-
}
|
7 |
-
.page-template-builder-fullwidth .contentclass,
|
8 |
-
.page-template-builder-fullwidth-std .contentclass {
|
9 |
-
padding-bottom: 0;
|
10 |
-
}
|
11 |
-
.page-template-builder-fullwidth .contentclass {
|
12 |
-
padding-top: 0;
|
13 |
-
}';
|
14 |
-
wp_add_inline_style( 'kadence_theme', $virtue );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/full-width-page-templates/themes/vogue/inline-style.php
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/* Support for Vogue theme */
|
3 |
-
$vogue = '
|
4 |
-
.page-template-builder-fullwidth-std #page > .site-container {
|
5 |
-
padding: 0;
|
6 |
-
margin: 0;
|
7 |
-
max-width: 100%;
|
8 |
-
}
|
9 |
-
.page-template-builder-fullwidth-std .site-footer-bottom-bar {
|
10 |
-
display: none;
|
11 |
-
}
|
12 |
-
';
|
13 |
-
wp_add_inline_style( 'vogue-style', $vogue );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/full-width-page-templates/themes/vt-blogging/inline-style.php
DELETED
@@ -1,10 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/* Support for VT Blogging theme */
|
3 |
-
$vtb = '
|
4 |
-
.page-template-builder-fullwidth-std .site-content {
|
5 |
-
padding: 0;
|
6 |
-
margin: 0;
|
7 |
-
width: 100%;
|
8 |
-
}
|
9 |
-
';
|
10 |
-
wp_add_inline_style( 'vt-blogging-style', $vtb );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/full-width-page-templates/themes/writee/inline-style.php
DELETED
@@ -1,9 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/* Support for Writee theme */
|
3 |
-
$writee = '
|
4 |
-
.page-template-builder-fullwidth-std p,
|
5 |
-
.page-template-builder-fullwidth p {
|
6 |
-
margin: 0;
|
7 |
-
}
|
8 |
-
';
|
9 |
-
wp_add_inline_style( 'WRT-style', $writee );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/full-width-page-templates/themes/zerif-lite/functions.php
DELETED
@@ -1,9 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* adds the closing <header> tag
|
5 |
-
*/
|
6 |
-
function zerif_close_header() {
|
7 |
-
echo '</header> <!-- / END HOME SECTION -->';
|
8 |
-
}
|
9 |
-
add_action( 'fwpt_std_content', 'zerif_close_header' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/full-width-page-templates/themes/zerif-lite/inline-style.php
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/* Support for Zerif Lite theme */
|
3 |
-
$style = '
|
4 |
-
.page-template-builder-fullwidth {
|
5 |
-
overflow: hidden;
|
6 |
-
}
|
7 |
-
@media (min-width: 768px) {
|
8 |
-
.page-template-builder-fullwidth-std .header > .elementor {
|
9 |
-
padding-top: 76px;
|
10 |
-
}
|
11 |
-
}
|
12 |
-
';
|
13 |
-
wp_add_inline_style( 'zerif_style', $style );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/themeisle-sdk/LICENSE
DELETED
@@ -1,674 +0,0 @@
|
|
1 |
-
GNU GENERAL PUBLIC LICENSE
|
2 |
-
Version 3, 29 June 2007
|
3 |
-
|
4 |
-
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
5 |
-
Everyone is permitted to copy and distribute verbatim copies
|
6 |
-
of this license document, but changing it is not allowed.
|
7 |
-
|
8 |
-
Preamble
|
9 |
-
|
10 |
-
The GNU General Public License is a free, copyleft license for
|
11 |
-
software and other kinds of works.
|
12 |
-
|
13 |
-
The licenses for most software and other practical works are designed
|
14 |
-
to take away your freedom to share and change the works. By contrast,
|
15 |
-
the GNU General Public License is intended to guarantee your freedom to
|
16 |
-
share and change all versions of a program--to make sure it remains free
|
17 |
-
software for all its users. We, the Free Software Foundation, use the
|
18 |
-
GNU General Public License for most of our software; it applies also to
|
19 |
-
any other work released this way by its authors. You can apply it to
|
20 |
-
your programs, too.
|
21 |
-
|
22 |
-
When we speak of free software, we are referring to freedom, not
|
23 |
-
price. Our General Public Licenses are designed to make sure that you
|
24 |
-
have the freedom to distribute copies of free software (and charge for
|
25 |
-
them if you wish), that you receive source code or can get it if you
|
26 |
-
want it, that you can change the software or use pieces of it in new
|
27 |
-
free programs, and that you know you can do these things.
|
28 |
-
|
29 |
-
To protect your rights, we need to prevent others from denying you
|
30 |
-
these rights or asking you to surrender the rights. Therefore, you have
|
31 |
-
certain responsibilities if you distribute copies of the software, or if
|
32 |
-
you modify it: responsibilities to respect the freedom of others.
|
33 |
-
|
34 |
-
For example, if you distribute copies of such a program, whether
|
35 |
-
gratis or for a fee, you must pass on to the recipients the same
|
36 |
-
freedoms that you received. You must make sure that they, too, receive
|
37 |
-
or can get the source code. And you must show them these terms so they
|
38 |
-
know their rights.
|
39 |
-
|
40 |
-
Developers that use the GNU GPL protect your rights with two steps:
|
41 |
-
(1) assert copyright on the software, and (2) offer you this License
|
42 |
-
giving you legal permission to copy, distribute and/or modify it.
|
43 |
-
|
44 |
-
For the developers' and authors' protection, the GPL clearly explains
|
45 |
-
that there is no warranty for this free software. For both users' and
|
46 |
-
authors' sake, the GPL requires that modified versions be marked as
|
47 |
-
changed, so that their problems will not be attributed erroneously to
|
48 |
-
authors of previous versions.
|
49 |
-
|
50 |
-
Some devices are designed to deny users access to install or run
|
51 |
-
modified versions of the software inside them, although the manufacturer
|
52 |
-
can do so. This is fundamentally incompatible with the aim of
|
53 |
-
protecting users' freedom to change the software. The systematic
|
54 |
-
pattern of such abuse occurs in the area of products for individuals to
|
55 |
-
use, which is precisely where it is most unacceptable. Therefore, we
|
56 |
-
have designed this version of the GPL to prohibit the practice for those
|
57 |
-
products. If such problems arise substantially in other domains, we
|
58 |
-
stand ready to extend this provision to those domains in future versions
|
59 |
-
of the GPL, as needed to protect the freedom of users.
|
60 |
-
|
61 |
-
Finally, every program is threatened constantly by software patents.
|
62 |
-
States should not allow patents to restrict development and use of
|
63 |
-
software on general-purpose computers, but in those that do, we wish to
|
64 |
-
avoid the special danger that patents applied to a free program could
|
65 |
-
make it effectively proprietary. To prevent this, the GPL assures that
|
66 |
-
patents cannot be used to render the program non-free.
|
67 |
-
|
68 |
-
The precise terms and conditions for copying, distribution and
|
69 |
-
modification follow.
|
70 |
-
|
71 |
-
TERMS AND CONDITIONS
|
72 |
-
|
73 |
-
0. Definitions.
|
74 |
-
|
75 |
-
"This License" refers to version 3 of the GNU General Public License.
|
76 |
-
|
77 |
-
"Copyright" also means copyright-like laws that apply to other kinds of
|
78 |
-
works, such as semiconductor masks.
|
79 |
-
|
80 |
-
"The Program" refers to any copyrightable work licensed under this
|
81 |
-
License. Each licensee is addressed as "you". "Licensees" and
|
82 |
-
"recipients" may be individuals or organizations.
|
83 |
-
|
84 |
-
To "modify" a work means to copy from or adapt all or part of the work
|
85 |
-
in a fashion requiring copyright permission, other than the making of an
|
86 |
-
exact copy. The resulting work is called a "modified version" of the
|
87 |
-
earlier work or a work "based on" the earlier work.
|
88 |
-
|
89 |
-
A "covered work" means either the unmodified Program or a work based
|
90 |
-
on the Program.
|
91 |
-
|
92 |
-
To "propagate" a work means to do anything with it that, without
|
93 |
-
permission, would make you directly or secondarily liable for
|
94 |
-
infringement under applicable copyright law, except executing it on a
|
95 |
-
computer or modifying a private copy. Propagation includes copying,
|
96 |
-
distribution (with or without modification), making available to the
|
97 |
-
public, and in some countries other activities as well.
|
98 |
-
|
99 |
-
To "convey" a work means any kind of propagation that enables other
|
100 |
-
parties to make or receive copies. Mere interaction with a user through
|
101 |
-
a computer network, with no transfer of a copy, is not conveying.
|
102 |
-
|
103 |
-
An interactive user interface displays "Appropriate Legal Notices"
|
104 |
-
to the extent that it includes a convenient and prominently visible
|
105 |
-
feature that (1) displays an appropriate copyright notice, and (2)
|
106 |
-
tells the user that there is no warranty for the work (except to the
|
107 |
-
extent that warranties are provided), that licensees may convey the
|
108 |
-
work under this License, and how to view a copy of this License. If
|
109 |
-
the interface presents a list of user commands or options, such as a
|
110 |
-
menu, a prominent item in the list meets this criterion.
|
111 |
-
|
112 |
-
1. Source Code.
|
113 |
-
|
114 |
-
The "source code" for a work means the preferred form of the work
|
115 |
-
for making modifications to it. "Object code" means any non-source
|
116 |
-
form of a work.
|
117 |
-
|
118 |
-
A "Standard Interface" means an interface that either is an official
|
119 |
-
standard defined by a recognized standards body, or, in the case of
|
120 |
-
interfaces specified for a particular programming language, one that
|
121 |
-
is widely used among developers working in that language.
|
122 |
-
|
123 |
-
The "System Libraries" of an executable work include anything, other
|
124 |
-
than the work as a whole, that (a) is included in the normal form of
|
125 |
-
packaging a Major Component, but which is not part of that Major
|
126 |
-
Component, and (b) serves only to enable use of the work with that
|
127 |
-
Major Component, or to implement a Standard Interface for which an
|
128 |
-
implementation is available to the public in source code form. A
|
129 |
-
"Major Component", in this context, means a major essential component
|
130 |
-
(kernel, window system, and so on) of the specific operating system
|
131 |
-
(if any) on which the executable work runs, or a compiler used to
|
132 |
-
produce the work, or an object code interpreter used to run it.
|
133 |
-
|
134 |
-
The "Corresponding Source" for a work in object code form means all
|
135 |
-
the source code needed to generate, install, and (for an executable
|
136 |
-
work) run the object code and to modify the work, including scripts to
|
137 |
-
control those activities. However, it does not include the work's
|
138 |
-
System Libraries, or general-purpose tools or generally available free
|
139 |
-
programs which are used unmodified in performing those activities but
|
140 |
-
which are not part of the work. For example, Corresponding Source
|
141 |
-
includes interface definition files associated with source files for
|
142 |
-
the work, and the source code for shared libraries and dynamically
|
143 |
-
linked subprograms that the work is specifically designed to require,
|
144 |
-
such as by intimate data communication or control flow between those
|
145 |
-
subprograms and other parts of the work.
|
146 |
-
|
147 |
-
The Corresponding Source need not include anything that users
|
148 |
-
can regenerate automatically from other parts of the Corresponding
|
149 |
-
Source.
|
150 |
-
|
151 |
-
The Corresponding Source for a work in source code form is that
|
152 |
-
same work.
|
153 |
-
|
154 |
-
2. Basic Permissions.
|
155 |
-
|
156 |
-
All rights granted under this License are granted for the term of
|
157 |
-
copyright on the Program, and are irrevocable provided the stated
|
158 |
-
conditions are met. This License explicitly affirms your unlimited
|
159 |
-
permission to run the unmodified Program. The output from running a
|
160 |
-
covered work is covered by this License only if the output, given its
|
161 |
-
content, constitutes a covered work. This License acknowledges your
|
162 |
-
rights of fair use or other equivalent, as provided by copyright law.
|
163 |
-
|
164 |
-
You may make, run and propagate covered works that you do not
|
165 |
-
convey, without conditions so long as your license otherwise remains
|
166 |
-
in force. You may convey covered works to others for the sole purpose
|
167 |
-
of having them make modifications exclusively for you, or provide you
|
168 |
-
with facilities for running those works, provided that you comply with
|
169 |
-
the terms of this License in conveying all material for which you do
|
170 |
-
not control copyright. Those thus making or running the covered works
|
171 |
-
for you must do so exclusively on your behalf, under your direction
|
172 |
-
and control, on terms that prohibit them from making any copies of
|
173 |
-
your copyrighted material outside their relationship with you.
|
174 |
-
|
175 |
-
Conveying under any other circumstances is permitted solely under
|
176 |
-
the conditions stated below. Sublicensing is not allowed; section 10
|
177 |
-
makes it unnecessary.
|
178 |
-
|
179 |
-
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
180 |
-
|
181 |
-
No covered work shall be deemed part of an effective technological
|
182 |
-
measure under any applicable law fulfilling obligations under article
|
183 |
-
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
184 |
-
similar laws prohibiting or restricting circumvention of such
|
185 |
-
measures.
|
186 |
-
|
187 |
-
When you convey a covered work, you waive any legal power to forbid
|
188 |
-
circumvention of technological measures to the extent such circumvention
|
189 |
-
is effected by exercising rights under this License with respect to
|
190 |
-
the covered work, and you disclaim any intention to limit operation or
|
191 |
-
modification of the work as a means of enforcing, against the work's
|
192 |
-
users, your or third parties' legal rights to forbid circumvention of
|
193 |
-
technological measures.
|
194 |
-
|
195 |
-
4. Conveying Verbatim Copies.
|
196 |
-
|
197 |
-
You may convey verbatim copies of the Program's source code as you
|
198 |
-
receive it, in any medium, provided that you conspicuously and
|
199 |
-
appropriately publish on each copy an appropriate copyright notice;
|
200 |
-
keep intact all notices stating that this License and any
|
201 |
-
non-permissive terms added in accord with section 7 apply to the code;
|
202 |
-
keep intact all notices of the absence of any warranty; and give all
|
203 |
-
recipients a copy of this License along with the Program.
|
204 |
-
|
205 |
-
You may charge any price or no price for each copy that you convey,
|
206 |
-
and you may offer support or warranty protection for a fee.
|
207 |
-
|
208 |
-
5. Conveying Modified Source Versions.
|
209 |
-
|
210 |
-
You may convey a work based on the Program, or the modifications to
|
211 |
-
produce it from the Program, in the form of source code under the
|
212 |
-
terms of section 4, provided that you also meet all of these conditions:
|
213 |
-
|
214 |
-
a) The work must carry prominent notices stating that you modified
|
215 |
-
it, and giving a relevant date.
|
216 |
-
|
217 |
-
b) The work must carry prominent notices stating that it is
|
218 |
-
released under this License and any conditions added under section
|
219 |
-
7. This requirement modifies the requirement in section 4 to
|
220 |
-
"keep intact all notices".
|
221 |
-
|
222 |
-
c) You must license the entire work, as a whole, under this
|
223 |
-
License to anyone who comes into possession of a copy. This
|
224 |
-
License will therefore apply, along with any applicable section 7
|
225 |
-
additional terms, to the whole of the work, and all its parts,
|
226 |
-
regardless of how they are packaged. This License gives no
|
227 |
-
permission to license the work in any other way, but it does not
|
228 |
-
invalidate such permission if you have separately received it.
|
229 |
-
|
230 |
-
d) If the work has interactive user interfaces, each must display
|
231 |
-
Appropriate Legal Notices; however, if the Program has interactive
|
232 |
-
interfaces that do not display Appropriate Legal Notices, your
|
233 |
-
work need not make them do so.
|
234 |
-
|
235 |
-
A compilation of a covered work with other separate and independent
|
236 |
-
works, which are not by their nature extensions of the covered work,
|
237 |
-
and which are not combined with it such as to form a larger program,
|
238 |
-
in or on a volume of a storage or distribution medium, is called an
|
239 |
-
"aggregate" if the compilation and its resulting copyright are not
|
240 |
-
used to limit the access or legal rights of the compilation's users
|
241 |
-
beyond what the individual works permit. Inclusion of a covered work
|
242 |
-
in an aggregate does not cause this License to apply to the other
|
243 |
-
parts of the aggregate.
|
244 |
-
|
245 |
-
6. Conveying Non-Source Forms.
|
246 |
-
|
247 |
-
You may convey a covered work in object code form under the terms
|
248 |
-
of sections 4 and 5, provided that you also convey the
|
249 |
-
machine-readable Corresponding Source under the terms of this License,
|
250 |
-
in one of these ways:
|
251 |
-
|
252 |
-
a) Convey the object code in, or embodied in, a physical product
|
253 |
-
(including a physical distribution medium), accompanied by the
|
254 |
-
Corresponding Source fixed on a durable physical medium
|
255 |
-
customarily used for software interchange.
|
256 |
-
|
257 |
-
b) Convey the object code in, or embodied in, a physical product
|
258 |
-
(including a physical distribution medium), accompanied by a
|
259 |
-
written offer, valid for at least three years and valid for as
|
260 |
-
long as you offer spare parts or customer support for that product
|
261 |
-
model, to give anyone who possesses the object code either (1) a
|
262 |
-
copy of the Corresponding Source for all the software in the
|
263 |
-
product that is covered by this License, on a durable physical
|
264 |
-
medium customarily used for software interchange, for a price no
|
265 |
-
more than your reasonable cost of physically performing this
|
266 |
-
conveying of source, or (2) access to copy the
|
267 |
-
Corresponding Source from a network server at no charge.
|
268 |
-
|
269 |
-
c) Convey individual copies of the object code with a copy of the
|
270 |
-
written offer to provide the Corresponding Source. This
|
271 |
-
alternative is allowed only occasionally and noncommercially, and
|
272 |
-
only if you received the object code with such an offer, in accord
|
273 |
-
with subsection 6b.
|
274 |
-
|
275 |
-
d) Convey the object code by offering access from a designated
|
276 |
-
place (gratis or for a charge), and offer equivalent access to the
|
277 |
-
Corresponding Source in the same way through the same place at no
|
278 |
-
further charge. You need not require recipients to copy the
|
279 |
-
Corresponding Source along with the object code. If the place to
|
280 |
-
copy the object code is a network server, the Corresponding Source
|
281 |
-
may be on a different server (operated by you or a third party)
|
282 |
-
that supports equivalent copying facilities, provided you maintain
|
283 |
-
clear directions next to the object code saying where to find the
|
284 |
-
Corresponding Source. Regardless of what server hosts the
|
285 |
-
Corresponding Source, you remain obligated to ensure that it is
|
286 |
-
available for as long as needed to satisfy these requirements.
|
287 |
-
|
288 |
-
e) Convey the object code using peer-to-peer transmission, provided
|
289 |
-
you inform other peers where the object code and Corresponding
|
290 |
-
Source of the work are being offered to the general public at no
|
291 |
-
charge under subsection 6d.
|
292 |
-
|
293 |
-
A separable portion of the object code, whose source code is excluded
|
294 |
-
from the Corresponding Source as a System Library, need not be
|
295 |
-
included in conveying the object code work.
|
296 |
-
|
297 |
-
A "User Product" is either (1) a "consumer product", which means any
|
298 |
-
tangible personal property which is normally used for personal, family,
|
299 |
-
or household purposes, or (2) anything designed or sold for incorporation
|
300 |
-
into a dwelling. In determining whether a product is a consumer product,
|
301 |
-
doubtful cases shall be resolved in favor of coverage. For a particular
|
302 |
-
product received by a particular user, "normally used" refers to a
|
303 |
-
typical or common use of that class of product, regardless of the status
|
304 |
-
of the particular user or of the way in which the particular user
|
305 |
-
actually uses, or expects or is expected to use, the product. A product
|
306 |
-
is a consumer product regardless of whether the product has substantial
|
307 |
-
commercial, industrial or non-consumer uses, unless such uses represent
|
308 |
-
the only significant mode of use of the product.
|
309 |
-
|
310 |
-
"Installation Information" for a User Product means any methods,
|
311 |
-
procedures, authorization keys, or other information required to install
|
312 |
-
and execute modified versions of a covered work in that User Product from
|
313 |
-
a modified version of its Corresponding Source. The information must
|
314 |
-
suffice to ensure that the continued functioning of the modified object
|
315 |
-
code is in no case prevented or interfered with solely because
|
316 |
-
modification has been made.
|
317 |
-
|
318 |
-
If you convey an object code work under this section in, or with, or
|
319 |
-
specifically for use in, a User Product, and the conveying occurs as
|
320 |
-
part of a transaction in which the right of possession and use of the
|
321 |
-
User Product is transferred to the recipient in perpetuity or for a
|
322 |
-
fixed term (regardless of how the transaction is characterized), the
|
323 |
-
Corresponding Source conveyed under this section must be accompanied
|
324 |
-
by the Installation Information. But this requirement does not apply
|
325 |
-
if neither you nor any third party retains the ability to install
|
326 |
-
modified object code on the User Product (for example, the work has
|
327 |
-
been installed in ROM).
|
328 |
-
|
329 |
-
The requirement to provide Installation Information does not include a
|
330 |
-
requirement to continue to provide support service, warranty, or updates
|
331 |
-
for a work that has been modified or installed by the recipient, or for
|
332 |
-
the User Product in which it has been modified or installed. Access to a
|
333 |
-
network may be denied when the modification itself materially and
|
334 |
-
adversely affects the operation of the network or violates the rules and
|
335 |
-
protocols for communication across the network.
|
336 |
-
|
337 |
-
Corresponding Source conveyed, and Installation Information provided,
|
338 |
-
in accord with this section must be in a format that is publicly
|
339 |
-
documented (and with an implementation available to the public in
|
340 |
-
source code form), and must require no special password or key for
|
341 |
-
unpacking, reading or copying.
|
342 |
-
|
343 |
-
7. Additional Terms.
|
344 |
-
|
345 |
-
"Additional permissions" are terms that supplement the terms of this
|
346 |
-
License by making exceptions from one or more of its conditions.
|
347 |
-
Additional permissions that are applicable to the entire Program shall
|
348 |
-
be treated as though they were included in this License, to the extent
|
349 |
-
that they are valid under applicable law. If additional permissions
|
350 |
-
apply only to part of the Program, that part may be used separately
|
351 |
-
under those permissions, but the entire Program remains governed by
|
352 |
-
this License without regard to the additional permissions.
|
353 |
-
|
354 |
-
When you convey a copy of a covered work, you may at your option
|
355 |
-
remove any additional permissions from that copy, or from any part of
|
356 |
-
it. (Additional permissions may be written to require their own
|
357 |
-
removal in certain cases when you modify the work.) You may place
|
358 |
-
additional permissions on material, added by you to a covered work,
|
359 |
-
for which you have or can give appropriate copyright permission.
|
360 |
-
|
361 |
-
Notwithstanding any other provision of this License, for material you
|
362 |
-
add to a covered work, you may (if authorized by the copyright holders of
|
363 |
-
that material) supplement the terms of this License with terms:
|
364 |
-
|
365 |
-
a) Disclaiming warranty or limiting liability differently from the
|
366 |
-
terms of sections 15 and 16 of this License; or
|
367 |
-
|
368 |
-
b) Requiring preservation of specified reasonable legal notices or
|
369 |
-
author attributions in that material or in the Appropriate Legal
|
370 |
-
Notices displayed by works containing it; or
|
371 |
-
|
372 |
-
c) Prohibiting misrepresentation of the origin of that material, or
|
373 |
-
requiring that modified versions of such material be marked in
|
374 |
-
reasonable ways as different from the original version; or
|
375 |
-
|
376 |
-
d) Limiting the use for publicity purposes of names of licensors or
|
377 |
-
authors of the material; or
|
378 |
-
|
379 |
-
e) Declining to grant rights under trademark law for use of some
|
380 |
-
trade names, trademarks, or service marks; or
|
381 |
-
|
382 |
-
f) Requiring indemnification of licensors and authors of that
|
383 |
-
material by anyone who conveys the material (or modified versions of
|
384 |
-
it) with contractual assumptions of liability to the recipient, for
|
385 |
-
any liability that these contractual assumptions directly impose on
|
386 |
-
those licensors and authors.
|
387 |
-
|
388 |
-
All other non-permissive additional terms are considered "further
|
389 |
-
restrictions" within the meaning of section 10. If the Program as you
|
390 |
-
received it, or any part of it, contains a notice stating that it is
|
391 |
-
governed by this License along with a term that is a further
|
392 |
-
restriction, you may remove that term. If a license document contains
|
393 |
-
a further restriction but permits relicensing or conveying under this
|
394 |
-
License, you may add to a covered work material governed by the terms
|
395 |
-
of that license document, provided that the further restriction does
|
396 |
-
not survive such relicensing or conveying.
|
397 |
-
|
398 |
-
If you add terms to a covered work in accord with this section, you
|
399 |
-
must place, in the relevant source files, a statement of the
|
400 |
-
additional terms that apply to those files, or a notice indicating
|
401 |
-
where to find the applicable terms.
|
402 |
-
|
403 |
-
Additional terms, permissive or non-permissive, may be stated in the
|
404 |
-
form of a separately written license, or stated as exceptions;
|
405 |
-
the above requirements apply either way.
|
406 |
-
|
407 |
-
8. Termination.
|
408 |
-
|
409 |
-
You may not propagate or modify a covered work except as expressly
|
410 |
-
provided under this License. Any attempt otherwise to propagate or
|
411 |
-
modify it is void, and will automatically terminate your rights under
|
412 |
-
this License (including any patent licenses granted under the third
|
413 |
-
paragraph of section 11).
|
414 |
-
|
415 |
-
However, if you cease all violation of this License, then your
|
416 |
-
license from a particular copyright holder is reinstated (a)
|
417 |
-
provisionally, unless and until the copyright holder explicitly and
|
418 |
-
finally terminates your license, and (b) permanently, if the copyright
|
419 |
-
holder fails to notify you of the violation by some reasonable means
|
420 |
-
prior to 60 days after the cessation.
|
421 |
-
|
422 |
-
Moreover, your license from a particular copyright holder is
|
423 |
-
reinstated permanently if the copyright holder notifies you of the
|
424 |
-
violation by some reasonable means, this is the first time you have
|
425 |
-
received notice of violation of this License (for any work) from that
|
426 |
-
copyright holder, and you cure the violation prior to 30 days after
|
427 |
-
your receipt of the notice.
|
428 |
-
|
429 |
-
Termination of your rights under this section does not terminate the
|
430 |
-
licenses of parties who have received copies or rights from you under
|
431 |
-
this License. If your rights have been terminated and not permanently
|
432 |
-
reinstated, you do not qualify to receive new licenses for the same
|
433 |
-
material under section 10.
|
434 |
-
|
435 |
-
9. Acceptance Not Required for Having Copies.
|
436 |
-
|
437 |
-
You are not required to accept this License in order to receive or
|
438 |
-
run a copy of the Program. Ancillary propagation of a covered work
|
439 |
-
occurring solely as a consequence of using peer-to-peer transmission
|
440 |
-
to receive a copy likewise does not require acceptance. However,
|
441 |
-
nothing other than this License grants you permission to propagate or
|
442 |
-
modify any covered work. These actions infringe copyright if you do
|
443 |
-
not accept this License. Therefore, by modifying or propagating a
|
444 |
-
covered work, you indicate your acceptance of this License to do so.
|
445 |
-
|
446 |
-
10. Automatic Licensing of Downstream Recipients.
|
447 |
-
|
448 |
-
Each time you convey a covered work, the recipient automatically
|
449 |
-
receives a license from the original licensors, to run, modify and
|
450 |
-
propagate that work, subject to this License. You are not responsible
|
451 |
-
for enforcing compliance by third parties with this License.
|
452 |
-
|
453 |
-
An "entity transaction" is a transaction transferring control of an
|
454 |
-
organization, or substantially all assets of one, or subdividing an
|
455 |
-
organization, or merging organizations. If propagation of a covered
|
456 |
-
work results from an entity transaction, each party to that
|
457 |
-
transaction who receives a copy of the work also receives whatever
|
458 |
-
licenses to the work the party's predecessor in interest had or could
|
459 |
-
give under the previous paragraph, plus a right to possession of the
|
460 |
-
Corresponding Source of the work from the predecessor in interest, if
|
461 |
-
the predecessor has it or can get it with reasonable efforts.
|
462 |
-
|
463 |
-
You may not impose any further restrictions on the exercise of the
|
464 |
-
rights granted or affirmed under this License. For example, you may
|
465 |
-
not impose a license fee, royalty, or other charge for exercise of
|
466 |
-
rights granted under this License, and you may not initiate litigation
|
467 |
-
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
468 |
-
any patent claim is infringed by making, using, selling, offering for
|
469 |
-
sale, or importing the Program or any portion of it.
|
470 |
-
|
471 |
-
11. Patents.
|
472 |
-
|
473 |
-
A "contributor" is a copyright holder who authorizes use under this
|
474 |
-
License of the Program or a work on which the Program is based. The
|
475 |
-
work thus licensed is called the contributor's "contributor version".
|
476 |
-
|
477 |
-
A contributor's "essential patent claims" are all patent claims
|
478 |
-
owned or controlled by the contributor, whether already acquired or
|
479 |
-
hereafter acquired, that would be infringed by some manner, permitted
|
480 |
-
by this License, of making, using, or selling its contributor version,
|
481 |
-
but do not include claims that would be infringed only as a
|
482 |
-
consequence of further modification of the contributor version. For
|
483 |
-
purposes of this definition, "control" includes the right to grant
|
484 |
-
patent sublicenses in a manner consistent with the requirements of
|
485 |
-
this License.
|
486 |
-
|
487 |
-
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
488 |
-
patent license under the contributor's essential patent claims, to
|
489 |
-
make, use, sell, offer for sale, import and otherwise run, modify and
|
490 |
-
propagate the contents of its contributor version.
|
491 |
-
|
492 |
-
In the following three paragraphs, a "patent license" is any express
|
493 |
-
agreement or commitment, however denominated, not to enforce a patent
|
494 |
-
(such as an express permission to practice a patent or covenant not to
|
495 |
-
sue for patent infringement). To "grant" such a patent license to a
|
496 |
-
party means to make such an agreement or commitment not to enforce a
|
497 |
-
patent against the party.
|
498 |
-
|
499 |
-
If you convey a covered work, knowingly relying on a patent license,
|
500 |
-
and the Corresponding Source of the work is not available for anyone
|
501 |
-
to copy, free of charge and under the terms of this License, through a
|
502 |
-
publicly available network server or other readily accessible means,
|
503 |
-
then you must either (1) cause the Corresponding Source to be so
|
504 |
-
available, or (2) arrange to deprive yourself of the benefit of the
|
505 |
-
patent license for this particular work, or (3) arrange, in a manner
|
506 |
-
consistent with the requirements of this License, to extend the patent
|
507 |
-
license to downstream recipients. "Knowingly relying" means you have
|
508 |
-
actual knowledge that, but for the patent license, your conveying the
|
509 |
-
covered work in a country, or your recipient's use of the covered work
|
510 |
-
in a country, would infringe one or more identifiable patents in that
|
511 |
-
country that you have reason to believe are valid.
|
512 |
-
|
513 |
-
If, pursuant to or in connection with a single transaction or
|
514 |
-
arrangement, you convey, or propagate by procuring conveyance of, a
|
515 |
-
covered work, and grant a patent license to some of the parties
|
516 |
-
receiving the covered work authorizing them to use, propagate, modify
|
517 |
-
or convey a specific copy of the covered work, then the patent license
|
518 |
-
you grant is automatically extended to all recipients of the covered
|
519 |
-
work and works based on it.
|
520 |
-
|
521 |
-
A patent license is "discriminatory" if it does not include within
|
522 |
-
the scope of its coverage, prohibits the exercise of, or is
|
523 |
-
conditioned on the non-exercise of one or more of the rights that are
|
524 |
-
specifically granted under this License. You may not convey a covered
|
525 |
-
work if you are a party to an arrangement with a third party that is
|
526 |
-
in the business of distributing software, under which you make payment
|
527 |
-
to the third party based on the extent of your activity of conveying
|
528 |
-
the work, and under which the third party grants, to any of the
|
529 |
-
parties who would receive the covered work from you, a discriminatory
|
530 |
-
patent license (a) in connection with copies of the covered work
|
531 |
-
conveyed by you (or copies made from those copies), or (b) primarily
|
532 |
-
for and in connection with specific products or compilations that
|
533 |
-
contain the covered work, unless you entered into that arrangement,
|
534 |
-
or that patent license was granted, prior to 28 March 2007.
|
535 |
-
|
536 |
-
Nothing in this License shall be construed as excluding or limiting
|
537 |
-
any implied license or other defenses to infringement that may
|
538 |
-
otherwise be available to you under applicable patent law.
|
539 |
-
|
540 |
-
12. No Surrender of Others' Freedom.
|
541 |
-
|
542 |
-
If conditions are imposed on you (whether by court order, agreement or
|
543 |
-
otherwise) that contradict the conditions of this License, they do not
|
544 |
-
excuse you from the conditions of this License. If you cannot convey a
|
545 |
-
covered work so as to satisfy simultaneously your obligations under this
|
546 |
-
License and any other pertinent obligations, then as a consequence you may
|
547 |
-
not convey it at all. For example, if you agree to terms that obligate you
|
548 |
-
to collect a royalty for further conveying from those to whom you convey
|
549 |
-
the Program, the only way you could satisfy both those terms and this
|
550 |
-
License would be to refrain entirely from conveying the Program.
|
551 |
-
|
552 |
-
13. Use with the GNU Affero General Public License.
|
553 |
-
|
554 |
-
Notwithstanding any other provision of this License, you have
|
555 |
-
permission to link or combine any covered work with a work licensed
|
556 |
-
under version 3 of the GNU Affero General Public License into a single
|
557 |
-
combined work, and to convey the resulting work. The terms of this
|
558 |
-
License will continue to apply to the part which is the covered work,
|
559 |
-
but the special requirements of the GNU Affero General Public License,
|
560 |
-
section 13, concerning interaction through a network will apply to the
|
561 |
-
combination as such.
|
562 |
-
|
563 |
-
14. Revised Versions of this License.
|
564 |
-
|
565 |
-
The Free Software Foundation may publish revised and/or new versions of
|
566 |
-
the GNU General Public License from time to time. Such new versions will
|
567 |
-
be similar in spirit to the present version, but may differ in detail to
|
568 |
-
address new problems or concerns.
|
569 |
-
|
570 |
-
Each version is given a distinguishing version number. If the
|
571 |
-
Program specifies that a certain numbered version of the GNU General
|
572 |
-
Public License "or any later version" applies to it, you have the
|
573 |
-
option of following the terms and conditions either of that numbered
|
574 |
-
version or of any later version published by the Free Software
|
575 |
-
Foundation. If the Program does not specify a version number of the
|
576 |
-
GNU General Public License, you may choose any version ever published
|
577 |
-
by the Free Software Foundation.
|
578 |
-
|
579 |
-
If the Program specifies that a proxy can decide which future
|
580 |
-
versions of the GNU General Public License can be used, that proxy's
|
581 |
-
public statement of acceptance of a version permanently authorizes you
|
582 |
-
to choose that version for the Program.
|
583 |
-
|
584 |
-
Later license versions may give you additional or different
|
585 |
-
permissions. However, no additional obligations are imposed on any
|
586 |
-
author or copyright holder as a result of your choosing to follow a
|
587 |
-
later version.
|
588 |
-
|
589 |
-
15. Disclaimer of Warranty.
|
590 |
-
|
591 |
-
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
592 |
-
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
593 |
-
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
594 |
-
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
595 |
-
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
596 |
-
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
597 |
-
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
598 |
-
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
599 |
-
|
600 |
-
16. Limitation of Liability.
|
601 |
-
|
602 |
-
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
603 |
-
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
604 |
-
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
605 |
-
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
606 |
-
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
607 |
-
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
608 |
-
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
609 |
-
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
610 |
-
SUCH DAMAGES.
|
611 |
-
|
612 |
-
17. Interpretation of Sections 15 and 16.
|
613 |
-
|
614 |
-
If the disclaimer of warranty and limitation of liability provided
|
615 |
-
above cannot be given local legal effect according to their terms,
|
616 |
-
reviewing courts shall apply local law that most closely approximates
|
617 |
-
an absolute waiver of all civil liability in connection with the
|
618 |
-
Program, unless a warranty or assumption of liability accompanies a
|
619 |
-
copy of the Program in return for a fee.
|
620 |
-
|
621 |
-
END OF TERMS AND CONDITIONS
|
622 |
-
|
623 |
-
How to Apply These Terms to Your New Programs
|
624 |
-
|
625 |
-
If you develop a new program, and you want it to be of the greatest
|
626 |
-
possible use to the public, the best way to achieve this is to make it
|
627 |
-
free software which everyone can redistribute and change under these terms.
|
628 |
-
|
629 |
-
To do so, attach the following notices to the program. It is safest
|
630 |
-
to attach them to the start of each source file to most effectively
|
631 |
-
state the exclusion of warranty; and each file should have at least
|
632 |
-
the "copyright" line and a pointer to where the full notice is found.
|
633 |
-
|
634 |
-
{one line to give the program's name and a brief idea of what it does.}
|
635 |
-
Copyright (C) {year} {name of author}
|
636 |
-
|
637 |
-
This program is free software: you can redistribute it and/or modify
|
638 |
-
it under the terms of the GNU General Public License as published by
|
639 |
-
the Free Software Foundation, either version 3 of the License, or
|
640 |
-
(at your option) any later version.
|
641 |
-
|
642 |
-
This program is distributed in the hope that it will be useful,
|
643 |
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
644 |
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
645 |
-
GNU General Public License for more details.
|
646 |
-
|
647 |
-
You should have received a copy of the GNU General Public License
|
648 |
-
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
649 |
-
|
650 |
-
Also add information on how to contact you by electronic and paper mail.
|
651 |
-
|
652 |
-
If the program does terminal interaction, make it output a short
|
653 |
-
notice like this when it starts in an interactive mode:
|
654 |
-
|
655 |
-
{project} Copyright (C) {year} {fullname}
|
656 |
-
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
657 |
-
This is free software, and you are welcome to redistribute it
|
658 |
-
under certain conditions; type `show c' for details.
|
659 |
-
|
660 |
-
The hypothetical commands `show w' and `show c' should show the appropriate
|
661 |
-
parts of the General Public License. Of course, your program's commands
|
662 |
-
might be different; for a GUI interface, you would use an "about box".
|
663 |
-
|
664 |
-
You should also get your employer (if you work as a programmer) or school,
|
665 |
-
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
666 |
-
For more information on this, and how to apply and follow the GNU GPL, see
|
667 |
-
<http://www.gnu.org/licenses/>.
|
668 |
-
|
669 |
-
The GNU General Public License does not permit incorporating your program
|
670 |
-
into proprietary programs. If your program is a subroutine library, you
|
671 |
-
may consider it more useful to permit linking proprietary applications with
|
672 |
-
the library. If this is what you want to do, use the GNU Lesser General
|
673 |
-
Public License instead of this License. But first, please read
|
674 |
-
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-endpoints.php
DELETED
@@ -1,312 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The class that exposes endpoints.
|
4 |
-
*
|
5 |
-
* @package ThemeIsleSDK
|
6 |
-
* @subpackage Endpoints
|
7 |
-
* @copyright Copyright (c) 2017, Marius Cristea
|
8 |
-
* @license http://opensource.org/licenses/gpl-3.0.php GNU Public License
|
9 |
-
* @since 1.0.0
|
10 |
-
*/
|
11 |
-
// Exit if accessed directly.
|
12 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
13 |
-
exit;
|
14 |
-
}
|
15 |
-
if ( ! class_exists( 'ThemeIsle_SDK_Endpoints' ) ) :
|
16 |
-
/**
|
17 |
-
* Expose endpoints for ThemeIsle SDK.
|
18 |
-
*/
|
19 |
-
final class ThemeIsle_SDK_Endpoints {
|
20 |
-
|
21 |
-
const SDK_ENDPOINT = 'themeisle-sdk';
|
22 |
-
const SDK_ENDPOINT_VERSION = 1;
|
23 |
-
|
24 |
-
const HASH_FILE = 'themeisle-hash.json';
|
25 |
-
|
26 |
-
// if true, the endpoint will expect a product slug and will return the value only for that.
|
27 |
-
const PRODUCT_SPECIFIC = false;
|
28 |
-
|
29 |
-
/**
|
30 |
-
* @var ThemeIsle_SDK_Product $products Array of Themeisle Product.
|
31 |
-
*/
|
32 |
-
static protected $products = array();
|
33 |
-
|
34 |
-
/**
|
35 |
-
* ThemeIsle_SDK_Endpoints constructor.
|
36 |
-
*
|
37 |
-
* @param ThemeIsle_SDK_Product $product_object Product Object.
|
38 |
-
*/
|
39 |
-
public function __construct( $product_object ) {
|
40 |
-
if ( $product_object instanceof ThemeIsle_SDK_Product ) {
|
41 |
-
self::$products[] = $product_object;
|
42 |
-
}
|
43 |
-
$this->setup_endpoints();
|
44 |
-
}
|
45 |
-
|
46 |
-
/**
|
47 |
-
* Setup endpoints.
|
48 |
-
*/
|
49 |
-
private function setup_endpoints() {
|
50 |
-
global $wp_version;
|
51 |
-
if ( version_compare( $wp_version, '4.4', '<' ) ) {
|
52 |
-
// no REST support.
|
53 |
-
return;
|
54 |
-
}
|
55 |
-
|
56 |
-
$this->setup_rest();
|
57 |
-
}
|
58 |
-
|
59 |
-
/**
|
60 |
-
* Setup REST endpoints.
|
61 |
-
*/
|
62 |
-
private function setup_rest() {
|
63 |
-
add_action( 'rest_api_init', array( $this, 'rest_register' ) );
|
64 |
-
}
|
65 |
-
|
66 |
-
/**
|
67 |
-
* Registers the endpoints
|
68 |
-
*/
|
69 |
-
function rest_register() {
|
70 |
-
register_rest_route(
|
71 |
-
self::SDK_ENDPOINT . '/v' . self::SDK_ENDPOINT_VERSION,
|
72 |
-
'/checksum/' . ( self::PRODUCT_SPECIFIC ? '(?P<slug>.*)/' : '' ),
|
73 |
-
array(
|
74 |
-
'methods' => 'GET',
|
75 |
-
'callback' => array( $this, 'checksum' ),
|
76 |
-
)
|
77 |
-
);
|
78 |
-
}
|
79 |
-
|
80 |
-
/**
|
81 |
-
* The checksum endpoint.
|
82 |
-
*
|
83 |
-
* @param WP_REST_Request $data the request.
|
84 |
-
*
|
85 |
-
* @return WP_REST_Response Response or the error
|
86 |
-
*/
|
87 |
-
function checksum( WP_REST_Request $data ) {
|
88 |
-
$products = self::$products;
|
89 |
-
if ( self::PRODUCT_SPECIFIC ) {
|
90 |
-
$params = $this->validate_params( $data, array( 'slug' ) );
|
91 |
-
foreach ( self::$products as $product ) {
|
92 |
-
if ( $params['slug'] === $product->get_slug() ) {
|
93 |
-
$products = array( $product );
|
94 |
-
break;
|
95 |
-
}
|
96 |
-
}
|
97 |
-
}
|
98 |
-
$response = array();
|
99 |
-
$custom_css = $this->has_custom_css();
|
100 |
-
if ( is_bool( $custom_css ) ) {
|
101 |
-
$response['custom_css'] = $custom_css;
|
102 |
-
}
|
103 |
-
|
104 |
-
$response['child_theme'] = $this->get_theme_properties();
|
105 |
-
|
106 |
-
foreach ( $products as $product ) {
|
107 |
-
$files = array();
|
108 |
-
switch ( $product->get_type() ) {
|
109 |
-
case 'plugin':
|
110 |
-
$files = array();
|
111 |
-
break;
|
112 |
-
case 'theme':
|
113 |
-
$files = array( 'style.css', 'functions.php' );
|
114 |
-
break;
|
115 |
-
}
|
116 |
-
|
117 |
-
$error = '';
|
118 |
-
|
119 |
-
// if any element in the $files array contains a '/', this would imply recursion is required.
|
120 |
-
$diff = $this->generate_diff( $product, $files, array_reduce( $files, array( $this, 'is_recursion_required' ), false ) );
|
121 |
-
if ( is_wp_error( $diff ) ) {
|
122 |
-
$error = $diff->get_error_message();
|
123 |
-
$diff = array();
|
124 |
-
}
|
125 |
-
|
126 |
-
$response['products'][] = array(
|
127 |
-
'slug' => $product->get_slug(),
|
128 |
-
'version' => $product->get_version(),
|
129 |
-
'diffs' => $diff,
|
130 |
-
'error' => $error,
|
131 |
-
);
|
132 |
-
}
|
133 |
-
|
134 |
-
return new WP_REST_Response( array( 'checksum' => $response ) );
|
135 |
-
}
|
136 |
-
|
137 |
-
/**
|
138 |
-
* Get the current theme properties.
|
139 |
-
*
|
140 |
-
* @return array Properties of the current theme.
|
141 |
-
*/
|
142 |
-
function get_theme_properties() {
|
143 |
-
if ( ! is_child_theme() ) {
|
144 |
-
return false;
|
145 |
-
}
|
146 |
-
|
147 |
-
$properties = array();
|
148 |
-
$theme = wp_get_theme();
|
149 |
-
// @codingStandardsIgnoreStart
|
150 |
-
$properties['name'] = $theme->Name;
|
151 |
-
// @codingStandardsIgnoreEnd
|
152 |
-
|
153 |
-
// get the files in the child theme.
|
154 |
-
require_once( ABSPATH . 'wp-admin/includes/file.php' );
|
155 |
-
WP_Filesystem();
|
156 |
-
global $wp_filesystem;
|
157 |
-
$path = str_replace( ABSPATH, $wp_filesystem->abspath(), get_stylesheet_directory() );
|
158 |
-
$list = $wp_filesystem->dirlist( $path, false, false );
|
159 |
-
if ( $list ) {
|
160 |
-
$list = array_keys( self::flatten_dirlist( $list ) );
|
161 |
-
$properties['files'] = $list;
|
162 |
-
}
|
163 |
-
return $properties;
|
164 |
-
}
|
165 |
-
|
166 |
-
/**
|
167 |
-
* Check if custom css has been added to the theme.
|
168 |
-
*
|
169 |
-
* @return bool Whether custom css has been added to the theme.
|
170 |
-
*/
|
171 |
-
private function has_custom_css() {
|
172 |
-
$query = new WP_Query(
|
173 |
-
array(
|
174 |
-
'post_type' => 'custom_css',
|
175 |
-
'post_status' => 'publish',
|
176 |
-
'numberposts' => 1,
|
177 |
-
'update_post_meta_cache' => false,
|
178 |
-
'update_post_term_cache' => false,
|
179 |
-
)
|
180 |
-
);
|
181 |
-
|
182 |
-
if ( $query->have_posts() ) {
|
183 |
-
$query->the_post();
|
184 |
-
$content = get_the_content();
|
185 |
-
// if the content contains a colon, a CSS rule has been added.
|
186 |
-
return strpos( $content, ':' ) === false ? false : true;
|
187 |
-
}
|
188 |
-
return false;
|
189 |
-
}
|
190 |
-
|
191 |
-
/**
|
192 |
-
* Check if recursion needs to be enabled on the WP_Filesystem by reducing the array of files to a boolean.
|
193 |
-
*
|
194 |
-
* @param string $carry Value of the previous iteration.
|
195 |
-
* @param string $item Value of the current iteration.
|
196 |
-
*
|
197 |
-
* @return bool Whether to recurse or not.
|
198 |
-
*/
|
199 |
-
function is_recursion_required( $carry, $item ) {
|
200 |
-
if ( ! $carry ) {
|
201 |
-
return ( strpos( $item, '/' ) !== false );
|
202 |
-
}
|
203 |
-
return $carry;
|
204 |
-
}
|
205 |
-
|
206 |
-
/**
|
207 |
-
* Generate the diff of the files.
|
208 |
-
*
|
209 |
-
* @param ThemeIsle_SDK_Product $product Themeisle Product.
|
210 |
-
* @param array $files Array of files.
|
211 |
-
* @param bool $recurse Whether to recurse or not.
|
212 |
-
*
|
213 |
-
* @return string
|
214 |
-
*/
|
215 |
-
private function generate_diff( $product, $files, $recurse = false ) {
|
216 |
-
require_once( ABSPATH . 'wp-admin/includes/file.php' );
|
217 |
-
WP_Filesystem();
|
218 |
-
global $wp_filesystem;
|
219 |
-
|
220 |
-
$diff = array();
|
221 |
-
$path = str_replace( ABSPATH, $wp_filesystem->abspath(), plugin_dir_path( $product->get_basefile() ) );
|
222 |
-
$list = $wp_filesystem->dirlist( $path, false, $recurse );
|
223 |
-
// nothing found.
|
224 |
-
if ( ! $list ) {
|
225 |
-
return $diff;
|
226 |
-
}
|
227 |
-
$list = array_keys( self::flatten_dirlist( $list ) );
|
228 |
-
|
229 |
-
// now let's get the valid files that actually exist.
|
230 |
-
if ( empty( $files ) ) {
|
231 |
-
$files = $list;
|
232 |
-
} else {
|
233 |
-
$files = array_intersect( $files, $list );
|
234 |
-
}
|
235 |
-
|
236 |
-
// fetch the calculated hashes.
|
237 |
-
if ( ! $wp_filesystem->is_readable( $path . '/' . self::HASH_FILE ) ) {
|
238 |
-
return new WP_Error( 'themeisle_sdk_hash_not_found', sprintf( '%s not found', self::HASH_FILE ) );
|
239 |
-
}
|
240 |
-
|
241 |
-
$hashes = json_decode( $wp_filesystem->get_contents( $path . '/' . self::HASH_FILE ), true );
|
242 |
-
ksort( $hashes );
|
243 |
-
|
244 |
-
$diff = array();
|
245 |
-
foreach ( $files as $file ) {
|
246 |
-
// file does not exist in the hashes.
|
247 |
-
if ( ! array_key_exists( $file, $hashes ) ) {
|
248 |
-
continue;
|
249 |
-
}
|
250 |
-
$new = md5( $wp_filesystem->get_contents( $path . $file ) );
|
251 |
-
$old = $hashes[ $file ];
|
252 |
-
|
253 |
-
// same hash, bail.
|
254 |
-
if ( $new === $old ) {
|
255 |
-
continue;
|
256 |
-
}
|
257 |
-
$diff[] = $file;
|
258 |
-
}
|
259 |
-
return $diff;
|
260 |
-
}
|
261 |
-
|
262 |
-
/**
|
263 |
-
* Flatten the results of WP_Filesystem::dirlist() for iterating over.
|
264 |
-
*
|
265 |
-
* @access private
|
266 |
-
*
|
267 |
-
* @param array $nested_files Array of files as returned by WP_Filesystem::dirlist().
|
268 |
-
* @param string $path Relative path to prepend to child nodes. Optional.
|
269 |
-
* @return array $files A flattened array of the $nested_files specified.
|
270 |
-
*/
|
271 |
-
private static function flatten_dirlist( $nested_files, $path = '' ) {
|
272 |
-
$files = array();
|
273 |
-
foreach ( $nested_files as $name => $details ) {
|
274 |
-
$files[ $path . $name ] = $details;
|
275 |
-
// Append children recursively
|
276 |
-
if ( ! empty( $details['files'] ) ) {
|
277 |
-
$children = self::flatten_dirlist( $details['files'], $path . $name . '/' );
|
278 |
-
// Merge keeping possible numeric keys, which array_merge() will reindex from 0..n
|
279 |
-
$files = $files + $children;
|
280 |
-
}
|
281 |
-
}
|
282 |
-
return $files;
|
283 |
-
}
|
284 |
-
|
285 |
-
/**
|
286 |
-
* Validates the parameters to the API
|
287 |
-
*
|
288 |
-
* @param WP_REST_Request $data the request.
|
289 |
-
* @param array $params the parameters to validate.
|
290 |
-
*
|
291 |
-
* @return array of parameter name=>value
|
292 |
-
*/
|
293 |
-
private function validate_params( WP_REST_Request $data, $params ) {
|
294 |
-
$collect = array();
|
295 |
-
foreach ( $params as $param ) {
|
296 |
-
$value = sanitize_text_field( $data[ $param ] );
|
297 |
-
if ( empty( $value ) ) {
|
298 |
-
return new WP_Error(
|
299 |
-
'themeisle_' . $param . '_invalid', sprintf( 'Invalid %', $param ), array(
|
300 |
-
'status' => 403,
|
301 |
-
)
|
302 |
-
);
|
303 |
-
} else {
|
304 |
-
$collect[ $param ] = $value;
|
305 |
-
}
|
306 |
-
}
|
307 |
-
|
308 |
-
return $collect;
|
309 |
-
}
|
310 |
-
|
311 |
-
}
|
312 |
-
endif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback-deactivate.php
DELETED
@@ -1,556 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The deactivate feedback model class for ThemeIsle SDK
|
4 |
-
*
|
5 |
-
* @package ThemeIsleSDK
|
6 |
-
* @subpackage Feedback
|
7 |
-
* @copyright Copyright (c) 2017, Marius Cristea
|
8 |
-
* @license http://opensource.org/licenses/gpl-3.0.php GNU Public License
|
9 |
-
* @since 1.0.0
|
10 |
-
*/
|
11 |
-
// Exit if accessed directly.
|
12 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
13 |
-
exit;
|
14 |
-
}
|
15 |
-
if ( ! class_exists( 'ThemeIsle_SDK_Feedback_Deactivate' ) ) :
|
16 |
-
/**
|
17 |
-
* Deactivate feedback model for ThemeIsle SDK.
|
18 |
-
*/
|
19 |
-
class ThemeIsle_SDK_Feedback_Deactivate extends ThemeIsle_SDK_Feedback {
|
20 |
-
|
21 |
-
/**
|
22 |
-
* @var array $options_plugin The main options list for plugins.
|
23 |
-
*/
|
24 |
-
private $options_plugin = array(
|
25 |
-
'I found a better plugin' => array(
|
26 |
-
'id' => 3,
|
27 |
-
'type' => 'text',
|
28 |
-
'placeholder' => 'What\'s the plugin\'s name?',
|
29 |
-
),
|
30 |
-
'I could not get the plugin to work' => array(
|
31 |
-
'id' => 4,
|
32 |
-
),
|
33 |
-
'I no longer need the plugin' => array(
|
34 |
-
'id' => 5,
|
35 |
-
'type' => 'textarea',
|
36 |
-
'placeholder' => 'If you could improve one thing about our product, what would it be?',
|
37 |
-
),
|
38 |
-
'It\'s a temporary deactivation. I\'m just debugging an issue.' => array(
|
39 |
-
'id' => 6,
|
40 |
-
),
|
41 |
-
);
|
42 |
-
|
43 |
-
/**
|
44 |
-
* @var array $options_theme The main options list for themes.
|
45 |
-
*/
|
46 |
-
private $options_theme = array(
|
47 |
-
'I don\'t know how to make it look like demo' => array(
|
48 |
-
'id' => 7,
|
49 |
-
),
|
50 |
-
'It lacks options' => array(
|
51 |
-
'id' => 8,
|
52 |
-
),
|
53 |
-
'Is not working with a plugin that I need' => array(
|
54 |
-
'id' => 9,
|
55 |
-
'type' => 'text',
|
56 |
-
'placeholder' => 'What is the name of the plugin',
|
57 |
-
),
|
58 |
-
'I want to try a new design, I don\'t like {theme} style' => array(
|
59 |
-
'id' => 10,
|
60 |
-
),
|
61 |
-
);
|
62 |
-
|
63 |
-
/**
|
64 |
-
* @var array $other The other option
|
65 |
-
*/
|
66 |
-
private $other = array(
|
67 |
-
'Other' => array(
|
68 |
-
'id' => 999,
|
69 |
-
'type' => 'textarea',
|
70 |
-
'placeholder' => 'cmon cmon tell us',
|
71 |
-
),
|
72 |
-
);
|
73 |
-
|
74 |
-
/**
|
75 |
-
* @var string $heading_plugin The heading of the modal
|
76 |
-
*/
|
77 |
-
private $heading_plugin = 'Quick Feedback <span>Because we care about our clients, please leave us a feedback.</span>';
|
78 |
-
|
79 |
-
/**
|
80 |
-
* @var string $heading_theme The heading of the modal
|
81 |
-
*/
|
82 |
-
private $heading_theme = 'Looking to change {theme} <span> What does not work for you?</span>';
|
83 |
-
|
84 |
-
/**
|
85 |
-
* @var string $button_submit_before The text of the deactivate button before an option is chosen
|
86 |
-
*/
|
87 |
-
private $button_submit_before = 'Skip & Deactivate';
|
88 |
-
|
89 |
-
/**
|
90 |
-
* @var string $button_submit The text of the deactivate button
|
91 |
-
*/
|
92 |
-
private $button_submit = 'Submit & Deactivate';
|
93 |
-
|
94 |
-
/**
|
95 |
-
* @var string $button_cancel The text of the cancel button
|
96 |
-
*/
|
97 |
-
private $button_cancel = 'Skip & Deactivate';
|
98 |
-
|
99 |
-
/**
|
100 |
-
* @var int how many seconds before the deactivation window is triggered for themes
|
101 |
-
*/
|
102 |
-
const AUTO_TRIGGER_DEACTIVATE_WINDOW_SECONDS = 3;
|
103 |
-
|
104 |
-
/**
|
105 |
-
* @var int how many days before the deactivation window pops up again for the theme
|
106 |
-
*/
|
107 |
-
const PAUSE_DEACTIVATE_WINDOW_DAYS = 100;
|
108 |
-
|
109 |
-
/**
|
110 |
-
* ThemeIsle_SDK_Feedback_Deactivate constructor.
|
111 |
-
*
|
112 |
-
* @param ThemeIsle_SDK_Product $product_object The product object.
|
113 |
-
*/
|
114 |
-
public function __construct( $product_object ) {
|
115 |
-
parent::__construct( $product_object );
|
116 |
-
}
|
117 |
-
|
118 |
-
/**
|
119 |
-
* Registers the hooks
|
120 |
-
*/
|
121 |
-
public function setup_hooks_child() {
|
122 |
-
global $pagenow;
|
123 |
-
|
124 |
-
if ( ( $this->product->get_type() === 'plugin' && $pagenow === 'plugins.php' ) || ( $this->product->get_type() === 'theme' && $pagenow === 'theme-install.php' ) ) {
|
125 |
-
add_action( 'admin_head', array( $this, 'load_resources' ) );
|
126 |
-
}
|
127 |
-
add_action( 'wp_ajax_' . $this->product->get_key() . __CLASS__, array( $this, 'post_deactivate' ) );
|
128 |
-
}
|
129 |
-
|
130 |
-
/**
|
131 |
-
* Loads the additional resources
|
132 |
-
*/
|
133 |
-
function load_resources() {
|
134 |
-
add_thickbox();
|
135 |
-
|
136 |
-
$id = $this->product->get_key() . '_deactivate';
|
137 |
-
|
138 |
-
$this->add_css( $this->product->get_type(), $this->product->get_key() );
|
139 |
-
$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 );
|
140 |
-
|
141 |
-
echo '<div id="' . $id . '" style="display:none;" class="themeisle-deactivate-box">' . $this->get_html( $this->product->get_type(), $this->product->get_key() ) . '</div>';
|
142 |
-
}
|
143 |
-
|
144 |
-
/**
|
145 |
-
* Loads the css
|
146 |
-
*
|
147 |
-
* @param string $type The type of product.
|
148 |
-
* @param string $key The product key.
|
149 |
-
*/
|
150 |
-
function add_css( $type, $key ) {
|
151 |
-
$suffix = 'theme' === $type ? 'theme-install-php' : 'plugins-php';
|
152 |
-
?>
|
153 |
-
<style type="text/css" id="<?php echo $key; ?>ti-deactivate-css">
|
154 |
-
input[name="ti-deactivate-option"] ~ div {
|
155 |
-
display: none;
|
156 |
-
}
|
157 |
-
|
158 |
-
input[name="ti-deactivate-option"]:checked ~ div {
|
159 |
-
display: block;
|
160 |
-
}
|
161 |
-
|
162 |
-
body.<?php echo $suffix; ?> .<?php echo $key; ?>-container #TB_window.thickbox-loading:before {
|
163 |
-
background: none !important;
|
164 |
-
}
|
165 |
-
|
166 |
-
body.<?php echo $suffix; ?> .<?php echo $key; ?>-container #TB_title {
|
167 |
-
background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyFpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg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PY7mzN+Yn1N9JMMq0mQ/icquHmpwLa/LXotHVPEalD5EP23l9VUc+fUc9UoOKQU/9x7OLSndelJfHwesckRqtKyVdnLbOjQ4hUPuATP+3v4r3n8LMAAsR90w+kkNLQAAAABJRU5ErkJggg==') 40px 30px no-repeat;
|
168 |
-
border: none;
|
169 |
-
box-sizing: border-box;
|
170 |
-
color: #373e40;
|
171 |
-
font-size: 24px;
|
172 |
-
font-weight: 700;
|
173 |
-
height: 90px;
|
174 |
-
padding: 40px 40px 0 120px;
|
175 |
-
text-transform: uppercase;
|
176 |
-
width: 100%;
|
177 |
-
}
|
178 |
-
|
179 |
-
body.<?php echo $suffix; ?> .<?php echo $key; ?>-container div.actions {
|
180 |
-
box-sizing: border-box;
|
181 |
-
padding: 30px 40px;
|
182 |
-
background-color: #eaeaea;
|
183 |
-
}
|
184 |
-
|
185 |
-
body.<?php echo $suffix; ?> .<?php echo $key; ?>-container input.button {
|
186 |
-
background: #ec5d60;
|
187 |
-
border: none;
|
188 |
-
box-shadow: none;
|
189 |
-
color: #ffffff;
|
190 |
-
font-size: 15px;
|
191 |
-
font-weight: 700;
|
192 |
-
height: auto;
|
193 |
-
line-height: 20px;
|
194 |
-
padding: 10px 15px;
|
195 |
-
text-transform: uppercase;
|
196 |
-
-webkit-transition: 0.3s ease;
|
197 |
-
-moz-transition: 0.3s ease;
|
198 |
-
-ms-transition: 0.3s ease;
|
199 |
-
-o-transition: 0.3s ease;
|
200 |
-
transition: 0.3s ease;
|
201 |
-
}
|
202 |
-
|
203 |
-
body.<?php echo $suffix; ?> .<?php echo $key; ?>-container input.button.button-primary {
|
204 |
-
background: transparent;
|
205 |
-
box-shadow: none;
|
206 |
-
color: #8d9192;
|
207 |
-
font-weight: 400;
|
208 |
-
float: right;
|
209 |
-
line-height: 40px;
|
210 |
-
padding: 0;
|
211 |
-
text-decoration: underline;
|
212 |
-
text-shadow: none;
|
213 |
-
text-transform: none;
|
214 |
-
}
|
215 |
-
|
216 |
-
body.<?php echo $suffix; ?> .<?php echo $key; ?>-container input.button:hover {
|
217 |
-
background: #e83f42;
|
218 |
-
}
|
219 |
-
|
220 |
-
body.<?php echo $suffix; ?> .<?php echo $key; ?>-container input.button.button-primary:hover {
|
221 |
-
background: transparent;
|
222 |
-
}
|
223 |
-
|
224 |
-
body.<?php echo $suffix; ?> .<?php echo $key; ?>-container input.button:focus {
|
225 |
-
box-shadow: none;
|
226 |
-
outline: none;
|
227 |
-
}
|
228 |
-
|
229 |
-
body.<?php echo $suffix; ?> .<?php echo $key; ?>-container input.button:active {
|
230 |
-
box-shadow: none;
|
231 |
-
transform: translateY(0);
|
232 |
-
}
|
233 |
-
|
234 |
-
body.<?php echo $suffix; ?> .<?php echo $key; ?>-container input.button:disabled {
|
235 |
-
cursor: not-allowed;
|
236 |
-
}
|
237 |
-
|
238 |
-
body.<?php echo $suffix; ?> .<?php echo $key; ?>-container input.button.button-primary:hover {
|
239 |
-
text-decoration: none;
|
240 |
-
}
|
241 |
-
|
242 |
-
body.<?php echo $suffix; ?> .<?php echo $key; ?>-container div.revive_network-container {
|
243 |
-
background-color: #ffffff;
|
244 |
-
}
|
245 |
-
|
246 |
-
body.<?php echo $suffix; ?> .<?php echo $key; ?>-container ul.ti-list {
|
247 |
-
margin: 0;
|
248 |
-
}
|
249 |
-
|
250 |
-
body.<?php echo $suffix; ?> .<?php echo $key; ?>-container ul.ti-list li {
|
251 |
-
color: #373e40;
|
252 |
-
font-size: 13px;
|
253 |
-
margin-bottom: 5px;
|
254 |
-
}
|
255 |
-
|
256 |
-
body.<?php echo $suffix; ?> .<?php echo $key; ?>-container ul.ti-list li label {
|
257 |
-
margin-left: 10px;
|
258 |
-
line-height: 28px;
|
259 |
-
font-size: 15px;
|
260 |
-
}
|
261 |
-
|
262 |
-
body.<?php echo $suffix; ?> .<?php echo $key; ?>-container ul.ti-list input[type=radio] {
|
263 |
-
margin-top: 1px;
|
264 |
-
}
|
265 |
-
|
266 |
-
body.<?php echo $suffix; ?> .<?php echo $key; ?>-container #TB_ajaxContent {
|
267 |
-
box-sizing: border-box;
|
268 |
-
height: auto !important;
|
269 |
-
padding: 20px 40px;
|
270 |
-
width: 100% !important;
|
271 |
-
}
|
272 |
-
|
273 |
-
body.<?php echo $suffix; ?> .<?php echo $key; ?>-container li div textarea {
|
274 |
-
padding: 10px 15px;
|
275 |
-
width: 100%;
|
276 |
-
}
|
277 |
-
|
278 |
-
body.<?php echo $suffix; ?> .<?php echo $key; ?>-container ul.ti-list li div {
|
279 |
-
margin: 10px 30px;
|
280 |
-
}
|
281 |
-
|
282 |
-
.<?php echo $key; ?>-container #TB_title #TB_ajaxWindowTitle {
|
283 |
-
box-sizing: border-box;
|
284 |
-
display: block;
|
285 |
-
float: none;
|
286 |
-
font-weight: 700;
|
287 |
-
line-height: 1;
|
288 |
-
padding: 0;
|
289 |
-
text-align: left;
|
290 |
-
width: 100%;
|
291 |
-
}
|
292 |
-
|
293 |
-
.<?php echo $key; ?>-container #TB_title #TB_ajaxWindowTitle span {
|
294 |
-
color: #8d9192;
|
295 |
-
display: block;
|
296 |
-
font-size: 15px;
|
297 |
-
font-weight: 400;
|
298 |
-
margin-top: 5px;
|
299 |
-
text-transform: none;
|
300 |
-
}
|
301 |
-
|
302 |
-
body.<?php echo $suffix; ?> .<?php echo $key; ?>-container .actions {
|
303 |
-
width: 100%;
|
304 |
-
display: block;
|
305 |
-
position: absolute;
|
306 |
-
left: 0;
|
307 |
-
bottom: 0;
|
308 |
-
}
|
309 |
-
|
310 |
-
.theme-install-php .<?php echo $key; ?>-container #TB_closeWindowButton .tb-close-icon:before {
|
311 |
-
font-size: 32px;
|
312 |
-
}
|
313 |
-
|
314 |
-
.<?php echo $key; ?>-container #TB_closeWindowButton .tb-close-icon {
|
315 |
-
color: #eee;
|
316 |
-
}
|
317 |
-
|
318 |
-
.<?php echo $key; ?>-container #TB_closeWindowButton {
|
319 |
-
left: auto;
|
320 |
-
right: -5px;
|
321 |
-
top: -35px;
|
322 |
-
color: #eee;
|
323 |
-
}
|
324 |
-
|
325 |
-
.<?php echo $key; ?>-container #TB_closeWindowButton .tb-close-icon {
|
326 |
-
text-align: right;
|
327 |
-
line-height: 25px;
|
328 |
-
width: 25px;
|
329 |
-
height: 25px;
|
330 |
-
}
|
331 |
-
|
332 |
-
.<?php echo $key; ?>-container #TB_closeWindowButton:focus .tb-close-icon {
|
333 |
-
box-shadow: none;
|
334 |
-
outline: none;
|
335 |
-
}
|
336 |
-
|
337 |
-
.<?php echo $key; ?>-container #TB_closeWindowButton .tb-close-icon:before {
|
338 |
-
font: normal 25px dashicons;
|
339 |
-
}
|
340 |
-
|
341 |
-
body.<?php echo $suffix; ?> .<?php echo $key; ?>-container {
|
342 |
-
margin: auto !important;
|
343 |
-
height: 500px !important;
|
344 |
-
top: 0 !important;
|
345 |
-
left: 0 !important;
|
346 |
-
bottom: 0 !important;
|
347 |
-
right: 0 !important;
|
348 |
-
width: 600px !important;
|
349 |
-
}
|
350 |
-
</style>
|
351 |
-
<?php
|
352 |
-
}
|
353 |
-
|
354 |
-
/**
|
355 |
-
* Loads the js
|
356 |
-
*
|
357 |
-
* @param string $type The type of product.
|
358 |
-
* @param string $key The product key.
|
359 |
-
* @param string $src The url that will hijack the deactivate button url.
|
360 |
-
*/
|
361 |
-
function add_js( $type, $key, $src ) {
|
362 |
-
$heading = 'plugin' === $type ? $this->heading_plugin : str_replace( '{theme}', $this->product->get_name(), $this->heading_theme );
|
363 |
-
$heading = apply_filters( $this->product->get_key() . '_feedback_deactivate_heading', $heading );
|
364 |
-
?>
|
365 |
-
<script type="text/javascript" id="ti-deactivate-js">
|
366 |
-
(function ($) {
|
367 |
-
$(document).ready(function () {
|
368 |
-
var auto_trigger = false;
|
369 |
-
var target_element = 'tr[data-plugin^="<?php echo $this->product->get_slug(); ?>/"] span.deactivate a';
|
370 |
-
<?php
|
371 |
-
if ( 'theme' === $type ) {
|
372 |
-
?>
|
373 |
-
auto_trigger = true;
|
374 |
-
if ($('a.ti-auto-anchor').length == 0) {
|
375 |
-
$('body').append($('<a class="ti-auto-anchor" href=""></a>'));
|
376 |
-
}
|
377 |
-
target_element = 'a.ti-auto-anchor';
|
378 |
-
<?php
|
379 |
-
}
|
380 |
-
?>
|
381 |
-
|
382 |
-
if (auto_trigger) {
|
383 |
-
setTimeout(function () {
|
384 |
-
$('a.ti-auto-anchor').trigger('click');
|
385 |
-
}, <?php echo self::AUTO_TRIGGER_DEACTIVATE_WINDOW_SECONDS * 1000; ?> );
|
386 |
-
}
|
387 |
-
$(document).on('thickbox:removed', function () {
|
388 |
-
$.ajax({
|
389 |
-
url: ajaxurl,
|
390 |
-
method: 'post',
|
391 |
-
data: {
|
392 |
-
'action': '<?php echo $key . __CLASS__; ?>',
|
393 |
-
'nonce': '<?php echo wp_create_nonce( (string) __CLASS__ ); ?>',
|
394 |
-
'type': '<?php echo $type; ?>',
|
395 |
-
'key': '<?php echo $key; ?>'
|
396 |
-
},
|
397 |
-
});
|
398 |
-
});
|
399 |
-
var href = $(target_element).attr('href');
|
400 |
-
$('#<?php echo $key; ?>ti-deactivate-no').attr('data-ti-action', href).on('click', function (e) {
|
401 |
-
e.preventDefault();
|
402 |
-
e.stopPropagation();
|
403 |
-
|
404 |
-
$('body').unbind('thickbox:removed');
|
405 |
-
tb_remove();
|
406 |
-
var redirect = $(this).attr('data-ti-action');
|
407 |
-
if (redirect != '') {
|
408 |
-
location.href = redirect;
|
409 |
-
}
|
410 |
-
});
|
411 |
-
|
412 |
-
$('#<?php echo $key; ?> ul.ti-list label, #<?php echo $key; ?> ul.ti-list input[name="ti-deactivate-option"]').on('click', function (e) {
|
413 |
-
$('#<?php echo $key; ?>ti-deactivate-yes').val($('#<?php echo $key; ?>ti-deactivate-yes').attr('data-after-text'));
|
414 |
-
|
415 |
-
var radio = $(this).prop('tagName') === 'LABEL' ? $(this).parent() : $(this);
|
416 |
-
if (radio.parent().find('textarea').length > 0 && radio.parent().find('textarea').val().length === 0) {
|
417 |
-
$('#<?php echo $key; ?>ti-deactivate-yes').attr('disabled', 'disabled');
|
418 |
-
radio.parent().find('textarea').on('keyup', function (ee) {
|
419 |
-
if ($(this).val().length === 0) {
|
420 |
-
$('#<?php echo $key; ?>ti-deactivate-yes').attr('disabled', 'disabled');
|
421 |
-
} else {
|
422 |
-
$('#<?php echo $key; ?>ti-deactivate-yes').removeAttr('disabled');
|
423 |
-
}
|
424 |
-
});
|
425 |
-
} else {
|
426 |
-
$('#<?php echo $key; ?>ti-deactivate-yes').removeAttr('disabled');
|
427 |
-
}
|
428 |
-
});
|
429 |
-
|
430 |
-
$('#<?php echo $key; ?>ti-deactivate-yes').attr('data-ti-action', href).on('click', function (e) {
|
431 |
-
e.preventDefault();
|
432 |
-
e.stopPropagation();
|
433 |
-
$.ajax({
|
434 |
-
url: ajaxurl,
|
435 |
-
method: 'post',
|
436 |
-
data: {
|
437 |
-
'action': '<?php echo $key . __CLASS__; ?>',
|
438 |
-
'nonce': '<?php echo wp_create_nonce( (string) __CLASS__ ); ?>',
|
439 |
-
'id': $('#<?php echo $key; ?> input[name="ti-deactivate-option"]:checked').parent().attr('ti-option-id'),
|
440 |
-
'msg': $('#<?php echo $key; ?> input[name="ti-deactivate-option"]:checked').parent().find('textarea').val(),
|
441 |
-
'type': '<?php echo $type; ?>',
|
442 |
-
'key': '<?php echo $key; ?>'
|
443 |
-
},
|
444 |
-
});
|
445 |
-
var redirect = $(this).attr('data-ti-action');
|
446 |
-
if (redirect != '') {
|
447 |
-
location.href = redirect;
|
448 |
-
} else {
|
449 |
-
$('body').unbind('thickbox:removed');
|
450 |
-
tb_remove();
|
451 |
-
}
|
452 |
-
});
|
453 |
-
|
454 |
-
$(target_element).attr('name', '<?php echo wp_kses( $heading, array( 'span' => array() ) ); ?>').attr('href', '<?php echo $src; ?>').addClass('thickbox');
|
455 |
-
var thicbox_timer;
|
456 |
-
$(target_element).on('click', function () {
|
457 |
-
tiBindThickbox();
|
458 |
-
});
|
459 |
-
|
460 |
-
function tiBindThickbox() {
|
461 |
-
var thicbox_timer = setTimeout(function () {
|
462 |
-
if ($("#<?php echo esc_html( $key ); ?>").is(":visible")) {
|
463 |
-
$("body").trigger('thickbox:iframe:loaded');
|
464 |
-
$("#TB_window").addClass("<?php echo $key; ?>-container");
|
465 |
-
clearTimeout(thicbox_timer);
|
466 |
-
$('body').unbind('thickbox:removed');
|
467 |
-
} else {
|
468 |
-
tiBindThickbox();
|
469 |
-
}
|
470 |
-
}, 100);
|
471 |
-
}
|
472 |
-
});
|
473 |
-
})(jQuery);
|
474 |
-
</script>
|
475 |
-
<?php
|
476 |
-
}
|
477 |
-
|
478 |
-
/**
|
479 |
-
* Generates the HTML
|
480 |
-
*
|
481 |
-
* @param string $type The type of product.
|
482 |
-
* @param string $key The product key.
|
483 |
-
*/
|
484 |
-
function get_html( $type, $key ) {
|
485 |
-
$options = 'plugin' === $type ? $this->options_plugin : $this->options_theme;
|
486 |
-
$button_submit_before = 'plugin' === $type ? $this->button_submit_before : 'Submit';
|
487 |
-
$button_submit = 'plugin' === $type ? $this->button_submit : 'Submit';
|
488 |
-
$options = $this->randomize_options( apply_filters( $this->product->get_key() . '_feedback_deactivate_options', $options ) );
|
489 |
-
$button_submit_before = apply_filters( $this->product->get_key() . '_feedback_deactivate_button_submit_before', $button_submit_before );
|
490 |
-
$button_submit = apply_filters( $this->product->get_key() . '_feedback_deactivate_button_submit', $button_submit );
|
491 |
-
$button_cancel = apply_filters( $this->product->get_key() . '_feedback_deactivate_button_cancel', $this->button_cancel );
|
492 |
-
|
493 |
-
$options += $this->other;
|
494 |
-
|
495 |
-
$list = '';
|
496 |
-
foreach ( $options as $title => $attributes ) {
|
497 |
-
$id = $attributes['id'];
|
498 |
-
$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>';
|
499 |
-
if ( array_key_exists( 'type', $attributes ) ) {
|
500 |
-
$list .= '<div>';
|
501 |
-
$placeholder = array_key_exists( 'placeholder', $attributes ) ? $attributes['placeholder'] : '';
|
502 |
-
switch ( $attributes['type'] ) {
|
503 |
-
case 'text':
|
504 |
-
$list .= '<textarea style="width: 100%" rows="1" name="comments" placeholder="' . $placeholder . '"></textarea>';
|
505 |
-
break;
|
506 |
-
case 'textarea':
|
507 |
-
$list .= '<textarea style="width: 100%" rows="2" name="comments" placeholder="' . $placeholder . '"></textarea>';
|
508 |
-
break;
|
509 |
-
}
|
510 |
-
$list .= '</div>';
|
511 |
-
}
|
512 |
-
$list .= '</li>';
|
513 |
-
}
|
514 |
-
|
515 |
-
return '<div id="' . $this->product->get_key() . '">'
|
516 |
-
. '<ul class="ti-list">' . $list . '</ul>'
|
517 |
-
. '<div class="actions">'
|
518 |
-
. get_submit_button(
|
519 |
-
$button_submit, 'secondary', $this->product->get_key() . 'ti-deactivate-yes', false, array(
|
520 |
-
'data-after-text' => $button_submit,
|
521 |
-
'disabled' => true,
|
522 |
-
)
|
523 |
-
)
|
524 |
-
. get_submit_button( $button_cancel, 'primary', $this->product->get_key() . 'ti-deactivate-no', false )
|
525 |
-
. '</div></div>';
|
526 |
-
}
|
527 |
-
|
528 |
-
/**
|
529 |
-
* Called when the deactivate button is clicked
|
530 |
-
*/
|
531 |
-
function post_deactivate() {
|
532 |
-
check_ajax_referer( (string) __CLASS__, 'nonce' );
|
533 |
-
|
534 |
-
if ( ! empty( $_POST['id'] ) ) {
|
535 |
-
$this->call_api(
|
536 |
-
array(
|
537 |
-
'type' => 'deactivate',
|
538 |
-
'id' => $_POST['id'],
|
539 |
-
'comment' => isset( $_POST['msg'] ) ? $_POST['msg'] : '',
|
540 |
-
)
|
541 |
-
);
|
542 |
-
}
|
543 |
-
|
544 |
-
$this->post_deactivate_or_cancel();
|
545 |
-
}
|
546 |
-
|
547 |
-
/**
|
548 |
-
* Called when the deactivate/cancel button is clicked
|
549 |
-
*/
|
550 |
-
private function post_deactivate_or_cancel() {
|
551 |
-
if ( isset( $_POST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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback-factory.php
DELETED
@@ -1,50 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The feedback factory class for ThemeIsle SDK
|
4 |
-
*
|
5 |
-
* @package ThemeIsleSDK
|
6 |
-
* @subpackage Feedback
|
7 |
-
* @copyright Copyright (c) 2017, Marius Cristea
|
8 |
-
* @license http://opensource.org/licenses/gpl-3.0.php GNU Public License
|
9 |
-
* @since 1.0.0
|
10 |
-
*/
|
11 |
-
// Exit if accessed directly.
|
12 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
13 |
-
exit;
|
14 |
-
}
|
15 |
-
if ( ! class_exists( 'ThemeIsle_SDK_Feedback_Factory' ) ) :
|
16 |
-
/**
|
17 |
-
* Feedback model for ThemeIsle SDK.
|
18 |
-
*/
|
19 |
-
class ThemeIsle_SDK_Feedback_Factory {
|
20 |
-
|
21 |
-
/**
|
22 |
-
* @var array $instances collection of the instances that are registered with the factory
|
23 |
-
*/
|
24 |
-
private $_instances = array();
|
25 |
-
|
26 |
-
/**
|
27 |
-
* ThemeIsle_SDK_Feedback_Factory constructor.
|
28 |
-
*
|
29 |
-
* @param ThemeIsle_SDK_Product $product_object Product Object.
|
30 |
-
* @param array $feedback_types the feedback types.
|
31 |
-
*/
|
32 |
-
public function __construct( $product_object, $feedback_types ) {
|
33 |
-
if ( $product_object instanceof ThemeIsle_SDK_Product && $feedback_types && is_array( $feedback_types ) ) {
|
34 |
-
foreach ( $feedback_types as $type ) {
|
35 |
-
$class = 'ThemeIsle_SDK_Feedback_' . ucwords( $type );
|
36 |
-
$instance = new $class( $product_object );
|
37 |
-
$this->_instances[ $type ] = $instance;
|
38 |
-
$instance->setup_hooks();
|
39 |
-
}
|
40 |
-
}
|
41 |
-
}
|
42 |
-
|
43 |
-
/**
|
44 |
-
* Get the registered instances
|
45 |
-
*/
|
46 |
-
public function get_instances() {
|
47 |
-
return $this->_instances;
|
48 |
-
}
|
49 |
-
}
|
50 |
-
endif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback-review.php
DELETED
@@ -1,209 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The review feedback model class for ThemeIsle SDK
|
4 |
-
*
|
5 |
-
* @package ThemeIsleSDK
|
6 |
-
* @subpackage Feedback
|
7 |
-
* @copyright Copyright (c) 2017, Marius Cristea
|
8 |
-
* @license http://opensource.org/licenses/gpl-3.0.php GNU Public License
|
9 |
-
* @since 1.0.0
|
10 |
-
*/
|
11 |
-
// Exit if accessed directly.
|
12 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
13 |
-
exit;
|
14 |
-
}
|
15 |
-
if ( ! class_exists( 'ThemeIsle_SDK_Feedback_Review' ) ) :
|
16 |
-
/**
|
17 |
-
* Deactivate feedback model for ThemeIsle SDK.
|
18 |
-
*/
|
19 |
-
class ThemeIsle_SDK_Feedback_Review extends ThemeIsle_SDK_Feedback {
|
20 |
-
|
21 |
-
/**
|
22 |
-
* @var string $heading The heading of the modal
|
23 |
-
*/
|
24 |
-
private $heading = 'Hey, it’s great to see you have <b>{product}</b> active for a few days now. How is everything going? If you can spare a few moments to rate it on WordPress.org it would help us a lot (and boost my motivation). Cheers! <br/> <br/>~ {developer}, developer of {product}';
|
25 |
-
|
26 |
-
/**
|
27 |
-
* @var string $msg The text of the modal
|
28 |
-
*/
|
29 |
-
private $msg = '';
|
30 |
-
|
31 |
-
/**
|
32 |
-
* @var string $button_cancel The text of the cancel button
|
33 |
-
*/
|
34 |
-
private $button_cancel = 'No, thanks.';
|
35 |
-
/**
|
36 |
-
* @var array Developers who work for each type of product for review purpose.
|
37 |
-
*/
|
38 |
-
private $developers = array(
|
39 |
-
'plugin' => array( 'Marius', 'Bogdan' ),
|
40 |
-
'theme' => array( 'Rodica', 'Andrei', 'Bogdan', 'Cristi' ),
|
41 |
-
);
|
42 |
-
/**
|
43 |
-
* @var string $button_already The text of the already did it button
|
44 |
-
*/
|
45 |
-
private $button_do = 'Ok, I will gladly help.';
|
46 |
-
|
47 |
-
/**
|
48 |
-
* ThemeIsle_SDK_Feedback_Deactivate constructor.
|
49 |
-
*
|
50 |
-
* @param ThemeIsle_SDK_Product $product_object The product object.
|
51 |
-
*/
|
52 |
-
public function __construct( $product_object ) {
|
53 |
-
parent::__construct( $product_object );
|
54 |
-
}
|
55 |
-
|
56 |
-
/**
|
57 |
-
* Registers the hooks
|
58 |
-
*/
|
59 |
-
public function setup_hooks_child() {
|
60 |
-
add_action( 'wp_ajax_' . $this->product->get_key() . __CLASS__, array( $this, 'dismiss' ) );
|
61 |
-
}
|
62 |
-
|
63 |
-
/**
|
64 |
-
* Either we can notify or not.
|
65 |
-
*
|
66 |
-
* @return bool Notification available or not.
|
67 |
-
*/
|
68 |
-
public function can_notify() {
|
69 |
-
if ( ! $this->product->is_wordpress_available() ) {
|
70 |
-
$this->disable();
|
71 |
-
|
72 |
-
return false;
|
73 |
-
}
|
74 |
-
$show = get_option( $this->product->get_key() . '_review_flag', 'yes' );
|
75 |
-
if ( 'no' === $show ) {
|
76 |
-
return false;
|
77 |
-
}
|
78 |
-
$finally_show = apply_filters( $this->product->get_key() . '_feedback_review_trigger', true );
|
79 |
-
if ( false !== $finally_show ) {
|
80 |
-
if ( is_array( $finally_show ) && ! empty( $finally_show ) ) {
|
81 |
-
$this->heading = $finally_show['heading'];
|
82 |
-
$this->msg = $finally_show['msg'];
|
83 |
-
}
|
84 |
-
} else {
|
85 |
-
return false;
|
86 |
-
}
|
87 |
-
|
88 |
-
return true;
|
89 |
-
}
|
90 |
-
|
91 |
-
/**
|
92 |
-
* Shows the notification
|
93 |
-
*/
|
94 |
-
function show_notification() {
|
95 |
-
add_action( 'admin_notices', array( $this, 'admin_notices' ) );
|
96 |
-
}
|
97 |
-
|
98 |
-
/**
|
99 |
-
* Shows the admin notice
|
100 |
-
*/
|
101 |
-
function admin_notices() {
|
102 |
-
$id = $this->product->get_key() . '_review';
|
103 |
-
|
104 |
-
$this->add_css( $this->product->get_key() );
|
105 |
-
$this->add_js( $this->product->get_key() );
|
106 |
-
|
107 |
-
echo '<div class="notice notice-success is-dismissible" id="' . $id . '" ><div class="themeisle-review-box">' . $this->get_html( $this->product->get_key() ) . '</div></div>';
|
108 |
-
}
|
109 |
-
|
110 |
-
/**
|
111 |
-
* Loads the css
|
112 |
-
*
|
113 |
-
* @param string $key The product key.
|
114 |
-
*/
|
115 |
-
function add_css( $key ) {
|
116 |
-
?>
|
117 |
-
<style type="text/css" id="<?php echo $key; ?>ti-review-css">
|
118 |
-
#<?php echo $key; ?>-review-notification {
|
119 |
-
padding-bottom: 5px;
|
120 |
-
}
|
121 |
-
|
122 |
-
#<?php echo $key; ?>-review-notification .review-dismiss {
|
123 |
-
margin-left: 5px;
|
124 |
-
}
|
125 |
-
</style>
|
126 |
-
<?php
|
127 |
-
}
|
128 |
-
|
129 |
-
/**
|
130 |
-
* Loads the js
|
131 |
-
*
|
132 |
-
* @param string $key The product key.
|
133 |
-
*/
|
134 |
-
function add_js( $key ) {
|
135 |
-
?>
|
136 |
-
<script type="text/javascript" id="<?php echo $key; ?>ti-review-js">
|
137 |
-
(function ($) {
|
138 |
-
$(document).ready(function () {
|
139 |
-
$('#<?php echo $key; ?>_review').on('click', '.notice-dismiss, .review-dismiss', function (e) {
|
140 |
-
|
141 |
-
$.ajax({
|
142 |
-
url: ajaxurl,
|
143 |
-
method: "post",
|
144 |
-
data: {
|
145 |
-
'nonce': '<?php echo wp_create_nonce( (string) __CLASS__ ); ?>',
|
146 |
-
'action': '<?php echo $this->product->get_key() . __CLASS__; ?>'
|
147 |
-
},
|
148 |
-
success: function () {
|
149 |
-
$('#<?php echo $key; ?>_review').html('<p><b>Thanks for your answer.</b></p>');
|
150 |
-
}
|
151 |
-
});
|
152 |
-
});
|
153 |
-
});
|
154 |
-
})(jQuery);
|
155 |
-
</script>
|
156 |
-
<?php
|
157 |
-
}
|
158 |
-
|
159 |
-
/**
|
160 |
-
* Generates the HTML
|
161 |
-
*
|
162 |
-
* @param string $key The product key.
|
163 |
-
*/
|
164 |
-
function get_html( $key ) {
|
165 |
-
$link = 'https://wordpress.org/support/' . $this->product->get_type() . '/' . $this->product->get_slug() . '/reviews/#wporg-footer';
|
166 |
-
$heading = apply_filters( $this->product->get_key() . '_feedback_review_heading', $this->heading );
|
167 |
-
$heading = str_replace(
|
168 |
-
array( '{product}' ),
|
169 |
-
$this->product->get_friendly_name(), $heading
|
170 |
-
);
|
171 |
-
$heading = str_replace( '{developer}', $this->developers[ $this->product->get_type() ][ rand( 0, ( count( $this->developers[ $this->product->get_type() ] ) - 1 ) ) ], $heading );
|
172 |
-
|
173 |
-
$button_cancel = apply_filters( $this->product->get_key() . '_feedback_review_button_cancel', $this->button_cancel );
|
174 |
-
$button_do = apply_filters( $this->product->get_key() . '_feedback_review_button_do', $this->button_do );
|
175 |
-
$msg = apply_filters( $this->product->get_key() . '_feedback_review_message', $this->msg );
|
176 |
-
|
177 |
-
return '<div id="' . $this->product->get_key() . '-review-notification" class="themeisle-sdk-review-box">'
|
178 |
-
. '<p>' . $heading . '</p>'
|
179 |
-
. ( $msg ? '<p>' . $msg . '</p>' : '' )
|
180 |
-
. '<div class="actions">'
|
181 |
-
. '<a href="' . $link . '" target="_blank" class="button button-primary review-dismiss"> ' . $button_do . '</a>'
|
182 |
-
. get_submit_button( $button_cancel, 'review-dismiss ' . $this->product->get_key() . '-ti-review', $this->product->get_key() . 'ti-review-no', false )
|
183 |
-
. '</div></div>';
|
184 |
-
}
|
185 |
-
|
186 |
-
/**
|
187 |
-
* Called when the either button is clicked
|
188 |
-
*/
|
189 |
-
function dismiss() {
|
190 |
-
check_ajax_referer( (string) __CLASS__, 'nonce' );
|
191 |
-
|
192 |
-
$this->disable();
|
193 |
-
}
|
194 |
-
|
195 |
-
/**
|
196 |
-
* Disables the notification
|
197 |
-
*/
|
198 |
-
protected function disable() {
|
199 |
-
update_option( $this->product->get_key() . '_review_flag', 'no' );
|
200 |
-
}
|
201 |
-
|
202 |
-
/**
|
203 |
-
* Enables the notification
|
204 |
-
*/
|
205 |
-
protected function enable() {
|
206 |
-
update_option( $this->product->get_key() . '_review_flag', 'yes' );
|
207 |
-
}
|
208 |
-
}
|
209 |
-
endif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback-translate.php
DELETED
@@ -1,983 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The Translate feedback model class for ThemeIsle SDK
|
4 |
-
*
|
5 |
-
* @package ThemeIsleSDK
|
6 |
-
* @subpackage Feedback
|
7 |
-
* @copyright Copyright (c) 2017, Marius Cristea
|
8 |
-
* @license http://opensource.org/licenses/gpl-3.0.php GNU Public License
|
9 |
-
* @since 1.0.0
|
10 |
-
*/
|
11 |
-
// Exit if accessed directly.
|
12 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
13 |
-
exit;
|
14 |
-
}
|
15 |
-
if ( ! class_exists( 'ThemeIsle_SDK_Feedback_Translate' ) ) :
|
16 |
-
/**
|
17 |
-
* Translate feedback model for ThemeIsle SDK.
|
18 |
-
*/
|
19 |
-
class ThemeIsle_SDK_Feedback_Translate extends ThemeIsle_SDK_Feedback {
|
20 |
-
|
21 |
-
/**
|
22 |
-
* @var string $heading The heading of the modal
|
23 |
-
*/
|
24 |
-
private $heading = 'Improve {product}';
|
25 |
-
/**
|
26 |
-
* @var string The message.
|
27 |
-
*/
|
28 |
-
private $msg = 'Translating <b>{product}</b> into as many languages as possible is a huge project. We still need help with a lot of them, so if you are good at translating into <b>{language}</b>, it would be greatly appreciated.
|
29 |
-
The process is easy, and you can join by following the link below!';
|
30 |
-
/**
|
31 |
-
* @var string $button_cancel The text of the cancel button
|
32 |
-
*/
|
33 |
-
private $button_cancel = 'No, thanks.';
|
34 |
-
/**
|
35 |
-
* @var string $button_already The text of the already did it button
|
36 |
-
*/
|
37 |
-
private $button_do = 'Ok, I will gladly help.';
|
38 |
-
/**
|
39 |
-
* @var array Array of available locals.
|
40 |
-
*/
|
41 |
-
private $locales = array(
|
42 |
-
'af' => array(
|
43 |
-
'slug' => 'af',
|
44 |
-
'name' => 'Afrikaans',
|
45 |
-
),
|
46 |
-
'ak' => array(
|
47 |
-
'slug' => 'ak',
|
48 |
-
'name' => 'Akan',
|
49 |
-
),
|
50 |
-
'am' => array(
|
51 |
-
'slug' => 'am',
|
52 |
-
'name' => 'Amharic',
|
53 |
-
),
|
54 |
-
'ar' => array(
|
55 |
-
'slug' => 'ar',
|
56 |
-
'name' => 'Arabic',
|
57 |
-
),
|
58 |
-
'arq' => array(
|
59 |
-
'slug' => 'arq',
|
60 |
-
'name' => 'Algerian Arabic',
|
61 |
-
),
|
62 |
-
'ary' => array(
|
63 |
-
'slug' => 'ary',
|
64 |
-
'name' => 'Moroccan Arabic',
|
65 |
-
),
|
66 |
-
'as' => array(
|
67 |
-
'slug' => 'as',
|
68 |
-
'name' => 'Assamese',
|
69 |
-
),
|
70 |
-
'ast' => array(
|
71 |
-
'slug' => 'ast',
|
72 |
-
'name' => 'Asturian',
|
73 |
-
),
|
74 |
-
'az' => array(
|
75 |
-
'slug' => 'az',
|
76 |
-
'name' => 'Azerbaijani',
|
77 |
-
),
|
78 |
-
'azb' => array(
|
79 |
-
'slug' => 'azb',
|
80 |
-
'name' => 'South Azerbaijani',
|
81 |
-
),
|
82 |
-
'az_TR' => array(
|
83 |
-
'slug' => 'az-tr',
|
84 |
-
'name' => 'Azerbaijani (Turkey)',
|
85 |
-
),
|
86 |
-
'ba' => array(
|
87 |
-
'slug' => 'ba',
|
88 |
-
'name' => 'Bashkir',
|
89 |
-
),
|
90 |
-
'bal' => array(
|
91 |
-
'slug' => 'bal',
|
92 |
-
'name' => 'Catalan (Balear)',
|
93 |
-
),
|
94 |
-
'bcc' => array(
|
95 |
-
'slug' => 'bcc',
|
96 |
-
'name' => 'Balochi Southern',
|
97 |
-
),
|
98 |
-
'bel' => array(
|
99 |
-
'slug' => 'bel',
|
100 |
-
'name' => 'Belarusian',
|
101 |
-
),
|
102 |
-
'bg_BG' => array(
|
103 |
-
'slug' => 'bg',
|
104 |
-
'name' => 'Bulgarian',
|
105 |
-
),
|
106 |
-
'bn_BD' => array(
|
107 |
-
'slug' => 'bn',
|
108 |
-
'name' => 'Bengali',
|
109 |
-
),
|
110 |
-
'bo' => array(
|
111 |
-
'slug' => 'bo',
|
112 |
-
'name' => 'Tibetan',
|
113 |
-
),
|
114 |
-
'bre' => array(
|
115 |
-
'slug' => 'br',
|
116 |
-
'name' => 'Breton',
|
117 |
-
),
|
118 |
-
'bs_BA' => array(
|
119 |
-
'slug' => 'bs',
|
120 |
-
'name' => 'Bosnian',
|
121 |
-
),
|
122 |
-
'ca' => array(
|
123 |
-
'slug' => 'ca',
|
124 |
-
'name' => 'Catalan',
|
125 |
-
),
|
126 |
-
'ceb' => array(
|
127 |
-
'slug' => 'ceb',
|
128 |
-
'name' => 'Cebuano',
|
129 |
-
),
|
130 |
-
'ckb' => array(
|
131 |
-
'slug' => 'ckb',
|
132 |
-
'name' => 'Kurdish (Sorani)',
|
133 |
-
),
|
134 |
-
'co' => array(
|
135 |
-
'slug' => 'co',
|
136 |
-
'name' => 'Corsican',
|
137 |
-
),
|
138 |
-
'cs_CZ' => array(
|
139 |
-
'slug' => 'cs',
|
140 |
-
'name' => 'Czech',
|
141 |
-
),
|
142 |
-
'cy' => array(
|
143 |
-
'slug' => 'cy',
|
144 |
-
'name' => 'Welsh',
|
145 |
-
),
|
146 |
-
'da_DK' => array(
|
147 |
-
'slug' => 'da',
|
148 |
-
'name' => 'Danish',
|
149 |
-
),
|
150 |
-
'de_DE' => array(
|
151 |
-
'slug' => 'de',
|
152 |
-
'name' => 'German',
|
153 |
-
),
|
154 |
-
'de_CH' => array(
|
155 |
-
'slug' => 'de-ch',
|
156 |
-
'name' => 'German (Switzerland)',
|
157 |
-
),
|
158 |
-
'dv' => array(
|
159 |
-
'slug' => 'dv',
|
160 |
-
'name' => 'Dhivehi',
|
161 |
-
),
|
162 |
-
'dzo' => array(
|
163 |
-
'slug' => 'dzo',
|
164 |
-
'name' => 'Dzongkha',
|
165 |
-
),
|
166 |
-
'el' => array(
|
167 |
-
'slug' => 'el',
|
168 |
-
'name' => 'Greek',
|
169 |
-
),
|
170 |
-
'art_xemoji' => array(
|
171 |
-
'slug' => 'art-xemoji',
|
172 |
-
'name' => 'Emoji',
|
173 |
-
),
|
174 |
-
'en_US' => array(
|
175 |
-
'slug' => 'en',
|
176 |
-
'name' => 'English',
|
177 |
-
),
|
178 |
-
'en_AU' => array(
|
179 |
-
'slug' => 'en-au',
|
180 |
-
'name' => 'English (Australia)',
|
181 |
-
),
|
182 |
-
'en_CA' => array(
|
183 |
-
'slug' => 'en-ca',
|
184 |
-
'name' => 'English (Canada)',
|
185 |
-
),
|
186 |
-
'en_GB' => array(
|
187 |
-
'slug' => 'en-gb',
|
188 |
-
'name' => 'English (UK)',
|
189 |
-
),
|
190 |
-
'en_NZ' => array(
|
191 |
-
'slug' => 'en-nz',
|
192 |
-
'name' => 'English (New Zealand)',
|
193 |
-
),
|
194 |
-
'en_ZA' => array(
|
195 |
-
'slug' => 'en-za',
|
196 |
-
'name' => 'English (South Africa)',
|
197 |
-
),
|
198 |
-
'eo' => array(
|
199 |
-
'slug' => 'eo',
|
200 |
-
'name' => 'Esperanto',
|
201 |
-
),
|
202 |
-
'es_ES' => array(
|
203 |
-
'slug' => 'es',
|
204 |
-
'name' => 'Spanish (Spain)',
|
205 |
-
),
|
206 |
-
'es_AR' => array(
|
207 |
-
'slug' => 'es-ar',
|
208 |
-
'name' => 'Spanish (Argentina)',
|
209 |
-
),
|
210 |
-
'es_CL' => array(
|
211 |
-
'slug' => 'es-cl',
|
212 |
-
'name' => 'Spanish (Chile)',
|
213 |
-
),
|
214 |
-
'es_CO' => array(
|
215 |
-
'slug' => 'es-co',
|
216 |
-
'name' => 'Spanish (Colombia)',
|
217 |
-
),
|
218 |
-
'es_CR' => array(
|
219 |
-
'slug' => 'es-cr',
|
220 |
-
'name' => 'Spanish (Costa Rica)',
|
221 |
-
),
|
222 |
-
'es_GT' => array(
|
223 |
-
'slug' => 'es-gt',
|
224 |
-
'name' => 'Spanish (Guatemala)',
|
225 |
-
),
|
226 |
-
'es_MX' => array(
|
227 |
-
'slug' => 'es-mx',
|
228 |
-
'name' => 'Spanish (Mexico)',
|
229 |
-
),
|
230 |
-
'es_PE' => array(
|
231 |
-
'slug' => 'es-pe',
|
232 |
-
'name' => 'Spanish (Peru)',
|
233 |
-
),
|
234 |
-
'es_PR' => array(
|
235 |
-
'slug' => 'es-pr',
|
236 |
-
'name' => 'Spanish (Puerto Rico)',
|
237 |
-
),
|
238 |
-
'es_VE' => array(
|
239 |
-
'slug' => 'es-ve',
|
240 |
-
'name' => 'Spanish (Venezuela)',
|
241 |
-
),
|
242 |
-
'et' => array(
|
243 |
-
'slug' => 'et',
|
244 |
-
'name' => 'Estonian',
|
245 |
-
),
|
246 |
-
'eu' => array(
|
247 |
-
'slug' => 'eu',
|
248 |
-
'name' => 'Basque',
|
249 |
-
),
|
250 |
-
'fa_IR' => array(
|
251 |
-
'slug' => 'fa',
|
252 |
-
'name' => 'Persian',
|
253 |
-
),
|
254 |
-
'fa_AF' => array(
|
255 |
-
'slug' => 'fa-af',
|
256 |
-
'name' => 'Persian (Afghanistan)',
|
257 |
-
),
|
258 |
-
'fuc' => array(
|
259 |
-
'slug' => 'fuc',
|
260 |
-
'name' => 'Fulah',
|
261 |
-
),
|
262 |
-
'fi' => array(
|
263 |
-
'slug' => 'fi',
|
264 |
-
'name' => 'Finnish',
|
265 |
-
),
|
266 |
-
'fo' => array(
|
267 |
-
'slug' => 'fo',
|
268 |
-
'name' => 'Faroese',
|
269 |
-
),
|
270 |
-
'fr_FR' => array(
|
271 |
-
'slug' => 'fr',
|
272 |
-
'name' => 'French (France)',
|
273 |
-
),
|
274 |
-
'fr_BE' => array(
|
275 |
-
'slug' => 'fr-be',
|
276 |
-
'name' => 'French (Belgium)',
|
277 |
-
),
|
278 |
-
'fr_CA' => array(
|
279 |
-
'slug' => 'fr-ca',
|
280 |
-
'name' => 'French (Canada)',
|
281 |
-
),
|
282 |
-
'frp' => array(
|
283 |
-
'slug' => 'frp',
|
284 |
-
'name' => 'Arpitan',
|
285 |
-
),
|
286 |
-
'fur' => array(
|
287 |
-
'slug' => 'fur',
|
288 |
-
'name' => 'Friulian',
|
289 |
-
),
|
290 |
-
'fy' => array(
|
291 |
-
'slug' => 'fy',
|
292 |
-
'name' => 'Frisian',
|
293 |
-
),
|
294 |
-
'ga' => array(
|
295 |
-
'slug' => 'ga',
|
296 |
-
'name' => 'Irish',
|
297 |
-
),
|
298 |
-
'gd' => array(
|
299 |
-
'slug' => 'gd',
|
300 |
-
'name' => 'Scottish Gaelic',
|
301 |
-
),
|
302 |
-
'gl_ES' => array(
|
303 |
-
'slug' => 'gl',
|
304 |
-
'name' => 'Galician',
|
305 |
-
),
|
306 |
-
'gn' => array(
|
307 |
-
'slug' => 'gn',
|
308 |
-
'name' => 'Guaraní',
|
309 |
-
),
|
310 |
-
'gsw' => array(
|
311 |
-
'slug' => 'gsw',
|
312 |
-
'name' => 'Swiss German',
|
313 |
-
),
|
314 |
-
'gu' => array(
|
315 |
-
'slug' => 'gu',
|
316 |
-
'name' => 'Gujarati',
|
317 |
-
),
|
318 |
-
'hat' => array(
|
319 |
-
'slug' => 'hat',
|
320 |
-
'name' => 'Haitian Creole',
|
321 |
-
),
|
322 |
-
'hau' => array(
|
323 |
-
'slug' => 'hau',
|
324 |
-
'name' => 'Hausa',
|
325 |
-
),
|
326 |
-
'haw_US' => array(
|
327 |
-
'slug' => 'haw',
|
328 |
-
'name' => 'Hawaiian',
|
329 |
-
),
|
330 |
-
'haz' => array(
|
331 |
-
'slug' => 'haz',
|
332 |
-
'name' => 'Hazaragi',
|
333 |
-
),
|
334 |
-
'he_IL' => array(
|
335 |
-
'slug' => 'he',
|
336 |
-
'name' => 'Hebrew',
|
337 |
-
),
|
338 |
-
'hi_IN' => array(
|
339 |
-
'slug' => 'hi',
|
340 |
-
'name' => 'Hindi',
|
341 |
-
),
|
342 |
-
'hr' => array(
|
343 |
-
'slug' => 'hr',
|
344 |
-
'name' => 'Croatian',
|
345 |
-
),
|
346 |
-
'hu_HU' => array(
|
347 |
-
'slug' => 'hu',
|
348 |
-
'name' => 'Hungarian',
|
349 |
-
),
|
350 |
-
'hy' => array(
|
351 |
-
'slug' => 'hy',
|
352 |
-
'name' => 'Armenian',
|
353 |
-
),
|
354 |
-
'id_ID' => array(
|
355 |
-
'slug' => 'id',
|
356 |
-
'name' => 'Indonesian',
|
357 |
-
),
|
358 |
-
'ido' => array(
|
359 |
-
'slug' => 'ido',
|
360 |
-
'name' => 'Ido',
|
361 |
-
),
|
362 |
-
'is_IS' => array(
|
363 |
-
'slug' => 'is',
|
364 |
-
'name' => 'Icelandic',
|
365 |
-
),
|
366 |
-
'it_IT' => array(
|
367 |
-
'slug' => 'it',
|
368 |
-
'name' => 'Italian',
|
369 |
-
),
|
370 |
-
'ja' => array(
|
371 |
-
'slug' => 'ja',
|
372 |
-
'name' => 'Japanese',
|
373 |
-
),
|
374 |
-
'jv_ID' => array(
|
375 |
-
'slug' => 'jv',
|
376 |
-
'name' => 'Javanese',
|
377 |
-
),
|
378 |
-
'ka_GE' => array(
|
379 |
-
'slug' => 'ka',
|
380 |
-
'name' => 'Georgian',
|
381 |
-
),
|
382 |
-
'kab' => array(
|
383 |
-
'slug' => 'kab',
|
384 |
-
'name' => 'Kabyle',
|
385 |
-
),
|
386 |
-
'kal' => array(
|
387 |
-
'slug' => 'kal',
|
388 |
-
'name' => 'Greenlandic',
|
389 |
-
),
|
390 |
-
'kin' => array(
|
391 |
-
'slug' => 'kin',
|
392 |
-
'name' => 'Kinyarwanda',
|
393 |
-
),
|
394 |
-
'kk' => array(
|
395 |
-
'slug' => 'kk',
|
396 |
-
'name' => 'Kazakh',
|
397 |
-
),
|
398 |
-
'km' => array(
|
399 |
-
'slug' => 'km',
|
400 |
-
'name' => 'Khmer',
|
401 |
-
),
|
402 |
-
'kn' => array(
|
403 |
-
'slug' => 'kn',
|
404 |
-
'name' => 'Kannada',
|
405 |
-
),
|
406 |
-
'ko_KR' => array(
|
407 |
-
'slug' => 'ko',
|
408 |
-
'name' => 'Korean',
|
409 |
-
),
|
410 |
-
'kir' => array(
|
411 |
-
'slug' => 'kir',
|
412 |
-
'name' => 'Kyrgyz',
|
413 |
-
),
|
414 |
-
'lb_LU' => array(
|
415 |
-
'slug' => 'lb',
|
416 |
-
'name' => 'Luxembourgish',
|
417 |
-
),
|
418 |
-
'li' => array(
|
419 |
-
'slug' => 'li',
|
420 |
-
'name' => 'Limburgish',
|
421 |
-
),
|
422 |
-
'lin' => array(
|
423 |
-
'slug' => 'lin',
|
424 |
-
'name' => 'Lingala',
|
425 |
-
),
|
426 |
-
'lo' => array(
|
427 |
-
'slug' => 'lo',
|
428 |
-
'name' => 'Lao',
|
429 |
-
),
|
430 |
-
'lt_LT' => array(
|
431 |
-
'slug' => 'lt',
|
432 |
-
'name' => 'Lithuanian',
|
433 |
-
),
|
434 |
-
'lv' => array(
|
435 |
-
'slug' => 'lv',
|
436 |
-
'name' => 'Latvian',
|
437 |
-
),
|
438 |
-
'me_ME' => array(
|
439 |
-
'slug' => 'me',
|
440 |
-
'name' => 'Montenegrin',
|
441 |
-
),
|
442 |
-
'mg_MG' => array(
|
443 |
-
'slug' => 'mg',
|
444 |
-
'name' => 'Malagasy',
|
445 |
-
),
|
446 |
-
'mk_MK' => array(
|
447 |
-
'slug' => 'mk',
|
448 |
-
'name' => 'Macedonian',
|
449 |
-
),
|
450 |
-
'ml_IN' => array(
|
451 |
-
'slug' => 'ml',
|
452 |
-
'name' => 'Malayalam',
|
453 |
-
),
|
454 |
-
'mlt' => array(
|
455 |
-
'slug' => 'mlt',
|
456 |
-
'name' => 'Maltese',
|
457 |
-
),
|
458 |
-
'mn' => array(
|
459 |
-
'slug' => 'mn',
|
460 |
-
'name' => 'Mongolian',
|
461 |
-
),
|
462 |
-
'mr' => array(
|
463 |
-
'slug' => 'mr',
|
464 |
-
'name' => 'Marathi',
|
465 |
-
),
|
466 |
-
'mri' => array(
|
467 |
-
'slug' => 'mri',
|
468 |
-
'name' => 'Maori',
|
469 |
-
),
|
470 |
-
'ms_MY' => array(
|
471 |
-
'slug' => 'ms',
|
472 |
-
'name' => 'Malay',
|
473 |
-
),
|
474 |
-
'my_MM' => array(
|
475 |
-
'slug' => 'mya',
|
476 |
-
'name' => 'Myanmar (Burmese)',
|
477 |
-
),
|
478 |
-
'ne_NP' => array(
|
479 |
-
'slug' => 'ne',
|
480 |
-
'name' => 'Nepali',
|
481 |
-
),
|
482 |
-
'nb_NO' => array(
|
483 |
-
'slug' => 'nb',
|
484 |
-
'name' => 'Norwegian (Bokmål)',
|
485 |
-
),
|
486 |
-
'nl_NL' => array(
|
487 |
-
'slug' => 'nl',
|
488 |
-
'name' => 'Dutch',
|
489 |
-
),
|
490 |
-
'nl_BE' => array(
|
491 |
-
'slug' => 'nl-be',
|
492 |
-
'name' => 'Dutch (Belgium)',
|
493 |
-
),
|
494 |
-
'nn_NO' => array(
|
495 |
-
'slug' => 'nn',
|
496 |
-
'name' => 'Norwegian (Nynorsk)',
|
497 |
-
),
|
498 |
-
'oci' => array(
|
499 |
-
'slug' => 'oci',
|
500 |
-
'name' => 'Occitan',
|
501 |
-
),
|
502 |
-
'ory' => array(
|
503 |
-
'slug' => 'ory',
|
504 |
-
'name' => 'Oriya',
|
505 |
-
),
|
506 |
-
'os' => array(
|
507 |
-
'slug' => 'os',
|
508 |
-
'name' => 'Ossetic',
|
509 |
-
),
|
510 |
-
'pa_IN' => array(
|
511 |
-
'slug' => 'pa',
|
512 |
-
'name' => 'Punjabi',
|
513 |
-
),
|
514 |
-
'pl_PL' => array(
|
515 |
-
'slug' => 'pl',
|
516 |
-
'name' => 'Polish',
|
517 |
-
),
|
518 |
-
'pt_BR' => array(
|
519 |
-
'slug' => 'pt-br',
|
520 |
-
'name' => 'Portuguese (Brazil)',
|
521 |
-
),
|
522 |
-
'pt_PT' => array(
|
523 |
-
'slug' => 'pt',
|
524 |
-
'name' => 'Portuguese (Portugal)',
|
525 |
-
),
|
526 |
-
'ps' => array(
|
527 |
-
'slug' => 'ps',
|
528 |
-
'name' => 'Pashto',
|
529 |
-
),
|
530 |
-
'rhg' => array(
|
531 |
-
'slug' => 'rhg',
|
532 |
-
'name' => 'Rohingya',
|
533 |
-
),
|
534 |
-
'ro_RO' => array(
|
535 |
-
'slug' => 'ro',
|
536 |
-
'name' => 'Romanian',
|
537 |
-
),
|
538 |
-
'roh' => array(
|
539 |
-
'slug' => 'roh',
|
540 |
-
'name' => 'Romansh',
|
541 |
-
),
|
542 |
-
'ru_RU' => array(
|
543 |
-
'slug' => 'ru',
|
544 |
-
'name' => 'Russian',
|
545 |
-
),
|
546 |
-
'rue' => array(
|
547 |
-
'slug' => 'rue',
|
548 |
-
'name' => 'Rusyn',
|
549 |
-
),
|
550 |
-
'rup_MK' => array(
|
551 |
-
'slug' => 'rup',
|
552 |
-
'name' => 'Aromanian',
|
553 |
-
),
|
554 |
-
'sah' => array(
|
555 |
-
'slug' => 'sah',
|
556 |
-
'name' => 'Sakha',
|
557 |
-
),
|
558 |
-
'sa_IN' => array(
|
559 |
-
'slug' => 'sa-in',
|
560 |
-
'name' => 'Sanskrit',
|
561 |
-
),
|
562 |
-
'scn' => array(
|
563 |
-
'slug' => 'scn',
|
564 |
-
'name' => 'Sicilian',
|
565 |
-
),
|
566 |
-
'si_LK' => array(
|
567 |
-
'slug' => 'si',
|
568 |
-
'name' => 'Sinhala',
|
569 |
-
),
|
570 |
-
'sk_SK' => array(
|
571 |
-
'slug' => 'sk',
|
572 |
-
'name' => 'Slovak',
|
573 |
-
),
|
574 |
-
'sl_SI' => array(
|
575 |
-
'slug' => 'sl',
|
576 |
-
'name' => 'Slovenian',
|
577 |
-
),
|
578 |
-
'sna' => array(
|
579 |
-
'slug' => 'sna',
|
580 |
-
'name' => 'Shona',
|
581 |
-
),
|
582 |
-
'snd' => array(
|
583 |
-
'slug' => 'snd',
|
584 |
-
'name' => 'Sindhi',
|
585 |
-
),
|
586 |
-
'so_SO' => array(
|
587 |
-
'slug' => 'so',
|
588 |
-
'name' => 'Somali',
|
589 |
-
),
|
590 |
-
'sq' => array(
|
591 |
-
'slug' => 'sq',
|
592 |
-
'name' => 'Albanian',
|
593 |
-
),
|
594 |
-
'sq_XK' => array(
|
595 |
-
'slug' => 'sq-xk',
|
596 |
-
'name' => 'Shqip (Kosovo)',
|
597 |
-
),
|
598 |
-
'sr_RS' => array(
|
599 |
-
'slug' => 'sr',
|
600 |
-
'name' => 'Serbian',
|
601 |
-
),
|
602 |
-
'srd' => array(
|
603 |
-
'slug' => 'srd',
|
604 |
-
'name' => 'Sardinian',
|
605 |
-
),
|
606 |
-
'su_ID' => array(
|
607 |
-
'slug' => 'su',
|
608 |
-
'name' => 'Sundanese',
|
609 |
-
),
|
610 |
-
'sv_SE' => array(
|
611 |
-
'slug' => 'sv',
|
612 |
-
'name' => 'Swedish',
|
613 |
-
),
|
614 |
-
'sw' => array(
|
615 |
-
'slug' => 'sw',
|
616 |
-
'name' => 'Swahili',
|
617 |
-
),
|
618 |
-
'syr' => array(
|
619 |
-
'slug' => 'syr',
|
620 |
-
'name' => 'Syriac',
|
621 |
-
),
|
622 |
-
'szl' => array(
|
623 |
-
'slug' => 'szl',
|
624 |
-
'name' => 'Silesian',
|
625 |
-
),
|
626 |
-
'ta_IN' => array(
|
627 |
-
'slug' => 'ta',
|
628 |
-
'name' => 'Tamil',
|
629 |
-
),
|
630 |
-
'ta_LK' => array(
|
631 |
-
'slug' => 'ta-lk',
|
632 |
-
'name' => 'Tamil (Sri Lanka)',
|
633 |
-
),
|
634 |
-
'tah' => array(
|
635 |
-
'slug' => 'tah',
|
636 |
-
'name' => 'Tahitian',
|
637 |
-
),
|
638 |
-
'te' => array(
|
639 |
-
'slug' => 'te',
|
640 |
-
'name' => 'Telugu',
|
641 |
-
),
|
642 |
-
'tg' => array(
|
643 |
-
'slug' => 'tg',
|
644 |
-
'name' => 'Tajik',
|
645 |
-
),
|
646 |
-
'th' => array(
|
647 |
-
'slug' => 'th',
|
648 |
-
'name' => 'Thai',
|
649 |
-
),
|
650 |
-
'tir' => array(
|
651 |
-
'slug' => 'tir',
|
652 |
-
'name' => 'Tigrinya',
|
653 |
-
),
|
654 |
-
'tl' => array(
|
655 |
-
'slug' => 'tl',
|
656 |
-
'name' => 'Tagalog',
|
657 |
-
),
|
658 |
-
'tr_TR' => array(
|
659 |
-
'slug' => 'tr',
|
660 |
-
'name' => 'Turkish',
|
661 |
-
),
|
662 |
-
'tt_RU' => array(
|
663 |
-
'slug' => 'tt',
|
664 |
-
'name' => 'Tatar',
|
665 |
-
),
|
666 |
-
'tuk' => array(
|
667 |
-
'slug' => 'tuk',
|
668 |
-
'name' => 'Turkmen',
|
669 |
-
),
|
670 |
-
'twd' => array(
|
671 |
-
'slug' => 'twd',
|
672 |
-
'name' => 'Tweants',
|
673 |
-
),
|
674 |
-
'tzm' => array(
|
675 |
-
'slug' => 'tzm',
|
676 |
-
'name' => 'Tamazight (Central Atlas)',
|
677 |
-
),
|
678 |
-
'ug_CN' => array(
|
679 |
-
'slug' => 'ug',
|
680 |
-
'name' => 'Uighur',
|
681 |
-
),
|
682 |
-
'uk' => array(
|
683 |
-
'slug' => 'uk',
|
684 |
-
'name' => 'Ukrainian',
|
685 |
-
),
|
686 |
-
'ur' => array(
|
687 |
-
'slug' => 'ur',
|
688 |
-
'name' => 'Urdu',
|
689 |
-
),
|
690 |
-
'uz_UZ' => array(
|
691 |
-
'slug' => 'uz',
|
692 |
-
'name' => 'Uzbek',
|
693 |
-
),
|
694 |
-
'vi' => array(
|
695 |
-
'slug' => 'vi',
|
696 |
-
'name' => 'Vietnamese',
|
697 |
-
),
|
698 |
-
'wa' => array(
|
699 |
-
'slug' => 'wa',
|
700 |
-
'name' => 'Walloon',
|
701 |
-
),
|
702 |
-
'xho' => array(
|
703 |
-
'slug' => 'xho',
|
704 |
-
'name' => 'Xhosa',
|
705 |
-
),
|
706 |
-
'xmf' => array(
|
707 |
-
'slug' => 'xmf',
|
708 |
-
'name' => 'Mingrelian',
|
709 |
-
),
|
710 |
-
'yor' => array(
|
711 |
-
'slug' => 'yor',
|
712 |
-
'name' => 'Yoruba',
|
713 |
-
),
|
714 |
-
'zh_CN' => array(
|
715 |
-
'slug' => 'zh-cn',
|
716 |
-
'name' => 'Chinese (China)',
|
717 |
-
),
|
718 |
-
'zh_HK' => array(
|
719 |
-
'slug' => 'zh-hk',
|
720 |
-
'name' => 'Chinese (Hong Kong)',
|
721 |
-
),
|
722 |
-
'zh_TW' => array(
|
723 |
-
'slug' => 'zh-tw',
|
724 |
-
'name' => 'Chinese (Taiwan)',
|
725 |
-
),
|
726 |
-
'de_DE_formal' => array(
|
727 |
-
'slug' => 'de/formal',
|
728 |
-
'name' => 'German (Formal)',
|
729 |
-
),
|
730 |
-
'nl_NL_formal' => array(
|
731 |
-
'slug' => 'nl/formal',
|
732 |
-
'name' => 'Dutch (Formal)',
|
733 |
-
),
|
734 |
-
'de_CH_informal' => array(
|
735 |
-
'slug' => 'de-ch/informal',
|
736 |
-
'name' => 'Chinese (Taiwan)',
|
737 |
-
),
|
738 |
-
'pt_PT_ao90' => array(
|
739 |
-
'slug' => 'pt/ao90',
|
740 |
-
'name' => 'Portuguese (Portugal, AO90)',
|
741 |
-
),
|
742 |
-
);
|
743 |
-
|
744 |
-
/**
|
745 |
-
* ThemeIsle_SDK_Feedback_Translate constructor.
|
746 |
-
*
|
747 |
-
* @param ThemeIsle_SDK_Product $product_object The product object.
|
748 |
-
*/
|
749 |
-
public function __construct( $product_object ) {
|
750 |
-
parent::__construct( $product_object );
|
751 |
-
}
|
752 |
-
|
753 |
-
/**
|
754 |
-
* Return the locale path.
|
755 |
-
*
|
756 |
-
* @param string $locale Locale code.
|
757 |
-
*
|
758 |
-
* @return string Locale path.
|
759 |
-
*/
|
760 |
-
private function get_locale_paths( $locale ) {
|
761 |
-
if ( empty( $locale ) ) {
|
762 |
-
return '';
|
763 |
-
}
|
764 |
-
|
765 |
-
$slug = isset( $this->locales[ $locale ] ) ? $this->locales[ $locale ]['slug'] : '';
|
766 |
-
if ( empty( $slug ) ) {
|
767 |
-
return '';
|
768 |
-
}
|
769 |
-
if ( strpos( $slug, '/' ) === false ) {
|
770 |
-
$slug .= '/default';
|
771 |
-
}
|
772 |
-
$url = 'https://translate.wordpress.org/projects/wp-' . $this->product->get_type() . 's/' . $this->product->get_slug() . '/' . ( $this->product->get_type() === 'plugin' ? 'dev/' : '' ) . $slug . '?filters%5Bstatus%5D=untranslated&sort%5Bby%5D=random';
|
773 |
-
|
774 |
-
return $url;
|
775 |
-
}
|
776 |
-
|
777 |
-
/**
|
778 |
-
* Registers the hooks
|
779 |
-
*/
|
780 |
-
public function setup_hooks_child() {
|
781 |
-
add_action( 'wp_ajax_' . $this->product->get_key() . __CLASS__, array( $this, 'dismiss' ) );
|
782 |
-
}
|
783 |
-
|
784 |
-
/**
|
785 |
-
* Either we should show the notification or not.
|
786 |
-
*
|
787 |
-
* @return bool Valid notification.
|
788 |
-
*/
|
789 |
-
function can_notify() {
|
790 |
-
if ( ! $this->product->is_wordpress_available() ) {
|
791 |
-
$this->disable();
|
792 |
-
return false;
|
793 |
-
}
|
794 |
-
$show = get_option( $this->product->get_key() . '_translate_flag', 'yes' );
|
795 |
-
if ( 'no' === $show ) {
|
796 |
-
return false;
|
797 |
-
}
|
798 |
-
$lang = $this->get_user_locale();
|
799 |
-
if ( 'en_US' === $lang ) {
|
800 |
-
return false;
|
801 |
-
}
|
802 |
-
$languages = $this->get_translations();
|
803 |
-
if ( ! is_array( $languages ) ) {
|
804 |
-
return false;
|
805 |
-
}
|
806 |
-
if ( ! isset( $languages['translations'] ) ) {
|
807 |
-
return false;
|
808 |
-
}
|
809 |
-
|
810 |
-
$languages = $languages['translations'];
|
811 |
-
$available = wp_list_pluck( $languages, 'language' );
|
812 |
-
if ( in_array( $lang, $available ) ) {
|
813 |
-
return false;
|
814 |
-
}
|
815 |
-
if ( ! isset( $this->locales[ $lang ] ) ) {
|
816 |
-
return false;
|
817 |
-
}
|
818 |
-
|
819 |
-
return true;
|
820 |
-
}
|
821 |
-
|
822 |
-
/**
|
823 |
-
* Get the user's locale.
|
824 |
-
*/
|
825 |
-
private function get_user_locale() {
|
826 |
-
global $wp_version;
|
827 |
-
if ( version_compare( $wp_version, '4.7.0', '>=' ) ) {
|
828 |
-
return get_user_locale();
|
829 |
-
}
|
830 |
-
$user = wp_get_current_user();
|
831 |
-
if ( $user ) {
|
832 |
-
$locale = $user->locale;
|
833 |
-
}
|
834 |
-
return $locale ? $locale : get_locale();
|
835 |
-
}
|
836 |
-
|
837 |
-
/**
|
838 |
-
* Shows the notification
|
839 |
-
*/
|
840 |
-
function show_notification() {
|
841 |
-
add_action( 'admin_notices', array( $this, 'admin_notices' ) );
|
842 |
-
}
|
843 |
-
|
844 |
-
/**
|
845 |
-
* Shows the admin notice
|
846 |
-
*/
|
847 |
-
function admin_notices() {
|
848 |
-
$id = $this->product->get_key() . '_translate';
|
849 |
-
|
850 |
-
$this->add_css( $this->product->get_key() );
|
851 |
-
$this->add_js( $this->product->get_key() );
|
852 |
-
$html = $this->get_html( $this->product->get_key() );
|
853 |
-
|
854 |
-
if ( $html ) {
|
855 |
-
echo '<div class="notice notice-success is-dismissible" id="' . $id . '" ><div class="themeisle-translate-box">' . $html . '</div></div>';
|
856 |
-
}
|
857 |
-
}
|
858 |
-
|
859 |
-
/**
|
860 |
-
* Loads the css
|
861 |
-
*
|
862 |
-
* @param string $key The product key.
|
863 |
-
*/
|
864 |
-
function add_css( $key ) {
|
865 |
-
?>
|
866 |
-
<style type="text/css" id="<?php echo $key; ?>ti-translate-css">
|
867 |
-
</style>
|
868 |
-
<?php
|
869 |
-
}
|
870 |
-
|
871 |
-
/**
|
872 |
-
* Loads the js
|
873 |
-
*
|
874 |
-
* @param string $key The product key.
|
875 |
-
*/
|
876 |
-
function add_js( $key ) {
|
877 |
-
?>
|
878 |
-
<script type="text/javascript" id="<?php echo $key; ?>ti-translate-js">
|
879 |
-
(function ($) {
|
880 |
-
$(document).ready(function () {
|
881 |
-
$('#<?php echo $key; ?>_translate').on('click', '.translate-dismiss', function (e) {
|
882 |
-
|
883 |
-
$.ajax({
|
884 |
-
url: ajaxurl,
|
885 |
-
method: "post",
|
886 |
-
data: {
|
887 |
-
'nonce': '<?php echo wp_create_nonce( (string) __CLASS__ ); ?>',
|
888 |
-
'action': '<?php echo $this->product->get_key() . __CLASS__; ?>'
|
889 |
-
},
|
890 |
-
success: function () {
|
891 |
-
$('#<?php echo $key; ?>_translate').html('<p><b>Thanks for your answer.</b></p>');
|
892 |
-
}
|
893 |
-
});
|
894 |
-
});
|
895 |
-
});
|
896 |
-
})(jQuery);
|
897 |
-
</script>
|
898 |
-
<?php
|
899 |
-
}
|
900 |
-
|
901 |
-
/**
|
902 |
-
* Fetch translations from api.
|
903 |
-
*
|
904 |
-
* @return mixed Translation array.
|
905 |
-
*/
|
906 |
-
private function get_translations() {
|
907 |
-
$cache_key = $this->product->get_key() . '_all_languages';
|
908 |
-
$translations = get_transient( $cache_key );
|
909 |
-
|
910 |
-
if ( $translations === false ) {
|
911 |
-
require_once( ABSPATH . 'wp-admin/includes/translation-install.php' );
|
912 |
-
$translations = translations_api(
|
913 |
-
$this->product->get_type() . 's',
|
914 |
-
array(
|
915 |
-
'slug' => $this->product->get_slug(),
|
916 |
-
'version' => $this->product->get_version(),
|
917 |
-
)
|
918 |
-
);
|
919 |
-
set_transient( $cache_key, $translations, WEEK_IN_SECONDS );
|
920 |
-
}
|
921 |
-
|
922 |
-
return $translations;
|
923 |
-
|
924 |
-
}
|
925 |
-
|
926 |
-
/**
|
927 |
-
* Generates the HTML
|
928 |
-
*
|
929 |
-
* @param string $key The product key.
|
930 |
-
*
|
931 |
-
* @return void|string Html code of the notification.
|
932 |
-
*/
|
933 |
-
function get_html( $key ) {
|
934 |
-
$lang = $this->get_user_locale();
|
935 |
-
$link = $this->get_locale_paths( $lang );
|
936 |
-
$heading = apply_filters( $this->product->get_key() . '_feedback_translate_heading', $this->heading );
|
937 |
-
$product = $this->product->get_friendly_name();
|
938 |
-
$heading = str_replace(
|
939 |
-
array( '{product}' ),
|
940 |
-
$product, $heading
|
941 |
-
);
|
942 |
-
|
943 |
-
$message = apply_filters( $this->product->get_key() . '_feedback_translation', $this->msg );
|
944 |
-
$language_meta = $this->locales[ $lang ];
|
945 |
-
$message = str_replace( '{language}', $language_meta['name'], $message );
|
946 |
-
$message = str_replace( '{product}', $product, $message );
|
947 |
-
$button_cancel = apply_filters( $this->product->get_key() . '_feedback_translate_button_cancel', $this->button_cancel );
|
948 |
-
$button_do = apply_filters( $this->product->get_key() . '_feedback_translate_button_do', $this->button_do );
|
949 |
-
|
950 |
-
return '<div id="' . $this->product->get_key() . '-translate-notification" class="themeisle-sdk-translate-box">'
|
951 |
-
. '<h2>' . $heading . '</h2>'
|
952 |
-
. '<p>' . $message . '</p>'
|
953 |
-
. '<div class="actions">'
|
954 |
-
. '<a href="' . $link . '" target="_blank" class="button button-primary translate-dismiss"> ' . $button_do . '</a> '
|
955 |
-
. get_submit_button( $button_cancel, 'translate-dismiss ' . $this->product->get_key() . '-ti-translate', $this->product->get_key() . 'ti-translate-no', false )
|
956 |
-
. '</div></br></div>';
|
957 |
-
}
|
958 |
-
|
959 |
-
/**
|
960 |
-
* Called when the either button is clicked
|
961 |
-
*/
|
962 |
-
function dismiss() {
|
963 |
-
check_ajax_referer( (string) __CLASS__, 'nonce' );
|
964 |
-
|
965 |
-
$this->disable();
|
966 |
-
}
|
967 |
-
|
968 |
-
/**
|
969 |
-
* Disables the notification
|
970 |
-
*/
|
971 |
-
protected function disable() {
|
972 |
-
|
973 |
-
update_option( $this->product->get_key() . '_translate_flag', 'no' );
|
974 |
-
}
|
975 |
-
|
976 |
-
/**
|
977 |
-
* Enables the notification
|
978 |
-
*/
|
979 |
-
protected function enable() {
|
980 |
-
update_option( $this->product->get_key() . '_translate_flag', 'yes' );
|
981 |
-
}
|
982 |
-
}
|
983 |
-
endif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback.php
DELETED
@@ -1,90 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The feedback model class for ThemeIsle SDK
|
4 |
-
*
|
5 |
-
* @package ThemeIsleSDK
|
6 |
-
* @subpackage Feedback
|
7 |
-
* @copyright Copyright (c) 2017, Marius Cristea
|
8 |
-
* @license http://opensource.org/licenses/gpl-3.0.php GNU Public License
|
9 |
-
* @since 1.0.0
|
10 |
-
*/
|
11 |
-
// Exit if accessed directly.
|
12 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
13 |
-
exit;
|
14 |
-
}
|
15 |
-
if ( ! class_exists( 'ThemeIsle_SDK_Feedback' ) ) :
|
16 |
-
/**
|
17 |
-
* Feedback model for ThemeIsle SDK.
|
18 |
-
*/
|
19 |
-
abstract class ThemeIsle_SDK_Feedback {
|
20 |
-
/**
|
21 |
-
* @var ThemeIsle_SDK_Product $product Themeisle Product.
|
22 |
-
*/
|
23 |
-
protected $product;
|
24 |
-
|
25 |
-
/**
|
26 |
-
* @var string $feedback_url Url where to send the feedback
|
27 |
-
*/
|
28 |
-
private $feedback_url = 'http://feedback.themeisle.com/wordpress/wp-json/__pirate_feedback_/v1/feedback';
|
29 |
-
|
30 |
-
/**
|
31 |
-
* ThemeIsle_SDK_Feedback constructor.
|
32 |
-
*
|
33 |
-
* @param ThemeIsle_SDK_Product $product_object Product Object.
|
34 |
-
*/
|
35 |
-
public function __construct( $product_object ) {
|
36 |
-
if ( $product_object instanceof ThemeIsle_SDK_Product ) {
|
37 |
-
$this->product = $product_object;
|
38 |
-
}
|
39 |
-
$this->setup_hooks();
|
40 |
-
}
|
41 |
-
|
42 |
-
/**
|
43 |
-
* Registers the hooks and then delegates to the child
|
44 |
-
*/
|
45 |
-
public function setup_hooks() {
|
46 |
-
$this->setup_hooks_child();
|
47 |
-
}
|
48 |
-
|
49 |
-
/**
|
50 |
-
* Calls the API
|
51 |
-
*
|
52 |
-
* @param string $attributes The attributes of the post body.
|
53 |
-
*/
|
54 |
-
protected function call_api( $attributes ) {
|
55 |
-
$slug = $this->product->get_slug();
|
56 |
-
$version = $this->product->get_version();
|
57 |
-
$attributes['slug'] = $slug;
|
58 |
-
$attributes['version'] = $version;
|
59 |
-
|
60 |
-
$response = wp_remote_post(
|
61 |
-
$this->feedback_url, array(
|
62 |
-
'body' => $attributes,
|
63 |
-
)
|
64 |
-
);
|
65 |
-
}
|
66 |
-
|
67 |
-
/**
|
68 |
-
* Randomizes the options array
|
69 |
-
*
|
70 |
-
* @param array $options The options array.
|
71 |
-
*/
|
72 |
-
function randomize_options( $options ) {
|
73 |
-
$new = array();
|
74 |
-
$keys = array_keys( $options );
|
75 |
-
shuffle( $keys );
|
76 |
-
|
77 |
-
foreach ( $keys as $key ) {
|
78 |
-
$new[ $key ] = $options[ $key ];
|
79 |
-
}
|
80 |
-
|
81 |
-
return $new;
|
82 |
-
}
|
83 |
-
|
84 |
-
/**
|
85 |
-
* Abstract function for delegating to the child
|
86 |
-
*/
|
87 |
-
protected abstract function setup_hooks_child();
|
88 |
-
|
89 |
-
}
|
90 |
-
endif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-licenser.php
DELETED
@@ -1,686 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The main loader class for license handling.
|
4 |
-
*
|
5 |
-
* @package ThemeIsleSDK
|
6 |
-
* @subpackage Licenser
|
7 |
-
* @copyright Copyright (c) 2017, Marius Cristea
|
8 |
-
* @license http://opensource.org/licenses/gpl-3.0.php GNU Public License
|
9 |
-
* @since 1.0.0
|
10 |
-
*/
|
11 |
-
if ( ! class_exists( 'ThemeIsle_SDK_Licenser' ) ) :
|
12 |
-
/**
|
13 |
-
* Class ThemeIsle_SDK_Licenser
|
14 |
-
*
|
15 |
-
* Used to update the themeisle products
|
16 |
-
*/
|
17 |
-
class ThemeIsle_SDK_Licenser {
|
18 |
-
|
19 |
-
/**
|
20 |
-
* @var string $license_key The license key string
|
21 |
-
*/
|
22 |
-
public $license_key;
|
23 |
-
|
24 |
-
/**
|
25 |
-
* @var bool $do_check This ensures that the custom API request only runs on the second time that WP fires the update check
|
26 |
-
*/
|
27 |
-
private $do_check = false;
|
28 |
-
|
29 |
-
/**
|
30 |
-
* @var bool $failed_checks Number of failed checks to the api endpoint
|
31 |
-
*/
|
32 |
-
private $failed_checks = 0;
|
33 |
-
/**
|
34 |
-
* @var ThemeIsle_SDK_Product $product The ThemeIsle Product.
|
35 |
-
*/
|
36 |
-
private $product;
|
37 |
-
/**
|
38 |
-
* @var string $product_key The product update response key.
|
39 |
-
*/
|
40 |
-
private $product_key;
|
41 |
-
/**
|
42 |
-
* @var int $max_failed Maximum failed checks allowed before show the notice
|
43 |
-
*/
|
44 |
-
private static $max_failed = 5;
|
45 |
-
|
46 |
-
/**
|
47 |
-
* ThemeIsle_SDK_Licenser constructor.
|
48 |
-
*
|
49 |
-
* @param ThemeIsle_SDK_Product $product The product object.
|
50 |
-
*/
|
51 |
-
public function __construct( $product ) {
|
52 |
-
$this->product = $product;
|
53 |
-
|
54 |
-
$this->product_key = $this->product->get_key() . '-update-response';
|
55 |
-
if ( ! $this->product->requires_license() ) {
|
56 |
-
$this->license_key = 'free';
|
57 |
-
} else {
|
58 |
-
$license_data = get_option( $this->product->get_key() . '_license_data', '' );
|
59 |
-
$this->failed_checks = intval( get_option( $this->product->get_key() . '_failed_checks', 0 ) );
|
60 |
-
if ( $license_data !== '' ) {
|
61 |
-
$this->license_key = isset( $license_data->key ) ? $license_data->key : get_option( $this->product->get_key() . '_license', '' );
|
62 |
-
} else {
|
63 |
-
$this->license_key = get_option( $this->product->get_key() . '_license', '' );
|
64 |
-
}
|
65 |
-
$this->register_license_hooks();
|
66 |
-
}
|
67 |
-
}
|
68 |
-
|
69 |
-
/**
|
70 |
-
* Register license hooks for the themeisle products
|
71 |
-
*/
|
72 |
-
public function register_license_hooks() {
|
73 |
-
add_action( 'admin_init', array( $this, 'register_settings' ) );
|
74 |
-
add_action( 'admin_init', array( $this, 'activate_license' ) );
|
75 |
-
add_action( 'admin_init', array( $this, 'product_valid' ), 99999999 );
|
76 |
-
add_action( 'admin_notices', array( $this, 'show_notice' ) );
|
77 |
-
add_filter( $this->product->get_key() . '_license_status', array( $this, 'get_license_status' ) );
|
78 |
-
}
|
79 |
-
|
80 |
-
/**
|
81 |
-
* @param string $r Update payload.
|
82 |
-
* @param string $url The api url.
|
83 |
-
*
|
84 |
-
* @return mixed List of themes to check for update.
|
85 |
-
*/
|
86 |
-
function disable_wporg_update( $r, $url ) {
|
87 |
-
|
88 |
-
if ( 0 !== strpos( $url, 'https://api.wordpress.org/themes/update-check/' ) ) {
|
89 |
-
return $r;
|
90 |
-
}
|
91 |
-
|
92 |
-
// Decode the JSON response
|
93 |
-
$themes = json_decode( $r['body']['themes'] );
|
94 |
-
|
95 |
-
unset( $themes->themes->{$this->product->get_slug()} );
|
96 |
-
|
97 |
-
// Encode the updated JSON response
|
98 |
-
$r['body']['themes'] = json_encode( $themes );
|
99 |
-
|
100 |
-
return $r;
|
101 |
-
}
|
102 |
-
|
103 |
-
/**
|
104 |
-
* Register the setting for the license of the product
|
105 |
-
*
|
106 |
-
* @return bool
|
107 |
-
*/
|
108 |
-
public function register_settings() {
|
109 |
-
if ( ! is_admin() ) {
|
110 |
-
return false;
|
111 |
-
}
|
112 |
-
add_settings_field(
|
113 |
-
$this->product->get_key() . '_license',
|
114 |
-
$this->product->get_name() . ' license',
|
115 |
-
array( $this, 'license_view' ),
|
116 |
-
'general'
|
117 |
-
);
|
118 |
-
}
|
119 |
-
|
120 |
-
/**
|
121 |
-
* The license view field
|
122 |
-
*/
|
123 |
-
public function license_view() {
|
124 |
-
$status = $this->get_license_status();
|
125 |
-
$value = $this->license_key;
|
126 |
-
|
127 |
-
$activate_string = apply_filters( $this->product->get_key() . '_lc_activate_string', 'Activate' );
|
128 |
-
$deactivate_string = apply_filters( $this->product->get_key() . '_lc_deactivate_string', 'Deactivate' );
|
129 |
-
$valid_string = apply_filters( $this->product->get_key() . '_lc_valid_string', 'Valid' );
|
130 |
-
$invalid_string = apply_filters( $this->product->get_key() . '_lc_invalid_string', 'Invalid' );
|
131 |
-
$license_message = apply_filters( $this->product->get_key() . '_lc_license_message', 'Enter your license from %s purchase history in order to get %s updates' );
|
132 |
-
|
133 |
-
echo '<p ><input ' . ( ( $status === 'valid' ) ? ( 'style="border:1px solid #7ad03a; "' ) : '' ) . ' type="text" id="' . $this->product->get_key() . '_license" name="' . $this->product->get_key() . '_license" value="' . $value . '" /><a ' . ( ( $status === 'valid' ) ? ( '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> <button name="' . $this->product->get_key() . '_btn_trigger" ' . ( ( $status === 'valid' ) ? ( ' 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->product->get_store_url() . '">' . $this->product->get_store_name() . '</a> ', $this->product->get_type() ) . '</p>';
|
134 |
-
|
135 |
-
}
|
136 |
-
|
137 |
-
/**
|
138 |
-
* Return the license status.
|
139 |
-
*
|
140 |
-
* @return string The License status.
|
141 |
-
*/
|
142 |
-
public function get_license_status() {
|
143 |
-
$license_data = get_option( $this->product->get_key() . '_license_data', '' );
|
144 |
-
if ( $license_data !== '' ) {
|
145 |
-
return isset( $license_data->license ) ? $license_data->license : get_option( $this->product->get_key() . '_license_status', 'not_active' );
|
146 |
-
} else {
|
147 |
-
return get_option( $this->product->get_key() . '_license_status', 'not_active' );
|
148 |
-
}
|
149 |
-
|
150 |
-
}
|
151 |
-
|
152 |
-
/**
|
153 |
-
* Check if the license is active or not
|
154 |
-
*
|
155 |
-
* @return bool
|
156 |
-
*/
|
157 |
-
public function check_activation() {
|
158 |
-
$license_data = get_option( $this->product->get_key() . '_license_data', '' );
|
159 |
-
if ( $license_data !== '' ) {
|
160 |
-
return isset( $license_data->error ) ? ( $license_data->error == 'no_activations_left' ) : false;
|
161 |
-
}
|
162 |
-
|
163 |
-
return false;
|
164 |
-
}
|
165 |
-
|
166 |
-
/**
|
167 |
-
* Check if the license is about to expire in the next month
|
168 |
-
*
|
169 |
-
* @return bool
|
170 |
-
*/
|
171 |
-
function check_expiration() {
|
172 |
-
$license_data = get_option( $this->product->get_key() . '_license_data', '' );
|
173 |
-
if ( $license_data !== '' ) {
|
174 |
-
if ( isset( $license_data->expires ) ) {
|
175 |
-
if ( strtotime( $license_data->expires ) - time() < 30 * 24 * 3600 ) {
|
176 |
-
return true;
|
177 |
-
}
|
178 |
-
}
|
179 |
-
}
|
180 |
-
|
181 |
-
return false;
|
182 |
-
}
|
183 |
-
|
184 |
-
/**
|
185 |
-
* Return the renew url from the store used
|
186 |
-
*
|
187 |
-
* @return string The renew url.
|
188 |
-
*/
|
189 |
-
function renew_url() {
|
190 |
-
$license_data = get_option( $this->product->get_key() . '_license_data', '' );
|
191 |
-
if ( $license_data !== '' ) {
|
192 |
-
if ( isset( $license_data->download_id ) && isset( $license_data->key ) ) {
|
193 |
-
return $this->product->get_store_url() . '/checkout/?edd_license_key=' . $license_data->key . '&download_id=' . $license_data->download_id;
|
194 |
-
}
|
195 |
-
}
|
196 |
-
|
197 |
-
return $this->product->get_store_url();
|
198 |
-
}
|
199 |
-
|
200 |
-
/**
|
201 |
-
* Check if we hide the notificatin nag or not
|
202 |
-
*
|
203 |
-
* @param string $hide The notification to hide.
|
204 |
-
*
|
205 |
-
* @return bool Either hide them or not.
|
206 |
-
*/
|
207 |
-
function check_hide( $hide ) {
|
208 |
-
return true;
|
209 |
-
}
|
210 |
-
|
211 |
-
/**
|
212 |
-
* Show the admin notice regarding the license status
|
213 |
-
*
|
214 |
-
* @return bool
|
215 |
-
*/
|
216 |
-
function show_notice() {
|
217 |
-
if ( ! is_admin() ) {
|
218 |
-
return false;
|
219 |
-
}
|
220 |
-
$status = $this->get_license_status();
|
221 |
-
$no_activations_string = apply_filters(
|
222 |
-
$this->product->get_key() . '_lc_no_activations_string', 'No activations left for %s !!!. You need to
|
223 |
-
upgrade your plan in order to use %s on more
|
224 |
-
websites. Please ask the %s
|
225 |
-
Staff for more details.'
|
226 |
-
);
|
227 |
-
$no_valid_string = apply_filters(
|
228 |
-
$this->product->get_key() . '_lc_no_valid_string', 'In order to benefit from updates and support for %s, please add
|
229 |
-
your license code from your <a href="%s" target="_blank">purchase history</a> and validate it <a
|
230 |
-
href="%s">here</a>. '
|
231 |
-
);
|
232 |
-
$expiration_string = apply_filters(
|
233 |
-
$this->product->get_key() . '_lc_expiration_string', 'Your license is about to expire
|
234 |
-
for %s. You can go to %s and renew it '
|
235 |
-
);
|
236 |
-
if ( $status != 'valid' ) {
|
237 |
-
if ( $this->check_activation() ) {
|
238 |
-
if ( $this->check_hide( 'activation' ) ) {
|
239 |
-
?>
|
240 |
-
<div class="error">
|
241 |
-
<p><strong>
|
242 |
-
<?php
|
243 |
-
echo sprintf(
|
244 |
-
$no_activations_string, $this->product->get_name(), $this->product->get_name(), '<a href="' . $this->product->get_store_url() . '"
|
245 |
-
target="_blank">' . $this->product->get_store_name() . '</a>'
|
246 |
-
);
|
247 |
-
?>
|
248 |
-
</strong>
|
249 |
-
</p>
|
250 |
-
</div>
|
251 |
-
<?php
|
252 |
-
return false;
|
253 |
-
}
|
254 |
-
}
|
255 |
-
?>
|
256 |
-
<?php if ( $this->check_hide( 'valid' ) ) : ?>
|
257 |
-
<div class="error">
|
258 |
-
<p>
|
259 |
-
<strong><?php echo sprintf( $no_valid_string, $this->product->get_name() . ' ' . $this->product->get_type(), $this->product->get_store_url(), admin_url( 'options-general.php' ) . '#' . $this->product->get_key() ); ?> </strong>
|
260 |
-
</p>
|
261 |
-
</div>
|
262 |
-
<?php endif; ?>
|
263 |
-
<?php
|
264 |
-
} else {
|
265 |
-
if ( $this->check_expiration() ) {
|
266 |
-
if ( $this->check_hide( 'expiration' ) ) {
|
267 |
-
?>
|
268 |
-
<div class="update-nag">
|
269 |
-
<p>
|
270 |
-
<strong>
|
271 |
-
<?php
|
272 |
-
echo sprintf(
|
273 |
-
$expiration_string, $this->product->get_name() . ' ' . $this->product->get_type(), '<a
|
274 |
-
href="' . $this->renew_url() . '"
|
275 |
-
target="_blank">' . $this->product->get_store_name() . '</a>'
|
276 |
-
);
|
277 |
-
?>
|
278 |
-
</strong>
|
279 |
-
</p>
|
280 |
-
</div>
|
281 |
-
<?php
|
282 |
-
}
|
283 |
-
}
|
284 |
-
}
|
285 |
-
}
|
286 |
-
|
287 |
-
/**
|
288 |
-
* Run the license check call
|
289 |
-
*/
|
290 |
-
public function product_valid() {
|
291 |
-
if ( false === ( $license = get_transient( $this->product->get_key() . '_license_data' ) ) ) {
|
292 |
-
$license = $this->check_license();
|
293 |
-
set_transient( $this->product->get_key() . '_license_data', $license, 12 * HOUR_IN_SECONDS );
|
294 |
-
update_option( $this->product->get_key() . '_license_data', $license );
|
295 |
-
}
|
296 |
-
|
297 |
-
}
|
298 |
-
|
299 |
-
/**
|
300 |
-
* Increment the failed checks
|
301 |
-
*/
|
302 |
-
private function increment_failed_checks() {
|
303 |
-
$this->failed_checks ++;
|
304 |
-
update_option( $this->product->get_key() . '_failed_checks', $this->failed_checks );
|
305 |
-
}
|
306 |
-
|
307 |
-
/**
|
308 |
-
* Reset the failed checks
|
309 |
-
*/
|
310 |
-
private function reset_failed_checks() {
|
311 |
-
$this->failed_checks = 1;
|
312 |
-
update_option( $this->product->get_key() . '_failed_checks', $this->failed_checks );
|
313 |
-
}
|
314 |
-
|
315 |
-
/**
|
316 |
-
* Check the license status
|
317 |
-
*
|
318 |
-
* @return object The license data.
|
319 |
-
*/
|
320 |
-
public function check_license() {
|
321 |
-
$status = $this->get_license_status();
|
322 |
-
if ( $status == 'not_active' ) {
|
323 |
-
$license_data = new stdClass();
|
324 |
-
$license_data->license = 'not_active';
|
325 |
-
|
326 |
-
return $license_data;
|
327 |
-
}
|
328 |
-
$license = trim( $this->license_key );
|
329 |
-
$api_params = array(
|
330 |
-
'edd_action' => 'check_license',
|
331 |
-
'license' => $license,
|
332 |
-
'item_name' => rawurlencode( $this->product->get_name() ),
|
333 |
-
'url' => rawurlencode( home_url() ),
|
334 |
-
);
|
335 |
-
// Call the custom API.
|
336 |
-
$response = wp_remote_get(
|
337 |
-
add_query_arg( $api_params, $this->product->get_store_url() ), array(
|
338 |
-
'timeout' => 15,
|
339 |
-
'sslverify' => false,
|
340 |
-
)
|
341 |
-
);
|
342 |
-
if ( is_wp_error( $response ) ) {
|
343 |
-
$license_data = new stdClass();
|
344 |
-
$license_data->license = 'valid';
|
345 |
-
|
346 |
-
} else {
|
347 |
-
$license_data = json_decode( wp_remote_retrieve_body( $response ) );
|
348 |
-
if ( ! is_object( $license_data ) ) {
|
349 |
-
$license_data = new stdClass();
|
350 |
-
$license_data->license = 'valid';
|
351 |
-
}
|
352 |
-
}
|
353 |
-
$license_old = get_option( $this->product->get_key() . '_license_data', '' );
|
354 |
-
if ( $license_old->license == 'valid' && ( $license_data->license != $license_old->license ) ) {
|
355 |
-
$this->increment_failed_checks();
|
356 |
-
} else {
|
357 |
-
$this->reset_failed_checks();
|
358 |
-
}
|
359 |
-
|
360 |
-
if ( $this->failed_checks <= self::$max_failed ) {
|
361 |
-
return $license_old;
|
362 |
-
}
|
363 |
-
|
364 |
-
if ( isset( $license_old->hide_valid ) ) {
|
365 |
-
$license_data->hide_valid = true;
|
366 |
-
}
|
367 |
-
|
368 |
-
if ( ! isset( $license_data->key ) ) {
|
369 |
-
$license_data->key = isset( $license_old->key ) ? $license_old->key : '';
|
370 |
-
}
|
371 |
-
|
372 |
-
if ( isset( $license_old->hide_expiration ) ) {
|
373 |
-
$license_data->hide_expiration = true;
|
374 |
-
}
|
375 |
-
|
376 |
-
if ( isset( $license_old->hide_activation ) ) {
|
377 |
-
$license_data->hide_activation = true;
|
378 |
-
}
|
379 |
-
|
380 |
-
return $license_data;
|
381 |
-
|
382 |
-
}
|
383 |
-
|
384 |
-
/**
|
385 |
-
* Activate the license remotely
|
386 |
-
*/
|
387 |
-
function activate_license() {
|
388 |
-
// listen for our activate button to be clicked
|
389 |
-
if ( isset( $_POST[ $this->product->get_key() . '_btn_trigger' ] ) ) {
|
390 |
-
$status = $this->get_license_status();
|
391 |
-
// retrieve the license from the database
|
392 |
-
$license = $_POST[ $this->product->get_key() . '_license' ];
|
393 |
-
$api_params = array(
|
394 |
-
'license' => $license,
|
395 |
-
'item_name' => rawurlencode( $this->product->get_name() ),
|
396 |
-
'url' => rawurlencode( home_url() ),
|
397 |
-
);
|
398 |
-
if ( $status != 'valid' ) {
|
399 |
-
// data to send in our API request
|
400 |
-
$api_params['edd_action'] = 'activate_license';
|
401 |
-
} else {
|
402 |
-
$api_params['edd_action'] = 'deactivate_license';
|
403 |
-
}
|
404 |
-
// Call the custom API.
|
405 |
-
$response = wp_remote_get( add_query_arg( $api_params, $this->product->get_store_url() ) );
|
406 |
-
// make sure the response came back okay
|
407 |
-
if ( is_wp_error( $response ) ) {
|
408 |
-
$license_data = new stdClass();
|
409 |
-
$license_data->license = ( $status != 'valid' ) ? 'valid' : 'invalid';
|
410 |
-
|
411 |
-
} else {
|
412 |
-
$license_data = json_decode( wp_remote_retrieve_body( $response ) );
|
413 |
-
if ( ! is_object( $license_data ) ) {
|
414 |
-
$license_data = new stdClass();
|
415 |
-
$license_data->license = ( $status != 'valid' ) ? 'valid' : 'invalid';
|
416 |
-
}
|
417 |
-
}
|
418 |
-
if ( ! isset( $license_data->key ) ) {
|
419 |
-
$license_data->key = $license;
|
420 |
-
}
|
421 |
-
if ( $license_data->license == 'valid' ) {
|
422 |
-
$this->reset_failed_checks();
|
423 |
-
}
|
424 |
-
|
425 |
-
if ( isset( $license_data->plan ) ) {
|
426 |
-
update_option( $this->product->get_key() . '_license_plan', $license_data->plan );
|
427 |
-
}
|
428 |
-
|
429 |
-
update_option( $this->product->get_key() . '_license_data', $license_data );
|
430 |
-
delete_transient( $this->product->get_key() . '_license_data' );
|
431 |
-
set_transient( $this->product->get_key() . '_license_data', $license_data, 12 * HOUR_IN_SECONDS );
|
432 |
-
|
433 |
-
}
|
434 |
-
}
|
435 |
-
|
436 |
-
/**
|
437 |
-
* Enable the license system
|
438 |
-
*/
|
439 |
-
public function enable() {
|
440 |
-
if ( $this->product->get_type() == 'plugin' ) {
|
441 |
-
add_filter(
|
442 |
-
'pre_set_site_transient_update_plugins', array(
|
443 |
-
$this,
|
444 |
-
'pre_set_site_transient_update_plugins_filter',
|
445 |
-
)
|
446 |
-
);
|
447 |
-
add_filter( 'plugins_api', array( $this, 'plugins_api_filter' ), 10, 3 );
|
448 |
-
add_filter( 'http_request_args', array( $this, 'http_request_args' ), 10, 2 );
|
449 |
-
}
|
450 |
-
if ( $this->product->get_type() == 'theme' ) {
|
451 |
-
add_filter( 'site_transient_update_themes', array( &$this, 'theme_update_transient' ) );
|
452 |
-
add_filter( 'delete_site_transient_update_themes', array( &$this, 'delete_theme_update_transient' ) );
|
453 |
-
add_action( 'load-update-core.php', array( &$this, 'delete_theme_update_transient' ) );
|
454 |
-
add_action( 'load-themes.php', array( &$this, 'delete_theme_update_transient' ) );
|
455 |
-
add_action( 'load-themes.php', array( &$this, 'load_themes_screen' ) );
|
456 |
-
add_filter( 'http_request_args', array( $this, 'disable_wporg_update' ), 5, 2 );
|
457 |
-
|
458 |
-
}
|
459 |
-
|
460 |
-
}
|
461 |
-
|
462 |
-
/**
|
463 |
-
* Load the Themes screen
|
464 |
-
*/
|
465 |
-
function load_themes_screen() {
|
466 |
-
add_thickbox();
|
467 |
-
add_action( 'admin_notices', array( &$this, 'update_nag' ) );
|
468 |
-
}
|
469 |
-
|
470 |
-
/**
|
471 |
-
* Alter the nag for themes update
|
472 |
-
*/
|
473 |
-
function update_nag() {
|
474 |
-
$theme = wp_get_theme( $this->product->get_slug() );
|
475 |
-
$api_response = get_transient( $this->product_key );
|
476 |
-
if ( false === $api_response ) {
|
477 |
-
return;
|
478 |
-
}
|
479 |
-
$update_url = wp_nonce_url( 'update.php?action=upgrade-theme&theme=' . urlencode( $this->product->get_slug() ), 'upgrade-theme_' . $this->product->get_slug() );
|
480 |
-
$update_message = apply_filters( 'themeisle_sdk_license_update_message', 'Updating this theme will lose any customizations you have made. Cancel to stop, OK to update.' );
|
481 |
-
$update_onclick = ' onclick="if ( confirm(\'' . esc_js( $update_message ) . '\') ) {return true;}return false;"';
|
482 |
-
if ( version_compare( $this->product->get_version(), $api_response->new_version, '<' ) ) {
|
483 |
-
echo '<div id="update-nag">';
|
484 |
-
printf(
|
485 |
-
'<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>.',
|
486 |
-
$theme->get( 'Name' ),
|
487 |
-
$api_response->new_version,
|
488 |
-
'#TB_inline?width=640&inlineId=' . $this->product->get_version() . '_changelog',
|
489 |
-
$theme->get( 'Name' ),
|
490 |
-
$update_url,
|
491 |
-
$update_onclick
|
492 |
-
);
|
493 |
-
echo '</div>';
|
494 |
-
echo '<div id="' . $this->product->get_slug() . '_' . 'changelog" style="display:none;">';
|
495 |
-
echo wpautop( $api_response->sections['changelog'] );
|
496 |
-
echo '</div>';
|
497 |
-
}
|
498 |
-
}
|
499 |
-
|
500 |
-
/**
|
501 |
-
* @param mixed $value The transient data.
|
502 |
-
*
|
503 |
-
* @return mixed
|
504 |
-
*/
|
505 |
-
function theme_update_transient( $value ) {
|
506 |
-
$update_data = $this->check_for_update();
|
507 |
-
if ( $update_data ) {
|
508 |
-
$value->response[ $this->product->get_slug() ] = $update_data;
|
509 |
-
}
|
510 |
-
|
511 |
-
return $value;
|
512 |
-
}
|
513 |
-
|
514 |
-
/**
|
515 |
-
* Delete the update transient
|
516 |
-
*/
|
517 |
-
function delete_theme_update_transient() {
|
518 |
-
delete_transient( $this->product_key );
|
519 |
-
}
|
520 |
-
|
521 |
-
/**
|
522 |
-
* Check remote api for latest version.
|
523 |
-
*
|
524 |
-
* @return bool|mixed Update api response.
|
525 |
-
*/
|
526 |
-
private function get_version_data() {
|
527 |
-
$api_params = array(
|
528 |
-
'edd_action' => 'get_version',
|
529 |
-
'version' => $this->product->get_version(),
|
530 |
-
'license' => $this->license_key,
|
531 |
-
'name' => $this->product->get_name(),
|
532 |
-
'slug' => $this->product->get_slug(),
|
533 |
-
'author' => $this->product->get_store_name(),
|
534 |
-
'url' => rawurlencode( home_url() ),
|
535 |
-
);
|
536 |
-
$response = wp_remote_post(
|
537 |
-
$this->product->get_store_url(), array(
|
538 |
-
'timeout' => 15,
|
539 |
-
'sslverify' => false,
|
540 |
-
'body' => $api_params,
|
541 |
-
)
|
542 |
-
);
|
543 |
-
if ( is_wp_error( $response ) || 200 != wp_remote_retrieve_response_code( $response ) ) {
|
544 |
-
return false;
|
545 |
-
}
|
546 |
-
$update_data = json_decode( wp_remote_retrieve_body( $response ) );
|
547 |
-
if ( ! is_object( $update_data ) ) {
|
548 |
-
return false;
|
549 |
-
}
|
550 |
-
|
551 |
-
return $update_data;
|
552 |
-
}
|
553 |
-
|
554 |
-
/**
|
555 |
-
* Check for updates
|
556 |
-
*
|
557 |
-
* @return array|bool Either the update data or false in case of failure
|
558 |
-
*/
|
559 |
-
function check_for_update() {
|
560 |
-
$theme = wp_get_theme( $this->product->get_slug() );
|
561 |
-
$update_data = get_transient( $this->product_key );
|
562 |
-
|
563 |
-
if ( false === $update_data ) {
|
564 |
-
$failed = false;
|
565 |
-
|
566 |
-
$update_data = $this->get_version_data();
|
567 |
-
if ( empty( $update_data ) ) {
|
568 |
-
$failed = true;
|
569 |
-
}
|
570 |
-
// If the response failed, try again in 30 minutes.
|
571 |
-
if ( $failed ) {
|
572 |
-
$data = new stdClass;
|
573 |
-
$data->new_version = $this->product->get_version();
|
574 |
-
set_transient( $this->product_key, $data, strtotime( '+30 minutes' ) );
|
575 |
-
|
576 |
-
return false;
|
577 |
-
} else {
|
578 |
-
$update_data->sections = maybe_unserialize( $update_data->sections );
|
579 |
-
set_transient( $this->product_key, $update_data, strtotime( '+12 hours' ) );
|
580 |
-
}
|
581 |
-
}
|
582 |
-
if ( ! isset( $update_data->new_version ) ) {
|
583 |
-
return false;
|
584 |
-
}
|
585 |
-
if ( version_compare( $this->product->get_version(), $update_data->new_version, '>=' ) ) {
|
586 |
-
return false;
|
587 |
-
}
|
588 |
-
|
589 |
-
return (array) $update_data;
|
590 |
-
}
|
591 |
-
|
592 |
-
/**
|
593 |
-
* Check for Updates at the defined API endpoint and modify the update array.
|
594 |
-
*
|
595 |
-
* This function dives into the update API just when WordPress creates its update array,
|
596 |
-
* then adds a custom API call and injects the custom plugin data retrieved from the API.
|
597 |
-
* It is reassembled from parts of the native WordPress plugin update code.
|
598 |
-
* See wp-includes/update.php line 121 for the original wp_update_plugins() function.
|
599 |
-
*
|
600 |
-
* @uses api_request()
|
601 |
-
*
|
602 |
-
* @param array $_transient_data Update array build by WordPress.
|
603 |
-
*
|
604 |
-
* @return array Modified update array with custom plugin data.
|
605 |
-
*/
|
606 |
-
public function pre_set_site_transient_update_plugins_filter( $_transient_data ) {
|
607 |
-
if ( empty( $_transient_data ) || ! $this->do_check ) {
|
608 |
-
$this->do_check = true;
|
609 |
-
|
610 |
-
return $_transient_data;
|
611 |
-
}
|
612 |
-
$api_response = $this->api_request();
|
613 |
-
if ( false !== $api_response && is_object( $api_response ) && isset( $api_response->new_version ) ) {
|
614 |
-
if ( version_compare( $this->product->get_version(), $api_response->new_version, '<' ) ) {
|
615 |
-
$_transient_data->response[ $this->product->get_slug() . '/' . $this->product->get_file() ] = $api_response;
|
616 |
-
}
|
617 |
-
}
|
618 |
-
|
619 |
-
return $_transient_data;
|
620 |
-
}
|
621 |
-
|
622 |
-
/**
|
623 |
-
* Calls the API and, if successfull, returns the object delivered by the API.
|
624 |
-
*
|
625 |
-
* @uses get_bloginfo()
|
626 |
-
* @uses wp_remote_post()
|
627 |
-
* @uses is_wp_error()
|
628 |
-
*
|
629 |
-
* @param string $_action The requested action.
|
630 |
-
* @param array $_data Parameters for the API action.
|
631 |
-
*
|
632 |
-
* @return false||object
|
633 |
-
*/
|
634 |
-
private function api_request( $_action = '', $_data = '' ) {
|
635 |
-
$update_data = $this->get_version_data();
|
636 |
-
if ( empty( $update_data ) ) {
|
637 |
-
return false;
|
638 |
-
}
|
639 |
-
if ( $update_data && isset( $update_data->sections ) ) {
|
640 |
-
$update_data->sections = maybe_unserialize( $update_data->sections );
|
641 |
-
}
|
642 |
-
return $update_data;
|
643 |
-
}
|
644 |
-
|
645 |
-
/**
|
646 |
-
* Updates information on the "View version x.x details" page with custom data.
|
647 |
-
*
|
648 |
-
* @uses api_request()
|
649 |
-
*
|
650 |
-
* @param mixed $_data Plugin data.
|
651 |
-
* @param string $_action Action to send.
|
652 |
-
* @param object $_args Arguments to use.
|
653 |
-
*
|
654 |
-
* @return object $_data
|
655 |
-
*/
|
656 |
-
public function plugins_api_filter( $_data, $_action = '', $_args = null ) {
|
657 |
-
if ( ( $_action != 'plugin_information' ) || ! isset( $_args->slug ) || ( $_args->slug != $this->product->get_slug() ) ) {
|
658 |
-
return $_data;
|
659 |
-
}
|
660 |
-
$api_response = $this->api_request();
|
661 |
-
if ( false !== $api_response ) {
|
662 |
-
$_data = $api_response;
|
663 |
-
}
|
664 |
-
|
665 |
-
return $_data;
|
666 |
-
}
|
667 |
-
|
668 |
-
/**
|
669 |
-
* Disable SSL verification in order to prevent download update failures
|
670 |
-
*
|
671 |
-
* @param array $args Http args.
|
672 |
-
* @param string $url Url to check.
|
673 |
-
*
|
674 |
-
* @return object $array
|
675 |
-
*/
|
676 |
-
function http_request_args( $args, $url ) {
|
677 |
-
// If it is an https request and we are performing a package download, disable ssl verification
|
678 |
-
if ( strpos( $url, 'https://' ) !== false && strpos( $url, 'edd_action=package_download' ) ) {
|
679 |
-
$args['sslverify'] = false;
|
680 |
-
}
|
681 |
-
|
682 |
-
return $args;
|
683 |
-
}
|
684 |
-
|
685 |
-
}
|
686 |
-
endif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-loader.php
DELETED
@@ -1,96 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The main loader class for ThemeIsle SDK
|
4 |
-
*
|
5 |
-
* @package ThemeIsleSDK
|
6 |
-
* @subpackage Loader
|
7 |
-
* @copyright Copyright (c) 2017, Marius Cristea
|
8 |
-
* @license http://opensource.org/licenses/gpl-3.0.php GNU Public License
|
9 |
-
* @since 1.0.0
|
10 |
-
*/
|
11 |
-
// Exit if accessed directly.
|
12 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
13 |
-
exit;
|
14 |
-
}
|
15 |
-
if ( ! class_exists( 'ThemeIsle_SDK_Loader' ) ) :
|
16 |
-
/**
|
17 |
-
* Singleton loader for ThemeIsle SDK.
|
18 |
-
*/
|
19 |
-
final class ThemeIsle_SDK_Loader {
|
20 |
-
/**
|
21 |
-
* @var ThemeIsle_SDK_Loader instance The singleton instance
|
22 |
-
*/
|
23 |
-
private static $instance;
|
24 |
-
/**
|
25 |
-
* @var string $version The class version.
|
26 |
-
*/
|
27 |
-
private static $version = '1.0.0';
|
28 |
-
/**
|
29 |
-
* @var array The products which use the SDK.
|
30 |
-
*/
|
31 |
-
private static $products;
|
32 |
-
|
33 |
-
/**
|
34 |
-
* Register product into SDK.
|
35 |
-
*
|
36 |
-
* @param string $basefile The product basefile.
|
37 |
-
*
|
38 |
-
* @return ThemeIsle_SDK_Loader The singleton object.
|
39 |
-
*/
|
40 |
-
public static function init_product( $basefile ) {
|
41 |
-
|
42 |
-
if ( ! isset( self::$instance ) && ! ( self::$instance instanceof ThemeIsle_SDK_Loader ) ) {
|
43 |
-
self::$instance = new ThemeIsle_SDK_Loader;
|
44 |
-
|
45 |
-
}
|
46 |
-
$product_object = new ThemeIsle_SDK_Product( $basefile );
|
47 |
-
self::$products[ $product_object->get_slug() ] = $product_object;
|
48 |
-
|
49 |
-
$notifications = array();
|
50 |
-
// Based on the WordPress Available file header we enable the logger or not.
|
51 |
-
if ( ! $product_object->is_wordpress_available() && apply_filters( $product_object->get_key() . '_enable_licenser', true ) === true ) {
|
52 |
-
$licenser = new ThemeIsle_SDK_Licenser( $product_object );
|
53 |
-
$licenser->enable();
|
54 |
-
}
|
55 |
-
|
56 |
-
$logger = new ThemeIsle_SDK_Logger( $product_object );
|
57 |
-
if ( $product_object->is_logger_active() ) {
|
58 |
-
$logger->enable();
|
59 |
-
} else {
|
60 |
-
$notifications[] = $logger;
|
61 |
-
}
|
62 |
-
|
63 |
-
$feedback = new ThemeIsle_SDK_Feedback_Factory( $product_object, $product_object->get_feedback_types() );
|
64 |
-
|
65 |
-
$instances = $feedback->get_instances();
|
66 |
-
if ( array_key_exists( 'review', $instances ) ) {
|
67 |
-
$notifications[] = $instances['review'];
|
68 |
-
}
|
69 |
-
if ( array_key_exists( 'translate', $instances ) ) {
|
70 |
-
$notifications[] = $instances['translate'];
|
71 |
-
}
|
72 |
-
new ThemeIsle_SDK_Notification_Manager( $product_object, $notifications );
|
73 |
-
if ( ! $product_object->is_external_author() ) {
|
74 |
-
new ThemeIsle_SDK_Widgets_Factory( $product_object, $product_object->get_widget_types() );
|
75 |
-
}
|
76 |
-
if ( ! $product_object->is_external_author() ) {
|
77 |
-
new ThemeIsle_SDK_Rollback( $product_object );
|
78 |
-
}
|
79 |
-
|
80 |
-
new ThemeIsle_SDK_Endpoints( $product_object );
|
81 |
-
|
82 |
-
return self::$instance;
|
83 |
-
}
|
84 |
-
|
85 |
-
/**
|
86 |
-
* Get all products using the SDK.
|
87 |
-
*
|
88 |
-
* @return array Products available.
|
89 |
-
*/
|
90 |
-
public static function get_products() {
|
91 |
-
return self::$products;
|
92 |
-
}
|
93 |
-
|
94 |
-
|
95 |
-
}
|
96 |
-
endif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-logger.php
DELETED
@@ -1,227 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The main loader class for ThemeIsle SDK
|
4 |
-
*
|
5 |
-
* @package ThemeIsleSDK
|
6 |
-
* @subpackage Logger
|
7 |
-
* @copyright Copyright (c) 2017, Marius Cristea
|
8 |
-
* @license http://opensource.org/licenses/gpl-3.0.php GNU Public License
|
9 |
-
* @since 1.0.0
|
10 |
-
*/
|
11 |
-
if ( ! class_exists( 'ThemeIsle_SDK_Logger' ) ) :
|
12 |
-
/**
|
13 |
-
* Class ThemeIsle_SDK_Logger
|
14 |
-
*
|
15 |
-
* Send the statistics to the Themeisle Endpoint
|
16 |
-
*/
|
17 |
-
/**
|
18 |
-
* Class ThemeIsle_SDK_Logger
|
19 |
-
*/
|
20 |
-
class ThemeIsle_SDK_Logger {
|
21 |
-
|
22 |
-
/**
|
23 |
-
* @var string $logging_url Url where to send the logs
|
24 |
-
*/
|
25 |
-
private $logging_url = 'http://log.themeisle.com/wp-json/v1/logs/';
|
26 |
-
|
27 |
-
/**
|
28 |
-
* @var ThemeIsle_SDK_Product $product Themeisle Product.
|
29 |
-
*/
|
30 |
-
private $product;
|
31 |
-
|
32 |
-
/**
|
33 |
-
* @var string $product_cron Cron name handler
|
34 |
-
*/
|
35 |
-
private $product_cron;
|
36 |
-
|
37 |
-
/**
|
38 |
-
* @var string $heading The heading of the modal
|
39 |
-
*/
|
40 |
-
private $heading = 'Do you enjoy <b>{product}</b>? Become a contributor by opting in to our anonymous data tracking. We guarantee no sensitive data is collected.';
|
41 |
-
|
42 |
-
/**
|
43 |
-
* @var string $button_submit The text of the submit button
|
44 |
-
*/
|
45 |
-
private $button_submit = 'Sure, I would love to help.';
|
46 |
-
|
47 |
-
/**
|
48 |
-
* @var string $button_cancel The text of the cancel button
|
49 |
-
*/
|
50 |
-
private $button_cancel = 'No, thanks.';
|
51 |
-
|
52 |
-
/**
|
53 |
-
* ThemeIsle_SDK_Logger constructor.
|
54 |
-
*
|
55 |
-
* @param ThemeIsle_SDK_Product $product_object Product Object.
|
56 |
-
*/
|
57 |
-
public function __construct( $product_object ) {
|
58 |
-
if ( $product_object instanceof ThemeIsle_SDK_Product ) {
|
59 |
-
$this->product = $product_object;
|
60 |
-
$this->product_cron = $product_object->get_key() . '_log_activity';
|
61 |
-
}
|
62 |
-
add_action( 'wp_ajax_' . $this->product->get_key() . __CLASS__, array( $this, 'dismiss' ) );
|
63 |
-
}
|
64 |
-
|
65 |
-
|
66 |
-
/**
|
67 |
-
* Start the cron to send the log. It will randomize the interval in order to not send all the logs at the same time.
|
68 |
-
*/
|
69 |
-
public function enable() {
|
70 |
-
if ( ! wp_next_scheduled( $this->product_cron ) ) {
|
71 |
-
wp_schedule_single_event( time() + ( rand( 15, 24 ) * 3600 ), $this->product_cron );
|
72 |
-
}
|
73 |
-
add_action( $this->product_cron, array( $this, 'send_log' ) );
|
74 |
-
}
|
75 |
-
|
76 |
-
/**
|
77 |
-
* Send the statistics to the api endpoint
|
78 |
-
*/
|
79 |
-
public function send_log() {
|
80 |
-
$environment = array();
|
81 |
-
$theme = wp_get_theme();
|
82 |
-
$environment['theme'] = array();
|
83 |
-
$environment['theme']['name'] = $theme->get( 'Name' );
|
84 |
-
$environment['theme']['author'] = $theme->get( 'Author' );
|
85 |
-
$environment['plugins'] = get_option( 'active_plugins' );
|
86 |
-
|
87 |
-
wp_remote_post(
|
88 |
-
$this->logging_url, array(
|
89 |
-
'method' => 'POST',
|
90 |
-
'timeout' => 3,
|
91 |
-
'redirection' => 5,
|
92 |
-
'headers' => array(
|
93 |
-
'X-ThemeIsle-Event' => 'log_site',
|
94 |
-
),
|
95 |
-
'body' => array(
|
96 |
-
'site' => get_site_url(),
|
97 |
-
'slug' => $this->product->get_slug(),
|
98 |
-
'version' => $this->product->get_version(),
|
99 |
-
'data' => apply_filters( $this->product->get_key() . '_logger_data', array() ),
|
100 |
-
'environment' => $environment,
|
101 |
-
'license' => apply_filters( $this->product->get_key() . '_license_status', '' ),
|
102 |
-
),
|
103 |
-
)
|
104 |
-
);
|
105 |
-
}
|
106 |
-
|
107 |
-
/**
|
108 |
-
* Dismiss the notification
|
109 |
-
*/
|
110 |
-
function dismiss() {
|
111 |
-
check_ajax_referer( (string) __CLASS__, 'nonce' );
|
112 |
-
|
113 |
-
$flag = intval( $_POST['enable'] ) === 1;
|
114 |
-
update_option( $this->product->logger_option, ( $flag ? 'yes' : 'no' ) );
|
115 |
-
|
116 |
-
if ( true === $flag ) {
|
117 |
-
$this->enable();
|
118 |
-
}
|
119 |
-
}
|
120 |
-
|
121 |
-
/**
|
122 |
-
* Either we should show the notification or not.
|
123 |
-
*
|
124 |
-
* @return bool Valida notification.
|
125 |
-
*/
|
126 |
-
function can_notify() {
|
127 |
-
$show = $this->product->is_logger_active();
|
128 |
-
$checked = get_option( $this->product->logger_option, '' );
|
129 |
-
if ( ! $show && $checked == '' ) {
|
130 |
-
return true;
|
131 |
-
}
|
132 |
-
|
133 |
-
return false;
|
134 |
-
}
|
135 |
-
|
136 |
-
/**
|
137 |
-
* Shows the notification
|
138 |
-
*/
|
139 |
-
function show_notification() {
|
140 |
-
add_action( 'admin_notices', array( $this, 'admin_notices' ) );
|
141 |
-
}
|
142 |
-
|
143 |
-
/**
|
144 |
-
* Shows the admin notice
|
145 |
-
*/
|
146 |
-
function admin_notices() {
|
147 |
-
$id = $this->product->get_key() . '_logger';
|
148 |
-
|
149 |
-
$this->add_media( $this->product->get_key() );
|
150 |
-
|
151 |
-
echo '<div class="notice notice-success is-dismissible " id="' . $this->product->get_key() . '-logger-notification" ><div id="' . $id . '" class="themeisle-logger-box">' . $this->get_html( $this->product->get_key() ) . '</div></div>';
|
152 |
-
}
|
153 |
-
|
154 |
-
/**
|
155 |
-
* Generates the HTML
|
156 |
-
*
|
157 |
-
* @param string $key The product key.
|
158 |
-
*/
|
159 |
-
function get_html( $key ) {
|
160 |
-
$heading = apply_filters( $this->product->get_key() . '_logger_heading', $this->heading );
|
161 |
-
$heading = str_replace(
|
162 |
-
array( '{product}' ), array(
|
163 |
-
trim( str_replace( 'Lite', '', $this->product->get_name() ) ),
|
164 |
-
),
|
165 |
-
$heading
|
166 |
-
);
|
167 |
-
$button_submit = apply_filters( $this->product->get_key() . '_logger_button_submit', $this->button_submit );
|
168 |
-
$button_cancel = apply_filters( $this->product->get_key() . '_logger_button_cancel', $this->button_cancel );
|
169 |
-
|
170 |
-
return '<div >'
|
171 |
-
. '<p>' . $heading . '</p>'
|
172 |
-
. '<div class="actions">'
|
173 |
-
. get_submit_button(
|
174 |
-
$button_submit, 'primary ' . $this->product->get_key() . '-ti-logger', $this->product->get_key() . 'ti-logger-yes', false, array(
|
175 |
-
'data-ti-log-enable' => 1,
|
176 |
-
)
|
177 |
-
)
|
178 |
-
. get_submit_button(
|
179 |
-
$button_cancel, 'secondary ' . $this->product->get_key() . '-ti-logger', $this->product->get_key() . 'ti-logger-no', false, array(
|
180 |
-
'data-ti-log-enable' => 0,
|
181 |
-
)
|
182 |
-
)
|
183 |
-
. '</div></div>';
|
184 |
-
}
|
185 |
-
|
186 |
-
/**
|
187 |
-
* Loads the js
|
188 |
-
*
|
189 |
-
* @param string $key The product key.
|
190 |
-
*/
|
191 |
-
function add_media( $key ) {
|
192 |
-
?>
|
193 |
-
<style type="text/css">
|
194 |
-
#<?php echo $key; ?>-logger-notification {
|
195 |
-
padding-bottom: 5px;
|
196 |
-
}
|
197 |
-
|
198 |
-
#<?php echo $key; ?>-logger-notification .button {
|
199 |
-
margin-left: 5px;
|
200 |
-
}
|
201 |
-
</style>
|
202 |
-
<script type="text/javascript" id="<?php echo $key; ?>ti-logger-js">
|
203 |
-
(function ($) {
|
204 |
-
$(document).ready(function () {
|
205 |
-
$('.<?php echo $key; ?>-ti-logger').on('click', function (e) {
|
206 |
-
|
207 |
-
$.ajax({
|
208 |
-
url: ajaxurl,
|
209 |
-
method: "post",
|
210 |
-
data: {
|
211 |
-
'nonce': '<?php echo wp_create_nonce( (string) __CLASS__ ); ?>',
|
212 |
-
'action': '<?php echo $this->product->get_key() . __CLASS__; ?>',
|
213 |
-
'enable': $(this).attr('data-ti-log-enable')
|
214 |
-
},
|
215 |
-
success: function () {
|
216 |
-
$('#<?php echo $key; ?>-logger-notification').hide();
|
217 |
-
}
|
218 |
-
});
|
219 |
-
});
|
220 |
-
});
|
221 |
-
})(jQuery);
|
222 |
-
</script>
|
223 |
-
<?php
|
224 |
-
}
|
225 |
-
|
226 |
-
}
|
227 |
-
endif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-notification-manager.php
DELETED
@@ -1,105 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The notification manager class for ThemeIsle SDK
|
4 |
-
*
|
5 |
-
* @package ThemeIsleSDK
|
6 |
-
* @subpackage Notification
|
7 |
-
* @copyright Copyright (c) 2017, Marius Cristea
|
8 |
-
* @license http://opensource.org/licenses/gpl-3.0.php GNU Public License
|
9 |
-
* @since 1.0.0
|
10 |
-
*/
|
11 |
-
// Exit if accessed directly.
|
12 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
13 |
-
exit;
|
14 |
-
}
|
15 |
-
if ( ! class_exists( 'ThemeIsle_SDK_Notification_Manager' ) ) :
|
16 |
-
/**
|
17 |
-
* Notification manager model for ThemeIsle SDK.
|
18 |
-
*/
|
19 |
-
class ThemeIsle_SDK_Notification_Manager {
|
20 |
-
/**
|
21 |
-
* Time between notifications.
|
22 |
-
*/
|
23 |
-
const NOTIFICATION_INTERVAL_HOURS = 100;
|
24 |
-
/**
|
25 |
-
* @var array Notifications for the current product.
|
26 |
-
*/
|
27 |
-
static private $notifications = array();
|
28 |
-
/**
|
29 |
-
* @var ThemeIsle_SDK_Product Current product.
|
30 |
-
*/
|
31 |
-
private $product;
|
32 |
-
/**
|
33 |
-
* @var array ThemeIsle_SDK_Feedback Feedbacks available.
|
34 |
-
*/
|
35 |
-
private $callbacks = array();
|
36 |
-
|
37 |
-
/**
|
38 |
-
* ThemeIsle_SDK_Notification_Manager constructor.
|
39 |
-
*
|
40 |
-
* @param ThemeIsle_SDK_Product $product_object Product Object.
|
41 |
-
* @param array $callbacks the objects that will be called when a notification is due.
|
42 |
-
*/
|
43 |
-
public function __construct( $product_object, $callbacks ) {
|
44 |
-
$this->product = $product_object;
|
45 |
-
$this->callbacks = $callbacks;
|
46 |
-
$this->setup_hooks();
|
47 |
-
}
|
48 |
-
|
49 |
-
/**
|
50 |
-
* Setup the notifications.
|
51 |
-
*/
|
52 |
-
function setup_notifications() {
|
53 |
-
if ( ! current_user_can( 'manage_options' ) ) {
|
54 |
-
return;
|
55 |
-
}
|
56 |
-
// Load the notifications only if we have it installed after the required interval.
|
57 |
-
if ( ( time() - $this->product->get_install_time() ) > self::NOTIFICATION_INTERVAL_HOURS * HOUR_IN_SECONDS ) {
|
58 |
-
if ( $this->product instanceof ThemeIsle_SDK_Product && $this->callbacks && is_array( $this->callbacks ) ) {
|
59 |
-
foreach ( $this->callbacks as $instance ) {
|
60 |
-
self::$notifications[ $this->product->get_key() . get_class( $instance ) ] = $instance;
|
61 |
-
}
|
62 |
-
}
|
63 |
-
}
|
64 |
-
}
|
65 |
-
|
66 |
-
/**
|
67 |
-
* Setup the internal hooks
|
68 |
-
*/
|
69 |
-
private function setup_hooks() {
|
70 |
-
add_action( 'admin_head', array( $this, 'show_notification' ) );
|
71 |
-
add_action( 'admin_init', array( $this, 'setup_notifications' ) );
|
72 |
-
}
|
73 |
-
|
74 |
-
/**
|
75 |
-
* Shows the notification
|
76 |
-
*/
|
77 |
-
function show_notification() {
|
78 |
-
$instances = self::$notifications;
|
79 |
-
if ( empty( $instances ) ) {
|
80 |
-
return;
|
81 |
-
}
|
82 |
-
|
83 |
-
$available = array_keys( $instances );
|
84 |
-
$active = get_option( 'themeisle_sdk_active_notification', array() );
|
85 |
-
|
86 |
-
foreach ( $available as $key ) {
|
87 |
-
$instance = $instances[ $key ];
|
88 |
-
if ( $instance->can_notify() ) {
|
89 |
-
|
90 |
-
// Detect notification switch.
|
91 |
-
if ( empty( $active['key'] ) || ( $active['key'] != $key ) ) {
|
92 |
-
$active['key'] = $key;
|
93 |
-
$active['time'] = time();
|
94 |
-
update_option( 'themeisle_sdk_active_notification', $active );
|
95 |
-
}
|
96 |
-
if ( ( time() - $active['time'] ) > ( self::NOTIFICATION_INTERVAL_HOURS * HOUR_IN_SECONDS ) ) {
|
97 |
-
$instance->show_notification();
|
98 |
-
}
|
99 |
-
break;
|
100 |
-
}
|
101 |
-
}
|
102 |
-
|
103 |
-
}
|
104 |
-
}
|
105 |
-
endif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-product.php
DELETED
@@ -1,635 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The product model class for ThemeIsle SDK
|
4 |
-
*
|
5 |
-
* @package ThemeIsleSDK
|
6 |
-
* @subpackage Product
|
7 |
-
* @copyright Copyright (c) 2017, Marius Cristea
|
8 |
-
* @license http://opensource.org/licenses/gpl-3.0.php GNU Public License
|
9 |
-
* @since 1.0.0
|
10 |
-
*/
|
11 |
-
// Exit if accessed directly.
|
12 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
13 |
-
exit;
|
14 |
-
}
|
15 |
-
if ( ! class_exists( 'ThemeIsle_SDK_Product' ) ) :
|
16 |
-
/**
|
17 |
-
* Product model for ThemeIsle SDK.
|
18 |
-
*/
|
19 |
-
class ThemeIsle_SDK_Product {
|
20 |
-
/**
|
21 |
-
* @var string $slug THe product slug.
|
22 |
-
*/
|
23 |
-
private $slug;
|
24 |
-
/**
|
25 |
-
* @var string $basefile The file with headers.
|
26 |
-
*/
|
27 |
-
private $basefile;
|
28 |
-
/**
|
29 |
-
* @var string $type The product type ( plugin | theme ).
|
30 |
-
*/
|
31 |
-
private $type;
|
32 |
-
/**
|
33 |
-
* @var string $file The file name.
|
34 |
-
*/
|
35 |
-
private $file;
|
36 |
-
/**
|
37 |
-
* @var string $name The product name.
|
38 |
-
*/
|
39 |
-
private $name;
|
40 |
-
/**
|
41 |
-
* @var string $key The product ready key.
|
42 |
-
*/
|
43 |
-
private $key;
|
44 |
-
/**
|
45 |
-
* @var string $author_url The url of the author.
|
46 |
-
*/
|
47 |
-
private $author_url;
|
48 |
-
/**
|
49 |
-
* @var string $store_url The store url.
|
50 |
-
*/
|
51 |
-
private $store_url;
|
52 |
-
/**
|
53 |
-
* @var int $install The date of install.
|
54 |
-
*/
|
55 |
-
private $install;
|
56 |
-
/**
|
57 |
-
* @var string $store_name The store name.
|
58 |
-
*/
|
59 |
-
private $store_name;
|
60 |
-
/**
|
61 |
-
* @var array $allowed_authors The allowed authors.
|
62 |
-
*/
|
63 |
-
private $allowed_authors = array(
|
64 |
-
'proteusthemes.com',
|
65 |
-
'anarieldesign.com',
|
66 |
-
'prothemedesign.com',
|
67 |
-
'cssigniter.com',
|
68 |
-
);
|
69 |
-
/**
|
70 |
-
* @var array $allowed_external_products The allowed external_products.
|
71 |
-
*/
|
72 |
-
private $allowed_products = array(
|
73 |
-
'zermatt',
|
74 |
-
'neto',
|
75 |
-
'olsen',
|
76 |
-
'benson',
|
77 |
-
'romero',
|
78 |
-
'carmack',
|
79 |
-
'puzzle',
|
80 |
-
'broadsheet',
|
81 |
-
'girlywp',
|
82 |
-
'veggie',
|
83 |
-
'zeko',
|
84 |
-
'maishawp',
|
85 |
-
'didi',
|
86 |
-
'liber',
|
87 |
-
'medicpress-pt',
|
88 |
-
'adrenaline-pt',
|
89 |
-
'consultpress-pt',
|
90 |
-
'legalpress-pt',
|
91 |
-
'gympress-pt',
|
92 |
-
'readable-pt',
|
93 |
-
'bolts-pt',
|
94 |
-
);
|
95 |
-
/**
|
96 |
-
* @var bool $requires_license Either user needs to activate it with license.
|
97 |
-
*/
|
98 |
-
private $requires_license;
|
99 |
-
/**
|
100 |
-
* @var bool $wordpress_available Either is available on WordPress or not.
|
101 |
-
*/
|
102 |
-
private $wordpress_available;
|
103 |
-
/**
|
104 |
-
* @var string $version The product version.
|
105 |
-
*/
|
106 |
-
private $version;
|
107 |
-
/**
|
108 |
-
* @var string $logger_option Logger option key.
|
109 |
-
*/
|
110 |
-
public $logger_option;
|
111 |
-
/**
|
112 |
-
* @var string $pro_slug Pro slug, if available.
|
113 |
-
*/
|
114 |
-
public $pro_slug;
|
115 |
-
/**
|
116 |
-
* @var string $feedback_types All the feedback types the product supports
|
117 |
-
*/
|
118 |
-
private $feedback_types = array();
|
119 |
-
|
120 |
-
/**
|
121 |
-
* @var string $widget_types All the widget types the product supports
|
122 |
-
*/
|
123 |
-
private $widget_types = array( 'dashboard_blog' );
|
124 |
-
|
125 |
-
/**
|
126 |
-
* ThemeIsle_SDK_Product constructor.
|
127 |
-
*
|
128 |
-
* @param string $basefile Product basefile.
|
129 |
-
*/
|
130 |
-
public function __construct( $basefile ) {
|
131 |
-
if ( ! empty( $basefile ) ) {
|
132 |
-
if ( is_readable( $basefile ) ) {
|
133 |
-
$this->basefile = $basefile;
|
134 |
-
$this->setup_from_path();
|
135 |
-
$this->setup_from_fileheaders();
|
136 |
-
}
|
137 |
-
}
|
138 |
-
$install = get_option( $this->get_key() . '_install', 0 );
|
139 |
-
if ( $install === 0 ) {
|
140 |
-
$install = time();
|
141 |
-
update_option( $this->get_key() . '_install', time() );
|
142 |
-
}
|
143 |
-
$this->install = $install;
|
144 |
-
|
145 |
-
$this->logger_option = $this->get_key() . '_logger_flag';
|
146 |
-
|
147 |
-
}
|
148 |
-
|
149 |
-
/**
|
150 |
-
* Setup props from fileheaders.
|
151 |
-
*/
|
152 |
-
public function setup_from_fileheaders() {
|
153 |
-
$file_headers = array(
|
154 |
-
'Requires License' => 'Requires License',
|
155 |
-
'WordPress Available' => 'WordPress Available',
|
156 |
-
'Pro Slug' => 'Pro Slug',
|
157 |
-
'Version' => 'Version',
|
158 |
-
);
|
159 |
-
if ( $this->type == 'plugin' ) {
|
160 |
-
$file_headers['Name'] = 'Plugin Name';
|
161 |
-
$file_headers['AuthorName'] = 'Author';
|
162 |
-
$file_headers['AuthorURI'] = 'Author URI';
|
163 |
-
}
|
164 |
-
if ( $this->type == 'theme' ) {
|
165 |
-
$file_headers['Name'] = 'Theme Name';
|
166 |
-
$file_headers['AuthorName'] = 'Author';
|
167 |
-
$file_headers['AuthorURI'] = 'Author URI';
|
168 |
-
}
|
169 |
-
$file_headers = get_file_data( $this->basefile, $file_headers );
|
170 |
-
|
171 |
-
$this->name = $file_headers['Name'];
|
172 |
-
$this->store_name = $file_headers['AuthorName'];
|
173 |
-
$this->author_url = $file_headers['AuthorURI'];
|
174 |
-
$this->store_url = $file_headers['AuthorURI'];
|
175 |
-
if ( $this->is_external_author() ) {
|
176 |
-
$this->store_url = 'https://themeisle.com';
|
177 |
-
$this->store_name = 'ThemeIsle';
|
178 |
-
}
|
179 |
-
$this->requires_license = ( $file_headers['Requires License'] == 'yes' ) ? true : false;
|
180 |
-
$this->wordpress_available = ( $file_headers['WordPress Available'] == 'yes' ) ? true : false;
|
181 |
-
$this->pro_slug = ! empty( $file_headers['Pro Slug'] ) ? $file_headers['Pro Slug'] : '';
|
182 |
-
$this->version = $file_headers['Version'];
|
183 |
-
if ( $this->require_uninstall_feedback() ) {
|
184 |
-
$this->feedback_types[] = 'deactivate';
|
185 |
-
}
|
186 |
-
if ( $this->is_wordpress_available() ) {
|
187 |
-
$this->feedback_types[] = 'review';
|
188 |
-
$this->feedback_types[] = 'translate';
|
189 |
-
}
|
190 |
-
}
|
191 |
-
|
192 |
-
/**
|
193 |
-
* Check if the product is by external author or not.
|
194 |
-
*
|
195 |
-
* @return bool Either is external author or no.
|
196 |
-
*/
|
197 |
-
public function is_external_author() {
|
198 |
-
foreach ( $this->allowed_authors as $author ) {
|
199 |
-
if ( strpos( $this->author_url, $author ) !== false ) {
|
200 |
-
return true;
|
201 |
-
}
|
202 |
-
if ( in_array( $this->get_slug(), $this->allowed_products ) ) {
|
203 |
-
return true;
|
204 |
-
}
|
205 |
-
}
|
206 |
-
|
207 |
-
return false;
|
208 |
-
}
|
209 |
-
|
210 |
-
/**
|
211 |
-
* The magic var_dump info method.
|
212 |
-
*
|
213 |
-
* @return array Debug info.
|
214 |
-
*/
|
215 |
-
public function __debugInfo() {
|
216 |
-
return array(
|
217 |
-
'name' => $this->name,
|
218 |
-
'slug' => $this->slug,
|
219 |
-
'version' => $this->version,
|
220 |
-
'basefile' => $this->basefile,
|
221 |
-
'key' => $this->key,
|
222 |
-
'type' => $this->type,
|
223 |
-
'store_name' => $this->store_name,
|
224 |
-
'store_url' => $this->store_url,
|
225 |
-
'wordpress_available' => $this->wordpress_available,
|
226 |
-
'requires_license' => $this->requires_license,
|
227 |
-
);
|
228 |
-
|
229 |
-
}
|
230 |
-
|
231 |
-
/**
|
232 |
-
* Setup props from path.
|
233 |
-
*/
|
234 |
-
public function setup_from_path() {
|
235 |
-
$this->file = basename( $this->basefile );
|
236 |
-
$dir = dirname( $this->basefile );
|
237 |
-
$this->slug = basename( $dir );
|
238 |
-
$exts = explode( '.', $this->basefile );
|
239 |
-
$ext = $exts[ count( $exts ) - 1 ];
|
240 |
-
if ( $ext == 'css' ) {
|
241 |
-
$this->type = 'theme';
|
242 |
-
}
|
243 |
-
if ( $ext == 'php' ) {
|
244 |
-
$this->type = 'plugin';
|
245 |
-
}
|
246 |
-
$this->key = self::key_ready_name( $this->slug );
|
247 |
-
}
|
248 |
-
|
249 |
-
/**
|
250 |
-
* @param string $string the String to be normalized for cron handler.
|
251 |
-
*
|
252 |
-
* @return string $name The normalized string.
|
253 |
-
*/
|
254 |
-
static function key_ready_name( $string ) {
|
255 |
-
return str_replace( '-', '_', strtolower( trim( $string ) ) );
|
256 |
-
}
|
257 |
-
|
258 |
-
/**
|
259 |
-
* Getter for product name.
|
260 |
-
*
|
261 |
-
* @return string The product name.
|
262 |
-
*/
|
263 |
-
public function get_name() {
|
264 |
-
return $this->name;
|
265 |
-
}
|
266 |
-
|
267 |
-
/**
|
268 |
-
* Getter for product version.
|
269 |
-
*
|
270 |
-
* @return string The product version.
|
271 |
-
*/
|
272 |
-
public function get_version() {
|
273 |
-
return $this->version;
|
274 |
-
}
|
275 |
-
|
276 |
-
/**
|
277 |
-
* If product is available on wordpress.org or not.
|
278 |
-
*
|
279 |
-
* @return bool Either is wp available or not.
|
280 |
-
*/
|
281 |
-
public function is_wordpress_available() {
|
282 |
-
return $this->wordpress_available;
|
283 |
-
}
|
284 |
-
|
285 |
-
/**
|
286 |
-
* @return array Array of available versions.
|
287 |
-
*/
|
288 |
-
private function get_plugin_versions() {
|
289 |
-
|
290 |
-
$url = sprintf( 'https://api.wordpress.org/plugins/info/1.0/%s', $this->get_slug() );
|
291 |
-
$response = wp_remote_get( $url );
|
292 |
-
if ( is_wp_error( $response ) ) {
|
293 |
-
return array();
|
294 |
-
}
|
295 |
-
$response = wp_remote_retrieve_body( $response );
|
296 |
-
$response = maybe_unserialize( $response );
|
297 |
-
|
298 |
-
if ( ! is_object( $response ) ) {
|
299 |
-
return array();
|
300 |
-
}
|
301 |
-
if ( ! isset( $response->versions ) ) {
|
302 |
-
return array();
|
303 |
-
}
|
304 |
-
$versions = array();
|
305 |
-
foreach ( $response->versions as $version => $zip ) {
|
306 |
-
$versions[] = array(
|
307 |
-
'version' => $version,
|
308 |
-
'url' => $zip,
|
309 |
-
);
|
310 |
-
}
|
311 |
-
|
312 |
-
return $versions;
|
313 |
-
}
|
314 |
-
|
315 |
-
/**
|
316 |
-
* @return string Return license key, if available.
|
317 |
-
*/
|
318 |
-
private function get_license() {
|
319 |
-
$license_data = get_option( $this->get_key() . '_license_data', '' );
|
320 |
-
|
321 |
-
if ( empty( $license_data ) ) {
|
322 |
-
return '';
|
323 |
-
}
|
324 |
-
if ( ! isset( $license_data->key ) ) {
|
325 |
-
return '';
|
326 |
-
}
|
327 |
-
|
328 |
-
return $license_data->key;
|
329 |
-
}
|
330 |
-
|
331 |
-
/**
|
332 |
-
* @return array Array of available versions.
|
333 |
-
*/
|
334 |
-
private function get_pro_versions() {
|
335 |
-
$license = $this->get_license();
|
336 |
-
$store_url = trailingslashit( $this->store_url );
|
337 |
-
$url = sprintf( '%s?edd_action=get_versions&name=%s&url=%s&license=%s', $store_url, urlencode( $this->get_name() ), urlencode( get_site_url() ), $license );
|
338 |
-
$response = wp_remote_get( $url );
|
339 |
-
if ( is_wp_error( $response ) ) {
|
340 |
-
return array();
|
341 |
-
}
|
342 |
-
$response = wp_remote_retrieve_body( $response );
|
343 |
-
$response = json_decode( $response );
|
344 |
-
if ( ! is_object( $response ) ) {
|
345 |
-
return array();
|
346 |
-
}
|
347 |
-
if ( ! isset( $response->versions ) ) {
|
348 |
-
return array();
|
349 |
-
}
|
350 |
-
$versions = array();
|
351 |
-
foreach ( $response->versions as $key => $version ) {
|
352 |
-
$versions[] = array(
|
353 |
-
'version' => $version->version,
|
354 |
-
'url' => $version->file,
|
355 |
-
);
|
356 |
-
}
|
357 |
-
|
358 |
-
return $versions;
|
359 |
-
}
|
360 |
-
|
361 |
-
/**
|
362 |
-
* Return theme versions.
|
363 |
-
*
|
364 |
-
* @return array Theme versions array.
|
365 |
-
*/
|
366 |
-
public function get_theme_versions() {
|
367 |
-
$url = sprintf( 'https://api.wordpress.org/themes/info/1.1/?action=theme_information&request[slug]=%s&request[fields][versions]=true', $this->get_slug() );
|
368 |
-
$response = wp_remote_get( $url );
|
369 |
-
if ( is_wp_error( $response ) ) {
|
370 |
-
return array();
|
371 |
-
}
|
372 |
-
$response = wp_remote_retrieve_body( $response );
|
373 |
-
$response = json_decode( $response );
|
374 |
-
|
375 |
-
if ( ! is_object( $response ) ) {
|
376 |
-
return array();
|
377 |
-
}
|
378 |
-
if ( ! isset( $response->versions ) ) {
|
379 |
-
return array();
|
380 |
-
}
|
381 |
-
$versions = array();
|
382 |
-
foreach ( $response->versions as $version => $zip ) {
|
383 |
-
$versions[] = array(
|
384 |
-
'version' => $version,
|
385 |
-
'url' => $zip,
|
386 |
-
);
|
387 |
-
}
|
388 |
-
|
389 |
-
return $versions;
|
390 |
-
}
|
391 |
-
|
392 |
-
/**
|
393 |
-
* Get versions array from wp.org
|
394 |
-
*
|
395 |
-
* @return array Array of versions.
|
396 |
-
*/
|
397 |
-
private function get_api_versions() {
|
398 |
-
|
399 |
-
$cache_key = $this->get_key() . '_' . preg_replace( '/[^0-9a-zA-Z ]/m', '', $this->version ) . 'versions';
|
400 |
-
$cache_versions = get_transient( $this->get_key() . '_' . preg_replace( '/[^0-9a-zA-Z ]/m', '', $this->version ) . 'versions' );
|
401 |
-
if ( false == $cache_versions ) {
|
402 |
-
$versions = array();
|
403 |
-
if ( ! $this->is_wordpress_available() ) {
|
404 |
-
$versions = $this->get_pro_versions();
|
405 |
-
} else {
|
406 |
-
if ( $this->get_type() === 'plugin' ) {
|
407 |
-
$versions = $this->get_plugin_versions();
|
408 |
-
}
|
409 |
-
if ( $this->get_type() === 'theme' ) {
|
410 |
-
$versions = $this->get_theme_versions();
|
411 |
-
}
|
412 |
-
}
|
413 |
-
set_transient( $cache_key, $versions, MONTH_IN_SECONDS );
|
414 |
-
} else {
|
415 |
-
$versions = is_array( $cache_versions ) ? $cache_versions : array();
|
416 |
-
}
|
417 |
-
|
418 |
-
return $versions;
|
419 |
-
}
|
420 |
-
|
421 |
-
/**
|
422 |
-
* Get the last rollback for this product.
|
423 |
-
*
|
424 |
-
* @return array The rollback version.
|
425 |
-
*/
|
426 |
-
public function get_rollback() {
|
427 |
-
$rollback = array();
|
428 |
-
$versions = $this->get_api_versions();
|
429 |
-
$versions = apply_filters( $this->get_key() . '_rollbacks', $versions );
|
430 |
-
|
431 |
-
if ( $versions ) {
|
432 |
-
usort( $versions, array( $this, 'sort_rollback_array' ) );
|
433 |
-
foreach ( $versions as $version ) {
|
434 |
-
if ( isset( $version['version'] ) && isset( $version['url'] ) && version_compare( $this->version, $version['version'], '>' ) ) {
|
435 |
-
$rollback = $version;
|
436 |
-
break;
|
437 |
-
}
|
438 |
-
}
|
439 |
-
}
|
440 |
-
|
441 |
-
return $rollback;
|
442 |
-
}
|
443 |
-
|
444 |
-
/**
|
445 |
-
* Sort the rollbacks array in descending order.
|
446 |
-
*/
|
447 |
-
public function sort_rollback_array( $a, $b ) {
|
448 |
-
return version_compare( $a['version'], $b['version'], '<' ) > 0;
|
449 |
-
}
|
450 |
-
|
451 |
-
/**
|
452 |
-
* If product can be rolled back.
|
453 |
-
*
|
454 |
-
* @return bool Can the product be rolled back or not.
|
455 |
-
*/
|
456 |
-
public function can_rollback() {
|
457 |
-
if ( $this->get_type() === 'theme' ) {
|
458 |
-
if ( ! current_user_can( 'switch_themes' ) ) {
|
459 |
-
return false;
|
460 |
-
}
|
461 |
-
}
|
462 |
-
if ( $this->get_type() === 'plugin' ) {
|
463 |
-
if ( ! current_user_can( 'install_plugins' ) ) {
|
464 |
-
return false;
|
465 |
-
}
|
466 |
-
}
|
467 |
-
$rollback = $this->get_rollback();
|
468 |
-
|
469 |
-
return ! empty( $rollback );
|
470 |
-
}
|
471 |
-
|
472 |
-
/**
|
473 |
-
* Return the product key.
|
474 |
-
*
|
475 |
-
* @return string The product key.
|
476 |
-
*/
|
477 |
-
public function get_key() {
|
478 |
-
return $this->key;
|
479 |
-
}
|
480 |
-
|
481 |
-
/**
|
482 |
-
* Return friendly name.
|
483 |
-
*
|
484 |
-
* @return string Friendly name.
|
485 |
-
*/
|
486 |
-
public function get_friendly_name() {
|
487 |
-
$name = apply_filters( $this->get_key() . '_friendly_name', trim( str_replace( 'Lite', '', $this->get_name() ) ) );
|
488 |
-
$name = rtrim( $name, '- ' );
|
489 |
-
|
490 |
-
return $name;
|
491 |
-
}
|
492 |
-
|
493 |
-
/**
|
494 |
-
* Either the product requires license or not.
|
495 |
-
*
|
496 |
-
* @return bool Either requires license or not.
|
497 |
-
*/
|
498 |
-
public function requires_license() {
|
499 |
-
return $this->requires_license;
|
500 |
-
}
|
501 |
-
|
502 |
-
/**
|
503 |
-
* Check if the product is either theme or plugin.
|
504 |
-
*
|
505 |
-
* @return string Product type.
|
506 |
-
*/
|
507 |
-
public function get_type() {
|
508 |
-
return $this->type;
|
509 |
-
}
|
510 |
-
|
511 |
-
/**
|
512 |
-
* Returns the Store name.
|
513 |
-
*
|
514 |
-
* @return string Store name.
|
515 |
-
*/
|
516 |
-
public function get_store_name() {
|
517 |
-
return $this->store_name;
|
518 |
-
}
|
519 |
-
|
520 |
-
/**
|
521 |
-
* Returns the store url.
|
522 |
-
*
|
523 |
-
* @return string The store url.
|
524 |
-
*/
|
525 |
-
public function get_store_url() {
|
526 |
-
return $this->store_url;
|
527 |
-
}
|
528 |
-
|
529 |
-
/**
|
530 |
-
* Returns the product slug.
|
531 |
-
*
|
532 |
-
* @return string The product slug.
|
533 |
-
*/
|
534 |
-
public function get_slug() {
|
535 |
-
return $this->slug;
|
536 |
-
}
|
537 |
-
|
538 |
-
/**
|
539 |
-
* Returns product basefile, which holds the metaheaders.
|
540 |
-
*
|
541 |
-
* @return string The product basefile.
|
542 |
-
*/
|
543 |
-
public function get_basefile() {
|
544 |
-
return $this->basefile;
|
545 |
-
}
|
546 |
-
|
547 |
-
/**
|
548 |
-
* Returns product filename.
|
549 |
-
*
|
550 |
-
* @return string The product filename.
|
551 |
-
*/
|
552 |
-
public function get_file() {
|
553 |
-
return $this->file;
|
554 |
-
}
|
555 |
-
|
556 |
-
/**
|
557 |
-
* Returns feedback types
|
558 |
-
*
|
559 |
-
* @return array The feedback types.
|
560 |
-
*/
|
561 |
-
public function get_feedback_types() {
|
562 |
-
return apply_filters( $this->get_key() . '_feedback_types', $this->feedback_types );
|
563 |
-
}
|
564 |
-
|
565 |
-
/**
|
566 |
-
* Returns widget types
|
567 |
-
*
|
568 |
-
* @return array The widget types.
|
569 |
-
*/
|
570 |
-
public function get_widget_types() {
|
571 |
-
return apply_filters( $this->get_key() . '_widget_types', $this->widget_types );
|
572 |
-
}
|
573 |
-
|
574 |
-
/**
|
575 |
-
* We log the user website and product version.
|
576 |
-
*
|
577 |
-
* @return bool Either we log the data or not.
|
578 |
-
*/
|
579 |
-
public function is_logger_active() {
|
580 |
-
// If is not available on WordPress log this automatically.
|
581 |
-
if ( ! $this->is_wordpress_available() ) {
|
582 |
-
return true;
|
583 |
-
} else {
|
584 |
-
$pro_slug = $this->get_pro_slug();
|
585 |
-
if ( ! empty( $pro_slug ) ) {
|
586 |
-
|
587 |
-
$all_products = ThemeIsle_SDK_Loader::get_products();
|
588 |
-
if ( isset( $all_products[ $pro_slug ] ) ) {
|
589 |
-
return true;
|
590 |
-
}
|
591 |
-
}
|
592 |
-
|
593 |
-
return ( get_option( $this->get_key() . '_logger_flag', 'no' ) === 'yes' );
|
594 |
-
|
595 |
-
}
|
596 |
-
}
|
597 |
-
|
598 |
-
/**
|
599 |
-
* Returns the pro slug, if available.
|
600 |
-
*
|
601 |
-
* @return string The pro slug.
|
602 |
-
*/
|
603 |
-
public function get_pro_slug() {
|
604 |
-
return $this->pro_slug;
|
605 |
-
}
|
606 |
-
|
607 |
-
/**
|
608 |
-
* Return the install timestamp.
|
609 |
-
*
|
610 |
-
* @return int The install timestamp.
|
611 |
-
*/
|
612 |
-
public function get_install_time() {
|
613 |
-
return $this->install;
|
614 |
-
}
|
615 |
-
|
616 |
-
/**
|
617 |
-
* We require feedback on uninstall.
|
618 |
-
*
|
619 |
-
* @return bool Either we should require feedback on uninstall or not.
|
620 |
-
*/
|
621 |
-
public function require_uninstall_feedback() {
|
622 |
-
if ( $this->get_type() == 'theme' && ! $this->is_external_author() ) {
|
623 |
-
return ! get_transient( 'ti_sdk_pause_' . $this->get_key(), false );
|
624 |
-
}
|
625 |
-
|
626 |
-
if ( $this->get_type() == 'plugin' ) {
|
627 |
-
|
628 |
-
return true;
|
629 |
-
}
|
630 |
-
|
631 |
-
return false;
|
632 |
-
}
|
633 |
-
|
634 |
-
}
|
635 |
-
endif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-rollback.php
DELETED
@@ -1,223 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The rollback class for ThemeIsle SDK
|
4 |
-
*
|
5 |
-
* @package ThemeIsleSDK
|
6 |
-
* @subpackage Rollback
|
7 |
-
* @copyright Copyright (c) 2017, Marius Cristea
|
8 |
-
* @license http://opensource.org/licenses/gpl-3.0.php GNU Public License
|
9 |
-
* @since 1.0.0
|
10 |
-
*/
|
11 |
-
// Exit if accessed directly.
|
12 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
13 |
-
exit;
|
14 |
-
}
|
15 |
-
if ( ! class_exists( 'ThemeIsle_SDK_Rollback' ) ) :
|
16 |
-
/**
|
17 |
-
* Rollback for ThemeIsle SDK.
|
18 |
-
*/
|
19 |
-
class ThemeIsle_SDK_Rollback {
|
20 |
-
|
21 |
-
/**
|
22 |
-
* @var ThemeIsle_SDK_Product $product Themeisle Product.
|
23 |
-
*/
|
24 |
-
protected $product;
|
25 |
-
|
26 |
-
|
27 |
-
/**
|
28 |
-
* ThemeIsle_SDK_Rollback constructor.
|
29 |
-
*
|
30 |
-
* @param ThemeIsle_SDK_Product $product_object Product Object.
|
31 |
-
*/
|
32 |
-
public function __construct( $product_object ) {
|
33 |
-
if ( $product_object instanceof ThemeIsle_SDK_Product ) {
|
34 |
-
$this->product = $product_object;
|
35 |
-
}
|
36 |
-
if ( $this->product->can_rollback() ) {
|
37 |
-
$this->show_link();
|
38 |
-
$this->add_hooks();
|
39 |
-
|
40 |
-
}
|
41 |
-
}
|
42 |
-
|
43 |
-
/**
|
44 |
-
* Add js scripts for themes rollback.
|
45 |
-
*/
|
46 |
-
public function add_footer() {
|
47 |
-
$screen = get_current_screen();
|
48 |
-
if ( ! isset( $screen->parent_file ) ) {
|
49 |
-
return;
|
50 |
-
}
|
51 |
-
if ( $screen->parent_file !== 'themes.php' ) {
|
52 |
-
return;
|
53 |
-
}
|
54 |
-
if ( $this->product->get_type() === 'plugin' ) {
|
55 |
-
return;
|
56 |
-
}
|
57 |
-
|
58 |
-
$version = $this->product->get_rollback();
|
59 |
-
?>
|
60 |
-
<script type="text/javascript">
|
61 |
-
jQuery(document).ready(function ($) {
|
62 |
-
setInterval(checkTheme, 500);
|
63 |
-
|
64 |
-
function checkTheme() {
|
65 |
-
var theme = '<?php echo esc_attr( $this->product->get_slug() ); ?>-action';
|
66 |
-
|
67 |
-
if (jQuery('#' + theme).length > 0) {
|
68 |
-
if (jQuery('.theme-overlay.active').is(':visible')) {
|
69 |
-
if (jQuery('#' + theme + '-rollback').length === 0) {
|
70 |
-
jQuery('.theme-actions .active-theme').prepend('<a class="button" style="float:left" id="' + theme + '-rollback" href="<?php echo esc_url( wp_nonce_url( admin_url( 'admin-post.php?action=' . $this->product->get_key() . '_rollback' ), $this->product->get_key() . '_rollback' ) ); ?>">Rollback to v<?php echo esc_attr( $version['version'] ); ?></a>')
|
71 |
-
}
|
72 |
-
}
|
73 |
-
|
74 |
-
}
|
75 |
-
}
|
76 |
-
})
|
77 |
-
|
78 |
-
</script>
|
79 |
-
<?php
|
80 |
-
|
81 |
-
}
|
82 |
-
|
83 |
-
/**
|
84 |
-
* Set the rollback hook. Strangely, this does not work if placed in the ThemeIsle_SDK_Rollback class, so it is being called from there instead.
|
85 |
-
*/
|
86 |
-
public function add_hooks() {
|
87 |
-
add_action( 'admin_post_' . $this->product->get_key() . '_rollback', array( $this, 'start_rollback' ) );
|
88 |
-
add_action( 'admin_footer', array( $this, 'add_footer' ) );
|
89 |
-
}
|
90 |
-
|
91 |
-
/**
|
92 |
-
* If product can be rolled back, show the link to rollback.
|
93 |
-
*/
|
94 |
-
private function show_link() {
|
95 |
-
add_filter(
|
96 |
-
'plugin_action_links_' . plugin_basename( $this->product->get_basefile() ), array(
|
97 |
-
$this,
|
98 |
-
'add_rollback_link',
|
99 |
-
)
|
100 |
-
);
|
101 |
-
}
|
102 |
-
|
103 |
-
/**
|
104 |
-
* Show the rollback links in the plugin page.
|
105 |
-
*
|
106 |
-
* @return array The links.
|
107 |
-
*/
|
108 |
-
public function add_rollback_link( $links ) {
|
109 |
-
$version = $this->product->get_rollback();
|
110 |
-
$links[] = '<a href="' . wp_nonce_url( admin_url( 'admin-post.php?action=' . $this->product->get_key() . '_rollback' ), $this->product->get_key() . '_rollback' ) . '">' . sprintf( apply_filters( $this->product->get_key() . '_rollback_label', 'Rollback to v%s' ), $version['version'] ) . '</a>';
|
111 |
-
|
112 |
-
return $links;
|
113 |
-
}
|
114 |
-
|
115 |
-
/**
|
116 |
-
* Start the rollback operation.
|
117 |
-
*/
|
118 |
-
public function start_rollback() {
|
119 |
-
if ( ! isset( $_GET['_wpnonce'] ) || ! wp_verify_nonce( $_GET['_wpnonce'], $this->product->get_key() . '_rollback' ) ) {
|
120 |
-
wp_nonce_ays( '' );
|
121 |
-
}
|
122 |
-
|
123 |
-
if ( $this->product->get_type() === 'plugin' ) {
|
124 |
-
$this->start_rollback_plugin();
|
125 |
-
} elseif ( $this->product->get_type() === 'theme' ) {
|
126 |
-
$this->start_rollback_theme();
|
127 |
-
}
|
128 |
-
}
|
129 |
-
|
130 |
-
/**
|
131 |
-
* Alter links and remove duplicate customize message.
|
132 |
-
*
|
133 |
-
* @param array $links Array of old links.
|
134 |
-
*
|
135 |
-
* @return mixed Array of links.
|
136 |
-
*/
|
137 |
-
public function alter_links_theme_upgrade( $links ) {
|
138 |
-
if ( isset( $links['preview'] ) ) {
|
139 |
-
$links['preview'] = str_replace( '<span aria-hidden="true">Customize</span>', '', $links['preview'] );
|
140 |
-
}
|
141 |
-
|
142 |
-
return $links;
|
143 |
-
}
|
144 |
-
|
145 |
-
/**
|
146 |
-
* Start the rollback operation for the theme.
|
147 |
-
*/
|
148 |
-
private function start_rollback_theme() {
|
149 |
-
add_filter( 'update_theme_complete_actions', array( $this, 'alter_links_theme_upgrade' ) );
|
150 |
-
$rollback = $this->product->get_rollback();
|
151 |
-
$transient = get_site_transient( 'update_themes' );
|
152 |
-
$folder = $this->product->get_slug();
|
153 |
-
$version = $rollback['version'];
|
154 |
-
$temp_array = array(
|
155 |
-
'new_version' => $version,
|
156 |
-
'package' => $rollback['url'],
|
157 |
-
);
|
158 |
-
|
159 |
-
$transient->response[ $folder . '/style.css' ] = $temp_array;
|
160 |
-
set_site_transient( 'update_themes', $transient );
|
161 |
-
|
162 |
-
$transient = get_transient( $this->product->get_key() . '_warning_rollback' );
|
163 |
-
|
164 |
-
if ( false === $transient ) {
|
165 |
-
set_transient( $this->product->get_key() . '_warning_rollback', 'in progress', 30 );
|
166 |
-
require_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
|
167 |
-
$title = sprintf( apply_filters( $this->product->get_key() . '_rollback_message', 'Rolling back %s to v%s' ), $this->product->get_name(), $version );
|
168 |
-
$theme = $folder . '/style.css';
|
169 |
-
$nonce = 'upgrade-theme_' . $theme;
|
170 |
-
$url = 'update.php?action=upgrade-theme&theme=' . urlencode( $theme );
|
171 |
-
|
172 |
-
$upgrader = new Theme_Upgrader( new Theme_Upgrader_Skin( compact( 'title', 'nonce', 'url', 'theme' ) ) );
|
173 |
-
$upgrader->upgrade( $theme );
|
174 |
-
delete_transient( $this->product->get_key() . '_warning_rollback' );
|
175 |
-
wp_die(
|
176 |
-
'', $title, array(
|
177 |
-
'response' => 200,
|
178 |
-
)
|
179 |
-
);
|
180 |
-
}
|
181 |
-
}
|
182 |
-
|
183 |
-
/**
|
184 |
-
* Start the rollback operation for the plugin.
|
185 |
-
*/
|
186 |
-
private function start_rollback_plugin() {
|
187 |
-
$rollback = $this->product->get_rollback();
|
188 |
-
$plugin_transient = get_site_transient( 'update_plugins' );
|
189 |
-
$plugin_folder = $this->product->get_slug();
|
190 |
-
$plugin_file = $this->product->get_file();
|
191 |
-
$version = $rollback['version'];
|
192 |
-
$temp_array = array(
|
193 |
-
'slug' => $plugin_folder,
|
194 |
-
'new_version' => $version,
|
195 |
-
'package' => $rollback['url'],
|
196 |
-
);
|
197 |
-
|
198 |
-
$temp_object = (object) $temp_array;
|
199 |
-
$plugin_transient->response[ $plugin_folder . '/' . $plugin_file ] = $temp_object;
|
200 |
-
set_site_transient( 'update_plugins', $plugin_transient );
|
201 |
-
|
202 |
-
$transient = get_transient( $this->product->get_key() . '_warning_rollback' );
|
203 |
-
|
204 |
-
if ( false === $transient ) {
|
205 |
-
set_transient( $this->product->get_key() . '_warning_rollback', 'in progress', 30 );
|
206 |
-
require_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
|
207 |
-
$title = sprintf( apply_filters( $this->product->get_key() . '_rollback_message', 'Rolling back %s to v%s' ), $this->product->get_name(), $version );
|
208 |
-
$plugin = $plugin_folder . '/' . $plugin_file;
|
209 |
-
$nonce = 'upgrade-plugin_' . $plugin;
|
210 |
-
$url = 'update.php?action=upgrade-plugin&plugin=' . urlencode( $plugin );
|
211 |
-
$upgrader_skin = new Plugin_Upgrader_Skin( compact( 'title', 'nonce', 'url', 'plugin' ) );
|
212 |
-
$upgrader = new Plugin_Upgrader( $upgrader_skin );
|
213 |
-
$upgrader->upgrade( $plugin );
|
214 |
-
delete_transient( $this->product->get_key() . '_warning_rollback' );
|
215 |
-
wp_die(
|
216 |
-
'', $title, array(
|
217 |
-
'response' => 200,
|
218 |
-
)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
2 |
-
/**
|
3 |
-
* The blog dashboard model class for ThemeIsle SDK
|
4 |
-
*
|
5 |
-
* @package ThemeIsleSDK
|
6 |
-
* @subpackage Widgets
|
7 |
-
* @copyright Copyright (c) 2017, Marius Cristea
|
8 |
-
* @license http://opensource.org/licenses/gpl-3.0.php GNU Public License
|
9 |
-
* @since 1.0.0
|
10 |
-
*/
|
11 |
-
// Exit if accessed directly.
|
12 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
13 |
-
exit;
|
14 |
-
}
|
15 |
-
if ( ! class_exists( 'ThemeIsle_SDK_Widget_Dashboard_Blog' ) ) :
|
16 |
-
/**
|
17 |
-
* Blog dashboard widget model for ThemeIsle SDK.
|
18 |
-
*/
|
19 |
-
class ThemeIsle_SDK_Widget_Dashboard_Blog extends ThemeIsle_SDK_Widget {
|
20 |
-
|
21 |
-
/**
|
22 |
-
* @var array instance The instances.
|
23 |
-
*/
|
24 |
-
protected $product;
|
25 |
-
/**
|
26 |
-
* @var array Feed items.
|
27 |
-
*/
|
28 |
-
private $items = array();
|
29 |
-
|
30 |
-
/**
|
31 |
-
* ThemeIsle_SDK_Widget_Dashboard_Blog constructor.
|
32 |
-
*
|
33 |
-
* @param ThemeIsle_SDK_Product $product_object The product object.
|
34 |
-
*/
|
35 |
-
public function __construct( $product_object ) {
|
36 |
-
$this->product = $product_object;
|
37 |
-
parent::__construct( $product_object );
|
38 |
-
}
|
39 |
-
|
40 |
-
/**
|
41 |
-
* Registers the hooks
|
42 |
-
*/
|
43 |
-
public function setup_hooks_child() {
|
44 |
-
$this->setup_vars();
|
45 |
-
add_action( 'wp_dashboard_setup', array( &$this, 'add_widget' ) );
|
46 |
-
add_action( 'wp_network_dashboard_setup', array( &$this, 'add_widget' ) );
|
47 |
-
add_filter( 'themeisle_sdk_recommend_plugin_or_theme', array( &$this, 'recommend_plugin_or_theme' ) );
|
48 |
-
}
|
49 |
-
|
50 |
-
/**
|
51 |
-
* Setup class variables
|
52 |
-
*/
|
53 |
-
function setup_vars() {
|
54 |
-
$this->dashboard_name = apply_filters( 'themeisle_sdk_dashboard_widget_name', 'WordPress Guides/Tutorials' );
|
55 |
-
$this->feeds = apply_filters(
|
56 |
-
'themeisle_sdk_dashboard_widget_feeds', array(
|
57 |
-
'https://themeisle.com/blog/feed',
|
58 |
-
)
|
59 |
-
);
|
60 |
-
}
|
61 |
-
|
62 |
-
/**
|
63 |
-
* Add widget to the dashboard
|
64 |
-
*
|
65 |
-
* @return string|void
|
66 |
-
*/
|
67 |
-
function add_widget() {
|
68 |
-
global $wp_meta_boxes;
|
69 |
-
if ( isset( $wp_meta_boxes['dashboard']['normal']['core']['themeisle'] ) ) {
|
70 |
-
return;
|
71 |
-
}
|
72 |
-
wp_add_dashboard_widget(
|
73 |
-
'themeisle', $this->dashboard_name, array(
|
74 |
-
&$this,
|
75 |
-
'render_dashboard_widget',
|
76 |
-
)
|
77 |
-
);
|
78 |
-
}
|
79 |
-
|
80 |
-
/**
|
81 |
-
* Setup feed items.
|
82 |
-
*/
|
83 |
-
private function setup_feeds() {
|
84 |
-
$items_normalized = array();
|
85 |
-
if ( false === ( $items_normalized = get_transient( 'themeisle_sdk_feed_items' ) ) ) {
|
86 |
-
// Load SimplePie Instance
|
87 |
-
$feed = fetch_feed( $this->feeds );
|
88 |
-
// TODO report error when is an error loading the feed
|
89 |
-
if ( is_wp_error( $feed ) ) {
|
90 |
-
return;
|
91 |
-
}
|
92 |
-
|
93 |
-
$items = $feed->get_items( 0, 5 );
|
94 |
-
foreach ( (array) $items as $item ) {
|
95 |
-
$items_normalized[] = array(
|
96 |
-
'title' => $item->get_title(),
|
97 |
-
'date' => $item->get_date( 'U' ),
|
98 |
-
'link' => $item->get_permalink(),
|
99 |
-
);
|
100 |
-
}
|
101 |
-
set_transient( 'themeisle_sdk_feed_items', $items_normalized, 48 * HOUR_IN_SECONDS );
|
102 |
-
}
|
103 |
-
$this->items = $items_normalized;
|
104 |
-
}
|
105 |
-
|
106 |
-
/**
|
107 |
-
* Render widget content
|
108 |
-
*/
|
109 |
-
function render_dashboard_widget() {
|
110 |
-
$this->setup_feeds();
|
111 |
-
if ( empty( $this->items ) || ! is_array( $this->items ) ) {
|
112 |
-
return;
|
113 |
-
}
|
114 |
-
?>
|
115 |
-
<style type="text/css">
|
116 |
-
#themeisle ul li.ti-dw-recommend-item {
|
117 |
-
padding-left: 7px;
|
118 |
-
border-top: 1px solid #eee;
|
119 |
-
margin-bottom: 0px;
|
120 |
-
padding-top: 6px;
|
121 |
-
}
|
122 |
-
|
123 |
-
#themeisle h2.hndle {
|
124 |
-
background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA3Ny4xMiA3Ny4xMiI+PHRpdGxlPkFzc2V0IDM8L3RpdGxlPjxwYXRoIGQ9Ik03NS43Niw0Ny42cS0xLjUsNi40Ni00LjA3LDkuMjZBMzYuMjIsMzYuMjIsMCwwLDEsNjMuMjYsNjNhNTEsNTEsMCwwLDEtOS43OSw0LjZoLS4xNXY0LjgyQTQuNjYsNC42NiwwLDAsMSw1Miw3NS43Niw0LjA3LDQuMDcsMCwwLDEsNDksNzcuMTJhNCw0LDAsMCwxLTIuMTgtLjYxQTQuOTQsNC45NCwwLDAsMSw0NS4xOSw3NWE0LjQyLDQuNDIsMCwwLDEtNy41NCwwLDQuOTQsNC45NCwwLDAsMS0xLjU4LDEuNSwzLjc1LDMuNzUsMCwwLDEtMiwuNjFBNC4yNyw0LjI3LDAsMCwxLDMwLjI3LDc1YTQuOTQsNC45NCwwLDAsMS0xLjU4LDEuNSw0LDQsMCwwLDEtMi4xOC42MSwzLjkzLDMuOTMsMCwwLDEtMy4xNi0xLjQzLDUuMyw1LjMsMCwwLDEtMS4yMS0zLjU0LDEzLjgxLDEzLjgxLDAsMCwxLTguNTgsMywxMy4yMywxMy4yMywwLDAsMS05LTMuNDdBMTguMjEsMTguMjEsMCwwLDAsOSw3MC43OW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sNjUuMDcsMjgsMTcuNDQsMTcuNDQsMCwwLDAsNjEuNDUsMTdaTTQzLjYsNjUuMzdhMi43MiwyLjcyLDAsMCwwLTIuMS0uOSwzLDMsMCwwLDAtMi4xOS45LDMuMDYsMy4wNiwwLDAsMC0uOSwyLjI2djQuODJhMy4zMiwzLjMyLDAsMCwwLC45LDIuMzMsMi44NCwyLjg0LDAsMCwwLDIuMTksMSwyLjYxLDIuNjEsMCwwLDAsMi4xLTEsMy40NSwzLjQ1LDAsMCwwLC44My0yLjMzVjY3LjYzQTMuMTcsMy4xNywwLDAsMCw0My42LDY1LjM3Wm03LjQ2LDBhMywzLDAsMCwwLTIuMTgtLjksMi43MywyLjczLDAsMCwwLTIuMTEuOSwzLjE3LDMuMTcsMCwwLDAtLjgzLDIuMjZ2NC44MmEzLjQ1LDMuNDUsMCwwLDAsLjgzLDIuMzMsMi42MSwyLjYxLDAsMCwwLDIuMTEsMSwyLjgzLDIuODMsMCwwLDAsMi4xOC0xLDMuMzIsMy4zMiwwLDAsMCwuOS0yLjMzVjY3LjYzQTMuMDYsMy4wNiwwLDAsMCw1MS4wNiw2NS4zN1oiLz48L3N2Zz4=');
|
125 |
-
background-repeat: no-repeat;
|
126 |
-
background-position: 92% 50%;
|
127 |
-
background-size: 30px;
|
128 |
-
}
|
129 |
-
|
130 |
-
#themeisle .inside {
|
131 |
-
padding: 0;
|
132 |
-
}
|
133 |
-
|
134 |
-
.ti-feed-list {
|
135 |
-
padding: 0 12px 5px;
|
136 |
-
margin-bottom: 10px;
|
137 |
-
border-bottom: 1px solid #eee;
|
138 |
-
}
|
139 |
-
|
140 |
-
.ti-dw-feed-item a {
|
141 |
-
display: flex;
|
142 |
-
align-items: center;
|
143 |
-
margin-bottom: 5px;
|
144 |
-
padding: 5px;
|
145 |
-
transition: .2s ease;
|
146 |
-
border-radius: 3px;
|
147 |
-
}
|
148 |
-
|
149 |
-
.ti-dw-feed-item a:hover {
|
150 |
-
background-color: #f8f8f8;
|
151 |
-
}
|
152 |
-
|
153 |
-
.ti-dw-feed-item a:hover .ti-dw-date-container {
|
154 |
-
opacity: .9;
|
155 |
-
}
|
156 |
-
|
157 |
-
.ti-dw-feed-item .ti-dw-month-container {
|
158 |
-
margin-top: -5px;
|
159 |
-
text-transform: uppercase;
|
160 |
-
font-size: 10px;
|
161 |
-
letter-spacing: 1px;
|
162 |
-
font-weight: 700;
|
163 |
-
}
|
164 |
-
|
165 |
-
.ti-dw-feed-item .ti-dw-date-container {
|
166 |
-
border-radius: 3px;
|
167 |
-
transition: .2s ease;
|
168 |
-
min-height: 35px;
|
169 |
-
margin-right: 5px;
|
170 |
-
min-width: 35px;
|
171 |
-
text-align: center;
|
172 |
-
border: 1px solid #2a6f97;
|
173 |
-
color: #fff;
|
174 |
-
background: #2ea2cc;
|
175 |
-
display: flex;
|
176 |
-
flex-direction: column;
|
177 |
-
justify-content: center;
|
178 |
-
}
|
179 |
-
|
180 |
-
.ti-dw-footer {
|
181 |
-
padding: 0 12px 5px;
|
182 |
-
text-align: center;
|
183 |
-
}
|
184 |
-
|
185 |
-
.ti-dw-recommend-item {
|
186 |
-
display: block;
|
187 |
-
}
|
188 |
-
|
189 |
-
.ti-dw-recommend-item span {
|
190 |
-
color: #72777c;
|
191 |
-
}
|
192 |
-
|
193 |
-
.ti-dw-powered-by {
|
194 |
-
font-size: 11px;
|
195 |
-
margin-top: 3px;
|
196 |
-
display: block;
|
197 |
-
color: #72777c;
|
198 |
-
}
|
199 |
-
|
200 |
-
.ti-dw-powered-by span {
|
201 |
-
font-weight: 600;
|
202 |
-
}
|
203 |
-
|
204 |
-
</style>
|
205 |
-
<ul class="ti-feed-list">
|
206 |
-
<?php
|
207 |
-
foreach ( $this->items as $item ) {
|
208 |
-
?>
|
209 |
-
<li class="ti-dw-feed-item">
|
210 |
-
<a href="
|
211 |
-
<?php
|
212 |
-
echo add_query_arg(
|
213 |
-
array(
|
214 |
-
'utm_campaign' => 'feed',
|
215 |
-
'utm_medium' => 'dashboard_widget',
|
216 |
-
), $item['link']
|
217 |
-
);
|
218 |
-
?>
|
219 |
-
" target="_blank">
|
220 |
-
<span class="ti-dw-date-container"><span
|
221 |
-
class="ti-dw-day-container"><?php echo date( 'd', $item['date'] ); ?></span> <span
|
222 |
-
class="ti-dw-month-container"><?php echo substr( date( 'M', $item['date'] ), 0, 3 ); ?></span></span><?php echo $item['title']; ?>
|
223 |
-
</a>
|
224 |
-
</li>
|
225 |
-
<?php
|
226 |
-
}
|
227 |
-
?>
|
228 |
-
</ul>
|
229 |
-
<?php
|
230 |
-
$recommend = apply_filters( 'themeisle_sdk_recommend_plugin_or_theme', array() );
|
231 |
-
if ( is_array( $recommend ) && ! empty( $recommend ) ) {
|
232 |
-
|
233 |
-
$type = $recommend['type'];
|
234 |
-
if ( ( $type == 'theme' && current_user_can( 'install_themes' ) ) || ( $type == 'plugin' && current_user_can( 'install_plugins' ) ) ) {
|
235 |
-
add_thickbox();
|
236 |
-
$url = add_query_arg(
|
237 |
-
array(
|
238 |
-
'theme' => $recommend['slug'],
|
239 |
-
), network_admin_url( 'theme-install.php' )
|
240 |
-
);
|
241 |
-
|
242 |
-
if ( 'plugin' === $type ) {
|
243 |
-
|
244 |
-
$url = add_query_arg(
|
245 |
-
array(
|
246 |
-
'tab' => 'plugin-information',
|
247 |
-
'plugin' => $recommend['slug'],
|
248 |
-
), network_admin_url( 'plugin-install.php' )
|
249 |
-
);
|
250 |
-
}
|
251 |
-
?>
|
252 |
-
<div class="ti-dw-footer">
|
253 |
-
<span class="ti-dw-recommend-item ">
|
254 |
-
<span class="ti-dw-recommend"><?php echo apply_filters( 'themeisle_sdk_dashboard_popular_label', sprintf( 'Popular %s', ucwords( $type ) ) ); ?>
|
255 |
-
: </span>
|
256 |
-
<?php
|
257 |
-
echo trim(
|
258 |
-
str_replace(
|
259 |
-
array(
|
260 |
-
'lite',
|
261 |
-
'Lite',
|
262 |
-
), '', $recommend['name']
|
263 |
-
)
|
264 |
-
);
|
265 |
-
?>
|
266 |
-
(<a class="thickbox open-plugin-details-modal"
|
267 |
-
href="<?php echo $url . '&TB_iframe=true&width=600&height=500'; ?>"><?php echo apply_filters( 'themeisle_sdk_dashboard_install_label', 'Install' ); ?></a>)
|
268 |
-
</span>
|
269 |
-
<span class="ti-dw-powered-by">
|
270 |
-
Powered by <span><?php echo esc_attr( $this->product->get_friendly_name() ); ?></span>
|
271 |
-
</span>
|
272 |
-
</div>
|
273 |
-
|
274 |
-
<?php
|
275 |
-
}
|
276 |
-
}
|
277 |
-
?>
|
278 |
-
|
279 |
-
<?php
|
280 |
-
|
281 |
-
}
|
282 |
-
|
283 |
-
/**
|
284 |
-
* Either the current product is installed or not.
|
285 |
-
*
|
286 |
-
* @param array $val The current recommended product.
|
287 |
-
*
|
288 |
-
* @return bool Either we should exclude the plugin or not.
|
289 |
-
*/
|
290 |
-
public function remove_current_products( $val ) {
|
291 |
-
if ( $val['type'] === 'theme' ) {
|
292 |
-
$exist = wp_get_theme( $val['slug'] );
|
293 |
-
|
294 |
-
return ! $exist->exists();
|
295 |
-
} else {
|
296 |
-
$all_plugins = array_keys( get_plugins() );
|
297 |
-
foreach ( $all_plugins as $slug ) {
|
298 |
-
if ( strpos( $slug, $val['slug'] ) !== false ) {
|
299 |
-
return false;
|
300 |
-
}
|
301 |
-
}
|
302 |
-
|
303 |
-
return true;
|
304 |
-
}
|
305 |
-
}
|
306 |
-
|
307 |
-
/**
|
308 |
-
* Fetch themes from wporg api.
|
309 |
-
*
|
310 |
-
* @param string $author The author name.
|
311 |
-
*
|
312 |
-
* @return array The list of themes.
|
313 |
-
*/
|
314 |
-
function get_themes_from_wporg( $author ) {
|
315 |
-
$products = wp_remote_get(
|
316 |
-
'https://api.wordpress.org/themes/info/1.1/?action=query_themes&request[author]=' . $author . '&request[per_page]=30&request[fields][active_installs]=true'
|
317 |
-
);
|
318 |
-
$products = json_decode( wp_remote_retrieve_body( $products ) );
|
319 |
-
if ( is_object( $products ) ) {
|
320 |
-
$products = isset( $products->themes ) ? $products->themes : array();
|
321 |
-
} else {
|
322 |
-
$products = array();
|
323 |
-
}
|
324 |
-
|
325 |
-
return $products;
|
326 |
-
}
|
327 |
-
|
328 |
-
/**
|
329 |
-
* Fetch plugin from wporg api.
|
330 |
-
*
|
331 |
-
* @param string $author The author slug.
|
332 |
-
*
|
333 |
-
* @return array The list of plugins for the selected author.
|
334 |
-
*/
|
335 |
-
function get_plugins_from_wporg( $author ) {
|
336 |
-
$products = wp_remote_get(
|
337 |
-
'https://api.wordpress.org/plugins/info/1.1/?action=query_plugins&request[author]=' . $author . '&request[author]=codeinwp&request[per_page]=20&request[fields][active_installs]=true'
|
338 |
-
);
|
339 |
-
$products = json_decode( wp_remote_retrieve_body( $products ) );
|
340 |
-
if ( is_object( $products ) ) {
|
341 |
-
$products = isset( $products->plugins ) ? $products->plugins : array();
|
342 |
-
} else {
|
343 |
-
$products = array();
|
344 |
-
}
|
345 |
-
|
346 |
-
return $products;
|
347 |
-
}
|
348 |
-
|
349 |
-
/**
|
350 |
-
* Fetch products from the recomended section.
|
351 |
-
*
|
352 |
-
* @return array|mixed The list of products to use in recomended section.
|
353 |
-
*/
|
354 |
-
function get_product_from_api() {
|
355 |
-
if ( false === ( $products = get_transient( 'themeisle_sdk_products' ) ) ) {
|
356 |
-
$products = array();
|
357 |
-
$themeisle_themes = $this->get_themes_from_wporg( 'themeisle' );
|
358 |
-
$codeinwp_themes = $this->get_themes_from_wporg( 'codeinwp' );
|
359 |
-
|
360 |
-
$themeisle_plugins = $this->get_plugins_from_wporg( 'themeisle' );
|
361 |
-
$codeinwp_plugins = $this->get_plugins_from_wporg( 'codeinwp' );
|
362 |
-
|
363 |
-
$all_themes = array_merge( $themeisle_themes, $codeinwp_themes );
|
364 |
-
foreach ( $all_themes as $theme ) {
|
365 |
-
if ( $theme->active_installs < 4999 ) {
|
366 |
-
continue;
|
367 |
-
}
|
368 |
-
$products[] = array(
|
369 |
-
'name' => $theme->name,
|
370 |
-
'type' => 'theme',
|
371 |
-
'slug' => $theme->slug,
|
372 |
-
'installs' => $theme->active_installs,
|
373 |
-
);
|
374 |
-
}
|
375 |
-
$all_plugins = array_merge( $themeisle_plugins, $codeinwp_plugins );
|
376 |
-
foreach ( $all_plugins as $plugin ) {
|
377 |
-
if ( $plugin->active_installs < 5999 ) {
|
378 |
-
continue;
|
379 |
-
}
|
380 |
-
$products[] = array(
|
381 |
-
'name' => $plugin->name,
|
382 |
-
'type' => 'plugin',
|
383 |
-
'slug' => $plugin->slug,
|
384 |
-
'installs' => $plugin->active_installs,
|
385 |
-
);
|
386 |
-
}
|
387 |
-
set_transient( 'themeisle_sdk_products', $products, 6 * HOUR_IN_SECONDS );
|
388 |
-
}
|
389 |
-
|
390 |
-
return $products;
|
391 |
-
}
|
392 |
-
|
393 |
-
/**
|
394 |
-
* Contact the API and fetch the recommended plugins/themes
|
395 |
-
*/
|
396 |
-
function recommend_plugin_or_theme() {
|
397 |
-
$products = $this->get_product_from_api();
|
398 |
-
if ( ! is_array( $products ) ) {
|
399 |
-
$products = array();
|
400 |
-
}
|
401 |
-
$products = array_filter( $products, array( $this, 'remove_current_products' ) );
|
402 |
-
$products = array_merge( $products );
|
403 |
-
if ( count( $products ) > 1 ) {
|
404 |
-
shuffle( $products );
|
405 |
-
$products = array_slice( $products, 0, 1 );
|
406 |
-
}
|
407 |
-
$to_recommend = isset( $products[0] ) ? $products[0] : $products;
|
408 |
-
|
409 |
-
return $to_recommend;
|
410 |
-
}
|
411 |
-
}
|
412 |
-
endif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-widget.php
DELETED
@@ -1,50 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The widget model class for ThemeIsle SDK
|
4 |
-
*
|
5 |
-
* @package ThemeIsleSDK
|
6 |
-
* @subpackage Widgets
|
7 |
-
* @copyright Copyright (c) 2017, Marius Cristea
|
8 |
-
* @license http://opensource.org/licenses/gpl-3.0.php GNU Public License
|
9 |
-
* @since 1.0.0
|
10 |
-
*/
|
11 |
-
// Exit if accessed directly.
|
12 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
13 |
-
exit;
|
14 |
-
}
|
15 |
-
if ( ! class_exists( 'ThemeIsle_SDK_Widget' ) ) :
|
16 |
-
/**
|
17 |
-
* Widget model for ThemeIsle SDK.
|
18 |
-
*/
|
19 |
-
abstract class ThemeIsle_SDK_Widget {
|
20 |
-
/**
|
21 |
-
* @var ThemeIsle_SDK_Product $product Themeisle Product.
|
22 |
-
*/
|
23 |
-
protected $product;
|
24 |
-
|
25 |
-
/**
|
26 |
-
* ThemeIsle_SDK_Widget constructor.
|
27 |
-
*
|
28 |
-
* @param ThemeIsle_SDK_Product $product_object Product Object.
|
29 |
-
*/
|
30 |
-
public function __construct( $product_object ) {
|
31 |
-
if ( $product_object instanceof ThemeIsle_SDK_Product ) {
|
32 |
-
$this->product = $product_object;
|
33 |
-
}
|
34 |
-
$this->setup_hooks();
|
35 |
-
}
|
36 |
-
|
37 |
-
/**
|
38 |
-
* Registers the hooks and then delegates to the child
|
39 |
-
*/
|
40 |
-
public function setup_hooks() {
|
41 |
-
$this->setup_hooks_child();
|
42 |
-
}
|
43 |
-
|
44 |
-
/**
|
45 |
-
* Abstract function for delegating to the child
|
46 |
-
*/
|
47 |
-
protected abstract function setup_hooks_child();
|
48 |
-
|
49 |
-
}
|
50 |
-
endif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-widgets-factory.php
DELETED
@@ -1,37 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The widgets factory class for ThemeIsle SDK
|
4 |
-
*
|
5 |
-
* @package ThemeIsleSDK
|
6 |
-
* @subpackage Widgets
|
7 |
-
* @copyright Copyright (c) 2017, Marius Cristea
|
8 |
-
* @license http://opensource.org/licenses/gpl-3.0.php GNU Public License
|
9 |
-
* @since 1.0.0
|
10 |
-
*/
|
11 |
-
// Exit if accessed directly.
|
12 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
13 |
-
exit;
|
14 |
-
}
|
15 |
-
if ( ! class_exists( 'ThemeIsle_SDK_Widgets_Factory' ) ) :
|
16 |
-
/**
|
17 |
-
* Widgets factory model for ThemeIsle SDK.
|
18 |
-
*/
|
19 |
-
class ThemeIsle_SDK_Widgets_Factory {
|
20 |
-
|
21 |
-
/**
|
22 |
-
* ThemeIsle_SDK_Widgets_Factory constructor.
|
23 |
-
*
|
24 |
-
* @param ThemeIsle_SDK_Product $product_object Product Object.
|
25 |
-
* @param array $widgets the widgets.
|
26 |
-
*/
|
27 |
-
public function __construct( $product_object, $widgets ) {
|
28 |
-
if ( $product_object instanceof ThemeIsle_SDK_Product && $widgets && is_array( $widgets ) ) {
|
29 |
-
foreach ( $widgets as $widget ) {
|
30 |
-
$class = 'ThemeIsle_SDK_Widget_' . str_replace( ' ', '_', ucwords( str_replace( '_', ' ', $widget ) ) );
|
31 |
-
$instance = new $class( $product_object );
|
32 |
-
$instance->setup_hooks();
|
33 |
-
}
|
34 |
-
}
|
35 |
-
}
|
36 |
-
}
|
37 |
-
endif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/themeisle-sdk/composer.json
DELETED
@@ -1,24 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"name": "codeinwp/themeisle-sdk",
|
3 |
-
"description": "ThemeIsle SDK ",
|
4 |
-
"keywords": [
|
5 |
-
"wordpress"
|
6 |
-
],
|
7 |
-
"homepage": "https://github.com/Codeinwp/themeisle-sdk",
|
8 |
-
"license": "GPL-2.0+",
|
9 |
-
"authors": [
|
10 |
-
{
|
11 |
-
"name": "ThemeIsle team",
|
12 |
-
"email": "friends@themeisle.com",
|
13 |
-
"homepage": "https://themeisle.com"
|
14 |
-
}
|
15 |
-
],
|
16 |
-
"autoload": {
|
17 |
-
"files": [
|
18 |
-
"load.php"
|
19 |
-
]
|
20 |
-
},
|
21 |
-
"support": {
|
22 |
-
"issues": "https://github.com/Codeinwp/themeisle-sdk/issues"
|
23 |
-
}
|
24 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/themeisle-sdk/index.php
DELETED
@@ -1,5 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* @package ThemeIsleSDK
|
4 |
-
* Ignore this.
|
5 |
-
*/
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/themeisle-sdk/load.php
DELETED
@@ -1,35 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Loader for the ThemeIsleSDK
|
4 |
-
*
|
5 |
-
* Logic for loading always the latest SDK from the installed themes/plugins.
|
6 |
-
*
|
7 |
-
* @package ThemeIsleSDK
|
8 |
-
* @copyright Copyright (c) 2017, Marius Cristea
|
9 |
-
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
10 |
-
* @since 1.1.0
|
11 |
-
*/
|
12 |
-
|
13 |
-
// Current SDK version and path.
|
14 |
-
$themeisle_sdk_version = '2.2.7';
|
15 |
-
$themeisle_sdk_path = dirname( __FILE__ );
|
16 |
-
|
17 |
-
global $themeisle_sdk_max_version;
|
18 |
-
global $themeisle_sdk_max_path;
|
19 |
-
|
20 |
-
if ( version_compare( $themeisle_sdk_version, $themeisle_sdk_max_version ) >= 0 ) {
|
21 |
-
$themeisle_sdk_max_version = $themeisle_sdk_version;
|
22 |
-
$themeisle_sdk_max_path = $themeisle_sdk_path;
|
23 |
-
}
|
24 |
-
|
25 |
-
// load the latest sdk version from the active Themeisle products
|
26 |
-
if ( ! function_exists( 'themeisle_sdk_load_latest' ) ) :
|
27 |
-
/**
|
28 |
-
* Always load the latest sdk version.
|
29 |
-
*/
|
30 |
-
function themeisle_sdk_load_latest() {
|
31 |
-
global $themeisle_sdk_max_path;
|
32 |
-
require_once $themeisle_sdk_max_path . '/start.php';
|
33 |
-
}
|
34 |
-
endif;
|
35 |
-
add_action( 'init', 'themeisle_sdk_load_latest' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/themeisle-sdk/start.php
DELETED
@@ -1,38 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* File responsible for sdk files loading.
|
4 |
-
*
|
5 |
-
* @package ThemeIsleSDK
|
6 |
-
* @copyright Copyright (c) 2017, Marius Cristea
|
7 |
-
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
8 |
-
* @since 1.1.0
|
9 |
-
*/
|
10 |
-
$products = apply_filters( 'themeisle_sdk_products', array() );
|
11 |
-
$path = dirname( __FILE__ );
|
12 |
-
$files_to_load = array(
|
13 |
-
'class-themeisle-sdk-loader.php',
|
14 |
-
'class-themeisle-sdk-product.php',
|
15 |
-
'class-themeisle-sdk-logger.php',
|
16 |
-
'class-themeisle-sdk-licenser.php',
|
17 |
-
'class-themeisle-sdk-rollback.php',
|
18 |
-
'class-themeisle-sdk-feedback-factory.php',
|
19 |
-
'class-themeisle-sdk-feedback.php',
|
20 |
-
'class-themeisle-sdk-feedback-deactivate.php',
|
21 |
-
'class-themeisle-sdk-feedback-review.php',
|
22 |
-
'class-themeisle-sdk-feedback-translate.php',
|
23 |
-
'class-themeisle-sdk-notification-manager.php',
|
24 |
-
'class-themeisle-sdk-widget.php',
|
25 |
-
'class-themeisle-sdk-widget-dashboard-blog.php',
|
26 |
-
'class-themeisle-sdk-widgets-factory.php',
|
27 |
-
'class-themeisle-sdk-endpoints.php',
|
28 |
-
);
|
29 |
-
|
30 |
-
foreach ( $files_to_load as $file ) {
|
31 |
-
$file_path = $path . '/' . $file;
|
32 |
-
if ( is_readable( $file_path ) ) {
|
33 |
-
require_once $file_path;
|
34 |
-
}
|
35 |
-
}
|
36 |
-
foreach ( $products as $product ) {
|
37 |
-
ThemeIsle_SDK_Loader::init_product( $product );
|
38 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/ClassLoader.php
DELETED
@@ -1,413 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/*
|
4 |
-
* This file is part of Composer.
|
5 |
-
*
|
6 |
-
* (c) Nils Adermann <naderman@naderman.de>
|
7 |
-
* Jordi Boggiano <j.boggiano@seld.be>
|
8 |
-
*
|
9 |
-
* For the full copyright and license information, please view the LICENSE
|
10 |
-
* file that was distributed with this source code.
|
11 |
-
*/
|
12 |
-
|
13 |
-
namespace Composer\Autoload;
|
14 |
-
|
15 |
-
/**
|
16 |
-
* ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
|
17 |
-
*
|
18 |
-
* $loader = new \Composer\Autoload\ClassLoader();
|
19 |
-
*
|
20 |
-
* // register classes with namespaces
|
21 |
-
* $loader->add('Symfony\Component', __DIR__.'/component');
|
22 |
-
* $loader->add('Symfony', __DIR__.'/framework');
|
23 |
-
*
|
24 |
-
* // activate the autoloader
|
25 |
-
* $loader->register();
|
26 |
-
*
|
27 |
-
* // to enable searching the include path (eg. for PEAR packages)
|
28 |
-
* $loader->setUseIncludePath(true);
|
29 |
-
*
|
30 |
-
* In this example, if you try to use a class in the Symfony\Component
|
31 |
-
* namespace or one of its children (Symfony\Component\Console for instance),
|
32 |
-
* the autoloader will first look for the class under the component/
|
33 |
-
* directory, and it will then fallback to the framework/ directory if not
|
34 |
-
* found before giving up.
|
35 |
-
*
|
36 |
-
* This class is loosely based on the Symfony UniversalClassLoader.
|
37 |
-
*
|
38 |
-
* @author Fabien Potencier <fabien@symfony.com>
|
39 |
-
* @author Jordi Boggiano <j.boggiano@seld.be>
|
40 |
-
* @see http://www.php-fig.org/psr/psr-0/
|
41 |
-
* @see http://www.php-fig.org/psr/psr-4/
|
42 |
-
*/
|
43 |
-
class ClassLoader
|
44 |
-
{
|
45 |
-
// PSR-4
|
46 |
-
private $prefixLengthsPsr4 = array();
|
47 |
-
private $prefixDirsPsr4 = array();
|
48 |
-
private $fallbackDirsPsr4 = array();
|
49 |
-
|
50 |
-
// PSR-0
|
51 |
-
private $prefixesPsr0 = array();
|
52 |
-
private $fallbackDirsPsr0 = array();
|
53 |
-
|
54 |
-
private $useIncludePath = false;
|
55 |
-
private $classMap = array();
|
56 |
-
|
57 |
-
private $classMapAuthoritative = false;
|
58 |
-
|
59 |
-
public function getPrefixes()
|
60 |
-
{
|
61 |
-
if (!empty($this->prefixesPsr0)) {
|
62 |
-
return call_user_func_array('array_merge', $this->prefixesPsr0);
|
63 |
-
}
|
64 |
-
|
65 |
-
return array();
|
66 |
-
}
|
67 |
-
|
68 |
-
public function getPrefixesPsr4()
|
69 |
-
{
|
70 |
-
return $this->prefixDirsPsr4;
|
71 |
-
}
|
72 |
-
|
73 |
-
public function getFallbackDirs()
|
74 |
-
{
|
75 |
-
return $this->fallbackDirsPsr0;
|
76 |
-
}
|
77 |
-
|
78 |
-
public function getFallbackDirsPsr4()
|
79 |
-
{
|
80 |
-
return $this->fallbackDirsPsr4;
|
81 |
-
}
|
82 |
-
|
83 |
-
public function getClassMap()
|
84 |
-
{
|
85 |
-
return $this->classMap;
|
86 |
-
}
|
87 |
-
|
88 |
-
/**
|
89 |
-
* @param array $classMap Class to filename map
|
90 |
-
*/
|
91 |
-
public function addClassMap(array $classMap)
|
92 |
-
{
|
93 |
-
if ($this->classMap) {
|
94 |
-
$this->classMap = array_merge($this->classMap, $classMap);
|
95 |
-
} else {
|
96 |
-
$this->classMap = $classMap;
|
97 |
-
}
|
98 |
-
}
|
99 |
-
|
100 |
-
/**
|
101 |
-
* Registers a set of PSR-0 directories for a given prefix, either
|
102 |
-
* appending or prepending to the ones previously set for this prefix.
|
103 |
-
*
|
104 |
-
* @param string $prefix The prefix
|
105 |
-
* @param array|string $paths The PSR-0 root directories
|
106 |
-
* @param bool $prepend Whether to prepend the directories
|
107 |
-
*/
|
108 |
-
public function add($prefix, $paths, $prepend = false)
|
109 |
-
{
|
110 |
-
if (!$prefix) {
|
111 |
-
if ($prepend) {
|
112 |
-
$this->fallbackDirsPsr0 = array_merge(
|
113 |
-
(array) $paths,
|
114 |
-
$this->fallbackDirsPsr0
|
115 |
-
);
|
116 |
-
} else {
|
117 |
-
$this->fallbackDirsPsr0 = array_merge(
|
118 |
-
$this->fallbackDirsPsr0,
|
119 |
-
(array) $paths
|
120 |
-
);
|
121 |
-
}
|
122 |
-
|
123 |
-
return;
|
124 |
-
}
|
125 |
-
|
126 |
-
$first = $prefix[0];
|
127 |
-
if (!isset($this->prefixesPsr0[$first][$prefix])) {
|
128 |
-
$this->prefixesPsr0[$first][$prefix] = (array) $paths;
|
129 |
-
|
130 |
-
return;
|
131 |
-
}
|
132 |
-
if ($prepend) {
|
133 |
-
$this->prefixesPsr0[$first][$prefix] = array_merge(
|
134 |
-
(array) $paths,
|
135 |
-
$this->prefixesPsr0[$first][$prefix]
|
136 |
-
);
|
137 |
-
} else {
|
138 |
-
$this->prefixesPsr0[$first][$prefix] = array_merge(
|
139 |
-
$this->prefixesPsr0[$first][$prefix],
|
140 |
-
(array) $paths
|
141 |
-
);
|
142 |
-
}
|
143 |
-
}
|
144 |
-
|
145 |
-
/**
|
146 |
-
* Registers a set of PSR-4 directories for a given namespace, either
|
147 |
-
* appending or prepending to the ones previously set for this namespace.
|
148 |
-
*
|
149 |
-
* @param string $prefix The prefix/namespace, with trailing '\\'
|
150 |
-
* @param array|string $paths The PSR-4 base directories
|
151 |
-
* @param bool $prepend Whether to prepend the directories
|
152 |
-
*
|
153 |
-
* @throws \InvalidArgumentException
|
154 |
-
*/
|
155 |
-
public function addPsr4($prefix, $paths, $prepend = false)
|
156 |
-
{
|
157 |
-
if (!$prefix) {
|
158 |
-
// Register directories for the root namespace.
|
159 |
-
if ($prepend) {
|
160 |
-
$this->fallbackDirsPsr4 = array_merge(
|
161 |
-
(array) $paths,
|
162 |
-
$this->fallbackDirsPsr4
|
163 |
-
);
|
164 |
-
} else {
|
165 |
-
$this->fallbackDirsPsr4 = array_merge(
|
166 |
-
$this->fallbackDirsPsr4,
|
167 |
-
(array) $paths
|
168 |
-
);
|
169 |
-
}
|
170 |
-
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
|
171 |
-
// Register directories for a new namespace.
|
172 |
-
$length = strlen($prefix);
|
173 |
-
if ('\\' !== $prefix[$length - 1]) {
|
174 |
-
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
175 |
-
}
|
176 |
-
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
177 |
-
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
178 |
-
} elseif ($prepend) {
|
179 |
-
// Prepend directories for an already registered namespace.
|
180 |
-
$this->prefixDirsPsr4[$prefix] = array_merge(
|
181 |
-
(array) $paths,
|
182 |
-
$this->prefixDirsPsr4[$prefix]
|
183 |
-
);
|
184 |
-
} else {
|
185 |
-
// Append directories for an already registered namespace.
|
186 |
-
$this->prefixDirsPsr4[$prefix] = array_merge(
|
187 |
-
$this->prefixDirsPsr4[$prefix],
|
188 |
-
(array) $paths
|
189 |
-
);
|
190 |
-
}
|
191 |
-
}
|
192 |
-
|
193 |
-
/**
|
194 |
-
* Registers a set of PSR-0 directories for a given prefix,
|
195 |
-
* replacing any others previously set for this prefix.
|
196 |
-
*
|
197 |
-
* @param string $prefix The prefix
|
198 |
-
* @param array|string $paths The PSR-0 base directories
|
199 |
-
*/
|
200 |
-
public function set($prefix, $paths)
|
201 |
-
{
|
202 |
-
if (!$prefix) {
|
203 |
-
$this->fallbackDirsPsr0 = (array) $paths;
|
204 |
-
} else {
|
205 |
-
$this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
|
206 |
-
}
|
207 |
-
}
|
208 |
-
|
209 |
-
/**
|
210 |
-
* Registers a set of PSR-4 directories for a given namespace,
|
211 |
-
* replacing any others previously set for this namespace.
|
212 |
-
*
|
213 |
-
* @param string $prefix The prefix/namespace, with trailing '\\'
|
214 |
-
* @param array|string $paths The PSR-4 base directories
|
215 |
-
*
|
216 |
-
* @throws \InvalidArgumentException
|
217 |
-
*/
|
218 |
-
public function setPsr4($prefix, $paths)
|
219 |
-
{
|
220 |
-
if (!$prefix) {
|
221 |
-
$this->fallbackDirsPsr4 = (array) $paths;
|
222 |
-
} else {
|
223 |
-
$length = strlen($prefix);
|
224 |
-
if ('\\' !== $prefix[$length - 1]) {
|
225 |
-
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
226 |
-
}
|
227 |
-
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
228 |
-
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
229 |
-
}
|
230 |
-
}
|
231 |
-
|
232 |
-
/**
|
233 |
-
* Turns on searching the include path for class files.
|
234 |
-
*
|
235 |
-
* @param bool $useIncludePath
|
236 |
-
*/
|
237 |
-
public function setUseIncludePath($useIncludePath)
|
238 |
-
{
|
239 |
-
$this->useIncludePath = $useIncludePath;
|
240 |
-
}
|
241 |
-
|
242 |
-
/**
|
243 |
-
* Can be used to check if the autoloader uses the include path to check
|
244 |
-
* for classes.
|
245 |
-
*
|
246 |
-
* @return bool
|
247 |
-
*/
|
248 |
-
public function getUseIncludePath()
|
249 |
-
{
|
250 |
-
return $this->useIncludePath;
|
251 |
-
}
|
252 |
-
|
253 |
-
/**
|
254 |
-
* Turns off searching the prefix and fallback directories for classes
|
255 |
-
* that have not been registered with the class map.
|
256 |
-
*
|
257 |
-
* @param bool $classMapAuthoritative
|
258 |
-
*/
|
259 |
-
public function setClassMapAuthoritative($classMapAuthoritative)
|
260 |
-
{
|
261 |
-
$this->classMapAuthoritative = $classMapAuthoritative;
|
262 |
-
}
|
263 |
-
|
264 |
-
/**
|
265 |
-
* Should class lookup fail if not found in the current class map?
|
266 |
-
*
|
267 |
-
* @return bool
|
268 |
-
*/
|
269 |
-
public function isClassMapAuthoritative()
|
270 |
-
{
|
271 |
-
return $this->classMapAuthoritative;
|
272 |
-
}
|
273 |
-
|
274 |
-
/**
|
275 |
-
* Registers this instance as an autoloader.
|
276 |
-
*
|
277 |
-
* @param bool $prepend Whether to prepend the autoloader or not
|
278 |
-
*/
|
279 |
-
public function register($prepend = false)
|
280 |
-
{
|
281 |
-
spl_autoload_register(array($this, 'loadClass'), true, $prepend);
|
282 |
-
}
|
283 |
-
|
284 |
-
/**
|
285 |
-
* Unregisters this instance as an autoloader.
|
286 |
-
*/
|
287 |
-
public function unregister()
|
288 |
-
{
|
289 |
-
spl_autoload_unregister(array($this, 'loadClass'));
|
290 |
-
}
|
291 |
-
|
292 |
-
/**
|
293 |
-
* Loads the given class or interface.
|
294 |
-
*
|
295 |
-
* @param string $class The name of the class
|
296 |
-
* @return bool|null True if loaded, null otherwise
|
297 |
-
*/
|
298 |
-
public function loadClass($class)
|
299 |
-
{
|
300 |
-
if ($file = $this->findFile($class)) {
|
301 |
-
includeFile($file);
|
302 |
-
|
303 |
-
return true;
|
304 |
-
}
|
305 |
-
}
|
306 |
-
|
307 |
-
/**
|
308 |
-
* Finds the path to the file where the class is defined.
|
309 |
-
*
|
310 |
-
* @param string $class The name of the class
|
311 |
-
*
|
312 |
-
* @return string|false The path if found, false otherwise
|
313 |
-
*/
|
314 |
-
public function findFile($class)
|
315 |
-
{
|
316 |
-
// work around for PHP 5.3.0 - 5.3.2 https://bugs.php.net/50731
|
317 |
-
if ('\\' == $class[0]) {
|
318 |
-
$class = substr($class, 1);
|
319 |
-
}
|
320 |
-
|
321 |
-
// class map lookup
|
322 |
-
if (isset($this->classMap[$class])) {
|
323 |
-
return $this->classMap[$class];
|
324 |
-
}
|
325 |
-
if ($this->classMapAuthoritative) {
|
326 |
-
return false;
|
327 |
-
}
|
328 |
-
|
329 |
-
$file = $this->findFileWithExtension($class, '.php');
|
330 |
-
|
331 |
-
// Search for Hack files if we are running on HHVM
|
332 |
-
if ($file === null && defined('HHVM_VERSION')) {
|
333 |
-
$file = $this->findFileWithExtension($class, '.hh');
|
334 |
-
}
|
335 |
-
|
336 |
-
if ($file === null) {
|
337 |
-
// Remember that this class does not exist.
|
338 |
-
return $this->classMap[$class] = false;
|
339 |
-
}
|
340 |
-
|
341 |
-
return $file;
|
342 |
-
}
|
343 |
-
|
344 |
-
private function findFileWithExtension($class, $ext)
|
345 |
-
{
|
346 |
-
// PSR-4 lookup
|
347 |
-
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
|
348 |
-
|
349 |
-
$first = $class[0];
|
350 |
-
if (isset($this->prefixLengthsPsr4[$first])) {
|
351 |
-
foreach ($this->prefixLengthsPsr4[$first] as $prefix => $length) {
|
352 |
-
if (0 === strpos($class, $prefix)) {
|
353 |
-
foreach ($this->prefixDirsPsr4[$prefix] as $dir) {
|
354 |
-
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
|
355 |
-
return $file;
|
356 |
-
}
|
357 |
-
}
|
358 |
-
}
|
359 |
-
}
|
360 |
-
}
|
361 |
-
|
362 |
-
// PSR-4 fallback dirs
|
363 |
-
foreach ($this->fallbackDirsPsr4 as $dir) {
|
364 |
-
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
|
365 |
-
return $file;
|
366 |
-
}
|
367 |
-
}
|
368 |
-
|
369 |
-
// PSR-0 lookup
|
370 |
-
if (false !== $pos = strrpos($class, '\\')) {
|
371 |
-
// namespaced class name
|
372 |
-
$logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
|
373 |
-
. strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
|
374 |
-
} else {
|
375 |
-
// PEAR-like class name
|
376 |
-
$logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
|
377 |
-
}
|
378 |
-
|
379 |
-
if (isset($this->prefixesPsr0[$first])) {
|
380 |
-
foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
|
381 |
-
if (0 === strpos($class, $prefix)) {
|
382 |
-
foreach ($dirs as $dir) {
|
383 |
-
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
|
384 |
-
return $file;
|
385 |
-
}
|
386 |
-
}
|
387 |
-
}
|
388 |
-
}
|
389 |
-
}
|
390 |
-
|
391 |
-
// PSR-0 fallback dirs
|
392 |
-
foreach ($this->fallbackDirsPsr0 as $dir) {
|
393 |
-
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
|
394 |
-
return $file;
|
395 |
-
}
|
396 |
-
}
|
397 |
-
|
398 |
-
// PSR-0 include paths.
|
399 |
-
if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
|
400 |
-
return $file;
|
401 |
-
}
|
402 |
-
}
|
403 |
-
}
|
404 |
-
|
405 |
-
/**
|
406 |
-
* Scope isolated include.
|
407 |
-
*
|
408 |
-
* Prevents access to $this/self from included files.
|
409 |
-
*/
|
410 |
-
function includeFile($file)
|
411 |
-
{
|
412 |
-
include $file;
|
413 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/LICENSE
DELETED
@@ -1,21 +0,0 @@
|
|
1 |
-
|
2 |
-
Copyright (c) 2016 Nils Adermann, Jordi Boggiano
|
3 |
-
|
4 |
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
5 |
-
of this software and associated documentation files (the "Software"), to deal
|
6 |
-
in the Software without restriction, including without limitation the rights
|
7 |
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
8 |
-
copies of the Software, and to permit persons to whom the Software is furnished
|
9 |
-
to do so, subject to the following conditions:
|
10 |
-
|
11 |
-
The above copyright notice and this permission notice shall be included in all
|
12 |
-
copies or substantial portions of the Software.
|
13 |
-
|
14 |
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
15 |
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
16 |
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
17 |
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
18 |
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
19 |
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
20 |
-
THE SOFTWARE.
|
21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/autoload_classmap.php
DELETED
@@ -1,9 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
// autoload_classmap.php @generated by Composer
|
4 |
-
|
5 |
-
$vendorDir = dirname(dirname(__FILE__));
|
6 |
-
$baseDir = dirname($vendorDir);
|
7 |
-
|
8 |
-
return array(
|
9 |
-
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/autoload_files.php
DELETED
@@ -1,11 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
// autoload_files.php @generated by Composer
|
4 |
-
|
5 |
-
$vendorDir = dirname(dirname(__FILE__));
|
6 |
-
$baseDir = dirname($vendorDir);
|
7 |
-
|
8 |
-
return array(
|
9 |
-
'957c51f8f334b5ea3be310bfb8b3492c' => $vendorDir . '/codeinwp/themeisle-sdk/load.php',
|
10 |
-
'62bc7c35996f19a64625f7ff3ba2fb5e' => $vendorDir . '/codeinwp/full-width-page-templates/load.php',
|
11 |
-
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/autoload_namespaces.php
DELETED
@@ -1,9 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
// autoload_namespaces.php @generated by Composer
|
4 |
-
|
5 |
-
$vendorDir = dirname(dirname(__FILE__));
|
6 |
-
$baseDir = dirname($vendorDir);
|
7 |
-
|
8 |
-
return array(
|
9 |
-
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/autoload_psr4.php
DELETED
@@ -1,9 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
// autoload_psr4.php @generated by Composer
|
4 |
-
|
5 |
-
$vendorDir = dirname(dirname(__FILE__));
|
6 |
-
$baseDir = dirname($vendorDir);
|
7 |
-
|
8 |
-
return array(
|
9 |
-
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/autoload_real.php
DELETED
@@ -1,59 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
// autoload_real.php @generated by Composer
|
4 |
-
|
5 |
-
class ComposerAutoloaderInit46281624ddf3d14e02b3fb68c4c2e8fb
|
6 |
-
{
|
7 |
-
private static $loader;
|
8 |
-
|
9 |
-
public static function loadClassLoader($class)
|
10 |
-
{
|
11 |
-
if ('Composer\Autoload\ClassLoader' === $class) {
|
12 |
-
require __DIR__ . '/ClassLoader.php';
|
13 |
-
}
|
14 |
-
}
|
15 |
-
|
16 |
-
public static function getLoader()
|
17 |
-
{
|
18 |
-
if (null !== self::$loader) {
|
19 |
-
return self::$loader;
|
20 |
-
}
|
21 |
-
|
22 |
-
spl_autoload_register(array('ComposerAutoloaderInit46281624ddf3d14e02b3fb68c4c2e8fb', 'loadClassLoader'), true, true);
|
23 |
-
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
-
spl_autoload_unregister(array('ComposerAutoloaderInit46281624ddf3d14e02b3fb68c4c2e8fb', 'loadClassLoader'));
|
25 |
-
|
26 |
-
$map = require __DIR__ . '/autoload_namespaces.php';
|
27 |
-
foreach ($map as $namespace => $path) {
|
28 |
-
$loader->set($namespace, $path);
|
29 |
-
}
|
30 |
-
|
31 |
-
$map = require __DIR__ . '/autoload_psr4.php';
|
32 |
-
foreach ($map as $namespace => $path) {
|
33 |
-
$loader->setPsr4($namespace, $path);
|
34 |
-
}
|
35 |
-
|
36 |
-
$classMap = require __DIR__ . '/autoload_classmap.php';
|
37 |
-
if ($classMap) {
|
38 |
-
$loader->addClassMap($classMap);
|
39 |
-
}
|
40 |
-
|
41 |
-
$loader->register(true);
|
42 |
-
|
43 |
-
$includeFiles = require __DIR__ . '/autoload_files.php';
|
44 |
-
foreach ($includeFiles as $fileIdentifier => $file) {
|
45 |
-
composerRequire46281624ddf3d14e02b3fb68c4c2e8fb($fileIdentifier, $file);
|
46 |
-
}
|
47 |
-
|
48 |
-
return $loader;
|
49 |
-
}
|
50 |
-
}
|
51 |
-
|
52 |
-
function composerRequire46281624ddf3d14e02b3fb68c4c2e8fb($fileIdentifier, $file)
|
53 |
-
{
|
54 |
-
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
55 |
-
require $file;
|
56 |
-
|
57 |
-
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
58 |
-
}
|
59 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installed.json
DELETED
@@ -1,79 +0,0 @@
|
|
1 |
-
[
|
2 |
-
{
|
3 |
-
"name": "codeinwp/themeisle-sdk",
|
4 |
-
"version": "dev-master",
|
5 |
-
"version_normalized": "9999999-dev",
|
6 |
-
"source": {
|
7 |
-
"type": "git",
|
8 |
-
"url": "https://github.com/Codeinwp/themeisle-sdk.git",
|
9 |
-
"reference": "caa9bf2b2c48c12a0ac745b6e2880c94339a777d"
|
10 |
-
},
|
11 |
-
"dist": {
|
12 |
-
"type": "zip",
|
13 |
-
"url": "https://api.github.com/repos/Codeinwp/themeisle-sdk/zipball/caa9bf2b2c48c12a0ac745b6e2880c94339a777d",
|
14 |
-
"reference": "caa9bf2b2c48c12a0ac745b6e2880c94339a777d",
|
15 |
-
"shasum": ""
|
16 |
-
},
|
17 |
-
"time": "2018-07-19 07:48:21",
|
18 |
-
"type": "library",
|
19 |
-
"installation-source": "dist",
|
20 |
-
"autoload": {
|
21 |
-
"files": [
|
22 |
-
"load.php"
|
23 |
-
]
|
24 |
-
},
|
25 |
-
"notification-url": "https://packagist.org/downloads/",
|
26 |
-
"license": [
|
27 |
-
"GPL-2.0+"
|
28 |
-
],
|
29 |
-
"authors": [
|
30 |
-
{
|
31 |
-
"name": "ThemeIsle team",
|
32 |
-
"email": "friends@themeisle.com",
|
33 |
-
"homepage": "https://themeisle.com"
|
34 |
-
}
|
35 |
-
],
|
36 |
-
"description": "ThemeIsle SDK ",
|
37 |
-
"homepage": "https://github.com/Codeinwp/themeisle-sdk",
|
38 |
-
"keywords": [
|
39 |
-
"wordpress"
|
40 |
-
]
|
41 |
-
},
|
42 |
-
{
|
43 |
-
"name": "codeinwp/full-width-page-templates",
|
44 |
-
"version": "dev-master",
|
45 |
-
"version_normalized": "9999999-dev",
|
46 |
-
"source": {
|
47 |
-
"type": "git",
|
48 |
-
"url": "https://github.com/Codeinwp/full-width-page-templates.git",
|
49 |
-
"reference": "770990cf96bd9cb6b8c846b1c9bff16450e2dff9"
|
50 |
-
},
|
51 |
-
"dist": {
|
52 |
-
"type": "zip",
|
53 |
-
"url": "https://api.github.com/repos/Codeinwp/full-width-page-templates/zipball/770990cf96bd9cb6b8c846b1c9bff16450e2dff9",
|
54 |
-
"reference": "770990cf96bd9cb6b8c846b1c9bff16450e2dff9",
|
55 |
-
"shasum": ""
|
56 |
-
},
|
57 |
-
"time": "2018-03-02 08:33:03",
|
58 |
-
"type": "library",
|
59 |
-
"installation-source": "dist",
|
60 |
-
"autoload": {
|
61 |
-
"files": [
|
62 |
-
"load.php"
|
63 |
-
]
|
64 |
-
},
|
65 |
-
"notification-url": "https://packagist.org/downloads/",
|
66 |
-
"license": [
|
67 |
-
"GPL-2.0-or-later"
|
68 |
-
],
|
69 |
-
"authors": [
|
70 |
-
{
|
71 |
-
"name": "ThemeIsle team",
|
72 |
-
"email": "friends@themeisle.com",
|
73 |
-
"homepage": "https://themeisle.com"
|
74 |
-
}
|
75 |
-
],
|
76 |
-
"description": "A WordPress library to create full width page templates.",
|
77 |
-
"homepage": "https://github.com/Codeinwp/full-width-page-templates"
|
78 |
-
}
|
79 |
-
]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|