Version Description
- 2018-03-29
Download this release
Release Info
Developer | themeisle |
Plugin | Elementor Addons & Templates – Sizzify Lite |
Version | 1.1.7 |
Comparing to | |
See all releases |
Code changes from version 1.1.6 to 1.1.7
- CHANGELOG.md +4 -0
- elementor-addon-widgets.php +3 -3
- readme.md +6 -1
- readme.txt +6 -1
- themeisle-hash.json +1 -1
- vendor/autoload.php +7 -0
- vendor/codeinwp/elementor-extra-widgets/class-elementor-extra-widgets.php +266 -0
- vendor/codeinwp/elementor-extra-widgets/composer.json +23 -0
- vendor/codeinwp/elementor-extra-widgets/css/admin.css +15 -0
- vendor/codeinwp/elementor-extra-widgets/css/public.css +395 -0
- vendor/codeinwp/elementor-extra-widgets/js/obfx-grid.js +62 -0
- vendor/codeinwp/elementor-extra-widgets/load.php +11 -0
- vendor/codeinwp/elementor-extra-widgets/widgets/elementor/placeholders/flipcard.php +27 -0
- vendor/codeinwp/elementor-extra-widgets/widgets/elementor/placeholders/review-box.php +23 -0
- vendor/codeinwp/elementor-extra-widgets/widgets/elementor/placeholders/share-buttons.php +23 -0
- vendor/codeinwp/elementor-extra-widgets/widgets/elementor/placeholders/typed-headline.php +23 -0
- vendor/codeinwp/elementor-extra-widgets/widgets/elementor/posts-grid.php +1808 -0
- vendor/codeinwp/elementor-extra-widgets/widgets/elementor/premium-placeholder.php +111 -0
- vendor/codeinwp/elementor-extra-widgets/widgets/elementor/pricing-table.php +1080 -0
- vendor/codeinwp/elementor-extra-widgets/widgets/elementor/services.php +668 -0
- vendor/codeinwp/elementor-extra-widgets/widgets/woo/best-products.php +153 -0
- vendor/codeinwp/elementor-extra-widgets/widgets/woo/featured-products.php +158 -0
- vendor/codeinwp/elementor-extra-widgets/widgets/woo/popular-products.php +157 -0
- vendor/codeinwp/elementor-extra-widgets/widgets/woo/products-categories.php +159 -0
- vendor/codeinwp/elementor-extra-widgets/widgets/woo/recent-products.php +155 -0
- vendor/codeinwp/elementor-extra-widgets/widgets/woo/sale-products.php +156 -0
- vendor/codeinwp/elementor-extra-widgets/widgets/wp/eaw-posts-widget-plus.php +194 -0
- vendor/codeinwp/elementor-extra-widgets/widgets/wp/eaw-posts-widget.php +174 -0
- vendor/codeinwp/full-width-page-templates/builders/class-elementor-full-width-templates.php +121 -0
- vendor/codeinwp/full-width-page-templates/class-full-width-templates.php +203 -0
- vendor/codeinwp/full-width-page-templates/composer.json +23 -0
- vendor/codeinwp/full-width-page-templates/load.php +11 -0
- vendor/codeinwp/full-width-page-templates/templates/builder-fullwidth-std.php +16 -0
- vendor/codeinwp/full-width-page-templates/templates/builder-fullwidth.php +32 -0
- vendor/codeinwp/full-width-page-templates/themes/actions/inline-style.php +15 -0
- vendor/codeinwp/full-width-page-templates/themes/ashe/inline-style.php +10 -0
- vendor/codeinwp/full-width-page-templates/themes/astra/inline-style.php +10 -0
- vendor/codeinwp/full-width-page-templates/themes/avant/inline-style.php +13 -0
- vendor/codeinwp/full-width-page-templates/themes/colormag/inline-style.php +18 -0
- vendor/codeinwp/full-width-page-templates/themes/consulting/inline-style.php +15 -0
- vendor/codeinwp/full-width-page-templates/themes/edge/inline-style.php +19 -0
- vendor/codeinwp/full-width-page-templates/themes/editorial/inline-style.php +17 -0
- vendor/codeinwp/full-width-page-templates/themes/enlightenment/inline-style.php +11 -0
- vendor/codeinwp/full-width-page-templates/themes/envo-business/inline-style.php +9 -0
- vendor/codeinwp/full-width-page-templates/themes/envy-blog/inline-style.php +13 -0
- vendor/codeinwp/full-width-page-templates/themes/experon/inline-style.php +14 -0
- vendor/codeinwp/full-width-page-templates/themes/flash/inline-style.php +17 -0
- vendor/codeinwp/full-width-page-templates/themes/generatepress/inline-style.php +15 -0
- vendor/codeinwp/full-width-page-templates/themes/genesis/inline-style.php +24 -0
- vendor/codeinwp/full-width-page-templates/themes/hestia/inline-style.php +8 -0
- vendor/codeinwp/full-width-page-templates/themes/hitmag/inline-style.php +30 -0
- vendor/codeinwp/full-width-page-templates/themes/hueman/inline-style.php +21 -0
- vendor/codeinwp/full-width-page-templates/themes/kale/inline-style.php +13 -0
- vendor/codeinwp/full-width-page-templates/themes/lodestar/inline-style.php +8 -0
- vendor/codeinwp/full-width-page-templates/themes/maxstore/inline-style.php +9 -0
- vendor/codeinwp/full-width-page-templates/themes/news-portal/inline-style.php +17 -0
- vendor/codeinwp/full-width-page-templates/themes/nikko-portfolio/inline-style.php +8 -0
- vendor/codeinwp/full-width-page-templates/themes/oceanwp/inline-style.php +8 -0
- vendor/codeinwp/full-width-page-templates/themes/online-shop/inline-style.php +19 -0
- vendor/codeinwp/full-width-page-templates/themes/poseidon/inline-style.php +16 -0
- vendor/codeinwp/full-width-page-templates/themes/primer/inline-style.php +12 -0
- vendor/codeinwp/full-width-page-templates/themes/renden/inline-style.php +16 -0
- vendor/codeinwp/full-width-page-templates/themes/shapely/inline-style.php +21 -0
- vendor/codeinwp/full-width-page-templates/themes/spacious/inline-style.php +41 -0
- vendor/codeinwp/full-width-page-templates/themes/storefront/inline-style.php +17 -0
- vendor/codeinwp/full-width-page-templates/themes/sydney/inline-style.php +19 -0
- vendor/codeinwp/full-width-page-templates/themes/total/inline-style.php +8 -0
- vendor/codeinwp/full-width-page-templates/themes/twentyfifteen/inline-style.php +23 -0
- vendor/codeinwp/full-width-page-templates/themes/twentyfourteen/inline-style.php +14 -0
- vendor/codeinwp/full-width-page-templates/themes/twentyseventeen/inline-style.php +15 -0
- vendor/codeinwp/full-width-page-templates/themes/twentysixteen/inline-style.php +59 -0
- vendor/codeinwp/full-width-page-templates/themes/twentythirteen/inline-style.php +17 -0
- vendor/codeinwp/full-width-page-templates/themes/twentytwelve/inline-style.php +13 -0
- vendor/codeinwp/full-width-page-templates/themes/vantage/inline-style.php +15 -0
- vendor/codeinwp/full-width-page-templates/themes/virtue/inline-style.php +14 -0
- vendor/codeinwp/full-width-page-templates/themes/vogue/inline-style.php +13 -0
- vendor/codeinwp/full-width-page-templates/themes/vt-blogging/inline-style.php +10 -0
- vendor/codeinwp/full-width-page-templates/themes/writee/inline-style.php +9 -0
- vendor/codeinwp/full-width-page-templates/themes/zerif-lite/functions.php +9 -0
- vendor/codeinwp/full-width-page-templates/themes/zerif-lite/inline-style.php +13 -0
- vendor/codeinwp/templates-directory/LICENSE +201 -0
- vendor/codeinwp/templates-directory/class-page-templates-directory.php +571 -0
- vendor/codeinwp/templates-directory/composer.json +28 -0
- vendor/codeinwp/templates-directory/css/admin.css +366 -0
- vendor/codeinwp/templates-directory/js/script.js +254 -0
- vendor/codeinwp/templates-directory/load.php +11 -0
- vendor/codeinwp/templates-directory/views/template-directory-page-tpl.php +150 -0
- vendor/codeinwp/templates-directory/views/template-directory-render-template-tpl.php +13 -0
- vendor/codeinwp/themeisle-content-forms/LICENSE +674 -0
- vendor/codeinwp/themeisle-content-forms/assets/content-forms.css +30 -0
- vendor/codeinwp/themeisle-content-forms/assets/content-forms.js +88 -0
- vendor/codeinwp/themeisle-content-forms/assets/gutenberg-esnext/block.build.js +376 -0
- vendor/codeinwp/themeisle-content-forms/assets/gutenberg-esnext/block.js +85 -0
- vendor/codeinwp/themeisle-content-forms/assets/gutenberg-esnext/components/FormEditor.js +148 -0
- vendor/codeinwp/themeisle-content-forms/assets/gutenberg-esnext/index.php +2 -0
- vendor/codeinwp/themeisle-content-forms/assets/gutenberg-esnext/package-lock.json +4080 -0
- vendor/codeinwp/themeisle-content-forms/assets/gutenberg-esnext/package.json +17 -0
- vendor/codeinwp/themeisle-content-forms/assets/gutenberg-esnext/webpack.config.js +62 -0
- vendor/codeinwp/themeisle-content-forms/beaver/class-themeisle-content-forms-beaver-base.php +306 -0
- vendor/codeinwp/themeisle-content-forms/beaver/class-themeisle-content-forms-beaver-contact.php +28 -0
- vendor/codeinwp/themeisle-content-forms/beaver/class-themeisle-content-forms-beaver-newsletter.php +27 -0
- vendor/codeinwp/themeisle-content-forms/beaver/class-themeisle-content-forms-beaver-registration.php +27 -0
- vendor/codeinwp/themeisle-content-forms/beaver/includes/frontend.css.php +2 -0
- vendor/codeinwp/themeisle-content-forms/beaver/includes/frontend.php +53 -0
- vendor/codeinwp/themeisle-content-forms/class-content-form-base.php +262 -0
- vendor/codeinwp/themeisle-content-forms/class-themeisle-content-forms-contact.php +305 -0
- vendor/codeinwp/themeisle-content-forms/class-themeisle-content-forms-elementor.php +536 -0
- vendor/codeinwp/themeisle-content-forms/class-themeisle-content-forms-gutenberg.php +286 -0
- vendor/codeinwp/themeisle-content-forms/class-themeisle-content-forms-newsletter.php +270 -0
- vendor/codeinwp/themeisle-content-forms/class-themeisle-content-forms-registration.php +234 -0
- vendor/codeinwp/themeisle-content-forms/class-themeisle-content-forms-server.php +158 -0
- vendor/codeinwp/themeisle-content-forms/composer.json +25 -0
- vendor/codeinwp/themeisle-content-forms/index.php +5 -0
- vendor/codeinwp/themeisle-content-forms/load.php +98 -0
- vendor/codeinwp/themeisle-sdk/LICENSE +674 -0
- vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-endpoints.php +312 -0
- vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback-deactivate.php +556 -0
- vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback-factory.php +50 -0
- vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback-review.php +209 -0
- vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback-translate.php +983 -0
- vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback.php +90 -0
- vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-licenser.php +692 -0
- vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-loader.php +96 -0
- vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-logger.php +227 -0
- vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-notification-manager.php +105 -0
- vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-product.php +562 -0
- vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-rollback.php +223 -0
- vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-widget-dashboard-blog.php +383 -0
- vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-widget.php +50 -0
- vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-widgets-factory.php +37 -0
- vendor/codeinwp/themeisle-sdk/composer.json +24 -0
- vendor/codeinwp/themeisle-sdk/index.php +5 -0
- vendor/codeinwp/themeisle-sdk/load.php +35 -0
- vendor/codeinwp/themeisle-sdk/start.php +38 -0
- vendor/composer/ClassLoader.php +413 -0
- vendor/composer/LICENSE +21 -0
- vendor/composer/autoload_classmap.php +9 -0
- vendor/composer/autoload_files.php +14 -0
- vendor/composer/autoload_namespaces.php +9 -0
- vendor/composer/autoload_psr4.php +9 -0
- vendor/composer/autoload_real.php +59 -0
- vendor/composer/installed.json +195 -0
CHANGELOG.md
CHANGED
@@ -1,4 +1,8 @@
|
|
1 |
|
|
|
|
|
|
|
|
|
2 |
### v1.1.6 - 2018-03-29
|
3 |
**Changes:**
|
4 |
* Rebranded plugin to Sizzify
|
1 |
|
2 |
+
### v1.1.7 - 2018-03-29
|
3 |
+
**Changes:**
|
4 |
+
* Development
|
5 |
+
|
6 |
### v1.1.6 - 2018-03-29
|
7 |
**Changes:**
|
8 |
* Rebranded plugin to Sizzify
|
elementor-addon-widgets.php
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
-
* Plugin Name:
|
4 |
* Plugin URI: https://themeisle.com/
|
5 |
* Description: Adds new Addons & Widgets that are specifically designed to be used in conjunction with the Elementor Page Builder.
|
6 |
-
* Version: 1.1.
|
7 |
* Author: ThemeIsle
|
8 |
* Author URI: https://themeisle.com/
|
9 |
* Requires at least: 4.4
|
@@ -23,7 +23,7 @@ Constants
|
|
23 |
------------------------------------------ */
|
24 |
|
25 |
/* Set plugin version constant. */
|
26 |
-
define( 'EA_VERSION', '1.1.
|
27 |
|
28 |
/* Set constant path to the plugin directory. */
|
29 |
define( 'EA_PATH', trailingslashit( plugin_dir_path( __FILE__ ) ) );
|
1 |
<?php
|
2 |
/*
|
3 |
+
* Plugin Name: Elementor Addons & Templates - Sizzify Lite
|
4 |
* Plugin URI: https://themeisle.com/
|
5 |
* Description: Adds new Addons & Widgets that are specifically designed to be used in conjunction with the Elementor Page Builder.
|
6 |
+
* Version: 1.1.7
|
7 |
* Author: ThemeIsle
|
8 |
* Author URI: https://themeisle.com/
|
9 |
* Requires at least: 4.4
|
23 |
------------------------------------------ */
|
24 |
|
25 |
/* Set plugin version constant. */
|
26 |
+
define( 'EA_VERSION', '1.1.7' );
|
27 |
|
28 |
/* Set constant path to the plugin directory. */
|
29 |
define( 'EA_PATH', trailingslashit( plugin_dir_path( __FILE__ ) ) );
|
readme.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
#
|
2 |
**Contributors:** [themeisle](https://profiles.wordpress.org/themeisle), [codeinwp](https://profiles.wordpress.org/codeinwp)
|
3 |
**Tags:** elementor, elementor addons, page builder template, page builder templates, woocommerce, template builder, builder templates
|
4 |
**Requires at least:** 4.4
|
@@ -61,6 +61,11 @@ See this [issue #495](https://github.com/pojome/elementor/issues/495) for curren
|
|
61 |
4. Frontend view posts with custom title.
|
62 |
|
63 |
## Changelog ##
|
|
|
|
|
|
|
|
|
|
|
64 |
### 1.1.6 - 2018-03-29 ###
|
65 |
|
66 |
* Rebranded plugin to Sizzify
|
1 |
+
# Elementor Addons & Templates - Sizzify Lite #
|
2 |
**Contributors:** [themeisle](https://profiles.wordpress.org/themeisle), [codeinwp](https://profiles.wordpress.org/codeinwp)
|
3 |
**Tags:** elementor, elementor addons, page builder template, page builder templates, woocommerce, template builder, builder templates
|
4 |
**Requires at least:** 4.4
|
61 |
4. Frontend view posts with custom title.
|
62 |
|
63 |
## Changelog ##
|
64 |
+
### 1.1.7 - 2018-03-29 ###
|
65 |
+
|
66 |
+
* Development
|
67 |
+
|
68 |
+
|
69 |
### 1.1.6 - 2018-03-29 ###
|
70 |
|
71 |
* Rebranded plugin to Sizzify
|
readme.txt
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
===
|
2 |
Contributors: themeisle, codeinwp
|
3 |
Tags: elementor, elementor addons, page builder template, page builder templates, woocommerce, template builder, builder templates
|
4 |
Requires at least: 4.4
|
@@ -61,6 +61,11 @@ See this [issue #495](https://github.com/pojome/elementor/issues/495) for curren
|
|
61 |
4. Frontend view posts with custom title.
|
62 |
|
63 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
64 |
= 1.1.6 - 2018-03-29 =
|
65 |
|
66 |
* Rebranded plugin to Sizzify
|
1 |
+
=== Elementor Addons & Templates - Sizzify Lite ===
|
2 |
Contributors: themeisle, codeinwp
|
3 |
Tags: elementor, elementor addons, page builder template, page builder templates, woocommerce, template builder, builder templates
|
4 |
Requires at least: 4.4
|
61 |
4. Frontend view posts with custom title.
|
62 |
|
63 |
== Changelog ==
|
64 |
+
= 1.1.7 - 2018-03-29 =
|
65 |
+
|
66 |
+
* Development
|
67 |
+
|
68 |
+
|
69 |
= 1.1.6 - 2018-03-29 =
|
70 |
|
71 |
* Rebranded plugin to Sizzify
|
themeisle-hash.json
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"eaw-class.php":"414c18cd16dd525c99fc20b4d5505ece","elementor-addon-widgets.php":"
|
1 |
+
{"eaw-class.php":"414c18cd16dd525c99fc20b4d5505ece","elementor-addon-widgets.php":"2136c859a6829ae6c5761fbdfae7dfed"}
|
vendor/autoload.php
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// autoload.php @generated by Composer
|
4 |
+
|
5 |
+
require_once __DIR__ . '/composer' . '/autoload_real.php';
|
6 |
+
|
7 |
+
return ComposerAutoloaderInit2cec8a2544647b27871b548196a9e428::getLoader();
|
vendor/codeinwp/elementor-extra-widgets/class-elementor-extra-widgets.php
ADDED
@@ -0,0 +1,266 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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idgets
|
4 |
+
*
|
5 |
+
* @package ThemeIsle\ElementorExtraWidgets
|
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\ElementorExtraWidgets' ) ) {
|
14 |
+
|
15 |
+
class ElementorExtraWidgets {
|
16 |
+
/**
|
17 |
+
* @var ElementorExtraWidgets
|
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 |
+
* Defines the library behaviour
|
29 |
+
*/
|
30 |
+
protected function init() {
|
31 |
+
add_action( 'elementor/init', array( $this, 'add_elementor_category' ) );
|
32 |
+
add_action( 'elementor/frontend/after_register_scripts', array( $this, 'register_assets' ) );
|
33 |
+
add_action( 'elementor/preview/enqueue_scripts', array( $this, 'register_assets' ) );
|
34 |
+
|
35 |
+
add_action( 'widgets_init', array( $this, 'register_woo_widgets' ) );
|
36 |
+
add_action( 'widgets_init', array( $this, 'register_posts_widgets' ) );
|
37 |
+
|
38 |
+
add_action( 'wp_enqueue_scripts', array( $this, 'register_assets' ), 999 );
|
39 |
+
|
40 |
+
add_action( 'elementor/widgets/widgets_registered', array( $this, 'add_elementor_widgets' ) );
|
41 |
+
if ( ! defined( 'EAW_PRO_VERSION' ) ) {
|
42 |
+
add_action( 'elementor/editor/after_enqueue_scripts', array( $this, 'enqueue_sidebar_css' ) );
|
43 |
+
}
|
44 |
+
}
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Add the Category for Orbit Fox Widgets.
|
48 |
+
*/
|
49 |
+
public function add_elementor_category() {
|
50 |
+
|
51 |
+
$category_args = apply_filters( 'elementor_extra_widgets_category_args', array(
|
52 |
+
'slug' => 'obfx-elementor-widgets',
|
53 |
+
'title' => __( 'Orbit Fox Addons', 'elementor-addon-widgets' ),
|
54 |
+
'icon' => 'fa fa-plug',
|
55 |
+
) );
|
56 |
+
|
57 |
+
// add a separate category for the premium widgets
|
58 |
+
\Elementor\Plugin::instance()->elements_manager->add_category(
|
59 |
+
$category_args['slug'] . '-pro',
|
60 |
+
array(
|
61 |
+
'title' => 'Premium ' . $category_args['title'],
|
62 |
+
'icon' => $category_args['slug'],
|
63 |
+
),
|
64 |
+
1
|
65 |
+
);
|
66 |
+
|
67 |
+
\Elementor\Plugin::instance()->elements_manager->add_category(
|
68 |
+
$category_args['slug'],
|
69 |
+
array(
|
70 |
+
'title' => $category_args['title'],
|
71 |
+
'icon' => $category_args['slug'],
|
72 |
+
),
|
73 |
+
1
|
74 |
+
);
|
75 |
+
}
|
76 |
+
|
77 |
+
public function register_assets() {
|
78 |
+
// Register custom JS for grid.
|
79 |
+
wp_register_script( 'obfx-grid-js', plugins_url( '/js/obfx-grid.js', __FILE__ ), array(), $this::$version, true );
|
80 |
+
wp_register_style( 'eaw-elementor', plugins_url( '/css/public.css', __FILE__ ), array(), $this::$version );
|
81 |
+
}
|
82 |
+
|
83 |
+
public function enqueue_sidebar_css() {
|
84 |
+
wp_enqueue_style( 'eaw-elementor-admin', plugins_url( '/css/admin.css', __FILE__ ), array(), $this::$version );
|
85 |
+
}
|
86 |
+
/**
|
87 |
+
* Require and instantiate Elementor Widgets and Premium Placeholders.
|
88 |
+
*
|
89 |
+
* @param $widgets_manager
|
90 |
+
*/
|
91 |
+
public function add_elementor_widgets( $widgets_manager ) {
|
92 |
+
$elementor_widgets = $this->get_dir_files( __DIR__ . '/widgets/elementor' );
|
93 |
+
|
94 |
+
foreach ( $elementor_widgets as $widget ) {
|
95 |
+
require_once $widget;
|
96 |
+
|
97 |
+
$widget = basename( $widget, ".php" );
|
98 |
+
|
99 |
+
if ( $widget === 'premium-placeholder' ) {// avoid instantiate an abstract class
|
100 |
+
continue;
|
101 |
+
}
|
102 |
+
|
103 |
+
$classname = $this->convert_filename_to_classname( $widget );
|
104 |
+
|
105 |
+
if ( class_exists( $classname ) ) {
|
106 |
+
$widget_object = new $classname();
|
107 |
+
$widgets_manager->register_widget_type( $widget_object );
|
108 |
+
}
|
109 |
+
}
|
110 |
+
|
111 |
+
if ( apply_filters( 'eaw_should_load_placeholders', false ) ) {
|
112 |
+
$placeholders = $this->get_dir_files( __DIR__ . '/widgets/elementor/placeholders' );
|
113 |
+
foreach ( $placeholders as $widget ) {
|
114 |
+
require_once $widget;
|
115 |
+
}
|
116 |
+
|
117 |
+
do_action( 'eaw_before_pro_widgets', $placeholders, $widgets_manager );
|
118 |
+
|
119 |
+
foreach ( $placeholders as $widget ) {
|
120 |
+
$widget = basename( $widget, ".php" );
|
121 |
+
|
122 |
+
$classname = $this->convert_filename_to_classname( $widget );
|
123 |
+
|
124 |
+
// Maybe Premium Elements
|
125 |
+
if ( ! class_exists( $classname ) ) {
|
126 |
+
$classname = $classname . '_Placeholder';
|
127 |
+
}
|
128 |
+
|
129 |
+
if ( class_exists( $classname ) ) {
|
130 |
+
$widget_object = new $classname();
|
131 |
+
$widgets_manager->register_widget_type( $widget_object );
|
132 |
+
}
|
133 |
+
}
|
134 |
+
}
|
135 |
+
}
|
136 |
+
|
137 |
+
/**
|
138 |
+
* WooCommerce Widget section
|
139 |
+
*
|
140 |
+
* @since 1.0.0
|
141 |
+
* @return void
|
142 |
+
*/
|
143 |
+
public function register_woo_widgets() {
|
144 |
+
if ( ! class_exists( 'woocommerce' ) ) { // Lets not do anything unless WooCommerce is active!
|
145 |
+
return null;
|
146 |
+
}
|
147 |
+
|
148 |
+
include_once( plugin_dir_path( __FILE__ ) . 'widgets/woo/products-categories.php' );
|
149 |
+
include_once( plugin_dir_path( __FILE__ ) . 'widgets/woo/recent-products.php' );
|
150 |
+
include_once( plugin_dir_path( __FILE__ ) . 'widgets/woo/featured-products.php' );
|
151 |
+
include_once( plugin_dir_path( __FILE__ ) . 'widgets/woo/popular-products.php' );
|
152 |
+
include_once( plugin_dir_path( __FILE__ ) . 'widgets/woo/sale-products.php' );
|
153 |
+
include_once( plugin_dir_path( __FILE__ ) . 'widgets/woo/best-products.php' );
|
154 |
+
|
155 |
+
register_widget( 'Woo_Product_Categories' );
|
156 |
+
register_widget( 'Woo_Recent_Products' );
|
157 |
+
register_widget( 'Woo_Featured_Products' );
|
158 |
+
register_widget( 'Woo_Popular_Products' );
|
159 |
+
register_widget( 'Woo_Sale_Products' );
|
160 |
+
register_widget( 'Woo_Best_Products' );
|
161 |
+
}
|
162 |
+
|
163 |
+
/**
|
164 |
+
* Posts Widget section
|
165 |
+
*
|
166 |
+
* @since 1.0.0
|
167 |
+
* @return void
|
168 |
+
*/
|
169 |
+
public function register_posts_widgets() {
|
170 |
+
include_once( plugin_dir_path( __FILE__ ) . 'widgets/wp/eaw-posts-widget.php' );
|
171 |
+
register_widget( 'EAW_Recent_Posts' );
|
172 |
+
|
173 |
+
include_once( plugin_dir_path( __FILE__ ) . 'widgets/wp/eaw-posts-widget-plus.php' );
|
174 |
+
register_widget( 'EAW_Recent_Posts_Plus' );
|
175 |
+
}
|
176 |
+
|
177 |
+
/**
|
178 |
+
* Returns an array of all PHP files in the specified absolute path.
|
179 |
+
* Inspired from jetpack's glob_php
|
180 |
+
*
|
181 |
+
* @param string $absolute_path The absolute path of the directory to search.
|
182 |
+
*
|
183 |
+
* @return array Array of absolute paths to the PHP files.
|
184 |
+
*/
|
185 |
+
protected function get_dir_files( $absolute_path ) {
|
186 |
+
if ( function_exists( 'glob' ) ) {
|
187 |
+
return glob( "$absolute_path/*.php" );
|
188 |
+
}
|
189 |
+
|
190 |
+
$absolute_path = untrailingslashit( $absolute_path );
|
191 |
+
$files = array();
|
192 |
+
if ( ! $dir = @opendir( $absolute_path ) ) {
|
193 |
+
return $files;
|
194 |
+
}
|
195 |
+
|
196 |
+
while ( false !== $file = readdir( $dir ) ) {
|
197 |
+
if ( '.' == substr( $file, 0, 1 ) || '.php' != substr( $file, - 4 ) ) {
|
198 |
+
continue;
|
199 |
+
}
|
200 |
+
|
201 |
+
$file = "$absolute_path/$file";
|
202 |
+
|
203 |
+
if ( ! is_file( $file ) ) {
|
204 |
+
continue;
|
205 |
+
}
|
206 |
+
|
207 |
+
$files[] = $file;
|
208 |
+
}
|
209 |
+
|
210 |
+
closedir( $dir );
|
211 |
+
|
212 |
+
return $files;
|
213 |
+
}
|
214 |
+
|
215 |
+
protected function convert_filename_to_classname( $widget ) {
|
216 |
+
$classname = ucwords( $widget, "-" );
|
217 |
+
$classname = str_replace( '-', '_', $classname );
|
218 |
+
$classname = '\\ThemeIsle\\ElementorExtraWidgets\\' . $classname;
|
219 |
+
|
220 |
+
return $classname;
|
221 |
+
}
|
222 |
+
|
223 |
+
/**
|
224 |
+
*
|
225 |
+
* @static
|
226 |
+
* @since 1.0.0
|
227 |
+
* @access public
|
228 |
+
* @return ElementorExtraWidgets
|
229 |
+
*/
|
230 |
+
public static function instance() {
|
231 |
+
if ( is_null( self::$instance ) ) {
|
232 |
+
self::$instance = new self();
|
233 |
+
self::$instance->init();
|
234 |
+
}
|
235 |
+
|
236 |
+
return self::$instance;
|
237 |
+
}
|
238 |
+
|
239 |
+
/**
|
240 |
+
* Throw error on object clone
|
241 |
+
*
|
242 |
+
* The whole idea of the singleton design pattern is that there is a single
|
243 |
+
* object therefore, we don't want the object to be cloned.
|
244 |
+
*
|
245 |
+
* @access public
|
246 |
+
* @since 1.0.0
|
247 |
+
* @return void
|
248 |
+
*/
|
249 |
+
public function __clone() {
|
250 |
+
// Cloning instances of the class is forbidden.
|
251 |
+
_doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin’ huh?', 'elementor-addon-widgets' ), '1.0.0' );
|
252 |
+
}
|
253 |
+
|
254 |
+
/**
|
255 |
+
* Disable unserializing of the class
|
256 |
+
*
|
257 |
+
* @access public
|
258 |
+
* @since 1.0.0
|
259 |
+
* @return void
|
260 |
+
*/
|
261 |
+
public function __wakeup() {
|
262 |
+
// Unserializing instances of the class is forbidden.
|
263 |
+
_doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin’ huh?', 'elementor-addon-widgets' ), '1.0.0' );
|
264 |
+
}
|
265 |
+
}
|
266 |
+
}
|
vendor/codeinwp/elementor-extra-widgets/composer.json
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "codeinwp/elementor-extra-widgets",
|
3 |
+
"type": "library",
|
4 |
+
"version": "1.0.1",
|
5 |
+
"license": "GPL-3.0-or-later",
|
6 |
+
"minimum-stability": "dev",
|
7 |
+
"homepage": "https://github.com/Codeinwp/elementor-extra-widgets",
|
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/elementor-extra-widgets/issues"
|
22 |
+
}
|
23 |
+
}
|
vendor/codeinwp/elementor-extra-widgets/css/admin.css
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.panel-elements-category-title-eaw-elementor-widgets-pro + .panel-elements-category-items .elementor-element {
|
2 |
+
position: relative;
|
3 |
+
}
|
4 |
+
.panel-elements-category-title-eaw-elementor-widgets-pro + .panel-elements-category-items .elementor-element:before {
|
5 |
+
content:"PRO";
|
6 |
+
position: absolute;
|
7 |
+
background: #b7084e;
|
8 |
+
color: #fff;
|
9 |
+
border-radius: 3px;
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Pricing Table Base CSS */
|
2 |
+
.obfx-pricing-table-wrapper,
|
3 |
+
.obfx-pricing-table-wrapper p.obfx-pricing-table-subtitle {
|
4 |
+
text-align: center;
|
5 |
+
}
|
6 |
+
|
7 |
+
.obfx-pricing-table-wrapper a {
|
8 |
+
cursor: pointer;
|
9 |
+
}
|
10 |
+
|
11 |
+
.obfx-title-wrapper {
|
12 |
+
padding: 15px;
|
13 |
+
}
|
14 |
+
|
15 |
+
.obfx-pricing-table-title {
|
16 |
+
font-weight: 600;
|
17 |
+
}
|
18 |
+
|
19 |
+
.obfx-pricing-table-wrapper .obfx-feature-list {
|
20 |
+
margin: 0;
|
21 |
+
padding: 10px 50px;
|
22 |
+
list-style: none;
|
23 |
+
}
|
24 |
+
|
25 |
+
.obfx-pricing-table-wrapper .obfx-feature-list li {
|
26 |
+
font-size: 16px;
|
27 |
+
}
|
28 |
+
|
29 |
+
.obfx-price-wrapper {
|
30 |
+
padding: 20px 0;
|
31 |
+
}
|
32 |
+
|
33 |
+
.obfx-price {
|
34 |
+
font-size: 80px;
|
35 |
+
font-weight: 600;
|
36 |
+
line-height: normal;
|
37 |
+
}
|
38 |
+
|
39 |
+
.obfx-pricing-period,
|
40 |
+
.obfx-price-currency {
|
41 |
+
font-size: 21px;
|
42 |
+
}
|
43 |
+
|
44 |
+
.obfx-button-icon-align-right i {
|
45 |
+
margin-left: 5px;
|
46 |
+
}
|
47 |
+
|
48 |
+
.obfx-button-icon-align-left i {
|
49 |
+
margin-right: 5px;
|
50 |
+
}
|
51 |
+
|
52 |
+
.obfx-pricing-table-accented {
|
53 |
+
font-weight: 600;
|
54 |
+
}
|
55 |
+
|
56 |
+
.obfx-pricing-table-button-wrapper {
|
57 |
+
padding: 20px 0;
|
58 |
+
}
|
59 |
+
|
60 |
+
.obfx-pricing-table-button {
|
61 |
+
padding: 10px 20px;
|
62 |
+
border-radius: 5px;
|
63 |
+
}
|
64 |
+
|
65 |
+
/* End Of Pricing Table Base CSS */
|
66 |
+
|
67 |
+
/* Post Type Grid Base CSS */
|
68 |
+
|
69 |
+
.obfx-grid:after {
|
70 |
+
display: block;
|
71 |
+
visibility: hidden;
|
72 |
+
clear: both;
|
73 |
+
height: 0;
|
74 |
+
font-size: 0;
|
75 |
+
content: " ";
|
76 |
+
}
|
77 |
+
|
78 |
+
.obfx-grid-container {
|
79 |
+
display: -webkit-flex;
|
80 |
+
display: -webkit-box;
|
81 |
+
display: -ms-flexbox;
|
82 |
+
display: flex;
|
83 |
+
margin-right: -15px;
|
84 |
+
margin-left: -15px;
|
85 |
+
|
86 |
+
-webkit-flex-wrap: wrap;
|
87 |
+
-ms-flex-wrap: wrap;
|
88 |
+
flex-wrap: wrap;
|
89 |
+
}
|
90 |
+
|
91 |
+
.obfx-grid-wrapper {
|
92 |
+
padding-right: 15px;
|
93 |
+
padding-left: 15px;
|
94 |
+
}
|
95 |
+
|
96 |
+
.obfx-grid .obfx-grid-col-image {
|
97 |
+
display: block;
|
98 |
+
overflow: hidden;
|
99 |
+
position: relative;
|
100 |
+
top: 0;
|
101 |
+
right: 0;
|
102 |
+
bottom: 0;
|
103 |
+
left: 0;
|
104 |
+
margin: 0 0 10px 0;
|
105 |
+
box-shadow: 0 3px 10px 0 rgba(181,181,181,1);
|
106 |
+
}
|
107 |
+
|
108 |
+
.obfx-grid .obfx-grid-col-image {
|
109 |
+
display: inline-block;
|
110 |
+
width: 100%;
|
111 |
+
height: 200px;
|
112 |
+
}
|
113 |
+
|
114 |
+
.obfx-grid .obfx-grid-col-image.obfx-fit-height img {
|
115 |
+
width: auto;
|
116 |
+
height: 100%;
|
117 |
+
}
|
118 |
+
|
119 |
+
.obfx-grid .obfx-grid-col-image img {
|
120 |
+
display: block;
|
121 |
+
position: absolute;
|
122 |
+
top: 50%;
|
123 |
+
left: 50%;
|
124 |
+
width: 100%;
|
125 |
+
max-width: none;
|
126 |
+
height: auto;
|
127 |
+
max-height: none;
|
128 |
+
-webkit-transform: translate(-50%,-50%);
|
129 |
+
-ms-transform: translate(-50%,-50%);
|
130 |
+
transform: translate(-50%,-50%);
|
131 |
+
}
|
132 |
+
|
133 |
+
.obfx-grid .obfx-grid-title,
|
134 |
+
.obfx-grid .obfx-grid-title a {
|
135 |
+
margin: 0;
|
136 |
+
color: #333;
|
137 |
+
font-size: 24px;
|
138 |
+
line-height: 1.5;
|
139 |
+
}
|
140 |
+
|
141 |
+
.obfx-grid-meta {
|
142 |
+
margin: 0 0 10px 0;
|
143 |
+
}
|
144 |
+
|
145 |
+
.obfx-grid-meta > span {
|
146 |
+
margin-right: 10px;
|
147 |
+
color: #999;
|
148 |
+
font-size: 14px;
|
149 |
+
}
|
150 |
+
|
151 |
+
.obfx-grid-meta > span:last-of-type {
|
152 |
+
margin-right: 0;
|
153 |
+
}
|
154 |
+
|
155 |
+
.obfx-grid-meta .fa {
|
156 |
+
margin-right: 7px;
|
157 |
+
}
|
158 |
+
|
159 |
+
.obfx-grid-meta a {
|
160 |
+
color: #999;
|
161 |
+
text-decoration: none;
|
162 |
+
}
|
163 |
+
|
164 |
+
.obfx-grid-meta a:hover,
|
165 |
+
.obfx-grid-meta a:focus {
|
166 |
+
color: inherit;
|
167 |
+
text-decoration: underline;
|
168 |
+
}
|
169 |
+
|
170 |
+
.obfx-grid-categories-item:after,
|
171 |
+
.obfx-grid-tags-item:after {
|
172 |
+
content: ", ";
|
173 |
+
}
|
174 |
+
|
175 |
+
.obfx-grid-categories-item:last-of-type:after,
|
176 |
+
.obfx-grid-tags-item:last-of-type:after {
|
177 |
+
display: none;
|
178 |
+
content: "";
|
179 |
+
}
|
180 |
+
|
181 |
+
.obfx-grid-content {
|
182 |
+
margin: 0 0 10px 0;
|
183 |
+
color: #555;
|
184 |
+
font-size: 16px;
|
185 |
+
line-height: 1.5;
|
186 |
+
}
|
187 |
+
|
188 |
+
.obfx-grid-footer a {
|
189 |
+
display: inline-block;
|
190 |
+
color: #333;
|
191 |
+
font-size: 14px;
|
192 |
+
font-weight: 700;
|
193 |
+
}
|
194 |
+
|
195 |
+
.obfx-grid-container.obfx-grid-style-list .obfx-grid-col {
|
196 |
+
display: -webkit-flex;
|
197 |
+
display: -webkit-box;
|
198 |
+
display: -ms-flexbox;
|
199 |
+
display: flex;
|
200 |
+
|
201 |
+
-webkit-flex-wrap: wrap;
|
202 |
+
-ms-flex-wrap: wrap;
|
203 |
+
flex-wrap: wrap;
|
204 |
+
}
|
205 |
+
|
206 |
+
.obfx-grid-container.obfx-grid-style-list .obfx-grid-col-image {
|
207 |
+
width: 40%;
|
208 |
+
}
|
209 |
+
|
210 |
+
.obfx-grid-container.obfx-grid-style-list .obfx-grid-col-content {
|
211 |
+
width: 60%;
|
212 |
+
padding-left: 15px;
|
213 |
+
}
|
214 |
+
|
215 |
+
.obfx-grid-container.obfx-grid-style-list .obfx-grid-col.obfx-no-image .obfx-grid-col-content {
|
216 |
+
width: 100%;
|
217 |
+
padding-left: 0;
|
218 |
+
}
|
219 |
+
|
220 |
+
.obfx-grid-pagination {
|
221 |
+
width: 100%;
|
222 |
+
}
|
223 |
+
|
224 |
+
.obfx-grid-desktop-1 .obfx-grid-wrapper {
|
225 |
+
width: 100%;
|
226 |
+
}
|
227 |
+
|
228 |
+
.obfx-grid-desktop-2 .obfx-grid-wrapper {
|
229 |
+
width: 50%;
|
230 |
+
}
|
231 |
+
|
232 |
+
.obfx-grid-desktop-3 .obfx-grid-wrapper {
|
233 |
+
width: 33.333%;
|
234 |
+
}
|
235 |
+
|
236 |
+
.obfx-grid-desktop-4 .obfx-grid-wrapper {
|
237 |
+
width: 25%;
|
238 |
+
}
|
239 |
+
|
240 |
+
.obfx-grid-desktop-5 .obfx-grid-wrapper {
|
241 |
+
width: 20%;
|
242 |
+
}
|
243 |
+
|
244 |
+
@media (max-width: 992px) {
|
245 |
+
.obfx-grid-tablet-1 .obfx-grid-wrapper {
|
246 |
+
width: 100%;
|
247 |
+
}
|
248 |
+
|
249 |
+
.obfx-grid-tablet-2 .obfx-grid-wrapper {
|
250 |
+
width: 50%;
|
251 |
+
}
|
252 |
+
|
253 |
+
.obfx-grid-tablet-3 .obfx-grid-wrapper {
|
254 |
+
width: 33.333%;
|
255 |
+
}
|
256 |
+
|
257 |
+
.obfx-grid-tablet-4 .obfx-grid-wrapper {
|
258 |
+
width: 25%;
|
259 |
+
}
|
260 |
+
|
261 |
+
.obfx-grid-tablet-5 .obfx-grid-wrapper {
|
262 |
+
width: 20%;
|
263 |
+
}
|
264 |
+
}
|
265 |
+
|
266 |
+
@media (max-width: 767px) {
|
267 |
+
.obfx-grid-mobile-1 .obfx-grid-wrapper {
|
268 |
+
width: 100%;
|
269 |
+
}
|
270 |
+
|
271 |
+
.obfx-grid-mobile-2 .obfx-grid-wrapper {
|
272 |
+
width: 50%;
|
273 |
+
}
|
274 |
+
|
275 |
+
.obfx-grid-mobile-3 .obfx-grid-wrapper {
|
276 |
+
width: 33.333%;
|
277 |
+
}
|
278 |
+
|
279 |
+
.obfx-grid-mobile-4 .obfx-grid-wrapper {
|
280 |
+
width: 25%;
|
281 |
+
}
|
282 |
+
|
283 |
+
.obfx-grid-mobile-5 .obfx-grid-wrapper {
|
284 |
+
width: 20%;
|
285 |
+
}
|
286 |
+
}
|
287 |
+
|
288 |
+
/* End Of Post Type Grid Base CSS */
|
289 |
+
|
290 |
+
.obfx-service-box {
|
291 |
+
display: -webkit-box;
|
292 |
+
display: -webkit-flex;
|
293 |
+
display: -ms-flexbox;
|
294 |
+
display: flex;
|
295 |
+
}
|
296 |
+
|
297 |
+
.obfx-position-left .obfx-service-box {
|
298 |
+
flex-direction: row;
|
299 |
+
|
300 |
+
-webkit-box-direction: normal;
|
301 |
+
-webkit-box-orient: horizontal;
|
302 |
+
-webkit-flex-direction: row;
|
303 |
+
-ms-flex-direction: row;
|
304 |
+
}
|
305 |
+
|
306 |
+
.obfx-position-right .obfx-service-box {
|
307 |
+
flex-direction: row-reverse;
|
308 |
+
|
309 |
+
-webkit-box-direction: reverse;
|
310 |
+
-webkit-box-orient: horizontal;
|
311 |
+
-webkit-flex-direction: row-reverse;
|
312 |
+
-ms-flex-direction: row-reverse;
|
313 |
+
}
|
314 |
+
|
315 |
+
.obfx-position-top .obfx-service-box {
|
316 |
+
flex-direction: column;
|
317 |
+
|
318 |
+
-webkit-box-direction: normal;
|
319 |
+
-webkit-box-orient: vertical;
|
320 |
+
-webkit-flex-direction: column;
|
321 |
+
-ms-flex-direction: column;
|
322 |
+
}
|
323 |
+
|
324 |
+
.obfx-service-box .obfx-service-box-content .obfx-service-title,
|
325 |
+
.obfx-service-box .obfx-service-box-content .obfx-service-text {
|
326 |
+
margin: 0;
|
327 |
+
}
|
328 |
+
|
329 |
+
|
330 |
+
/** passed from eaw.css **/
|
331 |
+
|
332 |
+
/*
|
333 |
+
* Elementor CSS support
|
334 |
+
*/
|
335 |
+
|
336 |
+
.eaw-product-section .section-title {
|
337 |
+
margin-bottom: 20px;
|
338 |
+
}
|
339 |
+
|
340 |
+
.elementor-widget-wp-widget-eaw-recent-posts h5,
|
341 |
+
.elementor-widget-wp-widget-eaw-recent-posts-plus h5 {
|
342 |
+
font-size: 1.75rem;
|
343 |
+
line-height: 1.75;
|
344 |
+
text-align: center;
|
345 |
+
}
|
346 |
+
|
347 |
+
.eaw-recent-posts,
|
348 |
+
.eaw-recent-posts-plus {
|
349 |
+
width: 32.3333%;
|
350 |
+
padding: 0;
|
351 |
+
margin: 0;
|
352 |
+
margin-right: 1.3333%;
|
353 |
+
float: left;
|
354 |
+
}
|
355 |
+
|
356 |
+
.eaw-recent-posts:last-child,
|
357 |
+
.eaw-recent-posts-plus:last-child {
|
358 |
+
margin-right: 0;
|
359 |
+
}
|
360 |
+
|
361 |
+
.eaw-recent-posts img {
|
362 |
+
width: 100%;
|
363 |
+
height: 250px;
|
364 |
+
margin: 10px 0;
|
365 |
+
border-radius: 6px;
|
366 |
+
}
|
367 |
+
|
368 |
+
.eaw-recent-posts .eaw-content {
|
369 |
+
padding: 1% 2%;
|
370 |
+
}
|
371 |
+
|
372 |
+
@media screen and (max-width: 768px) {
|
373 |
+
.eaw-recent-posts {
|
374 |
+
width: 48%;
|
375 |
+
padding: 0;
|
376 |
+
margin: 0 1%;
|
377 |
+
}
|
378 |
+
|
379 |
+
.eaw-recent-posts img {
|
380 |
+
height: 300px;
|
381 |
+
margin: 0 auto;
|
382 |
+
}
|
383 |
+
}
|
384 |
+
|
385 |
+
@media screen and (max-width: 667px) {
|
386 |
+
.eaw-recent-posts {
|
387 |
+
width: 100%;
|
388 |
+
margin: 0;
|
389 |
+
}
|
390 |
+
|
391 |
+
.eaw-recent-posts img {
|
392 |
+
height: 300px;
|
393 |
+
margin: 0 auto;
|
394 |
+
}
|
395 |
+
}
|
vendor/codeinwp/elementor-extra-widgets/js/obfx-grid.js
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* global elementor */
|
2 |
+
(function ($) {
|
3 |
+
|
4 |
+
$( document ).ready(
|
5 |
+
function () {
|
6 |
+
checkImageSize();
|
7 |
+
}
|
8 |
+
);
|
9 |
+
|
10 |
+
$( window ).resize(
|
11 |
+
function () {
|
12 |
+
checkImageSize();
|
13 |
+
}
|
14 |
+
);
|
15 |
+
|
16 |
+
if ( typeof elementor !== 'undefined' ) {
|
17 |
+
$( window ).on(
|
18 |
+
'elementor/frontend/init', function () {
|
19 |
+
elementor.hooks.addAction(
|
20 |
+
'panel/open_editor/widget/obfx-posts-grid', function ( panel ) {
|
21 |
+
var $element = panel.$el.find( '.elementor-control-section_grid_image' );
|
22 |
+
$element.click(
|
23 |
+
function () {
|
24 |
+
panel.$el.find( '.elementor-control-grid_image_height .elementor-control-input-wrapper' ).mouseup(
|
25 |
+
function () {
|
26 |
+
checkImageSize();
|
27 |
+
}
|
28 |
+
);
|
29 |
+
}
|
30 |
+
);
|
31 |
+
}
|
32 |
+
);
|
33 |
+
}
|
34 |
+
);
|
35 |
+
}
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Check the container and image size.
|
39 |
+
*/
|
40 |
+
function checkImageSize() {
|
41 |
+
$( '.obfx-grid .obfx-grid-col' ).each(
|
42 |
+
function () {
|
43 |
+
var container = $( this ).find( '.obfx-grid-col-image' ),
|
44 |
+
containerWidth = $( this ).find( '.obfx-grid-col-image' ).width(),
|
45 |
+
containerHeight = $( this ).find( '.obfx-grid-col-image' ).height(),
|
46 |
+
imageWidth = $( this ).find( '.obfx-grid-col-image img' ).width(),
|
47 |
+
imageHeight = $( this ).find( '.obfx-grid-col-image img' ).height();
|
48 |
+
|
49 |
+
if ( $( this ).find( '.obfx-grid-col-image' ).length > 0 ) {
|
50 |
+
if ( containerHeight > imageHeight ) {
|
51 |
+
container.addClass( 'obfx-fit-height' );
|
52 |
+
}
|
53 |
+
|
54 |
+
if ( (containerWidth - imageWidth > 2) && container.hasClass( 'obfx-fit-height' ) ) {
|
55 |
+
container.removeClass( 'obfx-fit-height' );
|
56 |
+
}
|
57 |
+
}
|
58 |
+
}
|
59 |
+
);
|
60 |
+
}
|
61 |
+
|
62 |
+
})( jQuery );
|
vendor/codeinwp/elementor-extra-widgets/load.php
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Loader for the ThemeIsle\ElementorExtraWidgets
|
4 |
+
*
|
5 |
+
* @package ThemeIsle\ElementorExtraWidgets
|
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-elementor-extra-widgets.php' );
|
vendor/codeinwp/elementor-extra-widgets/widgets/elementor/placeholders/flipcard.php
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace ThemeIsle\ElementorExtraWidgets;
|
4 |
+
|
5 |
+
class Flipcard_Placeholder extends Premium_Placeholder {
|
6 |
+
|
7 |
+
public function get_title() {
|
8 |
+
return 'Flipcard';
|
9 |
+
}
|
10 |
+
|
11 |
+
public function get_name() {
|
12 |
+
return 'eaw_flipcard';
|
13 |
+
}
|
14 |
+
|
15 |
+
public function get_pro_element_name() {
|
16 |
+
return 'flipcard';
|
17 |
+
}
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Widget icon.
|
21 |
+
*
|
22 |
+
* @return string
|
23 |
+
*/
|
24 |
+
public function get_icon() {
|
25 |
+
return 'fa fa-share-square';
|
26 |
+
}
|
27 |
+
}
|
vendor/codeinwp/elementor-extra-widgets/widgets/elementor/placeholders/review-box.php
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace ThemeIsle\ElementorExtraWidgets;
|
4 |
+
|
5 |
+
class Review_Box_Placeholder extends Premium_Placeholder {
|
6 |
+
|
7 |
+
public function get_title() {
|
8 |
+
return 'Review Box';
|
9 |
+
}
|
10 |
+
|
11 |
+
public function get_pro_element_name() {
|
12 |
+
return 'review-box';
|
13 |
+
}
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Widget icon.
|
17 |
+
*
|
18 |
+
* @return string
|
19 |
+
*/
|
20 |
+
public function get_icon() {
|
21 |
+
return 'fa fa-star';
|
22 |
+
}
|
23 |
+
}
|
vendor/codeinwp/elementor-extra-widgets/widgets/elementor/placeholders/share-buttons.php
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace ThemeIsle\ElementorExtraWidgets;
|
4 |
+
|
5 |
+
class Share_Buttons_Placeholder extends Premium_Placeholder {
|
6 |
+
|
7 |
+
public function get_title() {
|
8 |
+
return 'Share Buttons';
|
9 |
+
}
|
10 |
+
|
11 |
+
public function get_pro_element_name() {
|
12 |
+
return 'share-buttons';
|
13 |
+
}
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Widget icon.
|
17 |
+
*
|
18 |
+
* @return string
|
19 |
+
*/
|
20 |
+
public function get_icon() {
|
21 |
+
return 'fa fa-share-alt';
|
22 |
+
}
|
23 |
+
}
|
vendor/codeinwp/elementor-extra-widgets/widgets/elementor/placeholders/typed-headline.php
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace ThemeIsle\ElementorExtraWidgets;
|
4 |
+
|
5 |
+
class Typed_Headline_Placeholder extends Premium_Placeholder {
|
6 |
+
|
7 |
+
public function get_title() {
|
8 |
+
return 'Typed Headline';
|
9 |
+
}
|
10 |
+
|
11 |
+
public function get_pro_element_name() {
|
12 |
+
return 'typed-headline';
|
13 |
+
}
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Widget icon.
|
17 |
+
*
|
18 |
+
* @return string
|
19 |
+
*/
|
20 |
+
public function get_icon() {
|
21 |
+
return 'fa fa-h-square';
|
22 |
+
}
|
23 |
+
}
|
vendor/codeinwp/elementor-extra-widgets/widgets/elementor/posts-grid.php
ADDED
@@ -0,0 +1,1808 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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|
11 |
+
namespace ThemeIsle\ElementorExtraWidgets;
|
12 |
+
|
13 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
14 |
+
exit;
|
15 |
+
} // End if().
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Class Posts_Grid
|
19 |
+
*
|
20 |
+
* @package ThemeIsle\ElementorExtraWidgets
|
21 |
+
*/
|
22 |
+
class Posts_Grid extends \Elementor\Widget_Base {
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Widget title.
|
26 |
+
*
|
27 |
+
* @return string
|
28 |
+
*/
|
29 |
+
public function get_title() {
|
30 |
+
return __( 'Post Type Grid', 'elementor-addon-widgets' );
|
31 |
+
}
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Widget icon.
|
35 |
+
*
|
36 |
+
* @return string
|
37 |
+
*/
|
38 |
+
public function get_icon() {
|
39 |
+
return 'eicon-posts-grid';
|
40 |
+
}
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Widget name.
|
44 |
+
*
|
45 |
+
* @return string
|
46 |
+
*/
|
47 |
+
public function get_name() {
|
48 |
+
return 'obfx-posts-grid';
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Register dependent script.
|
53 |
+
*
|
54 |
+
* @return array
|
55 |
+
*/
|
56 |
+
public function get_script_depends() {
|
57 |
+
return [ 'obfx-grid-js' ];
|
58 |
+
}
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Widget Category.
|
62 |
+
*
|
63 |
+
* @return array
|
64 |
+
*/
|
65 |
+
public function get_categories() {
|
66 |
+
$category_args = apply_filters( 'elementor_extra_widgets_category_args', array() );
|
67 |
+
$slug = isset( $category_args['slug'] ) ? $category_args['slug'] : 'obfx-elementor-widgets';
|
68 |
+
|
69 |
+
return [ $slug ];
|
70 |
+
}
|
71 |
+
|
72 |
+
/**
|
73 |
+
* Get post types.
|
74 |
+
*/
|
75 |
+
private function grid_get_all_post_types() {
|
76 |
+
$options = array();
|
77 |
+
$exclude = array( 'attachment', 'elementor_library' ); // excluded post types
|
78 |
+
|
79 |
+
$args = array(
|
80 |
+
'public' => true,
|
81 |
+
);
|
82 |
+
|
83 |
+
foreach ( get_post_types( $args, 'objects' ) as $post_type ) {
|
84 |
+
// Check if post type name exists.
|
85 |
+
if ( ! isset( $post_type->name ) ) {
|
86 |
+
continue;
|
87 |
+
}
|
88 |
+
|
89 |
+
// Check if post type label exists.
|
90 |
+
if ( ! isset( $post_type->label ) ) {
|
91 |
+
continue;
|
92 |
+
}
|
93 |
+
|
94 |
+
// Check if post type is excluded.
|
95 |
+
if ( in_array( $post_type->name, $exclude ) === true ) {
|
96 |
+
continue;
|
97 |
+
}
|
98 |
+
|
99 |
+
$options[ $post_type->name ] = $post_type->label;
|
100 |
+
}
|
101 |
+
|
102 |
+
return $options;
|
103 |
+
}
|
104 |
+
|
105 |
+
/**
|
106 |
+
* Get post type categories.
|
107 |
+
*/
|
108 |
+
private function grid_get_all_post_type_categories( $post_type ) {
|
109 |
+
$options = array();
|
110 |
+
|
111 |
+
if ( $post_type == 'post' ) {
|
112 |
+
$taxonomy = 'category';
|
113 |
+
} elseif ( $post_type == 'product' ) {
|
114 |
+
$taxonomy = 'product_cat';
|
115 |
+
}
|
116 |
+
|
117 |
+
if ( ! empty( $taxonomy ) ) {
|
118 |
+
// Get categories for post type.
|
119 |
+
$terms = get_terms(
|
120 |
+
array(
|
121 |
+
'taxonomy' => $taxonomy,
|
122 |
+
'hide_empty' => false,
|
123 |
+
)
|
124 |
+
);
|
125 |
+
if ( ! empty( $terms ) ) {
|
126 |
+
foreach ( $terms as $term ) {
|
127 |
+
if ( isset( $term ) ) {
|
128 |
+
if ( isset( $term->slug ) && isset( $term->name ) ) {
|
129 |
+
$options[ $term->slug ] = $term->name;
|
130 |
+
}
|
131 |
+
}
|
132 |
+
}
|
133 |
+
}
|
134 |
+
}
|
135 |
+
|
136 |
+
return $options;
|
137 |
+
}
|
138 |
+
|
139 |
+
/**
|
140 |
+
* Register Elementor Controls.
|
141 |
+
*/
|
142 |
+
protected function _register_controls() {
|
143 |
+
// Content.
|
144 |
+
$this->grid_options_section();
|
145 |
+
$this->grid_image_section();
|
146 |
+
$this->grid_title_section();
|
147 |
+
$this->grid_meta_section();
|
148 |
+
$this->grid_content_section();
|
149 |
+
$this->grid_pagination_section();
|
150 |
+
// Style.
|
151 |
+
$this->grid_options_style_section();
|
152 |
+
$this->grid_image_style_section();
|
153 |
+
$this->grid_title_style_section();
|
154 |
+
$this->grid_meta_style_section();
|
155 |
+
$this->grid_content_style_section();
|
156 |
+
$this->grid_pagination_style_section();
|
157 |
+
}
|
158 |
+
|
159 |
+
/**
|
160 |
+
* Content > Grid.
|
161 |
+
*/
|
162 |
+
private function grid_options_section() {
|
163 |
+
$this->start_controls_section(
|
164 |
+
'section_grid',
|
165 |
+
[
|
166 |
+
'label' => __( 'Grid Options', 'elementor-addon-widgets' ),
|
167 |
+
]
|
168 |
+
);
|
169 |
+
|
170 |
+
// Post type.
|
171 |
+
$this->add_control(
|
172 |
+
'grid_post_type',
|
173 |
+
[
|
174 |
+
'type' => \Elementor\Controls_Manager::SELECT,
|
175 |
+
'label' => '<i class="fa fa-tag"></i> ' . __( 'Post Type', 'elementor-addon-widgets' ),
|
176 |
+
'default' => 'post',
|
177 |
+
'options' => $this->grid_get_all_post_types(),
|
178 |
+
]
|
179 |
+
);
|
180 |
+
|
181 |
+
// Post categories.
|
182 |
+
$this->add_control(
|
183 |
+
'grid_post_categories',
|
184 |
+
[
|
185 |
+
'type' => \Elementor\Controls_Manager::SELECT,
|
186 |
+
'label' => '<i class="fa fa-folder"></i> ' . __( 'Category', 'elementor-addon-widgets' ),
|
187 |
+
'options' => $this->grid_get_all_post_type_categories( 'post' ),
|
188 |
+
'condition' => [
|
189 |
+
'grid_post_type' => 'post',
|
190 |
+
],
|
191 |
+
]
|
192 |
+
);
|
193 |
+
|
194 |
+
// Product categories.
|
195 |
+
$this->add_control(
|
196 |
+
'grid_product_categories',
|
197 |
+
[
|
198 |
+
'type' => \Elementor\Controls_Manager::SELECT,
|
199 |
+
'label' => '<i class="fa fa-tag"></i> ' . __( 'Category', 'elementor-addon-widgets' ),
|
200 |
+
'options' => $this->grid_get_all_post_type_categories( 'product' ),
|
201 |
+
'condition' => [
|
202 |
+
'grid_post_type' => 'product',
|
203 |
+
],
|
204 |
+
]
|
205 |
+
);
|
206 |
+
|
207 |
+
// Style.
|
208 |
+
$this->add_control(
|
209 |
+
'grid_style',
|
210 |
+
[
|
211 |
+
'type' => \Elementor\Controls_Manager::SELECT,
|
212 |
+
'label' => '<i class="fa fa-paint-brush"></i> ' . __( 'Style', 'elementor-addon-widgets' ),
|
213 |
+
'default' => 'grid',
|
214 |
+
'options' => [
|
215 |
+
'grid' => __( 'Grid', 'elementor-addon-widgets' ),
|
216 |
+
'list' => __( 'List', 'elementor-addon-widgets' ),
|
217 |
+
],
|
218 |
+
]
|
219 |
+
);
|
220 |
+
|
221 |
+
// Items.
|
222 |
+
$this->add_control(
|
223 |
+
'grid_items',
|
224 |
+
[
|
225 |
+
'type' => \Elementor\Controls_Manager::NUMBER,
|
226 |
+
'label' => '<i class="fa fa-th-large"></i> ' . __( 'Items', 'elementor-addon-widgets' ),
|
227 |
+
'placeholder' => __( 'How many items?', 'elementor-addon-widgets' ),
|
228 |
+
'default' => 6,
|
229 |
+
]
|
230 |
+
);
|
231 |
+
|
232 |
+
// Columns.
|
233 |
+
$this->add_responsive_control(
|
234 |
+
'grid_columns',
|
235 |
+
[
|
236 |
+
'type' => \Elementor\Controls_Manager::SELECT,
|
237 |
+
'label' => '<i class="fa fa-columns"></i> ' . __( 'Columns', 'elementor-addon-widgets' ),
|
238 |
+
'default' => 3,
|
239 |
+
'tablet_default' => 2,
|
240 |
+
'mobile_default' => 1,
|
241 |
+
'options' => [
|
242 |
+
1 => 1,
|
243 |
+
2 => 2,
|
244 |
+
3 => 3,
|
245 |
+
4 => 4,
|
246 |
+
5 => 5,
|
247 |
+
],
|
248 |
+
]
|
249 |
+
);
|
250 |
+
|
251 |
+
// Order by.
|
252 |
+
$this->add_control(
|
253 |
+
'grid_order_by',
|
254 |
+
[
|
255 |
+
'type' => \Elementor\Controls_Manager::SELECT,
|
256 |
+
'label' => '<i class="fa fa-sort"></i> ' . __( 'Order by', 'elementor-addon-widgets' ),
|
257 |
+
'default' => 'date',
|
258 |
+
'options' => [
|
259 |
+
'date' => __( 'Date', 'elementor-addon-widgets' ),
|
260 |
+
'title' => __( 'Title', 'elementor-addon-widgets' ),
|
261 |
+
'modified' => __( 'Modified date', 'elementor-addon-widgets' ),
|
262 |
+
'comment_count' => __( 'Comment count', 'elementor-addon-widgets' ),
|
263 |
+
'rand' => __( 'Random', 'elementor-addon-widgets' ),
|
264 |
+
],
|
265 |
+
]
|
266 |
+
);
|
267 |
+
|
268 |
+
// Display pagination.
|
269 |
+
$this->add_control(
|
270 |
+
'grid_pagination',
|
271 |
+
[
|
272 |
+
'label' => '<i class="fa fa-arrow-circle-right"></i> ' . __( 'Pagination', 'elementor-addon-widgets' ),
|
273 |
+
'type' => \Elementor\Controls_Manager::SWITCHER,
|
274 |
+
'default' => '',
|
275 |
+
]
|
276 |
+
);
|
277 |
+
|
278 |
+
$this->end_controls_section();
|
279 |
+
}
|
280 |
+
|
281 |
+
/**
|
282 |
+
* Content > Image Options.
|
283 |
+
*/
|
284 |
+
private function grid_image_section() {
|
285 |
+
$this->start_controls_section(
|
286 |
+
'section_grid_image',
|
287 |
+
[
|
288 |
+
'label' => __( 'Image', 'elementor-addon-widgets' ),
|
289 |
+
]
|
290 |
+
);
|
291 |
+
|
292 |
+
// Hide image.
|
293 |
+
$this->add_control(
|
294 |
+
'grid_image_hide',
|
295 |
+
[
|
296 |
+
'label' => '<i class="fa fa-minus-circle"></i> ' . __( 'Hide', 'elementor-addon-widgets' ),
|
297 |
+
'type' => \Elementor\Controls_Manager::SWITCHER,
|
298 |
+
'default' => '',
|
299 |
+
]
|
300 |
+
);
|
301 |
+
|
302 |
+
// Image height.
|
303 |
+
$this->add_control(
|
304 |
+
'grid_image_height',
|
305 |
+
[
|
306 |
+
'label' => '<i class="fa fa-arrows-h"></i> ' . __( 'Image height', 'elementor-addon-widgets' ),
|
307 |
+
'type' => \Elementor\Controls_Manager::SLIDER,
|
308 |
+
'default' => [
|
309 |
+
'size' => 220,
|
310 |
+
],
|
311 |
+
'range' => [
|
312 |
+
'px' => [
|
313 |
+
'min' => 1,
|
314 |
+
'max' => 1000,
|
315 |
+
'step' => 1,
|
316 |
+
],
|
317 |
+
],
|
318 |
+
'selectors' => [
|
319 |
+
'{{WRAPPER}} .obfx-grid-col-image' => 'height: {{SIZE}}{{UNIT}};',
|
320 |
+
],
|
321 |
+
]
|
322 |
+
);
|
323 |
+
|
324 |
+
// Image link.
|
325 |
+
$this->add_control(
|
326 |
+
'grid_image_link',
|
327 |
+
[
|
328 |
+
'label' => '<i class="fa fa-link"></i> ' . __( 'Link', 'elementor-addon-widgets' ),
|
329 |
+
'type' => \Elementor\Controls_Manager::SWITCHER,
|
330 |
+
'default' => 'yes',
|
331 |
+
]
|
332 |
+
);
|
333 |
+
|
334 |
+
$this->end_controls_section();
|
335 |
+
}
|
336 |
+
|
337 |
+
/**
|
338 |
+
* Content > Title Options.
|
339 |
+
*/
|
340 |
+
private function grid_title_section() {
|
341 |
+
$this->start_controls_section(
|
342 |
+
'section_grid_title',
|
343 |
+
[
|
344 |
+
'label' => __( 'Title', 'elementor-addon-widgets' ),
|
345 |
+
]
|
346 |
+
);
|
347 |
+
|
348 |
+
// Hide title.
|
349 |
+
$this->add_control(
|
350 |
+
'grid_title_hide',
|
351 |
+
[
|
352 |
+
'label' => '<i class="fa fa-minus-circle"></i> ' . __( 'Hide', 'elementor-addon-widgets' ),
|
353 |
+
'type' => \Elementor\Controls_Manager::SWITCHER,
|
354 |
+
'default' => '',
|
355 |
+
]
|
356 |
+
);
|
357 |
+
|
358 |
+
// Title tag.
|
359 |
+
$this->add_control(
|
360 |
+
'grid_title_tag',
|
361 |
+
[
|
362 |
+
'type' => \Elementor\Controls_Manager::SELECT,
|
363 |
+
'label' => '<i class="fa fa-code"></i> ' . __( 'Tag', 'elementor-addon-widgets' ),
|
364 |
+
'default' => 'h2',
|
365 |
+
'options' => [
|
366 |
+
'h1' => 'H1',
|
367 |
+
'h2' => 'H2',
|
368 |
+
'h3' => 'H3',
|
369 |
+
'h4' => 'H4',
|
370 |
+
'h5' => 'H5',
|
371 |
+
'h6' => 'H6',
|
372 |
+
'span' => 'span',
|
373 |
+
'p' => 'p',
|
374 |
+
'div' => 'div',
|
375 |
+
],
|
376 |
+
]
|
377 |
+
);
|
378 |
+
|
379 |
+
// Title link.
|
380 |
+
$this->add_control(
|
381 |
+
'grid_title_link',
|
382 |
+
[
|
383 |
+
'label' => '<i class="fa fa-link"></i> ' . __( 'Link', 'elementor-addon-widgets' ),
|
384 |
+
'type' => \Elementor\Controls_Manager::SWITCHER,
|
385 |
+
'default' => 'yes',
|
386 |
+
]
|
387 |
+
);
|
388 |
+
|
389 |
+
$this->end_controls_section();
|
390 |
+
}
|
391 |
+
|
392 |
+
/**
|
393 |
+
* Content > Meta Options.
|
394 |
+
*/
|
395 |
+
private function grid_meta_section() {
|
396 |
+
$this->start_controls_section(
|
397 |
+
'section_grid_meta',
|
398 |
+
[
|
399 |
+
'label' => __( 'Meta', 'elementor-addon-widgets' ),
|
400 |
+
]
|
401 |
+
);
|
402 |
+
|
403 |
+
// Hide content.
|
404 |
+
$this->add_control(
|
405 |
+
'grid_meta_hide',
|
406 |
+
[
|
407 |
+
'label' => '<i class="fa fa-minus-circle"></i> ' . __( 'Hide', 'elementor-addon-widgets' ),
|
408 |
+
'type' => \Elementor\Controls_Manager::SWITCHER,
|
409 |
+
'default' => '',
|
410 |
+
]
|
411 |
+
);
|
412 |
+
|
413 |
+
// Meta.
|
414 |
+
$this->add_control(
|
415 |
+
'grid_meta_display',
|
416 |
+
[
|
417 |
+
'label' => '<i class="fa fa-info-circle"></i> ' . __( 'Display', 'elementor-addon-widgets' ),
|
418 |
+
'label_block' => true,
|
419 |
+
'type' => \Elementor\Controls_Manager::SELECT2,
|
420 |
+
'default' => [ 'author', 'date' ],
|
421 |
+
'multiple' => true,
|
422 |
+
'options' => [
|
423 |
+
'author' => __( 'Author', 'elementor-addon-widgets' ),
|
424 |
+
'date' => __( 'Date', 'elementor-addon-widgets' ),
|
425 |
+
'category' => __( 'Category', 'elementor-addon-widgets' ),
|
426 |
+
'tags' => __( 'Tags', 'elementor-addon-widgets' ),
|
427 |
+
'comments' => __( 'Comments', 'elementor-addon-widgets' ),
|
428 |
+
],
|
429 |
+
]
|
430 |
+
);
|
431 |
+
|
432 |
+
// No. of Categories.
|
433 |
+
$this->add_control(
|
434 |
+
'grid_meta_categories_max',
|
435 |
+
[
|
436 |
+
'type' => \Elementor\Controls_Manager::NUMBER,
|
437 |
+
'label' => __( 'No. of Categories', 'elementor-addon-widgets' ),
|
438 |
+
'placeholder' => __( 'How many categories to display?', 'elementor-addon-widgets' ),
|
439 |
+
'default' => __( '1', 'elementor-addon-widgets' ),
|
440 |
+
'condition' => [
|
441 |
+
'grid_meta_display' => 'category',
|
442 |
+
],
|
443 |
+
]
|
444 |
+
);
|
445 |
+
|
446 |
+
// No. of Tags.
|
447 |
+
$this->add_control(
|
448 |
+
'grid_meta_tags_max',
|
449 |
+
[
|
450 |
+
'type' => \Elementor\Controls_Manager::NUMBER,
|
451 |
+
'label' => __( 'No. of Tags', 'elementor-addon-widgets' ),
|
452 |
+
'placeholder' => __( 'How many tags to display?', 'elementor-addon-widgets' ),
|
453 |
+
'condition' => [
|
454 |
+
'grid_meta_display' => 'tags',
|
455 |
+
],
|
456 |
+
]
|
457 |
+
);
|
458 |
+
|
459 |
+
// Remove meta icons.
|
460 |
+
$this->add_control(
|
461 |
+
'grid_meta_remove_icons',
|
462 |
+
[
|
463 |
+
'label' => '<i class="fa fa-minus-circle"></i> ' . __( 'Remove icons', 'elementor-addon-widgets' ),
|
464 |
+
'type' => \Elementor\Controls_Manager::SWITCHER,
|
465 |
+
'default' => '',
|
466 |
+
]
|
467 |
+
);
|
468 |
+
|
469 |
+
$this->end_controls_section();
|
470 |
+
}
|
471 |
+
|
472 |
+
/**
|
473 |
+
* Content > Content Options.
|
474 |
+
*/
|
475 |
+
private function grid_content_section() {
|
476 |
+
$this->start_controls_section(
|
477 |
+
'section_grid_content',
|
478 |
+
[
|
479 |
+
'label' => __( 'Content', 'elementor-addon-widgets' ),
|
480 |
+
]
|
481 |
+
);
|
482 |
+
|
483 |
+
// Hide content.
|
484 |
+
$this->add_control(
|
485 |
+
'grid_content_hide',
|
486 |
+
[
|
487 |
+
'label' => '<i class="fa fa-minus-circle"></i> ' . __( 'Hide', 'elementor-addon-widgets' ),
|
488 |
+
'type' => \Elementor\Controls_Manager::SWITCHER,
|
489 |
+
'default' => '',
|
490 |
+
]
|
491 |
+
);
|
492 |
+
|
493 |
+
// Show full content.
|
494 |
+
$this->add_control(
|
495 |
+
'grid_content_full_post',
|
496 |
+
[
|
497 |
+
'label' => __( 'Show full content', 'elementor-addon-widgets' ),
|
498 |
+
'type' => \Elementor\Controls_Manager::SWITCHER,
|
499 |
+
'default' => '',
|
500 |
+
]
|
501 |
+
);
|
502 |
+
|
503 |
+
// Length.
|
504 |
+
$this->add_control(
|
505 |
+
'grid_content_length',
|
506 |
+
[
|
507 |
+
'type' => \Elementor\Controls_Manager::NUMBER,
|
508 |
+
'label' => '<i class="fa fa-arrows-h"></i> ' . __( 'Length (words)', 'elementor-addon-widgets' ),
|
509 |
+
'placeholder' => __( 'Length of content (words)', 'elementor-addon-widgets' ),
|
510 |
+
'default' => 30,
|
511 |
+
'condition' => [
|
512 |
+
'grid_content_full_post!' => 'yes'
|
513 |
+
]
|
514 |
+
]
|
515 |
+
);
|
516 |
+
|
517 |
+
// Price.
|
518 |
+
$this->add_control(
|
519 |
+
'grid_content_price',
|
520 |
+
[
|
521 |
+
'label' => '<i class="fa fa-usd"></i> ' . __( 'Price', 'elementor-addon-widgets' ),
|
522 |
+
'type' => \Elementor\Controls_Manager::SWITCHER,
|
523 |
+
'default' => 'yes',
|
524 |
+
'condition' => [
|
525 |
+
'section_grid.grid_post_type' => 'product',
|
526 |
+
],
|
527 |
+
]
|
528 |
+
);
|
529 |
+
|
530 |
+
// Read more button hide.
|
531 |
+
$this->add_control(
|
532 |
+
'grid_content_default_btn',
|
533 |
+
[
|
534 |
+
'label' => '<i class="fa fa-check-square"></i> ' . __( 'Button', 'elementor-addon-widgets' ),
|
535 |
+
'type' => \Elementor\Controls_Manager::SWITCHER,
|
536 |
+
'default' => 'yes',
|
537 |
+
'condition' => [
|
538 |
+
'section_grid.grid_post_type!' => 'product',
|
539 |
+
],
|
540 |
+
]
|
541 |
+
);
|
542 |
+
|
543 |
+
// Default button text.
|
544 |
+
$this->add_control(
|
545 |
+
'grid_content_default_btn_text',
|
546 |
+
[
|
547 |
+
'type' => \Elementor\Controls_Manager::TEXT,
|
548 |
+
'label' => __( 'Button text', 'elementor-addon-widgets' ),
|
549 |
+
'placeholder' => __( 'Read more', 'elementor-addon-widgets' ),
|
550 |
+
'default' => __( 'Read more', 'elementor-addon-widgets' ),
|
551 |
+
'condition' => [
|
552 |
+
'grid_content_default_btn!' => '',
|
553 |
+
'section_grid.grid_post_type!' => 'product',
|
554 |
+
],
|
555 |
+
]
|
556 |
+
);
|
557 |
+
|
558 |
+
// Add to cart button hide.
|
559 |
+
$this->add_control(
|
560 |
+
'grid_content_product_btn',
|
561 |
+
[
|
562 |
+
'label' => '<i class="fa fa-check-square"></i> ' . __( 'Button', 'elementor-addon-widgets' ),
|
563 |
+
'type' => \Elementor\Controls_Manager::SWITCHER,
|
564 |
+
'default' => 'yes',
|
565 |
+
'condition' => [
|
566 |
+
'section_grid.grid_post_type' => 'product',
|
567 |
+
],
|
568 |
+
]
|
569 |
+
);
|
570 |
+
|
571 |
+
// Button alignment.
|
572 |
+
$this->add_responsive_control(
|
573 |
+
'grid_content_btn_alignment',
|
574 |
+
[
|
575 |
+
'label' => __( 'Button alignment', 'elementor-addon-widgets' ),
|
576 |
+
'type' => \Elementor\Controls_Manager::CHOOSE,
|
577 |
+
'options' => [
|
578 |
+
'left' => [
|
579 |
+
'title' => __( 'Left', 'elementor-addon-widgets' ),
|
580 |
+
'icon' => 'fa fa-align-left',
|
581 |
+
],
|
582 |
+
'center' => [
|
583 |
+
'title' => __( 'Center', 'elementor-addon-widgets' ),
|
584 |
+
'icon' => 'fa fa-align-center',
|
585 |
+
],
|
586 |
+
'right' => [
|
587 |
+
'title' => __( 'Right', 'elementor-addon-widgets' ),
|
588 |
+
'icon' => 'fa fa-align-right',
|
589 |
+
],
|
590 |
+
'justify' => [
|
591 |
+
'title' => __( 'Justified', 'elementor-addon-widgets' ),
|
592 |
+
'icon' => 'fa fa-align-justify',
|
593 |
+
],
|
594 |
+
],
|
595 |
+
'default' => 'left',
|
596 |
+
'tablet_default' => 'left',
|
597 |
+
'mobile_default' => 'center',
|
598 |
+
'selectors' => [
|
599 |
+
'{{WRAPPER}} .obfx-grid-footer' => 'text-align: {{VALUE}};',
|
600 |
+
],
|
601 |
+
'condition' => [
|
602 |
+
'grid_content_btn!' => '',
|
603 |
+
],
|
604 |
+
]
|
605 |
+
);
|
606 |
+
|
607 |
+
// Content alignment.
|
608 |
+
$this->add_responsive_control(
|
609 |
+
'grid_content_alignment',
|
610 |
+
[
|
611 |
+
'label' => '<i class="fa fa-align-right"></i> ' . __( 'Alignment', 'elementor-addon-widgets' ),
|
612 |
+
'type' => \Elementor\Controls_Manager::CHOOSE,
|
613 |
+
'options' => [
|
614 |
+
'left' => [
|
615 |
+
'title' => __( 'Left', 'elementor-addon-widgets' ),
|
616 |
+
'icon' => 'fa fa-align-left',
|
617 |
+
],
|
618 |
+
'center' => [
|
619 |
+
'title' => __( 'Center', 'elementor-addon-widgets' ),
|
620 |
+
'icon' => 'fa fa-align-center',
|
621 |
+
],
|
622 |
+
'right' => [
|
623 |
+
'title' => __( 'Right', 'elementor-addon-widgets' ),
|
624 |
+
'icon' => 'fa fa-align-right',
|
625 |
+
],
|
626 |
+
],
|
627 |
+
'default' => 'left',
|
628 |
+
'tablet_default' => 'left',
|
629 |
+
'mobile_default' => 'center',
|
630 |
+
'selectors' => [
|
631 |
+
'{{WRAPPER}} .obfx-grid-col-content' => 'text-align: {{VALUE}};',
|
632 |
+
],
|
633 |
+
]
|
634 |
+
);
|
635 |
+
|
636 |
+
$this->end_controls_section();
|
637 |
+
}
|
638 |
+
|
639 |
+
/**
|
640 |
+
* Content > Pagination Options.
|
641 |
+
*/
|
642 |
+
private function grid_pagination_section() {
|
643 |
+
$this->start_controls_section(
|
644 |
+
'section_grid_pagination',
|
645 |
+
[
|
646 |
+
'label' => __( 'Pagination', 'elementor-addon-widgets' ),
|
647 |
+
'condition' => [
|
648 |
+
'section_grid.grid_pagination' => 'yes',
|
649 |
+
],
|
650 |
+
]
|
651 |
+
);
|
652 |
+
|
653 |
+
// Pagination alignment.
|
654 |
+
$this->add_responsive_control(
|
655 |
+
'grid_pagination_alignment',
|
656 |
+
[
|
657 |
+
'label' => __( 'Alignment', 'elementor-addon-widgets' ),
|
658 |
+
'type' => \Elementor\Controls_Manager::CHOOSE,
|
659 |
+
'options' => [
|
660 |
+
'left' => [
|
661 |
+
'title' => __( 'Left', 'elementor-addon-widgets' ),
|
662 |
+
'icon' => 'fa fa-align-left',
|
663 |
+
],
|
664 |
+
'center' => [
|
665 |
+
'title' => __( 'Center', 'elementor-addon-widgets' ),
|
666 |
+
'icon' => 'fa fa-align-center',
|
667 |
+
],
|
668 |
+
'right' => [
|
669 |
+
'title' => __( 'Right', 'elementor-addon-widgets' ),
|
670 |
+
'icon' => 'fa fa-align-right',
|
671 |
+
],
|
672 |
+
],
|
673 |
+
'default' => 'center',
|
674 |
+
'tablet_default' => 'center',
|
675 |
+
'mobile_default' => 'center',
|
676 |
+
'selectors' => [
|
677 |
+
'{{WRAPPER}} .obfx-grid-pagination .pagination' => 'text-align: {{VALUE}};',
|
678 |
+
],
|
679 |
+
]
|
680 |
+
);
|
681 |
+
|
682 |
+
$this->end_controls_section();
|
683 |
+
}
|
684 |
+
|
685 |
+
/**
|
686 |
+
* Style > Grid options.
|
687 |
+
*/
|
688 |
+
private function grid_options_style_section() {
|
689 |
+
// Tab.
|
690 |
+
$this->start_controls_section(
|
691 |
+
'section_grid_style',
|
692 |
+
[
|
693 |
+
'label' => __( 'Grid Options', 'elementor-addon-widgets' ),
|
694 |
+
'tab' => \Elementor\Controls_Manager::TAB_STYLE,
|
695 |
+
]
|
696 |
+
);
|
697 |
+
|
698 |
+
// Columns margin.
|
699 |
+
$this->add_control(
|
700 |
+
'grid_style_columns_margin',
|
701 |
+
[
|
702 |
+
'label' => __( 'Columns margin', 'elementor-addon-widgets' ),
|
703 |
+
'type' => \Elementor\Controls_Manager::SLIDER,
|
704 |
+
'default' => [
|
705 |
+
'size' => 15,
|
706 |
+
],
|
707 |
+
'range' => [
|
708 |
+
'px' => [
|
709 |
+
'min' => 0,
|
710 |
+
'max' => 100,
|
711 |
+
],
|
712 |
+
],
|
713 |
+
'selectors' => [
|
714 |
+
'{{WRAPPER}} .obfx-grid-wrapper' => 'padding-right: calc( {{SIZE}}{{UNIT}} ); padding-left: calc( {{SIZE}}{{UNIT}} );',
|
715 |
+
'{{WRAPPER}} .obfx-grid-container' => 'margin-left: calc( -{{SIZE}}{{UNIT}} ); margin-right: calc( -{{SIZE}}{{UNIT}} );',
|
716 |
+
],
|
717 |
+
]
|
718 |
+
);
|
719 |
+
|
720 |
+
// Row margin.
|
721 |
+
$this->add_control(
|
722 |
+
'grid_style_rows_margin',
|
723 |
+
[
|
724 |
+
'label' => __( 'Rows margin', 'elementor-addon-widgets' ),
|
725 |
+
'type' => \Elementor\Controls_Manager::SLIDER,
|
726 |
+
'default' => [
|
727 |
+
'size' => 30,
|
728 |
+
],
|
729 |
+
'range' => [
|
730 |
+
'px' => [
|
731 |
+
'min' => 0,
|
732 |
+
'max' => 100,
|
733 |
+
],
|
734 |
+
],
|
735 |
+
'selectors' => [
|
736 |
+
'{{WRAPPER}} .obfx-grid-wrapper' => 'padding-bottom: {{SIZE}}{{UNIT}};',
|
737 |
+
],
|
738 |
+
]
|
739 |
+
);
|
740 |
+
|
741 |
+
// Background.
|
742 |
+
$this->add_group_control(
|
743 |
+
\Elementor\Group_Control_Background::get_type(),
|
744 |
+
[
|
745 |
+
'name' => 'grid_style_background',
|
746 |
+
'types' => [ 'classic', 'gradient' ],
|
747 |
+
'selector' => '{{WRAPPER}} .obfx-grid',
|
748 |
+
]
|
749 |
+
);
|
750 |
+
|
751 |
+
// Items options.
|
752 |
+
$this->add_control(
|
753 |
+
'grid_items_style_heading',
|
754 |
+
[
|
755 |
+
'label' => __( 'Items', 'elementor-addon-widgets' ),
|
756 |
+
'type' => \Elementor\Controls_Manager::HEADING,
|
757 |
+
'separator' => 'before',
|
758 |
+
]
|
759 |
+
);
|
760 |
+
|
761 |
+
// Items internal padding.
|
762 |
+
$this->add_control(
|
763 |
+
'grid_items_style_padding',
|
764 |
+
[
|
765 |
+
'label' => __( 'Padding', 'elementor-addon-widgets' ),
|
766 |
+
'type' => \Elementor\Controls_Manager::DIMENSIONS,
|
767 |
+
'size_units' => [ 'px', '%' ],
|
768 |
+
'selectors' => [
|
769 |
+
'{{WRAPPER}} .obfx-grid-col' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
770 |
+
],
|
771 |
+
]
|
772 |
+
);
|
773 |
+
|
774 |
+
// Items border radius.
|
775 |
+
$this->add_control(
|
776 |
+
'grid_items_style_border_radius',
|
777 |
+
[
|
778 |
+
'label' => __( 'Border Radius', 'elementor-addon-widgets' ),
|
779 |
+
'type' => \Elementor\Controls_Manager::DIMENSIONS,
|
780 |
+
'size_units' => [ 'px', '%' ],
|
781 |
+
'selectors' => [
|
782 |
+
'{{WRAPPER}} .obfx-grid-col' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
783 |
+
],
|
784 |
+
]
|
785 |
+
);
|
786 |
+
|
787 |
+
// Items box shadow.
|
788 |
+
$this->add_group_control(
|
789 |
+
\Elementor\Group_Control_Box_Shadow::get_type(),
|
790 |
+
[
|
791 |
+
'name' => 'grid_items_style_box_shadow',
|
792 |
+
'selector' => '{{WRAPPER}} .obfx-grid-col',
|
793 |
+
'separator' => '',
|
794 |
+
]
|
795 |
+
);
|
796 |
+
|
797 |
+
// Background for items options.
|
798 |
+
$this->add_group_control(
|
799 |
+
\Elementor\Group_Control_Background::get_type(),
|
800 |
+
[
|
801 |
+
'name' => 'grid_items_style_background',
|
802 |
+
'types' => [ 'classic', 'gradient' ],
|
803 |
+
'selector' => '{{WRAPPER}} .obfx-grid-col',
|
804 |
+
]
|
805 |
+
);
|
806 |
+
|
807 |
+
$this->end_controls_section();
|
808 |
+
}
|
809 |
+
|
810 |
+
/**
|
811 |
+
* Style > Image.
|
812 |
+
*/
|
813 |
+
private function grid_image_style_section() {
|
814 |
+
// Tab.
|
815 |
+
$this->start_controls_section(
|
816 |
+
'section_grid_image_style',
|
817 |
+
[
|
818 |
+
'label' => __( 'Image', 'elementor-addon-widgets' ),
|
819 |
+
'tab' => \Elementor\Controls_Manager::TAB_STYLE,
|
820 |
+
'condition' => [
|
821 |
+
'section_grid_image.grid_image_hide' => '',
|
822 |
+
],
|
823 |
+
]
|
824 |
+
);
|
825 |
+
|
826 |
+
// Image border radius.
|
827 |
+
$this->add_control(
|
828 |
+
'grid_image_style_border_radius',
|
829 |
+
[
|
830 |
+
'label' => __( 'Border Radius', 'elementor-addon-widgets' ),
|
831 |
+
'type' => \Elementor\Controls_Manager::DIMENSIONS,
|
832 |
+
'size_units' => [ 'px', '%' ],
|
833 |
+
'selectors' => [
|
834 |
+
'{{WRAPPER}} .obfx-grid-col-image' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
835 |
+
],
|
836 |
+
'condition' => [
|
837 |
+
'section_grid_image.grid_image_hide' => '',
|
838 |
+
],
|
839 |
+
]
|
840 |
+
);
|
841 |
+
|
842 |
+
// Image box shadow.
|
843 |
+
$this->add_group_control(
|
844 |
+
\Elementor\Group_Control_Box_Shadow::get_type(),
|
845 |
+
[
|
846 |
+
'name' => 'grid_image_style_box_shadow',
|
847 |
+
'selector' => '{{WRAPPER}} .obfx-grid-col-image',
|
848 |
+
'separator' => '',
|
849 |
+
'condition' => [
|
850 |
+
'section_grid_image.grid_image_hide' => '',
|
851 |
+
],
|
852 |
+
]
|
853 |
+
);
|
854 |
+
|
855 |
+
// Image margin.
|
856 |
+
$this->add_control(
|
857 |
+
'grid_image_style_margin',
|
858 |
+
[
|
859 |
+
'label' => __( 'Margin', 'elementor-addon-widgets' ),
|
860 |
+
'type' => \Elementor\Controls_Manager::DIMENSIONS,
|
861 |
+
'size_units' => [ 'px' ],
|
862 |
+
'selectors' => [
|
863 |
+
'{{WRAPPER}} .obfx-grid-col-image' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
864 |
+
],
|
865 |
+
'condition' => [
|
866 |
+
'section_grid_image.grid_image_hide' => '',
|
867 |
+
],
|
868 |
+
]
|
869 |
+
);
|
870 |
+
|
871 |
+
$this->end_controls_section();
|
872 |
+
}
|
873 |
+
|
874 |
+
/**
|
875 |
+
* Style > Title.
|
876 |
+
*/
|
877 |
+
private function grid_title_style_section() {
|
878 |
+
// Tab.
|
879 |
+
$this->start_controls_section(
|
880 |
+
'section_grid_title_style',
|
881 |
+
[
|
882 |
+
'label' => __( 'Title', 'elementor-addon-widgets' ),
|
883 |
+
'tab' => \Elementor\Controls_Manager::TAB_STYLE,
|
884 |
+
'condition' => [
|
885 |
+
'section_grid_title.grid_title_hide' => '',
|
886 |
+
],
|
887 |
+
]
|
888 |
+
);
|
889 |
+
|
890 |
+
// Title typography.
|
891 |
+
$this->add_group_control(
|
892 |
+
\Elementor\Group_Control_Typography::get_type(),
|
893 |
+
[
|
894 |
+
'name' => 'grid_title_style_typography',
|
895 |
+
'scheme' => \Elementor\Scheme_Typography::TYPOGRAPHY_1,
|
896 |
+
'selector' => '{{WRAPPER}} .obfx-grid-title',
|
897 |
+
]
|
898 |
+
);
|
899 |
+
|
900 |
+
// Title color.
|
901 |
+
$this->add_control(
|
902 |
+
'grid_title_style_color',
|
903 |
+
[
|
904 |
+
'type' => \Elementor\Controls_Manager::COLOR,
|
905 |
+
'label' => __( 'Color', 'elementor-addon-widgets' ),
|
906 |
+
'scheme' => [
|
907 |
+
'type' => \Elementor\Scheme_Color::get_type(),
|
908 |
+
'value' => \Elementor\Scheme_Color::COLOR_1,
|
909 |
+
],
|
910 |
+
'selectors' => [
|
911 |
+
'{{WRAPPER}} .obfx-grid-title' => 'color: {{VALUE}};',
|
912 |
+
'{{WRAPPER}} .obfx-grid-title a' => 'color: {{VALUE}};',
|
913 |
+
],
|
914 |
+
]
|
915 |
+
);
|
916 |
+
|
917 |
+
// Title margin.
|
918 |
+
$this->add_control(
|
919 |
+
'grid_title_style_margin',
|
920 |
+
[
|
921 |
+
'label' => __( 'Margin', 'elementor-addon-widgets' ),
|
922 |
+
'type' => \Elementor\Controls_Manager::DIMENSIONS,
|
923 |
+
'size_units' => [ 'px' ],
|
924 |
+
'selectors' => [
|
925 |
+
'{{WRAPPER}} .obfx-grid-title' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
926 |
+
],
|
927 |
+
]
|
928 |
+
);
|
929 |
+
|
930 |
+
$this->end_controls_section();
|
931 |
+
}
|
932 |
+
|
933 |
+
/**
|
934 |
+
* Style > Meta.
|
935 |
+
*/
|
936 |
+
private function grid_meta_style_section() {
|
937 |
+
// Tab.
|
938 |
+
$this->start_controls_section(
|
939 |
+
'section_grid_meta_style',
|
940 |
+
[
|
941 |
+
'label' => __( 'Meta', 'elementor-addon-widgets' ),
|
942 |
+
'tab' => \Elementor\Controls_Manager::TAB_STYLE,
|
943 |
+
'condition' => [
|
944 |
+
'section_grid_meta.grid_meta_hide' => '',
|
945 |
+
],
|
946 |
+
]
|
947 |
+
);
|
948 |
+
|
949 |
+
// Meta typography.
|
950 |
+
$this->add_group_control(
|
951 |
+
\Elementor\Group_Control_Typography::get_type(),
|
952 |
+
[
|
953 |
+
'name' => 'grid_meta_style_typography',
|
954 |
+
'scheme' => \Elementor\Scheme_Typography::TYPOGRAPHY_1,
|
955 |
+
'selector' => '{{WRAPPER}} .obfx-grid-meta',
|
956 |
+
]
|
957 |
+
);
|
958 |
+
|
959 |
+
// Meta color.
|
960 |
+
$this->add_control(
|
961 |
+
'grid_meta_style_color',
|
962 |
+
[
|
963 |
+
'type' => \Elementor\Controls_Manager::COLOR,
|
964 |
+
'label' => __( 'Color', 'elementor-addon-widgets' ),
|
965 |
+
'scheme' => [
|
966 |
+
'type' => \Elementor\Scheme_Color::get_type(),
|
967 |
+
'value' => \Elementor\Scheme_Color::COLOR_1,
|
968 |
+
],
|
969 |
+
'selectors' => [
|
970 |
+
'{{WRAPPER}} .obfx-grid-meta' => 'color: {{VALUE}};',
|
971 |
+
'{{WRAPPER}} .obfx-grid-meta span' => 'color: {{VALUE}};',
|
972 |
+
'{{WRAPPER}} .obfx-grid-meta a' => 'color: {{VALUE}};',
|
973 |
+
],
|
974 |
+
]
|
975 |
+
);
|
976 |
+
|
977 |
+
// Meta margin.
|
978 |
+
$this->add_control(
|
979 |
+
'grid_meta_style_margin',
|
980 |
+
[
|
981 |
+
'label' => __( 'Margin', 'elementor-addon-widgets' ),
|
982 |
+
'type' => \Elementor\Controls_Manager::DIMENSIONS,
|
983 |
+
'size_units' => [ 'px' ],
|
984 |
+
'selectors' => [
|
985 |
+
'{{WRAPPER}} .obfx-grid-meta' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
986 |
+
],
|
987 |
+
]
|
988 |
+
);
|
989 |
+
|
990 |
+
$this->end_controls_section();
|
991 |
+
}
|
992 |
+
|
993 |
+
/**
|
994 |
+
* Style > Content.
|
995 |
+
*/
|
996 |
+
private function grid_content_style_section() {
|
997 |
+
// Tab.
|
998 |
+
$this->start_controls_section(
|
999 |
+
'section_grid_content_style',
|
1000 |
+
[
|
1001 |
+
'label' => __( 'Content', 'elementor-addon-widgets' ),
|
1002 |
+
'tab' => \Elementor\Controls_Manager::TAB_STYLE,
|
1003 |
+
]
|
1004 |
+
);
|
1005 |
+
|
1006 |
+
// Content typography.
|
1007 |
+
$this->add_group_control(
|
1008 |
+
\Elementor\Group_Control_Typography::get_type(),
|
1009 |
+
[
|
1010 |
+
'name' => 'grid_content_style_typography',
|
1011 |
+
'scheme' => \Elementor\Scheme_Typography::TYPOGRAPHY_1,
|
1012 |
+
'selector' => '{{WRAPPER}} .obfx-grid-content',
|
1013 |
+
'condition' => [
|
1014 |
+
'section_grid_content.grid_content_hide' => '',
|
1015 |
+
],
|
1016 |
+
]
|
1017 |
+
);
|
1018 |
+
|
1019 |
+
// Content color.
|
1020 |
+
$this->add_control(
|
1021 |
+
'grid_content_style_color',
|
1022 |
+
[
|
1023 |
+
'type' => \Elementor\Controls_Manager::COLOR,
|
1024 |
+
'label' => __( 'Color', 'elementor-addon-widgets' ),
|
1025 |
+
'scheme' => [
|
1026 |
+
'type' => \Elementor\Scheme_Color::get_type(),
|
1027 |
+
'value' => \Elementor\Scheme_Color::COLOR_1,
|
1028 |
+
],
|
1029 |
+
'selectors' => [
|
1030 |
+
'{{WRAPPER}} .obfx-grid-content' => 'color: {{VALUE}};',
|
1031 |
+
],
|
1032 |
+
'condition' => [
|
1033 |
+
'section_grid_content.grid_content_hide' => '',
|
1034 |
+
],
|
1035 |
+
]
|
1036 |
+
);
|
1037 |
+
|
1038 |
+
// Content margin
|
1039 |
+
$this->add_control(
|
1040 |
+
'grid_content_style_margin',
|
1041 |
+
[
|
1042 |
+
'label' => __( 'Margin', 'elementor-addon-widgets' ),
|
1043 |
+
'type' => \Elementor\Controls_Manager::DIMENSIONS,
|
1044 |
+
'size_units' => [ 'px' ],
|
1045 |
+
'selectors' => [
|
1046 |
+
'{{WRAPPER}} .obfx-grid-content' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
1047 |
+
],
|
1048 |
+
'condition' => [
|
1049 |
+
'section_grid_content.grid_content_hide' => '',
|
1050 |
+
],
|
1051 |
+
]
|
1052 |
+
);
|
1053 |
+
|
1054 |
+
// Heading for price options.
|
1055 |
+
$this->add_control(
|
1056 |
+
'grid_content_price_style_heading',
|
1057 |
+
[
|
1058 |
+
'label' => __( 'Price', 'elementor-addon-widgets' ),
|
1059 |
+
'type' => \Elementor\Controls_Manager::HEADING,
|
1060 |
+
'separator' => 'before',
|
1061 |
+
'condition' => [
|
1062 |
+
'section_grid_content.grid_content_price' => 'yes',
|
1063 |
+
'section_grid.grid_post_type' => 'product',
|
1064 |
+
],
|
1065 |
+
]
|
1066 |
+
);
|
1067 |
+
|
1068 |
+
// Price typography.
|
1069 |
+
$this->add_group_control(
|
1070 |
+
\Elementor\Group_Control_Typography::get_type(),
|
1071 |
+
[
|
1072 |
+
'name' => 'grid_content_price_style_typography',
|
1073 |
+
'scheme' => \Elementor\Scheme_Typography::TYPOGRAPHY_1,
|
1074 |
+
'selector' => '{{WRAPPER}} .obfx-grid-price',
|
1075 |
+
'condition' => [
|
1076 |
+
'section_grid_content.grid_content_price' => 'yes',
|
1077 |
+
'section_grid.grid_post_type' => 'product',
|
1078 |
+
],
|
1079 |
+
]
|
1080 |
+
);
|
1081 |
+
|
1082 |
+
// Price color.
|
1083 |
+
$this->add_control(
|
1084 |
+
'grid_content_price_style_color',
|
1085 |
+
[
|
1086 |
+
'type' => \Elementor\Controls_Manager::COLOR,
|
1087 |
+
'label' => __( 'Color', 'elementor-addon-widgets' ),
|
1088 |
+
'scheme' => [
|
1089 |
+
'type' => \Elementor\Scheme_Color::get_type(),
|
1090 |
+
'value' => \Elementor\Scheme_Color::COLOR_1,
|
1091 |
+
],
|
1092 |
+
'selectors' => [
|
1093 |
+
'{{WRAPPER}} .obfx-grid-price' => 'color: {{VALUE}};',
|
1094 |
+
],
|
1095 |
+
'condition' => [
|
1096 |
+
'section_grid_content.grid_content_price' => 'yes',
|
1097 |
+
'section_grid.grid_post_type' => 'product',
|
1098 |
+
],
|
1099 |
+
]
|
1100 |
+
);
|
1101 |
+
|
1102 |
+
// Price bottom margin.
|
1103 |
+
$this->add_control(
|
1104 |
+
'grid_content_price_style_margin',
|
1105 |
+
[
|
1106 |
+
'label' => __( 'Margin', 'elementor-addon-widgets' ),
|
1107 |
+
'type' => \Elementor\Controls_Manager::DIMENSIONS,
|
1108 |
+
'size_units' => [ 'px' ],
|
1109 |
+
'selectors' => [
|
1110 |
+
'{{WRAPPER}} .obfx-grid-price' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
1111 |
+
],
|
1112 |
+
'condition' => [
|
1113 |
+
'section_grid_content.grid_content_price' => 'yes',
|
1114 |
+
'section_grid.grid_post_type' => 'product',
|
1115 |
+
],
|
1116 |
+
]
|
1117 |
+
);
|
1118 |
+
|
1119 |
+
// Buttons options.
|
1120 |
+
$this->grid_content_style_button();
|
1121 |
+
|
1122 |
+
$this->end_controls_section();
|
1123 |
+
}
|
1124 |
+
|
1125 |
+
/**
|
1126 |
+
* Tabs for the Style > Button section.
|
1127 |
+
*/
|
1128 |
+
private function grid_content_style_button() {
|
1129 |
+
// Heading for button options.
|
1130 |
+
$this->add_control(
|
1131 |
+
'grid_button_style_heading',
|
1132 |
+
[
|
1133 |
+
'label' => __( 'Button', 'elementor-addon-widgets' ),
|
1134 |
+
'type' => \Elementor\Controls_Manager::HEADING,
|
1135 |
+
'separator' => 'before',
|
1136 |
+
'condition' => [
|
1137 |
+
'section_grid_content.grid_content_default_btn!' => '',
|
1138 |
+
'section_grid_content.grid_content_product_btn!' => '',
|
1139 |
+
],
|
1140 |
+
]
|
1141 |
+
);
|
1142 |
+
|
1143 |
+
// Content typography.
|
1144 |
+
$this->add_group_control(
|
1145 |
+
\Elementor\Group_Control_Typography::get_type(),
|
1146 |
+
[
|
1147 |
+
'name' => 'grid_button_style_typography',
|
1148 |
+
'scheme' => \Elementor\Scheme_Typography::TYPOGRAPHY_1,
|
1149 |
+
'selector' => '{{WRAPPER}} .obfx-grid-footer a',
|
1150 |
+
'condition' => [
|
1151 |
+
'section_grid_content.grid_content_default_btn!' => '',
|
1152 |
+
'section_grid_content.grid_content_product_btn!' => '',
|
1153 |
+
],
|
1154 |
+
]
|
1155 |
+
);
|
1156 |
+
|
1157 |
+
$this->start_controls_tabs( 'grid_button_style' );
|
1158 |
+
|
1159 |
+
// Normal tab.
|
1160 |
+
$this->start_controls_tab(
|
1161 |
+
'grid_button_style_normal',
|
1162 |
+
[
|
1163 |
+
'label' => __( 'Normal', 'elementor-addon-widgets' ),
|
1164 |
+
'condition' => [
|
1165 |
+
'section_grid_content.grid_content_default_btn!' => '',
|
1166 |
+
'section_grid_content.grid_content_product_btn!' => '',
|
1167 |
+
],
|
1168 |
+
]
|
1169 |
+
);
|
1170 |
+
|
1171 |
+
// Normal text color.
|
1172 |
+
$this->add_control(
|
1173 |
+
'grid_button_style_normal_text_color',
|
1174 |
+
[
|
1175 |
+
'type' => \Elementor\Controls_Manager::COLOR,
|
1176 |
+
'label' => __( 'Text Color', 'elementor-addon-widgets' ),
|
1177 |
+
'scheme' => [
|
1178 |
+
'type' => \Elementor\Scheme_Color::get_type(),
|
1179 |
+
'value' => \Elementor\Scheme_Color::COLOR_1,
|
1180 |
+
],
|
1181 |
+
'separator' => '',
|
1182 |
+
'selectors' => [
|
1183 |
+
'{{WRAPPER}} .obfx-grid-footer a' => 'color: {{VALUE}};',
|
1184 |
+
],
|
1185 |
+
'condition' => [
|
1186 |
+
'section_grid_content.grid_content_default_btn!' => '',
|
1187 |
+
'section_grid_content.grid_content_product_btn!' => '',
|
1188 |
+
],
|
1189 |
+
]
|
1190 |
+
);
|
1191 |
+
|
1192 |
+
// Normal background color.
|
1193 |
+
$this->add_control(
|
1194 |
+
'grid_button_style_normal_bg_color',
|
1195 |
+
[
|
1196 |
+
'type' => \Elementor\Controls_Manager::COLOR,
|
1197 |
+
'label' => __( 'Background Color', 'elementor-addon-widgets' ),
|
1198 |
+
'scheme' => [
|
1199 |
+
'type' => \Elementor\Scheme_Color::get_type(),
|
1200 |
+
'value' => \Elementor\Scheme_Color::COLOR_1,
|
1201 |
+
],
|
1202 |
+
'separator' => '',
|
1203 |
+
'selectors' => [
|
1204 |
+
'{{WRAPPER}} .obfx-grid-footer a' => 'background-color: {{VALUE}};',
|
1205 |
+
],
|
1206 |
+
'condition' => [
|
1207 |
+
'section_grid_content.grid_content_default_btn!' => '',
|
1208 |
+
'section_grid_content.grid_content_product_btn!' => '',
|
1209 |
+
],
|
1210 |
+
]
|
1211 |
+
);
|
1212 |
+
|
1213 |
+
// Normal box shadow.
|
1214 |
+
$this->add_group_control(
|
1215 |
+
\Elementor\Group_Control_Box_Shadow::get_type(),
|
1216 |
+
[
|
1217 |
+
'name' => 'grid_button_style_normal_box_shadow',
|
1218 |
+
'selector' => '{{WRAPPER}} .obfx-grid-footer a',
|
1219 |
+
'separator' => '',
|
1220 |
+
'condition' => [
|
1221 |
+
'section_grid_content.grid_content_default_btn!' => '',
|
1222 |
+
'section_grid_content.grid_content_product_btn!' => '',
|
1223 |
+
],
|
1224 |
+
]
|
1225 |
+
);
|
1226 |
+
|
1227 |
+
$this->end_controls_tab();
|
1228 |
+
|
1229 |
+
// Hover tab.
|
1230 |
+
$this->start_controls_tab(
|
1231 |
+
'grid_button_style_hover',
|
1232 |
+
[
|
1233 |
+
'label' => __( 'Hover', 'elementor-addon-widgets' ),
|
1234 |
+
'condition' => [
|
1235 |
+
'section_grid_content.grid_content_default_btn!' => '',
|
1236 |
+
'section_grid_content.grid_content_product_btn!' => '',
|
1237 |
+
],
|
1238 |
+
]
|
1239 |
+
);
|
1240 |
+
|
1241 |
+
// Hover text color.
|
1242 |
+
$this->add_control(
|
1243 |
+
'grid_button_style_hover_text_color',
|
1244 |
+
[
|
1245 |
+
'type' => \Elementor\Controls_Manager::COLOR,
|
1246 |
+
'label' => __( 'Text Color', 'elementor-addon-widgets' ),
|
1247 |
+
'scheme' => [
|
1248 |
+
'type' => \Elementor\Scheme_Color::get_type(),
|
1249 |
+
'value' => \Elementor\Scheme_Color::COLOR_1,
|
1250 |
+
],
|
1251 |
+
'separator' => '',
|
1252 |
+
'selectors' => [
|
1253 |
+
'{{WRAPPER}} .obfx-grid-footer a:hover' => 'color: {{VALUE}};',
|
1254 |
+
],
|
1255 |
+
'condition' => [
|
1256 |
+
'section_grid_content.grid_content_default_btn!' => '',
|
1257 |
+
'section_grid_content.grid_content_product_btn!' => '',
|
1258 |
+
],
|
1259 |
+
]
|
1260 |
+
);
|
1261 |
+
|
1262 |
+
// Hover background color.
|
1263 |
+
$this->add_control(
|
1264 |
+
'grid_button_style_hover_bg_color',
|
1265 |
+
[
|
1266 |
+
'type' => \Elementor\Controls_Manager::COLOR,
|
1267 |
+
'label' => __( 'Background Color', 'elementor-addon-widgets' ),
|
1268 |
+
'scheme' => [
|
1269 |
+
'type' => \Elementor\Scheme_Color::get_type(),
|
1270 |
+
'value' => \Elementor\Scheme_Color::COLOR_1,
|
1271 |
+
],
|
1272 |
+
'separator' => '',
|
1273 |
+
'selectors' => [
|
1274 |
+
'{{WRAPPER}} .obfx-grid-footer a:hover' => 'background-color: {{VALUE}};',
|
1275 |
+
],
|
1276 |
+
'condition' => [
|
1277 |
+
'section_grid_content.grid_content_default_btn!' => '',
|
1278 |
+
'section_grid_content.grid_content_product_btn!' => '',
|
1279 |
+
],
|
1280 |
+
]
|
1281 |
+
);
|
1282 |
+
|
1283 |
+
// Hover box shadow.
|
1284 |
+
$this->add_group_control(
|
1285 |
+
\Elementor\Group_Control_Box_Shadow::get_type(),
|
1286 |
+
[
|
1287 |
+
'name' => 'grid_button_style_hover_box_shadow',
|
1288 |
+
'selector' => '{{WRAPPER}} .obfx-grid-footer a:hover',
|
1289 |
+
'separator' => '',
|
1290 |
+
'condition' => [
|
1291 |
+
'section_grid_content.grid_content_default_btn!' => '',
|
1292 |
+
'section_grid_content.grid_content_product_btn!' => '',
|
1293 |
+
],
|
1294 |
+
]
|
1295 |
+
);
|
1296 |
+
|
1297 |
+
$this->end_controls_tab();
|
1298 |
+
|
1299 |
+
$this->end_controls_tabs();
|
1300 |
+
|
1301 |
+
// Button padding.
|
1302 |
+
$this->add_control(
|
1303 |
+
'grid_button_style_padding',
|
1304 |
+
[
|
1305 |
+
'label' => __( 'Button padding', 'elementor-addon-widgets' ),
|
1306 |
+
'type' => \Elementor\Controls_Manager::DIMENSIONS,
|
1307 |
+
'size_units' => [ 'px' ],
|
1308 |
+
'selectors' => [
|
1309 |
+
'{{WRAPPER}} .obfx-grid-footer a' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
1310 |
+
],
|
1311 |
+
'condition' => [
|
1312 |
+
'section_grid_content.grid_content_default_btn!' => '',
|
1313 |
+
'section_grid_content.grid_content_product_btn!' => '',
|
1314 |
+
],
|
1315 |
+
]
|
1316 |
+
);
|
1317 |
+
|
1318 |
+
// Button border radius.
|
1319 |
+
$this->add_control(
|
1320 |
+
'grid_button_style_border_radius',
|
1321 |
+
[
|
1322 |
+
'label' => __( 'Button border radius', 'elementor-addon-widgets' ),
|
1323 |
+
'type' => \Elementor\Controls_Manager::DIMENSIONS,
|
1324 |
+
'size_units' => [ 'px', '%' ],
|
1325 |
+
'selectors' => [
|
1326 |
+
'{{WRAPPER}} .obfx-grid-footer a' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
1327 |
+
],
|
1328 |
+
'condition' => [
|
1329 |
+
'section_grid_content.grid_content_default_btn!' => '',
|
1330 |
+
'section_grid_content.grid_content_product_btn!' => '',
|
1331 |
+
],
|
1332 |
+
]
|
1333 |
+
);
|
1334 |
+
}
|
1335 |
+
|
1336 |
+
/**
|
1337 |
+
* Style > Pagination.
|
1338 |
+
*/
|
1339 |
+
private function grid_pagination_style_section() {
|
1340 |
+
// Tab.
|
1341 |
+
$this->start_controls_section(
|
1342 |
+
'section_grid_pagination_style',
|
1343 |
+
[
|
1344 |
+
'label' => __( 'Pagination', 'elementor-addon-widgets' ),
|
1345 |
+
'tab' => \Elementor\Controls_Manager::TAB_STYLE,
|
1346 |
+
'condition' => [
|
1347 |
+
'section_grid.grid_pagination' => 'yes',
|
1348 |
+
],
|
1349 |
+
]
|
1350 |
+
);
|
1351 |
+
|
1352 |
+
// Image margin.
|
1353 |
+
$this->add_control(
|
1354 |
+
'grid_pagination_style_margin',
|
1355 |
+
[
|
1356 |
+
'label' => __( 'Margin', 'elementor-addon-widgets' ),
|
1357 |
+
'type' => \Elementor\Controls_Manager::DIMENSIONS,
|
1358 |
+
'size_units' => [ 'px' ],
|
1359 |
+
'selectors' => [
|
1360 |
+
'{{WRAPPER}} .obfx-grid-pagination .pagination' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
1361 |
+
],
|
1362 |
+
]
|
1363 |
+
);
|
1364 |
+
|
1365 |
+
$this->end_controls_section();
|
1366 |
+
}
|
1367 |
+
|
1368 |
+
/**
|
1369 |
+
* Render function to output the post type grid.
|
1370 |
+
*/
|
1371 |
+
protected function render() {
|
1372 |
+
// Get settings.
|
1373 |
+
$settings = $this->get_settings();
|
1374 |
+
$this->maybe_load_widget_style();
|
1375 |
+
// ensure the needed scripts
|
1376 |
+
|
1377 |
+
|
1378 |
+
// Output.
|
1379 |
+
echo '<div class="obfx-grid">';
|
1380 |
+
echo '<div class="obfx-grid-container' . ( ! empty( $settings['grid_style'] ) && $settings['grid_style'] == 'list' ? ' obfx-grid-style-' . $settings['grid_style'] : '' ) . ( ! empty( $settings['grid_columns_mobile'] ) ? ' obfx-grid-mobile-' . $settings['grid_columns_mobile'] : '' ) . ( ! empty( $settings['grid_columns_tablet'] ) ? ' obfx-grid-tablet-' . $settings['grid_columns_tablet'] : '' ) . ( ! empty( $settings['grid_columns'] ) ? ' obfx-grid-desktop-' . $settings['grid_columns'] : '' ) . '">';
|
1381 |
+
|
1382 |
+
// Arguments for query.
|
1383 |
+
$args = array();
|
1384 |
+
|
1385 |
+
// Display only published posts.
|
1386 |
+
$args['post_status'] = 'publish';
|
1387 |
+
|
1388 |
+
// Ignore sticky posts.
|
1389 |
+
$args['ignore_sticky_posts'] = 1;
|
1390 |
+
|
1391 |
+
// Check if post type exists.
|
1392 |
+
if ( ! empty( $settings['grid_post_type'] ) && post_type_exists( $settings['grid_post_type'] ) ) {
|
1393 |
+
$args['post_type'] = $settings['grid_post_type'];
|
1394 |
+
}
|
1395 |
+
|
1396 |
+
// Display posts in category.
|
1397 |
+
if ( ! empty( $settings['grid_post_categories'] ) && $settings['grid_post_type'] == 'post' ) {
|
1398 |
+
$args['category_name'] = $settings['grid_post_categories'];
|
1399 |
+
}
|
1400 |
+
|
1401 |
+
// Display products in category.
|
1402 |
+
if ( ! empty( $settings['grid_product_categories'] ) && $settings['grid_post_type'] == 'product' ) {
|
1403 |
+
$args['tax_query'] = array(
|
1404 |
+
'relation' => 'AND',
|
1405 |
+
array(
|
1406 |
+
'taxonomy' => 'product_cat',
|
1407 |
+
'field' => 'slug',
|
1408 |
+
'terms' => $settings['grid_product_categories'],
|
1409 |
+
),
|
1410 |
+
);
|
1411 |
+
}
|
1412 |
+
|
1413 |
+
// Items to display.
|
1414 |
+
if ( ! empty( $settings['grid_items'] ) && intval( $settings['grid_items'] ) == $settings['grid_items'] ) {
|
1415 |
+
$args['posts_per_page'] = $settings['grid_items'];
|
1416 |
+
}
|
1417 |
+
|
1418 |
+
// Order by.
|
1419 |
+
if ( ! empty( $settings['grid_order_by'] ) ) {
|
1420 |
+
$args['orderby'] = $settings['grid_order_by'];
|
1421 |
+
}
|
1422 |
+
|
1423 |
+
// Pagination.
|
1424 |
+
if ( ! empty( $settings['grid_pagination'] ) ) {
|
1425 |
+
$paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;
|
1426 |
+
$args['paged'] = $paged;
|
1427 |
+
}
|
1428 |
+
|
1429 |
+
// Query.
|
1430 |
+
$query = new \WP_Query( $args );
|
1431 |
+
|
1432 |
+
// Query results.
|
1433 |
+
if ( $query->have_posts() ) {
|
1434 |
+
while ( $query->have_posts() ) {
|
1435 |
+
$query->the_post();
|
1436 |
+
|
1437 |
+
echo '<div class="obfx-grid-wrapper">';
|
1438 |
+
echo '<article class="obfx-grid-col' . ( $settings['grid_image_hide'] == 'yes' || ! has_post_thumbnail() ? ' obfx-no-image' : '' ) . '">';
|
1439 |
+
|
1440 |
+
// Image.
|
1441 |
+
$this->renderImage();
|
1442 |
+
|
1443 |
+
echo '<div class="obfx-grid-col-content">';
|
1444 |
+
// Title.
|
1445 |
+
$this->renderTitle();
|
1446 |
+
|
1447 |
+
// Meta.
|
1448 |
+
$this->renderMeta();
|
1449 |
+
|
1450 |
+
// Content.
|
1451 |
+
$this->renderContent();
|
1452 |
+
|
1453 |
+
// Price.
|
1454 |
+
if ( class_exists( 'WooCommerce' ) ) {
|
1455 |
+
$this->renderPrice();
|
1456 |
+
}
|
1457 |
+
|
1458 |
+
// Button.
|
1459 |
+
$this->renderButton();
|
1460 |
+
|
1461 |
+
echo '</div><!-- .obfx-grid-col-content -->';
|
1462 |
+
echo '</article>';
|
1463 |
+
echo '</div>';
|
1464 |
+
|
1465 |
+
} // End while().
|
1466 |
+
|
1467 |
+
// Pagination.
|
1468 |
+
if ( ! empty( $settings['grid_pagination'] ) ) { ?>
|
1469 |
+
<div class="obfx-grid-pagination">
|
1470 |
+
<?php
|
1471 |
+
$big = 999999999;
|
1472 |
+
$totalpages = $query->max_num_pages;
|
1473 |
+
$current = max( 1, $paged );
|
1474 |
+
$paginate_args = array(
|
1475 |
+
'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
|
1476 |
+
'format' => '?paged=%#%',
|
1477 |
+
'current' => $current,
|
1478 |
+
'total' => $totalpages,
|
1479 |
+
'show_all' => false,
|
1480 |
+
'end_size' => 1,
|
1481 |
+
'mid_size' => 3,
|
1482 |
+
'prev_next' => true,
|
1483 |
+
'prev_text' => esc_html__( 'Previous', 'elementor-addon-widgets' ),
|
1484 |
+
'next_text' => esc_html__( 'Next', 'elementor-addon-widgets' ),
|
1485 |
+
'type' => 'plain',
|
1486 |
+
'add_args' => false,
|
1487 |
+
);
|
1488 |
+
|
1489 |
+
$pagination = paginate_links( $paginate_args ); ?>
|
1490 |
+
<nav class="pagination">
|
1491 |
+
<?php echo $pagination; ?>
|
1492 |
+
</nav>
|
1493 |
+
</div>
|
1494 |
+
<?php
|
1495 |
+
}
|
1496 |
+
} // End if().
|
1497 |
+
|
1498 |
+
// Restore original data.
|
1499 |
+
wp_reset_postdata();
|
1500 |
+
|
1501 |
+
echo '</div><!-- .obfx-grid-container -->';
|
1502 |
+
|
1503 |
+
echo '</div><!-- .obfx-grid -->';
|
1504 |
+
}
|
1505 |
+
|
1506 |
+
/**
|
1507 |
+
* Render image of post type.
|
1508 |
+
*/
|
1509 |
+
protected function renderImage() {
|
1510 |
+
$settings = $this->get_settings();
|
1511 |
+
|
1512 |
+
// Only in editor.
|
1513 |
+
if ( $settings['grid_image_hide'] !== 'yes' ) {
|
1514 |
+
// Check if post type has featured image.
|
1515 |
+
if ( has_post_thumbnail() ) {
|
1516 |
+
|
1517 |
+
if ( $settings['grid_image_link'] == 'yes' ) {
|
1518 |
+
?>
|
1519 |
+
<div class="obfx-grid-col-image">
|
1520 |
+
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
|
1521 |
+
<?php
|
1522 |
+
the_post_thumbnail(
|
1523 |
+
'full', array(
|
1524 |
+
'class' => 'img-responsive',
|
1525 |
+
'alt' => get_the_title( get_post_thumbnail_id() ),
|
1526 |
+
)
|
1527 |
+
); ?>
|
1528 |
+
</a>
|
1529 |
+
</div>
|
1530 |
+
<?php } else { ?>
|
1531 |
+
<div class="obfx-grid-col-image">
|
1532 |
+
<?php
|
1533 |
+
the_post_thumbnail(
|
1534 |
+
'full', array(
|
1535 |
+
'class' => 'img-responsive',
|
1536 |
+
'alt' => get_the_title( get_post_thumbnail_id() ),
|
1537 |
+
)
|
1538 |
+
); ?>
|
1539 |
+
</div>
|
1540 |
+
<?php
|
1541 |
+
}
|
1542 |
+
}
|
1543 |
+
}
|
1544 |
+
}
|
1545 |
+
|
1546 |
+
/**
|
1547 |
+
* Render title of post type.
|
1548 |
+
*/
|
1549 |
+
protected function renderTitle() {
|
1550 |
+
$settings = $this->get_settings();
|
1551 |
+
|
1552 |
+
if ( $settings['grid_title_hide'] !== 'yes' ) { ?>
|
1553 |
+
<<?php echo $settings['grid_title_tag']; ?> class="entry-title obfx-grid-title">
|
1554 |
+
<?php if ( $settings['grid_title_link'] == 'yes' ) { ?>
|
1555 |
+
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
|
1556 |
+
<?php the_title(); ?>
|
1557 |
+
</a>
|
1558 |
+
<?php
|
1559 |
+
} else {
|
1560 |
+
the_title();
|
1561 |
+
} ?>
|
1562 |
+
</<?php echo $settings['grid_title_tag']; ?>>
|
1563 |
+
<?php
|
1564 |
+
}
|
1565 |
+
}
|
1566 |
+
|
1567 |
+
/**
|
1568 |
+
* Render meta of post type.
|
1569 |
+
*/
|
1570 |
+
protected function renderMeta() {
|
1571 |
+
$settings = $this->get_settings();
|
1572 |
+
|
1573 |
+
if ( $settings['grid_meta_hide'] !== 'yes' ) {
|
1574 |
+
if ( ! empty( $settings['grid_meta_display'] ) ) { ?>
|
1575 |
+
<div class="entry-meta obfx-grid-meta">
|
1576 |
+
|
1577 |
+
<?php
|
1578 |
+
foreach ( $settings['grid_meta_display'] as $meta ) {
|
1579 |
+
|
1580 |
+
switch ( $meta ) :
|
1581 |
+
// Author
|
1582 |
+
case 'author': ?>
|
1583 |
+
<span class="obfx-grid-author">
|
1584 |
+
<?php
|
1585 |
+
echo ( $settings['grid_meta_remove_icons'] == '' ) ? '<i class="fa fa-user"></i>' : '';
|
1586 |
+
|
1587 |
+
echo get_the_author(); ?>
|
1588 |
+
</span>
|
1589 |
+
<?php
|
1590 |
+
// Date
|
1591 |
+
break;
|
1592 |
+
case 'date': ?>
|
1593 |
+
<span class="obfx-grid-date">
|
1594 |
+
<?php
|
1595 |
+
echo ( $settings['grid_meta_remove_icons'] == '' ) ? '<i class="fa fa-calendar"></i>' : '';
|
1596 |
+
echo get_the_date(); ?>
|
1597 |
+
</span>
|
1598 |
+
<?php
|
1599 |
+
// Category
|
1600 |
+
break;
|
1601 |
+
case 'category':
|
1602 |
+
$this->renderMetaGridCategories();
|
1603 |
+
|
1604 |
+
// Tags
|
1605 |
+
break;
|
1606 |
+
case 'tags':
|
1607 |
+
$this->renderMetaGridTags();
|
1608 |
+
|
1609 |
+
// Comments/Reviews
|
1610 |
+
break;
|
1611 |
+
case 'comments': ?>
|
1612 |
+
<span class="obfx-grid-comments">
|
1613 |
+
<?php
|
1614 |
+
echo ( $settings['grid_meta_remove_icons'] == '' ) ? '<i class="fa fa-comment"></i>' : '';
|
1615 |
+
|
1616 |
+
if ( $settings['grid_post_type'] == 'product' ) {
|
1617 |
+
echo comments_number( __( 'No reviews', 'elementor-addon-widgets' ), __( '1 review', 'elementor-addon-widgets' ), __( '% reviews', 'elementor-addon-widgets' ) );
|
1618 |
+
} else {
|
1619 |
+
echo comments_number( __( 'No comments', 'elementor-addon-widgets' ), __( '1 comment', 'elementor-addon-widgets' ), __( '% comments', 'elementor-addon-widgets' ) );
|
1620 |
+
} ?>
|
1621 |
+
</span>
|
1622 |
+
<?php
|
1623 |
+
break;
|
1624 |
+
endswitch;
|
1625 |
+
} // End foreach().?>
|
1626 |
+
|
1627 |
+
</div>
|
1628 |
+
<?php
|
1629 |
+
}// End if().
|
1630 |
+
}// End if().
|
1631 |
+
}
|
1632 |
+
|
1633 |
+
/**
|
1634 |
+
* Display price if post type is product.
|
1635 |
+
*/
|
1636 |
+
protected function renderPrice() {
|
1637 |
+
|
1638 |
+
if ( ! function_exists( 'wc_get_product' ) ) {
|
1639 |
+
return null;
|
1640 |
+
}
|
1641 |
+
|
1642 |
+
$settings = $this->get_settings();
|
1643 |
+
$product = wc_get_product( get_the_ID() );
|
1644 |
+
|
1645 |
+
if ( $settings['grid_post_type'] == 'product' && $settings['grid_content_price'] == 'yes' ) { ?>
|
1646 |
+
<div class="obfx-grid-price">
|
1647 |
+
<?php
|
1648 |
+
$price = $product->get_price_html();
|
1649 |
+
if ( ! empty( $price ) ) {
|
1650 |
+
echo wp_kses(
|
1651 |
+
$price, array(
|
1652 |
+
'span' => array(
|
1653 |
+
'class' => array(),
|
1654 |
+
),
|
1655 |
+
'del' => array(),
|
1656 |
+
)
|
1657 |
+
);
|
1658 |
+
} ?>
|
1659 |
+
</div>
|
1660 |
+
<?php
|
1661 |
+
}
|
1662 |
+
}
|
1663 |
+
|
1664 |
+
/**
|
1665 |
+
* Display Add to Cart button.
|
1666 |
+
*/
|
1667 |
+
protected function renderAddToCart() {
|
1668 |
+
|
1669 |
+
if ( ! function_exists( 'wc_get_product' ) ) {
|
1670 |
+
return null;
|
1671 |
+
}
|
1672 |
+
|
1673 |
+
$product = wc_get_product( get_the_ID() );
|
1674 |
+
|
1675 |
+
echo apply_filters(
|
1676 |
+
'woocommerce_loop_add_to_cart_link',
|
1677 |
+
sprintf(
|
1678 |
+
'<a href="%s" title="%s" rel="nofollow">%s</a>',
|
1679 |
+
esc_url( $product->add_to_cart_url() ),
|
1680 |
+
esc_attr( $product->add_to_cart_text() ),
|
1681 |
+
esc_html( $product->add_to_cart_text() )
|
1682 |
+
), $product
|
1683 |
+
);
|
1684 |
+
}
|
1685 |
+
|
1686 |
+
/**
|
1687 |
+
* Render content of post type.
|
1688 |
+
*/
|
1689 |
+
protected function renderContent() {
|
1690 |
+
$settings = $this->get_settings();
|
1691 |
+
if ( $settings['grid_content_hide'] !== 'yes' ) { ?>
|
1692 |
+
<div class="entry-content obfx-grid-content">
|
1693 |
+
<?php
|
1694 |
+
if( $settings['grid_content_full_post'] === 'yes' ) {
|
1695 |
+
the_content();
|
1696 |
+
} else {
|
1697 |
+
if ( empty( $settings['grid_content_length'] ) ) {
|
1698 |
+
the_excerpt();
|
1699 |
+
} else {
|
1700 |
+
echo wp_trim_words( get_the_excerpt(), $settings['grid_content_length'] );
|
1701 |
+
}
|
1702 |
+
}?>
|
1703 |
+
</div>
|
1704 |
+
<?php
|
1705 |
+
}
|
1706 |
+
}
|
1707 |
+
|
1708 |
+
/**
|
1709 |
+
* Render button of post type.
|
1710 |
+
*/
|
1711 |
+
protected function renderButton() {
|
1712 |
+
$settings = $this->get_settings();
|
1713 |
+
|
1714 |
+
if ( $settings['grid_post_type'] == 'product' && $settings['grid_content_product_btn'] == 'yes' ) { ?>
|
1715 |
+
<div class="obfx-grid-footer">
|
1716 |
+
<?php $this->renderAddToCart(); ?>
|
1717 |
+
</div>
|
1718 |
+
<?php } elseif ( $settings['grid_content_default_btn'] == 'yes' && ! empty( $settings['grid_content_default_btn_text'] ) ) { ?>
|
1719 |
+
<div class="obfx-grid-footer">
|
1720 |
+
<a href="<?php echo get_the_permalink(); ?>"
|
1721 |
+
title="<?php echo $settings['grid_content_default_btn_text']; ?>"><?php echo $settings['grid_content_default_btn_text']; ?></a>
|
1722 |
+
</div>
|
1723 |
+
<?php
|
1724 |
+
}
|
1725 |
+
}
|
1726 |
+
|
1727 |
+
/**
|
1728 |
+
* Display categories in meta section.
|
1729 |
+
*/
|
1730 |
+
protected function renderMetaGridCategories() {
|
1731 |
+
$settings = $this->get_settings();
|
1732 |
+
$post_type_category = get_the_category();
|
1733 |
+
$maxCategories = $settings['grid_meta_categories_max'] ? $settings['grid_meta_categories_max'] : '-1';
|
1734 |
+
$i = 0; // counter
|
1735 |
+
|
1736 |
+
if ( $post_type_category ) { ?>
|
1737 |
+
<span class="obfx-grid-categories">
|
1738 |
+
<?php
|
1739 |
+
echo ( $settings['grid_meta_remove_icons'] == '' ) ? '<i class="fa fa-bookmark"></i>' : '';
|
1740 |
+
|
1741 |
+
foreach ( $post_type_category as $category ) {
|
1742 |
+
if ( $i == $maxCategories ) {
|
1743 |
+
break;
|
1744 |
+
} ?>
|
1745 |
+
<span class="obfx-grid-categories-item">
|
1746 |
+
<a href="<?php echo get_category_link( $category->term_id ); ?>"
|
1747 |
+
title="<?php echo $category->name; ?>">
|
1748 |
+
<?php echo $category->name; ?>
|
1749 |
+
</a>
|
1750 |
+
</span>
|
1751 |
+
<?php
|
1752 |
+
$i ++;
|
1753 |
+
} ?>
|
1754 |
+
</span>
|
1755 |
+
<?php
|
1756 |
+
}
|
1757 |
+
}
|
1758 |
+
|
1759 |
+
/**
|
1760 |
+
* Display tags in meta section.
|
1761 |
+
*/
|
1762 |
+
protected function renderMetaGridTags() {
|
1763 |
+
$settings = $this->get_settings();
|
1764 |
+
$post_type_tags = get_the_tags();
|
1765 |
+
$maxTags = $settings['grid_meta_tags_max'] ? $settings['grid_meta_tags_max'] : '-1';
|
1766 |
+
$i = 0; // counter
|
1767 |
+
|
1768 |
+
if ( $post_type_tags ) { ?>
|
1769 |
+
<span class="obfx-grid-tags">
|
1770 |
+
<?php
|
1771 |
+
echo ( $settings['grid_meta_remove_icons'] == '' ) ? '<i class="fa fa-tags"></i>' : '';
|
1772 |
+
|
1773 |
+
foreach ( $post_type_tags as $tag ) {
|
1774 |
+
if ( $i == $maxTags ) {
|
1775 |
+
break;
|
1776 |
+
} ?>
|
1777 |
+
<span class="obfx-grid-tags-item">
|
1778 |
+
<a href="<?php echo get_tag_link( $tag->term_id ); ?>" title="<?php echo $tag->name; ?>">
|
1779 |
+
<?php echo $tag->name; ?>
|
1780 |
+
</a>
|
1781 |
+
</span>
|
1782 |
+
<?php
|
1783 |
+
$i ++;
|
1784 |
+
} ?>
|
1785 |
+
</span>
|
1786 |
+
<?php
|
1787 |
+
}
|
1788 |
+
}
|
1789 |
+
|
1790 |
+
/**
|
1791 |
+
* Load the widget style dynamically if it is a widget preview
|
1792 |
+
* or enqueue style and scripts if not
|
1793 |
+
*
|
1794 |
+
* This way we are sure that the assets files are loaded only when this block is present in page.
|
1795 |
+
*/
|
1796 |
+
protected function maybe_load_widget_style() {
|
1797 |
+
if ( \Elementor\Plugin::$instance->editor->is_edit_mode() === true && apply_filters( 'themeisle_content_forms_register_default_style', true ) ) { ?>
|
1798 |
+
<style>
|
1799 |
+
<?php echo file_get_contents( plugin_dir_path( dirname( dirname(__FILE__ ) ) ) . 'css/public.css' ) ?>
|
1800 |
+
</style>
|
1801 |
+
<?php
|
1802 |
+
} else {
|
1803 |
+
wp_enqueue_script( 'obfx-grid-js' );
|
1804 |
+
wp_enqueue_style( 'eaw-elementor' );
|
1805 |
+
}
|
1806 |
+
}
|
1807 |
+
}
|
1808 |
+
|
vendor/codeinwp/elementor-extra-widgets/widgets/elementor/premium-placeholder.php
ADDED
@@ -0,0 +1,111 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace ThemeIsle\ElementorExtraWidgets;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Create an abstract class as a base for all the Premium Widgets
|
7 |
+
* This way, we'll configure the a Placeholder Widget in Lite plugins which will be overwritten in the Pro plugin.
|
8 |
+
*/
|
9 |
+
abstract class Premium_Placeholder extends \Elementor\Widget_Base {
|
10 |
+
/**
|
11 |
+
* Each Placeholder must declare for which Premium Widget will keep the place warm
|
12 |
+
* @return mixed
|
13 |
+
*/
|
14 |
+
abstract public function get_pro_element_name();
|
15 |
+
|
16 |
+
/**
|
17 |
+
* The widget's name will probably be the pro_element_name.
|
18 |
+
* @return mixed|string
|
19 |
+
*/
|
20 |
+
public function get_name() {
|
21 |
+
return 'eaw-' . $this->get_pro_element_name();
|
22 |
+
}
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Returns the up-sell link for premium widgets.
|
26 |
+
* It should be overwritten in the extended class.
|
27 |
+
*
|
28 |
+
* @return string
|
29 |
+
*/
|
30 |
+
public function get_upsell_link() {
|
31 |
+
if ( ! defined( 'SIZZIFY_UPSELL_LINK' ) ) {
|
32 |
+
return 'https://themeisle.com/wordpress-plugins';
|
33 |
+
}
|
34 |
+
return SIZZIFY_UPSELL_LINK;
|
35 |
+
}
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Get widget icon.
|
39 |
+
*
|
40 |
+
* @return string
|
41 |
+
*/
|
42 |
+
public function get_icon() {
|
43 |
+
return 'eicon-insert-image';
|
44 |
+
}
|
45 |
+
|
46 |
+
/**
|
47 |
+
* The Widget Category is filterable, so we need some extra logic to handle it better.
|
48 |
+
* Premium category is suffixed with `-pro` string.
|
49 |
+
*
|
50 |
+
* @return array
|
51 |
+
*/
|
52 |
+
public function get_categories() {
|
53 |
+
$category_args = apply_filters( 'elementor_extra_widgets_category_args', array() );
|
54 |
+
$slug = isset( $category_args['slug'] ) ? $category_args['slug'] : 'obfx-elementor-widgets';
|
55 |
+
|
56 |
+
return array( $slug . '-pro' );
|
57 |
+
}
|
58 |
+
|
59 |
+
/**
|
60 |
+
* Register Elementor Controls.
|
61 |
+
*
|
62 |
+
* Because this is just a placeholder widget, we need to output this to the Lite users.
|
63 |
+
*/
|
64 |
+
protected function _register_controls() {
|
65 |
+
$this->start_controls_section(
|
66 |
+
'section_title',
|
67 |
+
[
|
68 |
+
'label' => $this->get_title()
|
69 |
+
]
|
70 |
+
);
|
71 |
+
|
72 |
+
$this->add_control(
|
73 |
+
'inform_about_placeholder',
|
74 |
+
[
|
75 |
+
'raw' => sprintf(
|
76 |
+
'<div><h3>%s</h3><a href="%s" target="_blank">%s</a></div>',
|
77 |
+
__( 'This widget is part of the pro version of Sizzify.', 'elementor-addon-widgets' ),
|
78 |
+
$this->get_upsell_link(),
|
79 |
+
__( 'Upgrade Here!', 'elementor-addon-widgets' )
|
80 |
+
),
|
81 |
+
'type' => \Elementor\Controls_Manager::RAW_HTML,
|
82 |
+
'content_classes' => 'elementor-panel-alert elementor-panel-alert-info',
|
83 |
+
]
|
84 |
+
);
|
85 |
+
|
86 |
+
$this->end_controls_section(); // end section-title
|
87 |
+
|
88 |
+
}
|
89 |
+
|
90 |
+
/**
|
91 |
+
* A placeholder should not output anything in front-end.
|
92 |
+
* Only on the editor side will output a message about it's type.
|
93 |
+
*/
|
94 |
+
public function render() {
|
95 |
+
if ( \Elementor\Plugin::$instance->editor->is_edit_mode() ) { ?>
|
96 |
+
<div class="elementor-premium-placeholder" role="tablist"
|
97 |
+
style="position: relative;
|
98 |
+
background: #fff;
|
99 |
+
color: red;
|
100 |
+
text-align: center;"
|
101 |
+
>
|
102 |
+
<h3 style="color:red"><?php echo $this->get_title(); ?></h3>
|
103 |
+
<i class="elementor-widget-empty-icon eicon-insert-image"
|
104 |
+
style="font-size: 100px;
|
105 |
+
vertical-align: middle;
|
106 |
+
color: grey"></i>
|
107 |
+
<p>This is a Premium widget. You need to buy it to use it.</p>
|
108 |
+
</div>
|
109 |
+
<?php }
|
110 |
+
}
|
111 |
+
}
|
vendor/codeinwp/elementor-extra-widgets/widgets/elementor/pricing-table.php
ADDED
@@ -0,0 +1,1080 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Pricing Table widget for Elementor builder
|
4 |
+
*
|
5 |
+
* @link https://themeisle.com
|
6 |
+
* @since 1.0.0
|
7 |
+
*
|
8 |
+
* @package ThemeIsle\ElementorExtraWidgets
|
9 |
+
*/
|
10 |
+
namespace ThemeIsle\ElementorExtraWidgets;
|
11 |
+
|
12 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
13 |
+
exit;
|
14 |
+
} // End if().
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Class Pricing_Table
|
18 |
+
*
|
19 |
+
* @package ThemeIsle\ElementorExtraWidgets
|
20 |
+
*/
|
21 |
+
class Pricing_Table extends \Elementor\Widget_Base {
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Widget title.
|
25 |
+
*
|
26 |
+
* @return string
|
27 |
+
*/
|
28 |
+
public function get_title() {
|
29 |
+
return __( 'Pricing Table', 'elementor-addon-widgets' );
|
30 |
+
}
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Widget icon.
|
34 |
+
*
|
35 |
+
* @return string
|
36 |
+
*/
|
37 |
+
public function get_icon() {
|
38 |
+
return 'eicon-price-table';
|
39 |
+
}
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Widget name.
|
43 |
+
*
|
44 |
+
* @return string
|
45 |
+
*/
|
46 |
+
public function get_name() {
|
47 |
+
return 'obfx-pricing-table';
|
48 |
+
}
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Widget Category
|
52 |
+
*
|
53 |
+
* @return array
|
54 |
+
*/
|
55 |
+
public function get_categories() {
|
56 |
+
$category_args = apply_filters( 'elementor_extra_widgets_category_args', array() );
|
57 |
+
$slug = isset( $category_args['slug'] ) ? $category_args['slug'] : 'obfx-elementor-widgets';
|
58 |
+
return [ $slug ];
|
59 |
+
}
|
60 |
+
|
61 |
+
/**
|
62 |
+
* Register Elementor Controls
|
63 |
+
*/
|
64 |
+
protected function _register_controls() {
|
65 |
+
$this->plan_title_section();
|
66 |
+
|
67 |
+
$this->plan_price_tag_section();
|
68 |
+
|
69 |
+
$this->features_section();
|
70 |
+
|
71 |
+
$this->button_section();
|
72 |
+
|
73 |
+
$this->header_style_section();
|
74 |
+
|
75 |
+
$this->price_tag_style_section();
|
76 |
+
|
77 |
+
$this->features_style_section();
|
78 |
+
|
79 |
+
$this->button_style_section();
|
80 |
+
}
|
81 |
+
|
82 |
+
/**
|
83 |
+
* Content > Title section.
|
84 |
+
*/
|
85 |
+
private function plan_title_section() {
|
86 |
+
$this->start_controls_section(
|
87 |
+
'section_title',
|
88 |
+
[
|
89 |
+
'label' => __( 'Plan Title', 'elementor-addon-widgets' ),
|
90 |
+
]
|
91 |
+
);
|
92 |
+
|
93 |
+
$this->add_control(
|
94 |
+
'title',
|
95 |
+
[
|
96 |
+
'type' => \Elementor\Controls_Manager::TEXT,
|
97 |
+
'label' => __( 'Title', 'elementor-addon-widgets' ),
|
98 |
+
'placeholder' => __( 'Title', 'elementor-addon-widgets' ),
|
99 |
+
'default' => __( 'Pricing Plan', 'elementor-addon-widgets' ),
|
100 |
+
]
|
101 |
+
);
|
102 |
+
|
103 |
+
$this->add_control(
|
104 |
+
'title_tag',
|
105 |
+
[
|
106 |
+
'type' => \Elementor\Controls_Manager::SELECT,
|
107 |
+
'label' => __( 'Title HTML tag', 'elementor-addon-widgets' ),
|
108 |
+
'default' => 'h3',
|
109 |
+
'options' => [
|
110 |
+
'h1' => __( 'h1', 'elementor-addon-widgets' ),
|
111 |
+
'h2' => __( 'h2', 'elementor-addon-widgets' ),
|
112 |
+
'h3' => __( 'h3', 'elementor-addon-widgets' ),
|
113 |
+
'h4' => __( 'h4', 'elementor-addon-widgets' ),
|
114 |
+
'h5' => __( 'h5', 'elementor-addon-widgets' ),
|
115 |
+
'h6' => __( 'h6', 'elementor-addon-widgets' ),
|
116 |
+
'p' => __( 'p', 'elementor-addon-widgets' ),
|
117 |
+
],
|
118 |
+
]
|
119 |
+
);
|
120 |
+
|
121 |
+
$this->add_control(
|
122 |
+
'subtitle',
|
123 |
+
[
|
124 |
+
'type' => \Elementor\Controls_Manager::TEXT,
|
125 |
+
'label' => __( 'Subtitle', 'elementor-addon-widgets' ),
|
126 |
+
'placeholder' => __( 'Subtitle', 'elementor-addon-widgets' ),
|
127 |
+
'default' => __( 'Description', 'elementor-addon-widgets' ),
|
128 |
+
]
|
129 |
+
);
|
130 |
+
|
131 |
+
$this->add_control(
|
132 |
+
'subtitle_tag',
|
133 |
+
[
|
134 |
+
'type' => \Elementor\Controls_Manager::SELECT,
|
135 |
+
'label' => __( 'Subtitle HTML Tag', 'elementor-addon-widgets' ),
|
136 |
+
'default' => 'p',
|
137 |
+
'options' => [
|
138 |
+
'h1' => __( 'h1', 'elementor-addon-widgets' ),
|
139 |
+
'h2' => __( 'h2', 'elementor-addon-widgets' ),
|
140 |
+
'h3' => __( 'h3', 'elementor-addon-widgets' ),
|
141 |
+
'h4' => __( 'h4', 'elementor-addon-widgets' ),
|
142 |
+
'h5' => __( 'h5', 'elementor-addon-widgets' ),
|
143 |
+
'h6' => __( 'h6', 'elementor-addon-widgets' ),
|
144 |
+
'p' => __( 'p', 'elementor-addon-widgets' ),
|
145 |
+
],
|
146 |
+
]
|
147 |
+
);
|
148 |
+
$this->end_controls_section(); // end section-title
|
149 |
+
}
|
150 |
+
|
151 |
+
/**
|
152 |
+
* Content > Price Tag section.
|
153 |
+
*/
|
154 |
+
private function plan_price_tag_section() {
|
155 |
+
$this->start_controls_section(
|
156 |
+
'section_price_tag',
|
157 |
+
[
|
158 |
+
'label' => __( 'Price Tag', 'elementor-addon-widgets' ),
|
159 |
+
]
|
160 |
+
);
|
161 |
+
|
162 |
+
$this->add_control(
|
163 |
+
'price_tag_text',
|
164 |
+
[
|
165 |
+
'type' => \Elementor\Controls_Manager::TEXT,
|
166 |
+
'label' => __( 'Price', 'elementor-addon-widgets' ),
|
167 |
+
'placeholder' => __( 'Price', 'elementor-addon-widgets' ),
|
168 |
+
'default' => __( '50', 'elementor-addon-widgets' ),
|
169 |
+
'separator' => 'after',
|
170 |
+
]
|
171 |
+
);
|
172 |
+
|
173 |
+
$this->add_control(
|
174 |
+
'price_tag_currency',
|
175 |
+
[
|
176 |
+
'type' => \Elementor\Controls_Manager::TEXT,
|
177 |
+
'label' => __( 'Currency', 'elementor-addon-widgets' ),
|
178 |
+
'placeholder' => __( 'Currency', 'elementor-addon-widgets' ),
|
179 |
+
'default' => __( '$', 'elementor-addon-widgets' ),
|
180 |
+
]
|
181 |
+
);
|
182 |
+
|
183 |
+
$this->add_control(
|
184 |
+
'price_tag_currency_position',
|
185 |
+
[
|
186 |
+
'type' => \Elementor\Controls_Manager::SELECT,
|
187 |
+
'label' => __( 'Currency Position', 'elementor-addon-widgets' ),
|
188 |
+
'default' => 'left',
|
189 |
+
'options' => [
|
190 |
+
'left' => __( 'Before', 'elementor-addon-widgets' ),
|
191 |
+
'right' => __( 'After', 'elementor-addon-widgets' ),
|
192 |
+
],
|
193 |
+
]
|
194 |
+
);
|
195 |
+
|
196 |
+
$this->add_control(
|
197 |
+
'price_tag_period',
|
198 |
+
[
|
199 |
+
'type' => \Elementor\Controls_Manager::TEXT,
|
200 |
+
'label' => __( 'Period', 'elementor-addon-widgets' ),
|
201 |
+
'placeholder' => __( '/month', 'elementor-addon-widgets' ),
|
202 |
+
'default' => __( '/month', 'elementor-addon-widgets' ),
|
203 |
+
'separator' => 'before',
|
204 |
+
]
|
205 |
+
);
|
206 |
+
$this->end_controls_section(); // end section-price-tag
|
207 |
+
}
|
208 |
+
|
209 |
+
/**
|
210 |
+
* Content > Features section.
|
211 |
+
*/
|
212 |
+
private function features_section() {
|
213 |
+
$this->start_controls_section(
|
214 |
+
'section_features',
|
215 |
+
[
|
216 |
+
'label' => __( 'Features', 'elementor-addon-widgets' ),
|
217 |
+
]
|
218 |
+
);
|
219 |
+
|
220 |
+
$this->add_control(
|
221 |
+
'feature_list',
|
222 |
+
[
|
223 |
+
'label' => __( 'Plan Features', 'elementor-addon-widgets' ),
|
224 |
+
'type' => \Elementor\Controls_Manager::REPEATER,
|
225 |
+
'default' => [
|
226 |
+
[
|
227 |
+
'accent' => __( 'First', 'elementor-addon-widgets' ),
|
228 |
+
'text' => __( 'Feature', 'elementor-addon-widgets' ),
|
229 |
+
],
|
230 |
+
[
|
231 |
+
'accent' => __( 'Second', 'elementor-addon-widgets' ),
|
232 |
+
'text' => __( 'Feature', 'elementor-addon-widgets' ),
|
233 |
+
],
|
234 |
+
[
|
235 |
+
'accent' => __( 'Third', 'elementor-addon-widgets' ),
|
236 |
+
'text' => __( 'Feature', 'elementor-addon-widgets' ),
|
237 |
+
],
|
238 |
+
],
|
239 |
+
'fields' => [
|
240 |
+
[
|
241 |
+
'type' => \Elementor\Controls_Manager::TEXT,
|
242 |
+
'name' => 'accent',
|
243 |
+
'label' => __( 'Accented Text', 'elementor-addon-widgets' ),
|
244 |
+
'description' => __( 'Appears before feature text', 'elementor-addon-widgets' ),
|
245 |
+
'label_block' => true,
|
246 |
+
'default' => __( 'Accent', 'elementor-addon-widgets' ),
|
247 |
+
],
|
248 |
+
[
|
249 |
+
'type' => \Elementor\Controls_Manager::TEXT,
|
250 |
+
'name' => 'text',
|
251 |
+
'label' => __( 'Text', 'elementor-addon-widgets' ),
|
252 |
+
'label_block' => true,
|
253 |
+
'placeholder' => __( 'Plan Features', 'elementor-addon-widgets' ),
|
254 |
+
'default' => __( 'Feature', 'elementor-addon-widgets' ),
|
255 |
+
],
|
256 |
+
[
|
257 |
+
'type' => \Elementor\Controls_Manager::ICON,
|
258 |
+
'name' => 'feature_icon',
|
259 |
+
'label' => __( 'Icon', 'elementor-addon-widgets' ),
|
260 |
+
'label_block' => true,
|
261 |
+
'default' => 'fa fa-star',
|
262 |
+
],
|
263 |
+
],
|
264 |
+
'title_field' => '{{ accent + " " + text }}',
|
265 |
+
]
|
266 |
+
);
|
267 |
+
|
268 |
+
$this->add_responsive_control(
|
269 |
+
'features_align',
|
270 |
+
[
|
271 |
+
'label' => __( 'Alignment', 'elementor-addon-widgets' ),
|
272 |
+
'type' => \Elementor\Controls_Manager::CHOOSE,
|
273 |
+
'options' => [
|
274 |
+
'left' => [
|
275 |
+
'title' => __( 'Left', 'elementor-addon-widgets' ),
|
276 |
+
'icon' => 'fa fa-align-left',
|
277 |
+
],
|
278 |
+
'center' => [
|
279 |
+
'title' => __( 'Center', 'elementor-addon-widgets' ),
|
280 |
+
'icon' => 'fa fa-align-center',
|
281 |
+
],
|
282 |
+
'right' => [
|
283 |
+
'title' => __( 'Right', 'elementor-addon-widgets' ),
|
284 |
+
'icon' => 'fa fa-align-right',
|
285 |
+
],
|
286 |
+
'justify' => [
|
287 |
+
'title' => __( 'Justified', 'elementor-addon-widgets' ),
|
288 |
+
'icon' => 'fa fa-align-justify',
|
289 |
+
],
|
290 |
+
],
|
291 |
+
'default' => 'center',
|
292 |
+
'selectors' => [
|
293 |
+
'{{WRAPPER}} .obfx-feature-list' => 'text-align: {{VALUE}};',
|
294 |
+
],
|
295 |
+
]
|
296 |
+
);
|
297 |
+
|
298 |
+
$this->end_controls_section(); // end section-features
|
299 |
+
}
|
300 |
+
|
301 |
+
/**
|
302 |
+
* Content > Button section.
|
303 |
+
*/
|
304 |
+
private function button_section() {
|
305 |
+
$this->start_controls_section(
|
306 |
+
'section_button',
|
307 |
+
[
|
308 |
+
'label' => __( 'Button', 'elementor-addon-widgets' ),
|
309 |
+
]
|
310 |
+
);
|
311 |
+
|
312 |
+
$this->add_control(
|
313 |
+
'button_text',
|
314 |
+
[
|
315 |
+
'type' => \Elementor\Controls_Manager::TEXT,
|
316 |
+
'label' => __( 'Text', 'elementor-addon-widgets' ),
|
317 |
+
'placeholder' => __( 'Buy Now', 'elementor-addon-widgets' ),
|
318 |
+
'default' => __( 'Buy Now', 'elementor-addon-widgets' ),
|
319 |
+
]
|
320 |
+
);
|
321 |
+
|
322 |
+
$this->add_control(
|
323 |
+
'button_link',
|
324 |
+
[
|
325 |
+
'type' => \Elementor\Controls_Manager::URL,
|
326 |
+
'label' => __( 'Link', 'elementor-addon-widgets' ),
|
327 |
+
'placeholder' => __( 'https://example.com', 'elementor-addon-widgets' ),
|
328 |
+
]
|
329 |
+
);
|
330 |
+
|
331 |
+
$this->add_control(
|
332 |
+
'button_icon',
|
333 |
+
[
|
334 |
+
'type' => \Elementor\Controls_Manager::ICON,
|
335 |
+
'label' => __( 'Icon', 'elementor-addon-widgets' ),
|
336 |
+
'label_block' => true,
|
337 |
+
'default' => '',
|
338 |
+
]
|
339 |
+
);
|
340 |
+
|
341 |
+
$this->add_control(
|
342 |
+
'button_icon_align',
|
343 |
+
[
|
344 |
+
'type' => \Elementor\Controls_Manager::SELECT,
|
345 |
+
'label' => __( 'Icon Position', 'elementor-addon-widgets' ),
|
346 |
+
'default' => 'left',
|
347 |
+
'options' => [
|
348 |
+
'left' => __( 'Before', 'elementor-addon-widgets' ),
|
349 |
+
'right' => __( 'After', 'elementor-addon-widgets' ),
|
350 |
+
],
|
351 |
+
'condition' => [
|
352 |
+
'button_icon!' => '',
|
353 |
+
],
|
354 |
+
]
|
355 |
+
);
|
356 |
+
|
357 |
+
$this->add_control(
|
358 |
+
'button_icon_indent',
|
359 |
+
[
|
360 |
+
'type' => \Elementor\Controls_Manager::SLIDER,
|
361 |
+
'label' => __( 'Icon Spacing', 'elementor-addon-widgets' ),
|
362 |
+
'range' => [
|
363 |
+
'px' => [
|
364 |
+
'max' => 50,
|
365 |
+
],
|
366 |
+
],
|
367 |
+
'condition' => [
|
368 |
+
'button_icon!' => '',
|
369 |
+
],
|
370 |
+
'selectors' => [
|
371 |
+
'{{WRAPPER}} .obfx-button-icon-align-right i' => 'margin-left: {{SIZE}}{{UNIT}};',
|
372 |
+
'{{WRAPPER}} .obfx-button-icon-align-left i' => 'margin-right: {{SIZE}}{{UNIT}};',
|
373 |
+
],
|
374 |
+
]
|
375 |
+
);
|
376 |
+
$this->end_controls_section(); // end section_button
|
377 |
+
}
|
378 |
+
|
379 |
+
/**
|
380 |
+
* Style > Header section.
|
381 |
+
*/
|
382 |
+
private function header_style_section() {
|
383 |
+
$this->start_controls_section(
|
384 |
+
'section_header_style',
|
385 |
+
[
|
386 |
+
'label' => __( 'Header', 'elementor-addon-widgets' ),
|
387 |
+
'tab' => \Elementor\Controls_Manager::TAB_STYLE,
|
388 |
+
]
|
389 |
+
);
|
390 |
+
|
391 |
+
$this->add_responsive_control(
|
392 |
+
'header_padding',
|
393 |
+
[
|
394 |
+
'label' => __( 'Header Padding', 'elementor-addon-widgets' ),
|
395 |
+
'type' => \Elementor\Controls_Manager::DIMENSIONS,
|
396 |
+
'size_units' => [ 'px', 'em', '%' ],
|
397 |
+
'selectors' => [
|
398 |
+
'{{WRAPPER}} .obfx-title-wrapper' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
399 |
+
],
|
400 |
+
]
|
401 |
+
);
|
402 |
+
|
403 |
+
$this->add_control(
|
404 |
+
'plan_title_color',
|
405 |
+
[
|
406 |
+
'type' => \Elementor\Controls_Manager::COLOR,
|
407 |
+
'label' => __( 'Title Color', 'elementor-addon-widgets' ),
|
408 |
+
'scheme' => [
|
409 |
+
'type' => \Elementor\Scheme_Color::get_type(),
|
410 |
+
'value' => \Elementor\Scheme_Color::COLOR_1,
|
411 |
+
],
|
412 |
+
'default' => '#464959',
|
413 |
+
'selectors' => [
|
414 |
+
'{{WRAPPER}} .obfx-pricing-table-title' => 'color: {{VALUE}};',
|
415 |
+
],
|
416 |
+
]
|
417 |
+
);
|
418 |
+
|
419 |
+
$this->add_group_control(
|
420 |
+
\Elementor\Group_Control_Typography::get_type(),
|
421 |
+
[
|
422 |
+
'name' => 'plan_title_typography',
|
423 |
+
'scheme' => \Elementor\Scheme_Typography::TYPOGRAPHY_1,
|
424 |
+
'selector' => '{{WRAPPER}} .obfx-pricing-table-title',
|
425 |
+
]
|
426 |
+
);
|
427 |
+
|
428 |
+
$this->add_control(
|
429 |
+
'plan_subtitle_color',
|
430 |
+
[
|
431 |
+
'type' => \Elementor\Controls_Manager::COLOR,
|
432 |
+
'label' => __( 'Subtitle Color', 'elementor-addon-widgets' ),
|
433 |
+
'scheme' => [
|
434 |
+
'type' => \Elementor\Scheme_Color::get_type(),
|
435 |
+
'value' => \Elementor\Scheme_Color::COLOR_1,
|
436 |
+
],
|
437 |
+
'default' => '#60647d',
|
438 |
+
'selectors' => [
|
439 |
+
'{{WRAPPER}} .obfx-pricing-table-subtitle' => 'color: {{VALUE}};',
|
440 |
+
],
|
441 |
+
]
|
442 |
+
);
|
443 |
+
|
444 |
+
$this->add_group_control(
|
445 |
+
\Elementor\Group_Control_Typography::get_type(),
|
446 |
+
[
|
447 |
+
'name' => 'plan_subtitle_typography',
|
448 |
+
'scheme' => \Elementor\Scheme_Typography::TYPOGRAPHY_1,
|
449 |
+
'selector' => '{{WRAPPER}} .obfx-pricing-table-subtitle',
|
450 |
+
]
|
451 |
+
);
|
452 |
+
|
453 |
+
$this->add_group_control(
|
454 |
+
\Elementor\Group_Control_Background::get_type(),
|
455 |
+
[
|
456 |
+
'name' => 'heading_section_bg',
|
457 |
+
'label' => __( 'Section Background', 'elementor-addon-widgets' ),
|
458 |
+
'types' => [ 'classic', 'gradient' ],
|
459 |
+
'selector' => '{{WRAPPER}} .obfx-title-wrapper',
|
460 |
+
]
|
461 |
+
);
|
462 |
+
$this->end_controls_section(); // end section_header_style
|
463 |
+
}
|
464 |
+
|
465 |
+
/**
|
466 |
+
* Style > Price Tag section.
|
467 |
+
*/
|
468 |
+
private function price_tag_style_section() {
|
469 |
+
$this->start_controls_section(
|
470 |
+
'section_price_box',
|
471 |
+
[
|
472 |
+
'label' => __( 'Price Tag', 'elementor-addon-widgets' ),
|
473 |
+
'tab' => \Elementor\Controls_Manager::TAB_STYLE,
|
474 |
+
]
|
475 |
+
);
|
476 |
+
|
477 |
+
$this->add_responsive_control(
|
478 |
+
'price_box_padding',
|
479 |
+
[
|
480 |
+
'type' => \Elementor\Controls_Manager::DIMENSIONS,
|
481 |
+
'label' => __( 'Price Box Padding', 'elementor-addon-widgets' ),
|
482 |
+
'size_units' => [ 'px', 'em', '%' ],
|
483 |
+
'selectors' => [
|
484 |
+
'{{WRAPPER}} .obfx-price-wrapper' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
485 |
+
],
|
486 |
+
]
|
487 |
+
);
|
488 |
+
|
489 |
+
$this->add_group_control(
|
490 |
+
\Elementor\Group_Control_Background::get_type(),
|
491 |
+
[
|
492 |
+
'name' => 'pricing_section_bg',
|
493 |
+
'label' => __( 'Section Background', 'elementor-addon-widgets' ),
|
494 |
+
'types' => [ 'classic', 'gradient' ],
|
495 |
+
'selector' => '{{WRAPPER}} .obfx-price-wrapper',
|
496 |
+
]
|
497 |
+
);
|
498 |
+
|
499 |
+
$this->add_control(
|
500 |
+
'price_tag_heading_currency',
|
501 |
+
[
|
502 |
+
'label' => __( 'Currency', 'elementor-addon-widgets' ),
|
503 |
+
'type' => \Elementor\Controls_Manager::HEADING,
|
504 |
+
'separator' => 'before',
|
505 |
+
]
|
506 |
+
);
|
507 |
+
|
508 |
+
$this->add_control(
|
509 |
+
'currency_color',
|
510 |
+
[
|
511 |
+
'label' => __( 'Currency Color', 'elementor-addon-widgets' ),
|
512 |
+
'type' => \Elementor\Controls_Manager::COLOR,
|
513 |
+
'scheme' => [
|
514 |
+
'type' => \Elementor\Scheme_Color::get_type(),
|
515 |
+
'value' => \Elementor\Scheme_Color::COLOR_1,
|
516 |
+
],
|
517 |
+
'default' => '#60647d',
|
518 |
+
'selectors' => [
|
519 |
+
'{{WRAPPER}} .obfx-price-currency' => 'color: {{VALUE}};',
|
520 |
+
],
|
521 |
+
]
|
522 |
+
);
|
523 |
+
|
524 |
+
$this->add_group_control(
|
525 |
+
\Elementor\Group_Control_Typography::get_type(),
|
526 |
+
[
|
527 |
+
'name' => 'currency_typography',
|
528 |
+
'scheme' => \Elementor\Scheme_Typography::TYPOGRAPHY_1,
|
529 |
+
'selector' => '{{WRAPPER}} .obfx-price-currency',
|
530 |
+
]
|
531 |
+
);
|
532 |
+
|
533 |
+
$this->add_control(
|
534 |
+
'price_tag_heading_price',
|
535 |
+
[
|
536 |
+
'label' => __( 'Price', 'elementor-addon-widgets' ),
|
537 |
+
'type' => \Elementor\Controls_Manager::HEADING,
|
538 |
+
'separator' => 'before',
|
539 |
+
]
|
540 |
+
);
|
541 |
+
|
542 |
+
$this->add_control(
|
543 |
+
'price_text_color',
|
544 |
+
[
|
545 |
+
'label' => __( 'Price Color', 'elementor-addon-widgets' ),
|
546 |
+
'type' => \Elementor\Controls_Manager::COLOR,
|
547 |
+
'scheme' => [
|
548 |
+
'type' => \Elementor\Scheme_Color::get_type(),
|
549 |
+
'value' => \Elementor\Scheme_Color::COLOR_1,
|
550 |
+
],
|
551 |
+
'default' => '#60647d',
|
552 |
+
'selectors' => [
|
553 |
+
'{{WRAPPER}} .obfx-price' => 'color: {{VALUE}};',
|
554 |
+
],
|
555 |
+
]
|
556 |
+
);
|
557 |
+
|
558 |
+
$this->add_group_control(
|
559 |
+
\Elementor\Group_Control_Typography::get_type(),
|
560 |
+
[
|
561 |
+
'name' => 'price_typography',
|
562 |
+
'scheme' => \Elementor\Scheme_Typography::TYPOGRAPHY_1,
|
563 |
+
'selector' => '{{WRAPPER}} .obfx-price',
|
564 |
+
]
|
565 |
+
);
|
566 |
+
|
567 |
+
$this->add_control(
|
568 |
+
'price_tag_heading_period',
|
569 |
+
[
|
570 |
+
'label' => __( 'Period', 'elementor-addon-widgets' ),
|
571 |
+
'type' => \Elementor\Controls_Manager::HEADING,
|
572 |
+
'separator' => 'before',
|
573 |
+
]
|
574 |
+
);
|
575 |
+
|
576 |
+
$this->add_control(
|
577 |
+
'period_color',
|
578 |
+
[
|
579 |
+
'label' => __( 'Period Color', 'elementor-addon-widgets' ),
|
580 |
+
'type' => \Elementor\Controls_Manager::COLOR,
|
581 |
+
'scheme' => [
|
582 |
+
'type' => \Elementor\Scheme_Color::get_type(),
|
583 |
+
'value' => \Elementor\Scheme_Color::COLOR_1,
|
584 |
+
],
|
585 |
+
'default' => '#60647d',
|
586 |
+
'selectors' => [
|
587 |
+
'{{WRAPPER}} .obfx-pricing-period' => 'color: {{VALUE}};',
|
588 |
+
],
|
589 |
+
]
|
590 |
+
);
|
591 |
+
|
592 |
+
$this->add_group_control(
|
593 |
+
\Elementor\Group_Control_Typography::get_type(),
|
594 |
+
[
|
595 |
+
'name' => 'price_sub_text_typography',
|
596 |
+
'scheme' => \Elementor\Scheme_Typography::TYPOGRAPHY_1,
|
597 |
+
'selector' => '{{WRAPPER}} .obfx-pricing-period',
|
598 |
+
]
|
599 |
+
);
|
600 |
+
$this->end_controls_section(); // end pricing-section
|
601 |
+
}
|
602 |
+
|
603 |
+
/**
|
604 |
+
* Style > Features section.
|
605 |
+
*/
|
606 |
+
private function features_style_section() {
|
607 |
+
$this->start_controls_section(
|
608 |
+
'section_features_style',
|
609 |
+
[
|
610 |
+
'label' => __( 'Features', 'elementor-addon-widgets' ),
|
611 |
+
'tab' => \Elementor\Controls_Manager::TAB_STYLE,
|
612 |
+
]
|
613 |
+
);
|
614 |
+
|
615 |
+
$this->add_group_control(
|
616 |
+
\Elementor\Group_Control_Background::get_type(),
|
617 |
+
[
|
618 |
+
'name' => 'features_section_bg',
|
619 |
+
'label' => __( 'Section Background', 'elementor-addon-widgets' ),
|
620 |
+
'types' => [ 'classic', 'gradient' ],
|
621 |
+
'selector' => '{{WRAPPER}} .obfx-feature-list',
|
622 |
+
]
|
623 |
+
);
|
624 |
+
|
625 |
+
$this->add_responsive_control(
|
626 |
+
'features_box_padding',
|
627 |
+
[
|
628 |
+
'type' => \Elementor\Controls_Manager::DIMENSIONS,
|
629 |
+
'label' => __( 'Features List Padding', 'elementor-addon-widgets' ),
|
630 |
+
'size_units' => [ 'px', 'em', '%' ],
|
631 |
+
'selectors' => [
|
632 |
+
'{{WRAPPER}} .obfx-feature-list' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
633 |
+
],
|
634 |
+
]
|
635 |
+
);
|
636 |
+
|
637 |
+
$this->add_control(
|
638 |
+
'features_accented_heading',
|
639 |
+
[
|
640 |
+
'label' => __( 'Accented', 'elementor-addon-widgets' ),
|
641 |
+
'type' => \Elementor\Controls_Manager::HEADING,
|
642 |
+
'separator' => 'before',
|
643 |
+
]
|
644 |
+
);
|
645 |
+
|
646 |
+
$this->add_control(
|
647 |
+
'features_accented_text_color',
|
648 |
+
[
|
649 |
+
'type' => \Elementor\Controls_Manager::COLOR,
|
650 |
+
'label' => __( 'Accented Color', 'elementor-addon-widgets' ),
|
651 |
+
'scheme' => [
|
652 |
+
'type' => \Elementor\Scheme_Color::get_type(),
|
653 |
+
'value' => \Elementor\Scheme_Color::COLOR_1,
|
654 |
+
],
|
655 |
+
'default' => '#60647d',
|
656 |
+
'selectors' => [
|
657 |
+
'{{WRAPPER}} .obfx-pricing-table-accented' => 'color: {{VALUE}};',
|
658 |
+
],
|
659 |
+
]
|
660 |
+
);
|
661 |
+
|
662 |
+
$this->add_group_control(
|
663 |
+
\Elementor\Group_Control_Typography::get_type(),
|
664 |
+
[
|
665 |
+
'name' => 'features_accented_typography',
|
666 |
+
'scheme' => \Elementor\Scheme_Typography::TYPOGRAPHY_1,
|
667 |
+
'selector' => '{{WRAPPER}} .obfx-pricing-table-accented',
|
668 |
+
]
|
669 |
+
);
|
670 |
+
|
671 |
+
$this->add_control(
|
672 |
+
'features_features_heading',
|
673 |
+
[
|
674 |
+
'label' => __( 'Features', 'elementor-addon-widgets' ),
|
675 |
+
'type' => \Elementor\Controls_Manager::HEADING,
|
676 |
+
'separator' => 'before',
|
677 |
+
]
|
678 |
+
);
|
679 |
+
|
680 |
+
$this->add_control(
|
681 |
+
'features_text_color',
|
682 |
+
[
|
683 |
+
'label' => __( 'Features Color', 'elementor-addon-widgets' ),
|
684 |
+
'type' => \Elementor\Controls_Manager::COLOR,
|
685 |
+
'scheme' => [
|
686 |
+
'type' => \Elementor\Scheme_Color::get_type(),
|
687 |
+
'value' => \Elementor\Scheme_Color::COLOR_1,
|
688 |
+
],
|
689 |
+
'default' => '#b1b3c0',
|
690 |
+
'selectors' => [
|
691 |
+
'{{WRAPPER}} .obfx-pricing-table-feature' => 'color: {{VALUE}};',
|
692 |
+
],
|
693 |
+
]
|
694 |
+
);
|
695 |
+
|
696 |
+
$this->add_group_control(
|
697 |
+
\Elementor\Group_Control_Typography::get_type(),
|
698 |
+
[
|
699 |
+
'name' => 'features_features_typography',
|
700 |
+
'scheme' => \Elementor\Scheme_Typography::TYPOGRAPHY_1,
|
701 |
+
'selector' => '{{WRAPPER}} .obfx-pricing-table-feature',
|
702 |
+
]
|
703 |
+
);
|
704 |
+
|
705 |
+
$this->add_control(
|
706 |
+
'features_icons_heading',
|
707 |
+
[
|
708 |
+
'label' => __( 'Icons', 'elementor-addon-widgets' ),
|
709 |
+
'type' => \Elementor\Controls_Manager::HEADING,
|
710 |
+
'separator' => 'before',
|
711 |
+
]
|
712 |
+
);
|
713 |
+
|
714 |
+
$this->add_control(
|
715 |
+
'features_icon_color',
|
716 |
+
[
|
717 |
+
'label' => __( 'Icon Color', 'elementor-addon-widgets' ),
|
718 |
+
'type' => \Elementor\Controls_Manager::COLOR,
|
719 |
+
'scheme' => [
|
720 |
+
'type' => \Elementor\Scheme_Color::get_type(),
|
721 |
+
'value' => \Elementor\Scheme_Color::COLOR_1,
|
722 |
+
],
|
723 |
+
'default' => '#b1b3c0',
|
724 |
+
'selectors' => [
|
725 |
+
'{{WRAPPER}} .obfx-pricing-table-feature-icon' => 'color: {{VALUE}};',
|
726 |
+
],
|
727 |
+
]
|
728 |
+
);
|
729 |
+
|
730 |
+
$this->add_control(
|
731 |
+
'features_icon_indent',
|
732 |
+
[
|
733 |
+
'type' => \Elementor\Controls_Manager::SLIDER,
|
734 |
+
'label' => __( 'Icon Spacing', 'elementor-addon-widgets' ),
|
735 |
+
'default' => [
|
736 |
+
'size' => 5,
|
737 |
+
],
|
738 |
+
'range' => [
|
739 |
+
'px' => [
|
740 |
+
'max' => 50,
|
741 |
+
],
|
742 |
+
],
|
743 |
+
'selectors' => [
|
744 |
+
'{{WRAPPER}} i.obfx-pricing-table-feature-icon' => 'margin-right: {{SIZE}}{{UNIT}};',
|
745 |
+
],
|
746 |
+
]
|
747 |
+
);
|
748 |
+
|
749 |
+
$this->end_controls_section(); // end section_features_style
|
750 |
+
}
|
751 |
+
|
752 |
+
/**
|
753 |
+
* Style > Button section.
|
754 |
+
*/
|
755 |
+
private function button_style_section() {
|
756 |
+
$this->start_controls_section(
|
757 |
+
'section_button_style',
|
758 |
+
[
|
759 |
+
'label' => __( 'Button', 'elementor-addon-widgets' ),
|
760 |
+
'tab' => \Elementor\Controls_Manager::TAB_STYLE,
|
761 |
+
]
|
762 |
+
);
|
763 |
+
|
764 |
+
$this->add_group_control(
|
765 |
+
\Elementor\Group_Control_Background::get_type(), [
|
766 |
+
'name' => 'button_section_bg',
|
767 |
+
'label' => __( 'Section Background', 'elementor-addon-widgets' ),
|
768 |
+
'types' => [ 'classic', 'gradient' ],
|
769 |
+
'selector' => '{{WRAPPER}} .obfx-pricing-table-button-wrapper',
|
770 |
+
]
|
771 |
+
);
|
772 |
+
|
773 |
+
$this->add_group_control(
|
774 |
+
\Elementor\Group_Control_Typography::get_type(),
|
775 |
+
[
|
776 |
+
'name' => 'typography',
|
777 |
+
'label' => __( 'Typography', 'elementor-addon-widgets' ),
|
778 |
+
'scheme' => \Elementor\Scheme_Typography::TYPOGRAPHY_4,
|
779 |
+
'selector' => '{{WRAPPER}} .obfx-pricing-table-button-wrapper',
|
780 |
+
]
|
781 |
+
);
|
782 |
+
|
783 |
+
$this->add_control(
|
784 |
+
'border_radius',
|
785 |
+
[
|
786 |
+
'label' => __( 'Border Radius', 'elementor-addon-widgets' ),
|
787 |
+
'type' => \Elementor\Controls_Manager::DIMENSIONS,
|
788 |
+
'size_units' => [ 'px', '%' ],
|
789 |
+
'selectors' => [
|
790 |
+
'{{WRAPPER}} .obfx-pricing-table-button' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
791 |
+
],
|
792 |
+
]
|
793 |
+
);
|
794 |
+
|
795 |
+
$this->add_control(
|
796 |
+
'text_padding',
|
797 |
+
[
|
798 |
+
'label' => __( 'Padding', 'elementor-addon-widgets' ),
|
799 |
+
'type' => \Elementor\Controls_Manager::DIMENSIONS,
|
800 |
+
'size_units' => [ 'px', 'em', '%' ],
|
801 |
+
'selectors' => [
|
802 |
+
'{{WRAPPER}} .obfx-pricing-table-button' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
803 |
+
],
|
804 |
+
]
|
805 |
+
);
|
806 |
+
|
807 |
+
// Add the tabbed control.
|
808 |
+
$this->tabbed_button_controls();
|
809 |
+
|
810 |
+
$this->end_controls_section(); // end section_button_style
|
811 |
+
}
|
812 |
+
|
813 |
+
/**
|
814 |
+
* Tabs for the Style > Button section.
|
815 |
+
*/
|
816 |
+
private function tabbed_button_controls() {
|
817 |
+
$this->start_controls_tabs( 'tabs_background' );
|
818 |
+
|
819 |
+
$this->start_controls_tab(
|
820 |
+
'tab_background_normal',
|
821 |
+
[
|
822 |
+
'label' => __( 'Normal', 'elementor-addon-widgets' ),
|
823 |
+
]
|
824 |
+
);
|
825 |
+
|
826 |
+
$this->add_control(
|
827 |
+
'button_text_color',
|
828 |
+
[
|
829 |
+
'type' => \Elementor\Controls_Manager::COLOR,
|
830 |
+
'label' => __( 'Text Color', 'elementor-addon-widgets' ),
|
831 |
+
'scheme' => [
|
832 |
+
'type' => \Elementor\Scheme_Color::get_type(),
|
833 |
+
'value' => \Elementor\Scheme_Color::COLOR_1,
|
834 |
+
],
|
835 |
+
'default' => '#fff',
|
836 |
+
'selectors' => [
|
837 |
+
'{{WRAPPER}} .obfx-pricing-table-button' => 'color: {{VALUE}};',
|
838 |
+
],
|
839 |
+
]
|
840 |
+
);
|
841 |
+
$this->add_control(
|
842 |
+
'button_bg_color',
|
843 |
+
[
|
844 |
+
'type' => \Elementor\Controls_Manager::COLOR,
|
845 |
+
'label' => __( 'Background Color', 'elementor-addon-widgets' ),
|
846 |
+
'scheme' => [
|
847 |
+
'type' => \Elementor\Scheme_Color::get_type(),
|
848 |
+
'value' => \Elementor\Scheme_Color::COLOR_1,
|
849 |
+
],
|
850 |
+
'default' => '#93c64f',
|
851 |
+
'selectors' => [
|
852 |
+
'{{WRAPPER}} .obfx-pricing-table-button' => 'background-color: {{VALUE}};',
|
853 |
+
],
|
854 |
+
]
|
855 |
+
);
|
856 |
+
|
857 |
+
$this->add_group_control(
|
858 |
+
\Elementor\Group_Control_Box_Shadow::get_type(),
|
859 |
+
[
|
860 |
+
'name' => 'button_box_shadow',
|
861 |
+
'selector' => '{{WRAPPER}} .obfx-pricing-table-button',
|
862 |
+
'separator' => '',
|
863 |
+
]
|
864 |
+
);
|
865 |
+
|
866 |
+
$this->end_controls_tab();
|
867 |
+
|
868 |
+
$this->start_controls_tab(
|
869 |
+
'tab_background_hover',
|
870 |
+
[
|
871 |
+
'label' => __( 'Hover', 'elementor-addon-widgets' ),
|
872 |
+
]
|
873 |
+
);
|
874 |
+
|
875 |
+
$this->add_control(
|
876 |
+
'button_hover_text_color',
|
877 |
+
[
|
878 |
+
'type' => \Elementor\Controls_Manager::COLOR,
|
879 |
+
'label' => __( 'Text Color', 'elementor-addon-widgets' ),
|
880 |
+
'scheme' => [
|
881 |
+
'type' => \Elementor\Scheme_Color::get_type(),
|
882 |
+
'value' => \Elementor\Scheme_Color::COLOR_1,
|
883 |
+
],
|
884 |
+
'default' => '#fff',
|
885 |
+
'selectors' => [
|
886 |
+
'{{WRAPPER}} .obfx-pricing-table-button:hover' => 'color: {{VALUE}};',
|
887 |
+
],
|
888 |
+
]
|
889 |
+
);
|
890 |
+
$this->add_control(
|
891 |
+
'button_hover_bg_color',
|
892 |
+
[
|
893 |
+
'type' => \Elementor\Controls_Manager::COLOR,
|
894 |
+
'label' => __( 'Background Color', 'elementor-addon-widgets' ),
|
895 |
+
'scheme' => [
|
896 |
+
'type' => \Elementor\Scheme_Color::get_type(),
|
897 |
+
'value' => \Elementor\Scheme_Color::COLOR_1,
|
898 |
+
],
|
899 |
+
'default' => '#74c600',
|
900 |
+
'selectors' => [
|
901 |
+
'{{WRAPPER}} .obfx-pricing-table-button:hover' => 'background-color: {{VALUE}};',
|
902 |
+
],
|
903 |
+
]
|
904 |
+
);
|
905 |
+
|
906 |
+
$this->add_group_control(
|
907 |
+
\Elementor\Group_Control_Box_Shadow::get_type(),
|
908 |
+
[
|
909 |
+
'name' => 'button_hover_box_shadow',
|
910 |
+
'selector' => '{{WRAPPER}} .obfx-pricing-table-button:hover',
|
911 |
+
'separator' => '',
|
912 |
+
]
|
913 |
+
);
|
914 |
+
|
915 |
+
$this->add_control(
|
916 |
+
'background_hover_transition',
|
917 |
+
[
|
918 |
+
'label' => __( 'Transition Duration', 'elementor-addon-widgets' ),
|
919 |
+
'type' => \Elementor\Controls_Manager::SLIDER,
|
920 |
+
'default' => [
|
921 |
+
'size' => 0.3,
|
922 |
+
],
|
923 |
+
'range' => [
|
924 |
+
'px' => [
|
925 |
+
'max' => 3,
|
926 |
+
'step' => 0.1,
|
927 |
+
],
|
928 |
+
],
|
929 |
+
'render_type' => 'ui',
|
930 |
+
'selectors' => [
|
931 |
+
'{{WRAPPER}} .obfx-pricing-table-button' => 'transition: all {{SIZE}}s ease;',
|
932 |
+
],
|
933 |
+
]
|
934 |
+
);
|
935 |
+
|
936 |
+
$this->end_controls_tab();
|
937 |
+
|
938 |
+
$this->end_controls_tabs();
|
939 |
+
}
|
940 |
+
|
941 |
+
/**
|
942 |
+
* Render function to output the pricing table.
|
943 |
+
*/
|
944 |
+
protected function render() {
|
945 |
+
$settings = $this->get_settings();
|
946 |
+
|
947 |
+
$this->maybe_load_widget_style();
|
948 |
+
|
949 |
+
$this->add_render_attribute( 'title', 'class', 'obfx-pricing-table-title' );
|
950 |
+
$this->add_render_attribute( 'subtitle', 'class', 'obfx-pricing-table-subtitle' );
|
951 |
+
$this->add_render_attribute( 'button', 'class', 'obfx-pricing-table-button' );
|
952 |
+
$this->add_render_attribute( 'button_icon', 'class', $settings['button_icon'] );
|
953 |
+
$this->add_render_attribute( 'button_icon_align', 'class', 'obfx-button-icon-align-' . $settings['button_icon_align'] );
|
954 |
+
if ( ! empty( $settings['button_link']['url'] ) ) {
|
955 |
+
$this->add_render_attribute( 'button', 'href', $settings['button_link']['url'] );
|
956 |
+
|
957 |
+
if ( ! empty( $settings['button_link']['is_external'] ) ) {
|
958 |
+
$this->add_render_attribute( 'button', 'target', '_blank' );
|
959 |
+
}
|
960 |
+
if ( ! empty( $settings['button_link']['nofollow'] ) ) {
|
961 |
+
$this->add_render_attribute( 'button', 'rel', 'nofollow' );
|
962 |
+
}
|
963 |
+
}
|
964 |
+
|
965 |
+
$output = '';
|
966 |
+
|
967 |
+
$output .= '<div class="obfx-pricing-table-wrapper">';
|
968 |
+
|
969 |
+
if ( ! empty( $settings['title'] ) || ! empty( $settings['subtitle'] ) ) {
|
970 |
+
$output .= '<div class="obfx-title-wrapper">';
|
971 |
+
if ( ! empty( $settings['title'] ) ) {
|
972 |
+
// Start of title tag.
|
973 |
+
$output .= '<' . esc_html( $settings['title_tag'] ) . ' ' . $this->get_render_attribute_string( 'title' ) . '>';
|
974 |
+
|
975 |
+
// Title string.
|
976 |
+
$output .= esc_html( $settings['title'] );
|
977 |
+
|
978 |
+
// End of title tag.
|
979 |
+
$output .= '</' . esc_html( $settings['title_tag'] ) . '>';
|
980 |
+
}
|
981 |
+
if ( ! empty( $settings['subtitle'] ) ) {
|
982 |
+
// Start of subtitle tag.
|
983 |
+
$output .= '<' . esc_html( $settings['subtitle_tag'] ) . ' ' . $this->get_render_attribute_string( 'subtitle' ) . '>';
|
984 |
+
|
985 |
+
// Subtitle string.
|
986 |
+
$output .= esc_html( $settings['subtitle'] );
|
987 |
+
|
988 |
+
// End of subtitle tag.
|
989 |
+
$output .= '</' . esc_html( $settings['subtitle_tag'] ) . '>';
|
990 |
+
|
991 |
+
}
|
992 |
+
|
993 |
+
$output .= '</div> <!-- /.obfx-title-wrapper -->';
|
994 |
+
}
|
995 |
+
|
996 |
+
if ( ! empty( $settings['price_tag_text'] ) || ! empty( $settings['price_tag_currency'] ) || ! empty( $settings['price_tag_period'] ) ) {
|
997 |
+
$output .= '<div class="obfx-price-wrapper">';
|
998 |
+
|
999 |
+
if ( ! empty( $settings['price_tag_currency'] ) && ( $settings['price_tag_currency_position'] == 'left' ) ) {
|
1000 |
+
$output .= '<span class="obfx-price-currency">' . esc_html( $settings['price_tag_currency'] ) . '</span>';
|
1001 |
+
}
|
1002 |
+
|
1003 |
+
if ( ( isset( $settings['price_tag_text'] ) && $settings['price_tag_text'] === '0' ) || ! empty( $settings['price_tag_text'] ) ) {
|
1004 |
+
$output .= '<span class="obfx-price">' . esc_html( $settings['price_tag_text'] ) . '</span>';
|
1005 |
+
}
|
1006 |
+
|
1007 |
+
if ( ! empty( $settings['price_tag_currency'] ) && ( $settings['price_tag_currency_position'] == 'right' ) ) {
|
1008 |
+
$output .= '<span class="obfx-price-currency">' . esc_html( $settings['price_tag_currency'] ) . '</span>';
|
1009 |
+
}
|
1010 |
+
|
1011 |
+
if ( ! empty( $settings['price_tag_period'] ) ) {
|
1012 |
+
$output .= '<span class="obfx-pricing-period">' . esc_html( $settings['price_tag_period'] ) . '</span>';
|
1013 |
+
}
|
1014 |
+
|
1015 |
+
$output .= '</div> <!-- /.obfx-price-wrapper -->';
|
1016 |
+
}
|
1017 |
+
|
1018 |
+
if ( count( $settings['feature_list'] ) ) {
|
1019 |
+
$output .= '<ul class="obfx-feature-list">';
|
1020 |
+
foreach ( $settings['feature_list'] as $feature ) {
|
1021 |
+
$output .= '<li>';
|
1022 |
+
if ( ! empty( $feature['feature_icon'] ) ) {
|
1023 |
+
$output .= '<i class="obfx-pricing-table-feature-icon ' . esc_attr( $feature['feature_icon'] ) . '"></i>';
|
1024 |
+
}
|
1025 |
+
if ( ! empty( $feature['accent'] ) ) {
|
1026 |
+
$output .= '<span class="obfx-pricing-table-accented">' . esc_html( $feature['accent'] ) . '</span>';
|
1027 |
+
$output .= ' ';
|
1028 |
+
}
|
1029 |
+
if ( ! empty( $feature['text'] ) ) {
|
1030 |
+
$output .= '<span class="obfx-pricing-table-feature">' . esc_html( $feature['text'] ) . '</span>';
|
1031 |
+
}
|
1032 |
+
$output .= '</li>';
|
1033 |
+
}
|
1034 |
+
$output .= '</ul>';
|
1035 |
+
}
|
1036 |
+
|
1037 |
+
if ( ! empty( $settings['button_text'] ) ) {
|
1038 |
+
$output .= '<div class="obfx-pricing-table-button-wrapper">';
|
1039 |
+
|
1040 |
+
$output .= '<a ' . $this->get_render_attribute_string( 'button' ) . '>';
|
1041 |
+
|
1042 |
+
if ( ! empty( $settings['button_icon'] ) && ( $settings['button_icon_align'] == 'left' ) ) {
|
1043 |
+
$output .= '<span ' . $this->get_render_attribute_string( 'button_icon_align' ) . ' >';
|
1044 |
+
$output .= '<i ' . $this->get_render_attribute_string( 'button_icon' ) . '></i>';
|
1045 |
+
}
|
1046 |
+
|
1047 |
+
$output .= '<span class="elementor-button-text">' . esc_html( $settings['button_text'] ) . '</span>';
|
1048 |
+
|
1049 |
+
if ( ! empty( $settings['button_icon'] ) && ( $settings['button_icon_align'] == 'right' ) ) {
|
1050 |
+
$output .= '<span ' . $this->get_render_attribute_string( 'button_icon_align' ) . ' >';
|
1051 |
+
$output .= '<i ' . $this->get_render_attribute_string( 'button_icon' ) . '></i>';
|
1052 |
+
}
|
1053 |
+
|
1054 |
+
$output .= '</a>';
|
1055 |
+
$output .= '</div> <!-- /.obfx-pricing-table-button-wrapper -->';
|
1056 |
+
|
1057 |
+
}
|
1058 |
+
$output .= '</div> <!-- /.obfx-pricing-table-wrapper -->';
|
1059 |
+
|
1060 |
+
echo $output;
|
1061 |
+
}
|
1062 |
+
|
1063 |
+
/**
|
1064 |
+
* Load the widget style dynamically if it is a widget preview
|
1065 |
+
* or enqueue style and scripts if not
|
1066 |
+
*
|
1067 |
+
* This way we are sure that the assets files are loaded only when this block is present in page.
|
1068 |
+
*/
|
1069 |
+
protected function maybe_load_widget_style() {
|
1070 |
+
if ( \Elementor\Plugin::$instance->editor->is_edit_mode() === true && apply_filters( 'themeisle_content_forms_register_default_style', true ) ) { ?>
|
1071 |
+
<style>
|
1072 |
+
<?php echo file_get_contents( plugin_dir_path( dirname( dirname(__FILE__ ) ) ) . 'css/public.css' ) ?>
|
1073 |
+
</style>
|
1074 |
+
<?php
|
1075 |
+
} else {
|
1076 |
+
wp_enqueue_style('eaw-elementor');
|
1077 |
+
}
|
1078 |
+
}
|
1079 |
+
}
|
1080 |
+
|
vendor/codeinwp/elementor-extra-widgets/widgets/elementor/services.php
ADD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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Services widget for Elementor builder
|
4 |
+
*
|
5 |
+
* @link https://themeisle.com
|
6 |
+
* @since 1.0.0
|
7 |
+
*
|
8 |
+
* @package ThemeIsle\ElementorExtraWidgets
|
9 |
+
*/
|
10 |
+
namespace ThemeIsle\ElementorExtraWidgets;
|
11 |
+
|
12 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
13 |
+
exit;
|
14 |
+
} // End if().
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Class Services
|
18 |
+
*
|
19 |
+
* @package ThemeIsle\ElementorExtraWidgets
|
20 |
+
*/
|
21 |
+
class Services extends \Elementor\Widget_Base {
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Widget name.
|
25 |
+
*
|
26 |
+
* @return string
|
27 |
+
*/
|
28 |
+
public function get_name() {
|
29 |
+
return 'obfx-services';
|
30 |
+
}
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Widget title.
|
34 |
+
*
|
35 |
+
* @return string
|
36 |
+
*/
|
37 |
+
public function get_title() {
|
38 |
+
return __( 'Services', 'elementor-addon-widgets' );
|
39 |
+
}
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Widget icon.
|
43 |
+
*
|
44 |
+
* @return string
|
45 |
+
*/
|
46 |
+
public function get_icon() {
|
47 |
+
return 'fa fa-diamond';
|
48 |
+
}
|
49 |
+
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Widget Category
|
53 |
+
*
|
54 |
+
* @return array
|
55 |
+
*/
|
56 |
+
public function get_categories() {
|
57 |
+
$category_args = apply_filters( 'elementor_extra_widgets_category_args', array() );
|
58 |
+
$slug = isset( $category_args['slug'] ) ? $category_args['slug'] : 'obfx-elementor-widgets';
|
59 |
+
return [ $slug ];
|
60 |
+
}
|
61 |
+
|
62 |
+
/**
|
63 |
+
* Register Elementor Controls
|
64 |
+
*/
|
65 |
+
protected function _register_controls() {
|
66 |
+
$this->services_content();
|
67 |
+
$this->style_icon();
|
68 |
+
$this->style_grid_options();
|
69 |
+
}
|
70 |
+
|
71 |
+
/**
|
72 |
+
* Content controls
|
73 |
+
*/
|
74 |
+
private function services_content() {
|
75 |
+
$this->start_controls_section(
|
76 |
+
'section_content',
|
77 |
+
[
|
78 |
+
'label' => __( 'Services', 'elementor-addon-widgets' ),
|
79 |
+
]
|
80 |
+
);
|
81 |
+
|
82 |
+
$this->add_control(
|
83 |
+
'services_list',
|
84 |
+
[
|
85 |
+
'label' => __( 'Services', 'elementor-addon-widgets' ),
|
86 |
+
'type' => \Elementor\Controls_Manager::REPEATER,
|
87 |
+
'default' => [
|
88 |
+
[
|
89 |
+
'title' => __( 'Award-Winning', 'elementor-addon-widgets' ),
|
90 |
+
'text' => __( 'Add some text here to describe your services to the page visitors.', 'elementor-addon-widgets' ),
|
91 |
+
'icon' => 'fa fa-trophy',
|
92 |
+
'color' => '#333333',
|
93 |
+
'type' => 'icon',
|
94 |
+
],
|
95 |
+
[
|
96 |
+
'title' => __( 'Professional', 'elementor-addon-widgets' ),
|
97 |
+
'text' => __( 'Add some text here to describe your services to the page visitors.', 'elementor-addon-widgets' ),
|
98 |
+
'icon' => 'fa fa-suitcase',
|
99 |
+
'color' => '#333333',
|
100 |
+
'type' => 'icon',
|
101 |
+
],
|
102 |
+
[
|
103 |
+
'title' => __( 'Consulting', 'elementor-addon-widgets' ),
|
104 |
+
'text' => __( 'Add some text here to describe your services to the page visitors.', 'elementor-addon-widgets' ),
|
105 |
+
'icon' => 'fa fa-handshake-o',
|
106 |
+
'color' => '#333333',
|
107 |
+
'type' => 'icon',
|
108 |
+
],
|
109 |
+
],
|
110 |
+
'fields' => [
|
111 |
+
[
|
112 |
+
'type' => \Elementor\Controls_Manager::CHOOSE,
|
113 |
+
'name' => 'type',
|
114 |
+
'label_block' => true,
|
115 |
+
'label' => __( 'Type', 'elementor-addon-widgets' ),
|
116 |
+
'default' => 'icon',
|
117 |
+
'options' => [
|
118 |
+
'icon' => [
|
119 |
+
'title' => __( 'Icon', 'elementor-addon-widgets' ),
|
120 |
+
'icon' => 'fa fa-diamond',
|
121 |
+
],
|
122 |
+
'image' => [
|
123 |
+
'title' => __( 'Image', 'elementor-addon-widgets' ),
|
124 |
+
'icon' => 'fa fa-photo',
|
125 |
+
],
|
126 |
+
],
|
127 |
+
],
|
128 |
+
[
|
129 |
+
'type' => \Elementor\Controls_Manager::TEXT,
|
130 |
+
'name' => 'title',
|
131 |
+
'label_block' => true,
|
132 |
+
'label' => __( 'Title & Description', 'elementor-addon-widgets' ),
|
133 |
+
'default' => __( 'Service Title', 'elementor-addon-widgets' ),
|
134 |
+
],
|
135 |
+
[
|
136 |
+
'type' => \Elementor\Controls_Manager::TEXTAREA,
|
137 |
+
'name' => 'text',
|
138 |
+
'placeholder' => __( 'Plan Features', 'elementor-addon-widgets' ),
|
139 |
+
'default' => __( 'Feature', 'elementor-addon-widgets' ),
|
140 |
+
],
|
141 |
+
[
|
142 |
+
'type' => \Elementor\Controls_Manager::ICON,
|
143 |
+
'name' => 'icon',
|
144 |
+
'label' => __( 'Icon', 'elementor-addon-widgets' ),
|
145 |
+
'default' => 'fa fa-diamond',
|
146 |
+
'condition' => [
|
147 |
+
'type' => 'icon',
|
148 |
+
],
|
149 |
+
],
|
150 |
+
[
|
151 |
+
'type' => \Elementor\Controls_Manager::COLOR,
|
152 |
+
'name' => 'color',
|
153 |
+
'label_block' => false,
|
154 |
+
'label' => __( 'Icon Color', 'elementor-addon-widgets' ),
|
155 |
+
'default' => '#333333',
|
156 |
+
'condition' => [
|
157 |
+
'type' => 'icon',
|
158 |
+
],
|
159 |
+
],
|
160 |
+
[
|
161 |
+
'type' => \Elementor\Controls_Manager::MEDIA,
|
162 |
+
'name' => 'image',
|
163 |
+
'label' => __( 'Image', 'elementor-addon-widgets' ),
|
164 |
+
'condition' => [
|
165 |
+
'type' => 'image',
|
166 |
+
],
|
167 |
+
],
|
168 |
+
[
|
169 |
+
'type' => \Elementor\Controls_Manager::URL,
|
170 |
+
'name' => 'link',
|
171 |
+
'label' => __( 'Link to', 'elementor-addon-widgets' ),
|
172 |
+
'separator' => 'before',
|
173 |
+
'placeholder' => __( 'https://example.com', 'elementor-addon-widgets' ),
|
174 |
+
],
|
175 |
+
],
|
176 |
+
'title_field' => '{{title}}',
|
177 |
+
]
|
178 |
+
);
|
179 |
+
|
180 |
+
$this->add_control(
|
181 |
+
'align',
|
182 |
+
[
|
183 |
+
'label' => '<i class="fa fa-arrows"></i> ' . __( 'Icon Position', 'elementor-addon-widgets' ),
|
184 |
+
'type' => \Elementor\Controls_Manager::CHOOSE,
|
185 |
+
'options' => [
|
186 |
+
'left' => [
|
187 |
+
'title' => __( 'Left', 'elementor-addon-widgets' ),
|
188 |
+
'icon' => 'fa fa-angle-left',
|
189 |
+
],
|
190 |
+
'top' => [
|
191 |
+
'title' => __( 'Top', 'elementor-addon-widgets' ),
|
192 |
+
'icon' => 'fa fa-angle-up',
|
193 |
+
],
|
194 |
+
'right' => [
|
195 |
+
'title' => __( 'Right', 'elementor-addon-widgets' ),
|
196 |
+
'icon' => 'fa fa-angle-right',
|
197 |
+
],
|
198 |
+
],
|
199 |
+
'default' => 'top',
|
200 |
+
'prefix_class' => 'obfx-position-',
|
201 |
+
'toggle' => false,
|
202 |
+
]
|
203 |
+
);
|
204 |
+
|
205 |
+
// Columns.
|
206 |
+
$this->add_responsive_control(
|
207 |
+
'grid_columns',
|
208 |
+
[
|
209 |
+
'type' => \Elementor\Controls_Manager::SELECT,
|
210 |
+
'label' => '<i class="fa fa-columns"></i> ' . __( 'Columns', 'elementor-addon-widgets' ),
|
211 |
+
'default' => 3,
|
212 |
+
'tablet_default' => 2,
|
213 |
+
'mobile_default' => 1,
|
214 |
+
'options' => [
|
215 |
+
1 => 1,
|
216 |
+
2 => 2,
|
217 |
+
3 => 3,
|
218 |
+
4 => 4,
|
219 |
+
5 => 5,
|
220 |
+
],
|
221 |
+
]
|
222 |
+
);
|
223 |
+
$this->end_controls_section();
|
224 |
+
}
|
225 |
+
|
226 |
+
/**
|
227 |
+
* Icon Style Controls
|
228 |
+
*/
|
229 |
+
private function style_icon() {
|
230 |
+
$this->start_controls_section(
|
231 |
+
'section_style_icon',
|
232 |
+
[
|
233 |
+
'label' => __( 'Icon / Image', 'elementor-addon-widgets' ),
|
234 |
+
'tab' => \Elementor\Controls_Manager::TAB_STYLE,
|
235 |
+
]
|
236 |
+
);
|
237 |
+
$this->add_control(
|
238 |
+
'icon_space',
|
239 |
+
[
|
240 |
+
'label' => __( 'Spacing', 'elementor-addon-widgets' ),
|
241 |
+
'type' => \Elementor\Controls_Manager::SLIDER,
|
242 |
+
'default' => [
|
243 |
+
'size' => 15,
|
244 |
+
],
|
245 |
+
'range' => [
|
246 |
+
'px' => [
|
247 |
+
'min' => 0,
|
248 |
+
'max' => 300,
|
249 |
+
],
|
250 |
+
],
|
251 |
+
'selectors' => [
|
252 |
+
'{{WRAPPER}}.obfx-position-right .obfx-icon, {{WRAPPER}}.obfx-position-right .obfx-image' => 'margin-left: {{SIZE}}{{UNIT}};',
|
253 |
+
'{{WRAPPER}}.obfx-position-left .obfx-icon, {{WRAPPER}}.obfx-position-left .obfx-image' => 'margin-right: {{SIZE}}{{UNIT}};',
|
254 |
+
'{{WRAPPER}}.obfx-position-top .obfx-icon, {{WRAPPER}}.obfx-position-top .obfx-image' => 'margin-bottom: {{SIZE}}{{UNIT}};',
|
255 |
+
],
|
256 |
+
]
|
257 |
+
);
|
258 |
+
$this->add_control(
|
259 |
+
'icon_size',
|
260 |
+
[
|
261 |
+
'label' => __( 'Size', 'elementor-addon-widgets' ),
|
262 |
+
'type' => \Elementor\Controls_Manager::SLIDER,
|
263 |
+
'range' => [
|
264 |
+
'px' => [
|
265 |
+
'min' => 6,
|
266 |
+
'max' => 300,
|
267 |
+
],
|
268 |
+
],
|
269 |
+
'default' => [
|
270 |
+
'size' => 35,
|
271 |
+
],
|
272 |
+
'selectors' => [
|
273 |
+
'{{WRAPPER}} .obfx-icon' => 'font-size: {{SIZE}}{{UNIT}};',
|
274 |
+
'{{WRAPPER}} .obfx-image' => 'max-width: {{SIZE}}{{UNIT}};',
|
275 |
+
],
|
276 |
+
]
|
277 |
+
);
|
278 |
+
$this->end_controls_section();
|
279 |
+
$this->start_controls_section(
|
280 |
+
'section_style_content',
|
281 |
+
[
|
282 |
+
'label' => __( 'Content', 'elementor-addon-widgets' ),
|
283 |
+
'tab' => \Elementor\Controls_Manager::TAB_STYLE,
|
284 |
+
]
|
285 |
+
);
|
286 |
+
|
287 |
+
$this->add_responsive_control(
|
288 |
+
'text_align',
|
289 |
+
[
|
290 |
+
'label' => __( 'Alignment', 'elementor-addon-widgets' ),
|
291 |
+
'type' => \Elementor\Controls_Manager::CHOOSE,
|
292 |
+
'toggle' => false,
|
293 |
+
'default' => 'center',
|
294 |
+
'options' => [
|
295 |
+
'left' => [
|
296 |
+
'title' => __( 'Left', 'elementor-addon-widgets' ),
|
297 |
+
'icon' => 'fa fa-align-left',
|
298 |
+
],
|
299 |
+
'center' => [
|
300 |
+
'title' => __( 'Center', 'elementor-addon-widgets' ),
|
301 |
+
'icon' => 'fa fa-align-center',
|
302 |
+
],
|
303 |
+
'right' => [
|
304 |
+
'title' => __( 'Right', 'elementor-addon-widgets' ),
|
305 |
+
'icon' => 'fa fa-align-right',
|
306 |
+
],
|
307 |
+
],
|
308 |
+
'selectors' => [
|
309 |
+
'{{WRAPPER}} .obfx-grid .obfx-grid-container .obfx-grid-wrapper .obfx-service-box' => 'text-align: {{VALUE}}; justify-content: {{VALUE}};',
|
310 |
+
'{{WRAPPER}} .obfx-grid .obfx-grid-container .obfx-grid-wrapper .obfx-service-box .obfx-service-text' => 'text-align: {{VALUE}};',
|
311 |
+
],
|
312 |
+
]
|
313 |
+
);
|
314 |
+
|
315 |
+
$this->add_control(
|
316 |
+
'heading_title',
|
317 |
+
[
|
318 |
+
'label' => __( 'Title', 'elementor-addon-widgets' ),
|
319 |
+
'type' => \Elementor\Controls_Manager::HEADING,
|
320 |
+
'separator' => 'before',
|
321 |
+
]
|
322 |
+
);
|
323 |
+
|
324 |
+
$this->add_responsive_control(
|
325 |
+
'title_bottom_space',
|
326 |
+
[
|
327 |
+
'label' => __( 'Spacing', 'elementor-addon-widgets' ),
|
328 |
+
'type' => \Elementor\Controls_Manager::SLIDER,
|
329 |
+
'range' => [
|
330 |
+
'px' => [
|
331 |
+
'min' => 0,
|
332 |
+
'max' => 300,
|
333 |
+
],
|
334 |
+
],
|
335 |
+
'selectors' => [
|
336 |
+
'{{WRAPPER}} .obfx-service-title' => 'margin-bottom: {{SIZE}}{{UNIT}};',
|
337 |
+
],
|
338 |
+
]
|
339 |
+
);
|
340 |
+
|
341 |
+
$this->add_control(
|
342 |
+
'title_color',
|
343 |
+
[
|
344 |
+
'label' => __( 'Color', 'elementor-addon-widgets' ),
|
345 |
+
'type' => \Elementor\Controls_Manager::COLOR,
|
346 |
+
'default' => '',
|
347 |
+
'selectors' => [
|
348 |
+
'{{WRAPPER}} .obfx-service-title' => 'color: {{VALUE}};',
|
349 |
+
],
|
350 |
+
]
|
351 |
+
);
|
352 |
+
|
353 |
+
$this->add_group_control(
|
354 |
+
\Elementor\Group_Control_Typography::get_type(),
|
355 |
+
[
|
356 |
+
'name' => 'title_typography',
|
357 |
+
'selector' => '{{WRAPPER}} .obfx-service-title',
|
358 |
+
'scheme' => \Elementor\Scheme_Typography::TYPOGRAPHY_1,
|
359 |
+
]
|
360 |
+
);
|
361 |
+
|
362 |
+
$this->add_control(
|
363 |
+
'heading_description',
|
364 |
+
[
|
365 |
+
'label' => __( 'Description', 'elementor-addon-widgets' ),
|
366 |
+
'type' => \Elementor\Controls_Manager::HEADING,
|
367 |
+
'separator' => 'before',
|
368 |
+
]
|
369 |
+
);
|
370 |
+
|
371 |
+
$this->add_control(
|
372 |
+
'description_color',
|
373 |
+
[
|
374 |
+
'label' => __( 'Color', 'elementor-addon-widgets' ),
|
375 |
+
'type' => \Elementor\Controls_Manager::COLOR,
|
376 |
+
'default' => '',
|
377 |
+
'selectors' => [
|
378 |
+
'{{WRAPPER}} .obfx-service-text' => 'color: {{VALUE}};',
|
379 |
+
],
|
380 |
+
'scheme' => [
|
381 |
+
'type' => \Elementor\Scheme_Color::get_type(),
|
382 |
+
'value' => \Elementor\Scheme_Color::COLOR_3,
|
383 |
+
],
|
384 |
+
]
|
385 |
+
);
|
386 |
+
|
387 |
+
$this->add_group_control(
|
388 |
+
\Elementor\Group_Control_Typography::get_type(),
|
389 |
+
[
|
390 |
+
'name' => 'description_typography',
|
391 |
+
'selector' => '{{WRAPPER}} .obfx-service-text',
|
392 |
+
'scheme' => \Elementor\Scheme_Typography::TYPOGRAPHY_3,
|
393 |
+
]
|
394 |
+
);
|
395 |
+
|
396 |
+
$this->end_controls_section();
|
397 |
+
}
|
398 |
+
|
399 |
+
/**
|
400 |
+
* Grid Style Controls
|
401 |
+
*/
|
402 |
+
private function style_grid_options() {
|
403 |
+
$this->start_controls_section(
|
404 |
+
'section_grid_style',
|
405 |
+
[
|
406 |
+
'label' => __( 'Grid', 'elementor-addon-widgets' ),
|
407 |
+
'tab' => \Elementor\Controls_Manager::TAB_STYLE,
|
408 |
+
]
|
409 |
+
);
|
410 |
+
|
411 |
+
// Columns margin.
|
412 |
+
$this->add_control(
|
413 |
+
'grid_style_columns_margin',
|
414 |
+
[
|
415 |
+
'label' => __( 'Columns margin', 'elementor-addon-widgets' ),
|
416 |
+
'type' => \Elementor\Controls_Manager::SLIDER,
|
417 |
+
'default' => [
|
418 |
+
'size' => 15,
|
419 |
+
],
|
420 |
+
'range' => [
|
421 |
+
'px' => [
|
422 |
+
'min' => 0,
|
423 |
+
'max' => 100,
|
424 |
+
],
|
425 |
+
],
|
426 |
+
'selectors' => [
|
427 |
+
'{{WRAPPER}} .obfx-grid-wrapper' => 'padding-right: calc( {{SIZE}}{{UNIT}} ); padding-left: calc( {{SIZE}}{{UNIT}} );',
|
428 |
+
'{{WRAPPER}} .obfx-grid-container' => 'margin-left: calc( -{{SIZE}}{{UNIT}} ); margin-right: calc( -{{SIZE}}{{UNIT}} );',
|
429 |
+
],
|
430 |
+
]
|
431 |
+
);
|
432 |
+
|
433 |
+
// Row margin.
|
434 |
+
$this->add_control(
|
435 |
+
'grid_style_rows_margin',
|
436 |
+
[
|
437 |
+
'label' => __( 'Rows margin', 'elementor-addon-widgets' ),
|
438 |
+
'type' => \Elementor\Controls_Manager::SLIDER,
|
439 |
+
'default' => [
|
440 |
+
'size' => 30,
|
441 |
+
],
|
442 |
+
'range' => [
|
443 |
+
'px' => [
|
444 |
+
'min' => 0,
|
445 |
+
'max' => 100,
|
446 |
+
],
|
447 |
+
],
|
448 |
+
'selectors' => [
|
449 |
+
'{{WRAPPER}} .obfx-grid-wrapper' => 'padding-bottom: {{SIZE}}{{UNIT}};',
|
450 |
+
],
|
451 |
+
]
|
452 |
+
);
|
453 |
+
|
454 |
+
// Background.
|
455 |
+
$this->add_group_control(
|
456 |
+
\Elementor\Group_Control_Background::get_type(),
|
457 |
+
[
|
458 |
+
'name' => 'grid_style_background',
|
459 |
+
'types' => [ 'classic', 'gradient' ],
|
460 |
+
'selector' => '{{WRAPPER}} .obfx-grid',
|
461 |
+
]
|
462 |
+
);
|
463 |
+
|
464 |
+
// Items options.
|
465 |
+
$this->add_control(
|
466 |
+
'grid_items_style_heading',
|
467 |
+
[
|
468 |
+
'label' => __( 'Items', 'elementor-addon-widgets' ),
|
469 |
+
'type' => \Elementor\Controls_Manager::HEADING,
|
470 |
+
'separator' => 'before',
|
471 |
+
]
|
472 |
+
);
|
473 |
+
|
474 |
+
// Items internal padding.
|
475 |
+
$this->add_control(
|
476 |
+
'grid_items_style_padding',
|
477 |
+
[
|
478 |
+
'label' => __( 'Padding', 'elementor-addon-widgets' ),
|
479 |
+
'type' => \Elementor\Controls_Manager::DIMENSIONS,
|
480 |
+
'size_units' => [ 'px', '%' ],
|
481 |
+
'selectors' => [
|
482 |
+
'{{WRAPPER}} .obfx-grid-col' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
483 |
+
],
|
484 |
+
]
|
485 |
+
);
|
486 |
+
|
487 |
+
// Items border radius.
|
488 |
+
$this->add_control(
|
489 |
+
'grid_items_style_border_radius',
|
490 |
+
[
|
491 |
+
'label' => __( 'Border Radius', 'elementor-addon-widgets' ),
|
492 |
+
'type' => \Elementor\Controls_Manager::DIMENSIONS,
|
493 |
+
'size_units' => [ 'px', '%' ],
|
494 |
+
'selectors' => [
|
495 |
+
'{{WRAPPER}} .obfx-grid-col' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
496 |
+
],
|
497 |
+
]
|
498 |
+
);
|
499 |
+
|
500 |
+
$this->items_style_tabs();
|
501 |
+
$this->end_controls_section();
|
502 |
+
}
|
503 |
+
|
504 |
+
/**
|
505 |
+
* Items Style Controls
|
506 |
+
*/
|
507 |
+
private function items_style_tabs() {
|
508 |
+
$this->start_controls_tabs( 'tabs_background' );
|
509 |
+
|
510 |
+
$this->start_controls_tab(
|
511 |
+
'tab_background_normal',
|
512 |
+
[
|
513 |
+
'label' => __( 'Normal', 'elementor-addon-widgets' ),
|
514 |
+
]
|
515 |
+
);
|
516 |
+
|
517 |
+
$this->add_group_control(
|
518 |
+
\Elementor\Group_Control_Background::get_type(),
|
519 |
+
[
|
520 |
+
'name' => 'grid_items_background',
|
521 |
+
'types' => [ 'classic', 'gradient' ],
|
522 |
+
'selector' => '{{WRAPPER}} .obfx-service-box',
|
523 |
+
]
|
524 |
+
);
|
525 |
+
|
526 |
+
$this->add_group_control(
|
527 |
+
\Elementor\Group_Control_Box_Shadow::get_type(),
|
528 |
+
[
|
529 |
+
'name' => 'grid_items_box_shadow',
|
530 |
+
'selector' => '{{WRAPPER}} .obfx-service-box',
|
531 |
+
]
|
532 |
+
);
|
533 |
+
|
534 |
+
$this->end_controls_tab();
|
535 |
+
|
536 |
+
$this->start_controls_tab(
|
537 |
+
'tab_background_hover',
|
538 |
+
[
|
539 |
+
'label' => __( 'Hover', 'elementor-addon-widgets' ),
|
540 |
+
]
|
541 |
+
);
|
542 |
+
|
543 |
+
$this->add_group_control(
|
544 |
+
\Elementor\Group_Control_Background::get_type(),
|
545 |
+
[
|
546 |
+
'name' => 'grid_items_background_hover',
|
547 |
+
'types' => [ 'classic', 'gradient' ],
|
548 |
+
'selector' => '{{WRAPPER}} .obfx-service-box:hover',
|
549 |
+
]
|
550 |
+
);
|
551 |
+
|
552 |
+
$this->add_group_control(
|
553 |
+
\Elementor\Group_Control_Box_Shadow::get_type(),
|
554 |
+
[
|
555 |
+
'name' => 'grid_items_box_shadow_hover',
|
556 |
+
'selector' => '{{WRAPPER}} .obfx-service-box:hover',
|
557 |
+
]
|
558 |
+
);
|
559 |
+
|
560 |
+
$this->add_control(
|
561 |
+
'hover_transition',
|
562 |
+
[
|
563 |
+
'label' => __( 'Transition Duration', 'elementor-addon-widgets' ),
|
564 |
+
'type' => \Elementor\Controls_Manager::SLIDER,
|
565 |
+
'default' => [
|
566 |
+
'size' => 0.3,
|
567 |
+
],
|
568 |
+
'range' => [
|
569 |
+
'px' => [
|
570 |
+
'max' => 3,
|
571 |
+
'step' => 0.1,
|
572 |
+
],
|
573 |
+
],
|
574 |
+
'selectors' => [
|
575 |
+
'{{WRAPPER}} .obfx-service-box' => 'transition: all {{SIZE}}s ease;',
|
576 |
+
],
|
577 |
+
]
|
578 |
+
);
|
579 |
+
$this->end_controls_tab();
|
580 |
+
|
581 |
+
$this->end_controls_tabs();
|
582 |
+
}
|
583 |
+
|
584 |
+
/**
|
585 |
+
* Render function to output the pricing table.
|
586 |
+
*/
|
587 |
+
protected function render() {
|
588 |
+
$settings = $this->get_settings();
|
589 |
+
|
590 |
+
$this->maybe_load_widget_style();
|
591 |
+
|
592 |
+
echo '<div class="obfx-grid"><div class="obfx-grid-container' . ( ! empty( $settings['grid_columns_mobile'] ) ? ' obfx-grid-mobile-' . $settings['grid_columns_mobile'] : '' ) . ( ! empty( $settings['grid_columns_tablet'] ) ? ' obfx-grid-tablet-' . $settings['grid_columns_tablet'] : '' ) . ( ! empty( $settings['grid_columns'] ) ? ' obfx-grid-desktop-' . $settings['grid_columns'] : '' ) . '">';
|
593 |
+
foreach ( $settings['services_list'] as $service ) {
|
594 |
+
$icon_tag = 'span';
|
595 |
+
|
596 |
+
if ( ! empty( $service['link']['url'] ) ) {
|
597 |
+
$this->add_render_attribute( 'link', 'href', $settings['link']['url'] );
|
598 |
+
$icon_tag = 'a';
|
599 |
+
|
600 |
+
if ( $service['link']['is_external'] ) {
|
601 |
+
$this->add_render_attribute( 'link', 'target', '_blank' );
|
602 |
+
}
|
603 |
+
|
604 |
+
if ( $service['link']['nofollow'] ) {
|
605 |
+
$this->add_render_attribute( 'link', 'rel', 'nofollow' );
|
606 |
+
}
|
607 |
+
} ?>
|
608 |
+
<div class="obfx-grid-wrapper">
|
609 |
+
<?php
|
610 |
+
if ( ! empty( $service['link']['url'] ) ) {
|
611 |
+
$link_props = ' href="' . esc_url( $service['link']['url'] ) . '" ';
|
612 |
+
if ( $service['link']['is_external'] === 'on' ) {
|
613 |
+
$link_props .= ' target="_blank" ';
|
614 |
+
}
|
615 |
+
if ( $service['link']['nofollow'] === 'on' ) {
|
616 |
+
$link_props .= ' rel="nofollow" ';
|
617 |
+
}
|
618 |
+
echo '<a' . $link_props . '>';
|
619 |
+
} ?>
|
620 |
+
<div class="obfx-service-box obfx-grid-col">
|
621 |
+
<?php
|
622 |
+
if ( $service['type'] === 'icon' && ! empty( $service['icon'] ) ) { ?>
|
623 |
+
<span class="obfx-icon-wrap"><i class="obfx-icon <?php echo esc_attr( $service['icon'] ); ?>" style="color: <?php echo esc_attr( $service['color'] ); ?>"></i></span>
|
624 |
+
<?php
|
625 |
+
} elseif ( $service['type'] === 'image' && ! empty( $service['image']['url'] ) ) { ?>
|
626 |
+
<span class="obfx-image-wrap"><img class="obfx-image" src="<?php echo esc_url( $service['image']['url'] ); ?>"/></span>
|
627 |
+
<?php
|
628 |
+
}
|
629 |
+
if ( ! empty( $service['title'] ) || ! empty( $service['text'] ) ) { ?>
|
630 |
+
<div class="obfx-service-box-content">
|
631 |
+
<?php if ( ! empty( $service['title'] ) ) { ?>
|
632 |
+
<h4 class="obfx-service-title"><?php echo esc_attr( $service['title'] ); ?></h4>
|
633 |
+
<?php
|
634 |
+
}
|
635 |
+
if ( ! empty( $service['text'] ) ) { ?>
|
636 |
+
<p class="obfx-service-text"><?php echo esc_attr( $service['text'] ); ?></p>
|
637 |
+
<?php } ?>
|
638 |
+
</div><!-- /.obfx-service-box-content -->
|
639 |
+
<?php } ?>
|
640 |
+
</div><!-- /.obfx-service-box -->
|
641 |
+
<?php
|
642 |
+
if ( ! empty( $service['link'] ) ) {
|
643 |
+
echo '</a>';
|
644 |
+
} ?>
|
645 |
+
</div><!-- /.obfx-grid-wrapper -->
|
646 |
+
<?php
|
647 |
+
}// End foreach().
|
648 |
+
echo '</div></div>';
|
649 |
+
|
650 |
+
}
|
651 |
+
|
652 |
+
/**
|
653 |
+
* Load the widget style dynamically if it is a widget preview
|
654 |
+
* or enqueue style and scripts if not
|
655 |
+
*
|
656 |
+
* This way we are sure that the assets files are loaded only when this block is present in page.
|
657 |
+
*/
|
658 |
+
protected function maybe_load_widget_style() {
|
659 |
+
if ( \Elementor\Plugin::$instance->editor->is_edit_mode() === true && apply_filters( 'themeisle_content_forms_register_default_style', true ) ) { ?>
|
660 |
+
<style>
|
661 |
+
<?php echo file_get_contents( plugin_dir_path( dirname( dirname(__FILE__ ) ) ) . 'css/public.css' ) ?>
|
662 |
+
</style>
|
663 |
+
<?php
|
664 |
+
} else {
|
665 |
+
wp_enqueue_style('eaw-elementor');
|
666 |
+
}
|
667 |
+
}
|
668 |
+
}
|
vendor/codeinwp/elementor-extra-widgets/widgets/woo/best-products.php
ADDED
@@ -0,0 +1,153 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Recent Woo Products
|
4 |
+
*
|
5 |
+
* @package Woo Recent Products
|
6 |
+
*/
|
7 |
+
|
8 |
+
class Woo_Best_Products extends WP_Widget {
|
9 |
+
|
10 |
+
public function __construct() {
|
11 |
+
$widget_ops = array(
|
12 |
+
'classname' => 'woo_best_products',
|
13 |
+
'description' => __( 'Woo Best Selling Products - designed for use with the Elementor Page Builder plugin', 'elementor-addon-widgets' ),
|
14 |
+
'customize_selective_refresh' => true,
|
15 |
+
);
|
16 |
+
|
17 |
+
parent::__construct( 'woo-best-products', __( 'Woo Best Selling Products', 'elementor-addon-widgets' ), $widget_ops );
|
18 |
+
$this->alt_option_name = 'woo_best_products';
|
19 |
+
|
20 |
+
add_action( 'save_post', array( $this, 'flush_widget_cache' ) );
|
21 |
+
add_action( 'deleted_post', array( $this, 'flush_widget_cache' ) );
|
22 |
+
add_action( 'switch_theme', array( $this, 'flush_widget_cache' ) );
|
23 |
+
}
|
24 |
+
|
25 |
+
/**
|
26 |
+
* @param array $args
|
27 |
+
* @param array $instance
|
28 |
+
*/
|
29 |
+
public function widget( $args, $instance ) {
|
30 |
+
$cache = array();
|
31 |
+
if ( ! $this->is_preview() ) {
|
32 |
+
$cache = wp_cache_get( 'woo_best_products', 'widget' );
|
33 |
+
}
|
34 |
+
|
35 |
+
if ( ! is_array( $cache ) ) {
|
36 |
+
$cache = array();
|
37 |
+
}
|
38 |
+
|
39 |
+
if ( ! isset( $args['widget_id'] ) ) {
|
40 |
+
$args['widget_id'] = $this->id;
|
41 |
+
}
|
42 |
+
|
43 |
+
if ( isset( $cache[ $args['widget_id'] ] ) ) {
|
44 |
+
echo $cache[ $args['widget_id'] ];
|
45 |
+
|
46 |
+
return;
|
47 |
+
}
|
48 |
+
|
49 |
+
ob_start();
|
50 |
+
|
51 |
+
$title = ( ! empty( $instance['title'] ) ) ? $instance['title'] : '';
|
52 |
+
$title = apply_filters( 'widget_title', $title, $instance, $this->id_base );
|
53 |
+
|
54 |
+
if ( '' == $title ) {
|
55 |
+
$title = __( 'Best Sellers', 'elementor-addon-widgets' );
|
56 |
+
}
|
57 |
+
|
58 |
+
$limit = ( ! empty( $instance['limit'] ) ) ? absint( $instance['limit'] ) : 4;
|
59 |
+
if ( '' == $limit ) {
|
60 |
+
$limit = 4;
|
61 |
+
}
|
62 |
+
$columns = ( ! empty( $instance['columns'] ) ) ? absint( $instance['columns'] ) : 4;
|
63 |
+
|
64 |
+
if ( '' == $columns ) {
|
65 |
+
$columns = 4;
|
66 |
+
}
|
67 |
+
|
68 |
+
$args = apply_filters(
|
69 |
+
'elementor-addon-widgets_product_categories_args', array(
|
70 |
+
'limit' => $limit,
|
71 |
+
'columns' => $columns,
|
72 |
+
'title' => $title,
|
73 |
+
'orderby' => 'date',
|
74 |
+
'order' => 'desc',
|
75 |
+
)
|
76 |
+
);
|
77 |
+
echo $args['before_widget'];
|
78 |
+
echo '<section class="eaw-product-section woo-best-products">';
|
79 |
+
|
80 |
+
do_action( 'storepage_homepage_before_best_selling_products' );
|
81 |
+
echo '<h2 class="section-title">' . wp_kses_post( $args['title'] ) . '</h2>';
|
82 |
+
|
83 |
+
do_action( 'storepage_homepage_after_best_selling_products_title' );
|
84 |
+
echo eaw_do_shortcode(
|
85 |
+
'best_selling_products', array(
|
86 |
+
'per_page' => intval( $args['limit'] ),
|
87 |
+
'columns' => intval( $args['columns'] ),
|
88 |
+
)
|
89 |
+
);
|
90 |
+
do_action( 'storepage_homepage_after_best_selling_products' );
|
91 |
+
|
92 |
+
echo '</section>';
|
93 |
+
// echo '</div>';
|
94 |
+
echo $args['after_widget'];
|
95 |
+
|
96 |
+
if ( ! $this->is_preview() ) {
|
97 |
+
$cache[ $args['widget_id'] ] = ob_get_flush();
|
98 |
+
wp_cache_set( 'woo_best_products', $cache, 'widget' );
|
99 |
+
} else {
|
100 |
+
ob_end_flush();
|
101 |
+
}
|
102 |
+
}
|
103 |
+
|
104 |
+
public function update( $new_instance, $old_instance ) {
|
105 |
+
$instance = $old_instance;
|
106 |
+
$instance['title'] = strip_tags( $new_instance['title'] );
|
107 |
+
$instance['limit'] = (int) $new_instance['limit'];
|
108 |
+
$instance['columns'] = (int) ( $new_instance['columns'] );
|
109 |
+
$this->flush_widget_cache();
|
110 |
+
|
111 |
+
$alloptions = wp_cache_get( 'alloptions', 'options' );
|
112 |
+
if ( isset( $alloptions['woo_best_products'] ) ) {
|
113 |
+
delete_option( 'woo_best_products' );
|
114 |
+
}
|
115 |
+
|
116 |
+
return $instance;
|
117 |
+
}
|
118 |
+
|
119 |
+
/**
|
120 |
+
* @access public
|
121 |
+
*/
|
122 |
+
public function flush_widget_cache() {
|
123 |
+
wp_cache_delete( 'woo_best_products', 'widget' );
|
124 |
+
}
|
125 |
+
|
126 |
+
/**
|
127 |
+
* @param array $instance
|
128 |
+
*/
|
129 |
+
public function form( $instance ) {
|
130 |
+
$title = isset( $instance['title'] ) ? esc_attr( $instance['title'] ) : '';
|
131 |
+
$limit = isset( $instance['limit'] ) ? absint( $instance['limit'] ) : 4;
|
132 |
+
$columns = isset( $instance['columns '] ) ? absint( $instance['columns '] ) : 4; ?>
|
133 |
+
<p>
|
134 |
+
<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'elementor-addon-widgets' ); ?></label>
|
135 |
+
<input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>"
|
136 |
+
name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo $title; ?>"/>
|
137 |
+
</p>
|
138 |
+
|
139 |
+
<p>
|
140 |
+
<label for="<?php echo $this->get_field_id( 'limit' ); ?>"><?php _e( 'Number of products to show:', 'elementor-addon-widgets' ); ?></label>
|
141 |
+
<input id="<?php echo $this->get_field_id( 'limit' ); ?>"
|
142 |
+
name="<?php echo $this->get_field_name( 'limit' ); ?>" type="text" value="<?php echo $limit; ?>"
|
143 |
+
size="3"/></p>
|
144 |
+
|
145 |
+
<p>
|
146 |
+
<label for="<?php echo $this->get_field_id( 'columns' ); ?>"><?php _e( 'Number of Columns:', 'elementor-addon-widgets' ); ?></label>
|
147 |
+
<input id="<?php echo $this->get_field_id( 'columns' ); ?>"
|
148 |
+
name="<?php echo $this->get_field_name( 'columns' ); ?>" type="text" value="<?php echo $columns; ?>"
|
149 |
+
size="3"/>
|
150 |
+
</p>
|
151 |
+
<?php
|
152 |
+
}
|
153 |
+
}
|
vendor/codeinwp/elementor-extra-widgets/widgets/woo/featured-products.php
ADDED
@@ -0,0 +1,158 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Recent Woo Products
|
4 |
+
*
|
5 |
+
* @package Woo Recent Products
|
6 |
+
*/
|
7 |
+
|
8 |
+
class Woo_Featured_Products extends WP_Widget {
|
9 |
+
|
10 |
+
public function __construct() {
|
11 |
+
$widget_ops = array(
|
12 |
+
'classname' => 'woo_featured_products',
|
13 |
+
'description' => __( 'Woo Featured Products - designed for use with the Elementor Page Builder plugin', 'elementor-addon-widgets' ),
|
14 |
+
'customize_selective_refresh' => true,
|
15 |
+
);
|
16 |
+
|
17 |
+
parent::__construct( 'woo-featured-products', __( 'Woo Featured Products', 'elementor-addon-widgets' ), $widget_ops );
|
18 |
+
$this->alt_option_name = 'woo_featured_products';
|
19 |
+
|
20 |
+
add_action( 'save_post', array( $this, 'flush_widget_cache' ) );
|
21 |
+
add_action( 'deleted_post', array( $this, 'flush_widget_cache' ) );
|
22 |
+
add_action( 'switch_theme', array( $this, 'flush_widget_cache' ) );
|
23 |
+
}
|
24 |
+
|
25 |
+
/**
|
26 |
+
* @param array $args
|
27 |
+
* @param array $instance
|
28 |
+
*/
|
29 |
+
public function widget( $args, $instance ) {
|
30 |
+
$cache = array();
|
31 |
+
if ( ! $this->is_preview() ) {
|
32 |
+
$cache = wp_cache_get( 'woo_featured_products', 'widget' );
|
33 |
+
}
|
34 |
+
|
35 |
+
if ( ! is_array( $cache ) ) {
|
36 |
+
$cache = array();
|
37 |
+
}
|
38 |
+
|
39 |
+
if ( ! isset( $args['widget_id'] ) ) {
|
40 |
+
$args['widget_id'] = $this->id;
|
41 |
+
}
|
42 |
+
|
43 |
+
if ( isset( $cache[ $args['widget_id'] ] ) ) {
|
44 |
+
echo $cache[ $args['widget_id'] ];
|
45 |
+
|
46 |
+
return;
|
47 |
+
}
|
48 |
+
|
49 |
+
ob_start();
|
50 |
+
|
51 |
+
$title = ( ! empty( $instance['title'] ) ) ? $instance['title'] : '';
|
52 |
+
$title = apply_filters( 'widget_title', $title, $instance, $this->id_base );
|
53 |
+
|
54 |
+
if ( '' == $title ) {
|
55 |
+
$title = __( 'Recommended For You', 'elementor-addon-widgets' );
|
56 |
+
}
|
57 |
+
|
58 |
+
$limit = ( ! empty( $instance['limit'] ) ) ? absint( $instance['limit'] ) : 4;
|
59 |
+
if ( '' == $limit ) {
|
60 |
+
$limit = 4;
|
61 |
+
}
|
62 |
+
|
63 |
+
$columns = ( ! empty( $instance['columns'] ) ) ? absint( $instance['columns'] ) : 4;
|
64 |
+
if ( '' == $columns ) {
|
65 |
+
$columns = 4;
|
66 |
+
}
|
67 |
+
|
68 |
+
$args = apply_filters(
|
69 |
+
'elementor-addon-widgets_product_categories_args', array(
|
70 |
+
'limit' => $limit,
|
71 |
+
'columns' => $columns,
|
72 |
+
'title' => $title,
|
73 |
+
'orderby' => 'date',
|
74 |
+
'order' => 'desc',
|
75 |
+
)
|
76 |
+
);
|
77 |
+
|
78 |
+
echo $args['before_widget'];
|
79 |
+
echo '<section class="eaw-product-section woo-featured-products">';
|
80 |
+
|
81 |
+
do_action( 'storepage_homepage_before_featured_products' );
|
82 |
+
|
83 |
+
echo '<h2 class="section-title">' . wp_kses_post( $args['title'] ) . '</h2>';
|
84 |
+
|
85 |
+
do_action( 'storepage_homepage_after_featured_products_title' );
|
86 |
+
|
87 |
+
echo eaw_do_shortcode(
|
88 |
+
'featured_products', array(
|
89 |
+
'per_page' => intval( $args['limit'] ),
|
90 |
+
'columns' => intval( $args['columns'] ),
|
91 |
+
'orderby' => esc_attr( $args['orderby'] ),
|
92 |
+
'order' => esc_attr( $args['order'] ),
|
93 |
+
)
|
94 |
+
);
|
95 |
+
|
96 |
+
do_action( 'storepage_homepage_after_featured_products' );
|
97 |
+
|
98 |
+
echo '</section>';
|
99 |
+
|
100 |
+
echo $args['after_widget'];
|
101 |
+
|
102 |
+
if ( ! $this->is_preview() ) {
|
103 |
+
$cache[ $args['widget_id'] ] = ob_get_flush();
|
104 |
+
wp_cache_set( 'woo_featured_products', $cache, 'widget' );
|
105 |
+
} else {
|
106 |
+
ob_end_flush();
|
107 |
+
}
|
108 |
+
}
|
109 |
+
|
110 |
+
public function update( $new_instance, $old_instance ) {
|
111 |
+
$instance = $old_instance;
|
112 |
+
$instance['title'] = strip_tags( $new_instance['title'] );
|
113 |
+
$instance['limit'] = (int) $new_instance['limit'];
|
114 |
+
$instance['columns'] = (int) $new_instance['columns'];
|
115 |
+
$this->flush_widget_cache();
|
116 |
+
|
117 |
+
$alloptions = wp_cache_get( 'alloptions', 'options' );
|
118 |
+
if ( isset( $alloptions['woo_featured_products'] ) ) {
|
119 |
+
delete_option( 'woo_featured_products' );
|
120 |
+
}
|
121 |
+
|
122 |
+
return $instance;
|
123 |
+
}
|
124 |
+
|
125 |
+
/**
|
126 |
+
* @access public
|
127 |
+
*/
|
128 |
+
public function flush_widget_cache() {
|
129 |
+
wp_cache_delete( 'woo_featured_products', 'widget' );
|
130 |
+
}
|
131 |
+
|
132 |
+
/**
|
133 |
+
* @param array $instance
|
134 |
+
*/
|
135 |
+
public function form( $instance ) {
|
136 |
+
$title = isset( $instance['title'] ) ? esc_attr( $instance['title'] ) : '';
|
137 |
+
$limit = isset( $instance['limit'] ) ? absint( $instance['limit'] ) : 4;
|
138 |
+
$columns = isset( $instance['columns '] ) ? absint( $instance['columns '] ) : 4; ?>
|
139 |
+
<p>
|
140 |
+
<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'elementor-addon-widgets' ); ?></label>
|
141 |
+
<input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>"
|
142 |
+
name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo $title; ?>"/>
|
143 |
+
</p>
|
144 |
+
|
145 |
+
<p>
|
146 |
+
<label for="<?php echo $this->get_field_id( 'limit' ); ?>"><?php _e( 'Number of products to show:', 'elementor-addon-widgets' ); ?></label>
|
147 |
+
<input id="<?php echo $this->get_field_id( 'limit' ); ?>"
|
148 |
+
name="<?php echo $this->get_field_name( 'limit' ); ?>" type="text" value="<?php echo $limit; ?>"
|
149 |
+
size="3"/></p>
|
150 |
+
|
151 |
+
<p>
|
152 |
+
<label for="<?php echo $this->get_field_id( 'columns' ); ?>"><?php _e( 'Number of Columns:', 'elementor-addon-widgets' ); ?></label>
|
153 |
+
<input id="<?php echo $this->get_field_id( 'columns' ); ?>"
|
154 |
+
name="<?php echo $this->get_field_name( 'columns' ); ?>" type="text" value="<?php echo $columns; ?>"
|
155 |
+
size="3"/></p>
|
156 |
+
<?php
|
157 |
+
}
|
158 |
+
}
|
vendor/codeinwp/elementor-extra-widgets/widgets/woo/popular-products.php
ADDED
@@ -0,0 +1,157 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Recent Woo Products
|
4 |
+
*
|
5 |
+
* @package Woo Recent Products
|
6 |
+
*/
|
7 |
+
|
8 |
+
class Woo_Popular_Products extends WP_Widget {
|
9 |
+
|
10 |
+
public function __construct() {
|
11 |
+
$widget_ops = array(
|
12 |
+
'classname' => 'woo_popular_products',
|
13 |
+
'description' => __( 'Woo Popular Products - designed for use with the Elementor Page Builder plugin', 'elementor-addon-widgets' ),
|
14 |
+
'customize_selective_refresh' => true,
|
15 |
+
);
|
16 |
+
|
17 |
+
parent::__construct( 'woo-popular-products', __( 'Woo Popular Products', 'elementor-addon-widgets' ), $widget_ops );
|
18 |
+
$this->alt_option_name = 'woo_popular_products';
|
19 |
+
|
20 |
+
add_action( 'save_post', array( $this, 'flush_widget_cache' ) );
|
21 |
+
add_action( 'deleted_post', array( $this, 'flush_widget_cache' ) );
|
22 |
+
add_action( 'switch_theme', array( $this, 'flush_widget_cache' ) );
|
23 |
+
}
|
24 |
+
|
25 |
+
/**
|
26 |
+
* @param array $args
|
27 |
+
* @param array $instance
|
28 |
+
*/
|
29 |
+
public function widget( $args, $instance ) {
|
30 |
+
$cache = array();
|
31 |
+
if ( ! $this->is_preview() ) {
|
32 |
+
$cache = wp_cache_get( 'woo_popular_products', 'widget' );
|
33 |
+
}
|
34 |
+
|
35 |
+
if ( ! is_array( $cache ) ) {
|
36 |
+
$cache = array();
|
37 |
+
}
|
38 |
+
|
39 |
+
if ( ! isset( $args['widget_id'] ) ) {
|
40 |
+
$args['widget_id'] = $this->id;
|
41 |
+
}
|
42 |
+
|
43 |
+
if ( isset( $cache[ $args['widget_id'] ] ) ) {
|
44 |
+
echo $cache[ $args['widget_id'] ];
|
45 |
+
|
46 |
+
return;
|
47 |
+
}
|
48 |
+
|
49 |
+
ob_start();
|
50 |
+
|
51 |
+
$title = ( ! empty( $instance['title'] ) ) ? $instance['title'] : '';
|
52 |
+
$title = apply_filters( 'widget_title', $title, $instance, $this->id_base );
|
53 |
+
|
54 |
+
if ( '' == $title ) {
|
55 |
+
$title = __( 'Fan Favorites', 'elementor-addon-widgets' );
|
56 |
+
}
|
57 |
+
|
58 |
+
$limit = ( ! empty( $instance['limit'] ) ) ? absint( $instance['limit'] ) : 4;
|
59 |
+
if ( '' == $limit ) {
|
60 |
+
$limit = 4;
|
61 |
+
}
|
62 |
+
$columns = ( ! empty( $instance['columns'] ) ) ? absint( $instance['columns'] ) : 4;
|
63 |
+
|
64 |
+
if ( '' == $columns ) {
|
65 |
+
$columns = 4;
|
66 |
+
}
|
67 |
+
|
68 |
+
$args = apply_filters(
|
69 |
+
'elementor-addon-widgets_product_categories_args', array(
|
70 |
+
'limit' => $limit,
|
71 |
+
'columns' => $columns,
|
72 |
+
'title' => $title,
|
73 |
+
'orderby' => 'date',
|
74 |
+
'order' => 'desc',
|
75 |
+
)
|
76 |
+
);
|
77 |
+
|
78 |
+
echo $args['before_widget'];
|
79 |
+
// echo '<div class="woo-popular-products">';
|
80 |
+
echo '<section class="eaw-product-section woo-popular-products">';
|
81 |
+
|
82 |
+
do_action( 'storepage_homepage_before_popular_products' );
|
83 |
+
|
84 |
+
echo '<h2 class="section-title">' . wp_kses_post( $args['title'] ) . '</h2>';
|
85 |
+
|
86 |
+
do_action( 'storepage_homepage_after_popular_products_title' );
|
87 |
+
|
88 |
+
echo eaw_do_shortcode(
|
89 |
+
'top_rated_products', array(
|
90 |
+
'per_page' => intval( $args['limit'] ),
|
91 |
+
'columns' => intval( $args['columns'] ),
|
92 |
+
)
|
93 |
+
);
|
94 |
+
|
95 |
+
do_action( 'storepage_homepage_after_popular_products' );
|
96 |
+
|
97 |
+
echo '</section>';
|
98 |
+
// echo '</div>';
|
99 |
+
echo $args['after_widget'];
|
100 |
+
|
101 |
+
if ( ! $this->is_preview() ) {
|
102 |
+
$cache[ $args['widget_id'] ] = ob_get_flush();
|
103 |
+
wp_cache_set( 'woo_popular_products', $cache, 'widget' );
|
104 |
+
} else {
|
105 |
+
ob_end_flush();
|
106 |
+
}
|
107 |
+
}
|
108 |
+
|
109 |
+
public function update( $new_instance, $old_instance ) {
|
110 |
+
$instance = $old_instance;
|
111 |
+
$instance['title'] = strip_tags( $new_instance['title'] );
|
112 |
+
$instance['limit'] = (int) $new_instance['limit'];
|
113 |
+
$instance['columns'] = (int) ( $new_instance['columns'] );
|
114 |
+
$this->flush_widget_cache();
|
115 |
+
|
116 |
+
$alloptions = wp_cache_get( 'alloptions', 'options' );
|
117 |
+
if ( isset( $alloptions['woo_popular_products'] ) ) {
|
118 |
+
delete_option( 'woo_popular_products' );
|
119 |
+
}
|
120 |
+
|
121 |
+
return $instance;
|
122 |
+
}
|
123 |
+
|
124 |
+
/**
|
125 |
+
* @access public
|
126 |
+
*/
|
127 |
+
public function flush_widget_cache() {
|
128 |
+
wp_cache_delete( 'woo_popular_products', 'widget' );
|
129 |
+
}
|
130 |
+
|
131 |
+
/**
|
132 |
+
* @param array $instance
|
133 |
+
*/
|
134 |
+
public function form( $instance ) {
|
135 |
+
$title = isset( $instance['title'] ) ? esc_attr( $instance['title'] ) : '';
|
136 |
+
$limit = isset( $instance['limit'] ) ? absint( $instance['limit'] ) : 4;
|
137 |
+
$columns = isset( $instance['columns '] ) ? absint( $instance['columns '] ) : 4; ?>
|
138 |
+
<p>
|
139 |
+
<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'elementor-addon-widgets' ); ?></label>
|
140 |
+
<input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>"
|
141 |
+
name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo $title; ?>"/>
|
142 |
+
</p>
|
143 |
+
|
144 |
+
<p>
|
145 |
+
<label for="<?php echo $this->get_field_id( 'limit' ); ?>"><?php _e( 'Number of products to show:', 'elementor-addon-widgets' ); ?></label>
|
146 |
+
<input id="<?php echo $this->get_field_id( 'limit' ); ?>"
|
147 |
+
name="<?php echo $this->get_field_name( 'limit' ); ?>" type="text" value="<?php echo $limit; ?>"
|
148 |
+
size="3"/></p>
|
149 |
+
|
150 |
+
<p>
|
151 |
+
<label for="<?php echo $this->get_field_id( 'columns' ); ?>"><?php _e( 'Number of Columns:', 'elementor-addon-widgets' ); ?></label>
|
152 |
+
<input id="<?php echo $this->get_field_id( 'columns' ); ?>"
|
153 |
+
name="<?php echo $this->get_field_name( 'columns' ); ?>" type="text" value="<?php echo $columns; ?>"
|
154 |
+
size="3"/></p>
|
155 |
+
<?php
|
156 |
+
}
|
157 |
+
}
|
vendor/codeinwp/elementor-extra-widgets/widgets/woo/products-categories.php
ADDED
@@ -0,0 +1,159 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Recent Woo Products
|
4 |
+
*
|
5 |
+
* @package Woo Recent Products
|
6 |
+
*/
|
7 |
+
|
8 |
+
class Woo_Product_Categories extends WP_Widget {
|
9 |
+
|
10 |
+
public function __construct() {
|
11 |
+
$widget_ops = array(
|
12 |
+
'classname' => 'woo_product_categories',
|
13 |
+
'description' => __( 'Woo Product Categories - designed for use with the Elementor Page Builder plugin', 'elementor-addon-widgets' ),
|
14 |
+
'customize_selective_refresh' => true,
|
15 |
+
);
|
16 |
+
|
17 |
+
parent::__construct( 'woo-product-categories', __( 'Woo Product Categories', 'elementor-addon-widgets' ), $widget_ops );
|
18 |
+
$this->alt_option_name = 'woo_product_categories';
|
19 |
+
|
20 |
+
add_action( 'save_post', array( $this, 'flush_widget_cache' ) );
|
21 |
+
add_action( 'deleted_post', array( $this, 'flush_widget_cache' ) );
|
22 |
+
add_action( 'switch_theme', array( $this, 'flush_widget_cache' ) );
|
23 |
+
}
|
24 |
+
|
25 |
+
/**
|
26 |
+
* @param array $args
|
27 |
+
* @param array $instance
|
28 |
+
*/
|
29 |
+
public function widget( $args, $instance ) {
|
30 |
+
$cache = array();
|
31 |
+
if ( ! $this->is_preview() ) {
|
32 |
+
$cache = wp_cache_get( 'woo_product_categories', 'widget' );
|
33 |
+
}
|
34 |
+
|
35 |
+
if ( ! is_array( $cache ) ) {
|
36 |
+
$cache = array();
|
37 |
+
}
|
38 |
+
|
39 |
+
if ( ! isset( $args['widget_id'] ) ) {
|
40 |
+
$args['widget_id'] = $this->id;
|
41 |
+
}
|
42 |
+
|
43 |
+
if ( isset( $cache[ $args['widget_id'] ] ) ) {
|
44 |
+
echo $cache[ $args['widget_id'] ];
|
45 |
+
|
46 |
+
return;
|
47 |
+
}
|
48 |
+
|
49 |
+
ob_start();
|
50 |
+
|
51 |
+
$title = ( ! empty( $instance['title'] ) ) ? $instance['title'] : '';
|
52 |
+
$title = apply_filters( 'widget_title', $title, $instance, $this->id_base );
|
53 |
+
|
54 |
+
if ( '' == $title ) {
|
55 |
+
$title = __( 'Shop By Categories', 'elementor-addon-widgets' );
|
56 |
+
}
|
57 |
+
|
58 |
+
$limit = ( ! empty( $instance['limit'] ) ) ? absint( $instance['limit'] ) : 3;
|
59 |
+
if ( '' == $limit ) {
|
60 |
+
$limit = 3;
|
61 |
+
}
|
62 |
+
$columns = ( ! empty( $instance['columns'] ) ) ? absint( $instance['columns'] ) : 3;
|
63 |
+
|
64 |
+
if ( '' == $columns ) {
|
65 |
+
$columns = 3;
|
66 |
+
}
|
67 |
+
|
68 |
+
$args = apply_filters(
|
69 |
+
'eaw_product_categories_args', array(
|
70 |
+
'limit' => $limit,
|
71 |
+
'columns' => $columns,
|
72 |
+
'child_categories' => 0,
|
73 |
+
'orderby' => 'name',
|
74 |
+
'title' => $title,
|
75 |
+
)
|
76 |
+
);
|
77 |
+
|
78 |
+
echo $args['before_widget'];
|
79 |
+
// echo '<div class="widget-woo-categories">';
|
80 |
+
echo '<section class="eaw-product-section widget-woo-categories">';
|
81 |
+
|
82 |
+
do_action( 'storepage_homepage_before_product_categories' );
|
83 |
+
|
84 |
+
echo '<h2 class="section-title">' . wp_kses_post( $args['title'] ) . '</h2>';
|
85 |
+
|
86 |
+
do_action( 'storepage_homepage_after_product_categories_title' );
|
87 |
+
|
88 |
+
echo eaw_do_shortcode(
|
89 |
+
'product_categories', array(
|
90 |
+
'number' => intval( $args['limit'] ),
|
91 |
+
'columns' => intval( $args['columns'] ),
|
92 |
+
'orderby' => esc_attr( $args['orderby'] ),
|
93 |
+
'parent' => esc_attr( $args['child_categories'] ),
|
94 |
+
)
|
95 |
+
);
|
96 |
+
|
97 |
+
do_action( 'storepage_homepage_after_product_categories' );
|
98 |
+
|
99 |
+
echo '</section>';
|
100 |
+
// echo '</div>';
|
101 |
+
echo $args['after_widget'];
|
102 |
+
|
103 |
+
if ( ! $this->is_preview() ) {
|
104 |
+
$cache[ $args['widget_id'] ] = ob_get_flush();
|
105 |
+
wp_cache_set( 'woo_product_categories', $cache, 'widget' );
|
106 |
+
} else {
|
107 |
+
ob_end_flush();
|
108 |
+
}
|
109 |
+
}
|
110 |
+
|
111 |
+
public function update( $new_instance, $old_instance ) {
|
112 |
+
$instance = $old_instance;
|
113 |
+
$instance['title'] = strip_tags( $new_instance['title'] );
|
114 |
+
$instance['limit'] = (int) $new_instance['limit'];
|
115 |
+
$instance['columns'] = (int) ( $new_instance['columns'] );
|
116 |
+
$this->flush_widget_cache();
|
117 |
+
|
118 |
+
$alloptions = wp_cache_get( 'alloptions', 'options' );
|
119 |
+
if ( isset( $alloptions['woo_product_categories'] ) ) {
|
120 |
+
delete_option( 'woo_product_categories' );
|
121 |
+
}
|
122 |
+
|
123 |
+
return $instance;
|
124 |
+
}
|
125 |
+
|
126 |
+
/**
|
127 |
+
* @access public
|
128 |
+
*/
|
129 |
+
public function flush_widget_cache() {
|
130 |
+
wp_cache_delete( 'woo_product_categories', 'widget' );
|
131 |
+
}
|
132 |
+
|
133 |
+
/**
|
134 |
+
* @param array $instance
|
135 |
+
*/
|
136 |
+
public function form( $instance ) {
|
137 |
+
$title = isset( $instance['title'] ) ? esc_attr( $instance['title'] ) : '';
|
138 |
+
$limit = isset( $instance['limit'] ) ? absint( $instance['limit'] ) : 3;
|
139 |
+
$columns = isset( $instance['columns '] ) ? absint( $instance['columns '] ) : 3; ?>
|
140 |
+
<p>
|
141 |
+
<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'elementor-addon-widgets' ); ?></label>
|
142 |
+
<input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>"
|
143 |
+
name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo $title; ?>"/>
|
144 |
+
</p>
|
145 |
+
|
146 |
+
<p>
|
147 |
+
<label for="<?php echo $this->get_field_id( 'limit' ); ?>"><?php _e( 'Number of categories to show:', 'elementor-addon-widgets' ); ?></label>
|
148 |
+
<input id="<?php echo $this->get_field_id( 'limit' ); ?>"
|
149 |
+
name="<?php echo $this->get_field_name( 'limit' ); ?>" type="text" value="<?php echo $limit; ?>"
|
150 |
+
size="3"/></p>
|
151 |
+
|
152 |
+
<p>
|
153 |
+
<label for="<?php echo $this->get_field_id( 'columns' ); ?>"><?php _e( 'Number of Columns:', 'elementor-addon-widgets' ); ?></label>
|
154 |
+
<input id="<?php echo $this->get_field_id( 'columns' ); ?>"
|
155 |
+
name="<?php echo $this->get_field_name( 'columns' ); ?>" type="text" value="<?php echo $columns; ?>"
|
156 |
+
size="3"/></p>
|
157 |
+
<?php
|
158 |
+
}
|
159 |
+
}
|
vendor/codeinwp/elementor-extra-widgets/widgets/woo/recent-products.php
ADDED
@@ -0,0 +1,155 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Recent Woo Products
|
4 |
+
*
|
5 |
+
* @package Woo Recent Products
|
6 |
+
*/
|
7 |
+
|
8 |
+
class Woo_Recent_Products extends WP_Widget {
|
9 |
+
|
10 |
+
public function __construct() {
|
11 |
+
$widget_ops = array(
|
12 |
+
'classname' => 'woo_recent_products',
|
13 |
+
'description' => __( 'Woo Recent Products - designed for use with the Elementor Page Builder plugin', 'elementor-addon-widgets' ),
|
14 |
+
'customize_selective_refresh' => true,
|
15 |
+
);
|
16 |
+
|
17 |
+
parent::__construct( 'woo-recent-products', __( 'Woo Recent Products', 'elementor-addon-widgets' ), $widget_ops );
|
18 |
+
$this->alt_option_name = 'woo_recent_products';
|
19 |
+
|
20 |
+
add_action( 'save_post', array( $this, 'flush_widget_cache' ) );
|
21 |
+
add_action( 'deleted_post', array( $this, 'flush_widget_cache' ) );
|
22 |
+
add_action( 'switch_theme', array( $this, 'flush_widget_cache' ) );
|
23 |
+
}
|
24 |
+
|
25 |
+
/**
|
26 |
+
* @param array $args
|
27 |
+
* @param array $instance
|
28 |
+
*/
|
29 |
+
public function widget( $args, $instance ) {
|
30 |
+
$cache = array();
|
31 |
+
if ( ! $this->is_preview() ) {
|
32 |
+
$cache = wp_cache_get( 'woo_recent_products', 'widget' );
|
33 |
+
}
|
34 |
+
|
35 |
+
if ( ! is_array( $cache ) ) {
|
36 |
+
$cache = array();
|
37 |
+
}
|
38 |
+
|
39 |
+
if ( ! isset( $args['widget_id'] ) ) {
|
40 |
+
$args['widget_id'] = $this->id;
|
41 |
+
}
|
42 |
+
|
43 |
+
if ( isset( $cache[ $args['widget_id'] ] ) ) {
|
44 |
+
echo $cache[ $args['widget_id'] ];
|
45 |
+
|
46 |
+
return;
|
47 |
+
}
|
48 |
+
|
49 |
+
ob_start();
|
50 |
+
|
51 |
+
$title = ( ! empty( $instance['title'] ) ) ? $instance['title'] : '';
|
52 |
+
$title = apply_filters( 'widget_title', $title, $instance, $this->id_base );
|
53 |
+
|
54 |
+
if ( '' == $title ) {
|
55 |
+
$title = __( 'New In', 'elementor-addon-widgets' );
|
56 |
+
}
|
57 |
+
|
58 |
+
$limit = ( ! empty( $instance['limit'] ) ) ? absint( $instance['limit'] ) : 4;
|
59 |
+
if ( '' == $limit ) {
|
60 |
+
$limit = 4;
|
61 |
+
}
|
62 |
+
$columns = ( ! empty( $instance['columns'] ) ) ? absint( $instance['columns'] ) : 4;
|
63 |
+
|
64 |
+
if ( '' == $columns ) {
|
65 |
+
$columns = 4;
|
66 |
+
}
|
67 |
+
|
68 |
+
$args = apply_filters(
|
69 |
+
'elementor-addon-widgets_product_categories_args', array(
|
70 |
+
'limit' => $limit,
|
71 |
+
'columns' => $columns,
|
72 |
+
'title' => $title,
|
73 |
+
)
|
74 |
+
);
|
75 |
+
|
76 |
+
echo $args['before_widget'];
|
77 |
+
// echo '<div class="woo-recent-products">';
|
78 |
+
echo '<section class="eaw-product-section woo-recent-products">';
|
79 |
+
|
80 |
+
do_action( 'elementor-addon-widgets_homepage_before_recent_products' );
|
81 |
+
|
82 |
+
echo '<h2 class="section-title">' . wp_kses_post( $args['title'] ) . '</h2>';
|
83 |
+
|
84 |
+
do_action( 'elementor-addon-widgets_homepage_after_recent_products_title' );
|
85 |
+
|
86 |
+
echo eaw_do_shortcode(
|
87 |
+
'recent_products', array(
|
88 |
+
'per_page' => intval( $args['limit'] ),
|
89 |
+
'columns' => intval( $args['columns'] ),
|
90 |
+
)
|
91 |
+
);
|
92 |
+
|
93 |
+
do_action( 'elementor-addon-widgets_homepage_after_recent_products' );
|
94 |
+
|
95 |
+
echo '</section>';
|
96 |
+
// echo '</div>';
|
97 |
+
echo $args['after_widget'];
|
98 |
+
|
99 |
+
if ( ! $this->is_preview() ) {
|
100 |
+
$cache[ $args['widget_id'] ] = ob_get_flush();
|
101 |
+
wp_cache_set( 'woo_recent_products', $cache, 'widget' );
|
102 |
+
} else {
|
103 |
+
ob_end_flush();
|
104 |
+
}
|
105 |
+
}
|
106 |
+
|
107 |
+
public function update( $new_instance, $old_instance ) {
|
108 |
+
$instance = $old_instance;
|
109 |
+
$instance['title'] = strip_tags( $new_instance['title'] );
|
110 |
+
$instance['limit'] = (int) $new_instance['limit'];
|
111 |
+
$instance['columns'] = (int) ( $new_instance['columns'] );
|
112 |
+
$this->flush_widget_cache();
|
113 |
+
|
114 |
+
$alloptions = wp_cache_get( 'alloptions', 'options' );
|
115 |
+
if ( isset( $alloptions['woo_recent_products'] ) ) {
|
116 |
+
delete_option( 'woo_recent_products' );
|
117 |
+
}
|
118 |
+
|
119 |
+
return $instance;
|
120 |
+
}
|
121 |
+
|
122 |
+
/**
|
123 |
+
* @access public
|
124 |
+
*/
|
125 |
+
public function flush_widget_cache() {
|
126 |
+
wp_cache_delete( 'woo_recent_products', 'widget' );
|
127 |
+
}
|
128 |
+
|
129 |
+
/**
|
130 |
+
* @param array $instance
|
131 |
+
*/
|
132 |
+
public function form( $instance ) {
|
133 |
+
$title = isset( $instance['title'] ) ? esc_attr( $instance['title'] ) : '';
|
134 |
+
$limit = isset( $instance['limit'] ) ? absint( $instance['limit'] ) : 4;
|
135 |
+
$columns = isset( $instance['columns '] ) ? absint( $instance['columns '] ) : 4; ?>
|
136 |
+
<p>
|
137 |
+
<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'elementor-addon-widgets' ); ?></label>
|
138 |
+
<input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>"
|
139 |
+
name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo $title; ?>"/>
|
140 |
+
</p>
|
141 |
+
|
142 |
+
<p>
|
143 |
+
<label for="<?php echo $this->get_field_id( 'limit' ); ?>"><?php _e( 'Number of products to show:', 'elementor-addon-widgets' ); ?></label>
|
144 |
+
<input id="<?php echo $this->get_field_id( 'limit' ); ?>"
|
145 |
+
name="<?php echo $this->get_field_name( 'limit' ); ?>" type="text" value="<?php echo $limit; ?>"
|
146 |
+
size="3"/></p>
|
147 |
+
|
148 |
+
<p>
|
149 |
+
<label for="<?php echo $this->get_field_id( 'columns' ); ?>"><?php _e( 'Number of Columns:', 'elementor-addon-widgets' ); ?></label>
|
150 |
+
<input id="<?php echo $this->get_field_id( 'columns' ); ?>"
|
151 |
+
name="<?php echo $this->get_field_name( 'columns' ); ?>" type="text" value="<?php echo $columns; ?>"
|
152 |
+
size="3"/></p>
|
153 |
+
<?php
|
154 |
+
}
|
155 |
+
}
|
vendor/codeinwp/elementor-extra-widgets/widgets/woo/sale-products.php
ADDED
@@ -0,0 +1,156 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Recent Woo Products
|
4 |
+
*
|
5 |
+
* @package Woo Recent Products
|
6 |
+
*/
|
7 |
+
|
8 |
+
class Woo_Sale_Products extends WP_Widget {
|
9 |
+
|
10 |
+
public function __construct() {
|
11 |
+
$widget_ops = array(
|
12 |
+
'classname' => 'woo_sale_products',
|
13 |
+
'description' => __( 'Woo On Sale Products - designed for use with the Elementor Page Builder plugin', 'elementor-addon-widgets' ),
|
14 |
+
'customize_selective_refresh' => true,
|
15 |
+
);
|
16 |
+
|
17 |
+
parent::__construct( 'woo-sale-products', __( 'Woo On Sale Products', 'elementor-addon-widgets' ), $widget_ops );
|
18 |
+
$this->alt_option_name = 'woo_sale_products';
|
19 |
+
|
20 |
+
add_action( 'save_post', array( $this, 'flush_widget_cache' ) );
|
21 |
+
add_action( 'deleted_post', array( $this, 'flush_widget_cache' ) );
|
22 |
+
add_action( 'switch_theme', array( $this, 'flush_widget_cache' ) );
|
23 |
+
}
|
24 |
+
|
25 |
+
/**
|
26 |
+
* @param array $args
|
27 |
+
* @param array $instance
|
28 |
+
*/
|
29 |
+
public function widget( $args, $instance ) {
|
30 |
+
$cache = array();
|
31 |
+
if ( ! $this->is_preview() ) {
|
32 |
+
$cache = wp_cache_get( 'woo_sale_products', 'widget' );
|
33 |
+
}
|
34 |
+
|
35 |
+
if ( ! is_array( $cache ) ) {
|
36 |
+
$cache = array();
|
37 |
+
}
|
38 |
+
|
39 |
+
if ( ! isset( $args['widget_id'] ) ) {
|
40 |
+
$args['widget_id'] = $this->id;
|
41 |
+
}
|
42 |
+
|
43 |
+
if ( isset( $cache[ $args['widget_id'] ] ) ) {
|
44 |
+
echo $cache[ $args['widget_id'] ];
|
45 |
+
|
46 |
+
return;
|
47 |
+
}
|
48 |
+
|
49 |
+
ob_start();
|
50 |
+
|
51 |
+
$title = ( ! empty( $instance['title'] ) ) ? $instance['title'] : '';
|
52 |
+
$title = apply_filters( 'widget_title', $title, $instance, $this->id_base );
|
53 |
+
|
54 |
+
if ( '' == $title ) {
|
55 |
+
$title = __( 'On Sale', 'elementor-addon-widgets' );
|
56 |
+
}
|
57 |
+
|
58 |
+
$limit = ( ! empty( $instance['limit'] ) ) ? absint( $instance['limit'] ) : 4;
|
59 |
+
if ( '' == $limit ) {
|
60 |
+
$limit = 4;
|
61 |
+
}
|
62 |
+
$columns = ( ! empty( $instance['columns'] ) ) ? absint( $instance['columns'] ) : 4;
|
63 |
+
|
64 |
+
if ( '' == $columns ) {
|
65 |
+
$columns = 4;
|
66 |
+
}
|
67 |
+
|
68 |
+
$args = apply_filters(
|
69 |
+
'elementor-addon-widgets_product_categories_args', array(
|
70 |
+
'limit' => $limit,
|
71 |
+
'columns' => $columns,
|
72 |
+
'title' => $title,
|
73 |
+
)
|
74 |
+
);
|
75 |
+
|
76 |
+
echo $args['before_widget'];
|
77 |
+
// echo '<div class="woo-sale-products">';
|
78 |
+
echo '<section class="eaw-product-section woo-sale-products">';
|
79 |
+
|
80 |
+
do_action( 'storepage_homepage_before_on_sale_products' );
|
81 |
+
|
82 |
+
echo '<h2 class="section-title">' . wp_kses_post( $args['title'] ) . '</h2>';
|
83 |
+
|
84 |
+
do_action( 'storepage_homepage_after_on_sale_products_title' );
|
85 |
+
|
86 |
+
echo eaw_do_shortcode(
|
87 |
+
'sale_products', array(
|
88 |
+
'per_page' => intval( $args['limit'] ),
|
89 |
+
'columns' => intval( $args['columns'] ),
|
90 |
+
)
|
91 |
+
);
|
92 |
+
|
93 |
+
do_action( 'storepage_homepage_after_on_sale_products' );
|
94 |
+
|
95 |
+
echo '</section>';
|
96 |
+
// echo '</div>';
|
97 |
+
echo $args['after_widget'];
|
98 |
+
|
99 |
+
if ( ! $this->is_preview() ) {
|
100 |
+
$cache[ $args['widget_id'] ] = ob_get_flush();
|
101 |
+
wp_cache_set( 'woo_sale_products', $cache, 'widget' );
|
102 |
+
} else {
|
103 |
+
ob_end_flush();
|
104 |
+
}
|
105 |
+
}
|
106 |
+
|
107 |
+
public function update( $new_instance, $old_instance ) {
|
108 |
+
$instance = $old_instance;
|
109 |
+
$instance['title'] = strip_tags( $new_instance['title'] );
|
110 |
+
$instance['limit'] = (int) $new_instance['limit'];
|
111 |
+
$instance['columns'] = (int) ( $new_instance['columns'] );
|
112 |
+
$this->flush_widget_cache();
|
113 |
+
|
114 |
+
$alloptions = wp_cache_get( 'alloptions', 'options' );
|
115 |
+
if ( isset( $alloptions['woo_sale_products'] ) ) {
|
116 |
+
delete_option( 'woo_sale_products' );
|
117 |
+
}
|
118 |
+
|
119 |
+
return $instance;
|
120 |
+
}
|
121 |
+
|
122 |
+
/**
|
123 |
+
* @access public
|
124 |
+
*/
|
125 |
+
public function flush_widget_cache() {
|
126 |
+
wp_cache_delete( 'woo_sale_products', 'widget' );
|
127 |
+
}
|
128 |
+
|
129 |
+
/**
|
130 |
+
* @param array $instance
|
131 |
+
*/
|
132 |
+
public function form( $instance ) {
|
133 |
+
$title = isset( $instance['title'] ) ? esc_attr( $instance['title'] ) : '';
|
134 |
+
$limit = isset( $instance['limit'] ) ? absint( $instance['limit'] ) : 4;
|
135 |
+
$columns = isset( $instance['columns '] ) ? absint( $instance['columns '] ) : 4; ?>
|
136 |
+
<p>
|
137 |
+
<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'elementor-addon-widgets' ); ?></label>
|
138 |
+
<input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>"
|
139 |
+
name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo $title; ?>"/>
|
140 |
+
</p>
|
141 |
+
|
142 |
+
<p>
|
143 |
+
<label for="<?php echo $this->get_field_id( 'limit' ); ?>"><?php _e( 'Number of products to show:', 'elementor-addon-widgets' ); ?></label>
|
144 |
+
<input id="<?php echo $this->get_field_id( 'limit' ); ?>"
|
145 |
+
name="<?php echo $this->get_field_name( 'limit' ); ?>" type="text" value="<?php echo $limit; ?>"
|
146 |
+
size="3"/></p>
|
147 |
+
|
148 |
+
<p>
|
149 |
+
<label for="<?php echo $this->get_field_id( 'columns' ); ?>"><?php _e( 'Number of Columns:', 'elementor-addon-widgets' ); ?></label>
|
150 |
+
<input id="<?php echo $this->get_field_id( 'columns' ); ?>"
|
151 |
+
name="<?php echo $this->get_field_name( 'columns' ); ?>" type="text" value="<?php echo $columns; ?>"
|
152 |
+
size="3"/>
|
153 |
+
</p>
|
154 |
+
<?php
|
155 |
+
}
|
156 |
+
}
|
vendor/codeinwp/elementor-extra-widgets/widgets/wp/eaw-posts-widget-plus.php
ADDED
@@ -0,0 +1,194 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Recent posts with featured image
|
4 |
+
*
|
5 |
+
* @package Elementor Addon Widgets
|
6 |
+
*/
|
7 |
+
|
8 |
+
class EAW_Recent_Posts_Plus extends WP_Widget {
|
9 |
+
|
10 |
+
public function __construct() {
|
11 |
+
$widget_ops = array(
|
12 |
+
'classname' => 'widget_recent_posts_plus',
|
13 |
+
'description' => __( 'Recent posts with featured image - ideal for use with Elementor Page Builder plugin', 'elementor-addon-widgets' ),
|
14 |
+
'customize_selective_refresh' => true,
|
15 |
+
);
|
16 |
+
|
17 |
+
parent::__construct( 'eaw-recent-posts-plus', __( 'EAW: Elementor Posts By Category', 'elementor-addon-widgets' ), $widget_ops );
|
18 |
+
$this->alt_option_name = 'widget_recent_entries_plus';
|
19 |
+
|
20 |
+
add_action( 'save_post', array( $this, 'flush_widget_cache' ) );
|
21 |
+
add_action( 'deleted_post', array( $this, 'flush_widget_cache' ) );
|
22 |
+
add_action( 'switch_theme', array( $this, 'flush_widget_cache' ) );
|
23 |
+
}
|
24 |
+
|
25 |
+
/**
|
26 |
+
* @param array $args
|
27 |
+
* @param array $instance
|
28 |
+
*/
|
29 |
+
public function widget( $args, $instance ) {
|
30 |
+
$cache = array();
|
31 |
+
if ( ! $this->is_preview() ) {
|
32 |
+
$cache = wp_cache_get( 'widget_recent_posts_plus', 'widget' );
|
33 |
+
}
|
34 |
+
|
35 |
+
if ( ! is_array( $cache ) ) {
|
36 |
+
$cache = array();
|
37 |
+
}
|
38 |
+
|
39 |
+
if ( ! isset( $args['widget_id'] ) ) {
|
40 |
+
$args['widget_id'] = $this->id;
|
41 |
+
}
|
42 |
+
|
43 |
+
if ( isset( $cache[ $args['widget_id'] ] ) ) {
|
44 |
+
echo $cache[ $args['widget_id'] ];
|
45 |
+
|
46 |
+
return;
|
47 |
+
}
|
48 |
+
|
49 |
+
ob_start();
|
50 |
+
|
51 |
+
$title = ( ! empty( $instance['title'] ) ) ? $instance['title'] : '';
|
52 |
+
$title = apply_filters( 'widget_title', $title, $instance, $this->id_base );
|
53 |
+
|
54 |
+
$number = ( ! empty( $instance['number'] ) ) ? absint( $instance['number'] ) : 3;
|
55 |
+
if ( ! $number ) {
|
56 |
+
$number = 3;
|
57 |
+
}
|
58 |
+
|
59 |
+
$category = isset( $instance['category'] ) ? $instance['category'] : '';
|
60 |
+
|
61 |
+
$show_excerpt = isset( $instance['show_excerpt'] ) ? $instance['show_excerpt'] : false;
|
62 |
+
$excerptcount = ( ! empty( $instance['excerptcount'] ) ) ? absint( $instance['excerptcount'] ) : 20;
|
63 |
+
|
64 |
+
if ( '' == $excerptcount || '0' == $excerptcount ) {
|
65 |
+
$excerptcount = 20;
|
66 |
+
}
|
67 |
+
|
68 |
+
$eawp = new WP_Query(
|
69 |
+
apply_filters(
|
70 |
+
'eaw_widget_posts_plus_args', array(
|
71 |
+
'posts_per_page' => $number,
|
72 |
+
'cat' => $category,
|
73 |
+
'no_found_rows' => true,
|
74 |
+
'post_status' => 'publish',
|
75 |
+
'ignore_sticky_posts' => true,
|
76 |
+
)
|
77 |
+
)
|
78 |
+
);
|
79 |
+
|
80 |
+
if ( $eawp->have_posts() ) {
|
81 |
+
|
82 |
+
echo $args['before_widget'];
|
83 |
+
if ( $title ) {
|
84 |
+
echo $args['before_title'] . $title . $args['after_title'];
|
85 |
+
}
|
86 |
+
while ( $eawp->have_posts() ) :
|
87 |
+
$eawp->the_post(); ?>
|
88 |
+
<div class="eaw-recent-posts">
|
89 |
+
<?php
|
90 |
+
if ( has_post_thumbnail() ) {
|
91 |
+
the_post_thumbnail( 'medium' );
|
92 |
+
} ?>
|
93 |
+
<div class="eaw-content">
|
94 |
+
<h3><a href="<?php the_permalink(); ?>"><?php get_the_title() ? the_title() : the_ID(); ?></a>
|
95 |
+
</h3>
|
96 |
+
<p>
|
97 |
+
<?php
|
98 |
+
if ( $show_excerpt ) {
|
99 |
+
echo wp_trim_words( get_the_excerpt(), $excerptcount, ' …' );
|
100 |
+
} ?>
|
101 |
+
</p>
|
102 |
+
</div>
|
103 |
+
</div>
|
104 |
+
<?php
|
105 |
+
endwhile;
|
106 |
+
|
107 |
+
echo $args['after_widget'];
|
108 |
+
|
109 |
+
wp_reset_postdata();
|
110 |
+
|
111 |
+
}
|
112 |
+
|
113 |
+
if ( ! $this->is_preview() ) {
|
114 |
+
$cache[ $args['widget_id'] ] = ob_get_flush();
|
115 |
+
wp_cache_set( 'widget_recent_posts_plus', $cache, 'widget' );
|
116 |
+
} else {
|
117 |
+
ob_end_flush();
|
118 |
+
}
|
119 |
+
}
|
120 |
+
|
121 |
+
public function update( $new_instance, $old_instance ) {
|
122 |
+
$instance = $old_instance;
|
123 |
+
$instance['title'] = strip_tags( $new_instance['title'] );
|
124 |
+
$instance['number'] = (int) $new_instance['number'];
|
125 |
+
$instance['category'] = wp_strip_all_tags( $new_instance['category'] );
|
126 |
+
$instance['excerptcount'] = (int) ( $new_instance['excerptcount'] );
|
127 |
+
$instance['show_excerpt'] = isset( $new_instance['show_excerpt'] ) ? (bool) $new_instance['show_excerpt'] : false;
|
128 |
+
$this->flush_widget_cache();
|
129 |
+
|
130 |
+
$alloptions = wp_cache_get( 'alloptions', 'options' );
|
131 |
+
if ( isset( $alloptions['widget_recent_entries_plus'] ) ) {
|
132 |
+
delete_option( 'widget_recent_entries_plus' );
|
133 |
+
}
|
134 |
+
|
135 |
+
return $instance;
|
136 |
+
}
|
137 |
+
|
138 |
+
/**
|
139 |
+
* @access public
|
140 |
+
*/
|
141 |
+
public function flush_widget_cache() {
|
142 |
+
wp_cache_delete( 'widget_recent_posts_plus', 'widget' );
|
143 |
+
}
|
144 |
+
|
145 |
+
/**
|
146 |
+
* @param array $instance
|
147 |
+
*/
|
148 |
+
public function form( $instance ) {
|
149 |
+
$title = isset( $instance['title'] ) ? esc_attr( $instance['title'] ) : '';
|
150 |
+
$number = isset( $instance['number'] ) ? absint( $instance['number'] ) : 3;
|
151 |
+
$excerptcount = isset( $instance['excerptcount '] ) ? absint( $instance['excerptcount '] ) : 20;
|
152 |
+
$show_excerpt = isset( $instance['show_excerpt'] ) ? (bool) $instance['show_excerpt'] : false;
|
153 |
+
$category = isset( $instance['category'] ) ? $instance['category'] : ''; ?>
|
154 |
+
<p>
|
155 |
+
<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'elementor-addon-widgets' ); ?></label>
|
156 |
+
<input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>"
|
157 |
+
name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo $title; ?>"/>
|
158 |
+
</p>
|
159 |
+
|
160 |
+
<p>
|
161 |
+
<label for="<?php echo $this->get_field_id( 'number' ); ?>"><?php _e( 'Number of posts to show:', 'elementor-addon-widgets' ); ?></label>
|
162 |
+
<input id="<?php echo $this->get_field_id( 'number' ); ?>"
|
163 |
+
name="<?php echo $this->get_field_name( 'number' ); ?>" type="text" value="<?php echo $number; ?>"
|
164 |
+
size="3"/></p>
|
165 |
+
|
166 |
+
<p>
|
167 |
+
<label for="rpjc_widget_cat_recent_posts_category"><?php _e( 'Category', 'elementor-addon-widgets' ); ?>:</label>
|
168 |
+
<?php
|
169 |
+
wp_dropdown_categories(
|
170 |
+
array(
|
171 |
+
|
172 |
+
'orderby' => 'title',
|
173 |
+
'hide_empty' => false,
|
174 |
+
'name' => $this->get_field_name( 'category' ),
|
175 |
+
'id' => 'rpjc_widget_cat_recent_posts_category',
|
176 |
+
'class' => 'widefat',
|
177 |
+
'selected' => $category,
|
178 |
+
)
|
179 |
+
); ?>
|
180 |
+
</p>
|
181 |
+
|
182 |
+
<p><input class="checkbox" type="checkbox" <?php checked( $show_excerpt ); ?>
|
183 |
+
id="<?php echo $this->get_field_id( 'show_excerpt' ); ?>"
|
184 |
+
name="<?php echo $this->get_field_name( 'show_excerpt' ); ?>"/>
|
185 |
+
<label for="<?php echo $this->get_field_id( 'show_dexcerpt' ); ?>"><?php _e( 'Display post excerpt?', 'elementor-addon-widgets' ); ?></label>
|
186 |
+
</p>
|
187 |
+
|
188 |
+
<p>
|
189 |
+
<label for="<?php echo $this->get_field_id( 'excerptcount' ); ?>"><?php _e( 'Excerpt length to show:', 'elementor-addon-widgets' ); ?></label>
|
190 |
+
<input id="<?php echo $this->get_field_id( 'excerptcount' ); ?>"
|
191 |
+
name="<?php echo $this->get_field_name( 'excerptcount' ); ?>" type="text"
|
192 |
+
value="<?php echo $excerptcount; ?>" size="3"/></p>
|
193 |
+
<?php }
|
194 |
+
}
|
vendor/codeinwp/elementor-extra-widgets/widgets/wp/eaw-posts-widget.php
ADDED
@@ -0,0 +1,174 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Recent posts with featured image
|
4 |
+
*
|
5 |
+
* @package Elementor Addon Widgets
|
6 |
+
*/
|
7 |
+
|
8 |
+
class EAW_Recent_Posts extends WP_Widget {
|
9 |
+
|
10 |
+
public function __construct() {
|
11 |
+
$widget_ops = array(
|
12 |
+
'classname' => 'widget_recent_posts',
|
13 |
+
'description' => __( 'Recent posts with featured image - ideal for use with Elementor Page Builder plugin', 'elementor-addon-widgets' ),
|
14 |
+
'customize_selective_refresh' => true,
|
15 |
+
);
|
16 |
+
|
17 |
+
parent::__construct( 'eaw-recent-posts', __( 'EAW: Elementor Recent Posts', 'elementor-addon-widgets' ), $widget_ops );
|
18 |
+
$this->alt_option_name = 'widget_recent_entries';
|
19 |
+
|
20 |
+
add_action( 'save_post', array( $this, 'flush_widget_cache' ) );
|
21 |
+
add_action( 'deleted_post', array( $this, 'flush_widget_cache' ) );
|
22 |
+
add_action( 'switch_theme', array( $this, 'flush_widget_cache' ) );
|
23 |
+
}
|
24 |
+
|
25 |
+
/**
|
26 |
+
* @param array $args
|
27 |
+
* @param array $instance
|
28 |
+
*/
|
29 |
+
public function widget( $args, $instance ) {
|
30 |
+
$cache = array();
|
31 |
+
if ( ! $this->is_preview() ) {
|
32 |
+
$cache = wp_cache_get( 'widget_recent_posts', 'widget' );
|
33 |
+
}
|
34 |
+
|
35 |
+
if ( ! is_array( $cache ) ) {
|
36 |
+
$cache = array();
|
37 |
+
}
|
38 |
+
|
39 |
+
if ( ! isset( $args['widget_id'] ) ) {
|
40 |
+
$args['widget_id'] = $this->id;
|
41 |
+
}
|
42 |
+
|
43 |
+
if ( isset( $cache[ $args['widget_id'] ] ) ) {
|
44 |
+
echo $cache[ $args['widget_id'] ];
|
45 |
+
|
46 |
+
return;
|
47 |
+
}
|
48 |
+
|
49 |
+
ob_start();
|
50 |
+
|
51 |
+
$title = ( ! empty( $instance['title'] ) ) ? $instance['title'] : '';
|
52 |
+
$title = apply_filters( 'widget_title', $title, $instance, $this->id_base );
|
53 |
+
|
54 |
+
$number = ( ! empty( $instance['number'] ) ) ? absint( $instance['number'] ) : 3;
|
55 |
+
if ( ! $number ) {
|
56 |
+
$number = 3;
|
57 |
+
}
|
58 |
+
$show_excerpt = isset( $instance['show_excerpt'] ) ? $instance['show_excerpt'] : false;
|
59 |
+
$excerptcount = ( ! empty( $instance['excerptcount'] ) ) ? absint( $instance['excerptcount'] ) : 20;
|
60 |
+
|
61 |
+
if ( '' == $excerptcount || '0' == $excerptcount ) {
|
62 |
+
$excerptcount = 20;
|
63 |
+
}
|
64 |
+
|
65 |
+
$eawp = new WP_Query(
|
66 |
+
apply_filters(
|
67 |
+
'eaw_widget_posts_args', array(
|
68 |
+
'posts_per_page' => $number,
|
69 |
+
'no_found_rows' => true,
|
70 |
+
'post_status' => 'publish',
|
71 |
+
'ignore_sticky_posts' => true,
|
72 |
+
)
|
73 |
+
)
|
74 |
+
);
|
75 |
+
|
76 |
+
if ( $eawp->have_posts() ) {
|
77 |
+
echo $args['before_widget'];
|
78 |
+
|
79 |
+
if ( $title ) {
|
80 |
+
echo $args['before_title'] . $title . $args['after_title'];
|
81 |
+
}
|
82 |
+
|
83 |
+
while ( $eawp->have_posts() ) :
|
84 |
+
$eawp->the_post(); ?>
|
85 |
+
<div class="eaw-recent-posts">
|
86 |
+
<?php
|
87 |
+
if ( has_post_thumbnail() ) {
|
88 |
+
the_post_thumbnail( 'medium' );
|
89 |
+
} ?>
|
90 |
+
<div class="eaw-content">
|
91 |
+
<h3><a href="<?php the_permalink(); ?>"><?php get_the_title() ? the_title() : the_ID(); ?></a>
|
92 |
+
</h3>
|
93 |
+
<p>
|
94 |
+
<?php
|
95 |
+
if ( $show_excerpt ) {
|
96 |
+
echo wp_trim_words( get_the_excerpt(), $excerptcount, ' …' );
|
97 |
+
} ?>
|
98 |
+
</p>
|
99 |
+
</div>
|
100 |
+
</div>
|
101 |
+
<?php
|
102 |
+
endwhile;
|
103 |
+
|
104 |
+
echo $args['after_widget'];
|
105 |
+
|
106 |
+
wp_reset_postdata();
|
107 |
+
|
108 |
+
}
|
109 |
+
|
110 |
+
if ( ! $this->is_preview() ) {
|
111 |
+
$cache[ $args['widget_id'] ] = ob_get_flush();
|
112 |
+
wp_cache_set( 'widget_recent_posts', $cache, 'widget' );
|
113 |
+
} else {
|
114 |
+
ob_end_flush();
|
115 |
+
}
|
116 |
+
}
|
117 |
+
|
118 |
+
public function update( $new_instance, $old_instance ) {
|
119 |
+
$instance = $old_instance;
|
120 |
+
$instance['title'] = strip_tags( $new_instance['title'] );
|
121 |
+
$instance['number'] = (int) $new_instance['number'];
|
122 |
+
$instance['excerptcount'] = (int) ( $new_instance['excerptcount'] );
|
123 |
+
$instance['show_excerpt'] = isset( $new_instance['show_excerpt'] ) ? (bool) $new_instance['show_excerpt'] : false;
|
124 |
+
$this->flush_widget_cache();
|
125 |
+
|
126 |
+
$alloptions = wp_cache_get( 'alloptions', 'options' );
|
127 |
+
if ( isset( $alloptions['widget_recent_entries'] ) ) {
|
128 |
+
delete_option( 'widget_recent_entries' );
|
129 |
+
}
|
130 |
+
|
131 |
+
return $instance;
|
132 |
+
}
|
133 |
+
|
134 |
+
/**
|
135 |
+
* @access public
|
136 |
+
*/
|
137 |
+
public function flush_widget_cache() {
|
138 |
+
wp_cache_delete( 'widget_recent_posts', 'widget' );
|
139 |
+
}
|
140 |
+
|
141 |
+
/**
|
142 |
+
* @param array $instance
|
143 |
+
*/
|
144 |
+
public function form( $instance ) {
|
145 |
+
$title = isset( $instance['title'] ) ? esc_attr( $instance['title'] ) : '';
|
146 |
+
$number = isset( $instance['number'] ) ? absint( $instance['number'] ) : 3;
|
147 |
+
$excerptcount = isset( $instance['excerptcount '] ) ? absint( $instance['excerptcount '] ) : 20;
|
148 |
+
$show_excerpt = isset( $instance['show_excerpt'] ) ? (bool) $instance['show_excerpt'] : false; ?>
|
149 |
+
<p>
|
150 |
+
<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'elementor-addon-widgets' ); ?></label>
|
151 |
+
<input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>"
|
152 |
+
name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo $title; ?>"/>
|
153 |
+
</p>
|
154 |
+
|
155 |
+
<p>
|
156 |
+
<label for="<?php echo $this->get_field_id( 'number' ); ?>"><?php _e( 'Number of posts to show:', 'elementor-addon-widgets' ); ?></label>
|
157 |
+
<input id="<?php echo $this->get_field_id( 'number' ); ?>"
|
158 |
+
name="<?php echo $this->get_field_name( 'number' ); ?>" type="text" value="<?php echo $number; ?>"
|
159 |
+
size="3"/></p>
|
160 |
+
|
161 |
+
<p><input class="checkbox" type="checkbox" <?php checked( $show_excerpt ); ?>
|
162 |
+
id="<?php echo $this->get_field_id( 'show_excerpt' ); ?>"
|
163 |
+
name="<?php echo $this->get_field_name( 'show_excerpt' ); ?>"/>
|
164 |
+
<label for="<?php echo $this->get_field_id( 'show_dexcerpt' ); ?>"><?php _e( 'Display post excerpt?', 'elementor-addon-widgets' ); ?></label>
|
165 |
+
</p>
|
166 |
+
|
167 |
+
<p>
|
168 |
+
<label for="<?php echo $this->get_field_id( 'excerptcount' ); ?>"><?php _e( 'Excerpt length to show:', 'elementor-addon-widgets' ); ?></label>
|
169 |
+
<input id="<?php echo $this->get_field_id( 'excerptcount' ); ?>"
|
170 |
+
name="<?php echo $this->get_field_name( 'excerptcount' ); ?>" type="text"
|
171 |
+
value="<?php echo $excerptcount; ?>" size="3"/></p>
|
172 |
+
<?php
|
173 |
+
}
|
174 |
+
}
|
vendor/codeinwp/full-width-page-templates/builders/class-elementor-full-width-templates.php
ADDED
@@ -0,0 +1,121 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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-addon-widgets' ), '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-addon-widgets' ), '1.0.0' );
|
120 |
+
}
|
121 |
+
}
|
vendor/codeinwp/full-width-page-templates/class-full-width-templates.php
ADDED
@@ -0,0 +1,203 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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-addon-widgets' ),
|
39 |
+
'templates/builder-fullwidth-std.php' => '↔ ' . __( 'Page Builder - Full Width', 'elementor-addon-widgets' ),
|
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-addon-widgets' ), '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-addon-widgets' ), '1.0.0' );
|
201 |
+
}
|
202 |
+
}
|
203 |
+
}
|
vendor/codeinwp/full-width-page-templates/composer.json
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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/templates-directory/LICENSE
ADDED
@@ -0,0 +1,201 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Apache License
|
2 |
+
Version 2.0, January 2004
|
3 |
+
http://www.apache.org/licenses/
|
4 |
+
|
5 |
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
6 |
+
|
7 |
+
1. Definitions.
|
8 |
+
|
9 |
+
"License" shall mean the terms and conditions for use, reproduction,
|
10 |
+
and distribution as defined by Sections 1 through 9 of this document.
|
11 |
+
|
12 |
+
"Licensor" shall mean the copyright owner or entity authorized by
|
13 |
+
the copyright owner that is granting the License.
|
14 |
+
|
15 |
+
"Legal Entity" shall mean the union of the acting entity and all
|
16 |
+
other entities that control, are controlled by, or are under common
|
17 |
+
control with that entity. For the purposes of this definition,
|
18 |
+
"control" means (i) the power, direct or indirect, to cause the
|
19 |
+
direction or management of such entity, whether by contract or
|
20 |
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
21 |
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
22 |
+
|
23 |
+
"You" (or "Your") shall mean an individual or Legal Entity
|
24 |
+
exercising permissions granted by this License.
|
25 |
+
|
26 |
+
"Source" form shall mean the preferred form for making modifications,
|
27 |
+
including but not limited to software source code, documentation
|
28 |
+
source, and configuration files.
|
29 |
+
|
30 |
+
"Object" form shall mean any form resulting from mechanical
|
31 |
+
transformation or translation of a Source form, including but
|
32 |
+
not limited to compiled object code, generated documentation,
|
33 |
+
and conversions to other media types.
|
34 |
+
|
35 |
+
"Work" shall mean the work of authorship, whether in Source or
|
36 |
+
Object form, made available under the License, as indicated by a
|
37 |
+
copyright notice that is included in or attached to the work
|
38 |
+
(an example is provided in the Appendix below).
|
39 |
+
|
40 |
+
"Derivative Works" shall mean any work, whether in Source or Object
|
41 |
+
form, that is based on (or derived from) the Work and for which the
|
42 |
+
editorial revisions, annotations, elaborations, or other modifications
|
43 |
+
represent, as a whole, an original work of authorship. For the purposes
|
44 |
+
of this License, Derivative Works shall not include works that remain
|
45 |
+
separable from, or merely link (or bind by name) to the interfaces of,
|
46 |
+
the Work and Derivative Works thereof.
|
47 |
+
|
48 |
+
"Contribution" shall mean any work of authorship, including
|
49 |
+
the original version of the Work and any modifications or additions
|
50 |
+
to that Work or Derivative Works thereof, that is intentionally
|
51 |
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
52 |
+
or by an individual or Legal Entity authorized to submit on behalf of
|
53 |
+
the copyright owner. For the purposes of this definition, "submitted"
|
54 |
+
means any form of electronic, verbal, or written communication sent
|
55 |
+
to the Licensor or its representatives, including but not limited to
|
56 |
+
communication on electronic mailing lists, source code control systems,
|
57 |
+
and issue tracking systems that are managed by, or on behalf of, the
|
58 |
+
Licensor for the purpose of discussing and improving the Work, but
|
59 |
+
excluding communication that is conspicuously marked or otherwise
|
60 |
+
designated in writing by the copyright owner as "Not a Contribution."
|
61 |
+
|
62 |
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
63 |
+
on behalf of whom a Contribution has been received by Licensor and
|
64 |
+
subsequently incorporated within the Work.
|
65 |
+
|
66 |
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
67 |
+
this License, each Contributor hereby grants to You a perpetual,
|
68 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
69 |
+
copyright license to reproduce, prepare Derivative Works of,
|
70 |
+
publicly display, publicly perform, sublicense, and distribute the
|
71 |
+
Work and such Derivative Works in Source or Object form.
|
72 |
+
|
73 |
+
3. Grant of Patent License. Subject to the terms and conditions of
|
74 |
+
this License, each Contributor hereby grants to You a perpetual,
|
75 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
76 |
+
(except as stated in this section) patent license to make, have made,
|
77 |
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
78 |
+
where such license applies only to those patent claims licensable
|
79 |
+
by such Contributor that are necessarily infringed by their
|
80 |
+
Contribution(s) alone or by combination of their Contribution(s)
|
81 |
+
with the Work to which such Contribution(s) was submitted. If You
|
82 |
+
institute patent litigation against any entity (including a
|
83 |
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
84 |
+
or a Contribution incorporated within the Work constitutes direct
|
85 |
+
or contributory patent infringement, then any patent licenses
|
86 |
+
granted to You under this License for that Work shall terminate
|
87 |
+
as of the date such litigation is filed.
|
88 |
+
|
89 |
+
4. Redistribution. You may reproduce and distribute copies of the
|
90 |
+
Work or Derivative Works thereof in any medium, with or without
|
91 |
+
modifications, and in Source or Object form, provided that You
|
92 |
+
meet the following conditions:
|
93 |
+
|
94 |
+
(a) You must give any other recipients of the Work or
|
95 |
+
Derivative Works a copy of this License; and
|
96 |
+
|
97 |
+
(b) You must cause any modified files to carry prominent notices
|
98 |
+
stating that You changed the files; and
|
99 |
+
|
100 |
+
(c) You must retain, in the Source form of any Derivative Works
|
101 |
+
that You distribute, all copyright, patent, trademark, and
|
102 |
+
attribution notices from the Source form of the Work,
|
103 |
+
excluding those notices that do not pertain to any part of
|
104 |
+
the Derivative Works; and
|
105 |
+
|
106 |
+
(d) If the Work includes a "NOTICE" text file as part of its
|
107 |
+
distribution, then any Derivative Works that You distribute must
|
108 |
+
include a readable copy of the attribution notices contained
|
109 |
+
within such NOTICE file, excluding those notices that do not
|
110 |
+
pertain to any part of the Derivative Works, in at least one
|
111 |
+
of the following places: within a NOTICE text file distributed
|
112 |
+
as part of the Derivative Works; within the Source form or
|
113 |
+
documentation, if provided along with the Derivative Works; or,
|
114 |
+
within a display generated by the Derivative Works, if and
|
115 |
+
wherever such third-party notices normally appear. The contents
|
116 |
+
of the NOTICE file are for informational purposes only and
|
117 |
+
do not modify the License. You may add Your own attribution
|
118 |
+
notices within Derivative Works that You distribute, alongside
|
119 |
+
or as an addendum to the NOTICE text from the Work, provided
|
120 |
+
that such additional attribution notices cannot be construed
|
121 |
+
as modifying the License.
|
122 |
+
|
123 |
+
You may add Your own copyright statement to Your modifications and
|
124 |
+
may provide additional or different license terms and conditions
|
125 |
+
for use, reproduction, or distribution of Your modifications, or
|
126 |
+
for any such Derivative Works as a whole, provided Your use,
|
127 |
+
reproduction, and distribution of the Work otherwise complies with
|
128 |
+
the conditions stated in this License.
|
129 |
+
|
130 |
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
131 |
+
any Contribution intentionally submitted for inclusion in the Work
|
132 |
+
by You to the Licensor shall be under the terms and conditions of
|
133 |
+
this License, without any additional terms or conditions.
|
134 |
+
Notwithstanding the above, nothing herein shall supersede or modify
|
135 |
+
the terms of any separate license agreement you may have executed
|
136 |
+
with Licensor regarding such Contributions.
|
137 |
+
|
138 |
+
6. Trademarks. This License does not grant permission to use the trade
|
139 |
+
names, trademarks, service marks, or product names of the Licensor,
|
140 |
+
except as required for reasonable and customary use in describing the
|
141 |
+
origin of the Work and reproducing the content of the NOTICE file.
|
142 |
+
|
143 |
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
144 |
+
agreed to in writing, Licensor provides the Work (and each
|
145 |
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
146 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
147 |
+
implied, including, without limitation, any warranties or conditions
|
148 |
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
149 |
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
150 |
+
appropriateness of using or redistributing the Work and assume any
|
151 |
+
risks associated with Your exercise of permissions under this License.
|
152 |
+
|
153 |
+
8. Limitation of Liability. In no event and under no legal theory,
|
154 |
+
whether in tort (including negligence), contract, or otherwise,
|
155 |
+
unless required by applicable law (such as deliberate and grossly
|
156 |
+
negligent acts) or agreed to in writing, shall any Contributor be
|
157 |
+
liable to You for damages, including any direct, indirect, special,
|
158 |
+
incidental, or consequential damages of any character arising as a
|
159 |
+
result of this License or out of the use or inability to use the
|
160 |
+
Work (including but not limited to damages for loss of goodwill,
|
161 |
+
work stoppage, computer failure or malfunction, or any and all
|
162 |
+
other commercial damages or losses), even if such Contributor
|
163 |
+
has been advised of the possibility of such damages.
|
164 |
+
|
165 |
+
9. Accepting Warranty or Additional Liability. While redistributing
|
166 |
+
the Work or Derivative Works thereof, You may choose to offer,
|
167 |
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
168 |
+
or other liability obligations and/or rights consistent with this
|
169 |
+
License. However, in accepting such obligations, You may act only
|
170 |
+
on Your own behalf and on Your sole responsibility, not on behalf
|
171 |
+
of any other Contributor, and only if You agree to indemnify,
|
172 |
+
defend, and hold each Contributor harmless for any liability
|
173 |
+
incurred by, or claims asserted against, such Contributor by reason
|
174 |
+
of your accepting any such warranty or additional liability.
|
175 |
+
|
176 |
+
END OF TERMS AND CONDITIONS
|
177 |
+
|
178 |
+
APPENDIX: How to apply the Apache License to your work.
|
179 |
+
|
180 |
+
To apply the Apache License to your work, attach the following
|
181 |
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
182 |
+
replaced with your own identifying information. (Don't include
|
183 |
+
the brackets!) The text should be enclosed in the appropriate
|
184 |
+
comment syntax for the file format. We also recommend that a
|
185 |
+
file or class name and description of purpose be included on the
|
186 |
+
same "printed page" as the copyright notice for easier
|
187 |
+
identification within third-party archives.
|
188 |
+
|
189 |
+
Copyright [yyyy] [name of copyright owner]
|
190 |
+
|
191 |
+
Licensed under the Apache License, Version 2.0 (the "License");
|
192 |
+
you may not use this file except in compliance with the License.
|
193 |
+
You may obtain a copy of the License at
|
194 |
+
|
195 |
+
http://www.apache.org/licenses/LICENSE-2.0
|
196 |
+
|
197 |
+
Unless required by applicable law or agreed to in writing, software
|
198 |
+
distributed under the License is distributed on an "AS IS" BASIS,
|
199 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
200 |
+
See the License for the specific language governing permissions and
|
201 |
+
limitations under the License.
|
vendor/codeinwp/templates-directory/class-page-templates-directory.php
ADDED
@@ -0,0 +1,571 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace ThemeIsle;
|
4 |
+
|
5 |
+
if ( ! class_exists( '\ThemeIsle\PageTemplatesDirectory' ) ) {
|
6 |
+
class PageTemplatesDirectory {
|
7 |
+
|
8 |
+
/**
|
9 |
+
* @var PageTemplatesDirectory
|
10 |
+
*/
|
11 |
+
protected static $instance = null;
|
12 |
+
|
13 |
+
/**
|
14 |
+
* The version of this library
|
15 |
+
* @var string
|
16 |
+
*/
|
17 |
+
public static $version = '1.0.2';
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Holds the module slug.
|
21 |
+
*
|
22 |
+
* @since 1.0.0
|
23 |
+
* @access protected
|
24 |
+
* @var string $slug The module slug.
|
25 |
+
*/
|
26 |
+
protected $slug = 'templates-directory';
|
27 |
+
|
28 |
+
protected $source_url;
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Defines the library behaviour
|
32 |
+
*/
|
33 |
+
protected function init() {
|
34 |
+
add_action( 'rest_api_init', array( $this, 'register_endpoints' ) );
|
35 |
+
//Add dashboard menu page.
|
36 |
+
add_action( 'admin_menu', array( $this, 'add_menu_page' ), 100 );
|
37 |
+
//Add rewrite endpoint.
|
38 |
+
add_action( 'init', array( $this, 'demo_listing_register' ) );
|
39 |
+
//Add template redirect.
|
40 |
+
add_action( 'template_redirect', array( $this, 'demo_listing' ) );
|
41 |
+
//Enqueue admin scripts.
|
42 |
+
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_template_dir_scripts' ) );
|
43 |
+
// Get the full-width pages feature
|
44 |
+
add_action( 'init', array( $this, 'load_full_width_page_templates' ), 11 );
|
45 |
+
// Remove the blank template from the page template selector
|
46 |
+
add_filter( 'fwpt_templates_list', array( $this, 'filter_fwpt_templates_list' ) );
|
47 |
+
// Filter to add fetched.
|
48 |
+
add_filter( 'template_directory_templates_list', array( $this, 'filter_templates' ), 99 );
|
49 |
+
|
50 |
+
|
51 |
+
$default_source_url = apply_filters( 'templates_directory_source_url', 'https://raw.githubusercontent.com/Codeinwp/obfx-templates/master/' );
|
52 |
+
$this->set_source_url( $default_source_url );
|
53 |
+
}
|
54 |
+
|
55 |
+
/**
|
56 |
+
* Enqueue the scripts for the dashboard page of the
|
57 |
+
*/
|
58 |
+
public function enqueue_template_dir_scripts() {
|
59 |
+
$current_screen = get_current_screen();
|
60 |
+
if ( $current_screen->id === 'orbit-fox_page_obfx_template_dir' || $current_screen->id === 'sizzify_page_sizzify_template_dir' ) {
|
61 |
+
if( $current_screen->id === 'orbit-fox_page_obfx_template_dir' ) {
|
62 |
+
$plugin_slug = 'obfx';
|
63 |
+
} else {
|
64 |
+
$plugin_slug = 'sizzify';
|
65 |
+
}
|
66 |
+
$script_handle = $this->slug . '-script';
|
67 |
+
wp_enqueue_script( 'plugin-install' );
|
68 |
+
wp_enqueue_script( 'updates' );
|
69 |
+
wp_register_script( $script_handle, plugin_dir_url( $this->get_dir() ) . $this->slug . '/js/script.js', array( 'jquery' ), $this::$version );
|
70 |
+
wp_localize_script( $script_handle, 'importer_endpoint',
|
71 |
+
array(
|
72 |
+
'url' => $this->get_endpoint_url( '/import_elementor' ),
|
73 |
+
'plugin_slug' => $plugin_slug,
|
74 |
+
'fetch_templates_url' => $this->get_endpoint_url( '/fetch_templates' ),
|
75 |
+
'nonce' => wp_create_nonce( 'wp_rest' ),
|
76 |
+
) );
|
77 |
+
wp_enqueue_script( $script_handle );
|
78 |
+
wp_enqueue_style( $this->slug . '-style', plugin_dir_url( $this->get_dir() ) . $this->slug . '/css/admin.css', array(), $this::$version );
|
79 |
+
}
|
80 |
+
}
|
81 |
+
|
82 |
+
/**
|
83 |
+
*
|
84 |
+
*
|
85 |
+
* @param string $path
|
86 |
+
*
|
87 |
+
* @return string
|
88 |
+
*/
|
89 |
+
public function get_endpoint_url( $path = '' ) {
|
90 |
+
return rest_url( $this->slug . $path );
|
91 |
+
}
|
92 |
+
|
93 |
+
/**
|
94 |
+
* Register Rest endpoint for requests.
|
95 |
+
*/
|
96 |
+
public function register_endpoints() {
|
97 |
+
register_rest_route( $this->slug, '/import_elementor', array(
|
98 |
+
'methods' => 'POST',
|
99 |
+
'callback' => array( $this, 'import_elementor' ),
|
100 |
+
) );
|
101 |
+
register_rest_route( $this->slug, '/fetch_templates', array(
|
102 |
+
'methods' => 'POST',
|
103 |
+
'callback' => array( $this, 'fetch_templates' ),
|
104 |
+
) );
|
105 |
+
}
|
106 |
+
|
107 |
+
/**
|
108 |
+
* Function to fetch templates.
|
109 |
+
*
|
110 |
+
* @return array|bool|\WP_Error
|
111 |
+
*/
|
112 |
+
public function fetch_templates() {
|
113 |
+
if ( ! current_user_can( 'manage_options' ) ) {
|
114 |
+
return false;
|
115 |
+
}
|
116 |
+
if( empty ( $_POST['plugin_slug'] ) ) {
|
117 |
+
return false;
|
118 |
+
}
|
119 |
+
|
120 |
+
$plugin_slug = $_POST['plugin_slug'];
|
121 |
+
$query_args = array( 'license' => '', 'url' => get_home_url(), 'name' => $plugin_slug );
|
122 |
+
|
123 |
+
$license = get_option('eaw_premium_license');
|
124 |
+
if( !empty ( $license ) ) {
|
125 |
+
$query_args['license'] = $license;
|
126 |
+
}
|
127 |
+
$url = add_query_arg( $query_args, 'https://themeisle.com/?edd_action=get_templates' );
|
128 |
+
|
129 |
+
$request = wp_remote_post( esc_url_raw( $url ) );
|
130 |
+
$response = json_decode( $request['body'], true );
|
131 |
+
|
132 |
+
if( !empty( $response ) ) {
|
133 |
+
update_option( $plugin_slug . '_synced_templates', $response );
|
134 |
+
}
|
135 |
+
die();
|
136 |
+
}
|
137 |
+
|
138 |
+
public function filter_templates($templates) {
|
139 |
+
$current_screen = get_current_screen();
|
140 |
+
if ( $current_screen->id === 'orbit-fox_page_obfx_template_dir' ) {
|
141 |
+
$fetched = get_option( 'obfx_synced_templates' );
|
142 |
+
} else {
|
143 |
+
$fetched = get_option( 'sizzify_synced_templates' );
|
144 |
+
}
|
145 |
+
if( ! isset( $fetched ) ) {
|
146 |
+
return $templates;
|
147 |
+
}
|
148 |
+
if( ! is_array( $fetched ) ) {
|
149 |
+
return $templates;
|
150 |
+
}
|
151 |
+
$new_templates = array_merge( $fetched['templates'], $templates );
|
152 |
+
return $new_templates;
|
153 |
+
}
|
154 |
+
|
155 |
+
/**
|
156 |
+
* The templates list.
|
157 |
+
*
|
158 |
+
* @return array
|
159 |
+
*/
|
160 |
+
public function templates_list() {
|
161 |
+
$defaults_if_empty = array(
|
162 |
+
'title' => __( 'A new Orbit Fox Template', 'elementor-addon-widgets' ),
|
163 |
+
'screenshot' => esc_url( 'https://raw.githubusercontent.com/Codeinwp/obfx-templates/master/placeholder.png' ),
|
164 |
+
'description' => __( 'This is an awesome Orbit Fox Template.', 'elementor-addon-widgets' ),
|
165 |
+
'demo_url' => esc_url( 'https://demo.themeisle.com/hestia-pro-demo-content/demo-placeholder/' ),
|
166 |
+
'import_file' => '',
|
167 |
+
'required_plugins' => array( 'elementor' => array( 'title' => __( 'Elementor Page Builder', 'elementor-addon-widgets' ) ) ),
|
168 |
+
);
|
169 |
+
|
170 |
+
$templates_list = array(
|
171 |
+
'about-our-business-elementor' => array(
|
172 |
+
'title' => __( 'About Our Business', 'elementor-addon-widgets' ),
|
173 |
+
'description' => __( 'Use this layout to present your business in a fancy way. Add an interactive header, shwocase your services via progress bars, introduce your team members, and locate your headquarters on Google Maps. Last but not least, beautify the design by adding catchy images.', 'elementor-addon-widgets' ),
|
174 |
+
'demo_url' => 'https://demo.themeisle.com/hestia-pro-demo-content/about-our-business-elementor/',
|
175 |
+
'screenshot' => esc_url( $this->get_source_url() . 'about-our-business-elementor/screenshot.png' ),
|
176 |
+
'import_file' => esc_url( $this->get_source_url() . 'about-our-business-elementor/template.json' ),
|
177 |
+
),
|
178 |
+
'contact-us-elementor' => array(
|
179 |
+
'title' => __( 'Contact Us', 'elementor-addon-widgets' ),
|
180 |
+
'description' => __( 'A clean and simple template for your Contact page, where we integrated our Pirate Forms plugin. It will let your customers send you a message using an intuitive form. A Google map, together with a few other details about your business, completes the section.', 'elementor-addon-widgets' ),
|
181 |
+
'demo_url' => 'https://demo.themeisle.com/hestia-pro-demo-content/contact-us-elementor/',
|
182 |
+
'screenshot' => esc_url( $this->get_source_url() . 'contact-us-elementor/screenshot.png' ),
|
183 |
+
'import_file' => esc_url( $this->get_source_url() . 'contact-us-elementor/template.json' ),
|
184 |
+
),
|
185 |
+
'pricing-elementor' => array(
|
186 |
+
'title' => __( 'Pricing', 'elementor-addon-widgets' ),
|
187 |
+
'description' => __( 'If you plan to sell your products online, this layout offers you elegant pricing tables so you can differentiate the features and services for your clients. Also, for a better clarification, the template provides a FAQ area where you can answer people\'s questions.', 'elementor-addon-widgets' ),
|
188 |
+
'demo_url' => 'https://demo.themeisle.com/hestia-pro-demo-content/pricing-elementor/',
|
189 |
+
'screenshot' => esc_url( $this->get_source_url() . 'pricing-elementor/screenshot.png' ),
|
190 |
+
'import_file' => esc_url( $this->get_source_url() . 'pricing-elementor/template.json' ),
|
191 |
+
),
|
192 |
+
'material-homepage-elementor' => array(
|
193 |
+
'title' => __( 'Material Homepage', 'elementor-addon-widgets' ),
|
194 |
+
'description' => __( 'This layout could be your main website homepage (or you can use it as an alternative homepage, if you wish). It was built on material design and comes with call to action, catchy icons, testimonials, blog posts, pricing plans, and other sections that you can add yourself by customizing it.', 'elementor-addon-widgets' ),
|
195 |
+
'demo_url' => 'https://demo.themeisle.com/hestia-pro-demo-content/material-homepage-elementor/',
|
196 |
+
'screenshot' => esc_url( $this->get_source_url() . 'material-homepage-elementor/screenshot.png' ),
|
197 |
+
'import_file' => esc_url( $this->get_source_url() . 'material-homepage-elementor/template.json' ),
|
198 |
+
),
|
199 |
+
'ether-elementor' => array(
|
200 |
+
'title' => __( 'Ether - Landing Page', 'elementor-addon-widgets' ),
|
201 |
+
'description' => __( 'An elegant and modern landing page for e-commerce, coming with a clean interface, beautiful typography, photo galleries, and call to action. If you have an online shop and want to promote a certain product, use this layout to tell people why they should buy it.', 'elementor-addon-widgets' ),
|
202 |
+
'demo_url' => 'https://demo.themeisle.com/hestia-pro-demo-content/ether-elementor/',
|
203 |
+
'screenshot' => esc_url( $this->get_source_url() . 'ether-elementor/screenshot.png' ),
|
204 |
+
'import_file' => esc_url( $this->get_source_url() . 'ether-elementor/template.json' ),
|
205 |
+
),
|
206 |
+
'jason-elementor' => array(
|
207 |
+
'title' => __( 'Jason - Landing Page', 'elementor-addon-widgets' ),
|
208 |
+
'description' => __( 'A classy template for freelancers, where you can put your skills and knowldge in the spotlight for potential clients. Talk about yourself, your projects, awards, and let people contact you easily. The template is designed to feature one-page scrolling.', 'elementor-addon-widgets' ),
|
209 |
+
'demo_url' => 'https://demo.themeisle.com/hestia-pro-demo-content/jason-elementor/',
|
210 |
+
'screenshot' => esc_url( $this->get_source_url() . 'jason-elementor/screenshot.png' ),
|
211 |
+
'import_file' => esc_url( $this->get_source_url() . 'jason-elementor/template.json' ),
|
212 |
+
),
|
213 |
+
'pulse-elementor' => array(
|
214 |
+
'title' => __( 'Pulse - Landing Page', 'elementor-addon-widgets' ),
|
215 |
+
'description' => __( 'A good-looking landing page for products and apps, built to mark the features and services that they offer. The layout provides customer reviews, call to action, beautiful pricing tables, an About section, and a creative design. If you want to promote and sell your brand product, this template might help.', 'elementor-addon-widgets' ),
|
216 |
+
'demo_url' => 'https://demo.themeisle.com/hestia-pro-demo-content/pulse-elementor/',
|
217 |
+
'screenshot' => esc_url( $this->get_source_url() . 'pulse-elementor/screenshot.png' ),
|
218 |
+
'import_file' => esc_url( $this->get_source_url() . 'pulse-elementor/template.json' ),
|
219 |
+
),
|
220 |
+
'ascend-elementor' => array(
|
221 |
+
'title' => __( 'Ascend - Landing Page', 'elementor-addon-widgets' ),
|
222 |
+
'description' => __( 'A resume-like template, built for outdoor enthusiasts and nature lovers. Its design and layout make it flexible for any other purpose too, so do not hesitate to showcase any kind of skills and activities, even business-oriented.', 'elementor-addon-widgets' ),
|
223 |
+
'demo_url' => 'https://demo.themeisle.com/hestia-pro-demo-content/ascend-elementor/',
|
224 |
+
'screenshot' => esc_url( $this->get_source_url() . 'ascend-elementor/screenshot.png' ),
|
225 |
+
'import_file' => esc_url( $this->get_source_url() . 'ascend-elementor/template.json' ),
|
226 |
+
),
|
227 |
+
'path-elementor' => array(
|
228 |
+
'title' => __( 'Path - Landing Page', 'elementor-addon-widgets' ),
|
229 |
+
'description' => __( 'If you are a business consultant - agency or working on your own - have a look at this template! It comes with a clean design, call to action, statistics, and sections that put your services first.', 'elementor-addon-widgets' ),
|
230 |
+
'demo_url' => 'https://demo.themeisle.com/hestia-pro-demo-content/path-elementor/',
|
231 |
+
'screenshot' => esc_url( $this->get_source_url() . 'path-elementor/screenshot.png' ),
|
232 |
+
'import_file' => esc_url( $this->get_source_url() . 'path-elementor/template.json' ),
|
233 |
+
),
|
234 |
+
'mocha-elementor' => array(
|
235 |
+
'title' => __( 'Mocha - Landing Page', 'elementor-addon-widgets' ),
|
236 |
+
'description' => __( 'An elegant and modern template for cafes and pubs, where you can display your menu in a mouth-watering way. Call to action, blog posts, attractive images, tabbed menus, and a catchy design will help you convince more people to stop by.', 'elementor-addon-widgets' ),
|
237 |
+
'demo_url' => 'https://demo.themeisle.com/hestia-pro-demo-content/mocha-elementor/',
|
238 |
+
'screenshot' => esc_url( $this->get_source_url() . 'mocha-elementor/screenshot.png' ),
|
239 |
+
'import_file' => esc_url( $this->get_source_url() . 'mocha-elementor/template.json' ),
|
240 |
+
),
|
241 |
+
);
|
242 |
+
|
243 |
+
foreach ( $templates_list as $template => $properties ) {
|
244 |
+
$templates_list[ $template ] = wp_parse_args( $properties, $defaults_if_empty );
|
245 |
+
}
|
246 |
+
|
247 |
+
return apply_filters( 'template_directory_templates_list', $templates_list );
|
248 |
+
}
|
249 |
+
|
250 |
+
/**
|
251 |
+
* Register endpoint for themes page.
|
252 |
+
*/
|
253 |
+
public function demo_listing_register() {
|
254 |
+
add_rewrite_endpoint( 'obfx_templates', EP_ROOT );
|
255 |
+
}
|
256 |
+
|
257 |
+
/**
|
258 |
+
* Return template preview in customizer.
|
259 |
+
*
|
260 |
+
* @return bool|string
|
261 |
+
*/
|
262 |
+
public function demo_listing() {
|
263 |
+
$flag = get_query_var( 'obfx_templates', false );
|
264 |
+
|
265 |
+
if ( $flag !== '' ) {
|
266 |
+
return false;
|
267 |
+
}
|
268 |
+
if ( ! current_user_can( 'customize' ) ) {
|
269 |
+
return false;
|
270 |
+
}
|
271 |
+
if ( ! is_customize_preview() ) {
|
272 |
+
return false;
|
273 |
+
}
|
274 |
+
|
275 |
+
return $this->render_view( 'template-directory-render-template' );
|
276 |
+
}
|
277 |
+
|
278 |
+
/**
|
279 |
+
* Add the 'Template Directory' page to the dashboard menu.
|
280 |
+
*/
|
281 |
+
public function add_menu_page() {
|
282 |
+
$products = apply_filters( 'obfx_template_dir_products', array() );
|
283 |
+
foreach($products as $product){
|
284 |
+
add_submenu_page(
|
285 |
+
$product['parent_page_slug'], $product['directory_page_title'], __( 'Template Directory', 'elementor-addon-widgets' ), 'manage_options', $product['page_slug'],
|
286 |
+
array( $this, 'render_admin_page' )
|
287 |
+
);
|
288 |
+
}
|
289 |
+
|
290 |
+
}
|
291 |
+
|
292 |
+
/**
|
293 |
+
* Render the template directory admin page.
|
294 |
+
*/
|
295 |
+
public function render_admin_page() {
|
296 |
+
$data = array(
|
297 |
+
'templates_array' => $this->templates_list(),
|
298 |
+
);
|
299 |
+
echo $this->render_view( 'template-directory-page', $data );
|
300 |
+
}
|
301 |
+
|
302 |
+
/**
|
303 |
+
* Utility method to call Elementor import routine.
|
304 |
+
*/
|
305 |
+
public function import_elementor() {
|
306 |
+
if ( ! defined( 'ELEMENTOR_VERSION' ) ) {
|
307 |
+
return 'no-elementor';
|
308 |
+
}
|
309 |
+
|
310 |
+
require_once( ABSPATH . 'wp-admin' . '/includes/file.php' );
|
311 |
+
require_once( ABSPATH . 'wp-admin' . '/includes/image.php' );
|
312 |
+
|
313 |
+
$template = download_url( esc_url( $_POST['template_url'] ) );
|
314 |
+
$_FILES['file']['tmp_name'] = $template;
|
315 |
+
$elementor = new \Elementor\TemplateLibrary\Source_Local;
|
316 |
+
$elementor->import_template();
|
317 |
+
unlink( $template );
|
318 |
+
|
319 |
+
$args = array(
|
320 |
+
'post_type' => 'elementor_library',
|
321 |
+
'nopaging' => true,
|
322 |
+
'posts_per_page' => '1',
|
323 |
+
'orderby' => 'date',
|
324 |
+
'order' => 'DESC',
|
325 |
+
'suppress_filters' => true,
|
326 |
+
);
|
327 |
+
|
328 |
+
$query = new \WP_Query( $args );
|
329 |
+
|
330 |
+
$last_template_added = $query->posts[0];
|
331 |
+
//get template id
|
332 |
+
$template_id = $last_template_added->ID;
|
333 |
+
|
334 |
+
wp_reset_query();
|
335 |
+
wp_reset_postdata();
|
336 |
+
|
337 |
+
//page content
|
338 |
+
$page_content = $last_template_added->post_content;
|
339 |
+
//meta fields
|
340 |
+
$elementor_data_meta = get_post_meta( $template_id, '_elementor_data' );
|
341 |
+
$elementor_ver_meta = get_post_meta( $template_id, '_elementor_version' );
|
342 |
+
$elementor_edit_mode_meta = get_post_meta( $template_id, '_elementor_edit_mode' );
|
343 |
+
$elementor_css_meta = get_post_meta( $template_id, '_elementor_css' );
|
344 |
+
|
345 |
+
$elementor_metas = array(
|
346 |
+
'_elementor_data' => ! empty( $elementor_data_meta[0] ) ? wp_slash( $elementor_data_meta[0] ) : '',
|
347 |
+
'_elementor_version' => ! empty( $elementor_ver_meta[0] ) ? $elementor_ver_meta[0] : '',
|
348 |
+
'_elementor_edit_mode' => ! empty( $elementor_edit_mode_meta[0] ) ? $elementor_edit_mode_meta[0] : '',
|
349 |
+
'_elementor_css' => $elementor_css_meta,
|
350 |
+
);
|
351 |
+
|
352 |
+
// Create post object
|
353 |
+
$new_template_page = array(
|
354 |
+
'post_type' => 'page',
|
355 |
+
'post_title' => $_POST['template_name'],
|
356 |
+
'post_status' => 'publish',
|
357 |
+
'post_content' => $page_content,
|
358 |
+
'meta_input' => $elementor_metas,
|
359 |
+
'page_template' => apply_filters( 'template_directory_default_template', 'templates/builder-fullwidth-std.php' )
|
360 |
+
);
|
361 |
+
|
362 |
+
$current_theme = wp_get_theme();
|
363 |
+
|
364 |
+
switch ( $current_theme->get_template() ) {
|
365 |
+
case 'hestia-pro':
|
366 |
+
case 'hestia':
|
367 |
+
$new_template_page['page_template'] = 'page-templates/template-pagebuilder-full-width.php';
|
368 |
+
break;
|
369 |
+
case 'zerif-lite':
|
370 |
+
case 'zerif-pro':
|
371 |
+
$new_template_page['page_template'] = 'template-fullwidth-no-title.php';
|
372 |
+
break;
|
373 |
+
}
|
374 |
+
|
375 |
+
$post_id = wp_insert_post( $new_template_page );
|
376 |
+
|
377 |
+
$redirect_url = add_query_arg( array(
|
378 |
+
'post' => $post_id,
|
379 |
+
'action' => 'elementor',
|
380 |
+
), admin_url( 'post.php' ) );
|
381 |
+
|
382 |
+
return ( $redirect_url );
|
383 |
+
|
384 |
+
die();
|
385 |
+
}
|
386 |
+
|
387 |
+
/**
|
388 |
+
* Generate action button html.
|
389 |
+
*
|
390 |
+
* @param string $slug plugin slug.
|
391 |
+
*
|
392 |
+
* @return string
|
393 |
+
*/
|
394 |
+
public function get_button_html( $slug ) {
|
395 |
+
$button = '';
|
396 |
+
$state = $this->check_plugin_state( $slug );
|
397 |
+
if ( ! empty( $slug ) ) {
|
398 |
+
switch ( $state ) {
|
399 |
+
case 'install':
|
400 |
+
$nonce = wp_nonce_url(
|
401 |
+
add_query_arg(
|
402 |
+
array(
|
403 |
+
'action' => 'install-plugin',
|
404 |
+
'from' => 'import',
|
405 |
+
'plugin' => $slug,
|
406 |
+
),
|
407 |
+
network_admin_url( 'update.php' )
|
408 |
+
),
|
409 |
+
'install-plugin_' . $slug
|
410 |
+
);
|
411 |
+
$button .= '<a data-slug="' . $slug . '" class="install-now obfx-install-plugin button button-primary" href="' . esc_url( $nonce ) . '" data-name="' . $slug . '" aria-label="Install ' . $slug . '">' . __( 'Install and activate', 'elementor-addon-widgets' ) . '</a>';
|
412 |
+
break;
|
413 |
+
case 'activate':
|
414 |
+
$plugin_link_suffix = $slug . '/' . $slug . '.php';
|
415 |
+
$nonce = add_query_arg(
|
416 |
+
array(
|
417 |
+
'action' => 'activate',
|
418 |
+
'plugin' => rawurlencode( $plugin_link_suffix ),
|
419 |
+
'_wpnonce' => wp_create_nonce( 'activate-plugin_' . $plugin_link_suffix ),
|
420 |
+
), network_admin_url( 'plugins.php' )
|
421 |
+
);
|
422 |
+
$button .= '<a data-slug="' . $slug . '" class="activate-now button button-primary" href="' . esc_url( $nonce ) . '" aria-label="Activate ' . $slug . '">' . __( 'Activate', 'elementor-addon-widgets' ) . '</a>';
|
423 |
+
break;
|
424 |
+
}// End switch().
|
425 |
+
}// End if().
|
426 |
+
return $button;
|
427 |
+
}
|
428 |
+
|
429 |
+
/**
|
430 |
+
* Getter method for the source url
|
431 |
+
* @return mixed
|
432 |
+
*/
|
433 |
+
public function get_source_url() {
|
434 |
+
return $this->source_url;
|
435 |
+
}
|
436 |
+
|
437 |
+
/**
|
438 |
+
* Setting method for source url
|
439 |
+
*
|
440 |
+
* @param $url
|
441 |
+
*/
|
442 |
+
protected function set_source_url( $url ) {
|
443 |
+
$this->source_url = $url;
|
444 |
+
}
|
445 |
+
|
446 |
+
/**
|
447 |
+
* Check plugin state.
|
448 |
+
*
|
449 |
+
* @param string $slug plugin slug.
|
450 |
+
*
|
451 |
+
* @return bool
|
452 |
+
*/
|
453 |
+
public function check_plugin_state( $slug ) {
|
454 |
+
if ( file_exists( WP_CONTENT_DIR . '/plugins/' . $slug . '/' . $slug . '.php' ) || file_exists( WP_CONTENT_DIR . '/plugins/' . $slug . '/index.php' ) ) {
|
455 |
+
require_once( ABSPATH . 'wp-admin' . '/includes/plugin.php' );
|
456 |
+
$needs = ( is_plugin_active( $slug . '/' . $slug . '.php' ) ||
|
457 |
+
is_plugin_active( $slug . '/index.php' ) ) ?
|
458 |
+
'deactivate' : 'activate';
|
459 |
+
|
460 |
+
return $needs;
|
461 |
+
} else {
|
462 |
+
return 'install';
|
463 |
+
}
|
464 |
+
}
|
465 |
+
|
466 |
+
/**
|
467 |
+
* If the composer library is present let's try to init.
|
468 |
+
*/
|
469 |
+
public function load_full_width_page_templates() {
|
470 |
+
if ( class_exists( '\ThemeIsle\FullWidthTemplates' ) ) {
|
471 |
+
\ThemeIsle\FullWidthTemplates::instance();
|
472 |
+
}
|
473 |
+
}
|
474 |
+
|
475 |
+
/**
|
476 |
+
* By default the composer library "Full Width Page Templates" comes with two page templates: a blank one and a full
|
477 |
+
* width one with the header and footer inherited from the active theme.
|
478 |
+
* OBFX Template directory doesn't need the blonk one, so we are going to ditch it.
|
479 |
+
*
|
480 |
+
* @param array $list
|
481 |
+
*
|
482 |
+
* @return array
|
483 |
+
*/
|
484 |
+
public function filter_fwpt_templates_list( $list ) {
|
485 |
+
unset( $list['templates/builder-fullwidth.php'] );
|
486 |
+
|
487 |
+
return $list;
|
488 |
+
}
|
489 |
+
|
490 |
+
/**
|
491 |
+
* Utility method to render a view from module.
|
492 |
+
*
|
493 |
+
* @codeCoverageIgnore
|
494 |
+
*
|
495 |
+
* @since 1.0.0
|
496 |
+
* @access protected
|
497 |
+
*
|
498 |
+
* @param string $view_name The view name w/o the `-tpl.php` part.
|
499 |
+
* @param array $args An array of arguments to be passed to the view.
|
500 |
+
*
|
501 |
+
* @return string
|
502 |
+
*/
|
503 |
+
protected function render_view( $view_name, $args = array() ) {
|
504 |
+
ob_start();
|
505 |
+
$file = $this->get_dir() . '/views/' . $view_name . '-tpl.php';
|
506 |
+
if ( ! empty( $args ) ) {
|
507 |
+
foreach ( $args as $obfx_rh_name => $obfx_rh_value ) {
|
508 |
+
$$obfx_rh_name = $obfx_rh_value;
|
509 |
+
}
|
510 |
+
}
|
511 |
+
if ( file_exists( $file ) ) {
|
512 |
+
include $file;
|
513 |
+
}
|
514 |
+
|
515 |
+
return ob_get_clean();
|
516 |
+
}
|
517 |
+
|
518 |
+
/**
|
519 |
+
* Method to return path to child class in a Reflective Way.
|
520 |
+
*
|
521 |
+
* @since 1.0.0
|
522 |
+
* @access protected
|
523 |
+
* @return string
|
524 |
+
*/
|
525 |
+
protected function get_dir() {
|
526 |
+
return dirname( __FILE__ );
|
527 |
+
}
|
528 |
+
|
529 |
+
/**
|
530 |
+
* @static
|
531 |
+
* @since 1.0.0
|
532 |
+
* @access public
|
533 |
+
* @return PageTemplatesDirectory
|
534 |
+
*/
|
535 |
+
public static function instance() {
|
536 |
+
if ( is_null( self::$instance ) ) {
|
537 |
+
self::$instance = new self();
|
538 |
+
self::$instance->init();
|
539 |
+
}
|
540 |
+
|
541 |
+
return self::$instance;
|
542 |
+
}
|
543 |
+
|
544 |
+
/**
|
545 |
+
* Throw error on object clone
|
546 |
+
*
|
547 |
+
* The whole idea of the singleton design pattern is that there is a single
|
548 |
+
* object therefore, we don't want the object to be cloned.
|
549 |
+
*
|
550 |
+
* @access public
|
551 |
+
* @since 1.0.0
|
552 |
+
* @return void
|
553 |
+
*/
|
554 |
+
public function __clone() {
|
555 |
+
// Cloning instances of the class is forbidden.
|
556 |
+
_doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin’ huh?', 'elementor-addon-widgets' ), '1.0.0' );
|
557 |
+
}
|
558 |
+
|
559 |
+
/**
|
560 |
+
* Disable unserializing of the class
|
561 |
+
*
|
562 |
+
* @access public
|
563 |
+
* @since 1.0.0
|
564 |
+
* @return void
|
565 |
+
*/
|
566 |
+
public function __wakeup() {
|
567 |
+
// Unserializing instances of the class is forbidden.
|
568 |
+
_doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin’ huh?', 'elementor-addon-widgets' ), '1.0.0' );
|
569 |
+
}
|
570 |
+
}
|
571 |
+
}
|
vendor/codeinwp/templates-directory/composer.json
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "codeinwp/templates-directory",
|
3 |
+
"description": "A WordPress library to manage page templates.",
|
4 |
+
"type": "library",
|
5 |
+
"version": "1.0.2",
|
6 |
+
"license": "GPL-2.0-or-later",
|
7 |
+
"homepage": "https://github.com/Codeinwp/templates-directory",
|
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 |
+
"require": {
|
21 |
+
"codeinwp/full-width-page-templates": "master"
|
22 |
+
},
|
23 |
+
"support": {
|
24 |
+
"issues": "https://github.com/Codeinwp/templates-directory/issues"
|
25 |
+
},
|
26 |
+
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.obfx-template-browser {
|
2 |
+
padding: 35px 0 0;
|
3 |
+
}
|
4 |
+
|
5 |
+
.obfx-template-browser .template-name {
|
6 |
+
float: left;
|
7 |
+
margin: 0;
|
8 |
+
padding: 15px;
|
9 |
+
font-size: 16px;
|
10 |
+
font-weight: 600;
|
11 |
+
}
|
12 |
+
|
13 |
+
.obfx-template {
|
14 |
+
float: left;
|
15 |
+
position: relative;
|
16 |
+
box-sizing: border-box;
|
17 |
+
width: 30.6%;
|
18 |
+
margin: 0 4% 4% 0;
|
19 |
+
border: 1px solid #ddd;
|
20 |
+
background: #fff;
|
21 |
+
box-shadow: 0 1px 1px -1px rgba(0,0,0,0.1);
|
22 |
+
cursor: pointer;
|
23 |
+
}
|
24 |
+
.obfx-preview-wrap {
|
25 |
+
margin: 15px 0;
|
26 |
+
position: relative;
|
27 |
+
}
|
28 |
+
|
29 |
+
.obfx-preview-wrap .badge,
|
30 |
+
.obfx-template .badge {
|
31 |
+
position: absolute;
|
32 |
+
color: #fff;
|
33 |
+
z-index: 10;
|
34 |
+
background-color: #00a6e3;
|
35 |
+
padding: 7px 12px;
|
36 |
+
text-transform: uppercase;
|
37 |
+
border-radius: 0 0 3px 0;
|
38 |
+
top: 1px;
|
39 |
+
left: 0;
|
40 |
+
box-shadow: 2px 2px 2px 0 rgba(0,0,0,0.25);
|
41 |
+
font-weight: 500;
|
42 |
+
font-size: 20px;
|
43 |
+
}
|
44 |
+
|
45 |
+
.obfx-template:nth-child(3n) {
|
46 |
+
margin-right: 0;
|
47 |
+
}
|
48 |
+
|
49 |
+
.obfx-template:hover .obfx-template-actions,
|
50 |
+
.obfx-template:hover .obfx-preview-template {
|
51 |
+
opacity: 1;
|
52 |
+
}
|
53 |
+
|
54 |
+
.obfx-template:hover .obfx-template-screenshot {
|
55 |
+
opacity: 0.4;
|
56 |
+
}
|
57 |
+
|
58 |
+
.obfx-template-actions {
|
59 |
+
float: right;
|
60 |
+
position: absolute;
|
61 |
+
right: 0;
|
62 |
+
bottom: 0;
|
63 |
+
padding: 10px 15px;
|
64 |
+
border-left: 1px solid rgba(0,0,0,0.05);
|
65 |
+
opacity: 0;
|
66 |
+
background: rgba(244,244,244,0.7);
|
67 |
+
-webkit-transition: 0.3s ease;
|
68 |
+
transition: 0.3s ease;
|
69 |
+
}
|
70 |
+
|
71 |
+
.obfx-template-actions .button .dashicons {
|
72 |
+
line-height: 27px;
|
73 |
+
}
|
74 |
+
|
75 |
+
.obfx-template-actions .button {
|
76 |
+
margin-left: 5px;
|
77 |
+
}
|
78 |
+
|
79 |
+
.obfx-template-screenshot {
|
80 |
+
display: inline-block;
|
81 |
+
float: left;
|
82 |
+
overflow: hidden;
|
83 |
+
position: relative;
|
84 |
+
width: 100%;
|
85 |
+
border: 1px solid #ddd;
|
86 |
+
border-right: none;
|
87 |
+
border-left: none;
|
88 |
+
background: #fff;
|
89 |
+
-webkit-transition: 0.3s ease;
|
90 |
+
transition: 0.3s ease;
|
91 |
+
}
|
92 |
+
|
93 |
+
.obfx-template img {
|
94 |
+
float: left;
|
95 |
+
width: 100%;
|
96 |
+
}
|
97 |
+
|
98 |
+
.obfx-template-browser.customizer {
|
99 |
+
display: block !important;
|
100 |
+
padding: 10px 20px 60px;
|
101 |
+
}
|
102 |
+
|
103 |
+
.obfx-next-prev {
|
104 |
+
position: absolute;
|
105 |
+
left: 45px;
|
106 |
+
}
|
107 |
+
|
108 |
+
.obfx-next-prev span:hover {
|
109 |
+
border-color: #ccc;
|
110 |
+
outline: 0;
|
111 |
+
color: #000;
|
112 |
+
background: #ddd;
|
113 |
+
box-shadow: none;
|
114 |
+
}
|
115 |
+
|
116 |
+
.obfx-next-prev .previous-template,
|
117 |
+
.obfx-next-prev .next-template {
|
118 |
+
display: block;
|
119 |
+
float: left;
|
120 |
+
position: relative;
|
121 |
+
width: 45px;
|
122 |
+
height: 45px;
|
123 |
+
padding-right: 2px;
|
124 |
+
border: none;
|
125 |
+
border-right: 1px solid #ddd;
|
126 |
+
color: #444;
|
127 |
+
background: #eee;
|
128 |
+
text-decoration: none;
|
129 |
+
cursor: pointer;
|
130 |
+
-webkit-transition: color 0.1s ease-in-out,background 0.1s ease-in-out;
|
131 |
+
transition: color 0.1s ease-in-out,background 0.1s ease-in-out;
|
132 |
+
}
|
133 |
+
|
134 |
+
.obfx-next-prev .previous-template {
|
135 |
+
border-left: 1px solid #ddd;
|
136 |
+
}
|
137 |
+
|
138 |
+
.obfx-next-prev .next-template:before {
|
139 |
+
position: relative;
|
140 |
+
top: 6px;
|
141 |
+
left: 14px;
|
142 |
+
font: 400 20px/1 dashicons;
|
143 |
+
content: "\f345";
|
144 |
+
}
|
145 |
+
|
146 |
+
.obfx-next-prev .previous-template:before {
|
147 |
+
position: relative;
|
148 |
+
top: 6px;
|
149 |
+
left: 14px;
|
150 |
+
font: 400 20px/1 dashicons;
|
151 |
+
content: "\f341";
|
152 |
+
}
|
153 |
+
|
154 |
+
.obfx-custom-customizer {
|
155 |
+
background: #fff;
|
156 |
+
}
|
157 |
+
|
158 |
+
.obfx-template-browser.customizer .obfx-template.active {
|
159 |
+
display: inline-block;
|
160 |
+
}
|
161 |
+
|
162 |
+
.customize-controls-preview-toggle {
|
163 |
+
float: left;
|
164 |
+
position: relative;
|
165 |
+
left: 120px;
|
166 |
+
}
|
167 |
+
|
168 |
+
.obfx-template-browser.customizer .template-name {
|
169 |
+
padding-left: 0;
|
170 |
+
}
|
171 |
+
|
172 |
+
.obfx-template-browser.customizer .obfx-template-screenshot {
|
173 |
+
border: 1px solid #ddd;
|
174 |
+
}
|
175 |
+
|
176 |
+
.obfx-hide {
|
177 |
+
display: none !important;
|
178 |
+
}
|
179 |
+
|
180 |
+
.obfx-import-elementor-hidden-form {
|
181 |
+
display: inline-block;
|
182 |
+
}
|
183 |
+
|
184 |
+
.obfx-done-import {
|
185 |
+
display: block;
|
186 |
+
margin: 0;
|
187 |
+
padding-top: 10px;
|
188 |
+
color: green;
|
189 |
+
text-align: center;
|
190 |
+
}
|
191 |
+
|
192 |
+
.obfx-done-import .dashicons {
|
193 |
+
font-size: 30px;
|
194 |
+
}
|
195 |
+
|
196 |
+
.obfx-updating.updating-message.button.button-primary {
|
197 |
+
padding: 0 4px 0 10px;
|
198 |
+
}
|
199 |
+
|
200 |
+
.obfx-no-elementor-modal-wrapper {
|
201 |
+
display: none;
|
202 |
+
position: fixed;
|
203 |
+
z-index: 900000;
|
204 |
+
top: 0;
|
205 |
+
right: 0;
|
206 |
+
bottom: 0;
|
207 |
+
left: 0;
|
208 |
+
margin: 0 auto;
|
209 |
+
background: rgba(0, 0, 0, 0.8);
|
210 |
+
}
|
211 |
+
|
212 |
+
.obfx-no-elementor-modal {
|
213 |
+
position: relative;
|
214 |
+
top: 50%;
|
215 |
+
width: auto;
|
216 |
+
max-width: 550px;
|
217 |
+
margin: 0 auto;
|
218 |
+
padding: 20px;
|
219 |
+
background-color: #fff;
|
220 |
+
text-align: right;
|
221 |
+
-webkit-transform: translateY(-50%);
|
222 |
+
-ms-transform: translateY(-50%);
|
223 |
+
transform: translateY(-50%);
|
224 |
+
}
|
225 |
+
|
226 |
+
.obfx-no-elementor-modal p {
|
227 |
+
margin: 30px 0 20px;
|
228 |
+
text-align: left;
|
229 |
+
}
|
230 |
+
|
231 |
+
.obfx-no-elementor-modal .modal-header {
|
232 |
+
display: inline-block;
|
233 |
+
position: absolute;
|
234 |
+
top: 0;
|
235 |
+
left: 0;
|
236 |
+
width: 100%;
|
237 |
+
height: 30px;
|
238 |
+
border-bottom: 1px solid #d4d4d4;
|
239 |
+
background: #e6e6e6;
|
240 |
+
}
|
241 |
+
|
242 |
+
.obfx-close-modal {
|
243 |
+
float: right;
|
244 |
+
position: absolute;
|
245 |
+
top: 5px;
|
246 |
+
right: 5px;
|
247 |
+
color: #7b7b7b;
|
248 |
+
cursor: pointer;
|
249 |
+
}
|
250 |
+
|
251 |
+
.obfx-template-preview.theme-install-overlay .install-theme-info.obfx-theme-info .theme-screenshot {
|
252 |
+
width: 100%;
|
253 |
+
margin: 0;
|
254 |
+
}
|
255 |
+
|
256 |
+
.obfx-template-preview.theme-install-overlay .install-theme-info.obfx-theme-info {
|
257 |
+
display: none;
|
258 |
+
}
|
259 |
+
|
260 |
+
.obfx-template-preview.theme-install-overlay .install-theme-info.obfx-theme-info.active {
|
261 |
+
display: block;
|
262 |
+
}
|
263 |
+
|
264 |
+
.more-details.obfx-preview-template {
|
265 |
+
position: absolute;
|
266 |
+
z-index: 100;
|
267 |
+
top: 0;
|
268 |
+
right: 0;
|
269 |
+
bottom: 51px;
|
270 |
+
left: 0;
|
271 |
+
opacity: 0;
|
272 |
+
text-align: center;
|
273 |
+
cursor: pointer;
|
274 |
+
-webkit-transition: 0.3s ease;
|
275 |
+
transition: 0.3s ease;
|
276 |
+
}
|
277 |
+
|
278 |
+
.more-details.obfx-preview-template span {
|
279 |
+
display: block;
|
280 |
+
position: relative;
|
281 |
+
top: 50%;
|
282 |
+
left: 50%;
|
283 |
+
width: 45%;
|
284 |
+
padding: 15px 12px;
|
285 |
+
border-radius: 3px;
|
286 |
+
color: #fff;
|
287 |
+
background: #23282d;
|
288 |
+
background: rgba(0,0,0,0.7);
|
289 |
+
text-shadow: 0 1px 0 rgba(0,0,0,0.6);
|
290 |
+
font-size: 15px;
|
291 |
+
font-weight: 600;
|
292 |
+
-webkit-font-smoothing: antialiased;
|
293 |
+
text-align: center;
|
294 |
+
-webkit-transform: translate(-50%, -50%);
|
295 |
+
-ms-transform: translate(-50%, -50%);
|
296 |
+
transform: translate(-50%, -50%);
|
297 |
+
}
|
298 |
+
|
299 |
+
.obfx-required-plugins > p {
|
300 |
+
margin-top: 20px;
|
301 |
+
color: #333;
|
302 |
+
font-weight: 800;
|
303 |
+
}
|
304 |
+
|
305 |
+
.obfx-required-plugins .button {
|
306 |
+
display: none;
|
307 |
+
}
|
308 |
+
|
309 |
+
#obfx-template-dir-fetch-templates {
|
310 |
+
display: block;
|
311 |
+
margin: 0 auto;
|
312 |
+
}
|
313 |
+
#obfx-template-dir-fetch-templates .dashicons {
|
314 |
+
margin: 3px 5px 0 -2px;
|
315 |
+
}
|
316 |
+
|
317 |
+
@media only screen and (min-width: 1640px) {
|
318 |
+
.obfx-template {
|
319 |
+
width: 22.7%;
|
320 |
+
margin: 0 3% 3% 0;
|
321 |
+
}
|
322 |
+
|
323 |
+
.obfx-template:nth-child(3n) {
|
324 |
+
margin-right: 3%;
|
325 |
+
}
|
326 |
+
|
327 |
+
.obfx-template:nth-child(4n) {
|
328 |
+
margin-right: 0;
|
329 |
+
}
|
330 |
+
}
|
331 |
+
|
332 |
+
@media only screen and (max-width: 1120px) {
|
333 |
+
.obfx-template {
|
334 |
+
width: 47.5%;
|
335 |
+
margin: 0 3% 3% 0;
|
336 |
+
}
|
337 |
+
|
338 |
+
.obfx-template:nth-child(3n) {
|
339 |
+
margin-right: 3%;
|
340 |
+
}
|
341 |
+
|
342 |
+
.obfx-template:nth-child(even) {
|
343 |
+
margin-right: 0;
|
344 |
+
}
|
345 |
+
}
|
346 |
+
|
347 |
+
@media only screen and (max-width: 600px) {
|
348 |
+
.obfx-template-preview .wp-full-overlay-sidebar {
|
349 |
+
width: 100%;
|
350 |
+
}
|
351 |
+
}
|
352 |
+
|
353 |
+
@media only screen and (min-width: 2000px) {
|
354 |
+
.obfx-template {
|
355 |
+
width: 17.6%;
|
356 |
+
margin: 0 3% 3% 0;
|
357 |
+
}
|
358 |
+
|
359 |
+
.obfx-template:nth-child(4n) {
|
360 |
+
margin-right: 3%;
|
361 |
+
}
|
362 |
+
|
363 |
+
.obfx-template:nth-child(5n) {
|
364 |
+
margin-right: 0;
|
365 |
+
}
|
366 |
+
}
|
vendor/codeinwp/templates-directory/js/script.js
ADDED
@@ -0,0 +1,254 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* global importer_endpoint, console */
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Template Directory Customizer Admin Dashboard Script
|
5 |
+
*
|
6 |
+
* This handles the template directory.
|
7 |
+
*
|
8 |
+
* @since 1.0.0
|
9 |
+
* @package obfx_modules/template-directory/js
|
10 |
+
*
|
11 |
+
* @author ThemeIsle
|
12 |
+
*/
|
13 |
+
|
14 |
+
var obfx_template_directory = function ( $ ) {
|
15 |
+
'use strict';
|
16 |
+
|
17 |
+
$(
|
18 |
+
function () {
|
19 |
+
|
20 |
+
// Handle import click.
|
21 |
+
$( '.wp-full-overlay-header' ).on(
|
22 |
+
'click', '.obfx-import-template', function () {
|
23 |
+
$( this ).addClass( 'obfx-import-queue updating-message obfx-updating' ).html( '' );
|
24 |
+
$( '.obfx-template-preview .close-full-overlay, .obfx-next-prev' ).remove();
|
25 |
+
var template_url = $( this ).data( 'template-file' );
|
26 |
+
var template_name = $( this ).data( 'template-title' );
|
27 |
+
if ( $( '.active .obfx-installable' ).length || $( '.active .obfx-activate' ).length ) {
|
28 |
+
checkAndInstallPlugins();
|
29 |
+
} else {
|
30 |
+
$.ajax(
|
31 |
+
{
|
32 |
+
url: importer_endpoint.url,
|
33 |
+
beforeSend: function ( xhr ) {
|
34 |
+
$( '.obfx-import-queue' ).addClass( 'obfx-updating' ).html( '' );
|
35 |
+
xhr.setRequestHeader( 'X-WP-Nonce', importer_endpoint.nonce );
|
36 |
+
},
|
37 |
+
data: {
|
38 |
+
template_url: template_url,
|
39 |
+
template_name: template_name
|
40 |
+
},
|
41 |
+
type: 'POST',
|
42 |
+
success: function ( data ) {
|
43 |
+
$( '.obfx-updating' ).replaceWith( '<span class="obfx-done-import"><i class="dashicons-yes dashicons"></i></span>' );
|
44 |
+
location.href = data;
|
45 |
+
},
|
46 |
+
error: function ( error ) {
|
47 |
+
console.error( error );
|
48 |
+
},
|
49 |
+
complete: function () {
|
50 |
+
$( '.obfx-updating' ).replaceWith( '<span class="obfx-done-import"><i class="dashicons-yes dashicons"></i></span>' );
|
51 |
+
}
|
52 |
+
}, 'json'
|
53 |
+
);
|
54 |
+
}
|
55 |
+
}
|
56 |
+
);
|
57 |
+
|
58 |
+
$( '#obfx-template-dir-fetch-templates' ).on( 'click', function ( e ) {
|
59 |
+
e.preventDefault();
|
60 |
+
$.ajax(
|
61 |
+
{
|
62 |
+
url: importer_endpoint.fetch_templates_url,
|
63 |
+
beforeSend: function ( xhr ) {
|
64 |
+
$( '#obfx-template-dir-fetch-templates .dashicons' ).hide();
|
65 |
+
$( '#obfx-template-dir-fetch-templates' ).addClass( 'updating-message' );
|
66 |
+
xhr.setRequestHeader( 'X-WP-Nonce', importer_endpoint.nonce );
|
67 |
+
},
|
68 |
+
data: {
|
69 |
+
plugin_slug: importer_endpoint.plugin_slug,
|
70 |
+
},
|
71 |
+
type: 'POST',
|
72 |
+
success: function () {
|
73 |
+
$( '#obfx-template-dir-fetch-templates' ).removeClass( 'updating-message' ).attr('disabled', 'true').empty().html('<i class="dashicons-yes dashicons" style="margin-right:0"></i>');
|
74 |
+
location.reload();
|
75 |
+
},
|
76 |
+
error: function( error ) {
|
77 |
+
console.log(error);
|
78 |
+
}
|
79 |
+
}, 'json'
|
80 |
+
);
|
81 |
+
} );
|
82 |
+
|
83 |
+
function checkAndInstallPlugins() {
|
84 |
+
var installable = $( '.active .obfx-installable' );
|
85 |
+
var toActivate = $( '.active .obfx-activate' );
|
86 |
+
if ( installable.length || toActivate.length ) {
|
87 |
+
|
88 |
+
$( installable ).each(
|
89 |
+
function () {
|
90 |
+
var plugin = $( this );
|
91 |
+
$( plugin ).removeClass( 'obfx-installable' ).addClass( 'obfx-installing' );
|
92 |
+
$( plugin ).find( 'span.dashicons' ).replaceWith( '<span class="dashicons dashicons-update" style="-webkit-animation: rotation 2s infinite linear; animation: rotation 2s infinite linear; color: #ffb227 "></span>' );
|
93 |
+
var slug = $( this ).find( '.obfx-install-plugin' ).attr( 'data-slug' );
|
94 |
+
wp.updates.installPlugin(
|
95 |
+
{
|
96 |
+
slug: slug,
|
97 |
+
success: function ( response ) {
|
98 |
+
activatePlugin( response.activateUrl, plugin );
|
99 |
+
}
|
100 |
+
}
|
101 |
+
);
|
102 |
+
}
|
103 |
+
);
|
104 |
+
|
105 |
+
$( toActivate ).each(
|
106 |
+
function () {
|
107 |
+
var plugin = $( this );
|
108 |
+
var activateUrl = $( plugin ).find( '.activate-now' ).attr( 'href' );
|
109 |
+
if ( typeof activateUrl !== 'undefined' ) {
|
110 |
+
activatePlugin( activateUrl, plugin );
|
111 |
+
}
|
112 |
+
}
|
113 |
+
);
|
114 |
+
}
|
115 |
+
}
|
116 |
+
|
117 |
+
function activatePlugin( activationUrl, plugin ) {
|
118 |
+
$.ajax(
|
119 |
+
{
|
120 |
+
type: 'GET',
|
121 |
+
url: activationUrl,
|
122 |
+
beforeSend: function () {
|
123 |
+
$( plugin ).removeClass( 'obfx-activate' ).addClass( 'obfx-installing' );
|
124 |
+
$( plugin ).find( 'span.dashicons' ).replaceWith( '<span class="dashicons dashicons-update" style="-webkit-animation: rotation 2s infinite linear; animation: rotation 2s infinite linear; color: #ffb227 "></span>' );
|
125 |
+
},
|
126 |
+
success: function () {
|
127 |
+
$( plugin ).find( '.dashicons' ).replaceWith( '<span class="dashicons dashicons-yes" style="color: #34a85e"></span>' );
|
128 |
+
$( plugin ).removeClass( 'obfx-installing' );
|
129 |
+
},
|
130 |
+
complete: function () {
|
131 |
+
if ( $( '.active .obfx-installing' ).length === 0 ) {
|
132 |
+
$( '.obfx-import-queue' ).trigger( 'click' );
|
133 |
+
}
|
134 |
+
}
|
135 |
+
}
|
136 |
+
);
|
137 |
+
}
|
138 |
+
|
139 |
+
// Handle sidebar collapse in preview.
|
140 |
+
$( '.obfx-template-preview' ).on(
|
141 |
+
'click', '.collapse-sidebar', function () {
|
142 |
+
event.preventDefault();
|
143 |
+
var overlay = $( '.obfx-template-preview' );
|
144 |
+
if ( overlay.hasClass( 'expanded' ) ) {
|
145 |
+
overlay.removeClass( 'expanded' );
|
146 |
+
overlay.addClass( 'collapsed' );
|
147 |
+
return false;
|
148 |
+
}
|
149 |
+
|
150 |
+
if ( overlay.hasClass( 'collapsed' ) ) {
|
151 |
+
overlay.removeClass( 'collapsed' );
|
152 |
+
overlay.addClass( 'expanded' );
|
153 |
+
return false;
|
154 |
+
}
|
155 |
+
}
|
156 |
+
);
|
157 |
+
|
158 |
+
// Handle responsive buttons.
|
159 |
+
$( '.obfx-responsive-preview' ).on(
|
160 |
+
'click', 'button', function () {
|
161 |
+
$( '.obfx-template-preview' ).removeClass( 'preview-mobile preview-tablet preview-desktop' );
|
162 |
+
var deviceClass = 'preview-' + $( this ).data( 'device' );
|
163 |
+
$( '.obfx-responsive-preview button' ).each(
|
164 |
+
function () {
|
165 |
+
$( this ).attr( 'aria-pressed', 'false' );
|
166 |
+
$( this ).removeClass( 'active' );
|
167 |
+
}
|
168 |
+
);
|
169 |
+
|
170 |
+
$( '.obfx-responsive-preview' ).removeClass( $( this ).attr( 'class' ).split( ' ' ).pop() );
|
171 |
+
$( '.obfx-template-preview' ).addClass( deviceClass );
|
172 |
+
$( this ).addClass( 'active' );
|
173 |
+
}
|
174 |
+
);
|
175 |
+
|
176 |
+
// Hide preview.
|
177 |
+
$( '.close-full-overlay' ).on(
|
178 |
+
'click', function () {
|
179 |
+
$( '.obfx-template-preview .obfx-theme-info.active' ).removeClass( 'active' );
|
180 |
+
$( '.obfx-template-preview' ).hide();
|
181 |
+
$( '.obfx-template-frame' ).attr( 'src', '' );
|
182 |
+
}
|
183 |
+
);
|
184 |
+
|
185 |
+
// Open preview routine.
|
186 |
+
$( '.obfx-preview-template' ).on(
|
187 |
+
'click', function () {
|
188 |
+
var templateSlug = $( this ).data( 'template-slug' );
|
189 |
+
var previewUrl = $( this ).data( 'demo-url' );
|
190 |
+
$( '.obfx-template-frame' ).attr( 'src', previewUrl );
|
191 |
+
$( '.obfx-theme-info.' + templateSlug ).addClass( 'active' );
|
192 |
+
setupImportButton();
|
193 |
+
$( '.obfx-template-preview' ).fadeIn();
|
194 |
+
}
|
195 |
+
);
|
196 |
+
|
197 |
+
// Handle left-right navigation between templates.
|
198 |
+
$( '.obfx-next-prev .next-theme' ).on(
|
199 |
+
'click', function () {
|
200 |
+
var active = $( '.obfx-theme-info.active' ).removeClass( 'active' );
|
201 |
+
if ( active.next() && active.next().length ) {
|
202 |
+
active.next().addClass( 'active' );
|
203 |
+
} else {
|
204 |
+
active.siblings( ':first' ).addClass( 'active' );
|
205 |
+
}
|
206 |
+
changePreviewSource();
|
207 |
+
setupImportButton();
|
208 |
+
}
|
209 |
+
);
|
210 |
+
$( '.obfx-next-prev .previous-theme' ).on(
|
211 |
+
'click', function () {
|
212 |
+
var active = $( '.obfx-theme-info.active' ).removeClass( 'active' );
|
213 |
+
if ( active.prev() && active.prev().length ) {
|
214 |
+
active.prev().addClass( 'active' );
|
215 |
+
} else {
|
216 |
+
active.siblings( ':last' ).addClass( 'active' );
|
217 |
+
}
|
218 |
+
changePreviewSource();
|
219 |
+
setupImportButton();
|
220 |
+
}
|
221 |
+
);
|
222 |
+
|
223 |
+
// Change preview source.
|
224 |
+
function changePreviewSource() {
|
225 |
+
var previewUrl = $( '.obfx-theme-info.active' ).data( 'demo-url' );
|
226 |
+
$( '.obfx-template-frame' ).attr( 'src', previewUrl );
|
227 |
+
}
|
228 |
+
|
229 |
+
function setupImportButton() {
|
230 |
+
var button = $( '.wp-full-overlay-header .obfx-import-template' );
|
231 |
+
var dataUpsell = $( '.active' ).data( 'upsell' );
|
232 |
+
var upsellButton = $( '.obfx-upsell-button' );
|
233 |
+
if ( dataUpsell === 'yes' ) {
|
234 |
+
$( button ).hide();
|
235 |
+
$( upsellButton ).show();
|
236 |
+
return false;
|
237 |
+
}
|
238 |
+
$( button ).show();
|
239 |
+
$( upsellButton ).hide();
|
240 |
+
var installable = $( '.active .obfx-installable' );
|
241 |
+
if ( installable.length > 0 ) {
|
242 |
+
$( '.wp-full-overlay-header .obfx-import-template' ).text( 'Install and Import' );
|
243 |
+
} else {
|
244 |
+
$( '.wp-full-overlay-header .obfx-import-template' ).text( 'Import' );
|
245 |
+
}
|
246 |
+
var activeTheme = $( '.obfx-theme-info.active' );
|
247 |
+
$( button ).attr( 'data-template-file', $( activeTheme ).data( 'template-file' ) );
|
248 |
+
$( button ).attr( 'data-template-title', $( activeTheme ).data( 'template-title' ) );
|
249 |
+
}
|
250 |
+
}
|
251 |
+
);
|
252 |
+
};
|
253 |
+
|
254 |
+
obfx_template_directory( jQuery );
|
vendor/codeinwp/templates-directory/load.php
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Loader for the ThemeIsle\PageTemplatesDirectory
|
4 |
+
*
|
5 |
+
* @package ThemeIsle\PageTemplatesDirectory
|
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-page-templates-directory.php' );
|
vendor/codeinwp/templates-directory/views/template-directory-page-tpl.php
ADDED
@@ -0,0 +1,150 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The View for Rendering the Template Directory Main Dashboard Page.
|
4 |
+
*
|
5 |
+
* @link https://themeisle.com
|
6 |
+
* @since 2.0.0
|
7 |
+
*
|
8 |
+
* @package ThemeIsle
|
9 |
+
* @subpackage ThemeIsle/PageTemplatesDirectory
|
10 |
+
* @codeCoverageIgnore
|
11 |
+
*/
|
12 |
+
|
13 |
+
$preview_url = add_query_arg( 'obfx_templates', '', home_url() ); // Define query arg for custom endpoint.
|
14 |
+
|
15 |
+
$html = '';
|
16 |
+
|
17 |
+
if ( is_array( $templates_array ) ) { ?>
|
18 |
+
<div class="obfx-template-dir wrap">
|
19 |
+
|
20 |
+
<h2 class="wp-heading-inline"> <?php echo apply_filters( 'obfx_template_dir_page_title', __( 'Orbit Fox Template Directory', 'elementor-addon-widgets' ) ); ?></h2>
|
21 |
+
<button id="obfx-template-dir-fetch-templates" class="button-primary button"><i class="dashicons dashicons-update"></i><?php echo __( 'Sync Templates', 'elementor-addon-widgets' ); ?></button>
|
22 |
+
<div class="obfx-template-browser">
|
23 |
+
<?php
|
24 |
+
foreach ( $templates_array as $template => $properties ) {
|
25 |
+
?>
|
26 |
+
<div class="obfx-template">
|
27 |
+
<?php if ( isset( $properties['has_badge'] ) ) { ?>
|
28 |
+
<span class="badge"><?php echo esc_html( $properties['has_badge'] ); ?></span>
|
29 |
+
<?php } ?>
|
30 |
+
<div class="more-details obfx-preview-template"
|
31 |
+
data-demo-url="<?php echo esc_url( $properties['demo_url'] ); ?>"
|
32 |
+
data-template-slug="<?php echo esc_attr( $template ); ?>">
|
33 |
+
<span><?php echo __( 'More Details', 'elementor-addon-widgets' ); ?></span></div>
|
34 |
+
<div class="obfx-template-screenshot">
|
35 |
+
<img src="<?php echo esc_url( $properties['screenshot'] ); ?>"
|
36 |
+
alt="<?php echo esc_html( $properties['title'] ); ?>">
|
37 |
+
</div>
|
38 |
+
<h2 class="template-name template-header"><?php echo esc_html( $properties['title'] ); ?></h2>
|
39 |
+
<div class="obfx-template-actions">
|
40 |
+
|
41 |
+
<?php if ( ! empty( $properties['demo_url'] ) ) { ?>
|
42 |
+
<a class="button obfx-preview-template"
|
43 |
+
data-demo-url="<?php echo esc_url( $properties['demo_url'] ); ?>"
|
44 |
+
data-template-slug="<?php echo esc_attr( $template ); ?>"><?php echo __( 'Preview', 'elementor-addon-widgets' ); ?></a>
|
45 |
+
<?php } ?>
|
46 |
+
</div>
|
47 |
+
</div>
|
48 |
+
<?php } ?>
|
49 |
+
</div>
|
50 |
+
</div>
|
51 |
+
<div class="wp-clearfix clearfix"></div>
|
52 |
+
<?php } // End if().
|
53 |
+
?>
|
54 |
+
|
55 |
+
<div class="obfx-template-preview theme-install-overlay wp-full-overlay expanded" style="display: none;">
|
56 |
+
<div class="wp-full-overlay-sidebar">
|
57 |
+
<div class="wp-full-overlay-header">
|
58 |
+
<button class="close-full-overlay"><span
|
59 |
+
class="screen-reader-text"><?php esc_html_e( 'Close', 'elementor-addon-widgets' ); ?></span></button>
|
60 |
+
<div class="obfx-next-prev">
|
61 |
+
<button class="previous-theme"><span
|
62 |
+
class="screen-reader-text"><?php esc_html_e( 'Previous', 'elementor-addon-widgets' ); ?></span></button>
|
63 |
+
<button class="next-theme"><span
|
64 |
+
class="screen-reader-text"><?php esc_html_e( 'Next', 'elementor-addon-widgets' ); ?></span></button>
|
65 |
+
</div>
|
66 |
+
<span class="obfx-import-template button button-primary"><?php esc_html_e( 'Import', 'elementor-addon-widgets' ); ?></span>
|
67 |
+
<a href="https://themeisle.com/plugins/sizzify-elementor-addons-templates" target="_blank"
|
68 |
+
class="obfx-upsell-button button button-primary"><?php esc_html_e( 'See Pro Version', 'elementor-addon-widgets' ); ?></a>
|
69 |
+
|
70 |
+
</div>
|
71 |
+
<div class="wp-full-overlay-sidebar-content">
|
72 |
+
<?php
|
73 |
+
foreach ( $templates_array as $template => $properties ) {
|
74 |
+
$upsell = 'no';
|
75 |
+
if ( isset( $properties['has_badge'] ) && ! isset( $properties['import_file'] ) ) {
|
76 |
+
$upsell = 'yes';
|
77 |
+
}
|
78 |
+
?>
|
79 |
+
<div class="install-theme-info obfx-theme-info <?php echo esc_attr( $template ); ?>"
|
80 |
+
data-demo-url="<?php echo esc_url( $properties['demo_url'] ); ?>"
|
81 |
+
data-template-file="<?php echo esc_url( $properties['import_file'] ); ?>"
|
82 |
+
data-template-title="<?php echo esc_html( $properties['title'] ); ?>"
|
83 |
+
data-upsell="<?php echo esc_attr( $upsell ) ?>">
|
84 |
+
<h3 class="theme-name"><?php echo esc_html( $properties['title'] ); ?></h3>
|
85 |
+
<div class="obfx-preview-wrap">
|
86 |
+
<img class="theme-screenshot" src="<?php echo esc_url( $properties['screenshot'] ); ?>"
|
87 |
+
alt="<?php echo esc_html( $properties['title'] ); ?>">
|
88 |
+
<?php if ( isset( $properties['has_badge'] ) ) { ?>
|
89 |
+
<span class="badge"> <?php echo esc_html( $properties['has_badge'] ); ?></span>
|
90 |
+
<?php } ?>
|
91 |
+
</div>
|
92 |
+
<div class="theme-details">
|
93 |
+
<?php echo esc_html( $properties['description'] ); ?>
|
94 |
+
</div>
|
95 |
+
<?php
|
96 |
+
if ( ! empty( $properties['required_plugins'] ) && is_array( $properties['required_plugins'] ) ) { ?>
|
97 |
+
<div class="obfx-required-plugins">
|
98 |
+
<p><?php esc_html_e( 'Required Plugins', 'elementor-addon-widgets' ); ?></p>
|
99 |
+
<?php
|
100 |
+
foreach ( $properties['required_plugins'] as $plugin_slug => $details ) {
|
101 |
+
if ( $this->check_plugin_state( $plugin_slug ) === 'install' ) {
|
102 |
+
echo '<div class="obfx-installable plugin-card-' . esc_attr( $plugin_slug ) . '">';
|
103 |
+
echo '<span class="dashicons dashicons-no-alt"></span>';
|
104 |
+
echo $details['title'];
|
105 |
+
echo $this->get_button_html( $plugin_slug );
|
106 |
+
echo '</div>';
|
107 |
+
} elseif ( $this->check_plugin_state( $plugin_slug ) === 'activate' ) {
|
108 |
+
echo '<div class="obfx-activate plugin-card-' . esc_attr( $plugin_slug ) . '">';
|
109 |
+
echo '<span class="dashicons dashicons-admin-plugins" style="color: #ffb227;"></span>';
|
110 |
+
echo $details['title'];
|
111 |
+
echo $this->get_button_html( $plugin_slug );
|
112 |
+
echo '</div>';
|
113 |
+
} else {
|
114 |
+
echo '<div class="obfx-installed plugin-card-' . esc_attr( $plugin_slug ) . '">';
|
115 |
+
echo '<span class="dashicons dashicons-yes" style="color: #34a85e"></span>';
|
116 |
+
echo $details['title'];
|
117 |
+
echo '</div>';
|
118 |
+
}
|
119 |
+
} ?>
|
120 |
+
</div>
|
121 |
+
<?php } ?>
|
122 |
+
</div><!-- /.install-theme-info -->
|
123 |
+
<?php } ?>
|
124 |
+
</div>
|
125 |
+
|
126 |
+
<div class="wp-full-overlay-footer">
|
127 |
+
<button type="button" class="collapse-sidebar button" aria-expanded="true" aria-label="Collapse Sidebar">
|
128 |
+
<span class="collapse-sidebar-arrow"></span>
|
129 |
+
<span class="collapse-sidebar-label"><?php esc_html_e( 'Collapse', 'elementor-addon-widgets' ); ?></span>
|
130 |
+
</button>
|
131 |
+
<div class="devices-wrapper">
|
132 |
+
<div class="devices obfx-responsive-preview">
|
133 |
+
<button type="button" class="preview-desktop active" aria-pressed="true" data-device="desktop">
|
134 |
+
<span class="screen-reader-text"><?php esc_html_e( 'Enter desktop preview mode', 'elementor-addon-widgets' ); ?></span>
|
135 |
+
</button>
|
136 |
+
<button type="button" class="preview-tablet" aria-pressed="false" data-device="tablet">
|
137 |
+
<span class="screen-reader-text"><?php esc_html_e( 'Enter tablet preview mode', 'elementor-addon-widgets' ); ?></span>
|
138 |
+
</button>
|
139 |
+
<button type="button" class="preview-mobile" aria-pressed="false" data-device="mobile">
|
140 |
+
<span class="screen-reader-text"><?php esc_html_e( 'Enter mobile preview mode', 'elementor-addon-widgets' ); ?></span>
|
141 |
+
</button>
|
142 |
+
</div>
|
143 |
+
</div>
|
144 |
+
|
145 |
+
</div>
|
146 |
+
</div>
|
147 |
+
<div class="wp-full-overlay-main obfx-main-preview">
|
148 |
+
<iframe src="" title="Preview" class="obfx-template-frame"></iframe>
|
149 |
+
</div>
|
150 |
+
</div>
|
vendor/codeinwp/templates-directory/views/template-directory-render-template-tpl.php
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The View for Rendering the Template Directory Main Dashboard Page.
|
4 |
+
*
|
5 |
+
* @link https://themeisle.com
|
6 |
+
* @since 2.0.0
|
7 |
+
*
|
8 |
+
* @package ThemeIsle
|
9 |
+
* @subpackage ThemeIsle/PageTemplatesDirectory
|
10 |
+
* @codeCoverageIgnore
|
11 |
+
*/
|
12 |
+
|
13 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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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>.
|
vendor/codeinwp/themeisle-content-forms/assets/content-forms.css
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
label {
|
2 |
+
display: block;
|
3 |
+
margin-top: 20px;
|
4 |
+
}
|
5 |
+
input, textarea {
|
6 |
+
width: 100%;
|
7 |
+
display: block;
|
8 |
+
border: 1px solid #cccccc;
|
9 |
+
border-radius: 3px;
|
10 |
+
}
|
11 |
+
fieldset {
|
12 |
+
border: none;
|
13 |
+
margin: 0;
|
14 |
+
}
|
15 |
+
.content-form-loading {
|
16 |
+
opacity: .5;
|
17 |
+
pointer-events: none;
|
18 |
+
}
|
19 |
+
.content-form-notice {
|
20 |
+
font-size: 21px;
|
21 |
+
padding: 5px;
|
22 |
+
}
|
23 |
+
.content-form-success {
|
24 |
+
color: #53a813;
|
25 |
+
border: 2px solid #53a813;
|
26 |
+
}
|
27 |
+
.content-form-error {
|
28 |
+
color: #d5521a;
|
29 |
+
border: 2px solid #d5521a;
|
30 |
+
}
|
vendor/codeinwp/themeisle-content-forms/assets/content-forms.js
ADDED
@@ -0,0 +1,88 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
SerializeJSON jQuery plugin.
|
3 |
+
https://github.com/marioizquierdo/jquery.serializeJSON
|
4 |
+
version 2.8.1 (Dec, 2016)
|
5 |
+
|
6 |
+
Copyright (c) 2012, 2017 Mario Izquierdo
|
7 |
+
Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
|
8 |
+
and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
|
9 |
+
*/
|
10 |
+
!function(a){if("function"==typeof define&&define.amd)define(["jquery"],a);else if("object"==typeof exports){var b=require("jquery");module.exports=a(b)}else a(window.jQuery||window.Zepto||window.$)}(function(a){"use strict";a.fn.serializeJSON=function(b){var c,d,e,f,g,h,i,j,k,l,m,n,o;return c=a.serializeJSON,d=this,e=c.setupOpts(b),f=d.serializeArray(),c.readCheckboxUncheckedValues(f,e,d),g={},a.each(f,function(a,b){h=b.name,i=b.value,k=c.extractTypeAndNameWithNoType(h),l=k.nameWithNoType,m=k.type,m||(m=c.attrFromInputWithName(d,h,"data-value-type")),c.validateType(h,m,e),"skip"!==m&&(n=c.splitInputNameIntoKeysArray(l),j=c.parseValue(i,h,m,e),o=!j&&c.shouldSkipFalsy(d,h,l,m,e),o||c.deepSet(g,n,j,e))}),g},a.serializeJSON={defaultOptions:{checkboxUncheckedValue:void 0,parseNumbers:!1,parseBooleans:!1,parseNulls:!1,parseAll:!1,parseWithFunction:null,skipFalsyValuesForTypes:[],skipFalsyValuesForFields:[],customTypes:{},defaultTypes:{string:function(a){return String(a)},number:function(a){return Number(a)},boolean:function(a){var b=["false","null","undefined","","0"];return b.indexOf(a)===-1},null:function(a){var b=["false","null","undefined","","0"];return b.indexOf(a)===-1?a:null},array:function(a){return JSON.parse(a)},object:function(a){return JSON.parse(a)},auto:function(b){return a.serializeJSON.parseValue(b,null,null,{parseNumbers:!0,parseBooleans:!0,parseNulls:!0})},skip:null},useIntKeysAsArrayIndex:!1},setupOpts:function(b){var c,d,e,f,g,h;h=a.serializeJSON,null==b&&(b={}),e=h.defaultOptions||{},d=["checkboxUncheckedValue","parseNumbers","parseBooleans","parseNulls","parseAll","parseWithFunction","skipFalsyValuesForTypes","skipFalsyValuesForFields","customTypes","defaultTypes","useIntKeysAsArrayIndex"];for(c in b)if(d.indexOf(c)===-1)throw new Error("serializeJSON ERROR: invalid option '"+c+"'. Please use one of "+d.join(", "));return f=function(a){return b[a]!==!1&&""!==b[a]&&(b[a]||e[a])},g=f("parseAll"),{checkboxUncheckedValue:f("checkboxUncheckedValue"),parseNumbers:g||f("parseNumbers"),parseBooleans:g||f("parseBooleans"),parseNulls:g||f("parseNulls"),parseWithFunction:f("parseWithFunction"),skipFalsyValuesForTypes:f("skipFalsyValuesForTypes"),skipFalsyValuesForFields:f("skipFalsyValuesForFields"),typeFunctions:a.extend({},f("defaultTypes"),f("customTypes")),useIntKeysAsArrayIndex:f("useIntKeysAsArrayIndex")}},parseValue:function(b,c,d,e){var f,g;return f=a.serializeJSON,g=b,e.typeFunctions&&d&&e.typeFunctions[d]?g=e.typeFunctions[d](b):e.parseNumbers&&f.isNumeric(b)?g=Number(b):!e.parseBooleans||"true"!==b&&"false"!==b?e.parseNulls&&"null"==b&&(g=null):g="true"===b,e.parseWithFunction&&!d&&(g=e.parseWithFunction(g,c)),g},isObject:function(a){return a===Object(a)},isUndefined:function(a){return void 0===a},isValidArrayIndex:function(a){return/^[0-9]+$/.test(String(a))},isNumeric:function(a){return a-parseFloat(a)>=0},optionKeys:function(a){if(Object.keys)return Object.keys(a);var b,c=[];for(b in a)c.push(b);return c},readCheckboxUncheckedValues:function(b,c,d){var e,f,g,h,i;null==c&&(c={}),i=a.serializeJSON,e="input[type=checkbox][name]:not(:checked):not([disabled])",f=d.find(e).add(d.filter(e)),f.each(function(d,e){if(g=a(e),h=g.attr("data-unchecked-value"),null==h&&(h=c.checkboxUncheckedValue),null!=h){if(e.name&&e.name.indexOf("[][")!==-1)throw new Error("serializeJSON ERROR: checkbox unchecked values are not supported on nested arrays of objects like '"+e.name+"'. See https://github.com/marioizquierdo/jquery.serializeJSON/issues/67");b.push({name:e.name,value:h})}})},extractTypeAndNameWithNoType:function(a){var b;return(b=a.match(/(.*):([^:]+)$/))?{nameWithNoType:b[1],type:b[2]}:{nameWithNoType:a,type:null}},shouldSkipFalsy:function(b,c,d,e,f){var g=a.serializeJSON,h=g.attrFromInputWithName(b,c,"data-skip-falsy");if(null!=h)return"false"!==h;var i=f.skipFalsyValuesForFields;if(i&&(i.indexOf(d)!==-1||i.indexOf(c)!==-1))return!0;var j=f.skipFalsyValuesForTypes;return null==e&&(e="string"),!(!j||j.indexOf(e)===-1)},attrFromInputWithName:function(a,b,c){var d,e,f;return d=b.replace(/(:|\.|\[|\]|\s)/g,"\\$1"),e='[name="'+d+'"]',f=a.find(e).add(a.filter(e)),f.attr(c)},validateType:function(b,c,d){var e,f;if(f=a.serializeJSON,e=f.optionKeys(d?d.typeFunctions:f.defaultOptions.defaultTypes),c&&e.indexOf(c)===-1)throw new Error("serializeJSON ERROR: Invalid type "+c+" found in input name '"+b+"', please use one of "+e.join(", "));return!0},splitInputNameIntoKeysArray:function(b){var c,d;return d=a.serializeJSON,c=b.split("["),c=a.map(c,function(a){return a.replace(/\]/g,"")}),""===c[0]&&c.shift(),c},deepSet:function(b,c,d,e){var f,g,h,i,j,k;if(null==e&&(e={}),k=a.serializeJSON,k.isUndefined(b))throw new Error("ArgumentError: param 'o' expected to be an object or array, found undefined");if(!c||0===c.length)throw new Error("ArgumentError: param 'keys' expected to be an array with least one element");f=c[0],1===c.length?""===f?b.push(d):b[f]=d:(g=c[1],""===f&&(i=b.length-1,j=b[i],f=k.isObject(j)&&(k.isUndefined(j[g])||c.length>2)?i:i+1),""===g?!k.isUndefined(b[f])&&a.isArray(b[f])||(b[f]=[]):e.useIntKeysAsArrayIndex&&k.isValidArrayIndex(g)?!k.isUndefined(b[f])&&a.isArray(b[f])||(b[f]=[]):!k.isUndefined(b[f])&&k.isObject(b[f])||(b[f]={}),h=c.slice(1),k.deepSet(b[f],h,d,e))}}});
|
11 |
+
|
12 |
+
(function ($) {
|
13 |
+
/**
|
14 |
+
* Watch for all the content forms and listen for a submit action
|
15 |
+
*/
|
16 |
+
$(document).on('submit', 'form.content-form', function (e) {
|
17 |
+
e.preventDefault();
|
18 |
+
|
19 |
+
var $form = $(this),
|
20 |
+
serialized = $form.serializeJSON(),
|
21 |
+
postData = {
|
22 |
+
form_type: serialized['form-type'],
|
23 |
+
form_id: serialized['form-id'],
|
24 |
+
post_id: serialized['post-id'],
|
25 |
+
form_builder: serialized['form-builder'],
|
26 |
+
data: serialized.data,
|
27 |
+
nonce: serialized[ '_wpnonce_' + serialized['form-type'] ],
|
28 |
+
};
|
29 |
+
|
30 |
+
$form.addClass('content-form-loading');
|
31 |
+
|
32 |
+
window.jQuery.ajax({
|
33 |
+
url: contentFormsSettings.restUrl + `submit`,
|
34 |
+
dataType: 'json',
|
35 |
+
method: 'POST',
|
36 |
+
data: postData,
|
37 |
+
beforeSend: function (xhr) {
|
38 |
+
xhr.setRequestHeader('X-WP-Nonce', window.contentFormsSettings.nonce);
|
39 |
+
},
|
40 |
+
success: function (data) {
|
41 |
+
$form.removeClass('content-form-loading');
|
42 |
+
|
43 |
+
var status = 'error';
|
44 |
+
|
45 |
+
if ( typeof data.success !== "undefined" && data.success ) {
|
46 |
+
status = 'success';
|
47 |
+
}
|
48 |
+
|
49 |
+
addContentFormNotice( data.msg, status, $form );
|
50 |
+
|
51 |
+
console.log(data)
|
52 |
+
},
|
53 |
+
error: function (e) {
|
54 |
+
$form.removeClass('content-form-loading');
|
55 |
+
|
56 |
+
addContentFormNotice( e, 'error', $form );
|
57 |
+
|
58 |
+
console.error(e)
|
59 |
+
}
|
60 |
+
});
|
61 |
+
});
|
62 |
+
|
63 |
+
/**
|
64 |
+
* Handle Form notices
|
65 |
+
* @param notice
|
66 |
+
* @param type
|
67 |
+
* @param $form
|
68 |
+
*/
|
69 |
+
var addContentFormNotice = function ( notice, type, $form ) {
|
70 |
+
var noticeStatus = '',
|
71 |
+
$currentNotice = $form.children( '.content-form-notice' );
|
72 |
+
|
73 |
+
if ( 'success' === type ) {
|
74 |
+
noticeStatus = 'content-form-success';
|
75 |
+
} else {
|
76 |
+
noticeStatus = 'content-form-error';
|
77 |
+
}
|
78 |
+
|
79 |
+
var noticeEl = "<h3 class='content-form-notice " + noticeStatus + "' >" + notice + "</h3>";
|
80 |
+
|
81 |
+
// if an notice already exist, replace it; otherwise create one
|
82 |
+
if ( $currentNotice.length > 0 ) {
|
83 |
+
$currentNotice.replaceWith( noticeEl )
|
84 |
+
} else {
|
85 |
+
$form.prepend( noticeEl );
|
86 |
+
}
|
87 |
+
}
|
88 |
+
})(jQuery);
|
vendor/codeinwp/themeisle-content-forms/assets/gutenberg-esnext/block.build.js
ADDED
@@ -0,0 +1,376 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/******/ (function(modules) { // webpackBootstrap
|
2 |
+
/******/ // The module cache
|
3 |
+
/******/ var installedModules = {};
|
4 |
+
/******/
|
5 |
+
/******/ // The require function
|
6 |
+
/******/ function __webpack_require__(moduleId) {
|
7 |
+
/******/
|
8 |
+
/******/ // Check if module is in cache
|
9 |
+
/******/ if(installedModules[moduleId]) {
|
10 |
+
/******/ return installedModules[moduleId].exports;
|
11 |
+
/******/ }
|
12 |
+
/******/ // Create a new module (and put it into the cache)
|
13 |
+
/******/ var module = installedModules[moduleId] = {
|
14 |
+
/******/ i: moduleId,
|
15 |
+
/******/ l: false,
|
16 |
+
/******/ exports: {}
|
17 |
+
/******/ };
|
18 |
+
/******/
|
19 |
+
/******/ // Execute the module function
|
20 |
+
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
21 |
+
/******/
|
22 |
+
/******/ // Flag the module as loaded
|
23 |
+
/******/ module.l = true;
|
24 |
+
/******/
|
25 |
+
/******/ // Return the exports of the module
|
26 |
+
/******/ return module.exports;
|
27 |
+
/******/ }
|
28 |
+
/******/
|
29 |
+
/******/
|
30 |
+
/******/ // expose the modules object (__webpack_modules__)
|
31 |
+
/******/ __webpack_require__.m = modules;
|
32 |
+
/******/
|
33 |
+
/******/ // expose the module cache
|
34 |
+
/******/ __webpack_require__.c = installedModules;
|
35 |
+
/******/
|
36 |
+
/******/ // define getter function for harmony exports
|
37 |
+
/******/ __webpack_require__.d = function(exports, name, getter) {
|
38 |
+
/******/ if(!__webpack_require__.o(exports, name)) {
|
39 |
+
/******/ Object.defineProperty(exports, name, {
|
40 |
+
/******/ configurable: false,
|
41 |
+
/******/ enumerable: true,
|
42 |
+
/******/ get: getter
|
43 |
+
/******/ });
|
44 |
+
/******/ }
|
45 |
+
/******/ };
|
46 |
+
/******/
|
47 |
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
48 |
+
/******/ __webpack_require__.n = function(module) {
|
49 |
+
/******/ var getter = module && module.__esModule ?
|
50 |
+
/******/ function getDefault() { return module['default']; } :
|
51 |
+
/******/ function getModuleExports() { return module; };
|
52 |
+
/******/ __webpack_require__.d(getter, 'a', getter);
|
53 |
+
/******/ return getter;
|
54 |
+
/******/ };
|
55 |
+
/******/
|
56 |
+
/******/ // Object.prototype.hasOwnProperty.call
|
57 |
+
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
58 |
+
/******/
|
59 |
+
/******/ // __webpack_public_path__
|
60 |
+
/******/ __webpack_require__.p = "";
|
61 |
+
/******/
|
62 |
+
/******/ // Load entry module and return exports
|
63 |
+
/******/ return __webpack_require__(__webpack_require__.s = 0);
|
64 |
+
/******/ })
|
65 |
+
/************************************************************************/
|
66 |
+
/******/ ([
|
67 |
+
/* 0 */
|
68 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
69 |
+
|
70 |
+
"use strict";
|
71 |
+
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
72 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__components_FormEditor_js__ = __webpack_require__(1);
|
73 |
+
var registerBlockType = wp.blocks.registerBlockType;
|
74 |
+
var __ = wp.i18n.__;
|
75 |
+
|
76 |
+
|
77 |
+
|
78 |
+
// @TODO think about a method to magically create this list
|
79 |
+
var content_forms = ['contact', 'newsletter', 'registration'];
|
80 |
+
|
81 |
+
/**
|
82 |
+
* Go through each form type and register a blockType from the given config
|
83 |
+
* @TODO maybe create a custom category for OrbitFox only?
|
84 |
+
*
|
85 |
+
*/
|
86 |
+
content_forms.forEach(function (form, index) {
|
87 |
+
var _this = this;
|
88 |
+
|
89 |
+
var config = window['content_forms_config_for_' + form];
|
90 |
+
|
91 |
+
registerBlockType('content-forms/' + form, {
|
92 |
+
title: config.title,
|
93 |
+
icon: 'index-card',
|
94 |
+
category: 'common',
|
95 |
+
type: form,
|
96 |
+
keywords: [__('forms'), __('fields')],
|
97 |
+
edit: __WEBPACK_IMPORTED_MODULE_0__components_FormEditor_js__["a" /* ContentFormEditor */],
|
98 |
+
// save: props => {return null}
|
99 |
+
save: function save(props) {
|
100 |
+
var component = _this;
|
101 |
+
var attributes = props.attributes;
|
102 |
+
var fields = attributes.fields;
|
103 |
+
|
104 |
+
var fieldsEl = [];
|
105 |
+
|
106 |
+
if (typeof attributes.uid === "undefined") {
|
107 |
+
attributes.uid = props.id;
|
108 |
+
}
|
109 |
+
|
110 |
+
_.each(fields, function (args, key) {
|
111 |
+
|
112 |
+
fieldsEl.push(wp.element.createElement('p', {
|
113 |
+
key: key,
|
114 |
+
className: 'content-form-field-label',
|
115 |
+
'data-field_id': args.field_id,
|
116 |
+
'data-label': args.label,
|
117 |
+
'data-field_type': args.type,
|
118 |
+
'data-requirement': args.requirement ? "true" : "false"
|
119 |
+
}));
|
120 |
+
});
|
121 |
+
|
122 |
+
return wp.element.createElement(
|
123 |
+
'div',
|
124 |
+
{ key: 'content-form-fields', className: "content-form-fields content-form-" + form, 'data-uid': props.id },
|
125 |
+
fieldsEl
|
126 |
+
);
|
127 |
+
}
|
128 |
+
|
129 |
+
// @TODO Maybe return to the old way of saving a plain html
|
130 |
+
// save: props => {
|
131 |
+
// const {
|
132 |
+
// className,
|
133 |
+
// attributes
|
134 |
+
// } = props;
|
135 |
+
//
|
136 |
+
// let elements = [];
|
137 |
+
//
|
138 |
+
// _.each(config.fields, function (args, key) {
|
139 |
+
// let fieldset_element = <fieldset key={key}>
|
140 |
+
// <label htmlFor={key}>{attributes[key]}</label>
|
141 |
+
// <input type="text" name={key} />
|
142 |
+
// </fieldset>;
|
143 |
+
// elements.push(fieldset_element)
|
144 |
+
// });
|
145 |
+
//
|
146 |
+
// // Add a submit button; @TODO Make a setting for this;
|
147 |
+
// elements.push(<button key="submit_btn">Submit</button>);
|
148 |
+
//
|
149 |
+
// return (
|
150 |
+
// <form className={ props.className } method="post" action={submitAction}>
|
151 |
+
// {elements}
|
152 |
+
// </form>
|
153 |
+
// );
|
154 |
+
// }
|
155 |
+
});
|
156 |
+
});
|
157 |
+
|
158 |
+
/***/ }),
|
159 |
+
/* 1 */
|
160 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
161 |
+
|
162 |
+
"use strict";
|
163 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ContentFormEditor; });
|
164 |
+
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
165 |
+
|
166 |
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
167 |
+
|
168 |
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
169 |
+
|
170 |
+
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
171 |
+
|
172 |
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
173 |
+
|
174 |
+
/**
|
175 |
+
* WordPress dependencies
|
176 |
+
*/
|
177 |
+
// import { map } from 'lodash';
|
178 |
+
var Component = wp.element.Component;
|
179 |
+
var _wp$components = wp.components,
|
180 |
+
Placeholder = _wp$components.Placeholder,
|
181 |
+
Spinner = _wp$components.Spinner,
|
182 |
+
withAPIData = _wp$components.withAPIData,
|
183 |
+
FormToggle = _wp$components.FormToggle;
|
184 |
+
var __ = wp.i18n.__;
|
185 |
+
var _wp$blocks = wp.blocks,
|
186 |
+
Editable = _wp$blocks.Editable,
|
187 |
+
BlockEdit = _wp$blocks.BlockEdit,
|
188 |
+
InspectorControls = _wp$blocks.InspectorControls;
|
189 |
+
|
190 |
+
|
191 |
+
var fieldStyle = {
|
192 |
+
width: '40%',
|
193 |
+
display: 'inline-block'
|
194 |
+
};
|
195 |
+
|
196 |
+
var fieldStyleR = {
|
197 |
+
width: '10%',
|
198 |
+
display: 'inline-block',
|
199 |
+
textAlign: 'right'
|
200 |
+
};
|
201 |
+
|
202 |
+
var FormEditor = function (_Component) {
|
203 |
+
_inherits(FormEditor, _Component);
|
204 |
+
|
205 |
+
function FormEditor() {
|
206 |
+
_classCallCheck(this, FormEditor);
|
207 |
+
|
208 |
+
var _this = _possibleConstructorReturn(this, (FormEditor.__proto__ || Object.getPrototypeOf(FormEditor)).apply(this, arguments));
|
209 |
+
|
210 |
+
_this.form_type = _this.props.name.replace('content-forms/', '');
|
211 |
+
_this.config = window['content_forms_config_for_' + _this.form_type];
|
212 |
+
return _this;
|
213 |
+
}
|
214 |
+
|
215 |
+
_createClass(FormEditor, [{
|
216 |
+
key: 'render',
|
217 |
+
value: function render() {
|
218 |
+
var component = this;
|
219 |
+
var _props = this.props,
|
220 |
+
attributes = _props.attributes,
|
221 |
+
setAttributes = _props.setAttributes,
|
222 |
+
focus = _props.focus;
|
223 |
+
var fields = attributes.fields;
|
224 |
+
|
225 |
+
var placeholderEl = wp.element.createElement(
|
226 |
+
Placeholder,
|
227 |
+
{ key: 'form-loader', icon: 'admin-post', label: __('Form') },
|
228 |
+
wp.element.createElement(Spinner, null)
|
229 |
+
);
|
230 |
+
var controlsEl = [];
|
231 |
+
var fieldsEl = [];
|
232 |
+
|
233 |
+
_.each(component.config.controls, function (args, key) {
|
234 |
+
|
235 |
+
controlsEl.push(wp.element.createElement(
|
236 |
+
'div',
|
237 |
+
{ key: key },
|
238 |
+
wp.element.createElement(BlockEdit, { key: 'block-edit-custom-' + key }),
|
239 |
+
wp.element.createElement(InspectorControls.TextControl, {
|
240 |
+
key: key,
|
241 |
+
label: args.label,
|
242 |
+
value: attributes[key] || '',
|
243 |
+
onFocus: function onFocus(f) {
|
244 |
+
console.log(f);
|
245 |
+
},
|
246 |
+
onChange: function onChange(value) {
|
247 |
+
var newValues = {};
|
248 |
+
newValues[key] = value;
|
249 |
+
setAttributes(newValues);
|
250 |
+
}
|
251 |
+
})
|
252 |
+
));
|
253 |
+
});
|
254 |
+
|
255 |
+
_.each(fields, function (args, key) {
|
256 |
+
var val = '';
|
257 |
+
var field_id = args.field_id;
|
258 |
+
var field_config = component.config.fields[field_id];
|
259 |
+
var isRequired = false;
|
260 |
+
|
261 |
+
if (_typeof(args.label) === "object") {
|
262 |
+
val = args.label[0];
|
263 |
+
} else if (typeof args.label === "string") {
|
264 |
+
val = [args.label];
|
265 |
+
}
|
266 |
+
|
267 |
+
if (typeof args.requirement !== "undefined") {
|
268 |
+
isRequired = args.requirement;
|
269 |
+
}
|
270 |
+
|
271 |
+
var focusOn = 'field-' + field_id;
|
272 |
+
|
273 |
+
fieldsEl.push(wp.element.createElement(
|
274 |
+
'div',
|
275 |
+
{ key: key, style: { border: '1px solid #333', padding: '5px', margin: '5px', borderRadius: '8px' }, className: 'content-form-field' },
|
276 |
+
wp.element.createElement(
|
277 |
+
'fieldset',
|
278 |
+
{ style: fieldStyle },
|
279 |
+
wp.element.createElement(Editable, {
|
280 |
+
value: val,
|
281 |
+
tagName: 'label',
|
282 |
+
placeholder: __('Label for ') + field_id,
|
283 |
+
className: 'content-form-field-label',
|
284 |
+
onChange: function onChange(value) {
|
285 |
+
var newValues = attributes.fields;
|
286 |
+
newValues[key]['label'] = value;
|
287 |
+
setAttributes({ fields: newValues });
|
288 |
+
component.forceUpdate();
|
289 |
+
} })
|
290 |
+
),
|
291 |
+
wp.element.createElement(
|
292 |
+
'fieldset',
|
293 |
+
{ style: fieldStyle },
|
294 |
+
wp.element.createElement(
|
295 |
+
'select',
|
296 |
+
{
|
297 |
+
name: 'field-type-select',
|
298 |
+
value: typeof args['type'] !== "undefined" ? args['type'] : 'text',
|
299 |
+
onChange: function onChange(event) {
|
300 |
+
var newValues = attributes.fields;
|
301 |
+
newValues[key]['type'] = event.target.selected;
|
302 |
+
setAttributes({ fields: newValues });
|
303 |
+
component.forceUpdate();
|
304 |
+
} },
|
305 |
+
wp.element.createElement(
|
306 |
+
'option',
|
307 |
+
{ value: 'text', key: 'text' },
|
308 |
+
'text'
|
309 |
+
),
|
310 |
+
wp.element.createElement(
|
311 |
+
'option',
|
312 |
+
{ value: 'textarea', key: 'textarea' },
|
313 |
+
'textarea'
|
314 |
+
),
|
315 |
+
wp.element.createElement(
|
316 |
+
'option',
|
317 |
+
{ value: 'password', key: 'password' },
|
318 |
+
'password'
|
319 |
+
),
|
320 |
+
wp.element.createElement(
|
321 |
+
'option',
|
322 |
+
{ value: 'email', key: 'email' },
|
323 |
+
'email'
|
324 |
+
),
|
325 |
+
wp.element.createElement(
|
326 |
+
'option',
|
327 |
+
{ value: 'number', key: 'number' },
|
328 |
+
'number'
|
329 |
+
)
|
330 |
+
)
|
331 |
+
),
|
332 |
+
wp.element.createElement(
|
333 |
+
'fieldset',
|
334 |
+
{ style: fieldStyleR },
|
335 |
+
wp.element.createElement(FormToggle, {
|
336 |
+
checked: isRequired,
|
337 |
+
showHint: false,
|
338 |
+
onChange: function onChange(event) {
|
339 |
+
var newValues = attributes.fields;
|
340 |
+
newValues[key]['requirement'] = event.target.checked;
|
341 |
+
setAttributes({ fields: newValues });
|
342 |
+
component.forceUpdate();
|
343 |
+
}
|
344 |
+
})
|
345 |
+
)
|
346 |
+
));
|
347 |
+
});
|
348 |
+
|
349 |
+
return [focus && wp.element.createElement(
|
350 |
+
InspectorControls,
|
351 |
+
{ key: 'inspector' },
|
352 |
+
wp.element.createElement(
|
353 |
+
'h3',
|
354 |
+
null,
|
355 |
+
__('Form Settings')
|
356 |
+
),
|
357 |
+
controlsEl
|
358 |
+
), wp.element.createElement(
|
359 |
+
'div',
|
360 |
+
{ key: 'fields', className: 'fields ' + component.props.className, 'data-uid': attributes.uid },
|
361 |
+
fieldsEl === [] ? placeholderEl : fieldsEl
|
362 |
+
)];
|
363 |
+
}
|
364 |
+
}]);
|
365 |
+
|
366 |
+
return FormEditor;
|
367 |
+
}(Component);
|
368 |
+
|
369 |
+
var ContentFormEditor = withAPIData(function () {
|
370 |
+
return {
|
371 |
+
ContentForm: '/content-forms/v1/forms'
|
372 |
+
};
|
373 |
+
})(FormEditor);
|
374 |
+
|
375 |
+
/***/ })
|
376 |
+
/******/ ]);
|
vendor/codeinwp/themeisle-content-forms/assets/gutenberg-esnext/block.js
ADDED
@@ -0,0 +1,85 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
const {
|
2 |
+
registerBlockType,
|
3 |
+
} = wp.blocks;
|
4 |
+
const { __ } = wp.i18n;
|
5 |
+
import { ContentFormEditor } from './components/FormEditor.js'
|
6 |
+
|
7 |
+
// @TODO think about a method to magically create this list
|
8 |
+
const content_forms = [
|
9 |
+
'contact',
|
10 |
+
'newsletter',
|
11 |
+
'registration'
|
12 |
+
];
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Go through each form type and register a blockType from the given config
|
16 |
+
* @TODO maybe create a custom category for OrbitFox only?
|
17 |
+
*
|
18 |
+
*/
|
19 |
+
content_forms.forEach(function (form, index) {
|
20 |
+
let config = window['content_forms_config_for_' + form];
|
21 |
+
|
22 |
+
registerBlockType('content-forms/' + form, {
|
23 |
+
title: config.title,
|
24 |
+
icon: 'index-card',
|
25 |
+
category: 'common',
|
26 |
+
type: form,
|
27 |
+
keywords: [ __( 'forms' ), __( 'fields' ) ],
|
28 |
+
edit: ContentFormEditor,
|
29 |
+
// save: props => {return null}
|
30 |
+
save: props => {
|
31 |
+
const component = this
|
32 |
+
const {attributes} = props
|
33 |
+
const {fields} = attributes
|
34 |
+
let fieldsEl = []
|
35 |
+
|
36 |
+
if ( typeof attributes.uid === "undefined" ) {
|
37 |
+
attributes.uid = props.id
|
38 |
+
}
|
39 |
+
|
40 |
+
_.each(fields, function (args, key) {
|
41 |
+
|
42 |
+
fieldsEl.push(<p
|
43 |
+
key={key}
|
44 |
+
className="content-form-field-label"
|
45 |
+
data-field_id={args.field_id}
|
46 |
+
data-label={args.label}
|
47 |
+
data-field_type={args.type}
|
48 |
+
data-requirement={args.requirement ? "true": "false"}
|
49 |
+
/>)
|
50 |
+
})
|
51 |
+
|
52 |
+
return (<div key="content-form-fields" className={"content-form-fields content-form-" + form} data-uid={props.id}>
|
53 |
+
{fieldsEl}
|
54 |
+
</div>)
|
55 |
+
}
|
56 |
+
|
57 |
+
// @TODO Maybe return to the old way of saving a plain html
|
58 |
+
// save: props => {
|
59 |
+
// const {
|
60 |
+
// className,
|
61 |
+
// attributes
|
62 |
+
// } = props;
|
63 |
+
//
|
64 |
+
// let elements = [];
|
65 |
+
//
|
66 |
+
// _.each(config.fields, function (args, key) {
|
67 |
+
// let fieldset_element = <fieldset key={key}>
|
68 |
+
// <label htmlFor={key}>{attributes[key]}</label>
|
69 |
+
// <input type="text" name={key} />
|
70 |
+
// </fieldset>;
|
71 |
+
// elements.push(fieldset_element)
|
72 |
+
// });
|
73 |
+
//
|
74 |
+
// // Add a submit button; @TODO Make a setting for this;
|
75 |
+
// elements.push(<button key="submit_btn">Submit</button>);
|
76 |
+
//
|
77 |
+
// return (
|
78 |
+
// <form className={ props.className } method="post" action={submitAction}>
|
79 |
+
// {elements}
|
80 |
+
// </form>
|
81 |
+
// );
|
82 |
+
// }
|
83 |
+
});
|
84 |
+
});
|
85 |
+
|
vendor/codeinwp/themeisle-content-forms/assets/gutenberg-esnext/components/FormEditor.js
ADDED
@@ -0,0 +1,148 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* WordPress dependencies
|
3 |
+
*/
|
4 |
+
// import { map } from 'lodash';
|
5 |
+
const {Component} = wp.element;
|
6 |
+
const {Placeholder, Spinner, withAPIData, FormToggle} = wp.components;
|
7 |
+
const {__} = wp.i18n;
|
8 |
+
const {
|
9 |
+
Editable,
|
10 |
+
BlockEdit,
|
11 |
+
InspectorControls
|
12 |
+
} = wp.blocks;
|
13 |
+
|
14 |
+
const fieldStyle = {
|
15 |
+
width: '40%',
|
16 |
+
display: 'inline-block'
|
17 |
+
}
|
18 |
+
|
19 |
+
const fieldStyleR = {
|
20 |
+
width: '10%',
|
21 |
+
display: 'inline-block',
|
22 |
+
textAlign: 'right'
|
23 |
+
}
|
24 |
+
|
25 |
+
class FormEditor extends Component {
|
26 |
+
constructor() {
|
27 |
+
super(...arguments);
|
28 |
+
this.form_type = this.props.name.replace('content-forms/', '')
|
29 |
+
this.config = window['content_forms_config_for_' + this.form_type]
|
30 |
+
}
|
31 |
+
|
32 |
+
render() {
|
33 |
+
const component = this
|
34 |
+
const { attributes, setAttributes, focus } = this.props
|
35 |
+
const {fields} = attributes
|
36 |
+
const placeholderEl = <Placeholder key="form-loader" icon="admin-post" label={__('Form')}>
|
37 |
+
<Spinner/>
|
38 |
+
</Placeholder>
|
39 |
+
let controlsEl = []
|
40 |
+
let fieldsEl = []
|
41 |
+
|
42 |
+
_.each(component.config.controls, function (args, key) {
|
43 |
+
|
44 |
+
controlsEl.push(<div key={key}>
|
45 |
+
<BlockEdit key={'block-edit-custom-' + key}/>
|
46 |
+
<InspectorControls.TextControl
|
47 |
+
key={key}
|
48 |
+
label={args.label}
|
49 |
+
value={attributes[key] || ''}
|
50 |
+
onFocus={ f => {
|
51 |
+
console.log(f)
|
52 |
+
}}
|
53 |
+
onChange={value => {
|
54 |
+
let newValues = {}
|
55 |
+
newValues[key] = value
|
56 |
+
setAttributes(newValues)
|
57 |
+
}}
|
58 |
+
/>
|
59 |
+
</div>)
|
60 |
+
})
|
61 |
+
|
62 |
+
_.each(fields, function (args, key) {
|
63 |
+
let val = ''
|
64 |
+
let field_id = args.field_id
|
65 |
+
let field_config = component.config.fields[field_id]
|
66 |
+
let isRequired = false
|
67 |
+
|
68 |
+
if (typeof args.label === "object") {
|
69 |
+
val = args.label[0]
|
70 |
+
} else if (typeof args.label === "string") {
|
71 |
+
val = [args.label]
|
72 |
+
}
|
73 |
+
|
74 |
+
if (typeof args.requirement !== "undefined") {
|
75 |
+
isRequired = args.requirement
|
76 |
+
}
|
77 |
+
|
78 |
+
const focusOn = 'field-' + field_id
|
79 |
+
|
80 |
+
fieldsEl.push(<div key={key} style={{border: '1px solid #333', padding: '5px', margin: '5px', borderRadius: '8px'}} className="content-form-field">
|
81 |
+
|
82 |
+
<fieldset style={fieldStyle}>
|
83 |
+
<Editable
|
84 |
+
value={val}
|
85 |
+
tagName="label"
|
86 |
+
placeholder={__('Label for ') + field_id}
|
87 |
+
className="content-form-field-label"
|
88 |
+
onChange={(value) => {
|
89 |
+
let newValues = attributes.fields
|
90 |
+
newValues[key]['label'] = value
|
91 |
+
setAttributes({fields: newValues})
|
92 |
+
component.forceUpdate()
|
93 |
+
}}/>
|
94 |
+
</fieldset>
|
95 |
+
|
96 |
+
<fieldset style={fieldStyle}>
|
97 |
+
<select
|
98 |
+
name="field-type-select"
|
99 |
+
value={typeof args['type'] !== "undefined" ? args['type'] : 'text'}
|
100 |
+
onChange={(event) => {
|
101 |
+
let newValues = attributes.fields
|
102 |
+
newValues[key]['type'] = event.target.selected
|
103 |
+
setAttributes({fields: newValues})
|
104 |
+
component.forceUpdate()
|
105 |
+
}}>
|
106 |
+
<option value="text" key="text">text</option>
|
107 |
+
<option value="textarea" key="textarea">textarea</option>
|
108 |
+
<option value="password" key="password">password</option>
|
109 |
+
<option value="email" key="email">email</option>
|
110 |
+
<option value="number" key="number">number</option>
|
111 |
+
</select>
|
112 |
+
</fieldset>
|
113 |
+
|
114 |
+
<fieldset style={fieldStyleR}>
|
115 |
+
<FormToggle
|
116 |
+
checked={isRequired}
|
117 |
+
showHint={false}
|
118 |
+
onChange={(event) => {
|
119 |
+
let newValues = attributes.fields
|
120 |
+
newValues[key]['requirement'] = event.target.checked
|
121 |
+
setAttributes({fields: newValues})
|
122 |
+
component.forceUpdate()
|
123 |
+
}}
|
124 |
+
/>
|
125 |
+
</fieldset>
|
126 |
+
|
127 |
+
</div>)
|
128 |
+
})
|
129 |
+
|
130 |
+
return [
|
131 |
+
focus && (<InspectorControls key="inspector">
|
132 |
+
<h3>{__('Form Settings')}</h3>
|
133 |
+
{controlsEl}
|
134 |
+
</InspectorControls>),
|
135 |
+
(<div key="fields" className={'fields ' + component.props.className} data-uid={attributes.uid}>
|
136 |
+
{(fieldsEl === [])
|
137 |
+
? placeholderEl
|
138 |
+
: fieldsEl}
|
139 |
+
</div>)
|
140 |
+
]
|
141 |
+
}
|
142 |
+
}
|
143 |
+
|
144 |
+
export const ContentFormEditor = withAPIData(() => {
|
145 |
+
return {
|
146 |
+
ContentForm: '/content-forms/v1/forms',
|
147 |
+
};
|
148 |
+
})(FormEditor);
|
vendor/codeinwp/themeisle-content-forms/assets/gutenberg-esnext/index.php
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// not here
|
vendor/codeinwp/themeisle-content-forms/assets/gutenberg-esnext/package-lock.json
ADDED
@@ -0,0 +1,4080 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "04-controls-esnext",
|
3 |
+
"version": "1.0.0",
|
4 |
+
"lockfileVersion": 1,
|
5 |
+
"requires": true,
|
6 |
+
"dependencies": {
|
7 |
+
"acorn": {
|
8 |
+
"version": "5.2.1",
|
9 |
+
"resolved": "https://registry.npmjs.org/acorn/-/acorn-5.2.1.tgz",
|
10 |
+
"integrity": "sha512-jG0u7c4Ly+3QkkW18V+NRDN+4bWHdln30NL1ZL2AvFZZmQe/BfopYCtghCKKVBUSetZ4QKcyA0pY6/4Gw8Pv8w==",
|
11 |
+
"dev": true
|
12 |
+
},
|
13 |
+
"acorn-dynamic-import": {
|
14 |
+
"version": "2.0.2",
|
15 |
+
"resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-2.0.2.tgz",
|
16 |
+
"integrity": "sha1-x1K9IQvvZ5UBtsbLf8hPj0cVjMQ=",
|
17 |
+
"dev": true,
|
18 |
+
"requires": {
|
19 |
+
"acorn": "4.0.13"
|
20 |
+
},
|
21 |
+
"dependencies": {
|
22 |
+
"acorn": {
|
23 |
+
"version": "4.0.13",
|
24 |
+
"resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz",
|
25 |
+
"integrity": "sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c=",
|
26 |
+
"dev": true
|
27 |
+
}
|
28 |
+
}
|
29 |
+
},
|
30 |
+
"ajv": {
|
31 |
+
"version": "5.5.1",
|
32 |
+
"resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.1.tgz",
|
33 |
+
"integrity": "sha1-s4u4h22ehr7plJVqBOch6IskjrI=",
|
34 |
+
"dev": true,
|
35 |
+
"requires": {
|
36 |
+
"co": "4.6.0",
|
37 |
+
"fast-deep-equal": "1.0.0",
|
38 |
+
"fast-json-stable-stringify": "2.0.0",
|
39 |
+
"json-schema-traverse": "0.3.1"
|
40 |
+
}
|
41 |
+
},
|
42 |
+
"ajv-keywords": {
|
43 |
+
"version": "2.1.1",
|
44 |
+
"resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-2.1.1.tgz",
|
45 |
+
"integrity": "sha1-YXmX/F9gV2iUxDX5QNgZ4TW4B2I=",
|
46 |
+
"dev": true
|
47 |
+
},
|
48 |
+
"align-text": {
|
49 |
+
"version": "0.1.4",
|
50 |
+
"resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz",
|
51 |
+
"integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=",
|
52 |
+
"dev": true,
|
53 |
+
"requires": {
|
54 |
+
"kind-of": "3.2.2",
|
55 |
+
"longest": "1.0.1",
|
56 |
+
"repeat-string": "1.6.1"
|
57 |
+
}
|
58 |
+
},
|
59 |
+
"ansi-regex": {
|
60 |
+
"version": "2.1.1",
|
61 |
+
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
|
62 |
+
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
|
63 |
+
"dev": true
|
64 |
+
},
|
65 |
+
"ansi-styles": {
|
66 |
+
"version": "2.2.1",
|
67 |
+
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
|
68 |
+
"integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=",
|
69 |
+
"dev": true
|
70 |
+
},
|
71 |
+
"anymatch": {
|
72 |
+
"version": "1.3.2",
|
73 |
+
"resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.2.tgz",
|
74 |
+
"integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==",
|
75 |
+
"dev": true,
|
76 |
+
"requires": {
|
77 |
+
"micromatch": "2.3.11",
|
78 |
+
"normalize-path": "2.1.1"
|
79 |
+
}
|
80 |
+
},
|
81 |
+
"arr-diff": {
|
82 |
+
"version": "2.0.0",
|
83 |
+
"resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz",
|
84 |
+
"integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=",
|
85 |
+
"dev": true,
|
86 |
+
"requires": {
|
87 |
+
"arr-flatten": "1.1.0"
|
88 |
+
}
|
89 |
+
},
|
90 |
+
"arr-flatten": {
|
91 |
+
"version": "1.1.0",
|
92 |
+
"resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz",
|
93 |
+
"integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==",
|
94 |
+
"dev": true
|
95 |
+
},
|
96 |
+
"array-unique": {
|
97 |
+
"version": "0.2.1",
|
98 |
+
"resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz",
|
99 |
+
"integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=",
|
100 |
+
"dev": true
|
101 |
+
},
|
102 |
+
"asn1.js": {
|
103 |
+
"version": "4.9.2",
|
104 |
+
"resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.9.2.tgz",
|
105 |
+
"integrity": "sha512-b/OsSjvWEo8Pi8H0zsDd2P6Uqo2TK2pH8gNLSJtNLM2Db0v2QaAZ0pBQJXVjAn4gBuugeVDr7s63ZogpUIwWDg==",
|
106 |
+
"dev": true,
|
107 |
+
"requires": {
|
108 |
+
"bn.js": "4.11.8",
|
109 |
+
"inherits": "2.0.3",
|
110 |
+
"minimalistic-assert": "1.0.0"
|
111 |
+
}
|
112 |
+
},
|
113 |
+
"assert": {
|
114 |
+
"version": "1.4.1",
|
115 |
+
"resolved": "https://registry.npmjs.org/assert/-/assert-1.4.1.tgz",
|
116 |
+
"integrity": "sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE=",
|
117 |
+
"dev": true,
|
118 |
+
"requires": {
|
119 |
+
"util": "0.10.3"
|
120 |
+
}
|
121 |
+
},
|
122 |
+
"async": {
|
123 |
+
"version": "2.6.0",
|
124 |
+
"resolved": "https://registry.npmjs.org/async/-/async-2.6.0.tgz",
|
125 |
+
"integrity": "sha512-xAfGg1/NTLBBKlHFmnd7PlmUW9KhVQIUuSrYem9xzFUZy13ScvtyGGejaae9iAVRiRq9+Cx7DPFaAAhCpyxyPw==",
|
126 |
+
"dev": true,
|
127 |
+
"requires": {
|
128 |
+
"lodash": "4.17.4"
|
129 |
+
}
|
130 |
+
},
|
131 |
+
"async-each": {
|
132 |
+
"version": "1.0.1",
|
133 |
+
"resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz",
|
134 |
+
"integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=",
|
135 |
+
"dev": true
|
136 |
+
},
|
137 |
+
"babel-code-frame": {
|
138 |
+
"version": "6.26.0",
|
139 |
+
"resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz",
|
140 |
+
"integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=",
|
141 |
+
"dev": true,
|
142 |
+
"requires": {
|
143 |
+
"chalk": "1.1.3",
|
144 |
+
"esutils": "2.0.2",
|
145 |
+
"js-tokens": "3.0.2"
|
146 |
+
}
|
147 |
+
},
|
148 |
+
"babel-core": {
|
149 |
+
"version": "6.26.0",
|
150 |
+
"resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.0.tgz",
|
151 |
+
"integrity": "sha1-rzL3izGm/O8RnIew/Y2XU/A6C7g=",
|
152 |
+
"dev": true,
|
153 |
+
"requires": {
|
154 |
+
"babel-code-frame": "6.26.0",
|
155 |
+
"babel-generator": "6.26.0",
|
156 |
+
"babel-helpers": "6.24.1",
|
157 |
+
"babel-messages": "6.23.0",
|
158 |
+
"babel-register": "6.26.0",
|
159 |
+
"babel-runtime": "6.26.0",
|
160 |
+
"babel-template": "6.26.0",
|
161 |
+
"babel-traverse": "6.26.0",
|
162 |
+
"babel-types": "6.26.0",
|
163 |
+
"babylon": "6.18.0",
|
164 |
+
"convert-source-map": "1.5.1",
|
165 |
+
"debug": "2.6.9",
|
166 |
+
"json5": "0.5.1",
|
167 |
+
"lodash": "4.17.4",
|
168 |
+
"minimatch": "3.0.4",
|
169 |
+
"path-is-absolute": "1.0.1",
|
170 |
+
"private": "0.1.8",
|
171 |
+
"slash": "1.0.0",
|
172 |
+
"source-map": "0.5.7"
|
173 |
+
}
|
174 |
+
},
|
175 |
+
"babel-generator": {
|
176 |
+
"version": "6.26.0",
|
177 |
+
"resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.0.tgz",
|
178 |
+
"integrity": "sha1-rBriAHC3n248odMmlhMFN3TyDcU=",
|
179 |
+
"dev": true,
|
180 |
+
"requires": {
|
181 |
+
"babel-messages": "6.23.0",
|
182 |
+
"babel-runtime": "6.26.0",
|
183 |
+
"babel-types": "6.26.0",
|
184 |
+
"detect-indent": "4.0.0",
|
185 |
+
"jsesc": "1.3.0",
|
186 |
+
"lodash": "4.17.4",
|
187 |
+
"source-map": "0.5.7",
|
188 |
+
"trim-right": "1.0.1"
|
189 |
+
}
|
190 |
+
},
|
191 |
+
"babel-helper-builder-binary-assignment-operator-visitor": {
|
192 |
+
"version": "6.24.1",
|
193 |
+
"resolved": "https://registry.npmjs.org/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz",
|
194 |
+
"integrity": "sha1-zORReto1b0IgvK6KAsKzRvmlZmQ=",
|
195 |
+
"dev": true,
|
196 |
+
"requires": {
|
197 |
+
"babel-helper-explode-assignable-expression": "6.24.1",
|
198 |
+
"babel-runtime": "6.26.0",
|
199 |
+
"babel-types": "6.26.0"
|
200 |
+
}
|
201 |
+
},
|
202 |
+
"babel-helper-builder-react-jsx": {
|
203 |
+
"version": "6.26.0",
|
204 |
+
"resolved": "https://registry.npmjs.org/babel-helper-builder-react-jsx/-/babel-helper-builder-react-jsx-6.26.0.tgz",
|
205 |
+
"integrity": "sha1-Of+DE7dci2Xc7/HzHTg+D/KkCKA=",
|
206 |
+
"dev": true,
|
207 |
+
"requires": {
|
208 |
+
"babel-runtime": "6.26.0",
|
209 |
+
"babel-types": "6.26.0",
|
210 |
+
"esutils": "2.0.2"
|
211 |
+
}
|
212 |
+
},
|
213 |
+
"babel-helper-call-delegate": {
|
214 |
+
"version": "6.24.1",
|
215 |
+
"resolved": "https://registry.npmjs.org/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz",
|
216 |
+
"integrity": "sha1-7Oaqzdx25Bw0YfiL/Fdb0Nqi340=",
|
217 |
+
"dev": true,
|
218 |
+
"requires": {
|
219 |
+
"babel-helper-hoist-variables": "6.24.1",
|
220 |
+
"babel-runtime": "6.26.0",
|
221 |
+
"babel-traverse": "6.26.0",
|
222 |
+
"babel-types": "6.26.0"
|
223 |
+
}
|
224 |
+
},
|
225 |
+
"babel-helper-define-map": {
|
226 |
+
"version": "6.26.0",
|
227 |
+
"resolved": "https://registry.npmjs.org/babel-helper-define-map/-/babel-helper-define-map-6.26.0.tgz",
|
228 |
+
"integrity": "sha1-pfVtq0GiX5fstJjH66ypgZ+Vvl8=",
|
229 |
+
"dev": true,
|
230 |
+
"requires": {
|
231 |
+
"babel-helper-function-name": "6.24.1",
|
232 |
+
"babel-runtime": "6.26.0",
|
233 |
+
"babel-types": "6.26.0",
|
234 |
+
"lodash": "4.17.4"
|
235 |
+
}
|
236 |
+
},
|
237 |
+
"babel-helper-explode-assignable-expression": {
|
238 |
+
"version": "6.24.1",
|
239 |
+
"resolved": "https://registry.npmjs.org/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.24.1.tgz",
|
240 |
+
"integrity": "sha1-8luCz33BBDPFX3BZLVdGQArCLKo=",
|
241 |
+
"dev": true,
|
242 |
+
"requires": {
|
243 |
+
"babel-runtime": "6.26.0",
|
244 |
+
"babel-traverse": "6.26.0",
|
245 |
+
"babel-types": "6.26.0"
|
246 |
+
}
|
247 |
+
},
|
248 |
+
"babel-helper-function-name": {
|
249 |
+
"version": "6.24.1",
|
250 |
+
"resolved": "https://registry.npmjs.org/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz",
|
251 |
+
"integrity": "sha1-00dbjAPtmCQqJbSDUasYOZ01gKk=",
|
252 |
+
"dev": true,
|
253 |
+
"requires": {
|
254 |
+
"babel-helper-get-function-arity": "6.24.1",
|
255 |
+
"babel-runtime": "6.26.0",
|
256 |
+
"babel-template": "6.26.0",
|
257 |
+
"babel-traverse": "6.26.0",
|
258 |
+
"babel-types": "6.26.0"
|
259 |
+
}
|
260 |
+
},
|
261 |
+
"babel-helper-get-function-arity": {
|
262 |
+
"version": "6.24.1",
|
263 |
+
"resolved": "https://registry.npmjs.org/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz",
|
264 |
+
"integrity": "sha1-j3eCqpNAfEHTqlCQj4mwMbG2hT0=",
|
265 |
+
"dev": true,
|
266 |
+
"requires": {
|
267 |
+
"babel-runtime": "6.26.0",
|
268 |
+
"babel-types": "6.26.0"
|
269 |
+
}
|
270 |
+
},
|
271 |
+
"babel-helper-hoist-variables": {
|
272 |
+
"version": "6.24.1",
|
273 |
+
"resolved": "https://registry.npmjs.org/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz",
|
274 |
+
"integrity": "sha1-HssnaJydJVE+rbyZFKc/VAi+enY=",
|
275 |
+
"dev": true,
|
276 |
+
"requires": {
|
277 |
+
"babel-runtime": "6.26.0",
|
278 |
+
"babel-types": "6.26.0"
|
279 |
+
}
|
280 |
+
},
|
281 |
+
"babel-helper-optimise-call-expression": {
|
282 |
+
"version": "6.24.1",
|
283 |
+
"resolved": "https://registry.npmjs.org/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz",
|
284 |
+
"integrity": "sha1-96E0J7qfc/j0+pk8VKl4gtEkQlc=",
|
285 |
+
"dev": true,
|
286 |
+
"requires": {
|
287 |
+
"babel-runtime": "6.26.0",
|
288 |
+
"babel-types": "6.26.0"
|
289 |
+
}
|
290 |
+
},
|
291 |
+
"babel-helper-regex": {
|
292 |
+
"version": "6.26.0",
|
293 |
+
"resolved": "https://registry.npmjs.org/babel-helper-regex/-/babel-helper-regex-6.26.0.tgz",
|
294 |
+
"integrity": "sha1-MlxZ+QL4LyS3T6zu0DY5VPZJXnI=",
|
295 |
+
"dev": true,
|
296 |
+
"requires": {
|
297 |
+
"babel-runtime": "6.26.0",
|
298 |
+
"babel-types": "6.26.0",
|
299 |
+
"lodash": "4.17.4"
|
300 |
+
}
|
301 |
+
},
|
302 |
+
"babel-helper-remap-async-to-generator": {
|
303 |
+
"version": "6.24.1",
|
304 |
+
"resolved": "https://registry.npmjs.org/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.24.1.tgz",
|
305 |
+
"integrity": "sha1-XsWBgnrXI/7N04HxySg5BnbkVRs=",
|
306 |
+
"dev": true,
|
307 |
+
"requires": {
|
308 |
+
"babel-helper-function-name": "6.24.1",
|
309 |
+
"babel-runtime": "6.26.0",
|
310 |
+
"babel-template": "6.26.0",
|
311 |
+
"babel-traverse": "6.26.0",
|
312 |
+
"babel-types": "6.26.0"
|
313 |
+
}
|
314 |
+
},
|
315 |
+
"babel-helper-replace-supers": {
|
316 |
+
"version": "6.24.1",
|
317 |
+
"resolved": "https://registry.npmjs.org/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz",
|
318 |
+
"integrity": "sha1-v22/5Dk40XNpohPKiov3S2qQqxo=",
|
319 |
+
"dev": true,
|
320 |
+
"requires": {
|
321 |
+
"babel-helper-optimise-call-expression": "6.24.1",
|
322 |
+
"babel-messages": "6.23.0",
|
323 |
+
"babel-runtime": "6.26.0",
|
324 |
+
"babel-template": "6.26.0",
|
325 |
+
"babel-traverse": "6.26.0",
|
326 |
+
"babel-types": "6.26.0"
|
327 |
+
}
|
328 |
+
},
|
329 |
+
"babel-helpers": {
|
330 |
+
"version": "6.24.1",
|
331 |
+
"resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz",
|
332 |
+
"integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=",
|
333 |
+
"dev": true,
|
334 |
+
"requires": {
|
335 |
+
"babel-runtime": "6.26.0",
|
336 |
+
"babel-template": "6.26.0"
|
337 |
+
}
|
338 |
+
},
|
339 |
+
"babel-loader": {
|
340 |
+
"version": "7.1.2",
|
341 |
+
"resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-7.1.2.tgz",
|
342 |
+
"integrity": "sha512-jRwlFbINAeyDStqK6Dd5YuY0k5YuzQUvlz2ZamuXrXmxav3pNqe9vfJ402+2G+OmlJSXxCOpB6Uz0INM7RQe2A==",
|
343 |
+
"dev": true,
|
344 |
+
"requires": {
|
345 |
+
"find-cache-dir": "1.0.0",
|
346 |
+
"loader-utils": "1.1.0",
|
347 |
+
"mkdirp": "0.5.1"
|
348 |
+
}
|
349 |
+
},
|
350 |
+
"babel-messages": {
|
351 |
+
"version": "6.23.0",
|
352 |
+
"resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz",
|
353 |
+
"integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=",
|
354 |
+
"dev": true,
|
355 |
+
"requires": {
|
356 |
+
"babel-runtime": "6.26.0"
|
357 |
+
}
|
358 |
+
},
|
359 |
+
"babel-plugin-check-es2015-constants": {
|
360 |
+
"version": "6.22.0",
|
361 |
+
"resolved": "https://registry.npmjs.org/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz",
|
362 |
+
"integrity": "sha1-NRV7EBQm/S/9PaP3XH0ekYNbv4o=",
|
363 |
+
"dev": true,
|
364 |
+
"requires": {
|
365 |
+
"babel-runtime": "6.26.0"
|
366 |
+
}
|
367 |
+
},
|
368 |
+
"babel-plugin-syntax-async-functions": {
|
369 |
+
"version": "6.13.0",
|
370 |
+
"resolved": "https://registry.npmjs.org/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz",
|
371 |
+
"integrity": "sha1-ytnK0RkbWtY0vzCuCHI5HgZHvpU=",
|
372 |
+
"dev": true
|
373 |
+
},
|
374 |
+
"babel-plugin-syntax-exponentiation-operator": {
|
375 |
+
"version": "6.13.0",
|
376 |
+
"resolved": "https://registry.npmjs.org/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz",
|
377 |
+
"integrity": "sha1-nufoM3KQ2pUoggGmpX9BcDF4MN4=",
|
378 |
+
"dev": true
|
379 |
+
},
|
380 |
+
"babel-plugin-syntax-jsx": {
|
381 |
+
"version": "6.18.0",
|
382 |
+
"resolved": "https://registry.npmjs.org/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz",
|
383 |
+
"integrity": "sha1-CvMqmm4Tyno/1QaeYtew9Y0NiUY=",
|
384 |
+
"dev": true
|
385 |
+
},
|
386 |
+
"babel-plugin-syntax-trailing-function-commas": {
|
387 |
+
"version": "6.22.0",
|
388 |
+
"resolved": "https://registry.npmjs.org/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz",
|
389 |
+
"integrity": "sha1-ugNgk3+NBuQBgKQ/4NVhb/9TLPM=",
|
390 |
+
"dev": true
|
391 |
+
},
|
392 |
+
"babel-plugin-transform-async-to-generator": {
|
393 |
+
"version": "6.24.1",
|
394 |
+
"resolved": "https://registry.npmjs.org/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz",
|
395 |
+
"integrity": "sha1-ZTbjeK/2yx1VF6wOQOs+n8jQh2E=",
|
396 |
+
"dev": true,
|
397 |
+
"requires": {
|
398 |
+
"babel-helper-remap-async-to-generator": "6.24.1",
|
399 |
+
"babel-plugin-syntax-async-functions": "6.13.0",
|
400 |
+
"babel-runtime": "6.26.0"
|
401 |
+
}
|
402 |
+
},
|
403 |
+
"babel-plugin-transform-es2015-arrow-functions": {
|
404 |
+
"version": "6.22.0",
|
405 |
+
"resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz",
|
406 |
+
"integrity": "sha1-RSaSy3EdX3ncf4XkQM5BufJE0iE=",
|
407 |
+
"dev": true,
|
408 |
+
"requires": {
|
409 |
+
"babel-runtime": "6.26.0"
|
410 |
+
}
|
411 |
+
},
|
412 |
+
"babel-plugin-transform-es2015-block-scoped-functions": {
|
413 |
+
"version": "6.22.0",
|
414 |
+
"resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz",
|
415 |
+
"integrity": "sha1-u8UbSflk1wy42OC5ToICRs46YUE=",
|
416 |
+
"dev": true,
|
417 |
+
"requires": {
|
418 |
+
"babel-runtime": "6.26.0"
|
419 |
+
}
|
420 |
+
},
|
421 |
+
"babel-plugin-transform-es2015-block-scoping": {
|
422 |
+
"version": "6.26.0",
|
423 |
+
"resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz",
|
424 |
+
"integrity": "sha1-1w9SmcEwjQXBL0Y4E7CgnnOxiV8=",
|
425 |
+
"dev": true,
|
426 |
+
"requires": {
|
427 |
+
"babel-runtime": "6.26.0",
|
428 |
+
"babel-template": "6.26.0",
|
429 |
+
"babel-traverse": "6.26.0",
|
430 |
+
"babel-types": "6.26.0",
|
431 |
+
"lodash": "4.17.4"
|
432 |
+
}
|
433 |
+
},
|
434 |
+
"babel-plugin-transform-es2015-classes": {
|
435 |
+
"version": "6.24.1",
|
436 |
+
"resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz",
|
437 |
+
"integrity": "sha1-WkxYpQyclGHlZLSyo7+ryXolhNs=",
|
438 |
+
"dev": true,
|
439 |
+
"requires": {
|
440 |
+
"babel-helper-define-map": "6.26.0",
|
441 |
+
"babel-helper-function-name": "6.24.1",
|
442 |
+
"babel-helper-optimise-call-expression": "6.24.1",
|
443 |
+
"babel-helper-replace-supers": "6.24.1",
|
444 |
+
"babel-messages": "6.23.0",
|
445 |
+
"babel-runtime": "6.26.0",
|
446 |
+
"babel-template": "6.26.0",
|
447 |
+
"babel-traverse": "6.26.0",
|
448 |
+
"babel-types": "6.26.0"
|
449 |
+
}
|
450 |
+
},
|
451 |
+
"babel-plugin-transform-es2015-computed-properties": {
|
452 |
+
"version": "6.24.1",
|
453 |
+
"resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz",
|
454 |
+
"integrity": "sha1-b+Ko0WiV1WNPTNmZttNICjCBWbM=",
|
455 |
+
"dev": true,
|
456 |
+
"requires": {
|
457 |
+
"babel-runtime": "6.26.0",
|
458 |
+
"babel-template": "6.26.0"
|
459 |
+
}
|
460 |
+
},
|
461 |
+
"babel-plugin-transform-es2015-destructuring": {
|
462 |
+
"version": "6.23.0",
|
463 |
+
"resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz",
|
464 |
+
"integrity": "sha1-mXux8auWf2gtKwh2/jWNYOdlxW0=",
|
465 |
+
"dev": true,
|
466 |
+
"requires": {
|
467 |
+
"babel-runtime": "6.26.0"
|
468 |
+
}
|
469 |
+
},
|
470 |
+
"babel-plugin-transform-es2015-duplicate-keys": {
|
471 |
+
"version": "6.24.1",
|
472 |
+
"resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz",
|
473 |
+
"integrity": "sha1-c+s9MQypaePvnskcU3QabxV2Qj4=",
|
474 |
+
"dev": true,
|
475 |
+
"requires": {
|
476 |
+
"babel-runtime": "6.26.0",
|
477 |
+
"babel-types": "6.26.0"
|
478 |
+
}
|
479 |
+
},
|
480 |
+
"babel-plugin-transform-es2015-for-of": {
|
481 |
+
"version": "6.23.0",
|
482 |
+
"resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz",
|
483 |
+
"integrity": "sha1-9HyVsrYT3x0+zC/bdXNiPHUkhpE=",
|
484 |
+
"dev": true,
|
485 |
+
"requires": {
|
486 |
+
"babel-runtime": "6.26.0"
|
487 |
+
}
|
488 |
+
},
|
489 |
+
"babel-plugin-transform-es2015-function-name": {
|
490 |
+
"version": "6.24.1",
|
491 |
+
"resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz",
|
492 |
+
"integrity": "sha1-g0yJhTvDaxrw86TF26qU/Y6sqos=",
|
493 |
+
"dev": true,
|
494 |
+
"requires": {
|
495 |
+
"babel-helper-function-name": "6.24.1",
|
496 |
+
"babel-runtime": "6.26.0",
|
497 |
+
"babel-types": "6.26.0"
|
498 |
+
}
|
499 |
+
},
|
500 |
+
"babel-plugin-transform-es2015-literals": {
|
501 |
+
"version": "6.22.0",
|
502 |
+
"resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz",
|
503 |
+
"integrity": "sha1-T1SgLWzWbPkVKAAZox0xklN3yi4=",
|
504 |
+
"dev": true,
|
505 |
+
"requires": {
|
506 |
+
"babel-runtime": "6.26.0"
|
507 |
+
}
|
508 |
+
},
|
509 |
+
"babel-plugin-transform-es2015-modules-amd": {
|
510 |
+
"version": "6.24.1",
|
511 |
+
"resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz",
|
512 |
+
"integrity": "sha1-Oz5UAXI5hC1tGcMBHEvS8AoA0VQ=",
|
513 |
+
"dev": true,
|
514 |
+
"requires": {
|
515 |
+
"babel-plugin-transform-es2015-modules-commonjs": "6.26.0",
|
516 |
+
"babel-runtime": "6.26.0",
|
517 |
+
"babel-template": "6.26.0"
|
518 |
+
}
|
519 |
+
},
|
520 |
+
"babel-plugin-transform-es2015-modules-commonjs": {
|
521 |
+
"version": "6.26.0",
|
522 |
+
"resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.0.tgz",
|
523 |
+
"integrity": "sha1-DYOUApt9xqvhqX7xgeAHWN0uXYo=",
|
524 |
+
"dev": true,
|
525 |
+
"requires": {
|
526 |
+
"babel-plugin-transform-strict-mode": "6.24.1",
|
527 |
+
"babel-runtime": "6.26.0",
|
528 |
+
"babel-template": "6.26.0",
|
529 |
+
"babel-types": "6.26.0"
|
530 |
+
}
|
531 |
+
},
|
532 |
+
"babel-plugin-transform-es2015-modules-systemjs": {
|
533 |
+
"version": "6.24.1",
|
534 |
+
"resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz",
|
535 |
+
"integrity": "sha1-/4mhQrkRmpBhlfXxBuzzBdlAfSM=",
|
536 |
+
"dev": true,
|
537 |
+
"requires": {
|
538 |
+
"babel-helper-hoist-variables": "6.24.1",
|
539 |
+
"babel-runtime": "6.26.0",
|
540 |
+
"babel-template": "6.26.0"
|
541 |
+
}
|
542 |
+
},
|
543 |
+
"babel-plugin-transform-es2015-modules-umd": {
|
544 |
+
"version": "6.24.1",
|
545 |
+
"resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz",
|
546 |
+
"integrity": "sha1-rJl+YoXNGO1hdq22B9YCNErThGg=",
|
547 |
+
"dev": true,
|
548 |
+
"requires": {
|
549 |
+
"babel-plugin-transform-es2015-modules-amd": "6.24.1",
|
550 |
+
"babel-runtime": "6.26.0",
|
551 |
+
"babel-template": "6.26.0"
|
552 |
+
}
|
553 |
+
},
|
554 |
+
"babel-plugin-transform-es2015-object-super": {
|
555 |
+
"version": "6.24.1",
|
556 |
+
"resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz",
|
557 |
+
"integrity": "sha1-JM72muIcuDp/hgPa0CH1cusnj40=",
|
558 |
+
"dev": true,
|
559 |
+
"requires": {
|
560 |
+
"babel-helper-replace-supers": "6.24.1",
|
561 |
+
"babel-runtime": "6.26.0"
|
562 |
+
}
|
563 |
+
},
|
564 |
+
"babel-plugin-transform-es2015-parameters": {
|
565 |
+
"version": "6.24.1",
|
566 |
+
"resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz",
|
567 |
+
"integrity": "sha1-V6w1GrScrxSpfNE7CfZv3wpiXys=",
|
568 |
+
"dev": true,
|
569 |
+
"requires": {
|
570 |
+
"babel-helper-call-delegate": "6.24.1",
|
571 |
+
"babel-helper-get-function-arity": "6.24.1",
|
572 |
+
"babel-runtime": "6.26.0",
|
573 |
+
"babel-template": "6.26.0",
|
574 |
+
"babel-traverse": "6.26.0",
|
575 |
+
"babel-types": "6.26.0"
|
576 |
+
}
|
577 |
+
},
|
578 |
+
"babel-plugin-transform-es2015-shorthand-properties": {
|
579 |
+
"version": "6.24.1",
|
580 |
+
"resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz",
|
581 |
+
"integrity": "sha1-JPh11nIch2YbvZmkYi5R8U3jiqA=",
|
582 |
+
"dev": true,
|
583 |
+
"requires": {
|
584 |
+
"babel-runtime": "6.26.0",
|
585 |
+
"babel-types": "6.26.0"
|
586 |
+
}
|
587 |
+
},
|
588 |
+
"babel-plugin-transform-es2015-spread": {
|
589 |
+
"version": "6.22.0",
|
590 |
+
"resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz",
|
591 |
+
"integrity": "sha1-1taKmfia7cRTbIGlQujdnxdG+NE=",
|
592 |
+
"dev": true,
|
593 |
+
"requires": {
|
594 |
+
"babel-runtime": "6.26.0"
|
595 |
+
}
|
596 |
+
},
|
597 |
+
"babel-plugin-transform-es2015-sticky-regex": {
|
598 |
+
"version": "6.24.1",
|
599 |
+
"resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz",
|
600 |
+
"integrity": "sha1-AMHNsaynERLN8M9hJsLta0V8zbw=",
|
601 |
+
"dev": true,
|
602 |
+
"requires": {
|
603 |
+
"babel-helper-regex": "6.26.0",
|
604 |
+
"babel-runtime": "6.26.0",
|
605 |
+
"babel-types": "6.26.0"
|
606 |
+
}
|
607 |
+
},
|
608 |
+
"babel-plugin-transform-es2015-template-literals": {
|
609 |
+
"version": "6.22.0",
|
610 |
+
"resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz",
|
611 |
+
"integrity": "sha1-qEs0UPfp+PH2g51taH2oS7EjbY0=",
|
612 |
+
"dev": true,
|
613 |
+
"requires": {
|
614 |
+
"babel-runtime": "6.26.0"
|
615 |
+
}
|
616 |
+
},
|
617 |
+
"babel-plugin-transform-es2015-typeof-symbol": {
|
618 |
+
"version": "6.23.0",
|
619 |
+
"resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz",
|
620 |
+
"integrity": "sha1-3sCfHN3/lLUqxz1QXITfWdzOs3I=",
|
621 |
+
"dev": true,
|
622 |
+
"requires": {
|
623 |
+
"babel-runtime": "6.26.0"
|
624 |
+
}
|
625 |
+
},
|
626 |
+
"babel-plugin-transform-es2015-unicode-regex": {
|
627 |
+
"version": "6.24.1",
|
628 |
+
"resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz",
|
629 |
+
"integrity": "sha1-04sS9C6nMj9yk4fxinxa4frrNek=",
|
630 |
+
"dev": true,
|
631 |
+
"requires": {
|
632 |
+
"babel-helper-regex": "6.26.0",
|
633 |
+
"babel-runtime": "6.26.0",
|
634 |
+
"regexpu-core": "2.0.0"
|
635 |
+
}
|
636 |
+
},
|
637 |
+
"babel-plugin-transform-exponentiation-operator": {
|
638 |
+
"version": "6.24.1",
|
639 |
+
"resolved": "https://registry.npmjs.org/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz",
|
640 |
+
"integrity": "sha1-KrDJx/MJj6SJB3cruBP+QejeOg4=",
|
641 |
+
"dev": true,
|
642 |
+
"requires": {
|
643 |
+
"babel-helper-builder-binary-assignment-operator-visitor": "6.24.1",
|
644 |
+
"babel-plugin-syntax-exponentiation-operator": "6.13.0",
|
645 |
+
"babel-runtime": "6.26.0"
|
646 |
+
}
|
647 |
+
},
|
648 |
+
"babel-plugin-transform-react-jsx": {
|
649 |
+
"version": "6.24.1",
|
650 |
+
"resolved": "https://registry.npmjs.org/babel-plugin-transform-react-jsx/-/babel-plugin-transform-react-jsx-6.24.1.tgz",
|
651 |
+
"integrity": "sha1-hAoCjn30YN/DotKfDA2R9jduZqM=",
|
652 |
+
"dev": true,
|
653 |
+
"requires": {
|
654 |
+
"babel-helper-builder-react-jsx": "6.26.0",
|
655 |
+
"babel-plugin-syntax-jsx": "6.18.0",
|
656 |
+
"babel-runtime": "6.26.0"
|
657 |
+
}
|
658 |
+
},
|
659 |
+
"babel-plugin-transform-regenerator": {
|
660 |
+
"version": "6.26.0",
|
661 |
+
"resolved": "https://registry.npmjs.org/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz",
|
662 |
+
"integrity": "sha1-4HA2lvveJ/Cj78rPi03KL3s6jy8=",
|
663 |
+
"dev": true,
|
664 |
+
"requires": {
|
665 |
+
"regenerator-transform": "0.10.1"
|
666 |
+
}
|
667 |
+
},
|
668 |
+
"babel-plugin-transform-strict-mode": {
|
669 |
+
"version": "6.24.1",
|
670 |
+
"resolved": "https://registry.npmjs.org/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz",
|
671 |
+
"integrity": "sha1-1fr3qleKZbvlkc9e2uBKDGcCB1g=",
|
672 |
+
"dev": true,
|
673 |
+
"requires": {
|
674 |
+
"babel-runtime": "6.26.0",
|
675 |
+
"babel-types": "6.26.0"
|
676 |
+
}
|
677 |
+
},
|
678 |
+
"babel-preset-env": {
|
679 |
+
"version": "1.6.1",
|
680 |
+
"resolved": "https://registry.npmjs.org/babel-preset-env/-/babel-preset-env-1.6.1.tgz",
|
681 |
+
"integrity": "sha512-W6VIyA6Ch9ePMI7VptNn2wBM6dbG0eSz25HEiL40nQXCsXGTGZSTZu1Iap+cj3Q0S5a7T9+529l/5Bkvd+afNA==",
|
682 |
+
"dev": true,
|
683 |
+
"requires": {
|
684 |
+
"babel-plugin-check-es2015-constants": "6.22.0",
|
685 |
+
"babel-plugin-syntax-trailing-function-commas": "6.22.0",
|
686 |
+
"babel-plugin-transform-async-to-generator": "6.24.1",
|
687 |
+
"babel-plugin-transform-es2015-arrow-functions": "6.22.0",
|
688 |
+
"babel-plugin-transform-es2015-block-scoped-functions": "6.22.0",
|
689 |
+
"babel-plugin-transform-es2015-block-scoping": "6.26.0",
|
690 |
+
"babel-plugin-transform-es2015-classes": "6.24.1",
|
691 |
+
"babel-plugin-transform-es2015-computed-properties": "6.24.1",
|
692 |
+
"babel-plugin-transform-es2015-destructuring": "6.23.0",
|
693 |
+
"babel-plugin-transform-es2015-duplicate-keys": "6.24.1",
|
694 |
+
"babel-plugin-transform-es2015-for-of": "6.23.0",
|
695 |
+
"babel-plugin-transform-es2015-function-name": "6.24.1",
|
696 |
+
"babel-plugin-transform-es2015-literals": "6.22.0",
|
697 |
+
"babel-plugin-transform-es2015-modules-amd": "6.24.1",
|
698 |
+
"babel-plugin-transform-es2015-modules-commonjs": "6.26.0",
|
699 |
+
"babel-plugin-transform-es2015-modules-systemjs": "6.24.1",
|
700 |
+
"babel-plugin-transform-es2015-modules-umd": "6.24.1",
|
701 |
+
"babel-plugin-transform-es2015-object-super": "6.24.1",
|
702 |
+
"babel-plugin-transform-es2015-parameters": "6.24.1",
|
703 |
+
"babel-plugin-transform-es2015-shorthand-properties": "6.24.1",
|
704 |
+
"babel-plugin-transform-es2015-spread": "6.22.0",
|
705 |
+
"babel-plugin-transform-es2015-sticky-regex": "6.24.1",
|
706 |
+
"babel-plugin-transform-es2015-template-literals": "6.22.0",
|
707 |
+
"babel-plugin-transform-es2015-typeof-symbol": "6.23.0",
|
708 |
+
"babel-plugin-transform-es2015-unicode-regex": "6.24.1",
|
709 |
+
"babel-plugin-transform-exponentiation-operator": "6.24.1",
|
710 |
+
"babel-plugin-transform-regenerator": "6.26.0",
|
711 |
+
"browserslist": "2.10.0",
|
712 |
+
"invariant": "2.2.2",
|
713 |
+
"semver": "5.4.1"
|
714 |
+
}
|
715 |
+
},
|
716 |
+
"babel-register": {
|
717 |
+
"version": "6.26.0",
|
718 |
+
"resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.26.0.tgz",
|
719 |
+
"integrity": "sha1-btAhFz4vy0htestFxgCahW9kcHE=",
|
720 |
+
"dev": true,
|
721 |
+
"requires": {
|
722 |
+
"babel-core": "6.26.0",
|
723 |
+
"babel-runtime": "6.26.0",
|
724 |
+
"core-js": "2.5.3",
|
725 |
+
"home-or-tmp": "2.0.0",
|
726 |
+
"lodash": "4.17.4",
|
727 |
+
"mkdirp": "0.5.1",
|
728 |
+
"source-map-support": "0.4.18"
|
729 |
+
}
|
730 |
+
},
|
731 |
+
"babel-runtime": {
|
732 |
+
"version": "6.26.0",
|
733 |
+
"resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz",
|
734 |
+
"integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=",
|
735 |
+
"dev": true,
|
736 |
+
"requires": {
|
737 |
+
"core-js": "2.5.3",
|
738 |
+
"regenerator-runtime": "0.11.1"
|
739 |
+
}
|
740 |
+
},
|
741 |
+
"babel-template": {
|
742 |
+
"version": "6.26.0",
|
743 |
+
"resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz",
|
744 |
+
"integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=",
|
745 |
+
"dev": true,
|
746 |
+
"requires": {
|
747 |
+
"babel-runtime": "6.26.0",
|
748 |
+
"babel-traverse": "6.26.0",
|
749 |
+
"babel-types": "6.26.0",
|
750 |
+
"babylon": "6.18.0",
|
751 |
+
"lodash": "4.17.4"
|
752 |
+
}
|
753 |
+
},
|
754 |
+
"babel-traverse": {
|
755 |
+
"version": "6.26.0",
|
756 |
+
"resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz",
|
757 |
+
"integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=",
|
758 |
+
"dev": true,
|
759 |
+
"requires": {
|
760 |
+
"babel-code-frame": "6.26.0",
|
761 |
+
"babel-messages": "6.23.0",
|
762 |
+
"babel-runtime": "6.26.0",
|
763 |
+
"babel-types": "6.26.0",
|
764 |
+
"babylon": "6.18.0",
|
765 |
+
"debug": "2.6.9",
|
766 |
+
"globals": "9.18.0",
|
767 |
+
"invariant": "2.2.2",
|
768 |
+
"lodash": "4.17.4"
|
769 |
+
}
|
770 |
+
},
|
771 |
+
"babel-types": {
|
772 |
+
"version": "6.26.0",
|
773 |
+
"resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz",
|
774 |
+
"integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=",
|
775 |
+
"dev": true,
|
776 |
+
"requires": {
|
777 |
+
"babel-runtime": "6.26.0",
|
778 |
+
"esutils": "2.0.2",
|
779 |
+
"lodash": "4.17.4",
|
780 |
+
"to-fast-properties": "1.0.3"
|
781 |
+
}
|
782 |
+
},
|
783 |
+
"babylon": {
|
784 |
+
"version": "6.18.0",
|
785 |
+
"resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz",
|
786 |
+
"integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==",
|
787 |
+
"dev": true
|
788 |
+
},
|
789 |
+
"balanced-match": {
|
790 |
+
"version": "1.0.0",
|
791 |
+
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
|
792 |
+
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
|
793 |
+
"dev": true
|
794 |
+
},
|
795 |
+
"base64-js": {
|
796 |
+
"version": "1.2.1",
|
797 |
+
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.2.1.tgz",
|
798 |
+
"integrity": "sha512-dwVUVIXsBZXwTuwnXI9RK8sBmgq09NDHzyR9SAph9eqk76gKK2JSQmZARC2zRC81JC2QTtxD0ARU5qTS25gIGw==",
|
799 |
+
"dev": true
|
800 |
+
},
|
801 |
+
"big.js": {
|
802 |
+
"version": "3.2.0",
|
803 |
+
"resolved": "https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz",
|
804 |
+
"integrity": "sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q==",
|
805 |
+
"dev": true
|
806 |
+
},
|
807 |
+
"binary-extensions": {
|
808 |
+
"version": "1.11.0",
|
809 |
+
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.11.0.tgz",
|
810 |
+
"integrity": "sha1-RqoXUftqL5PuXmibsQh9SxTGwgU=",
|
811 |
+
"dev": true
|
812 |
+
},
|
813 |
+
"bn.js": {
|
814 |
+
"version": "4.11.8",
|
815 |
+
"resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz",
|
816 |
+
"integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==",
|
817 |
+
"dev": true
|
818 |
+
},
|
819 |
+
"brace-expansion": {
|
820 |
+
"version": "1.1.8",
|
821 |
+
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz",
|
822 |
+
"integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=",
|
823 |
+
"dev": true,
|
824 |
+
"requires": {
|
825 |
+
"balanced-match": "1.0.0",
|
826 |
+
"concat-map": "0.0.1"
|
827 |
+
}
|
828 |
+
},
|
829 |
+
"braces": {
|
830 |
+
"version": "1.8.5",
|
831 |
+
"resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz",
|
832 |
+
"integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=",
|
833 |
+
"dev": true,
|
834 |
+
"requires": {
|
835 |
+
"expand-range": "1.8.2",
|
836 |
+
"preserve": "0.2.0",
|
837 |
+
"repeat-element": "1.1.2"
|
838 |
+
}
|
839 |
+
},
|
840 |
+
"brorand": {
|
841 |
+
"version": "1.1.0",
|
842 |
+
"resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz",
|
843 |
+
"integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=",
|
844 |
+
"dev": true
|
845 |
+
},
|
846 |
+
"browserify-aes": {
|
847 |
+
"version": "1.1.1",
|
848 |
+
"resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.1.1.tgz",
|
849 |
+
"integrity": "sha512-UGnTYAnB2a3YuYKIRy1/4FB2HdM866E0qC46JXvVTYKlBlZlnvfpSfY6OKfXZAkv70eJ2a1SqzpAo5CRhZGDFg==",
|
850 |
+
"dev": true,
|
851 |
+
"requires": {
|
852 |
+
"buffer-xor": "1.0.3",
|
853 |
+
"cipher-base": "1.0.4",
|
854 |
+
"create-hash": "1.1.3",
|
855 |
+
"evp_bytestokey": "1.0.3",
|
856 |
+
"inherits": "2.0.3",
|
857 |
+
"safe-buffer": "5.1.1"
|
858 |
+
}
|
859 |
+
},
|
860 |
+
"browserify-cipher": {
|
861 |
+
"version": "1.0.0",
|
862 |
+
"resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.0.tgz",
|
863 |
+
"integrity": "sha1-mYgkSHS/XtTijalWZtzWasj8Njo=",
|
864 |
+
"dev": true,
|
865 |
+
"requires": {
|
866 |
+
"browserify-aes": "1.1.1",
|
867 |
+
"browserify-des": "1.0.0",
|
868 |
+
"evp_bytestokey": "1.0.3"
|
869 |
+
}
|
870 |
+
},
|
871 |
+
"browserify-des": {
|
872 |
+
"version": "1.0.0",
|
873 |
+
"resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.0.tgz",
|
874 |
+
"integrity": "sha1-2qJ3cXRwki7S/hhZQRihdUOXId0=",
|
875 |
+
"dev": true,
|
876 |
+
"requires": {
|
877 |
+
"cipher-base": "1.0.4",
|
878 |
+
"des.js": "1.0.0",
|
879 |
+
"inherits": "2.0.3"
|
880 |
+
}
|
881 |
+
},
|
882 |
+
"browserify-rsa": {
|
883 |
+
"version": "4.0.1",
|
884 |
+
"resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz",
|
885 |
+
"integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=",
|
886 |
+
"dev": true,
|
887 |
+
"requires": {
|
888 |
+
"bn.js": "4.11.8",
|
889 |
+
"randombytes": "2.0.5"
|
890 |
+
}
|
891 |
+
},
|
892 |
+
"browserify-sign": {
|
893 |
+
"version": "4.0.4",
|
894 |
+
"resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz",
|
895 |
+
"integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=",
|
896 |
+
"dev": true,
|
897 |
+
"requires": {
|
898 |
+
"bn.js": "4.11.8",
|
899 |
+
"browserify-rsa": "4.0.1",
|
900 |
+
"create-hash": "1.1.3",
|
901 |
+
"create-hmac": "1.1.6",
|
902 |
+
"elliptic": "6.4.0",
|
903 |
+
"inherits": "2.0.3",
|
904 |
+
"parse-asn1": "5.1.0"
|
905 |
+
}
|
906 |
+
},
|
907 |
+
"browserify-zlib": {
|
908 |
+
"version": "0.2.0",
|
909 |
+
"resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz",
|
910 |
+
"integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==",
|
911 |
+
"dev": true,
|
912 |
+
"requires": {
|
913 |
+
"pako": "1.0.6"
|
914 |
+
}
|
915 |
+
},
|
916 |
+
"browserslist": {
|
917 |
+
"version": "2.10.0",
|
918 |
+
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-2.10.0.tgz",
|
919 |
+
"integrity": "sha512-WyvzSLsuAVPOjbljXnyeWl14Ae+ukAT8MUuagKVzIDvwBxl4UAwD1xqtyQs2eWYPGUKMeC3Ol62goqYuKqTTcw==",
|
920 |
+
"dev": true,
|
921 |
+
"requires": {
|
922 |
+
"caniuse-lite": "1.0.30000783",
|
923 |
+
"electron-to-chromium": "1.3.28"
|
924 |
+
}
|
925 |
+
},
|
926 |
+
"buffer": {
|
927 |
+
"version": "4.9.1",
|
928 |
+
"resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz",
|
929 |
+
"integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=",
|
930 |
+
"dev": true,
|
931 |
+
"requires": {
|
932 |
+
"base64-js": "1.2.1",
|
933 |
+
"ieee754": "1.1.8",
|
934 |
+
"isarray": "1.0.0"
|
935 |
+
}
|
936 |
+
},
|
937 |
+
"buffer-xor": {
|
938 |
+
"version": "1.0.3",
|
939 |
+
"resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz",
|
940 |
+
"integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=",
|
941 |
+
"dev": true
|
942 |
+
},
|
943 |
+
"builtin-modules": {
|
944 |
+
"version": "1.1.1",
|
945 |
+
"resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz",
|
946 |
+
"integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=",
|
947 |
+
"dev": true
|
948 |
+
},
|
949 |
+
"builtin-status-codes": {
|
950 |
+
"version": "3.0.0",
|
951 |
+
"resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz",
|
952 |
+
"integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=",
|
953 |
+
"dev": true
|
954 |
+
},
|
955 |
+
"camelcase": {
|
956 |
+
"version": "1.2.1",
|
957 |
+
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz",
|
958 |
+
"integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=",
|
959 |
+
"dev": true
|
960 |
+
},
|
961 |
+
"caniuse-lite": {
|
962 |
+
"version": "1.0.30000783",
|
963 |
+
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000783.tgz",
|
964 |
+
"integrity": "sha1-m1SZ+xtQPSNF0SqmuGEoUvQnb/0=",
|
965 |
+
"dev": true
|
966 |
+
},
|
967 |
+
"center-align": {
|
968 |
+
"version": "0.1.3",
|
969 |
+
"resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz",
|
970 |
+
"integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=",
|
971 |
+
"dev": true,
|
972 |
+
"requires": {
|
973 |
+
"align-text": "0.1.4",
|
974 |
+
"lazy-cache": "1.0.4"
|
975 |
+
}
|
976 |
+
},
|
977 |
+
"chalk": {
|
978 |
+
"version": "1.1.3",
|
979 |
+
"resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
|
980 |
+
"integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
|
981 |
+
"dev": true,
|
982 |
+
"requires": {
|
983 |
+
"ansi-styles": "2.2.1",
|
984 |
+
"escape-string-regexp": "1.0.5",
|
985 |
+
"has-ansi": "2.0.0",
|
986 |
+
"strip-ansi": "3.0.1",
|
987 |
+
"supports-color": "2.0.0"
|
988 |
+
}
|
989 |
+
},
|
990 |
+
"chokidar": {
|
991 |
+
"version": "1.7.0",
|
992 |
+
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz",
|
993 |
+
"integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=",
|
994 |
+
"dev": true,
|
995 |
+
"requires": {
|
996 |
+
"anymatch": "1.3.2",
|
997 |
+
"async-each": "1.0.1",
|
998 |
+
"fsevents": "1.1.3",
|
999 |
+
"glob-parent": "2.0.0",
|
1000 |
+
"inherits": "2.0.3",
|
1001 |
+
"is-binary-path": "1.0.1",
|
1002 |
+
"is-glob": "2.0.1",
|
1003 |
+
"path-is-absolute": "1.0.1",
|
1004 |
+
"readdirp": "2.1.0"
|
1005 |
+
}
|
1006 |
+
},
|
1007 |
+
"cipher-base": {
|
1008 |
+
"version": "1.0.4",
|
1009 |
+
"resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz",
|
1010 |
+
"integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==",
|
1011 |
+
"dev": true,
|
1012 |
+
"requires": {
|
1013 |
+
"inherits": "2.0.3",
|
1014 |
+
"safe-buffer": "5.1.1"
|
1015 |
+
}
|
1016 |
+
},
|
1017 |
+
"cliui": {
|
1018 |
+
"version": "2.1.0",
|
1019 |
+
"resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz",
|
1020 |
+
"integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=",
|
1021 |
+
"dev": true,
|
1022 |
+
"requires": {
|
1023 |
+
"center-align": "0.1.3",
|
1024 |
+
"right-align": "0.1.3",
|
1025 |
+
"wordwrap": "0.0.2"
|
1026 |
+
}
|
1027 |
+
},
|
1028 |
+
"co": {
|
1029 |
+
"version": "4.6.0",
|
1030 |
+
"resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz",
|
1031 |
+
"integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=",
|
1032 |
+
"dev": true
|
1033 |
+
},
|
1034 |
+
"code-point-at": {
|
1035 |
+
"version": "1.1.0",
|
1036 |
+
"resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
|
1037 |
+
"integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=",
|
1038 |
+
"dev": true
|
1039 |
+
},
|
1040 |
+
"commondir": {
|
1041 |
+
"version": "1.0.1",
|
1042 |
+
"resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz",
|
1043 |
+
"integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=",
|
1044 |
+
"dev": true
|
1045 |
+
},
|
1046 |
+
"concat-map": {
|
1047 |
+
"version": "0.0.1",
|
1048 |
+
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
1049 |
+
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
|
1050 |
+
"dev": true
|
1051 |
+
},
|
1052 |
+
"console-browserify": {
|
1053 |
+
"version": "1.1.0",
|
1054 |
+
"resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz",
|
1055 |
+
"integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=",
|
1056 |
+
"dev": true,
|
1057 |
+
"requires": {
|
1058 |
+
"date-now": "0.1.4"
|
1059 |
+
}
|
1060 |
+
},
|
1061 |
+
"constants-browserify": {
|
1062 |
+
"version": "1.0.0",
|
1063 |
+
"resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz",
|
1064 |
+
"integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=",
|
1065 |
+
"dev": true
|
1066 |
+
},
|
1067 |
+
"convert-source-map": {
|
1068 |
+
"version": "1.5.1",
|
1069 |
+
"resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.1.tgz",
|
1070 |
+
"integrity": "sha1-uCeAl7m8IpNl3lxiz1/K7YtVmeU=",
|
1071 |
+
"dev": true
|
1072 |
+
},
|
1073 |
+
"core-js": {
|
1074 |
+
"version": "2.5.3",
|
1075 |
+
"resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.3.tgz",
|
1076 |
+
"integrity": "sha1-isw4NFgk8W2DZbfJtCWRaOjtYD4=",
|
1077 |
+
"dev": true
|
1078 |
+
},
|
1079 |
+
"core-util-is": {
|
1080 |
+
"version": "1.0.2",
|
1081 |
+
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
|
1082 |
+
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
|
1083 |
+
"dev": true
|
1084 |
+
},
|
1085 |
+
"create-ecdh": {
|
1086 |
+
"version": "4.0.0",
|
1087 |
+
"resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.0.tgz",
|
1088 |
+
"integrity": "sha1-iIxyNZbN92EvZJgjPuvXo1MBc30=",
|
1089 |
+
"dev": true,
|
1090 |
+
"requires": {
|
1091 |
+
"bn.js": "4.11.8",
|
1092 |
+
"elliptic": "6.4.0"
|
1093 |
+
}
|
1094 |
+
},
|
1095 |
+
"create-hash": {
|
1096 |
+
"version": "1.1.3",
|
1097 |
+
"resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.1.3.tgz",
|
1098 |
+
"integrity": "sha1-YGBCrIuSYnUPSDyt2rD1gZFy2P0=",
|
1099 |
+
"dev": true,
|
1100 |
+
"requires": {
|
1101 |
+
"cipher-base": "1.0.4",
|
1102 |
+
"inherits": "2.0.3",
|
1103 |
+
"ripemd160": "2.0.1",
|
1104 |
+
"sha.js": "2.4.9"
|
1105 |
+
}
|
1106 |
+
},
|
1107 |
+
"create-hmac": {
|
1108 |
+
"version": "1.1.6",
|
1109 |
+
"resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.6.tgz",
|
1110 |
+
"integrity": "sha1-rLniIaThe9sHbpBlfEK5PjcmzwY=",
|
1111 |
+
"dev": true,
|
1112 |
+
"requires": {
|
1113 |
+
"cipher-base": "1.0.4",
|
1114 |
+
"create-hash": "1.1.3",
|
1115 |
+
"inherits": "2.0.3",
|
1116 |
+
"ripemd160": "2.0.1",
|
1117 |
+
"safe-buffer": "5.1.1",
|
1118 |
+
"sha.js": "2.4.9"
|
1119 |
+
}
|
1120 |
+
},
|
1121 |
+
"cross-env": {
|
1122 |
+
"version": "5.1.1",
|
1123 |
+
"resolved": "https://registry.npmjs.org/cross-env/-/cross-env-5.1.1.tgz",
|
1124 |
+
"integrity": "sha512-Wtvr+z0Z06KO1JxjfRRsPC+df7biIOiuV4iZ73cThjFGkH+ULBZq1MkBdywEcJC4cTDbO6c8IjgRjfswx3YTBA==",
|
1125 |
+
"dev": true,
|
1126 |
+
"requires": {
|
1127 |
+
"cross-spawn": "5.1.0",
|
1128 |
+
"is-windows": "1.0.1"
|
1129 |
+
}
|
1130 |
+
},
|
1131 |
+
"cross-spawn": {
|
1132 |
+
"version": "5.1.0",
|
1133 |
+
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz",
|
1134 |
+
"integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=",
|
1135 |
+
"dev": true,
|
1136 |
+
"requires": {
|
1137 |
+
"lru-cache": "4.1.1",
|
1138 |
+
"shebang-command": "1.2.0",
|
1139 |
+
"which": "1.3.0"
|
1140 |
+
}
|
1141 |
+
},
|
1142 |
+
"crypto-browserify": {
|
1143 |
+
"version": "3.12.0",
|
1144 |
+
"resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz",
|
1145 |
+
"integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==",
|
1146 |
+
"dev": true,
|
1147 |
+
"requires": {
|
1148 |
+
"browserify-cipher": "1.0.0",
|
1149 |
+
"browserify-sign": "4.0.4",
|
1150 |
+
"create-ecdh": "4.0.0",
|
1151 |
+
"create-hash": "1.1.3",
|
1152 |
+
"create-hmac": "1.1.6",
|
1153 |
+
"diffie-hellman": "5.0.2",
|
1154 |
+
"inherits": "2.0.3",
|
1155 |
+
"pbkdf2": "3.0.14",
|
1156 |
+
"public-encrypt": "4.0.0",
|
1157 |
+
"randombytes": "2.0.5",
|
1158 |
+
"randomfill": "1.0.3"
|
1159 |
+
}
|
1160 |
+
},
|
1161 |
+
"d": {
|
1162 |
+
"version": "1.0.0",
|
1163 |
+
"resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz",
|
1164 |
+
"integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=",
|
1165 |
+
"dev": true,
|
1166 |
+
"requires": {
|
1167 |
+
"es5-ext": "0.10.37"
|
1168 |
+
}
|
1169 |
+
},
|
1170 |
+
"date-now": {
|
1171 |
+
"version": "0.1.4",
|
1172 |
+
"resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz",
|
1173 |
+
"integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=",
|
1174 |
+
"dev": true
|
1175 |
+
},
|
1176 |
+
"debug": {
|
1177 |
+
"version": "2.6.9",
|
1178 |
+
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
|
1179 |
+
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
|
1180 |
+
"dev": true,
|
1181 |
+
"requires": {
|
1182 |
+
"ms": "2.0.0"
|
1183 |
+
}
|
1184 |
+
},
|
1185 |
+
"decamelize": {
|
1186 |
+
"version": "1.2.0",
|
1187 |
+
"resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
|
1188 |
+
"integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=",
|
1189 |
+
"dev": true
|
1190 |
+
},
|
1191 |
+
"des.js": {
|
1192 |
+
"version": "1.0.0",
|
1193 |
+
"resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz",
|
1194 |
+
"integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=",
|
1195 |
+
"dev": true,
|
1196 |
+
"requires": {
|
1197 |
+
"inherits": "2.0.3",
|
1198 |
+
"minimalistic-assert": "1.0.0"
|
1199 |
+
}
|
1200 |
+
},
|
1201 |
+
"detect-indent": {
|
1202 |
+
"version": "4.0.0",
|
1203 |
+
"resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz",
|
1204 |
+
"integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=",
|
1205 |
+
"dev": true,
|
1206 |
+
"requires": {
|
1207 |
+
"repeating": "2.0.1"
|
1208 |
+
}
|
1209 |
+
},
|
1210 |
+
"diffie-hellman": {
|
1211 |
+
"version": "5.0.2",
|
1212 |
+
"resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.2.tgz",
|
1213 |
+
"integrity": "sha1-tYNXOScM/ias9jIJn97SoH8gnl4=",
|
1214 |
+
"dev": true,
|
1215 |
+
"requires": {
|
1216 |
+
"bn.js": "4.11.8",
|
1217 |
+
"miller-rabin": "4.0.1",
|
1218 |
+
"randombytes": "2.0.5"
|
1219 |
+
}
|
1220 |
+
},
|
1221 |
+
"domain-browser": {
|
1222 |
+
"version": "1.1.7",
|
1223 |
+
"resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.1.7.tgz",
|
1224 |
+
"integrity": "sha1-hnqksJP6oF8d4IwG9NeyH9+GmLw=",
|
1225 |
+
"dev": true
|
1226 |
+
},
|
1227 |
+
"electron-to-chromium": {
|
1228 |
+
"version": "1.3.28",
|
1229 |
+
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.28.tgz",
|
1230 |
+
"integrity": "sha1-jdTmRYCGZE6fnwoc8y4qH53/2e4=",
|
1231 |
+
"dev": true
|
1232 |
+
},
|
1233 |
+
"elliptic": {
|
1234 |
+
"version": "6.4.0",
|
1235 |
+
"resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz",
|
1236 |
+
"integrity": "sha1-ysmvh2LIWDYYcAPI3+GT5eLq5d8=",
|
1237 |
+
"dev": true,
|
1238 |
+
"requires": {
|
1239 |
+
"bn.js": "4.11.8",
|
1240 |
+
"brorand": "1.1.0",
|
1241 |
+
"hash.js": "1.1.3",
|
1242 |
+
"hmac-drbg": "1.0.1",
|
1243 |
+
"inherits": "2.0.3",
|
1244 |
+
"minimalistic-assert": "1.0.0",
|
1245 |
+
"minimalistic-crypto-utils": "1.0.1"
|
1246 |
+
}
|
1247 |
+
},
|
1248 |
+
"emojis-list": {
|
1249 |
+
"version": "2.1.0",
|
1250 |
+
"resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz",
|
1251 |
+
"integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=",
|
1252 |
+
"dev": true
|
1253 |
+
},
|
1254 |
+
"enhanced-resolve": {
|
1255 |
+
"version": "3.4.1",
|
1256 |
+
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-3.4.1.tgz",
|
1257 |
+
"integrity": "sha1-BCHjOf1xQZs9oT0Smzl5BAIwR24=",
|
1258 |
+
"dev": true,
|
1259 |
+
"requires": {
|
1260 |
+
"graceful-fs": "4.1.11",
|
1261 |
+
"memory-fs": "0.4.1",
|
1262 |
+
"object-assign": "4.1.1",
|
1263 |
+
"tapable": "0.2.8"
|
1264 |
+
}
|
1265 |
+
},
|
1266 |
+
"errno": {
|
1267 |
+
"version": "0.1.6",
|
1268 |
+
"resolved": "https://registry.npmjs.org/errno/-/errno-0.1.6.tgz",
|
1269 |
+
"integrity": "sha512-IsORQDpaaSwcDP4ZZnHxgE85werpo34VYn1Ud3mq+eUsF593faR8oCZNXrROVkpFu2TsbrNhHin0aUrTsQ9vNw==",
|
1270 |
+
"dev": true,
|
1271 |
+
"requires": {
|
1272 |
+
"prr": "1.0.1"
|
1273 |
+
}
|
1274 |
+
},
|
1275 |
+
"error-ex": {
|
1276 |
+
"version": "1.3.1",
|
1277 |
+
"resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz",
|
1278 |
+
"integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=",
|
1279 |
+
"dev": true,
|
1280 |
+
"requires": {
|
1281 |
+
"is-arrayish": "0.2.1"
|
1282 |
+
}
|
1283 |
+
},
|
1284 |
+
"es5-ext": {
|
1285 |
+
"version": "0.10.37",
|
1286 |
+
"resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.37.tgz",
|
1287 |
+
"integrity": "sha1-DudB0Ui4AGm6J9AgOTdWryV978M=",
|
1288 |
+
"dev": true,
|
1289 |
+
"requires": {
|
1290 |
+
"es6-iterator": "2.0.3",
|
1291 |
+
"es6-symbol": "3.1.1"
|
1292 |
+
}
|
1293 |
+
},
|
1294 |
+
"es6-iterator": {
|
1295 |
+
"version": "2.0.3",
|
1296 |
+
"resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz",
|
1297 |
+
"integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=",
|
1298 |
+
"dev": true,
|
1299 |
+
"requires": {
|
1300 |
+
"d": "1.0.0",
|
1301 |
+
"es5-ext": "0.10.37",
|
1302 |
+
"es6-symbol": "3.1.1"
|
1303 |
+
}
|
1304 |
+
},
|
1305 |
+
"es6-map": {
|
1306 |
+
"version": "0.1.5",
|
1307 |
+
"resolved": "https://registry.npmjs.org/es6-map/-/es6-map-0.1.5.tgz",
|
1308 |
+
"integrity": "sha1-kTbgUD3MBqMBaQ8LsU/042TpSfA=",
|
1309 |
+
"dev": true,
|
1310 |
+
"requires": {
|
1311 |
+
"d": "1.0.0",
|
1312 |
+
"es5-ext": "0.10.37",
|
1313 |
+
"es6-iterator": "2.0.3",
|
1314 |
+
"es6-set": "0.1.5",
|
1315 |
+
"es6-symbol": "3.1.1",
|
1316 |
+
"event-emitter": "0.3.5"
|
1317 |
+
}
|
1318 |
+
},
|
1319 |
+
"es6-set": {
|
1320 |
+
"version": "0.1.5",
|
1321 |
+
"resolved": "https://registry.npmjs.org/es6-set/-/es6-set-0.1.5.tgz",
|
1322 |
+
"integrity": "sha1-0rPsXU2ADO2BjbU40ol02wpzzLE=",
|
1323 |
+
"dev": true,
|
1324 |
+
"requires": {
|
1325 |
+
"d": "1.0.0",
|
1326 |
+
"es5-ext": "0.10.37",
|
1327 |
+
"es6-iterator": "2.0.3",
|
1328 |
+
"es6-symbol": "3.1.1",
|
1329 |
+
"event-emitter": "0.3.5"
|
1330 |
+
}
|
1331 |
+
},
|
1332 |
+
"es6-symbol": {
|
1333 |
+
"version": "3.1.1",
|
1334 |
+
"resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz",
|
1335 |
+
"integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=",
|
1336 |
+
"dev": true,
|
1337 |
+
"requires": {
|
1338 |
+
"d": "1.0.0",
|
1339 |
+
"es5-ext": "0.10.37"
|
1340 |
+
}
|
1341 |
+
},
|
1342 |
+
"es6-weak-map": {
|
1343 |
+
"version": "2.0.2",
|
1344 |
+
"resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.2.tgz",
|
1345 |
+
"integrity": "sha1-XjqzIlH/0VOKH45f+hNXdy+S2W8=",
|
1346 |
+
"dev": true,
|
1347 |
+
"requires": {
|
1348 |
+
"d": "1.0.0",
|
1349 |
+
"es5-ext": "0.10.37",
|
1350 |
+
"es6-iterator": "2.0.3",
|
1351 |
+
"es6-symbol": "3.1.1"
|
1352 |
+
}
|
1353 |
+
},
|
1354 |
+
"escape-string-regexp": {
|
1355 |
+
"version": "1.0.5",
|
1356 |
+
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
|
1357 |
+
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
|
1358 |
+
"dev": true
|
1359 |
+
},
|
1360 |
+
"escope": {
|
1361 |
+
"version": "3.6.0",
|
1362 |
+
"resolved": "https://registry.npmjs.org/escope/-/escope-3.6.0.tgz",
|
1363 |
+
"integrity": "sha1-4Bl16BJ4GhY6ba392AOY3GTIicM=",
|
1364 |
+
"dev": true,
|
1365 |
+
"requires": {
|
1366 |
+
"es6-map": "0.1.5",
|
1367 |
+
"es6-weak-map": "2.0.2",
|
1368 |
+
"esrecurse": "4.2.0",
|
1369 |
+
"estraverse": "4.2.0"
|
1370 |
+
}
|
1371 |
+
},
|
1372 |
+
"esrecurse": {
|
1373 |
+
"version": "4.2.0",
|
1374 |
+
"resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.0.tgz",
|
1375 |
+
"integrity": "sha1-+pVo2Y04I/mkHZHpAtyrnqblsWM=",
|
1376 |
+
"dev": true,
|
1377 |
+
"requires": {
|
1378 |
+
"estraverse": "4.2.0",
|
1379 |
+
"object-assign": "4.1.1"
|
1380 |
+
}
|
1381 |
+
},
|
1382 |
+
"estraverse": {
|
1383 |
+
"version": "4.2.0",
|
1384 |
+
"resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz",
|
1385 |
+
"integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=",
|
1386 |
+
"dev": true
|
1387 |
+
},
|
1388 |
+
"esutils": {
|
1389 |
+
"version": "2.0.2",
|
1390 |
+
"resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz",
|
1391 |
+
"integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=",
|
1392 |
+
"dev": true
|
1393 |
+
},
|
1394 |
+
"event-emitter": {
|
1395 |
+
"version": "0.3.5",
|
1396 |
+
"resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz",
|
1397 |
+
"integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=",
|
1398 |
+
"dev": true,
|
1399 |
+
"requires": {
|
1400 |
+
"d": "1.0.0",
|
1401 |
+
"es5-ext": "0.10.37"
|
1402 |
+
}
|
1403 |
+
},
|
1404 |
+
"events": {
|
1405 |
+
"version": "1.1.1",
|
1406 |
+
"resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz",
|
1407 |
+
"integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=",
|
1408 |
+
"dev": true
|
1409 |
+
},
|
1410 |
+
"evp_bytestokey": {
|
1411 |
+
"version": "1.0.3",
|
1412 |
+
"resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz",
|
1413 |
+
"integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==",
|
1414 |
+
"dev": true,
|
1415 |
+
"requires": {
|
1416 |
+
"md5.js": "1.3.4",
|
1417 |
+
"safe-buffer": "5.1.1"
|
1418 |
+
}
|
1419 |
+
},
|
1420 |
+
"execa": {
|
1421 |
+
"version": "0.7.0",
|
1422 |
+
"resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz",
|
1423 |
+
"integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=",
|
1424 |
+
"dev": true,
|
1425 |
+
"requires": {
|
1426 |
+
"cross-spawn": "5.1.0",
|
1427 |
+
"get-stream": "3.0.0",
|
1428 |
+
"is-stream": "1.1.0",
|
1429 |
+
"npm-run-path": "2.0.2",
|
1430 |
+
"p-finally": "1.0.0",
|
1431 |
+
"signal-exit": "3.0.2",
|
1432 |
+
"strip-eof": "1.0.0"
|
1433 |
+
}
|
1434 |
+
},
|
1435 |
+
"expand-brackets": {
|
1436 |
+
"version": "0.1.5",
|
1437 |
+
"resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz",
|
1438 |
+
"integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=",
|
1439 |
+
"dev": true,
|
1440 |
+
"requires": {
|
1441 |
+
"is-posix-bracket": "0.1.1"
|
1442 |
+
}
|
1443 |
+
},
|
1444 |
+
"expand-range": {
|
1445 |
+
"version": "1.8.2",
|
1446 |
+
"resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz",
|
1447 |
+
"integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=",
|
1448 |
+
"dev": true,
|
1449 |
+
"requires": {
|
1450 |
+
"fill-range": "2.2.3"
|
1451 |
+
}
|
1452 |
+
},
|
1453 |
+
"extglob": {
|
1454 |
+
"version": "0.3.2",
|
1455 |
+
"resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz",
|
1456 |
+
"integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=",
|
1457 |
+
"dev": true,
|
1458 |
+
"requires": {
|
1459 |
+
"is-extglob": "1.0.0"
|
1460 |
+
}
|
1461 |
+
},
|
1462 |
+
"fast-deep-equal": {
|
1463 |
+
"version": "1.0.0",
|
1464 |
+
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz",
|
1465 |
+
"integrity": "sha1-liVqO8l1WV6zbYLpkp0GDYk0Of8=",
|
1466 |
+
"dev": true
|
1467 |
+
},
|
1468 |
+
"fast-json-stable-stringify": {
|
1469 |
+
"version": "2.0.0",
|
1470 |
+
"resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz",
|
1471 |
+
"integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=",
|
1472 |
+
"dev": true
|
1473 |
+
},
|
1474 |
+
"filename-regex": {
|
1475 |
+
"version": "2.0.1",
|
1476 |
+
"resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz",
|
1477 |
+
"integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=",
|
1478 |
+
"dev": true
|
1479 |
+
},
|
1480 |
+
"fill-range": {
|
1481 |
+
"version": "2.2.3",
|
1482 |
+
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz",
|
1483 |
+
"integrity": "sha1-ULd9/X5Gm8dJJHCWNpn+eoSFpyM=",
|
1484 |
+
"dev": true,
|
1485 |
+
"requires": {
|
1486 |
+
"is-number": "2.1.0",
|
1487 |
+
"isobject": "2.1.0",
|
1488 |
+
"randomatic": "1.1.7",
|
1489 |
+
"repeat-element": "1.1.2",
|
1490 |
+
"repeat-string": "1.6.1"
|
1491 |
+
}
|
1492 |
+
},
|
1493 |
+
"find-cache-dir": {
|
1494 |
+
"version": "1.0.0",
|
1495 |
+
"resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-1.0.0.tgz",
|
1496 |
+
"integrity": "sha1-kojj6ePMN0hxfTnq3hfPcfww7m8=",
|
1497 |
+
"dev": true,
|
1498 |
+
"requires": {
|
1499 |
+
"commondir": "1.0.1",
|
1500 |
+
"make-dir": "1.1.0",
|
1501 |
+
"pkg-dir": "2.0.0"
|
1502 |
+
}
|
1503 |
+
},
|
1504 |
+
"find-up": {
|
1505 |
+
"version": "2.1.0",
|
1506 |
+
"resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz",
|
1507 |
+
"integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=",
|
1508 |
+
"dev": true,
|
1509 |
+
"requires": {
|
1510 |
+
"locate-path": "2.0.0"
|
1511 |
+
}
|
1512 |
+
},
|
1513 |
+
"for-in": {
|
1514 |
+
"version": "1.0.2",
|
1515 |
+
"resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz",
|
1516 |
+
"integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=",
|
1517 |
+
"dev": true
|
1518 |
+
},
|
1519 |
+
"for-own": {
|
1520 |
+
"version": "0.1.5",
|
1521 |
+
"resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz",
|
1522 |
+
"integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=",
|
1523 |
+
"dev": true,
|
1524 |
+
"requires": {
|
1525 |
+
"for-in": "1.0.2"
|
1526 |
+
}
|
1527 |
+
},
|
1528 |
+
"fsevents": {
|
1529 |
+
"version": "1.1.3",
|
1530 |
+
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.1.3.tgz",
|
1531 |
+
"integrity": "sha512-WIr7iDkdmdbxu/Gh6eKEZJL6KPE74/5MEsf2whTOFNxbIoIixogroLdKYqB6FDav4Wavh/lZdzzd3b2KxIXC5Q==",
|
1532 |
+
"dev": true,
|
1533 |
+
"optional": true,
|
1534 |
+
"requires": {
|
1535 |
+
"nan": "2.8.0",
|
1536 |
+
"node-pre-gyp": "0.6.39"
|
1537 |
+
},
|
1538 |
+
"dependencies": {
|
1539 |
+
"abbrev": {
|
1540 |
+
"version": "1.1.0",
|
1541 |
+
"bundled": true,
|
1542 |
+
"dev": true,
|
1543 |
+
"optional": true
|
1544 |
+
},
|
1545 |
+
"ajv": {
|
1546 |
+
"version": "4.11.8",
|
1547 |
+
"bundled": true,
|
1548 |
+
"dev": true,
|
1549 |
+
"optional": true,
|
1550 |
+
"requires": {
|
1551 |
+
"co": "4.6.0",
|
1552 |
+
"json-stable-stringify": "1.0.1"
|
1553 |
+
}
|
1554 |
+
},
|
1555 |
+
"ansi-regex": {
|
1556 |
+
"version": "2.1.1",
|
1557 |
+
"bundled": true,
|
1558 |
+
"dev": true
|
1559 |
+
},
|
1560 |
+
"aproba": {
|
1561 |
+
"version": "1.1.1",
|
1562 |
+
"bundled": true,
|
1563 |
+
"dev": true,
|
1564 |
+
"optional": true
|
1565 |
+
},
|
1566 |
+
"are-we-there-yet": {
|
1567 |
+
"version": "1.1.4",
|
1568 |
+
"bundled": true,
|
1569 |
+
"dev": true,
|
1570 |
+
"optional": true,
|
1571 |
+
"requires": {
|
1572 |
+
"delegates": "1.0.0",
|
1573 |
+
"readable-stream": "2.2.9"
|
1574 |
+
}
|
1575 |
+
},
|
1576 |
+
"asn1": {
|
1577 |
+
"version": "0.2.3",
|
1578 |
+
"bundled": true,
|
1579 |
+
"dev": true,
|
1580 |
+
"optional": true
|
1581 |
+
},
|
1582 |
+
"assert-plus": {
|
1583 |
+
"version": "0.2.0",
|
1584 |
+
"bundled": true,
|
1585 |
+
"dev": true,
|
1586 |
+
"optional": true
|
1587 |
+
},
|
1588 |
+
"asynckit": {
|
1589 |
+
"version": "0.4.0",
|
1590 |
+
"bundled": true,
|
1591 |
+
"dev": true,
|
1592 |
+
"optional": true
|
1593 |
+
},
|
1594 |
+
"aws-sign2": {
|
1595 |
+
"version": "0.6.0",
|
1596 |
+
"bundled": true,
|
1597 |
+
"dev": true,
|
1598 |
+
"optional": true
|
1599 |
+
},
|
1600 |
+
"aws4": {
|
1601 |
+
"version": "1.6.0",
|
1602 |
+
"bundled": true,
|
1603 |
+
"dev": true,
|
1604 |
+
"optional": true
|
1605 |
+
},
|
1606 |
+
"balanced-match": {
|
1607 |
+
"version": "0.4.2",
|
1608 |
+
"bundled": true,
|
1609 |
+
"dev": true
|
1610 |
+
},
|
1611 |
+
"bcrypt-pbkdf": {
|
1612 |
+
"version": "1.0.1",
|
1613 |
+
"bundled": true,
|
1614 |
+
"dev": true,
|
1615 |
+
"optional": true,
|
1616 |
+
"requires": {
|
1617 |
+
"tweetnacl": "0.14.5"
|
1618 |
+
}
|
1619 |
+
},
|
1620 |
+
"block-stream": {
|
1621 |
+
"version": "0.0.9",
|
1622 |
+
"bundled": true,
|
1623 |
+
"dev": true,
|
1624 |
+
"requires": {
|
1625 |
+
"inherits": "2.0.3"
|
1626 |
+
}
|
1627 |
+
},
|
1628 |
+
"boom": {
|
1629 |
+
"version": "2.10.1",
|
1630 |
+
"bundled": true,
|
1631 |
+
"dev": true,
|
1632 |
+
"requires": {
|
1633 |
+
"hoek": "2.16.3"
|
1634 |
+
}
|
1635 |
+
},
|
1636 |
+
"brace-expansion": {
|
1637 |
+
"version": "1.1.7",
|
1638 |
+
"bundled": true,
|
1639 |
+
"dev": true,
|
1640 |
+
"requires": {
|
1641 |
+
"balanced-match": "0.4.2",
|
1642 |
+
"concat-map": "0.0.1"
|
1643 |
+
}
|
1644 |
+
},
|
1645 |
+
"buffer-shims": {
|
1646 |
+
"version": "1.0.0",
|
1647 |
+
"bundled": true,
|
1648 |
+
"dev": true
|
1649 |
+
},
|
1650 |
+
"caseless": {
|
1651 |
+
"version": "0.12.0",
|
1652 |
+
"bundled": true,
|
1653 |
+
"dev": true,
|
1654 |
+
"optional": true
|
1655 |
+
},
|
1656 |
+
"co": {
|
1657 |
+
"version": "4.6.0",
|
1658 |
+
"bundled": true,
|
1659 |
+
"dev": true,
|
1660 |
+
"optional": true
|
1661 |
+
},
|
1662 |
+
"code-point-at": {
|
1663 |
+
"version": "1.1.0",
|
1664 |
+
"bundled": true,
|
1665 |
+
"dev": true
|
1666 |
+
},
|
1667 |
+
"combined-stream": {
|
1668 |
+
"version": "1.0.5",
|
1669 |
+
"bundled": true,
|
1670 |
+
"dev": true,
|
1671 |
+
"requires": {
|
1672 |
+
"delayed-stream": "1.0.0"
|
1673 |
+
}
|
1674 |
+
},
|
1675 |
+
"concat-map": {
|
1676 |
+
"version": "0.0.1",
|
1677 |
+
"bundled": true,
|
1678 |
+
"dev": true
|
1679 |
+
},
|
1680 |
+
"console-control-strings": {
|
1681 |
+
"version": "1.1.0",
|
1682 |
+
"bundled": true,
|
1683 |
+
"dev": true
|
1684 |
+
},
|
1685 |
+
"core-util-is": {
|
1686 |
+
"version": "1.0.2",
|
1687 |
+
"bundled": true,
|
1688 |
+
"dev": true
|
1689 |
+
},
|
1690 |
+
"cryptiles": {
|
1691 |
+
"version": "2.0.5",
|
1692 |
+
"bundled": true,
|
1693 |
+
"dev": true,
|
1694 |
+
"requires": {
|
1695 |
+
"boom": "2.10.1"
|
1696 |
+
}
|
1697 |
+
},
|
1698 |
+
"dashdash": {
|
1699 |
+
"version": "1.14.1",
|
1700 |
+
"bundled": true,
|
1701 |
+
"dev": true,
|
1702 |
+
"optional": true,
|
1703 |
+
"requires": {
|
1704 |
+
"assert-plus": "1.0.0"
|
1705 |
+
},
|
1706 |
+
"dependencies": {
|
1707 |
+
"assert-plus": {
|
1708 |
+
"version": "1.0.0",
|
1709 |
+
"bundled": true,
|
1710 |
+
"dev": true,
|
1711 |
+
"optional": true
|
1712 |
+
}
|
1713 |
+
}
|
1714 |
+
},
|
1715 |
+
"debug": {
|
1716 |
+
"version": "2.6.8",
|
1717 |
+
"bundled": true,
|
1718 |
+
"dev": true,
|
1719 |
+
"optional": true,
|
1720 |
+
"requires": {
|
1721 |
+
"ms": "2.0.0"
|
1722 |
+
}
|
1723 |
+
},
|
1724 |
+
"deep-extend": {
|
1725 |
+
"version": "0.4.2",
|
1726 |
+
"bundled": true,
|
1727 |
+
"dev": true,
|
1728 |
+
"optional": true
|
1729 |
+
},
|
1730 |
+
"delayed-stream": {
|
1731 |
+
"version": "1.0.0",
|
1732 |
+
"bundled": true,
|
1733 |
+
"dev": true
|
1734 |
+
},
|
1735 |
+
"delegates": {
|
1736 |
+
"version": "1.0.0",
|
1737 |
+
"bundled": true,
|
1738 |
+
"dev": true,
|
1739 |
+
"optional": true
|
1740 |
+
},
|
1741 |
+
"detect-libc": {
|
1742 |
+
"version": "1.0.2",
|
1743 |
+
"bundled": true,
|
1744 |
+
"dev": true,
|
1745 |
+
"optional": true
|
1746 |
+
},
|
1747 |
+
"ecc-jsbn": {
|
1748 |
+
"version": "0.1.1",
|
1749 |
+
"bundled": true,
|
1750 |
+
"dev": true,
|
1751 |
+
"optional": true,
|
1752 |
+
"requires": {
|
1753 |
+
"jsbn": "0.1.1"
|
1754 |
+
}
|
1755 |
+
},
|
1756 |
+
"extend": {
|
1757 |
+
"version": "3.0.1",
|
1758 |
+
"bundled": true,
|
1759 |
+
"dev": true,
|
1760 |
+
"optional": true
|
1761 |
+
},
|
1762 |
+
"extsprintf": {
|
1763 |
+
"version": "1.0.2",
|
1764 |
+
"bundled": true,
|
1765 |
+
"dev": true
|
1766 |
+
},
|
1767 |
+
"forever-agent": {
|
1768 |
+
"version": "0.6.1",
|
1769 |
+
"bundled": true,
|
1770 |
+
"dev": true,
|
1771 |
+
"optional": true
|
1772 |
+
},
|
1773 |
+
"form-data": {
|
1774 |
+
"version": "2.1.4",
|
1775 |
+
"bundled": true,
|
1776 |
+
"dev": true,
|
1777 |
+
"optional": true,
|
1778 |
+
"requires": {
|
1779 |
+
"asynckit": "0.4.0",
|
1780 |
+
"combined-stream": "1.0.5",
|
1781 |
+
"mime-types": "2.1.15"
|
1782 |
+
}
|
1783 |
+
},
|
1784 |
+
"fs.realpath": {
|
1785 |
+
"version": "1.0.0",
|
1786 |
+
"bundled": true,
|
1787 |
+
"dev": true
|
1788 |
+
},
|
1789 |
+
"fstream": {
|
1790 |
+
"version": "1.0.11",
|
1791 |
+
"bundled": true,
|
1792 |
+
"dev": true,
|
1793 |
+
"requires": {
|
1794 |
+
"graceful-fs": "4.1.11",
|
1795 |
+
"inherits": "2.0.3",
|
1796 |
+
"mkdirp": "0.5.1",
|
1797 |
+
"rimraf": "2.6.1"
|
1798 |
+
}
|
1799 |
+
},
|
1800 |
+
"fstream-ignore": {
|
1801 |
+
"version": "1.0.5",
|
1802 |
+
"bundled": true,
|
1803 |
+
"dev": true,
|
1804 |
+
"optional": true,
|
1805 |
+
"requires": {
|
1806 |
+
"fstream": "1.0.11",
|
1807 |
+
"inherits": "2.0.3",
|
1808 |
+
"minimatch": "3.0.4"
|
1809 |
+
}
|
1810 |
+
},
|
1811 |
+
"gauge": {
|
1812 |
+
"version": "2.7.4",
|
1813 |
+
"bundled": true,
|
1814 |
+
"dev": true,
|
1815 |
+
"optional": true,
|
1816 |
+
"requires": {
|
1817 |
+
"aproba": "1.1.1",
|
1818 |
+
"console-control-strings": "1.1.0",
|
1819 |
+
"has-unicode": "2.0.1",
|
1820 |
+
"object-assign": "4.1.1",
|
1821 |
+
"signal-exit": "3.0.2",
|
1822 |
+
"string-width": "1.0.2",
|
1823 |
+
"strip-ansi": "3.0.1",
|
1824 |
+
"wide-align": "1.1.2"
|
1825 |
+
}
|
1826 |
+
},
|
1827 |
+
"getpass": {
|
1828 |
+
"version": "0.1.7",
|
1829 |
+
"bundled": true,
|
1830 |
+
"dev": true,
|
1831 |
+
"optional": true,
|
1832 |
+
"requires": {
|
1833 |
+
"assert-plus": "1.0.0"
|
1834 |
+
},
|
1835 |
+
"dependencies": {
|
1836 |
+
"assert-plus": {
|
1837 |
+
"version": "1.0.0",
|
1838 |
+
"bundled": true,
|
1839 |
+
"dev": true,
|
1840 |
+
"optional": true
|
1841 |
+
}
|
1842 |
+
}
|
1843 |
+
},
|
1844 |
+
"glob": {
|
1845 |
+
"version": "7.1.2",
|
1846 |
+
"bundled": true,
|
1847 |
+
"dev": true,
|
1848 |
+
"requires": {
|
1849 |
+
"fs.realpath": "1.0.0",
|
1850 |
+
"inflight": "1.0.6",
|
1851 |
+
"inherits": "2.0.3",
|
1852 |
+
"minimatch": "3.0.4",
|
1853 |
+
"once": "1.4.0",
|
1854 |
+
"path-is-absolute": "1.0.1"
|
1855 |
+
}
|
1856 |
+
},
|
1857 |
+
"graceful-fs": {
|
1858 |
+
"version": "4.1.11",
|
1859 |
+
"bundled": true,
|
1860 |
+
"dev": true
|
1861 |
+
},
|
1862 |
+
"har-schema": {
|
1863 |
+
"version": "1.0.5",
|
1864 |
+
"bundled": true,
|
1865 |
+
"dev": true,
|
1866 |
+
"optional": true
|
1867 |
+
},
|
1868 |
+
"har-validator": {
|
1869 |
+
"version": "4.2.1",
|
1870 |
+
"bundled": true,
|
1871 |
+
"dev": true,
|
1872 |
+
"optional": true,
|
1873 |
+
"requires": {
|
1874 |
+
"ajv": "4.11.8",
|
1875 |
+
"har-schema": "1.0.5"
|
1876 |
+
}
|
1877 |
+
},
|
1878 |
+
"has-unicode": {
|
1879 |
+
"version": "2.0.1",
|
1880 |
+
"bundled": true,
|
1881 |
+
"dev": true,
|
1882 |
+
"optional": true
|
1883 |
+
},
|
1884 |
+
"hawk": {
|
1885 |
+
"version": "3.1.3",
|
1886 |
+
"bundled": true,
|
1887 |
+
"dev": true,
|
1888 |
+
"requires": {
|
1889 |
+
"boom": "2.10.1",
|
1890 |
+
"cryptiles": "2.0.5",
|
1891 |
+
"hoek": "2.16.3",
|
1892 |
+
"sntp": "1.0.9"
|
1893 |
+
}
|
1894 |
+
},
|
1895 |
+
"hoek": {
|
1896 |
+
"version": "2.16.3",
|
1897 |
+
"bundled": true,
|
1898 |
+
"dev": true
|
1899 |
+
},
|
1900 |
+
"http-signature": {
|
1901 |
+
"version": "1.1.1",
|
1902 |
+
"bundled": true,
|
1903 |
+
"dev": true,
|
1904 |
+
"optional": true,
|
1905 |
+
"requires": {
|
1906 |
+
"assert-plus": "0.2.0",
|
1907 |
+
"jsprim": "1.4.0",
|
1908 |
+
"sshpk": "1.13.0"
|
1909 |
+
}
|
1910 |
+
},
|
1911 |
+
"inflight": {
|
1912 |
+
"version": "1.0.6",
|
1913 |
+
"bundled": true,
|
1914 |
+
"dev": true,
|
1915 |
+
"requires": {
|
1916 |
+
"once": "1.4.0",
|
1917 |
+
"wrappy": "1.0.2"
|
1918 |
+
}
|
1919 |
+
},
|
1920 |
+
"inherits": {
|
1921 |
+
"version": "2.0.3",
|
1922 |
+
"bundled": true,
|
1923 |
+
"dev": true
|
1924 |
+
},
|
1925 |
+
"ini": {
|
1926 |
+
"version": "1.3.4",
|
1927 |
+
"bundled": true,
|
1928 |
+
"dev": true,
|
1929 |
+
"optional": true
|
1930 |
+
},
|
1931 |
+
"is-fullwidth-code-point": {
|
1932 |
+
"version": "1.0.0",
|
1933 |
+
"bundled": true,
|
1934 |
+
"dev": true,
|
1935 |
+
"requires": {
|
1936 |
+
"number-is-nan": "1.0.1"
|
1937 |
+
}
|
1938 |
+
},
|
1939 |
+
"is-typedarray": {
|
1940 |
+
"version": "1.0.0",
|
1941 |
+
"bundled": true,
|
1942 |
+
"dev": true,
|
1943 |
+
"optional": true
|
1944 |
+
},
|
1945 |
+
"isarray": {
|
1946 |
+
"version": "1.0.0",
|
1947 |
+
"bundled": true,
|
1948 |
+
"dev": true
|
1949 |
+
},
|
1950 |
+
"isstream": {
|
1951 |
+
"version": "0.1.2",
|
1952 |
+
"bundled": true,
|
1953 |
+
"dev": true,
|
1954 |
+
"optional": true
|
1955 |
+
},
|
1956 |
+
"jodid25519": {
|
1957 |
+
"version": "1.0.2",
|
1958 |
+
"bundled": true,
|
1959 |
+
"dev": true,
|
1960 |
+
"optional": true,
|
1961 |
+
"requires": {
|
1962 |
+
"jsbn": "0.1.1"
|
1963 |
+
}
|
1964 |
+
},
|
1965 |
+
"jsbn": {
|
1966 |
+
"version": "0.1.1",
|
1967 |
+
"bundled": true,
|
1968 |
+
"dev": true,
|
1969 |
+
"optional": true
|
1970 |
+
},
|
1971 |
+
"json-schema": {
|
1972 |
+
"version": "0.2.3",
|
1973 |
+
"bundled": true,
|
1974 |
+
"dev": true,
|
1975 |
+
"optional": true
|
1976 |
+
},
|
1977 |
+
"json-stable-stringify": {
|
1978 |
+
"version": "1.0.1",
|
1979 |
+
"bundled": true,
|
1980 |
+
"dev": true,
|
1981 |
+
"optional": true,
|
1982 |
+
"requires": {
|
1983 |
+
"jsonify": "0.0.0"
|
1984 |
+
}
|
1985 |
+
},
|
1986 |
+
"json-stringify-safe": {
|
1987 |
+
"version": "5.0.1",
|
1988 |
+
"bundled": true,
|
1989 |
+
"dev": true,
|
1990 |
+
"optional": true
|
1991 |
+
},
|
1992 |
+
"jsonify": {
|
1993 |
+
"version": "0.0.0",
|
1994 |
+
"bundled": true,
|
1995 |
+
"dev": true,
|
1996 |
+
"optional": true
|
1997 |
+
},
|
1998 |
+
"jsprim": {
|
1999 |
+
"version": "1.4.0",
|
2000 |
+
"bundled": true,
|
2001 |
+
"dev": true,
|
2002 |
+
"optional": true,
|
2003 |
+
"requires": {
|
2004 |
+
"assert-plus": "1.0.0",
|
2005 |
+
"extsprintf": "1.0.2",
|
2006 |
+
"json-schema": "0.2.3",
|
2007 |
+
"verror": "1.3.6"
|
2008 |
+
},
|
2009 |
+
"dependencies": {
|
2010 |
+
"assert-plus": {
|
2011 |
+
"version": "1.0.0",
|
2012 |
+
"bundled": true,
|
2013 |
+
"dev": true,
|
2014 |
+
"optional": true
|
2015 |
+
}
|
2016 |
+
}
|
2017 |
+
},
|
2018 |
+
"mime-db": {
|
2019 |
+
"version": "1.27.0",
|
2020 |
+
"bundled": true,
|
2021 |
+
"dev": true
|
2022 |
+
},
|
2023 |
+
"mime-types": {
|
2024 |
+
"version": "2.1.15",
|
2025 |
+
"bundled": true,
|
2026 |
+
"dev": true,
|
2027 |
+
"requires": {
|
2028 |
+
"mime-db": "1.27.0"
|
2029 |
+
}
|
2030 |
+
},
|
2031 |
+
"minimatch": {
|
2032 |
+
"version": "3.0.4",
|
2033 |
+
"bundled": true,
|
2034 |
+
"dev": true,
|
2035 |
+
"requires": {
|
2036 |
+
"brace-expansion": "1.1.7"
|
2037 |
+
}
|
2038 |
+
},
|
2039 |
+
"minimist": {
|
2040 |
+
"version": "0.0.8",
|
2041 |
+
"bundled": true,
|
2042 |
+
"dev": true
|
2043 |
+
},
|
2044 |
+
"mkdirp": {
|
2045 |
+
"version": "0.5.1",
|
2046 |
+
"bundled": true,
|
2047 |
+
"dev": true,
|
2048 |
+
"requires": {
|
2049 |
+
"minimist": "0.0.8"
|
2050 |
+
}
|
2051 |
+
},
|
2052 |
+
"ms": {
|
2053 |
+
"version": "2.0.0",
|
2054 |
+
"bundled": true,
|
2055 |
+
"dev": true,
|
2056 |
+
"optional": true
|
2057 |
+
},
|
2058 |
+
"node-pre-gyp": {
|
2059 |
+
"version": "0.6.39",
|
2060 |
+
"bundled": true,
|
2061 |
+
"dev": true,
|
2062 |
+
"optional": true,
|
2063 |
+
"requires": {
|
2064 |
+
"detect-libc": "1.0.2",
|
2065 |
+
"hawk": "3.1.3",
|
2066 |
+
"mkdirp": "0.5.1",
|
2067 |
+
"nopt": "4.0.1",
|
2068 |
+
"npmlog": "4.1.0",
|
2069 |
+
"rc": "1.2.1",
|
2070 |
+
"request": "2.81.0",
|
2071 |
+
"rimraf": "2.6.1",
|
2072 |
+
"semver": "5.3.0",
|
2073 |
+
"tar": "2.2.1",
|
2074 |
+
"tar-pack": "3.4.0"
|
2075 |
+
}
|
2076 |
+
},
|
2077 |
+
"nopt": {
|
2078 |
+
"version": "4.0.1",
|
2079 |
+
"bundled": true,
|
2080 |
+
"dev": true,
|
2081 |
+
"optional": true,
|
2082 |
+
"requires": {
|
2083 |
+
"abbrev": "1.1.0",
|
2084 |
+
"osenv": "0.1.4"
|
2085 |
+
}
|
2086 |
+
},
|
2087 |
+
"npmlog": {
|
2088 |
+
"version": "4.1.0",
|
2089 |
+
"bundled": true,
|
2090 |
+
"dev": true,
|
2091 |
+
"optional": true,
|
2092 |
+
"requires": {
|
2093 |
+
"are-we-there-yet": "1.1.4",
|
2094 |
+
"console-control-strings": "1.1.0",
|
2095 |
+
"gauge": "2.7.4",
|
2096 |
+
"set-blocking": "2.0.0"
|
2097 |
+
}
|
2098 |
+
},
|
2099 |
+
"number-is-nan": {
|
2100 |
+
"version": "1.0.1",
|
2101 |
+
"bundled": true,
|
2102 |
+
"dev": true
|
2103 |
+
},
|
2104 |
+
"oauth-sign": {
|
2105 |
+
"version": "0.8.2",
|
2106 |
+
"bundled": true,
|
2107 |
+
"dev": true,
|
2108 |
+
"optional": true
|
2109 |
+
},
|
2110 |
+
"object-assign": {
|
2111 |
+
"version": "4.1.1",
|
2112 |
+
"bundled": true,
|
2113 |
+
"dev": true,
|
2114 |
+
"optional": true
|
2115 |
+
},
|
2116 |
+
"once": {
|
2117 |
+
"version": "1.4.0",
|
2118 |
+
"bundled": true,
|
2119 |
+
"dev": true,
|
2120 |
+
"requires": {
|
2121 |
+
"wrappy": "1.0.2"
|
2122 |
+
}
|
2123 |
+
},
|
2124 |
+
"os-homedir": {
|
2125 |
+
"version": "1.0.2",
|
2126 |
+
"bundled": true,
|
2127 |
+
"dev": true,
|
2128 |
+
"optional": true
|
2129 |
+
},
|
2130 |
+
"os-tmpdir": {
|
2131 |
+
"version": "1.0.2",
|
2132 |
+
"bundled": true,
|
2133 |
+
"dev": true,
|
2134 |
+
"optional": true
|
2135 |
+
},
|
2136 |
+
"osenv": {
|
2137 |
+
"version": "0.1.4",
|
2138 |
+
"bundled": true,
|
2139 |
+
"dev": true,
|
2140 |
+
"optional": true,
|
2141 |
+
"requires": {
|
2142 |
+
"os-homedir": "1.0.2",
|
2143 |
+
"os-tmpdir": "1.0.2"
|
2144 |
+
}
|
2145 |
+
},
|
2146 |
+
"path-is-absolute": {
|
2147 |
+
"version": "1.0.1",
|
2148 |
+
"bundled": true,
|
2149 |
+
"dev": true
|
2150 |
+
},
|
2151 |
+
"performance-now": {
|
2152 |
+
"version": "0.2.0",
|
2153 |
+
"bundled": true,
|
2154 |
+
"dev": true,
|
2155 |
+
"optional": true
|
2156 |
+
},
|
2157 |
+
"process-nextick-args": {
|
2158 |
+
"version": "1.0.7",
|
2159 |
+
"bundled": true,
|
2160 |
+
"dev": true
|
2161 |
+
},
|
2162 |
+
"punycode": {
|
2163 |
+
"version": "1.4.1",
|
2164 |
+
"bundled": true,
|
2165 |
+
"dev": true,
|
2166 |
+
"optional": true
|
2167 |
+
},
|
2168 |
+
"qs": {
|
2169 |
+
"version": "6.4.0",
|
2170 |
+
"bundled": true,
|
2171 |
+
"dev": true,
|
2172 |
+
"optional": true
|
2173 |
+
},
|
2174 |
+
"rc": {
|
2175 |
+
"version": "1.2.1",
|
2176 |
+
"bundled": true,
|
2177 |
+
"dev": true,
|
2178 |
+
"optional": true,
|
2179 |
+
"requires": {
|
2180 |
+
"deep-extend": "0.4.2",
|
2181 |
+
"ini": "1.3.4",
|
2182 |
+
"minimist": "1.2.0",
|
2183 |
+
"strip-json-comments": "2.0.1"
|
2184 |
+
},
|
2185 |
+
"dependencies": {
|
2186 |
+
"minimist": {
|
2187 |
+
"version": "1.2.0",
|
2188 |
+
"bundled": true,
|
2189 |
+
"dev": true,
|
2190 |
+
"optional": true
|
2191 |
+
}
|
2192 |
+
}
|
2193 |
+
},
|
2194 |
+
"readable-stream": {
|
2195 |
+
"version": "2.2.9",
|
2196 |
+
"bundled": true,
|
2197 |
+
"dev": true,
|
2198 |
+
"requires": {
|
2199 |
+
"buffer-shims": "1.0.0",
|
2200 |
+
"core-util-is": "1.0.2",
|
2201 |
+
"inherits": "2.0.3",
|
2202 |
+
"isarray": "1.0.0",
|
2203 |
+
"process-nextick-args": "1.0.7",
|
2204 |
+
"string_decoder": "1.0.1",
|
2205 |
+
"util-deprecate": "1.0.2"
|
2206 |
+
}
|
2207 |
+
},
|
2208 |
+
"request": {
|
2209 |
+
"version": "2.81.0",
|
2210 |
+
"bundled": true,
|
2211 |
+
"dev": true,
|
2212 |
+
"optional": true,
|
2213 |
+
"requires": {
|
2214 |
+
"aws-sign2": "0.6.0",
|
2215 |
+
"aws4": "1.6.0",
|
2216 |
+
"caseless": "0.12.0",
|
2217 |
+
"combined-stream": "1.0.5",
|
2218 |
+
"extend": "3.0.1",
|
2219 |
+
"forever-agent": "0.6.1",
|
2220 |
+
"form-data": "2.1.4",
|
2221 |
+
"har-validator": "4.2.1",
|
2222 |
+
"hawk": "3.1.3",
|
2223 |
+
"http-signature": "1.1.1",
|
2224 |
+
"is-typedarray": "1.0.0",
|
2225 |
+
"isstream": "0.1.2",
|
2226 |
+
"json-stringify-safe": "5.0.1",
|
2227 |
+
"mime-types": "2.1.15",
|
2228 |
+
"oauth-sign": "0.8.2",
|
2229 |
+
"performance-now": "0.2.0",
|
2230 |
+
"qs": "6.4.0",
|
2231 |
+
"safe-buffer": "5.0.1",
|
2232 |
+
"stringstream": "0.0.5",
|
2233 |
+
"tough-cookie": "2.3.2",
|
2234 |
+
"tunnel-agent": "0.6.0",
|
2235 |
+
"uuid": "3.0.1"
|
2236 |
+
}
|
2237 |
+
},
|
2238 |
+
"rimraf": {
|
2239 |
+
"version": "2.6.1",
|
2240 |
+
"bundled": true,
|
2241 |
+
"dev": true,
|
2242 |
+
"requires": {
|
2243 |
+
"glob": "7.1.2"
|
2244 |
+
}
|
2245 |
+
},
|
2246 |
+
"safe-buffer": {
|
2247 |
+
"version": "5.0.1",
|
2248 |
+
"bundled": true,
|
2249 |
+
"dev": true
|
2250 |
+
},
|
2251 |
+
"semver": {
|
2252 |
+
"version": "5.3.0",
|
2253 |
+
"bundled": true,
|
2254 |
+
"dev": true,
|
2255 |
+
"optional": true
|
2256 |
+
},
|
2257 |
+
"set-blocking": {
|
2258 |
+
"version": "2.0.0",
|
2259 |
+
"bundled": true,
|
2260 |
+
"dev": true,
|
2261 |
+
"optional": true
|
2262 |
+
},
|
2263 |
+
"signal-exit": {
|
2264 |
+
"version": "3.0.2",
|
2265 |
+
"bundled": true,
|
2266 |
+
"dev": true,
|
2267 |
+
"optional": true
|
2268 |
+
},
|
2269 |
+
"sntp": {
|
2270 |
+
"version": "1.0.9",
|
2271 |
+
"bundled": true,
|
2272 |
+
"dev": true,
|
2273 |
+
"requires": {
|
2274 |
+
"hoek": "2.16.3"
|
2275 |
+
}
|
2276 |
+
},
|
2277 |
+
"sshpk": {
|
2278 |
+
"version": "1.13.0",
|
2279 |
+
"bundled": true,
|
2280 |
+
"dev": true,
|
2281 |
+
"optional": true,
|
2282 |
+
"requires": {
|
2283 |
+
"asn1": "0.2.3",
|
2284 |
+
"assert-plus": "1.0.0",
|
2285 |
+
"bcrypt-pbkdf": "1.0.1",
|
2286 |
+
"dashdash": "1.14.1",
|
2287 |
+
"ecc-jsbn": "0.1.1",
|
2288 |
+
"getpass": "0.1.7",
|
2289 |
+
"jodid25519": "1.0.2",
|
2290 |
+
"jsbn": "0.1.1",
|
2291 |
+
"tweetnacl": "0.14.5"
|
2292 |
+
},
|
2293 |
+
"dependencies": {
|
2294 |
+
"assert-plus": {
|
2295 |
+
"version": "1.0.0",
|
2296 |
+
"bundled": true,
|
2297 |
+
"dev": true,
|
2298 |
+
"optional": true
|
2299 |
+
}
|
2300 |
+
}
|
2301 |
+
},
|
2302 |
+
"string-width": {
|
2303 |
+
"version": "1.0.2",
|
2304 |
+
"bundled": true,
|
2305 |
+
"dev": true,
|
2306 |
+
"requires": {
|
2307 |
+
"code-point-at": "1.1.0",
|
2308 |
+
"is-fullwidth-code-point": "1.0.0",
|
2309 |
+
"strip-ansi": "3.0.1"
|
2310 |
+
}
|
2311 |
+
},
|
2312 |
+
"string_decoder": {
|
2313 |
+
"version": "1.0.1",
|
2314 |
+
"bundled": true,
|
2315 |
+
"dev": true,
|
2316 |
+
"requires": {
|
2317 |
+
"safe-buffer": "5.0.1"
|
2318 |
+
}
|
2319 |
+
},
|
2320 |
+
"stringstream": {
|
2321 |
+
"version": "0.0.5",
|
2322 |
+
"bundled": true,
|
2323 |
+
"dev": true,
|
2324 |
+
"optional": true
|
2325 |
+
},
|
2326 |
+
"strip-ansi": {
|
2327 |
+
"version": "3.0.1",
|
2328 |
+
"bundled": true,
|
2329 |
+
"dev": true,
|
2330 |
+
"requires": {
|
2331 |
+
"ansi-regex": "2.1.1"
|
2332 |
+
}
|
2333 |
+
},
|
2334 |
+
"strip-json-comments": {
|
2335 |
+
"version": "2.0.1",
|
2336 |
+
"bundled": true,
|
2337 |
+
"dev": true,
|
2338 |
+
"optional": true
|
2339 |
+
},
|
2340 |
+
"tar": {
|
2341 |
+
"version": "2.2.1",
|
2342 |
+
"bundled": true,
|
2343 |
+
"dev": true,
|
2344 |
+
"requires": {
|
2345 |
+
"block-stream": "0.0.9",
|
2346 |
+
"fstream": "1.0.11",
|
2347 |
+
"inherits": "2.0.3"
|
2348 |
+
}
|
2349 |
+
},
|
2350 |
+
"tar-pack": {
|
2351 |
+
"version": "3.4.0",
|
2352 |
+
"bundled": true,
|
2353 |
+
"dev": true,
|
2354 |
+
"optional": true,
|
2355 |
+
"requires": {
|
2356 |
+
"debug": "2.6.8",
|
2357 |
+
"fstream": "1.0.11",
|
2358 |
+
"fstream-ignore": "1.0.5",
|
2359 |
+
"once": "1.4.0",
|
2360 |
+
"readable-stream": "2.2.9",
|
2361 |
+
"rimraf": "2.6.1",
|
2362 |
+
"tar": "2.2.1",
|
2363 |
+
"uid-number": "0.0.6"
|
2364 |
+
}
|
2365 |
+
},
|
2366 |
+
"tough-cookie": {
|
2367 |
+
"version": "2.3.2",
|
2368 |
+
"bundled": true,
|
2369 |
+
"dev": true,
|
2370 |
+
"optional": true,
|
2371 |
+
"requires": {
|
2372 |
+
"punycode": "1.4.1"
|
2373 |
+
}
|
2374 |
+
},
|
2375 |
+
"tunnel-agent": {
|
2376 |
+
"version": "0.6.0",
|
2377 |
+
"bundled": true,
|
2378 |
+
"dev": true,
|
2379 |
+
"optional": true,
|
2380 |
+
"requires": {
|
2381 |
+
"safe-buffer": "5.0.1"
|
2382 |
+
}
|
2383 |
+
},
|
2384 |
+
"tweetnacl": {
|
2385 |
+
"version": "0.14.5",
|
2386 |
+
"bundled": true,
|
2387 |
+
"dev": true,
|
2388 |
+
"optional": true
|
2389 |
+
},
|
2390 |
+
"uid-number": {
|
2391 |
+
"version": "0.0.6",
|
2392 |
+
"bundled": true,
|
2393 |
+
"dev": true,
|
2394 |
+
"optional": true
|
2395 |
+
},
|
2396 |
+
"util-deprecate": {
|
2397 |
+
"version": "1.0.2",
|
2398 |
+
"bundled": true,
|
2399 |
+
"dev": true
|
2400 |
+
},
|
2401 |
+
"uuid": {
|
2402 |
+
"version": "3.0.1",
|
2403 |
+
"bundled": true,
|
2404 |
+
"dev": true,
|
2405 |
+
"optional": true
|
2406 |
+
},
|
2407 |
+
"verror": {
|
2408 |
+
"version": "1.3.6",
|
2409 |
+
"bundled": true,
|
2410 |
+
"dev": true,
|
2411 |
+
"optional": true,
|
2412 |
+
"requires": {
|
2413 |
+
"extsprintf": "1.0.2"
|
2414 |
+
}
|
2415 |
+
},
|
2416 |
+
"wide-align": {
|
2417 |
+
"version": "1.1.2",
|
2418 |
+
"bundled": true,
|
2419 |
+
"dev": true,
|
2420 |
+
"optional": true,
|
2421 |
+
"requires": {
|
2422 |
+
"string-width": "1.0.2"
|
2423 |
+
}
|
2424 |
+
},
|
2425 |
+
"wrappy": {
|
2426 |
+
"version": "1.0.2",
|
2427 |
+
"bundled": true,
|
2428 |
+
"dev": true
|
2429 |
+
}
|
2430 |
+
}
|
2431 |
+
},
|
2432 |
+
"get-caller-file": {
|
2433 |
+
"version": "1.0.2",
|
2434 |
+
"resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.2.tgz",
|
2435 |
+
"integrity": "sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U=",
|
2436 |
+
"dev": true
|
2437 |
+
},
|
2438 |
+
"get-stream": {
|
2439 |
+
"version": "3.0.0",
|
2440 |
+
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz",
|
2441 |
+
"integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=",
|
2442 |
+
"dev": true
|
2443 |
+
},
|
2444 |
+
"glob-base": {
|
2445 |
+
"version": "0.3.0",
|
2446 |
+
"resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz",
|
2447 |
+
"integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=",
|
2448 |
+
"dev": true,
|
2449 |
+
"requires": {
|
2450 |
+
"glob-parent": "2.0.0",
|
2451 |
+
"is-glob": "2.0.1"
|
2452 |
+
}
|
2453 |
+
},
|
2454 |
+
"glob-parent": {
|
2455 |
+
"version": "2.0.0",
|
2456 |
+
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz",
|
2457 |
+
"integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=",
|
2458 |
+
"dev": true,
|
2459 |
+
"requires": {
|
2460 |
+
"is-glob": "2.0.1"
|
2461 |
+
}
|
2462 |
+
},
|
2463 |
+
"globals": {
|
2464 |
+
"version": "9.18.0",
|
2465 |
+
"resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz",
|
2466 |
+
"integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==",
|
2467 |
+
"dev": true
|
2468 |
+
},
|
2469 |
+
"graceful-fs": {
|
2470 |
+
"version": "4.1.11",
|
2471 |
+
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz",
|
2472 |
+
"integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=",
|
2473 |
+
"dev": true
|
2474 |
+
},
|
2475 |
+
"has-ansi": {
|
2476 |
+
"version": "2.0.0",
|
2477 |
+
"resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
|
2478 |
+
"integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=",
|
2479 |
+
"dev": true,
|
2480 |
+
"requires": {
|
2481 |
+
"ansi-regex": "2.1.1"
|
2482 |
+
}
|
2483 |
+
},
|
2484 |
+
"has-flag": {
|
2485 |
+
"version": "2.0.0",
|
2486 |
+
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz",
|
2487 |
+
"integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=",
|
2488 |
+
"dev": true
|
2489 |
+
},
|
2490 |
+
"hash-base": {
|
2491 |
+
"version": "2.0.2",
|
2492 |
+
"resolved": "https://registry.npmjs.org/hash-base/-/hash-base-2.0.2.tgz",
|
2493 |
+
"integrity": "sha1-ZuodhW206KVHDK32/OI65SRO8uE=",
|
2494 |
+
"dev": true,
|
2495 |
+
"requires": {
|
2496 |
+
"inherits": "2.0.3"
|
2497 |
+
}
|
2498 |
+
},
|
2499 |
+
"hash.js": {
|
2500 |
+
"version": "1.1.3",
|
2501 |
+
"resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz",
|
2502 |
+
"integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==",
|
2503 |
+
"dev": true,
|
2504 |
+
"requires": {
|
2505 |
+
"inherits": "2.0.3",
|
2506 |
+
"minimalistic-assert": "1.0.0"
|
2507 |
+
}
|
2508 |
+
},
|
2509 |
+
"hmac-drbg": {
|
2510 |
+
"version": "1.0.1",
|
2511 |
+
"resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz",
|
2512 |
+
"integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=",
|
2513 |
+
"dev": true,
|
2514 |
+
"requires": {
|
2515 |
+
"hash.js": "1.1.3",
|
2516 |
+
"minimalistic-assert": "1.0.0",
|
2517 |
+
"minimalistic-crypto-utils": "1.0.1"
|
2518 |
+
}
|
2519 |
+
},
|
2520 |
+
"home-or-tmp": {
|
2521 |
+
"version": "2.0.0",
|
2522 |
+
"resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz",
|
2523 |
+
"integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=",
|
2524 |
+
"dev": true,
|
2525 |
+
"requires": {
|
2526 |
+
"os-homedir": "1.0.2",
|
2527 |
+
"os-tmpdir": "1.0.2"
|
2528 |
+
}
|
2529 |
+
},
|
2530 |
+
"hosted-git-info": {
|
2531 |
+
"version": "2.5.0",
|
2532 |
+
"resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.5.0.tgz",
|
2533 |
+
"integrity": "sha512-pNgbURSuab90KbTqvRPsseaTxOJCZBD0a7t+haSN33piP9cCM4l0CqdzAif2hUqm716UovKB2ROmiabGAKVXyg==",
|
2534 |
+
"dev": true
|
2535 |
+
},
|
2536 |
+
"https-browserify": {
|
2537 |
+
"version": "1.0.0",
|
2538 |
+
"resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz",
|
2539 |
+
"integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=",
|
2540 |
+
"dev": true
|
2541 |
+
},
|
2542 |
+
"ieee754": {
|
2543 |
+
"version": "1.1.8",
|
2544 |
+
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.8.tgz",
|
2545 |
+
"integrity": "sha1-vjPUCsEO8ZJnAfbwii2G+/0a0+Q=",
|
2546 |
+
"dev": true
|
2547 |
+
},
|
2548 |
+
"indexof": {
|
2549 |
+
"version": "0.0.1",
|
2550 |
+
"resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz",
|
2551 |
+
"integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=",
|
2552 |
+
"dev": true
|
2553 |
+
},
|
2554 |
+
"inherits": {
|
2555 |
+
"version": "2.0.3",
|
2556 |
+
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
|
2557 |
+
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
|
2558 |
+
"dev": true
|
2559 |
+
},
|
2560 |
+
"interpret": {
|
2561 |
+
"version": "1.1.0",
|
2562 |
+
"resolved": "https://registry.npmjs.org/interpret/-/interpret-1.1.0.tgz",
|
2563 |
+
"integrity": "sha1-ftGxQQxqDg94z5XTuEQMY/eLhhQ=",
|
2564 |
+
"dev": true
|
2565 |
+
},
|
2566 |
+
"invariant": {
|
2567 |
+
"version": "2.2.2",
|
2568 |
+
"resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.2.tgz",
|
2569 |
+
"integrity": "sha1-nh9WrArNtr8wMwbzOL47IErmA2A=",
|
2570 |
+
"dev": true,
|
2571 |
+
"requires": {
|
2572 |
+
"loose-envify": "1.3.1"
|
2573 |
+
}
|
2574 |
+
},
|
2575 |
+
"invert-kv": {
|
2576 |
+
"version": "1.0.0",
|
2577 |
+
"resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz",
|
2578 |
+
"integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=",
|
2579 |
+
"dev": true
|
2580 |
+
},
|
2581 |
+
"is-arrayish": {
|
2582 |
+
"version": "0.2.1",
|
2583 |
+
"resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
|
2584 |
+
"integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=",
|
2585 |
+
"dev": true
|
2586 |
+
},
|
2587 |
+
"is-binary-path": {
|
2588 |
+
"version": "1.0.1",
|
2589 |
+
"resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz",
|
2590 |
+
"integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=",
|
2591 |
+
"dev": true,
|
2592 |
+
"requires": {
|
2593 |
+
"binary-extensions": "1.11.0"
|
2594 |
+
}
|
2595 |
+
},
|
2596 |
+
"is-buffer": {
|
2597 |
+
"version": "1.1.6",
|
2598 |
+
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
|
2599 |
+
"integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==",
|
2600 |
+
"dev": true
|
2601 |
+
},
|
2602 |
+
"is-builtin-module": {
|
2603 |
+
"version": "1.0.0",
|
2604 |
+
"resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz",
|
2605 |
+
"integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=",
|
2606 |
+
"dev": true,
|
2607 |
+
"requires": {
|
2608 |
+
"builtin-modules": "1.1.1"
|
2609 |
+
}
|
2610 |
+
},
|
2611 |
+
"is-dotfile": {
|
2612 |
+
"version": "1.0.3",
|
2613 |
+
"resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz",
|
2614 |
+
"integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=",
|
2615 |
+
"dev": true
|
2616 |
+
},
|
2617 |
+
"is-equal-shallow": {
|
2618 |
+
"version": "0.1.3",
|
2619 |
+
"resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz",
|
2620 |
+
"integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=",
|
2621 |
+
"dev": true,
|
2622 |
+
"requires": {
|
2623 |
+
"is-primitive": "2.0.0"
|
2624 |
+
}
|
2625 |
+
},
|
2626 |
+
"is-extendable": {
|
2627 |
+
"version": "0.1.1",
|
2628 |
+
"resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz",
|
2629 |
+
"integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=",
|
2630 |
+
"dev": true
|
2631 |
+
},
|
2632 |
+
"is-extglob": {
|
2633 |
+
"version": "1.0.0",
|
2634 |
+
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz",
|
2635 |
+
"integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=",
|
2636 |
+
"dev": true
|
2637 |
+
},
|
2638 |
+
"is-finite": {
|
2639 |
+
"version": "1.0.2",
|
2640 |
+
"resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz",
|
2641 |
+
"integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=",
|
2642 |
+
"dev": true,
|
2643 |
+
"requires": {
|
2644 |
+
"number-is-nan": "1.0.1"
|
2645 |
+
}
|
2646 |
+
},
|
2647 |
+
"is-fullwidth-code-point": {
|
2648 |
+
"version": "1.0.0",
|
2649 |
+
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
|
2650 |
+
"integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
|
2651 |
+
"dev": true,
|
2652 |
+
"requires": {
|
2653 |
+
"number-is-nan": "1.0.1"
|
2654 |
+
}
|
2655 |
+
},
|
2656 |
+
"is-glob": {
|
2657 |
+
"version": "2.0.1",
|
2658 |
+
"resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz",
|
2659 |
+
"integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=",
|
2660 |
+
"dev": true,
|
2661 |
+
"requires": {
|
2662 |
+
"is-extglob": "1.0.0"
|
2663 |
+
}
|
2664 |
+
},
|
2665 |
+
"is-number": {
|
2666 |
+
"version": "2.1.0",
|
2667 |
+
"resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz",
|
2668 |
+
"integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=",
|
2669 |
+
"dev": true,
|
2670 |
+
"requires": {
|
2671 |
+
"kind-of": "3.2.2"
|
2672 |
+
}
|
2673 |
+
},
|
2674 |
+
"is-posix-bracket": {
|
2675 |
+
"version": "0.1.1",
|
2676 |
+
"resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz",
|
2677 |
+
"integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=",
|
2678 |
+
"dev": true
|
2679 |
+
},
|
2680 |
+
"is-primitive": {
|
2681 |
+
"version": "2.0.0",
|
2682 |
+
"resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz",
|
2683 |
+
"integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=",
|
2684 |
+
"dev": true
|
2685 |
+
},
|
2686 |
+
"is-stream": {
|
2687 |
+
"version": "1.1.0",
|
2688 |
+
"resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz",
|
2689 |
+
"integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=",
|
2690 |
+
"dev": true
|
2691 |
+
},
|
2692 |
+
"is-windows": {
|
2693 |
+
"version": "1.0.1",
|
2694 |
+
"resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.1.tgz",
|
2695 |
+
"integrity": "sha1-MQ23D3QtJZoWo2kgK1GvhCMzENk=",
|
2696 |
+
"dev": true
|
2697 |
+
},
|
2698 |
+
"isarray": {
|
2699 |
+
"version": "1.0.0",
|
2700 |
+
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
|
2701 |
+
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
|
2702 |
+
"dev": true
|
2703 |
+
},
|
2704 |
+
"isexe": {
|
2705 |
+
"version": "2.0.0",
|
2706 |
+
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
|
2707 |
+
"integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=",
|
2708 |
+
"dev": true
|
2709 |
+
},
|
2710 |
+
"isobject": {
|
2711 |
+
"version": "2.1.0",
|
2712 |
+
"resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz",
|
2713 |
+
"integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=",
|
2714 |
+
"dev": true,
|
2715 |
+
"requires": {
|
2716 |
+
"isarray": "1.0.0"
|
2717 |
+
}
|
2718 |
+
},
|
2719 |
+
"js-tokens": {
|
2720 |
+
"version": "3.0.2",
|
2721 |
+
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz",
|
2722 |
+
"integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=",
|
2723 |
+
"dev": true
|
2724 |
+
},
|
2725 |
+
"jsesc": {
|
2726 |
+
"version": "1.3.0",
|
2727 |
+
"resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz",
|
2728 |
+
"integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=",
|
2729 |
+
"dev": true
|
2730 |
+
},
|
2731 |
+
"json-loader": {
|
2732 |
+
"version": "0.5.7",
|
2733 |
+
"resolved": "https://registry.npmjs.org/json-loader/-/json-loader-0.5.7.tgz",
|
2734 |
+
"integrity": "sha512-QLPs8Dj7lnf3e3QYS1zkCo+4ZwqOiF9d/nZnYozTISxXWCfNs9yuky5rJw4/W34s7POaNlbZmQGaB5NiXCbP4w==",
|
2735 |
+
"dev": true
|
2736 |
+
},
|
2737 |
+
"json-schema-traverse": {
|
2738 |
+
"version": "0.3.1",
|
2739 |
+
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz",
|
2740 |
+
"integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=",
|
2741 |
+
"dev": true
|
2742 |
+
},
|
2743 |
+
"json5": {
|
2744 |
+
"version": "0.5.1",
|
2745 |
+
"resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz",
|
2746 |
+
"integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=",
|
2747 |
+
"dev": true
|
2748 |
+
},
|
2749 |
+
"kind-of": {
|
2750 |
+
"version": "3.2.2",
|
2751 |
+
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
|
2752 |
+
"integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
|
2753 |
+
"dev": true,
|
2754 |
+
"requires": {
|
2755 |
+
"is-buffer": "1.1.6"
|
2756 |
+
}
|
2757 |
+
},
|
2758 |
+
"lazy-cache": {
|
2759 |
+
"version": "1.0.4",
|
2760 |
+
"resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz",
|
2761 |
+
"integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=",
|
2762 |
+
"dev": true
|
2763 |
+
},
|
2764 |
+
"lcid": {
|
2765 |
+
"version": "1.0.0",
|
2766 |
+
"resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz",
|
2767 |
+
"integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=",
|
2768 |
+
"dev": true,
|
2769 |
+
"requires": {
|
2770 |
+
"invert-kv": "1.0.0"
|
2771 |
+
}
|
2772 |
+
},
|
2773 |
+
"load-json-file": {
|
2774 |
+
"version": "2.0.0",
|
2775 |
+
"resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz",
|
2776 |
+
"integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=",
|
2777 |
+
"dev": true,
|
2778 |
+
"requires": {
|
2779 |
+
"graceful-fs": "4.1.11",
|
2780 |
+
"parse-json": "2.2.0",
|
2781 |
+
"pify": "2.3.0",
|
2782 |
+
"strip-bom": "3.0.0"
|
2783 |
+
},
|
2784 |
+
"dependencies": {
|
2785 |
+
"pify": {
|
2786 |
+
"version": "2.3.0",
|
2787 |
+
"resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
|
2788 |
+
"integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
|
2789 |
+
"dev": true
|
2790 |
+
}
|
2791 |
+
}
|
2792 |
+
},
|
2793 |
+
"loader-runner": {
|
2794 |
+
"version": "2.3.0",
|
2795 |
+
"resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.3.0.tgz",
|
2796 |
+
"integrity": "sha1-9IKuqC1UPgeSFwDVpG7yb9rGuKI=",
|
2797 |
+
"dev": true
|
2798 |
+
},
|
2799 |
+
"loader-utils": {
|
2800 |
+
"version": "1.1.0",
|
2801 |
+
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz",
|
2802 |
+
"integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=",
|
2803 |
+
"dev": true,
|
2804 |
+
"requires": {
|
2805 |
+
"big.js": "3.2.0",
|
2806 |
+
"emojis-list": "2.1.0",
|
2807 |
+
"json5": "0.5.1"
|
2808 |
+
}
|
2809 |
+
},
|
2810 |
+
"locate-path": {
|
2811 |
+
"version": "2.0.0",
|
2812 |
+
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz",
|
2813 |
+
"integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=",
|
2814 |
+
"dev": true,
|
2815 |
+
"requires": {
|
2816 |
+
"p-locate": "2.0.0",
|
2817 |
+
"path-exists": "3.0.0"
|
2818 |
+
}
|
2819 |
+
},
|
2820 |
+
"lodash": {
|
2821 |
+
"version": "4.17.4",
|
2822 |
+
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz",
|
2823 |
+
"integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=",
|
2824 |
+
"dev": true
|
2825 |
+
},
|
2826 |
+
"longest": {
|
2827 |
+
"version": "1.0.1",
|
2828 |
+
"resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz",
|
2829 |
+
"integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=",
|
2830 |
+
"dev": true
|
2831 |
+
},
|
2832 |
+
"loose-envify": {
|
2833 |
+
"version": "1.3.1",
|
2834 |
+
"resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz",
|
2835 |
+
"integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=",
|
2836 |
+
"dev": true,
|
2837 |
+
"requires": {
|
2838 |
+
"js-tokens": "3.0.2"
|
2839 |
+
}
|
2840 |
+
},
|
2841 |
+
"lru-cache": {
|
2842 |
+
"version": "4.1.1",
|
2843 |
+
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.1.tgz",
|
2844 |
+
"integrity": "sha512-q4spe4KTfsAS1SUHLO0wz8Qiyf1+vMIAgpRYioFYDMNqKfHQbg+AVDH3i4fvpl71/P1L0dBl+fQi+P37UYf0ew==",
|
2845 |
+
"dev": true,
|
2846 |
+
"requires": {
|
2847 |
+
"pseudomap": "1.0.2",
|
2848 |
+
"yallist": "2.1.2"
|
2849 |
+
}
|
2850 |
+
},
|
2851 |
+
"make-dir": {
|
2852 |
+
"version": "1.1.0",
|
2853 |
+
"resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.1.0.tgz",
|
2854 |
+
"integrity": "sha512-0Pkui4wLJ7rxvmfUvs87skoEaxmu0hCUApF8nonzpl7q//FWp9zu8W61Scz4sd/kUiqDxvUhtoam2efDyiBzcA==",
|
2855 |
+
"dev": true,
|
2856 |
+
"requires": {
|
2857 |
+
"pify": "3.0.0"
|
2858 |
+
}
|
2859 |
+
},
|
2860 |
+
"md5.js": {
|
2861 |
+
"version": "1.3.4",
|
2862 |
+
"resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.4.tgz",
|
2863 |
+
"integrity": "sha1-6b296UogpawYsENA/Fdk1bCdkB0=",
|
2864 |
+
"dev": true,
|
2865 |
+
"requires": {
|
2866 |
+
"hash-base": "3.0.4",
|
2867 |
+
"inherits": "2.0.3"
|
2868 |
+
},
|
2869 |
+
"dependencies": {
|
2870 |
+
"hash-base": {
|
2871 |
+
"version": "3.0.4",
|
2872 |
+
"resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz",
|
2873 |
+
"integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=",
|
2874 |
+
"dev": true,
|
2875 |
+
"requires": {
|
2876 |
+
"inherits": "2.0.3",
|
2877 |
+
"safe-buffer": "5.1.1"
|
2878 |
+
}
|
2879 |
+
}
|
2880 |
+
}
|
2881 |
+
},
|
2882 |
+
"mem": {
|
2883 |
+
"version": "1.1.0",
|
2884 |
+
"resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz",
|
2885 |
+
"integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=",
|
2886 |
+
"dev": true,
|
2887 |
+
"requires": {
|
2888 |
+
"mimic-fn": "1.1.0"
|
2889 |
+
}
|
2890 |
+
},
|
2891 |
+
"memory-fs": {
|
2892 |
+
"version": "0.4.1",
|
2893 |
+
"resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz",
|
2894 |
+
"integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=",
|
2895 |
+
"dev": true,
|
2896 |
+
"requires": {
|
2897 |
+
"errno": "0.1.6",
|
2898 |
+
"readable-stream": "2.3.3"
|
2899 |
+
}
|
2900 |
+
},
|
2901 |
+
"micromatch": {
|
2902 |
+
"version": "2.3.11",
|
2903 |
+
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz",
|
2904 |
+
"integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=",
|
2905 |
+
"dev": true,
|
2906 |
+
"requires": {
|
2907 |
+
"arr-diff": "2.0.0",
|
2908 |
+
"array-unique": "0.2.1",
|
2909 |
+
"braces": "1.8.5",
|
2910 |
+
"expand-brackets": "0.1.5",
|
2911 |
+
"extglob": "0.3.2",
|
2912 |
+
"filename-regex": "2.0.1",
|
2913 |
+
"is-extglob": "1.0.0",
|
2914 |
+
"is-glob": "2.0.1",
|
2915 |
+
"kind-of": "3.2.2",
|
2916 |
+
"normalize-path": "2.1.1",
|
2917 |
+
"object.omit": "2.0.1",
|
2918 |
+
"parse-glob": "3.0.4",
|
2919 |
+
"regex-cache": "0.4.4"
|
2920 |
+
}
|
2921 |
+
},
|
2922 |
+
"miller-rabin": {
|
2923 |
+
"version": "4.0.1",
|
2924 |
+
"resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz",
|
2925 |
+
"integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==",
|
2926 |
+
"dev": true,
|
2927 |
+
"requires": {
|
2928 |
+
"bn.js": "4.11.8",
|
2929 |
+
"brorand": "1.1.0"
|
2930 |
+
}
|
2931 |
+
},
|
2932 |
+
"mimic-fn": {
|
2933 |
+
"version": "1.1.0",
|
2934 |
+
"resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.1.0.tgz",
|
2935 |
+
"integrity": "sha1-5md4PZLonb00KBi1IwudYqZyrRg=",
|
2936 |
+
"dev": true
|
2937 |
+
},
|
2938 |
+
"minimalistic-assert": {
|
2939 |
+
"version": "1.0.0",
|
2940 |
+
"resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz",
|
2941 |
+
"integrity": "sha1-cCvi3aazf0g2vLP121ZkG2Sh09M=",
|
2942 |
+
"dev": true
|
2943 |
+
},
|
2944 |
+
"minimalistic-crypto-utils": {
|
2945 |
+
"version": "1.0.1",
|
2946 |
+
"resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz",
|
2947 |
+
"integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=",
|
2948 |
+
"dev": true
|
2949 |
+
},
|
2950 |
+
"minimatch": {
|
2951 |
+
"version": "3.0.4",
|
2952 |
+
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
|
2953 |
+
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
|
2954 |
+
"dev": true,
|
2955 |
+
"requires": {
|
2956 |
+
"brace-expansion": "1.1.8"
|
2957 |
+
}
|
2958 |
+
},
|
2959 |
+
"minimist": {
|
2960 |
+
"version": "0.0.8",
|
2961 |
+
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
|
2962 |
+
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
|
2963 |
+
"dev": true
|
2964 |
+
},
|
2965 |
+
"mkdirp": {
|
2966 |
+
"version": "0.5.1",
|
2967 |
+
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
|
2968 |
+
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
|
2969 |
+
"dev": true,
|
2970 |
+
"requires": {
|
2971 |
+
"minimist": "0.0.8"
|
2972 |
+
}
|
2973 |
+
},
|
2974 |
+
"ms": {
|
2975 |
+
"version": "2.0.0",
|
2976 |
+
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
2977 |
+
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
|
2978 |
+
"dev": true
|
2979 |
+
},
|
2980 |
+
"nan": {
|
2981 |
+
"version": "2.8.0",
|
2982 |
+
"resolved": "https://registry.npmjs.org/nan/-/nan-2.8.0.tgz",
|
2983 |
+
"integrity": "sha1-7XFfP+neArV6XmJS2QqWZ14fCFo=",
|
2984 |
+
"dev": true,
|
2985 |
+
"optional": true
|
2986 |
+
},
|
2987 |
+
"node-libs-browser": {
|
2988 |
+
"version": "2.1.0",
|
2989 |
+
"resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.1.0.tgz",
|
2990 |
+
"integrity": "sha512-5AzFzdoIMb89hBGMZglEegffzgRg+ZFoUmisQ8HI4j1KDdpx13J0taNp2y9xPbur6W61gepGDDotGBVQ7mfUCg==",
|
2991 |
+
"dev": true,
|
2992 |
+
"requires": {
|
2993 |
+
"assert": "1.4.1",
|
2994 |
+
"browserify-zlib": "0.2.0",
|
2995 |
+
"buffer": "4.9.1",
|
2996 |
+
"console-browserify": "1.1.0",
|
2997 |
+
"constants-browserify": "1.0.0",
|
2998 |
+
"crypto-browserify": "3.12.0",
|
2999 |
+
"domain-browser": "1.1.7",
|
3000 |
+
"events": "1.1.1",
|
3001 |
+
"https-browserify": "1.0.0",
|
3002 |
+
"os-browserify": "0.3.0",
|
3003 |
+
"path-browserify": "0.0.0",
|
3004 |
+
"process": "0.11.10",
|
3005 |
+
"punycode": "1.4.1",
|
3006 |
+
"querystring-es3": "0.2.1",
|
3007 |
+
"readable-stream": "2.3.3",
|
3008 |
+
"stream-browserify": "2.0.1",
|
3009 |
+
"stream-http": "2.7.2",
|
3010 |
+
"string_decoder": "1.0.3",
|
3011 |
+
"timers-browserify": "2.0.4",
|
3012 |
+
"tty-browserify": "0.0.0",
|
3013 |
+
"url": "0.11.0",
|
3014 |
+
"util": "0.10.3",
|
3015 |
+
"vm-browserify": "0.0.4"
|
3016 |
+
}
|
3017 |
+
},
|
3018 |
+
"normalize-package-data": {
|
3019 |
+
"version": "2.4.0",
|
3020 |
+
"resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz",
|
3021 |
+
"integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==",
|
3022 |
+
"dev": true,
|
3023 |
+
"requires": {
|
3024 |
+
"hosted-git-info": "2.5.0",
|
3025 |
+
"is-builtin-module": "1.0.0",
|
3026 |
+
"semver": "5.4.1",
|
3027 |
+
"validate-npm-package-license": "3.0.1"
|
3028 |
+
}
|
3029 |
+
},
|
3030 |
+
"normalize-path": {
|
3031 |
+
"version": "2.1.1",
|
3032 |
+
"resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz",
|
3033 |
+
"integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=",
|
3034 |
+
"dev": true,
|
3035 |
+
"requires": {
|
3036 |
+
"remove-trailing-separator": "1.1.0"
|
3037 |
+
}
|
3038 |
+
},
|
3039 |
+
"npm-run-path": {
|
3040 |
+
"version": "2.0.2",
|
3041 |
+
"resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz",
|
3042 |
+
"integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=",
|
3043 |
+
"dev": true,
|
3044 |
+
"requires": {
|
3045 |
+
"path-key": "2.0.1"
|
3046 |
+
}
|
3047 |
+
},
|
3048 |
+
"number-is-nan": {
|
3049 |
+
"version": "1.0.1",
|
3050 |
+
"resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
|
3051 |
+
"integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=",
|
3052 |
+
"dev": true
|
3053 |
+
},
|
3054 |
+
"object-assign": {
|
3055 |
+
"version": "4.1.1",
|
3056 |
+
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
|
3057 |
+
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
|
3058 |
+
"dev": true
|
3059 |
+
},
|
3060 |
+
"object.omit": {
|
3061 |
+
"version": "2.0.1",
|
3062 |
+
"resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz",
|
3063 |
+
"integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=",
|
3064 |
+
"dev": true,
|
3065 |
+
"requires": {
|
3066 |
+
"for-own": "0.1.5",
|
3067 |
+
"is-extendable": "0.1.1"
|
3068 |
+
}
|
3069 |
+
},
|
3070 |
+
"os-browserify": {
|
3071 |
+
"version": "0.3.0",
|
3072 |
+
"resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz",
|
3073 |
+
"integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=",
|
3074 |
+
"dev": true
|
3075 |
+
},
|
3076 |
+
"os-homedir": {
|
3077 |
+
"version": "1.0.2",
|
3078 |
+
"resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
|
3079 |
+
"integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=",
|
3080 |
+
"dev": true
|
3081 |
+
},
|
3082 |
+
"os-locale": {
|
3083 |
+
"version": "2.1.0",
|
3084 |
+
"resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz",
|
3085 |
+
"integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==",
|
3086 |
+
"dev": true,
|
3087 |
+
"requires": {
|
3088 |
+
"execa": "0.7.0",
|
3089 |
+
"lcid": "1.0.0",
|
3090 |
+
"mem": "1.1.0"
|
3091 |
+
}
|
3092 |
+
},
|
3093 |
+
"os-tmpdir": {
|
3094 |
+
"version": "1.0.2",
|
3095 |
+
"resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
|
3096 |
+
"integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=",
|
3097 |
+
"dev": true
|
3098 |
+
},
|
3099 |
+
"p-finally": {
|
3100 |
+
"version": "1.0.0",
|
3101 |
+
"resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz",
|
3102 |
+
"integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=",
|
3103 |
+
"dev": true
|
3104 |
+
},
|
3105 |
+
"p-limit": {
|
3106 |
+
"version": "1.1.0",
|
3107 |
+
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.1.0.tgz",
|
3108 |
+
"integrity": "sha1-sH/y2aXYi+yAYDWJWiurZqJ5iLw=",
|
3109 |
+
"dev": true
|
3110 |
+
},
|
3111 |
+
"p-locate": {
|
3112 |
+
"version": "2.0.0",
|
3113 |
+
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz",
|
3114 |
+
"integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=",
|
3115 |
+
"dev": true,
|
3116 |
+
"requires": {
|
3117 |
+
"p-limit": "1.1.0"
|
3118 |
+
}
|
3119 |
+
},
|
3120 |
+
"pako": {
|
3121 |
+
"version": "1.0.6",
|
3122 |
+
"resolved": "https://registry.npmjs.org/pako/-/pako-1.0.6.tgz",
|
3123 |
+
"integrity": "sha512-lQe48YPsMJAig+yngZ87Lus+NF+3mtu7DVOBu6b/gHO1YpKwIj5AWjZ/TOS7i46HD/UixzWb1zeWDZfGZ3iYcg==",
|
3124 |
+
"dev": true
|
3125 |
+
},
|
3126 |
+
"parse-asn1": {
|
3127 |
+
"version": "5.1.0",
|
3128 |
+
"resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.0.tgz",
|
3129 |
+
"integrity": "sha1-N8T5t+06tlx0gXtfJICTf7+XxxI=",
|
3130 |
+
"dev": true,
|
3131 |
+
"requires": {
|
3132 |
+
"asn1.js": "4.9.2",
|
3133 |
+
"browserify-aes": "1.1.1",
|
3134 |
+
"create-hash": "1.1.3",
|
3135 |
+
"evp_bytestokey": "1.0.3",
|
3136 |
+
"pbkdf2": "3.0.14"
|
3137 |
+
}
|
3138 |
+
},
|
3139 |
+
"parse-glob": {
|
3140 |
+
"version": "3.0.4",
|
3141 |
+
"resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz",
|
3142 |
+
"integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=",
|
3143 |
+
"dev": true,
|
3144 |
+
"requires": {
|
3145 |
+
"glob-base": "0.3.0",
|
3146 |
+
"is-dotfile": "1.0.3",
|
3147 |
+
"is-extglob": "1.0.0",
|
3148 |
+
"is-glob": "2.0.1"
|
3149 |
+
}
|
3150 |
+
},
|
3151 |
+
"parse-json": {
|
3152 |
+
"version": "2.2.0",
|
3153 |
+
"resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz",
|
3154 |
+
"integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=",
|
3155 |
+
"dev": true,
|
3156 |
+
"requires": {
|
3157 |
+
"error-ex": "1.3.1"
|
3158 |
+
}
|
3159 |
+
},
|
3160 |
+
"path-browserify": {
|
3161 |
+
"version": "0.0.0",
|
3162 |
+
"resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz",
|
3163 |
+
"integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=",
|
3164 |
+
"dev": true
|
3165 |
+
},
|
3166 |
+
"path-exists": {
|
3167 |
+
"version": "3.0.0",
|
3168 |
+
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
|
3169 |
+
"integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=",
|
3170 |
+
"dev": true
|
3171 |
+
},
|
3172 |
+
"path-is-absolute": {
|
3173 |
+
"version": "1.0.1",
|
3174 |
+
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
|
3175 |
+
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
|
3176 |
+
"dev": true
|
3177 |
+
},
|
3178 |
+
"path-key": {
|
3179 |
+
"version": "2.0.1",
|
3180 |
+
"resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz",
|
3181 |
+
"integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=",
|
3182 |
+
"dev": true
|
3183 |
+
},
|
3184 |
+
"path-type": {
|
3185 |
+
"version": "2.0.0",
|
3186 |
+
"resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz",
|
3187 |
+
"integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=",
|
3188 |
+
"dev": true,
|
3189 |
+
"requires": {
|
3190 |
+
"pify": "2.3.0"
|
3191 |
+
},
|
3192 |
+
"dependencies": {
|
3193 |
+
"pify": {
|
3194 |
+
"version": "2.3.0",
|
3195 |
+
"resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
|
3196 |
+
"integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
|
3197 |
+
"dev": true
|
3198 |
+
}
|
3199 |
+
}
|
3200 |
+
},
|
3201 |
+
"pbkdf2": {
|
3202 |
+
"version": "3.0.14",
|
3203 |
+
"resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.14.tgz",
|
3204 |
+
"integrity": "sha512-gjsZW9O34fm0R7PaLHRJmLLVfSoesxztjPjE9o6R+qtVJij90ltg1joIovN9GKrRW3t1PzhDDG3UMEMFfZ+1wA==",
|
3205 |
+
"dev": true,
|
3206 |
+
"requires": {
|
3207 |
+
"create-hash": "1.1.3",
|
3208 |
+
"create-hmac": "1.1.6",
|
3209 |
+
"ripemd160": "2.0.1",
|
3210 |
+
"safe-buffer": "5.1.1",
|
3211 |
+
"sha.js": "2.4.9"
|
3212 |
+
}
|
3213 |
+
},
|
3214 |
+
"pify": {
|
3215 |
+
"version": "3.0.0",
|
3216 |
+
"resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
|
3217 |
+
"integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=",
|
3218 |
+
"dev": true
|
3219 |
+
},
|
3220 |
+
"pkg-dir": {
|
3221 |
+
"version": "2.0.0",
|
3222 |
+
"resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz",
|
3223 |
+
"integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=",
|
3224 |
+
"dev": true,
|
3225 |
+
"requires": {
|
3226 |
+
"find-up": "2.1.0"
|
3227 |
+
}
|
3228 |
+
},
|
3229 |
+
"preserve": {
|
3230 |
+
"version": "0.2.0",
|
3231 |
+
"resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz",
|
3232 |
+
"integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=",
|
3233 |
+
"dev": true
|
3234 |
+
},
|
3235 |
+
"private": {
|
3236 |
+
"version": "0.1.8",
|
3237 |
+
"resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz",
|
3238 |
+
"integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==",
|
3239 |
+
"dev": true
|
3240 |
+
},
|
3241 |
+
"process": {
|
3242 |
+
"version": "0.11.10",
|
3243 |
+
"resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
|
3244 |
+
"integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=",
|
3245 |
+
"dev": true
|
3246 |
+
},
|
3247 |
+
"process-nextick-args": {
|
3248 |
+
"version": "1.0.7",
|
3249 |
+
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz",
|
3250 |
+
"integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=",
|
3251 |
+
"dev": true
|
3252 |
+
},
|
3253 |
+
"prr": {
|
3254 |
+
"version": "1.0.1",
|
3255 |
+
"resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz",
|
3256 |
+
"integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=",
|
3257 |
+
"dev": true
|
3258 |
+
},
|
3259 |
+
"pseudomap": {
|
3260 |
+
"version": "1.0.2",
|
3261 |
+
"resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz",
|
3262 |
+
"integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=",
|
3263 |
+
"dev": true
|
3264 |
+
},
|
3265 |
+
"public-encrypt": {
|
3266 |
+
"version": "4.0.0",
|
3267 |
+
"resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.0.tgz",
|
3268 |
+
"integrity": "sha1-OfaZ86RlYN1eusvKaTyvfGXBjMY=",
|
3269 |
+
"dev": true,
|
3270 |
+
"requires": {
|
3271 |
+
"bn.js": "4.11.8",
|
3272 |
+
"browserify-rsa": "4.0.1",
|
3273 |
+
"create-hash": "1.1.3",
|
3274 |
+
"parse-asn1": "5.1.0",
|
3275 |
+
"randombytes": "2.0.5"
|
3276 |
+
}
|
3277 |
+
},
|
3278 |
+
"punycode": {
|
3279 |
+
"version": "1.4.1",
|
3280 |
+
"resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz",
|
3281 |
+
"integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=",
|
3282 |
+
"dev": true
|
3283 |
+
},
|
3284 |
+
"querystring": {
|
3285 |
+
"version": "0.2.0",
|
3286 |
+
"resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz",
|
3287 |
+
"integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=",
|
3288 |
+
"dev": true
|
3289 |
+
},
|
3290 |
+
"querystring-es3": {
|
3291 |
+
"version": "0.2.1",
|
3292 |
+
"resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz",
|
3293 |
+
"integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=",
|
3294 |
+
"dev": true
|
3295 |
+
},
|
3296 |
+
"randomatic": {
|
3297 |
+
"version": "1.1.7",
|
3298 |
+
"resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.7.tgz",
|
3299 |
+
"integrity": "sha512-D5JUjPyJbaJDkuAazpVnSfVkLlpeO3wDlPROTMLGKG1zMFNFRgrciKo1ltz/AzNTkqE0HzDx655QOL51N06how==",
|
3300 |
+
"dev": true,
|
3301 |
+
"requires": {
|
3302 |
+
"is-number": "3.0.0",
|
3303 |
+
"kind-of": "4.0.0"
|
3304 |
+
},
|
3305 |
+
"dependencies": {
|
3306 |
+
"is-number": {
|
3307 |
+
"version": "3.0.0",
|
3308 |
+
"resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz",
|
3309 |
+
"integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=",
|
3310 |
+
"dev": true,
|
3311 |
+
"requires": {
|
3312 |
+
"kind-of": "3.2.2"
|
3313 |
+
},
|
3314 |
+
"dependencies": {
|
3315 |
+
"kind-of": {
|
3316 |
+
"version": "3.2.2",
|
3317 |
+
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
|
3318 |
+
"integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
|
3319 |
+
"dev": true,
|
3320 |
+
"requires": {
|
3321 |
+
"is-buffer": "1.1.6"
|
3322 |
+
}
|
3323 |
+
}
|
3324 |
+
}
|
3325 |
+
},
|
3326 |
+
"kind-of": {
|
3327 |
+
"version": "4.0.0",
|
3328 |
+
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz",
|
3329 |
+
"integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=",
|
3330 |
+
"dev": true,
|
3331 |
+
"requires": {
|
3332 |
+
"is-buffer": "1.1.6"
|
3333 |
+
}
|
3334 |
+
}
|
3335 |
+
}
|
3336 |
+
},
|
3337 |
+
"randombytes": {
|
3338 |
+
"version": "2.0.5",
|
3339 |
+
"resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.5.tgz",
|
3340 |
+
"integrity": "sha512-8T7Zn1AhMsQ/HI1SjcCfT/t4ii3eAqco3yOcSzS4mozsOz69lHLsoMXmF9nZgnFanYscnSlUSgs8uZyKzpE6kg==",
|
3341 |
+
"dev": true,
|
3342 |
+
"requires": {
|
3343 |
+
"safe-buffer": "5.1.1"
|
3344 |
+
}
|
3345 |
+
},
|
3346 |
+
"randomfill": {
|
3347 |
+
"version": "1.0.3",
|
3348 |
+
"resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.3.tgz",
|
3349 |
+
"integrity": "sha512-YL6GrhrWoic0Eq8rXVbMptH7dAxCs0J+mh5Y0euNekPPYaxEmdVGim6GdoxoRzKW2yJoU8tueifS7mYxvcFDEQ==",
|
3350 |
+
"dev": true,
|
3351 |
+
"requires": {
|
3352 |
+
"randombytes": "2.0.5",
|
3353 |
+
"safe-buffer": "5.1.1"
|
3354 |
+
}
|
3355 |
+
},
|
3356 |
+
"read-pkg": {
|
3357 |
+
"version": "2.0.0",
|
3358 |
+
"resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz",
|
3359 |
+
"integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=",
|
3360 |
+
"dev": true,
|
3361 |
+
"requires": {
|
3362 |
+
"load-json-file": "2.0.0",
|
3363 |
+
"normalize-package-data": "2.4.0",
|
3364 |
+
"path-type": "2.0.0"
|
3365 |
+
}
|
3366 |
+
},
|
3367 |
+
"read-pkg-up": {
|
3368 |
+
"version": "2.0.0",
|
3369 |
+
"resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz",
|
3370 |
+
"integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=",
|
3371 |
+
"dev": true,
|
3372 |
+
"requires": {
|
3373 |
+
"find-up": "2.1.0",
|
3374 |
+
"read-pkg": "2.0.0"
|
3375 |
+
}
|
3376 |
+
},
|
3377 |
+
"readable-stream": {
|
3378 |
+
"version": "2.3.3",
|
3379 |
+
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz",
|
3380 |
+
"integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==",
|
3381 |
+
"dev": true,
|
3382 |
+
"requires": {
|
3383 |
+
"core-util-is": "1.0.2",
|
3384 |
+
"inherits": "2.0.3",
|
3385 |
+
"isarray": "1.0.0",
|
3386 |
+
"process-nextick-args": "1.0.7",
|
3387 |
+
"safe-buffer": "5.1.1",
|
3388 |
+
"string_decoder": "1.0.3",
|
3389 |
+
"util-deprecate": "1.0.2"
|
3390 |
+
}
|
3391 |
+
},
|
3392 |
+
"readdirp": {
|
3393 |
+
"version": "2.1.0",
|
3394 |
+
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz",
|
3395 |
+
"integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=",
|
3396 |
+
"dev": true,
|
3397 |
+
"requires": {
|
3398 |
+
"graceful-fs": "4.1.11",
|
3399 |
+
"minimatch": "3.0.4",
|
3400 |
+
"readable-stream": "2.3.3",
|
3401 |
+
"set-immediate-shim": "1.0.1"
|
3402 |
+
}
|
3403 |
+
},
|
3404 |
+
"regenerate": {
|
3405 |
+
"version": "1.3.3",
|
3406 |
+
"resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.3.3.tgz",
|
3407 |
+
"integrity": "sha512-jVpo1GadrDAK59t/0jRx5VxYWQEDkkEKi6+HjE3joFVLfDOh9Xrdh0dF1eSq+BI/SwvTQ44gSscJ8N5zYL61sg==",
|
3408 |
+
"dev": true
|
3409 |
+
},
|
3410 |
+
"regenerator-runtime": {
|
3411 |
+
"version": "0.11.1",
|
3412 |
+
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz",
|
3413 |
+
"integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==",
|
3414 |
+
"dev": true
|
3415 |
+
},
|
3416 |
+
"regenerator-transform": {
|
3417 |
+
"version": "0.10.1",
|
3418 |
+
"resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.10.1.tgz",
|
3419 |
+
"integrity": "sha512-PJepbvDbuK1xgIgnau7Y90cwaAmO/LCLMI2mPvaXq2heGMR3aWW5/BQvYrhJ8jgmQjXewXvBjzfqKcVOmhjZ6Q==",
|
3420 |
+
"dev": true,
|
3421 |
+
"requires": {
|
3422 |
+
"babel-runtime": "6.26.0",
|
3423 |
+
"babel-types": "6.26.0",
|
3424 |
+
"private": "0.1.8"
|
3425 |
+
}
|
3426 |
+
},
|
3427 |
+
"regex-cache": {
|
3428 |
+
"version": "0.4.4",
|
3429 |
+
"resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz",
|
3430 |
+
"integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==",
|
3431 |
+
"dev": true,
|
3432 |
+
"requires": {
|
3433 |
+
"is-equal-shallow": "0.1.3"
|
3434 |
+
}
|
3435 |
+
},
|
3436 |
+
"regexpu-core": {
|
3437 |
+
"version": "2.0.0",
|
3438 |
+
"resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-2.0.0.tgz",
|
3439 |
+
"integrity": "sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA=",
|
3440 |
+
"dev": true,
|
3441 |
+
"requires": {
|
3442 |
+
"regenerate": "1.3.3",
|
3443 |
+
"regjsgen": "0.2.0",
|
3444 |
+
"regjsparser": "0.1.5"
|
3445 |
+
}
|
3446 |
+
},
|
3447 |
+
"regjsgen": {
|
3448 |
+
"version": "0.2.0",
|
3449 |
+
"resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz",
|
3450 |
+
"integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=",
|
3451 |
+
"dev": true
|
3452 |
+
},
|
3453 |
+
"regjsparser": {
|
3454 |
+
"version": "0.1.5",
|
3455 |
+
"resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz",
|
3456 |
+
"integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=",
|
3457 |
+
"dev": true,
|
3458 |
+
"requires": {
|
3459 |
+
"jsesc": "0.5.0"
|
3460 |
+
},
|
3461 |
+
"dependencies": {
|
3462 |
+
"jsesc": {
|
3463 |
+
"version": "0.5.0",
|
3464 |
+
"resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz",
|
3465 |
+
"integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=",
|
3466 |
+
"dev": true
|
3467 |
+
}
|
3468 |
+
}
|
3469 |
+
},
|
3470 |
+
"remove-trailing-separator": {
|
3471 |
+
"version": "1.1.0",
|
3472 |
+
"resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz",
|
3473 |
+
"integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=",
|
3474 |
+
"dev": true
|
3475 |
+
},
|
3476 |
+
"repeat-element": {
|
3477 |
+
"version": "1.1.2",
|
3478 |
+
"resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz",
|
3479 |
+
"integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=",
|
3480 |
+
"dev": true
|
3481 |
+
},
|
3482 |
+
"repeat-string": {
|
3483 |
+
"version": "1.6.1",
|
3484 |
+
"resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz",
|
3485 |
+
"integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=",
|
3486 |
+
"dev": true
|
3487 |
+
},
|
3488 |
+
"repeating": {
|
3489 |
+
"version": "2.0.1",
|
3490 |
+
"resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz",
|
3491 |
+
"integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=",
|
3492 |
+
"dev": true,
|
3493 |
+
"requires": {
|
3494 |
+
"is-finite": "1.0.2"
|
3495 |
+
}
|
3496 |
+
},
|
3497 |
+
"require-directory": {
|
3498 |
+
"version": "2.1.1",
|
3499 |
+
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
|
3500 |
+
"integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=",
|
3501 |
+
"dev": true
|
3502 |
+
},
|
3503 |
+
"require-main-filename": {
|
3504 |
+
"version": "1.0.1",
|
3505 |
+
"resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz",
|
3506 |
+
"integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=",
|
3507 |
+
"dev": true
|
3508 |
+
},
|
3509 |
+
"right-align": {
|
3510 |
+
"version": "0.1.3",
|
3511 |
+
"resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz",
|
3512 |
+
"integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=",
|
3513 |
+
"dev": true,
|
3514 |
+
"requires": {
|
3515 |
+
"align-text": "0.1.4"
|
3516 |
+
}
|
3517 |
+
},
|
3518 |
+
"ripemd160": {
|
3519 |
+
"version": "2.0.1",
|
3520 |
+
"resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.1.tgz",
|
3521 |
+
"integrity": "sha1-D0WEKVxTo2KK9+bXmsohzlfRxuc=",
|
3522 |
+
"dev": true,
|
3523 |
+
"requires": {
|
3524 |
+
"hash-base": "2.0.2",
|
3525 |
+
"inherits": "2.0.3"
|
3526 |
+
}
|
3527 |
+
},
|
3528 |
+
"safe-buffer": {
|
3529 |
+
"version": "5.1.1",
|
3530 |
+
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz",
|
3531 |
+
"integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==",
|
3532 |
+
"dev": true
|
3533 |
+
},
|
3534 |
+
"semver": {
|
3535 |
+
"version": "5.4.1",
|
3536 |
+
"resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz",
|
3537 |
+
"integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==",
|
3538 |
+
"dev": true
|
3539 |
+
},
|
3540 |
+
"set-blocking": {
|
3541 |
+
"version": "2.0.0",
|
3542 |
+
"resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
|
3543 |
+
"integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=",
|
3544 |
+
"dev": true
|
3545 |
+
},
|
3546 |
+
"set-immediate-shim": {
|
3547 |
+
"version": "1.0.1",
|
3548 |
+
"resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz",
|
3549 |
+
"integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=",
|
3550 |
+
"dev": true
|
3551 |
+
},
|
3552 |
+
"setimmediate": {
|
3553 |
+
"version": "1.0.5",
|
3554 |
+
"resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz",
|
3555 |
+
"integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=",
|
3556 |
+
"dev": true
|
3557 |
+
},
|
3558 |
+
"sha.js": {
|
3559 |
+
"version": "2.4.9",
|
3560 |
+
"resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.9.tgz",
|
3561 |
+
"integrity": "sha512-G8zektVqbiPHrylgew9Zg1VRB1L/DtXNUVAM6q4QLy8NE3qtHlFXTf8VLL4k1Yl6c7NMjtZUTdXV+X44nFaT6A==",
|
3562 |
+
"dev": true,
|
3563 |
+
"requires": {
|
3564 |
+
"inherits": "2.0.3",
|
3565 |
+
"safe-buffer": "5.1.1"
|
3566 |
+
}
|
3567 |
+
},
|
3568 |
+
"shebang-command": {
|
3569 |
+
"version": "1.2.0",
|
3570 |
+
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
|
3571 |
+
"integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=",
|
3572 |
+
"dev": true,
|
3573 |
+
"requires": {
|
3574 |
+
"shebang-regex": "1.0.0"
|
3575 |
+
}
|
3576 |
+
},
|
3577 |
+
"shebang-regex": {
|
3578 |
+
"version": "1.0.0",
|
3579 |
+
"resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz",
|
3580 |
+
"integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=",
|
3581 |
+
"dev": true
|
3582 |
+
},
|
3583 |
+
"signal-exit": {
|
3584 |
+
"version": "3.0.2",
|
3585 |
+
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
|
3586 |
+
"integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=",
|
3587 |
+
"dev": true
|
3588 |
+
},
|
3589 |
+
"slash": {
|
3590 |
+
"version": "1.0.0",
|
3591 |
+
"resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz",
|
3592 |
+
"integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=",
|
3593 |
+
"dev": true
|
3594 |
+
},
|
3595 |
+
"source-list-map": {
|
3596 |
+
"version": "2.0.0",
|
3597 |
+
"resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.0.tgz",
|
3598 |
+
"integrity": "sha512-I2UmuJSRr/T8jisiROLU3A3ltr+swpniSmNPI4Ml3ZCX6tVnDsuZzK7F2hl5jTqbZBWCEKlj5HRQiPExXLgE8A==",
|
3599 |
+
"dev": true
|
3600 |
+
},
|
3601 |
+
"source-map": {
|
3602 |
+
"version": "0.5.7",
|
3603 |
+
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
|
3604 |
+
"integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
|
3605 |
+
"dev": true
|
3606 |
+
},
|
3607 |
+
"source-map-support": {
|
3608 |
+
"version": "0.4.18",
|
3609 |
+
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz",
|
3610 |
+
"integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==",
|
3611 |
+
"dev": true,
|
3612 |
+
"requires": {
|
3613 |
+
"source-map": "0.5.7"
|
3614 |
+
}
|
3615 |
+
},
|
3616 |
+
"spdx-correct": {
|
3617 |
+
"version": "1.0.2",
|
3618 |
+
"resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz",
|
3619 |
+
"integrity": "sha1-SzBz2TP/UfORLwOsVRlJikFQ20A=",
|
3620 |
+
"dev": true,
|
3621 |
+
"requires": {
|
3622 |
+
"spdx-license-ids": "1.2.2"
|
3623 |
+
}
|
3624 |
+
},
|
3625 |
+
"spdx-expression-parse": {
|
3626 |
+
"version": "1.0.4",
|
3627 |
+
"resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz",
|
3628 |
+
"integrity": "sha1-m98vIOH0DtRH++JzJmGR/O1RYmw=",
|
3629 |
+
"dev": true
|
3630 |
+
},
|
3631 |
+
"spdx-license-ids": {
|
3632 |
+
"version": "1.2.2",
|
3633 |
+
"resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz",
|
3634 |
+
"integrity": "sha1-yd96NCRZSt5r0RkA1ZZpbcBrrFc=",
|
3635 |
+
"dev": true
|
3636 |
+
},
|
3637 |
+
"stream-browserify": {
|
3638 |
+
"version": "2.0.1",
|
3639 |
+
"resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz",
|
3640 |
+
"integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=",
|
3641 |
+
"dev": true,
|
3642 |
+
"requires": {
|
3643 |
+
"inherits": "2.0.3",
|
3644 |
+
"readable-stream": "2.3.3"
|
3645 |
+
}
|
3646 |
+
},
|
3647 |
+
"stream-http": {
|
3648 |
+
"version": "2.7.2",
|
3649 |
+
"resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.7.2.tgz",
|
3650 |
+
"integrity": "sha512-c0yTD2rbQzXtSsFSVhtpvY/vS6u066PcXOX9kBB3mSO76RiUQzL340uJkGBWnlBg4/HZzqiUXtaVA7wcRcJgEw==",
|
3651 |
+
"dev": true,
|
3652 |
+
"requires": {
|
3653 |
+
"builtin-status-codes": "3.0.0",
|
3654 |
+
"inherits": "2.0.3",
|
3655 |
+
"readable-stream": "2.3.3",
|
3656 |
+
"to-arraybuffer": "1.0.1",
|
3657 |
+
"xtend": "4.0.1"
|
3658 |
+
}
|
3659 |
+
},
|
3660 |
+
"string-width": {
|
3661 |
+
"version": "2.1.1",
|
3662 |
+
"resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
|
3663 |
+
"integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==",
|
3664 |
+
"dev": true,
|
3665 |
+
"requires": {
|
3666 |
+
"is-fullwidth-code-point": "2.0.0",
|
3667 |
+
"strip-ansi": "4.0.0"
|
3668 |
+
},
|
3669 |
+
"dependencies": {
|
3670 |
+
"ansi-regex": {
|
3671 |
+
"version": "3.0.0",
|
3672 |
+
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
|
3673 |
+
"integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=",
|
3674 |
+
"dev": true
|
3675 |
+
},
|
3676 |
+
"is-fullwidth-code-point": {
|
3677 |
+
"version": "2.0.0",
|
3678 |
+
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
|
3679 |
+
"integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
|
3680 |
+
"dev": true
|
3681 |
+
},
|
3682 |
+
"strip-ansi": {
|
3683 |
+
"version": "4.0.0",
|
3684 |
+
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
|
3685 |
+
"integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
|
3686 |
+
"dev": true,
|
3687 |
+
"requires": {
|
3688 |
+
"ansi-regex": "3.0.0"
|
3689 |
+
}
|
3690 |
+
}
|
3691 |
+
}
|
3692 |
+
},
|
3693 |
+
"string_decoder": {
|
3694 |
+
"version": "1.0.3",
|
3695 |
+
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz",
|
3696 |
+
"integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==",
|
3697 |
+
"dev": true,
|
3698 |
+
"requires": {
|
3699 |
+
"safe-buffer": "5.1.1"
|
3700 |
+
}
|
3701 |
+
},
|
3702 |
+
"strip-ansi": {
|
3703 |
+
"version": "3.0.1",
|
3704 |
+
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
|
3705 |
+
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
|
3706 |
+
"dev": true,
|
3707 |
+
"requires": {
|
3708 |
+
"ansi-regex": "2.1.1"
|
3709 |
+
}
|
3710 |
+
},
|
3711 |
+
"strip-bom": {
|
3712 |
+
"version": "3.0.0",
|
3713 |
+
"resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz",
|
3714 |
+
"integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=",
|
3715 |
+
"dev": true
|
3716 |
+
},
|
3717 |
+
"strip-eof": {
|
3718 |
+
"version": "1.0.0",
|
3719 |
+
"resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz",
|
3720 |
+
"integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=",
|
3721 |
+
"dev": true
|
3722 |
+
},
|
3723 |
+
"supports-color": {
|
3724 |
+
"version": "2.0.0",
|
3725 |
+
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
|
3726 |
+
"integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=",
|
3727 |
+
"dev": true
|
3728 |
+
},
|
3729 |
+
"tapable": {
|
3730 |
+
"version": "0.2.8",
|
3731 |
+
"resolved": "https://registry.npmjs.org/tapable/-/tapable-0.2.8.tgz",
|
3732 |
+
"integrity": "sha1-mTcqXJmb8t8WCvwNdL7U9HlIzSI=",
|
3733 |
+
"dev": true
|
3734 |
+
},
|
3735 |
+
"timers-browserify": {
|
3736 |
+
"version": "2.0.4",
|
3737 |
+
"resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.4.tgz",
|
3738 |
+
"integrity": "sha512-uZYhyU3EX8O7HQP+J9fTVYwsq90Vr68xPEFo7yrVImIxYvHgukBEgOB/SgGoorWVTzGM/3Z+wUNnboA4M8jWrg==",
|
3739 |
+
"dev": true,
|
3740 |
+
"requires": {
|
3741 |
+
"setimmediate": "1.0.5"
|
3742 |
+
}
|
3743 |
+
},
|
3744 |
+
"to-arraybuffer": {
|
3745 |
+
"version": "1.0.1",
|
3746 |
+
"resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz",
|
3747 |
+
"integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=",
|
3748 |
+
"dev": true
|
3749 |
+
},
|
3750 |
+
"to-fast-properties": {
|
3751 |
+
"version": "1.0.3",
|
3752 |
+
"resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz",
|
3753 |
+
"integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=",
|
3754 |
+
"dev": true
|
3755 |
+
},
|
3756 |
+
"trim-right": {
|
3757 |
+
"version": "1.0.1",
|
3758 |
+
"resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz",
|
3759 |
+
"integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=",
|
3760 |
+
"dev": true
|
3761 |
+
},
|
3762 |
+
"tty-browserify": {
|
3763 |
+
"version": "0.0.0",
|
3764 |
+
"resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz",
|
3765 |
+
"integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=",
|
3766 |
+
"dev": true
|
3767 |
+
},
|
3768 |
+
"uglify-js": {
|
3769 |
+
"version": "2.8.29",
|
3770 |
+
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz",
|
3771 |
+
"integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=",
|
3772 |
+
"dev": true,
|
3773 |
+
"requires": {
|
3774 |
+
"source-map": "0.5.7",
|
3775 |
+
"uglify-to-browserify": "1.0.2",
|
3776 |
+
"yargs": "3.10.0"
|
3777 |
+
},
|
3778 |
+
"dependencies": {
|
3779 |
+
"yargs": {
|
3780 |
+
"version": "3.10.0",
|
3781 |
+
"resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz",
|
3782 |
+
"integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=",
|
3783 |
+
"dev": true,
|
3784 |
+
"requires": {
|
3785 |
+
"camelcase": "1.2.1",
|
3786 |
+
"cliui": "2.1.0",
|
3787 |
+
"decamelize": "1.2.0",
|
3788 |
+
"window-size": "0.1.0"
|
3789 |
+
}
|
3790 |
+
}
|
3791 |
+
}
|
3792 |
+
},
|
3793 |
+
"uglify-to-browserify": {
|
3794 |
+
"version": "1.0.2",
|
3795 |
+
"resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz",
|
3796 |
+
"integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=",
|
3797 |
+
"dev": true,
|
3798 |
+
"optional": true
|
3799 |
+
},
|
3800 |
+
"uglifyjs-webpack-plugin": {
|
3801 |
+
"version": "0.4.6",
|
3802 |
+
"resolved": "https://registry.npmjs.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-0.4.6.tgz",
|
3803 |
+
"integrity": "sha1-uVH0q7a9YX5m9j64kUmOORdj4wk=",
|
3804 |
+
"dev": true,
|
3805 |
+
"requires": {
|
3806 |
+
"source-map": "0.5.7",
|
3807 |
+
"uglify-js": "2.8.29",
|
3808 |
+
"webpack-sources": "1.1.0"
|
3809 |
+
}
|
3810 |
+
},
|
3811 |
+
"url": {
|
3812 |
+
"version": "0.11.0",
|
3813 |
+
"resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz",
|
3814 |
+
"integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=",
|
3815 |
+
"dev": true,
|
3816 |
+
"requires": {
|
3817 |
+
"punycode": "1.3.2",
|
3818 |
+
"querystring": "0.2.0"
|
3819 |
+
},
|
3820 |
+
"dependencies": {
|
3821 |
+
"punycode": {
|
3822 |
+
"version": "1.3.2",
|
3823 |
+
"resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz",
|
3824 |
+
"integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=",
|
3825 |
+
"dev": true
|
3826 |
+
}
|
3827 |
+
}
|
3828 |
+
},
|
3829 |
+
"util": {
|
3830 |
+
"version": "0.10.3",
|
3831 |
+
"resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz",
|
3832 |
+
"integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=",
|
3833 |
+
"dev": true,
|
3834 |
+
"requires": {
|
3835 |
+
"inherits": "2.0.1"
|
3836 |
+
},
|
3837 |
+
"dependencies": {
|
3838 |
+
"inherits": {
|
3839 |
+
"version": "2.0.1",
|
3840 |
+
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz",
|
3841 |
+
"integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=",
|
3842 |
+
"dev": true
|
3843 |
+
}
|
3844 |
+
}
|
3845 |
+
},
|
3846 |
+
"util-deprecate": {
|
3847 |
+
"version": "1.0.2",
|
3848 |
+
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
|
3849 |
+
"integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=",
|
3850 |
+
"dev": true
|
3851 |
+
},
|
3852 |
+
"validate-npm-package-license": {
|
3853 |
+
"version": "3.0.1",
|
3854 |
+
"resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz",
|
3855 |
+
"integrity": "sha1-KAS6vnEq0zeUWaz74kdGqywwP7w=",
|
3856 |
+
"dev": true,
|
3857 |
+
"requires": {
|
3858 |
+
"spdx-correct": "1.0.2",
|
3859 |
+
"spdx-expression-parse": "1.0.4"
|
3860 |
+
}
|
3861 |
+
},
|
3862 |
+
"vm-browserify": {
|
3863 |
+
"version": "0.0.4",
|
3864 |
+
"resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz",
|
3865 |
+
"integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=",
|
3866 |
+
"dev": true,
|
3867 |
+
"requires": {
|
3868 |
+
"indexof": "0.0.1"
|
3869 |
+
}
|
3870 |
+
},
|
3871 |
+
"watchpack": {
|
3872 |
+
"version": "1.4.0",
|
3873 |
+
"resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.4.0.tgz",
|
3874 |
+
"integrity": "sha1-ShRyvLuVK9Cpu0A2gB+VTfs5+qw=",
|
3875 |
+
"dev": true,
|
3876 |
+
"requires": {
|
3877 |
+
"async": "2.6.0",
|
3878 |
+
"chokidar": "1.7.0",
|
3879 |
+
"graceful-fs": "4.1.11"
|
3880 |
+
}
|
3881 |
+
},
|
3882 |
+
"webpack": {
|
3883 |
+
"version": "3.10.0",
|
3884 |
+
"resolved": "https://registry.npmjs.org/webpack/-/webpack-3.10.0.tgz",
|
3885 |
+
"integrity": "sha512-fxxKXoicjdXNUMY7LIdY89tkJJJ0m1Oo8PQutZ5rLgWbV5QVKI15Cn7+/IHnRTd3vfKfiwBx6SBqlorAuNA8LA==",
|
3886 |
+
"dev": true,
|
3887 |
+
"requires": {
|
3888 |
+
"acorn": "5.2.1",
|
3889 |
+
"acorn-dynamic-import": "2.0.2",
|
3890 |
+
"ajv": "5.5.1",
|
3891 |
+
"ajv-keywords": "2.1.1",
|
3892 |
+
"async": "2.6.0",
|
3893 |
+
"enhanced-resolve": "3.4.1",
|
3894 |
+
"escope": "3.6.0",
|
3895 |
+
"interpret": "1.1.0",
|
3896 |
+
"json-loader": "0.5.7",
|
3897 |
+
"json5": "0.5.1",
|
3898 |
+
"loader-runner": "2.3.0",
|
3899 |
+
"loader-utils": "1.1.0",
|
3900 |
+
"memory-fs": "0.4.1",
|
3901 |
+
"mkdirp": "0.5.1",
|
3902 |
+
"node-libs-browser": "2.1.0",
|
3903 |
+
"source-map": "0.5.7",
|
3904 |
+
"supports-color": "4.5.0",
|
3905 |
+
"tapable": "0.2.8",
|
3906 |
+
"uglifyjs-webpack-plugin": "0.4.6",
|
3907 |
+
"watchpack": "1.4.0",
|
3908 |
+
"webpack-sources": "1.1.0",
|
3909 |
+
"yargs": "8.0.2"
|
3910 |
+
},
|
3911 |
+
"dependencies": {
|
3912 |
+
"supports-color": {
|
3913 |
+
"version": "4.5.0",
|
3914 |
+
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz",
|
3915 |
+
"integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=",
|
3916 |
+
"dev": true,
|
3917 |
+
"requires": {
|
3918 |
+
"has-flag": "2.0.0"
|
3919 |
+
}
|
3920 |
+
}
|
3921 |
+
}
|
3922 |
+
},
|
3923 |
+
"webpack-sources": {
|
3924 |
+
"version": "1.1.0",
|
3925 |
+
"resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.1.0.tgz",
|
3926 |
+
"integrity": "sha512-aqYp18kPphgoO5c/+NaUvEeACtZjMESmDChuD3NBciVpah3XpMEU9VAAtIaB1BsfJWWTSdv8Vv1m3T0aRk2dUw==",
|
3927 |
+
"dev": true,
|
3928 |
+
"requires": {
|
3929 |
+
"source-list-map": "2.0.0",
|
3930 |
+
"source-map": "0.6.1"
|
3931 |
+
},
|
3932 |
+
"dependencies": {
|
3933 |
+
"source-map": {
|
3934 |
+
"version": "0.6.1",
|
3935 |
+
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
|
3936 |
+
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
|
3937 |
+
"dev": true
|
3938 |
+
}
|
3939 |
+
}
|
3940 |
+
},
|
3941 |
+
"which": {
|
3942 |
+
"version": "1.3.0",
|
3943 |
+
"resolved": "https://registry.npmjs.org/which/-/which-1.3.0.tgz",
|
3944 |
+
"integrity": "sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg==",
|
3945 |
+
"dev": true,
|
3946 |
+
"requires": {
|
3947 |
+
"isexe": "2.0.0"
|
3948 |
+
}
|
3949 |
+
},
|
3950 |
+
"which-module": {
|
3951 |
+
"version": "2.0.0",
|
3952 |
+
"resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz",
|
3953 |
+
"integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=",
|
3954 |
+
"dev": true
|
3955 |
+
},
|
3956 |
+
"window-size": {
|
3957 |
+
"version": "0.1.0",
|
3958 |
+
"resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz",
|
3959 |
+
"integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=",
|
3960 |
+
"dev": true
|
3961 |
+
},
|
3962 |
+
"wordwrap": {
|
3963 |
+
"version": "0.0.2",
|
3964 |
+
"resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz",
|
3965 |
+
"integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=",
|
3966 |
+
"dev": true
|
3967 |
+
},
|
3968 |
+
"wrap-ansi": {
|
3969 |
+
"version": "2.1.0",
|
3970 |
+
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz",
|
3971 |
+
"integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=",
|
3972 |
+
"dev": true,
|
3973 |
+
"requires": {
|
3974 |
+
"string-width": "1.0.2",
|
3975 |
+
"strip-ansi": "3.0.1"
|
3976 |
+
},
|
3977 |
+
"dependencies": {
|
3978 |
+
"string-width": {
|
3979 |
+
"version": "1.0.2",
|
3980 |
+
"resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
|
3981 |
+
"integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
|
3982 |
+
"dev": true,
|
3983 |
+
"requires": {
|
3984 |
+
"code-point-at": "1.1.0",
|
3985 |
+
"is-fullwidth-code-point": "1.0.0",
|
3986 |
+
"strip-ansi": "3.0.1"
|
3987 |
+
}
|
3988 |
+
}
|
3989 |
+
}
|
3990 |
+
},
|
3991 |
+
"xtend": {
|
3992 |
+
"version": "4.0.1",
|
3993 |
+
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz",
|
3994 |
+
"integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=",
|
3995 |
+
"dev": true
|
3996 |
+
},
|
3997 |
+
"y18n": {
|
3998 |
+
"version": "3.2.1",
|
3999 |
+
"resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz",
|
4000 |
+
"integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=",
|
4001 |
+
"dev": true
|
4002 |
+
},
|
4003 |
+
"yallist": {
|
4004 |
+
"version": "2.1.2",
|
4005 |
+
"resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz",
|
4006 |
+
"integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=",
|
4007 |
+
"dev": true
|
4008 |
+
},
|
4009 |
+
"yargs": {
|
4010 |
+
"version": "8.0.2",
|
4011 |
+
"resolved": "https://registry.npmjs.org/yargs/-/yargs-8.0.2.tgz",
|
4012 |
+
"integrity": "sha1-YpmpBVsc78lp/355wdkY3Osiw2A=",
|
4013 |
+
"dev": true,
|
4014 |
+
"requires": {
|
4015 |
+
"camelcase": "4.1.0",
|
4016 |
+
"cliui": "3.2.0",
|
4017 |
+
"decamelize": "1.2.0",
|
4018 |
+
"get-caller-file": "1.0.2",
|
4019 |
+
"os-locale": "2.1.0",
|
4020 |
+
"read-pkg-up": "2.0.0",
|
4021 |
+
"require-directory": "2.1.1",
|
4022 |
+
"require-main-filename": "1.0.1",
|
4023 |
+
"set-blocking": "2.0.0",
|
4024 |
+
"string-width": "2.1.1",
|
4025 |
+
"which-module": "2.0.0",
|
4026 |
+
"y18n": "3.2.1",
|
4027 |
+
"yargs-parser": "7.0.0"
|
4028 |
+
},
|
4029 |
+
"dependencies": {
|
4030 |
+
"camelcase": {
|
4031 |
+
"version": "4.1.0",
|
4032 |
+
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz",
|
4033 |
+
"integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=",
|
4034 |
+
"dev": true
|
4035 |
+
},
|
4036 |
+
"cliui": {
|
4037 |
+
"version": "3.2.0",
|
4038 |
+
"resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz",
|
4039 |
+
"integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=",
|
4040 |
+
"dev": true,
|
4041 |
+
"requires": {
|
4042 |
+
"string-width": "1.0.2",
|
4043 |
+
"strip-ansi": "3.0.1",
|
4044 |
+
"wrap-ansi": "2.1.0"
|
4045 |
+
},
|
4046 |
+
"dependencies": {
|
4047 |
+
"string-width": {
|
4048 |
+
"version": "1.0.2",
|
4049 |
+
"resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
|
4050 |
+
"integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
|
4051 |
+
"dev": true,
|
4052 |
+
"requires": {
|
4053 |
+
"code-point-at": "1.1.0",
|
4054 |
+
"is-fullwidth-code-point": "1.0.0",
|
4055 |
+
"strip-ansi": "3.0.1"
|
4056 |
+
}
|
4057 |
+
}
|
4058 |
+
}
|
4059 |
+
}
|
4060 |
+
}
|
4061 |
+
},
|
4062 |
+
"yargs-parser": {
|
4063 |
+
"version": "7.0.0",
|
4064 |
+
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-7.0.0.tgz",
|
4065 |
+
"integrity": "sha1-jQrELxbqVd69MyyvTEA4s+P139k=",
|
4066 |
+
"dev": true,
|
4067 |
+
"requires": {
|
4068 |
+
"camelcase": "4.1.0"
|
4069 |
+
},
|
4070 |
+
"dependencies": {
|
4071 |
+
"camelcase": {
|
4072 |
+
"version": "4.1.0",
|
4073 |
+
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz",
|
4074 |
+
"integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=",
|
4075 |
+
"dev": true
|
4076 |
+
}
|
4077 |
+
}
|
4078 |
+
}
|
4079 |
+
}
|
4080 |
+
}
|
vendor/codeinwp/themeisle-content-forms/assets/gutenberg-esnext/package.json
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "04-controls-esnext",
|
3 |
+
"version": "1.0.0",
|
4 |
+
"main": "block.js",
|
5 |
+
"devDependencies": {
|
6 |
+
"babel-core": "^6.25.0",
|
7 |
+
"babel-loader": "^7.1.1",
|
8 |
+
"babel-plugin-transform-react-jsx": "^6.24.1",
|
9 |
+
"babel-preset-env": "^1.6.0",
|
10 |
+
"cross-env": "^5.0.1",
|
11 |
+
"webpack": "^3.1.0"
|
12 |
+
},
|
13 |
+
"scripts": {
|
14 |
+
"build": "cross-env BABEL_ENV=default NODE_ENV=production webpack",
|
15 |
+
"dev": "cross-env BABEL_ENV=default webpack --watch"
|
16 |
+
}
|
17 |
+
}
|
vendor/codeinwp/themeisle-content-forms/assets/gutenberg-esnext/webpack.config.js
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var webpack = require( 'webpack' ),
|
2 |
+
NODE_ENV = process.env.NODE_ENV || 'development';
|
3 |
+
|
4 |
+
const entryPointNames = [
|
5 |
+
'blocks',
|
6 |
+
'components',
|
7 |
+
'date',
|
8 |
+
'editor',
|
9 |
+
'element',
|
10 |
+
'i18n',
|
11 |
+
'utils',
|
12 |
+
'data',
|
13 |
+
];
|
14 |
+
|
15 |
+
const packageNames = [
|
16 |
+
'hooks',
|
17 |
+
];
|
18 |
+
|
19 |
+
const externals = {
|
20 |
+
react: 'React',
|
21 |
+
'react-dom': 'ReactDOM',
|
22 |
+
'react-dom/server': 'ReactDOMServer',
|
23 |
+
tinymce: 'tinymce',
|
24 |
+
moment: 'moment',
|
25 |
+
jquery: 'jQuery',
|
26 |
+
};
|
27 |
+
|
28 |
+
[ ...entryPointNames, ...packageNames ].forEach( name => {
|
29 |
+
externals[ `@wordpress/${ name }` ] = {
|
30 |
+
this: [ 'wp', name ],
|
31 |
+
};
|
32 |
+
} );
|
33 |
+
|
34 |
+
|
35 |
+
var webpackConfig = {
|
36 |
+
entry: './block.js',
|
37 |
+
output: {
|
38 |
+
path: __dirname,
|
39 |
+
filename: 'block.build.js',
|
40 |
+
},
|
41 |
+
externals,
|
42 |
+
module: {
|
43 |
+
loaders: [
|
44 |
+
{
|
45 |
+
test: /.js$/,
|
46 |
+
loader: 'babel-loader',
|
47 |
+
exclude: /node_modules/,
|
48 |
+
},
|
49 |
+
],
|
50 |
+
},
|
51 |
+
plugins: [
|
52 |
+
new webpack.DefinePlugin( {
|
53 |
+
'process.env.NODE_ENV': JSON.stringify( NODE_ENV )
|
54 |
+
} ),
|
55 |
+
]
|
56 |
+
};
|
57 |
+
|
58 |
+
if ( 'production' === NODE_ENV ) {
|
59 |
+
webpackConfig.plugins.push( new webpack.optimize.UglifyJsPlugin() );
|
60 |
+
}
|
61 |
+
|
62 |
+
module.exports = webpackConfig;
|
vendor/codeinwp/themeisle-content-forms/beaver/class-themeisle-content-forms-beaver-base.php
ADDED
@@ -0,0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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace ThemeIsle\ContentForms;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* This class is used to create an Beaver module based on a ContentForms config
|
7 |
+
* Class BeaverModule
|
8 |
+
* @package ThemeIsle\ContentForms
|
9 |
+
*/
|
10 |
+
abstract class BeaverModule extends \FLBuilderModule {
|
11 |
+
|
12 |
+
public $name;
|
13 |
+
|
14 |
+
protected $title;
|
15 |
+
|
16 |
+
public $icon;
|
17 |
+
|
18 |
+
protected $forms_config = array();
|
19 |
+
|
20 |
+
public function __construct( $data ) {
|
21 |
+
|
22 |
+
$this->setup_attributes();
|
23 |
+
|
24 |
+
parent::__construct( $data );
|
25 |
+
|
26 |
+
wp_enqueue_script( 'content-forms' );
|
27 |
+
wp_enqueue_style( 'content-forms' );
|
28 |
+
}
|
29 |
+
|
30 |
+
public function register_widget() {
|
31 |
+
$fields = array();
|
32 |
+
|
33 |
+
foreach ( $this->forms_config['fields'] as $key => $field ) {
|
34 |
+
$fields[] = array(
|
35 |
+
'key' => $key,
|
36 |
+
'label' => isset( $field['default'] ) ? $field['default'] : '',
|
37 |
+
'type' => $field['type'],
|
38 |
+
'required' => $field['require'],
|
39 |
+
);
|
40 |
+
}
|
41 |
+
|
42 |
+
$controls = array();
|
43 |
+
|
44 |
+
if ( ! empty( $this->forms_config['controls'] ) ) {
|
45 |
+
foreach ( $this->forms_config['controls'] as $key => $control ) {
|
46 |
+
$control_settings = array(
|
47 |
+
'type' => $control['type'],
|
48 |
+
'label' => $control['label'],
|
49 |
+
'description' => isset( $control['description'] ) ? $control['description'] : '',
|
50 |
+
'default' => isset( $control['default'] ) ? $control['default'] : '',
|
51 |
+
);
|
52 |
+
|
53 |
+
if ( isset( $control['options'] ) ) {
|
54 |
+
$control_settings['options'] = $control['options'];
|
55 |
+
}
|
56 |
+
|
57 |
+
$controls[ $key ] = $control_settings;
|
58 |
+
}
|
59 |
+
}
|
60 |
+
|
61 |
+
$args = array(
|
62 |
+
'general' => array( // Tab
|
63 |
+
'title' => $this->get_title(),
|
64 |
+
'description' => isset( $this->forms_config['description'] ) ? $this->forms_config['description'] : '',
|
65 |
+
'sections' => array(),
|
66 |
+
)
|
67 |
+
);
|
68 |
+
|
69 |
+
// is important to keep the order of fields from the main config
|
70 |
+
foreach ( $this->forms_config as $key => $val ) {
|
71 |
+
if ( 'fields' === $key ) {
|
72 |
+
$args['general']['sections']['settings'] = array(
|
73 |
+
'title' => esc_html__( 'Fields', 'elementor-addon-widgets' ),
|
74 |
+
'fields' => array(
|
75 |
+
'fields' => array(
|
76 |
+
'multiple' => true,
|
77 |
+
'type' => 'form',
|
78 |
+
'label' => esc_html__( 'Field', 'elementor-addon-widgets' ),
|
79 |
+
'form' => 'field',
|
80 |
+
'preview_text' => 'label',
|
81 |
+
'default' => $fields
|
82 |
+
),
|
83 |
+
),
|
84 |
+
);
|
85 |
+
continue;
|
86 |
+
} elseif ( 'controls' === $key ) {
|
87 |
+
$args['general']['sections']['controls'] = array(
|
88 |
+
'title' => esc_html__( 'Form Settings', 'elementor-addon-widgets' ),
|
89 |
+
'fields' => $controls
|
90 |
+
);
|
91 |
+
}
|
92 |
+
}
|
93 |
+
|
94 |
+
\FLBuilder::register_module( get_called_class(), $args );
|
95 |
+
|
96 |
+
\FLBuilder::register_settings_form(
|
97 |
+
'field', array(
|
98 |
+
'title' => esc_html__( 'Field', 'elementor-addon-widgets' ),
|
99 |
+
'tabs' => array(
|
100 |
+
'general' => array(
|
101 |
+
'title' => esc_html__( 'Field', 'elementor-addon-widgets' ),
|
102 |
+
'sections' => array(
|
103 |
+
'fields' => array(
|
104 |
+
'title' => esc_html__( 'Field', 'elementor-addon-widgets' ),
|
105 |
+
'fields' => array(
|
106 |
+
'label' => array(
|
107 |
+
'type' => 'text',
|
108 |
+
'label' => esc_html__( 'Label', 'elementor-addon-widgets' ),
|
109 |
+
),
|
110 |
+
'type' => array(
|
111 |
+
'type' => 'select',
|
112 |
+
'label' => esc_html__( 'Type', 'elementor-addon-widgets' ),
|
113 |
+
'options' => array(
|
114 |
+
'text' => esc_html__( 'Text', 'elementor-addon-widgets' ),
|
115 |
+
'email' => esc_html__( 'Email', 'elementor-addon-widgets' ),
|
116 |
+
'textarea' => esc_html__( 'Textarea', 'elementor-addon-widgets' ),
|
117 |
+
'password' => esc_html__( 'Password', 'elementor-addon-widgets' ),
|
118 |
+
)
|
119 |
+
),
|
120 |
+
'required' => array(
|
121 |
+
'type' => 'select',
|
122 |
+
'label' => esc_html__( 'Is required?', 'elementor-addon-widgets' ),
|
123 |
+
'options' => array(
|
124 |
+
'required' => esc_html__( 'Required', 'elementor-addon-widgets' ),
|
125 |
+
'optional' => esc_html__( 'Optional', 'elementor-addon-widgets' )
|
126 |
+
)
|
127 |
+
)
|
128 |
+
),
|
129 |
+
),
|
130 |
+
),
|
131 |
+
),
|
132 |
+
),
|
133 |
+
)
|
134 |
+
);
|
135 |
+
}
|
136 |
+
|
137 |
+
/**
|
138 |
+
* This method takes the given attributes and sets them as properties
|
139 |
+
*
|
140 |
+
* @param $data array
|
141 |
+
*/
|
142 |
+
public function setup_attributes( $data = array() ) {
|
143 |
+
|
144 |
+
if ( ! empty( $data['content_forms_config'] ) ) {
|
145 |
+
$this->forms_config = $data['content_forms_config'];
|
146 |
+
} else {
|
147 |
+
$this->forms_config = apply_filters( 'content_forms_config_for_' . $this->get_type(), $this->forms_config );
|
148 |
+
}
|
149 |
+
|
150 |
+
if ( ! empty( $data['id'] ) ) {
|
151 |
+
$this->set_name( $data['id'] );
|
152 |
+
}
|
153 |
+
|
154 |
+
if ( ! empty( $this->forms_config['title'] ) ) {
|
155 |
+
$this->set_title( $this->forms_config['title'] );
|
156 |
+
}
|
157 |
+
|
158 |
+
if ( ! empty( $this->forms_config['icon'] ) ) {
|
159 |
+
$this->set_icon( $this->forms_config['icon'] );
|
160 |
+
}
|
161 |
+
}
|
162 |
+
|
163 |
+
/**
|
164 |
+
* Each inherited class will need to define it's type be returning it trough this method
|
165 |
+
* @return mixed
|
166 |
+
*/
|
167 |
+
abstract public function get_type();
|
168 |
+
|
169 |
+
/**
|
170 |
+
* Retrieve the widget name.
|
171 |
+
*
|
172 |
+
* @since 1.0.0
|
173 |
+
* @access public
|
174 |
+
*
|
175 |
+
* @return string Widget name.
|
176 |
+
*/
|
177 |
+
public function get_name() {
|
178 |
+
return $this->name;
|
179 |
+
}
|
180 |
+
|
181 |
+
/**
|
182 |
+
* Set the widget name property
|
183 |
+
*
|
184 |
+
* @param $name
|
185 |
+
*/
|
186 |
+
protected function set_name( $name ) {
|
187 |
+
$this->name = $name;
|
188 |
+
}
|
189 |
+
|
190 |
+
/**
|
191 |
+
* Retrieve the widget title.
|
192 |
+
*
|
193 |
+
* @since 1.0.0
|
194 |
+
* @access public
|
195 |
+
*
|
196 |
+
* @return string Widget title.
|
197 |
+
*/
|
198 |
+
public function get_title() {
|
199 |
+
return $this->title;
|
200 |
+
}
|
201 |
+
|
202 |
+
/**
|
203 |
+
* Set the widget title property
|
204 |
+
*/
|
205 |
+
protected function set_title( $title ) {
|
206 |
+
$this->title = $title;
|
207 |
+
}
|
208 |
+
|
209 |
+
/**
|
210 |
+
* Retrieve content form widget icon.
|
211 |
+
*
|
212 |
+
* @since 1.0.0
|
213 |
+
* @access public
|
214 |
+
*
|
215 |
+
* @return string Widget icon.
|
216 |
+
*/
|
217 |
+
// public function get_icon() {
|
218 |
+
// return $this->icon;
|
219 |
+
// }
|
220 |
+
|
221 |
+
/**
|
222 |
+
* Set the widget title property
|
223 |
+
*/
|
224 |
+
protected function set_icon( $icon ) {
|
225 |
+
$this->icon = $icon;
|
226 |
+
}
|
227 |
+
|
228 |
+
/** == Render functions == */
|
229 |
+
|
230 |
+
/**
|
231 |
+
* Render the header of the form based on the block id(for JS identification)
|
232 |
+
*
|
233 |
+
* @param $id
|
234 |
+
*/
|
235 |
+
public function render_form_header( $id ) {
|
236 |
+
$url = admin_url( 'admin-post.php' );
|
237 |
+
echo '<form action="' . esc_url( $url ) . '" method="post" name="content-form-' . $id . '" id="content-form-' . $id . '" class="content-form content-form-' . $this->get_type() . '">';
|
238 |
+
|
239 |
+
wp_nonce_field( 'content-form-' . $id, '_wpnonce_' . $this->get_type() );
|
240 |
+
|
241 |
+
echo '<input type="hidden" name="action" value="content_form_submit" />';
|
242 |
+
// there could be also the possibility to submit by type
|
243 |
+
// echo '<input type="hidden" name="action" value="content_form_{type}_submit" />';
|
244 |
+
echo '<input type="hidden" name="form-type" value="' . $this->get_type() . '" />';
|
245 |
+
echo '<input type="hidden" name="form-builder" value="beaver" />';
|
246 |
+
echo '<input type="hidden" name="post-id" value="' . get_the_ID() . '" />';
|
247 |
+
echo '<input type="hidden" name="form-id" value="' . $id . '" />';
|
248 |
+
}
|
249 |
+
|
250 |
+
public function render_form_field( $field ) {
|
251 |
+
$key = ! empty( $field['key'] ) ? $field['key'] : sanitize_title( $field['label'] );
|
252 |
+
$required = '';
|
253 |
+
$form_id = $this->node;
|
254 |
+
|
255 |
+
|
256 |
+
if ( $field['required'] === 'required' ) {
|
257 |
+
$required = 'required="required"';
|
258 |
+
}
|
259 |
+
|
260 |
+
$field_name = 'data[' . $form_id . '][' . $key . ']'; ?>
|
261 |
+
<fieldset class="content-form-field-<?php echo $field['type'] ?>">
|
262 |
+
|
263 |
+
<label for="<?php echo $field_name ?>">
|
264 |
+
<?php echo $field['label']; ?>
|
265 |
+
</label>
|
266 |
+
|
267 |
+
<?php
|
268 |
+
switch ( $field['type'] ) {
|
269 |
+
case 'textarea': ?>
|
270 |
+
<textarea name="<?php echo $field_name ?>" id="<?php echo $field_name ?>"
|
271 |
+
<?php echo $required; ?>
|
272 |
+
cols="30" rows="5"></textarea>
|
273 |
+
<?php break;
|
274 |
+
case 'password': ?>
|
275 |
+
<input type="password" name="<?php echo $field_name ?>" id="<?php echo $field_name ?>"
|
276 |
+
<?php echo $required; ?>>
|
277 |
+
<?php break;
|
278 |
+
default: ?>
|
279 |
+
<input type="text" name="<?php echo $field_name ?>" id="<?php echo $field_name ?>"
|
280 |
+
<?php echo $required; ?>>
|
281 |
+
<?php
|
282 |
+
break;
|
283 |
+
} ?>
|
284 |
+
</fieldset>
|
285 |
+
<?php
|
286 |
+
}
|
287 |
+
|
288 |
+
public function render_form_footer() {
|
289 |
+
echo '</form>';
|
290 |
+
}
|
291 |
+
|
292 |
+
/**
|
293 |
+
* Retrieve a setting value for a given key
|
294 |
+
*
|
295 |
+
* @param $key
|
296 |
+
*
|
297 |
+
* @return bool|mixed
|
298 |
+
*/
|
299 |
+
public function get_setting( $key ) {
|
300 |
+
if ( ! empty( $this->settings->{$key} ) ) {
|
301 |
+
return $this->settings->{$key};
|
302 |
+
}
|
303 |
+
|
304 |
+
return false;
|
305 |
+
}
|
306 |
+
}
|
vendor/codeinwp/themeisle-content-forms/beaver/class-themeisle-content-forms-beaver-contact.php
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace ThemeIsle\ContentForms;
|
4 |
+
|
5 |
+
class BeaverModuleContact extends BeaverModule {
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Define the form type
|
9 |
+
* @return string
|
10 |
+
*/
|
11 |
+
public function get_type() {
|
12 |
+
return 'contact';
|
13 |
+
}
|
14 |
+
|
15 |
+
public function __construct() {
|
16 |
+
|
17 |
+
parent::__construct(
|
18 |
+
array(
|
19 |
+
'name' => esc_html__( 'Contact', 'elementor-addon-widgets' ),
|
20 |
+
'description' => esc_html__( 'A contact form.', 'elementor-addon-widgets' ),
|
21 |
+
'category' => esc_html__( 'Orbit Fox Modules', 'elementor-addon-widgets' ),
|
22 |
+
'dir' => dirname( __FILE__ ),
|
23 |
+
'url' => plugin_dir_url( __FILE__ )
|
24 |
+
)
|
25 |
+
);
|
26 |
+
}
|
27 |
+
|
28 |
+
}
|
vendor/codeinwp/themeisle-content-forms/beaver/class-themeisle-content-forms-beaver-newsletter.php
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace ThemeIsle\ContentForms;
|
4 |
+
|
5 |
+
class BeaverModuleNewsletter extends BeaverModule {
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Define the form type
|
9 |
+
* @return string
|
10 |
+
*/
|
11 |
+
public function get_type() {
|
12 |
+
return 'newsletter';
|
13 |
+
}
|
14 |
+
|
15 |
+
public function __construct( $data = array(), $args = null ) {
|
16 |
+
|
17 |
+
parent::__construct(
|
18 |
+
array(
|
19 |
+
'name' => esc_html__( 'Newsletter', 'elementor-addon-widgets' ),
|
20 |
+
'description' => esc_html__( 'A simple newsletter form.', 'elementor-addon-widgets' ),
|
21 |
+
'category' => esc_html__( 'Orbit Fox Modules', 'elementor-addon-widgets' ),
|
22 |
+
'dir' => dirname( __FILE__ ),
|
23 |
+
'url' => plugin_dir_url( __FILE__ )
|
24 |
+
)
|
25 |
+
);
|
26 |
+
}
|
27 |
+
}
|
vendor/codeinwp/themeisle-content-forms/beaver/class-themeisle-content-forms-beaver-registration.php
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace ThemeIsle\ContentForms;
|
4 |
+
|
5 |
+
class BeaverModuleRegistration extends BeaverModule {
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Define the form type
|
9 |
+
* @return string
|
10 |
+
*/
|
11 |
+
public function get_type() {
|
12 |
+
return 'registration';
|
13 |
+
}
|
14 |
+
|
15 |
+
public function __construct( $data = array(), $args = null ) {
|
16 |
+
|
17 |
+
parent::__construct(
|
18 |
+
array(
|
19 |
+
'name' => esc_html__( 'Registration', 'elementor-addon-widgets' ),
|
20 |
+
'description' => esc_html__( 'A sign up form.', 'elementor-addon-widgets' ),
|
21 |
+
'category' => esc_html__( 'Orbit Fox Modules', 'elementor-addon-widgets' ),
|
22 |
+
'dir' => dirname( __FILE__ ),
|
23 |
+
'url' => plugin_dir_url( __FILE__ )
|
24 |
+
)
|
25 |
+
);
|
26 |
+
}
|
27 |
+
}
|
vendor/codeinwp/themeisle-content-forms/beaver/includes/frontend.css.php
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// wait a sec
|
vendor/codeinwp/themeisle-content-forms/beaver/includes/frontend.php
ADDED
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The module rendering file
|
4 |
+
*
|
5 |
+
* @$module object
|
6 |
+
* @$settings object
|
7 |
+
*/
|
8 |
+
$form_settings = apply_filters( 'content_forms_config_for_' . $module->get_type(), array() );
|
9 |
+
|
10 |
+
/** == Fields Validation == */
|
11 |
+
$controls = $form_settings['controls'];
|
12 |
+
|
13 |
+
foreach ( $controls as $control_name => $control ) {
|
14 |
+
$control_value = $module->get_setting( $control_name );
|
15 |
+
if ( isset( $control['required'] ) && $control['required'] && empty( $control_value ) ) { ?>
|
16 |
+
<div class="content-forms-required">
|
17 |
+
<?php
|
18 |
+
printf(
|
19 |
+
esc_html__( 'The %s setting is required!', 'elementor-addon-widgets' ),
|
20 |
+
'<strong>' . $control['label'] . '</strong>'
|
21 |
+
); ?>
|
22 |
+
</div>
|
23 |
+
<?php
|
24 |
+
}
|
25 |
+
}
|
26 |
+
|
27 |
+
/** == FORM HEADER == */
|
28 |
+
$module->render_form_header( $module->node );
|
29 |
+
|
30 |
+
/** == FORM FIELDS == */
|
31 |
+
$fields = $module->get_setting( 'fields' );
|
32 |
+
|
33 |
+
foreach ( $fields as $key => $field ) {
|
34 |
+
$module->render_form_field( (array)$field );
|
35 |
+
}
|
36 |
+
|
37 |
+
$controls = $form_settings['controls'];
|
38 |
+
|
39 |
+
/** == FORM SUBMIT BUTTON == */
|
40 |
+
$btn_label = esc_html__( 'Submit', 'elementor-addon-widgets' );
|
41 |
+
|
42 |
+
if ( ! empty( $settings->submit_label ) ) {
|
43 |
+
$btn_label = $settings->submit_label;
|
44 |
+
} ?>
|
45 |
+
<fieldset>
|
46 |
+
<button type="submit" name="submit" value="submit-<?php echo $module->get_type(); ?>-<?php echo $module->node; ?>">
|
47 |
+
<?php echo $btn_label; ?>
|
48 |
+
</button>
|
49 |
+
</fieldset>
|
50 |
+
<?php
|
51 |
+
|
52 |
+
/** == FORM FOOTER == */
|
53 |
+
$module->render_form_footer();
|
vendor/codeinwp/themeisle-content-forms/class-content-form-base.php
ADDED
@@ -0,0 +1,262 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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how a Content Form should look like
|
7 |
+
* Class ContentFormBase
|
8 |
+
* @package ThemeIsle\ContentForms
|
9 |
+
*/
|
10 |
+
abstract class ContentFormBase {
|
11 |
+
|
12 |
+
/**
|
13 |
+
* The content form type.
|
14 |
+
* Currently the possible values are: `contact`,`newsletter` and `registration`
|
15 |
+
* @var string $type
|
16 |
+
*/
|
17 |
+
private $type;
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Holds the shape of the content form, names, details and fields structure.
|
21 |
+
* @var array $config
|
22 |
+
*/
|
23 |
+
private $config;
|
24 |
+
|
25 |
+
protected $notices = array();
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Create the Content Form Object and add initial hooks
|
29 |
+
* ContentFormBase constructor.
|
30 |
+
*/
|
31 |
+
function __construct() {
|
32 |
+
$this->init();
|
33 |
+
|
34 |
+
$this->add_base_hooks();
|
35 |
+
}
|
36 |
+
|
37 |
+
/**
|
38 |
+
* This method is passed to the rest controller and it is responsible for submitting the data.
|
39 |
+
*
|
40 |
+
* @param $return array
|
41 |
+
* @param $data array
|
42 |
+
* @param $widget_id string
|
43 |
+
* @param $post_id string
|
44 |
+
* @param $builder string
|
45 |
+
*
|
46 |
+
* @return mixed
|
47 |
+
*/
|
48 |
+
abstract public function rest_submit_form( $return, $data, $widget_id, $post_id, $builder );
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Create an abstract array config which should define the form.
|
52 |
+
* This method's body will be passed to a filter
|
53 |
+
*
|
54 |
+
* @param $config
|
55 |
+
*
|
56 |
+
* @return mixed
|
57 |
+
*/
|
58 |
+
abstract public function make_form_config( $config );
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Map the registration actions
|
62 |
+
*/
|
63 |
+
public function add_base_hooks() {
|
64 |
+
|
65 |
+
// add the initial config for the Contact Content Form
|
66 |
+
add_filter( 'content_forms_config_for_' . $this->get_type(), array( $this, 'make_form_config' ) );
|
67 |
+
|
68 |
+
$config = apply_filters( 'content_forms_config_for_' . $this->get_type(), array() );
|
69 |
+
$this->set_config( $config );
|
70 |
+
|
71 |
+
// @TODO if we will ever think about letting users submit without AJAX
|
72 |
+
// register the classic submission action
|
73 |
+
//add_action( 'admin_post_nopriv_content_form_contact_submit', array( $this, 'submit_form' ) );
|
74 |
+
//add_action( 'admin_post_content_form_contact_submit', array( $this, 'submit_form' ) );
|
75 |
+
|
76 |
+
// add a rest api callback for the `submit` route
|
77 |
+
add_filter( 'content_forms_submit_' . $this->get_type(), array( $this, 'rest_submit_form' ), 10, 5 );
|
78 |
+
|
79 |
+
$this->maybe_register_elementor_category();
|
80 |
+
|
81 |
+
// Register the Elementor Widget
|
82 |
+
add_action( 'elementor/widgets/widgets_registered', array( $this, 'register_elementor_widget' ) );
|
83 |
+
|
84 |
+
// Register the Beaver Module
|
85 |
+
$this->register_beaver_module();
|
86 |
+
add_action( 'init', array( $this, 'register_beaver_module' ) );
|
87 |
+
|
88 |
+
// Register the Gutenberg Block
|
89 |
+
// @TODO This is not fully working at this moment
|
90 |
+
// $this->register_gutenberg_block();
|
91 |
+
}
|
92 |
+
|
93 |
+
/**
|
94 |
+
* Elementor widget registration
|
95 |
+
*/
|
96 |
+
public function register_elementor_widget() {
|
97 |
+
|
98 |
+
// We check if the Elementor plugin has been installed / activated.
|
99 |
+
if ( defined( 'ELEMENTOR_PATH' ) && class_exists( 'Elementor\Widget_Base' ) ) {
|
100 |
+
|
101 |
+
\Elementor\Plugin::instance()->widgets_manager->register_widget_type(
|
102 |
+
new \ThemeIsle\ContentForms\ElementorWidget(
|
103 |
+
array(
|
104 |
+
'id' => 'content_form_' . $this->get_type(),
|
105 |
+
'content_forms_config' => $this->get_config()
|
106 |
+
),
|
107 |
+
array(
|
108 |
+
'content_forms_config' => $this->get_config()
|
109 |
+
)
|
110 |
+
)
|
111 |
+
);
|
112 |
+
}
|
113 |
+
}
|
114 |
+
|
115 |
+
/**
|
116 |
+
* Register a Beaver module
|
117 |
+
* https://www.wpbeaverbuilder.com/custom-module-documentation
|
118 |
+
*/
|
119 |
+
public function register_beaver_module() {
|
120 |
+
if ( class_exists( '\FLBuilderModel' ) ) {
|
121 |
+
|
122 |
+
$classname = __NAMESPACE__ . '\\BeaverModule' . ucfirst( $this->get_type() );
|
123 |
+
|
124 |
+
$module = new $classname(
|
125 |
+
array(
|
126 |
+
'id' => 'content_form_' . $this->get_type(),
|
127 |
+
'type' => $this->get_type(),
|
128 |
+
'content_forms_config' => $this->get_config()
|
129 |
+
)
|
130 |
+
);
|
131 |
+
|
132 |
+
$module->register_widget();
|
133 |
+
}
|
134 |
+
}
|
135 |
+
|
136 |
+
/**
|
137 |
+
* Gutenberg block registration
|
138 |
+
*/
|
139 |
+
public function register_gutenberg_block() {
|
140 |
+
|
141 |
+
if ( in_array( 'gutenberg/gutenberg.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {
|
142 |
+
require_once( __DIR__ . '/class-themeisle-content-forms-gutenberg.php' );
|
143 |
+
|
144 |
+
$block = new \ThemeIsle\ContentForms\GutenbergModule(
|
145 |
+
array(
|
146 |
+
'id' => 'content_form_' . $this->get_type(),
|
147 |
+
'type' => $this->get_type(),
|
148 |
+
'content_forms_config' => $this->get_config()
|
149 |
+
)
|
150 |
+
);
|
151 |
+
}
|
152 |
+
}
|
153 |
+
|
154 |
+
/**
|
155 |
+
* Themeisle Companion may register an Elementor widgets category.
|
156 |
+
* But if not, we need to register it ourselfs.
|
157 |
+
*/
|
158 |
+
public function maybe_register_elementor_category() {
|
159 |
+
|
160 |
+
if ( ! defined( 'ELEMENTOR_PATH' ) || ! class_exists( 'Elementor\Widget_Base' ) ) {
|
161 |
+
return;
|
162 |
+
}
|
163 |
+
|
164 |
+
$categories = \Elementor\Plugin::instance()->elements_manager->get_categories();
|
165 |
+
|
166 |
+
if ( ! isset( $categories['obfx-elementor-widgets'] ) ) {
|
167 |
+
|
168 |
+
$category_args = apply_filters( 'content_forms_category_args', array(
|
169 |
+
'slug' => 'obfx-elementor-widgets',
|
170 |
+
'title' => __( 'Orbit Fox Addons', 'elementor-addon-widgets' ),
|
171 |
+
'icon' => 'fa fa-plug',
|
172 |
+
) );
|
173 |
+
|
174 |
+
\Elementor\Plugin::instance()->elements_manager->add_category(
|
175 |
+
$category_args['slug'],
|
176 |
+
array(
|
177 |
+
'title' => $category_args['title'],
|
178 |
+
'icon' => $category_args['slug'],
|
179 |
+
),
|
180 |
+
1
|
181 |
+
);
|
182 |
+
}
|
183 |
+
}
|
184 |
+
|
185 |
+
/**
|
186 |
+
* Get block settings depending on what builder is in use.
|
187 |
+
*
|
188 |
+
* @param $widget_id
|
189 |
+
* @param $post_id
|
190 |
+
* @param $builder
|
191 |
+
*
|
192 |
+
* @return bool
|
193 |
+
*/
|
194 |
+
protected function get_widget_settings( $widget_id, $post_id, $builder ) {
|
195 |
+
if ( 'elementor' === $builder ) {
|
196 |
+
$settings = ElementorWidget::get_widget_settings( $widget_id, $post_id );
|
197 |
+
|
198 |
+
return $settings['settings'];
|
199 |
+
} elseif ( 'beaver' === $builder ) {
|
200 |
+
return $this->get_beaver_module_settings_by_id( $widget_id, $post_id );
|
201 |
+
}
|
202 |
+
|
203 |
+
// if gutenberg
|
204 |
+
return false;
|
205 |
+
}
|
206 |
+
|
207 |
+
/**
|
208 |
+
* Each beaver module has data saved in the post metadata, and we need to extract it by its id.
|
209 |
+
*
|
210 |
+
* @param $node_id
|
211 |
+
* @param $post_id
|
212 |
+
*
|
213 |
+
* @return array|bool
|
214 |
+
*/
|
215 |
+
private function get_beaver_module_settings_by_id( $node_id, $post_id ) {
|
216 |
+
$post_data = \FLBuilderModel::get_layout_data( null, $post_id );
|
217 |
+
|
218 |
+
if ( isset( $post_data[ $node_id ] ) ) {
|
219 |
+
$module = $post_data[ $node_id ];
|
220 |
+
|
221 |
+
return (array) $module->settings;
|
222 |
+
}
|
223 |
+
|
224 |
+
return false;
|
225 |
+
}
|
226 |
+
|
227 |
+
/**
|
228 |
+
* Setter method for the form type
|
229 |
+
*
|
230 |
+
* @param $type
|
231 |
+
*/
|
232 |
+
protected function set_type( $type ) {
|
233 |
+
$this->type = $type;
|
234 |
+
}
|
235 |
+
|
236 |
+
/**
|
237 |
+
* Getter method for the form type
|
238 |
+
*
|
239 |
+
* @return string
|
240 |
+
*/
|
241 |
+
final public function get_type() {
|
242 |
+
return $this->type;
|
243 |
+
}
|
244 |
+
|
245 |
+
/**
|
246 |
+
* Setter method for the config property
|
247 |
+
*
|
248 |
+
* @param $config
|
249 |
+
*/
|
250 |
+
protected function set_config( $config ) {
|
251 |
+
$this->config = $config;
|
252 |
+
}
|
253 |
+
|
254 |
+
/**
|
255 |
+
* Getter method for the config property
|
256 |
+
* @return mixed
|
257 |
+
*/
|
258 |
+
final public function get_config() {
|
259 |
+
return $this->config;
|
260 |
+
}
|
261 |
+
|
262 |
+
}
|
vendor/codeinwp/themeisle-content-forms/class-themeisle-content-forms-contact.php
ADDED
@@ -0,0 +1,305 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace ThemeIsle\ContentForms;
|
4 |
+
|
5 |
+
use ThemeIsle\ContentForms\ContentFormBase as Base;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* This class creates a Contact Form
|
9 |
+
* Class ContactForm
|
10 |
+
* @package ThemeIsle\ContentForms
|
11 |
+
*/
|
12 |
+
class ContactForm extends Base {
|
13 |
+
|
14 |
+
/**
|
15 |
+
* @var ContactForm
|
16 |
+
*/
|
17 |
+
public static $instance = null;
|
18 |
+
|
19 |
+
/**
|
20 |
+
* The Call To Action
|
21 |
+
*/
|
22 |
+
public function init() {
|
23 |
+
$this->set_type( 'contact' );
|
24 |
+
|
25 |
+
$this->notices = array(
|
26 |
+
'success' => esc_html__( 'Your message has been sent!', 'elementor-addon-widgets' ),
|
27 |
+
'error' => esc_html__( 'We failed to send your message!', 'elementor-addon-widgets' ),
|
28 |
+
);
|
29 |
+
|
30 |
+
}
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Create an abstract array config which should define the form.
|
34 |
+
*
|
35 |
+
* @param $config
|
36 |
+
*
|
37 |
+
* @return array
|
38 |
+
*/
|
39 |
+
function make_form_config( $config ) {
|
40 |
+
return array(
|
41 |
+
'id' => 'contact',
|
42 |
+
'icon' => 'eicon-align-left',
|
43 |
+
'title' => esc_html__( 'Contact Form', 'elementor-addon-widgets' ),
|
44 |
+
'fields' /* or form_fields? */ => array(
|
45 |
+
'name' => array(
|
46 |
+
'type' => 'text',
|
47 |
+
'label' => esc_html__( 'Name', 'elementor-addon-widgets' ),
|
48 |
+
'default' => esc_html__( 'Name', 'elementor-addon-widgets' ),
|
49 |
+
'placeholder' => esc_html__( 'Your Name', 'elementor-addon-widgets' ),
|
50 |
+
'require' => 'required'
|
51 |
+
),
|
52 |
+
'email' => array(
|
53 |
+
'type' => 'email',
|
54 |
+
'label' => esc_html__( 'Email', 'elementor-addon-widgets' ),
|
55 |
+
'default' => esc_html__( 'Email', 'elementor-addon-widgets' ),
|
56 |
+
'placeholder' => esc_html__( 'Email address', 'elementor-addon-widgets' ),
|
57 |
+
'require' => 'required'
|
58 |
+
),
|
59 |
+
'phone' => array(
|
60 |
+
'type' => 'number',
|
61 |
+
'label' => esc_html__( 'Phone', 'elementor-addon-widgets' ),
|
62 |
+
'default' => esc_html__( 'Phone', 'elementor-addon-widgets' ),
|
63 |
+
'placeholder' => esc_html__( 'Phone Nr', 'elementor-addon-widgets' ),
|
64 |
+
'require' => 'optional'
|
65 |
+
),
|
66 |
+
'message' => array(
|
67 |
+
'type' => 'textarea',
|
68 |
+
'label' => esc_html__( 'Message', 'elementor-addon-widgets' ),
|
69 |
+
'default' => esc_html__( 'Message', 'elementor-addon-widgets' ),
|
70 |
+
'placeholder' => esc_html__( 'Your message', 'elementor-addon-widgets' ),
|
71 |
+
'require' => 'required'
|
72 |
+
)
|
73 |
+
),
|
74 |
+
|
75 |
+
'controls' /* or settings? */ => array(
|
76 |
+
'to_send_email' => array(
|
77 |
+
'type' => 'text',
|
78 |
+
'label' => esc_html__( 'Send to', 'elementor-addon-widgets' ),
|
79 |
+
'description' => esc_html__( 'Where should we send the email?', 'elementor-addon-widgets' ),
|
80 |
+
'default' => get_bloginfo( 'admin_email' )
|
81 |
+
),
|
82 |
+
'submit_label' => array(
|
83 |
+
'type' => 'text',
|
84 |
+
'label' => esc_html__( 'Submit', 'elementor-addon-widgets' ),
|
85 |
+
'default' => esc_html__( 'Submit', 'elementor-addon-widgets' ),
|
86 |
+
'description' => esc_html__( 'The Call To Action label', 'elementor-addon-widgets' )
|
87 |
+
)
|
88 |
+
)
|
89 |
+
);
|
90 |
+
}
|
91 |
+
|
92 |
+
/**
|
93 |
+
* This method is passed to the rest controller and it is responsible for submitting the data.
|
94 |
+
* // @TODO we still have to check for the requirement with the field settings
|
95 |
+
*
|
96 |
+
* @param $return array
|
97 |
+
* @param $data array Must contain the following keys: `email`, `name`, `message` but it can also have extra keys
|
98 |
+
* @param $widget_id string
|
99 |
+
* @param $post_id string
|
100 |
+
* @param $builder string
|
101 |
+
*
|
102 |
+
* @return mixed
|
103 |
+
*/
|
104 |
+
public function rest_submit_form( $return, $data, $widget_id, $post_id, $builder ) {
|
105 |
+
|
106 |
+
if ( empty( $data['email'] ) || ! is_email( $data['email'] ) ) {
|
107 |
+
$return['msg'] = esc_html__( 'Invalid email.', 'elementor-addon-widgets' );
|
108 |
+
|
109 |
+
return $return;
|
110 |
+
}
|
111 |
+
|
112 |
+
$from = $data['email'];
|
113 |
+
|
114 |
+
if ( empty( $data['name'] ) ) {
|
115 |
+
$return['msg'] = esc_html__( 'Missing name.', 'elementor-addon-widgets' );
|
116 |
+
|
117 |
+
return $return;
|
118 |
+
}
|
119 |
+
|
120 |
+
$name = $data['name'];
|
121 |
+
|
122 |
+
if ( empty( $data['message'] ) ) {
|
123 |
+
$return['msg'] = esc_html__( 'Missing message.', 'elementor-addon-widgets' );
|
124 |
+
|
125 |
+
return $return;
|
126 |
+
}
|
127 |
+
|
128 |
+
$msg = $data['message'];
|
129 |
+
|
130 |
+
// prepare settings for submit
|
131 |
+
$settings = $this->get_widget_settings( $widget_id, $post_id, $builder );
|
132 |
+
|
133 |
+
if ( ! isset( $settings['to_send_email'] ) || ! is_email( $settings['to_send_email'] ) ) {
|
134 |
+
$return['msg'] = esc_html__( 'Wrong email configuration! Please contact administration!', 'elementor-addon-widgets' );
|
135 |
+
|
136 |
+
return $return;
|
137 |
+
}
|
138 |
+
|
139 |
+
$result = $this->_send_mail( $settings['to_send_email'], $from, $name, $msg, $data );
|
140 |
+
|
141 |
+
if ( $result ) {
|
142 |
+
$return['success'] = true;
|
143 |
+
$return['msg'] = $this->notices['success'];
|
144 |
+
} else {
|
145 |
+
$return['msg'] = esc_html__( 'Ops! I cannot send this email!', 'elementor-addon-widgets' );
|
146 |
+
}
|
147 |
+
|
148 |
+
return $return;
|
149 |
+
}
|
150 |
+
|
151 |
+
/**
|
152 |
+
* Mail sender method
|
153 |
+
*
|
154 |
+
* @param $mailto
|
155 |
+
* @param $mailfrom
|
156 |
+
* @param $subject
|
157 |
+
* @param $body
|
158 |
+
* @param array $extra_data
|
159 |
+
*
|
160 |
+
* @return bool
|
161 |
+
*/
|
162 |
+
private function _send_mail( $mailto, $mailfrom, $name, $body, $extra_data = array() ) {
|
163 |
+
$success = false;
|
164 |
+
|
165 |
+
$subject = sanitize_text_field( $name );
|
166 |
+
$mailto = sanitize_email( $mailto );
|
167 |
+
$mailfrom = sanitize_email( $mailfrom );
|
168 |
+
|
169 |
+
$headers = array();
|
170 |
+
$headers[] = 'From: ' . $subject . ' <' . $mailfrom . '>';
|
171 |
+
$headers[] = 'Content-Type: text/html; charset=UTF-8';
|
172 |
+
|
173 |
+
$body = $this->prepare_body( $body, $extra_data );
|
174 |
+
|
175 |
+
ob_start();
|
176 |
+
|
177 |
+
$success = wp_mail( $mailto, $subject, $body, $headers );
|
178 |
+
|
179 |
+
if ( ! $success ) {
|
180 |
+
return ob_get_clean();
|
181 |
+
}
|
182 |
+
|
183 |
+
return $success;
|
184 |
+
}
|
185 |
+
|
186 |
+
/**
|
187 |
+
* Body template preparation
|
188 |
+
*
|
189 |
+
* @param string $body
|
190 |
+
* @param array $data
|
191 |
+
*
|
192 |
+
* @return string
|
193 |
+
*/
|
194 |
+
private function prepare_body( $body, $data ) {
|
195 |
+
$tmpl = "";
|
196 |
+
|
197 |
+
ob_start(); ?>
|
198 |
+
<!doctype html>
|
199 |
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
200 |
+
<head>
|
201 |
+
<meta http-equiv="Content-Type" content="text/html;" charset="utf-8"/>
|
202 |
+
<!-- view port meta tag -->
|
203 |
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
204 |
+
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
|
205 |
+
<title><?php echo esc_html__( 'Mail From: ', 'elementor-addon-widgets' ) . esc_html( $data['name'] ); ?></title>
|
206 |
+
</head>
|
207 |
+
<body>
|
208 |
+
<table>
|
209 |
+
<thead>
|
210 |
+
<tr>
|
211 |
+
<th>
|
212 |
+
<h3>
|
213 |
+
<?php esc_html_e( 'Content Form submission from ', 'elementor-addon-widgets' ); ?>
|
214 |
+
<a href="<?php echo esc_url( get_site_url() ); ?>"><?php bloginfo( 'name' ); ?></a>
|
215 |
+
</h3>
|
216 |
+
<hr/>
|
217 |
+
</th>
|
218 |
+
</tr>
|
219 |
+
</thead>
|
220 |
+
<tbody>
|
221 |
+
<?php
|
222 |
+
foreach ( $data as $key => $value ) { ?>
|
223 |
+
<tr>
|
224 |
+
<td>
|
225 |
+
<strong><?php echo esc_html( $key ) ?> : </strong>
|
226 |
+
<p><?php echo esc_html( $value ); ?></p>
|
227 |
+
</td>
|
228 |
+
</tr>
|
229 |
+
<?php } ?>
|
230 |
+
</tbody>
|
231 |
+
<tfoot>
|
232 |
+
<tr>
|
233 |
+
<td>
|
234 |
+
<hr/>
|
235 |
+
<?php esc_html_e( 'You recieved this email because your email address is set in the content form settings on ', 'elementor-addon-widgets' ) ?>
|
236 |
+
<a href="<?php echo esc_url( get_site_url() ); ?>"><?php bloginfo( 'name' ); ?></a>
|
237 |
+
</td>
|
238 |
+
</tr>
|
239 |
+
</tfoot>
|
240 |
+
</table>
|
241 |
+
</body>
|
242 |
+
</html>
|
243 |
+
<?php
|
244 |
+
return ob_get_clean();
|
245 |
+
}
|
246 |
+
|
247 |
+
/**
|
248 |
+
* The classic submission method via the `admin_post_` hook
|
249 |
+
* @TODO not used at this moment.
|
250 |
+
*/
|
251 |
+
function submit_form() {
|
252 |
+
// @TODO first we need to collect data from $_POST and validate our parameters
|
253 |
+
//$ok = $this->_send_mail( $to, $subj );
|
254 |
+
// @TODO we need to inform the user if the mail was sent or not;
|
255 |
+
|
256 |
+
if ( ! wp_get_referer() ) {
|
257 |
+
return;
|
258 |
+
}
|
259 |
+
|
260 |
+
wp_safe_redirect( wp_get_referer() );
|
261 |
+
exit;
|
262 |
+
}
|
263 |
+
|
264 |
+
/**
|
265 |
+
* @static
|
266 |
+
* @since 1.0.0
|
267 |
+
* @access public
|
268 |
+
* @return ContactForm
|
269 |
+
*/
|
270 |
+
public static function instance() {
|
271 |
+
if ( is_null( self::$instance ) ) {
|
272 |
+
self::$instance = new self();
|
273 |
+
self::$instance->init();
|
274 |
+
}
|
275 |
+
|
276 |
+
return self::$instance;
|
277 |
+
}
|
278 |
+
|
279 |
+
/**
|
280 |
+
* Throw error on object clone
|
281 |
+
*
|
282 |
+
* The whole idea of the singleton design pattern is that there is a single
|
283 |
+
* object therefore, we don't want the object to be cloned.
|
284 |
+
*
|
285 |
+
* @access public
|
286 |
+
* @since 1.0.0
|
287 |
+
* @return void
|
288 |
+
*/
|
289 |
+
public function __clone() {
|
290 |
+
// Cloning instances of the class is forbidden.
|
291 |
+
_doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin’ huh?', 'elementor-addon-widgets' ), '1.0.0' );
|
292 |
+
}
|
293 |
+
|
294 |
+
/**
|
295 |
+
* Disable unserializing of the class
|
296 |
+
*
|
297 |
+
* @access public
|
298 |
+
* @since 1.0.0
|
299 |
+
* @return void
|
300 |
+
*/
|
301 |
+
public function __wakeup() {
|
302 |
+
// Unserializing instances of the class is forbidden.
|
303 |
+
_doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin’ huh?', 'elementor-addon-widgets' ), '1.0.0' );
|
304 |
+
}
|
305 |
+
}
|
vendor/codeinwp/themeisle-content-forms/class-themeisle-content-forms-elementor.php
ADDED
@@ -0,0 +1,536 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace ThemeIsle\ContentForms;
|
4 |
+
|
5 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
6 |
+
exit; // Exit if accessed directly.
|
7 |
+
}
|
8 |
+
|
9 |
+
/**
|
10 |
+
* This class is used to create an Elementor widget based on a ContentForms config.
|
11 |
+
* @package ThemeIsle\ContentForms
|
12 |
+
*/
|
13 |
+
class ElementorWidget extends \Elementor\Widget_Base {
|
14 |
+
|
15 |
+
private $name;
|
16 |
+
|
17 |
+
private $title;
|
18 |
+
|
19 |
+
private $icon;
|
20 |
+
|
21 |
+
private $form_type;
|
22 |
+
|
23 |
+
private $forms_config = array();
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Widget base constructor.
|
27 |
+
*
|
28 |
+
* Initializing the widget base class.
|
29 |
+
*
|
30 |
+
* @since 1.0.0
|
31 |
+
* @access public
|
32 |
+
*
|
33 |
+
* @param array $data Widget data. Default is an empty array.
|
34 |
+
* @param array|null $args Optional. Widget default arguments. Default is null.
|
35 |
+
*/
|
36 |
+
public function __construct( $data = array(), $args = null ) {
|
37 |
+
parent::__construct( $data, $args );
|
38 |
+
$this->setup_attributes( $data );
|
39 |
+
}
|
40 |
+
|
41 |
+
/**
|
42 |
+
* This method takes the given attributes and sets them as properties
|
43 |
+
*
|
44 |
+
* @param $data array
|
45 |
+
*/
|
46 |
+
private function setup_attributes( $data ) {
|
47 |
+
|
48 |
+
$this->setFormType();
|
49 |
+
|
50 |
+
if ( ! empty( $data['content_forms_config'] ) ) {
|
51 |
+
$this->setFormConfig( $data['content_forms_config'] );
|
52 |
+
} else {
|
53 |
+
$this->setFormConfig( apply_filters( 'content_forms_config_for_' . $this->getFormType(), $this->getFormConfig() ) );
|
54 |
+
}
|
55 |
+
|
56 |
+
if ( ! empty( $data['id'] ) ) {
|
57 |
+
$this->set_name( $data['id'] );
|
58 |
+
}
|
59 |
+
|
60 |
+
if ( ! empty( $this->forms_config['title'] ) ) {
|
61 |
+
$this->set_title( $this->forms_config['title'] );
|
62 |
+
}
|
63 |
+
|
64 |
+
if ( ! empty( $this->forms_config['icon'] ) ) {
|
65 |
+
$this->set_icon( $this->forms_config['icon'] );
|
66 |
+
}
|
67 |
+
}
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Register widget controls.
|
71 |
+
*
|
72 |
+
* Adds different input fields to allow the user to change and customize the widget settings.
|
73 |
+
*
|
74 |
+
* @since 1.0.0
|
75 |
+
* @access protected
|
76 |
+
*/
|
77 |
+
protected function _register_controls() {
|
78 |
+
// first we need to make sure that we have some fields to build on
|
79 |
+
if ( empty( $this->forms_config['fields'] ) ) {
|
80 |
+
return;
|
81 |
+
}
|
82 |
+
|
83 |
+
// is important to keep the order of fields from the main config
|
84 |
+
foreach ( $this->forms_config as $key => $val ) {
|
85 |
+
if ( 'fields' === $key ) {
|
86 |
+
$this->_register_fields_controls();
|
87 |
+
continue;
|
88 |
+
} elseif ( 'controls' === $key ) {
|
89 |
+
$this->_register_settings_controls();
|
90 |
+
}
|
91 |
+
}
|
92 |
+
|
93 |
+
}
|
94 |
+
|
95 |
+
protected function _register_settings_controls() {
|
96 |
+
$this->start_controls_section(
|
97 |
+
'section_form_settings',
|
98 |
+
array(
|
99 |
+
'label' => __( 'Form Settings', 'elementor-addon-widgets' ),
|
100 |
+
)
|
101 |
+
);
|
102 |
+
|
103 |
+
$controls = $this->forms_config['controls'];
|
104 |
+
|
105 |
+
foreach ( $controls as $control_name => $control ) {
|
106 |
+
|
107 |
+
$control_args = array(
|
108 |
+
'label' => $control['label'],
|
109 |
+
'type' => $control['type'],
|
110 |
+
'default' => isset( $control['default'] ) ? $control['default'] : '',
|
111 |
+
);
|
112 |
+
|
113 |
+
if ( isset( $control['options'] ) ) {
|
114 |
+
$control_args['options'] = $control['options'];
|
115 |
+
}
|
116 |
+
|
117 |
+
$this->add_control(
|
118 |
+
$control_name,
|
119 |
+
$control_args
|
120 |
+
);
|
121 |
+
}
|
122 |
+
|
123 |
+
$this->end_controls_section();
|
124 |
+
}
|
125 |
+
|
126 |
+
protected function _register_fields_controls() {
|
127 |
+
|
128 |
+
$this->start_controls_section(
|
129 |
+
$this->form_type . '_form_fields',
|
130 |
+
array( 'label' => __( 'Fields', 'elementor-addon-widgets' ) )
|
131 |
+
);
|
132 |
+
|
133 |
+
$repeater = new \Elementor\Repeater();
|
134 |
+
|
135 |
+
$repeater->add_control(
|
136 |
+
'label',
|
137 |
+
array(
|
138 |
+
'label' => __( 'Label', 'elementor-addon-widgets' ),
|
139 |
+
'type' => \Elementor\Controls_Manager::TEXT,
|
140 |
+
'default' => '',
|
141 |
+
)
|
142 |
+
);
|
143 |
+
|
144 |
+
$repeater->add_control(
|
145 |
+
'placeholder',
|
146 |
+
array(
|
147 |
+
'label' => __( 'Placeholder', 'elementor-addon-widgets' ),
|
148 |
+
'type' => \Elementor\Controls_Manager::TEXT,
|
149 |
+
'default' => '',
|
150 |
+
)
|
151 |
+
);
|
152 |
+
|
153 |
+
$repeater->add_control(
|
154 |
+
'requirement',
|
155 |
+
array(
|
156 |
+
'label' => __( 'Requirement', 'elementor-addon-widgets' ),
|
157 |
+
'type' => \Elementor\Controls_Manager::SELECT,
|
158 |
+
'options' => array(
|
159 |
+
'required' => esc_html__( 'Required', 'elementor-addon-widgets' ),
|
160 |
+
'optional' => esc_html__( 'Optional', 'elementor-addon-widgets' )
|
161 |
+
),
|
162 |
+
'default' => 'optional',
|
163 |
+
)
|
164 |
+
);
|
165 |
+
|
166 |
+
$field_types = array(
|
167 |
+
'text' => __( 'Text', 'elementor-addon-widgets' ),
|
168 |
+
'password' => __( 'Password', 'elementor-addon-widgets' ),
|
169 |
+
// 'tel' => __( 'Tel', 'textdomain' ),
|
170 |
+
'email' => __( 'Email', 'elementor-addon-widgets' ),
|
171 |
+
'textarea' => __( 'Textarea', 'elementor-addon-widgets' ),
|
172 |
+
// 'number' => __( 'Number', 'textdomain' ),
|
173 |
+
// 'select' => __( 'Select', 'textdomain' ),
|
174 |
+
// 'url' => __( 'URL', 'textdomain' ),
|
175 |
+
);
|
176 |
+
|
177 |
+
$repeater->add_control(
|
178 |
+
'type',
|
179 |
+
array(
|
180 |
+
'label' => __( 'Type', 'elementor-addon-widgets' ),
|
181 |
+
'type' => \Elementor\Controls_Manager::SELECT,
|
182 |
+
'options' => $field_types,
|
183 |
+
'default' => 'text'
|
184 |
+
)
|
185 |
+
);
|
186 |
+
|
187 |
+
$repeater->add_control(
|
188 |
+
'key',
|
189 |
+
array(
|
190 |
+
'label' => __( 'Key', 'elementor-addon-widgets' ),
|
191 |
+
'type' => \Elementor\Controls_Manager::HIDDEN
|
192 |
+
)
|
193 |
+
);
|
194 |
+
|
195 |
+
$fields = $this->forms_config['fields'];
|
196 |
+
|
197 |
+
$default_fields = array();
|
198 |
+
|
199 |
+
foreach ( $fields as $field_name => $field ) {
|
200 |
+
$default_fields[] = array(
|
201 |
+
'key' => $field_name,
|
202 |
+
'type' => $field['type'],
|
203 |
+
'label' => $field['label'],
|
204 |
+
'requirement' => $field['require'],
|
205 |
+
// 'placeholder' => isset( $field['placeholder'] ) ? $field['placeholder'] : $field['label'],
|
206 |
+
'width' => '100',
|
207 |
+
);
|
208 |
+
}
|
209 |
+
|
210 |
+
$this->add_control(
|
211 |
+
'form_fields',
|
212 |
+
array(
|
213 |
+
'label' => __( 'Form Fields', 'elementor-addon-widgets' ),
|
214 |
+
'type' => \Elementor\Controls_Manager::REPEATER,
|
215 |
+
'show_label' => false,
|
216 |
+
'separator' => 'before',
|
217 |
+
'fields' => array_values( $repeater->get_controls() ),
|
218 |
+
'default' => $default_fields,
|
219 |
+
'title_field' => '{{{ label }}}',
|
220 |
+
)
|
221 |
+
);
|
222 |
+
|
223 |
+
$this->end_controls_section();
|
224 |
+
}
|
225 |
+
|
226 |
+
/**
|
227 |
+
* Render content form widget output on the frontend.
|
228 |
+
*
|
229 |
+
* Written in PHP and used to generate the final HTML.
|
230 |
+
*
|
231 |
+
* @since 1.0.0
|
232 |
+
* @access protected
|
233 |
+
*/
|
234 |
+
protected function render( $instance = array() ) {
|
235 |
+
$form_id = $this->get_data( 'id' );
|
236 |
+
$settings = $this->get_settings();
|
237 |
+
|
238 |
+
$this->maybe_load_widget_style();
|
239 |
+
|
240 |
+
if ( empty( $this->forms_config['fields'] ) ) {
|
241 |
+
return;
|
242 |
+
}
|
243 |
+
|
244 |
+
$fields = $settings['form_fields'];
|
245 |
+
|
246 |
+
$controls = $this->forms_config['controls'];
|
247 |
+
|
248 |
+
foreach ( $controls as $control_name => $control ) {
|
249 |
+
$control_value = '';
|
250 |
+
|
251 |
+
if ( isset( $settings[ $control_name ] ) ) {
|
252 |
+
$control_value = $settings[ $control_name ];
|
253 |
+
}
|
254 |
+
if ( isset( $control['required'] ) && $control['required'] && empty( $control_value ) ) { ?>
|
255 |
+
<div class="content-forms-required">
|
256 |
+
<?php
|
257 |
+
printf(
|
258 |
+
esc_html__( 'The %s setting is required!', 'elementor-addon-widgets' ),
|
259 |
+
'<strong>' . $control['label'] . '</strong>'
|
260 |
+
); ?>
|
261 |
+
</div>
|
262 |
+
<?php
|
263 |
+
}
|
264 |
+
}
|
265 |
+
|
266 |
+
$this->render_form_header( $form_id );
|
267 |
+
|
268 |
+
foreach ( $fields as $index => $field ) {
|
269 |
+
$this->render_form_field( $field );
|
270 |
+
}
|
271 |
+
|
272 |
+
$btn_label = esc_html__( 'Submit', 'elementor-addon-widgets' );
|
273 |
+
|
274 |
+
if ( ! empty( $controls['submit_label'] ) ) {
|
275 |
+
$btn_label = $this->get_settings( 'submit_label' );
|
276 |
+
} ?>
|
277 |
+
<fieldset>
|
278 |
+
<button type="submit" name="submit" value="submit-<?php echo $this->form_type; ?>-<?php echo $form_id; ?>">
|
279 |
+
<?php echo $btn_label; ?>
|
280 |
+
</button>
|
281 |
+
</fieldset>
|
282 |
+
<?php
|
283 |
+
|
284 |
+
$this->render_form_footer();
|
285 |
+
}
|
286 |
+
|
287 |
+
/**
|
288 |
+
* Either enqueue the widget style registered by the library
|
289 |
+
* or load an inline version for the preview only
|
290 |
+
*/
|
291 |
+
protected function maybe_load_widget_style() {
|
292 |
+
if ( \Elementor\Plugin::$instance->editor->is_edit_mode() === true && apply_filters( 'themeisle_content_forms_register_default_style', true ) ) { ?>
|
293 |
+
<style>
|
294 |
+
<?php echo file_get_contents( plugin_dir_path( __FILE__ ) . '/assets/content-forms.css' ) ?>
|
295 |
+
</style>
|
296 |
+
<?php
|
297 |
+
} else {
|
298 |
+
// if `themeisle_content_forms_register_default_style` is false, the style won't be registered anyway
|
299 |
+
wp_enqueue_script( 'content-forms' );
|
300 |
+
wp_enqueue_style( 'content-forms' );
|
301 |
+
}
|
302 |
+
}
|
303 |
+
|
304 |
+
/**
|
305 |
+
* Display method for the form's header
|
306 |
+
* It is also takes care about the form attributes and the regular hidden fields
|
307 |
+
*
|
308 |
+
* @param $id
|
309 |
+
*/
|
310 |
+
private function render_form_header( $id ) {
|
311 |
+
// create an url for the form's action
|
312 |
+
$url = admin_url( 'admin-post.php' );
|
313 |
+
|
314 |
+
echo '<form action="' . esc_url( $url ) . '" method="post" name="content-form-' . $id . '" id="content-form-' . $id . '" class="content-form content-form-' . $this->getFormType() . ' ' . $this->get_name() . '">';
|
315 |
+
|
316 |
+
wp_nonce_field( 'content-form-' . $id, '_wpnonce_' . $this->getFormType() );
|
317 |
+
|
318 |
+
echo '<input type="hidden" name="action" value="content_form_submit" />';
|
319 |
+
// there could be also the possibility to submit by type
|
320 |
+
// echo '<input type="hidden" name="action" value="content_form_{type}_submit" />';
|
321 |
+
echo '<input type="hidden" name="form-type" value="' . $this->getFormType() . '" />';
|
322 |
+
echo '<input type="hidden" name="form-builder" value="elementor" />';
|
323 |
+
echo '<input type="hidden" name="post-id" value="' . get_the_ID() . '" />';
|
324 |
+
echo '<input type="hidden" name="form-id" value="' . $id . '" />';
|
325 |
+
}
|
326 |
+
|
327 |
+
/**
|
328 |
+
* Display method for the form's footer
|
329 |
+
*/
|
330 |
+
private function render_form_footer() {
|
331 |
+
echo '</form>';
|
332 |
+
}
|
333 |
+
|
334 |
+
/**
|
335 |
+
* Print the output of an individual field
|
336 |
+
*
|
337 |
+
* @param $field
|
338 |
+
* @param bool $is_preview
|
339 |
+
*/
|
340 |
+
private function render_form_field( $field, $is_preview = false ) {
|
341 |
+
$item_index = $field['_id'];
|
342 |
+
$key = ! empty( $field['key'] ) ? $field['key'] : sanitize_title( $field['label'] );
|
343 |
+
$required = '';
|
344 |
+
$form_id = $this->get_data( 'id' );
|
345 |
+
|
346 |
+
if ( $field['requirement'] === 'required' ) {
|
347 |
+
$required = 'required="required"';
|
348 |
+
}
|
349 |
+
|
350 |
+
// in case this is a preview, we need to disable the actual inputs and transform the labels in inputs
|
351 |
+
$disabled = '';
|
352 |
+
if ( $is_preview ) {
|
353 |
+
$disabled = 'disabled="disabled"';
|
354 |
+
}
|
355 |
+
|
356 |
+
$field_name = 'data[' . $form_id . '][' . $key . ']';
|
357 |
+
|
358 |
+
$this->add_inline_editing_attributes( $item_index . '_label', 'none' ); ?>
|
359 |
+
<fieldset class="content-form-field-<?php echo $field['type'] ?>"
|
360 |
+
<?php echo $this->get_render_attribute_string( 'fieldset' . $item_index ); ?> >
|
361 |
+
|
362 |
+
<label for="<?php echo $field_name ?>"
|
363 |
+
<?php echo $this->get_render_attribute_string( 'label' . $item_index ); ?>>
|
364 |
+
<?php echo $field['label']; ?>
|
365 |
+
</label>
|
366 |
+
|
367 |
+
<?php
|
368 |
+
switch ( $field['type'] ) {
|
369 |
+
case 'textarea': ?>
|
370 |
+
<textarea name="<?php echo $field_name ?>" id="<?php echo $field_name ?>"
|
371 |
+
<?php echo $disabled; ?>
|
372 |
+
<?php echo $required; ?>
|
373 |
+
cols="30" rows="5"></textarea>
|
374 |
+
<?php break;
|
375 |
+
case 'password': ?>
|
376 |
+
<input type="password" name="<?php echo $field_name ?>" id="<?php echo $field_name ?>"
|
377 |
+
<?php echo $required; ?> <?php echo $disabled; ?>>
|
378 |
+
<?php break;
|
379 |
+
default: ?>
|
380 |
+
<input type="text" name="<?php echo $field_name ?>" id="<?php echo $field_name ?>"
|
381 |
+
<?php echo $required; ?> <?php echo $disabled; ?>>
|
382 |
+
<?php
|
383 |
+
break;
|
384 |
+
} ?>
|
385 |
+
</fieldset>
|
386 |
+
<?php
|
387 |
+
}
|
388 |
+
|
389 |
+
/**
|
390 |
+
* Retrieve the widget name.
|
391 |
+
*
|
392 |
+
* @since 1.0.0
|
393 |
+
* @access public
|
394 |
+
*
|
395 |
+
* @return string Widget name.
|
396 |
+
*/
|
397 |
+
public function get_name() {
|
398 |
+
return $this->name;
|
399 |
+
}
|
400 |
+
|
401 |
+
/**
|
402 |
+
* Set the widget name property
|
403 |
+
*/
|
404 |
+
private function set_name( $name ) {
|
405 |
+
$this->name = $name;
|
406 |
+
}
|
407 |
+
|
408 |
+
private function setFormType() {
|
409 |
+
$this->form_type = $this->get_data( 'widgetType' );
|
410 |
+
|
411 |
+
if ( empty( $this->form_type ) ) {
|
412 |
+
$this->form_type = $this->get_data( 'id' );
|
413 |
+
}
|
414 |
+
|
415 |
+
$this->form_type = str_replace( 'content_form_', '', $this->form_type );
|
416 |
+
}
|
417 |
+
|
418 |
+
private function setFormConfig( $config ) {
|
419 |
+
$this->forms_config = $config;
|
420 |
+
}
|
421 |
+
|
422 |
+
private function getFormConfig( $field = null ) {
|
423 |
+
|
424 |
+
if ( isset( $field ) ) {
|
425 |
+
|
426 |
+
if ( isset( $this->forms_config[ $field ] ) ) {
|
427 |
+
return $this->forms_config[ $field ];
|
428 |
+
}
|
429 |
+
|
430 |
+
return false;
|
431 |
+
}
|
432 |
+
|
433 |
+
return $this->forms_config;
|
434 |
+
}
|
435 |
+
|
436 |
+
private function getFormType() {
|
437 |
+
return $this->form_type;
|
438 |
+
}
|
439 |
+
|
440 |
+
/**
|
441 |
+
* Retrieve the widget title.
|
442 |
+
*
|
443 |
+
* @since 1.0.0
|
444 |
+
* @access public
|
445 |
+
*
|
446 |
+
* @return string Widget title.
|
447 |
+
*/
|
448 |
+
public function get_title() {
|
449 |
+
return $this->title;
|
450 |
+
}
|
451 |
+
|
452 |
+
/**
|
453 |
+
* Set the widget title property
|
454 |
+
*/
|
455 |
+
private function set_title( $title ) {
|
456 |
+
$this->title = $title;
|
457 |
+
}
|
458 |
+
|
459 |
+
/**
|
460 |
+
* Retrieve content form widget icon.
|
461 |
+
*
|
462 |
+
* @since 1.0.0
|
463 |
+
* @access public
|
464 |
+
*
|
465 |
+
* @return string Widget icon.
|
466 |
+
*/
|
467 |
+
public function get_icon() {
|
468 |
+
return $this->icon;
|
469 |
+
}
|
470 |
+
|
471 |
+
/**
|
472 |
+
* Set the widget title property
|
473 |
+
*/
|
474 |
+
private function set_icon( $icon ) {
|
475 |
+
$this->icon = $icon;
|
476 |
+
}
|
477 |
+
|
478 |
+
/**
|
479 |
+
* Widget Category.
|
480 |
+
*
|
481 |
+
* @return array
|
482 |
+
*/
|
483 |
+
public function get_categories() {
|
484 |
+
$category_args = apply_filters( 'content_forms_category_args', array() );
|
485 |
+
$slug = isset( $category_args['slug'] ) ? $category_args['slug'] : 'obfx-elementor-widgets';
|
486 |
+
return [ $slug ];
|
487 |
+
}
|
488 |
+
|
489 |
+
/**
|
490 |
+
* Extract widget settings based on a widget id and a page id
|
491 |
+
*
|
492 |
+
* @param $post_id
|
493 |
+
* @param $widget_id
|
494 |
+
*
|
495 |
+
* @return bool
|
496 |
+
*/
|
497 |
+
static function get_widget_settings( $widget_id, $post_id ) {
|
498 |
+
|
499 |
+
$el_data = \Elementor\Plugin::$instance->db->get_plain_editor( $post_id );
|
500 |
+
$el_data = apply_filters( 'elementor/frontend/builder_content_data', $el_data, $post_id );
|
501 |
+
|
502 |
+
if ( ! empty( $el_data ) ) {
|
503 |
+
return self::get_widget_data_by_id( $widget_id, $el_data );
|
504 |
+
}
|
505 |
+
|
506 |
+
return $el_data;
|
507 |
+
}
|
508 |
+
|
509 |
+
/**
|
510 |
+
* Recursively look through Elementor data and extract the settings for a specific
|
511 |
+
*
|
512 |
+
* @param $widget_id
|
513 |
+
* @param $el_data
|
514 |
+
*
|
515 |
+
* @return bool
|
516 |
+
*/
|
517 |
+
static function get_widget_data_by_id( $widget_id, $el_data ) {
|
518 |
+
|
519 |
+
if ( ! empty( $el_data ) ) {
|
520 |
+
foreach ( $el_data as $el ) {
|
521 |
+
|
522 |
+
if ( $el['elType'] === 'widget' && $el['id'] === $widget_id ) {
|
523 |
+
return $el;
|
524 |
+
} elseif ( ! empty( $el['elements'] ) ) {
|
525 |
+
$el = self::get_widget_data_by_id( $widget_id, $el['elements'] );
|
526 |
+
|
527 |
+
if ( $el ) {
|
528 |
+
return $el;
|
529 |
+
}
|
530 |
+
}
|
531 |
+
}
|
532 |
+
}
|
533 |
+
|
534 |
+
return false;
|
535 |
+
}
|
536 |
+
}
|
vendor/codeinwp/themeisle-content-forms/class-themeisle-content-forms-gutenberg.php
ADDED
@@ -0,0 +1,286 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace ThemeIsle\ContentForms;
|
4 |
+
|
5 |
+
|
6 |
+
/**
|
7 |
+
* This class is used to create a Gutenberg block based on a ContentForms config
|
8 |
+
* Class ContentFormsGutenbergModule
|
9 |
+
* @TODO This is a work in progress and for now we will start from the basisc example of a Gutenberg block.
|
10 |
+
*/
|
11 |
+
class GutenbergModule {
|
12 |
+
|
13 |
+
private $name;
|
14 |
+
|
15 |
+
private $form_type;
|
16 |
+
|
17 |
+
private $title;
|
18 |
+
|
19 |
+
private $icon;
|
20 |
+
|
21 |
+
private $forms_config = array();
|
22 |
+
|
23 |
+
public function __construct( $data ) {
|
24 |
+
|
25 |
+
$this->setup_attributes( $data );
|
26 |
+
$this->gutenberg_register_attributes();
|
27 |
+
add_action( 'enqueue_block_editor_assets', array( $this, 'gutenberg_enqueue_block_editor_assets' ) );
|
28 |
+
}
|
29 |
+
|
30 |
+
/**
|
31 |
+
* This method takes the given attributes and sets them as properties
|
32 |
+
*
|
33 |
+
* @param $data array
|
34 |
+
*/
|
35 |
+
private function setup_attributes( $data ) {
|
36 |
+
$this->form_type = $data['type'];
|
37 |
+
|
38 |
+
if ( ! empty( $data['content_forms_config'] ) ) {
|
39 |
+
$this->forms_config = $data['content_forms_config'];
|
40 |
+
} else {
|
41 |
+
$this->forms_config = apply_filters( 'content_forms_config_for_' . $this->form_type, $this->forms_config );
|
42 |
+
}
|
43 |
+
|
44 |
+
if ( ! empty( $data['id'] ) ) {
|
45 |
+
$this->set_name( $data['id'] );
|
46 |
+
}
|
47 |
+
|
48 |
+
if ( ! empty( $this->forms_config['title'] ) ) {
|
49 |
+
$this->set_title( $this->forms_config['title'] );
|
50 |
+
}
|
51 |
+
|
52 |
+
if ( ! empty( $this->forms_config['icon'] ) ) {
|
53 |
+
$this->set_icon( $this->forms_config['icon'] );
|
54 |
+
}
|
55 |
+
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Load our block generator once but for each type of form we need to localize the config
|
59 |
+
*/
|
60 |
+
function gutenberg_enqueue_block_editor_assets() {
|
61 |
+
|
62 |
+
if ( ! wp_script_is( 'gutenberg-content-forms' ) ) {
|
63 |
+
|
64 |
+
wp_enqueue_script(
|
65 |
+
'gutenberg-content-forms',
|
66 |
+
plugins_url( './assets/gutenberg-esnext/block.build.js', __FILE__ ),
|
67 |
+
array( 'wp-blocks', 'wp-i18n', 'wp-element', 'underscore' ),
|
68 |
+
filemtime( plugin_dir_path( __FILE__ ) . './assets/gutenberg-esnext/block.build.js' )
|
69 |
+
);
|
70 |
+
}
|
71 |
+
|
72 |
+
wp_localize_script(
|
73 |
+
'gutenberg-content-forms',
|
74 |
+
'content_forms_config_for_' . $this->form_type,
|
75 |
+
$this->forms_config
|
76 |
+
);
|
77 |
+
}
|
78 |
+
|
79 |
+
function gutenberg_enqueue_block_assets() {
|
80 |
+
wp_enqueue_style(
|
81 |
+
'gutenberg-examples-05',
|
82 |
+
plugins_url( 'style.css', __FILE__ ),
|
83 |
+
array( 'wp-blocks' ),
|
84 |
+
filemtime( plugin_dir_path( __FILE__ ) . 'style.css' )
|
85 |
+
);
|
86 |
+
}
|
87 |
+
|
88 |
+
function render_block( $attributes, $content ) {
|
89 |
+
$form_content = '';
|
90 |
+
$uid = $attributes['uid'];
|
91 |
+
$fields = $attributes['fields'];
|
92 |
+
wp_enqueue_script( 'content-forms' );
|
93 |
+
|
94 |
+
$form_header = $this->render_form_header( $uid );
|
95 |
+
$form_footer = $this->render_form_footer();
|
96 |
+
|
97 |
+
|
98 |
+
$btn_label = esc_html__( 'Submit', 'elementor-addon-widgets' );
|
99 |
+
ob_start();
|
100 |
+
if ( ! empty( $attributes['submit_label'] ) ) {
|
101 |
+
$btn_label = $attributes['submit_label'];
|
102 |
+
} ?>
|
103 |
+
<fieldset>
|
104 |
+
<button type="submit" name="submit" value="submit-<?php echo $this->getFormType(); ?>-<?php echo $uid; ?>">
|
105 |
+
<?php echo $btn_label; ?>
|
106 |
+
</button>
|
107 |
+
</fieldset>
|
108 |
+
<?php
|
109 |
+
|
110 |
+
$form_submit = ob_get_clean();
|
111 |
+
|
112 |
+
foreach ( $fields as $key => $field ) {
|
113 |
+
ob_start(); ?>
|
114 |
+
<fields>
|
115 |
+
<label for="<?php echo $key; ?>"><?php echo $field['label']; ?></label>
|
116 |
+
<input type="text" name="<?php echo $key; ?>">
|
117 |
+
</fields>
|
118 |
+
<?php
|
119 |
+
$form_content .= ob_get_clean();
|
120 |
+
}
|
121 |
+
|
122 |
+
$block_content = sprintf(
|
123 |
+
'<div class="content-form-fields" data-uid="%1$s">
|
124 |
+
<h3>%1$s</h3>
|
125 |
+
%2$s
|
126 |
+
%3$s
|
127 |
+
%4$s
|
128 |
+
%5$s
|
129 |
+
</div>',
|
130 |
+
$uid,
|
131 |
+
$form_header,
|
132 |
+
$form_content,
|
133 |
+
$form_submit,
|
134 |
+
$form_footer
|
135 |
+
);
|
136 |
+
|
137 |
+
return $block_content;
|
138 |
+
}
|
139 |
+
|
140 |
+
public function render_form_header( $id ) {
|
141 |
+
// create an url for the form's action
|
142 |
+
$url = admin_url( 'admin-post.php' );
|
143 |
+
|
144 |
+
ob_start();
|
145 |
+
|
146 |
+
echo '<form action="' . esc_url( $url ) . '" method="post" name="content-form-' . $id . '" id="content-form-' . $id . '" class="content-form content-form-' . $this->getFormType() . ' ' . $this->get_name() . '">';
|
147 |
+
|
148 |
+
wp_nonce_field( 'content-form-' . $id, '_wpnonce_' . $this->getFormType() );
|
149 |
+
|
150 |
+
echo '<input type="hidden" name="action" value="content_form_submit" />';
|
151 |
+
// there could be also the possibility to submit by type
|
152 |
+
// echo '<input type="hidden" name="action" value="content_form_{type}_submit" />';
|
153 |
+
echo '<input type="hidden" name="form-type" value="' . $this->getFormType() . '" />';
|
154 |
+
echo '<input type="hidden" name="form-builder" value="gutenberg" />';
|
155 |
+
echo '<input type="hidden" name="post-id" value="' . get_the_ID() . '" />';
|
156 |
+
echo '<input type="hidden" name="form-id" value="' . $id . '" />';
|
157 |
+
|
158 |
+
return ob_get_clean();
|
159 |
+
}
|
160 |
+
|
161 |
+
public function render_form_footer() {
|
162 |
+
return '</form>';
|
163 |
+
}
|
164 |
+
|
165 |
+
function gutenberg_register_attributes() {
|
166 |
+
$gutenberg_args = array(
|
167 |
+
'attributes' => array(
|
168 |
+
'uid' => array(
|
169 |
+
'type' => 'string',
|
170 |
+
'selector' => '.content-form-fields',
|
171 |
+
'source' => 'attribute',
|
172 |
+
'attribute' => 'data-uid'
|
173 |
+
),
|
174 |
+
'fields' => array(
|
175 |
+
'type' => 'array',
|
176 |
+
'source' => 'query',
|
177 |
+
'selector' => '.content-form-field-label',
|
178 |
+
'query' => array(
|
179 |
+
'field_id' => array(
|
180 |
+
'type' => 'string',
|
181 |
+
'source' => 'attribute',
|
182 |
+
'attribute' => 'data-field_id'
|
183 |
+
),
|
184 |
+
'label' => array(
|
185 |
+
'type' => 'string',
|
186 |
+
'source' => 'attribute',
|
187 |
+
'attribute' => 'data-label'
|
188 |
+
),
|
189 |
+
'requirement' => array(
|
190 |
+
'type' => 'string',
|
191 |
+
'source' => 'attribute',
|
192 |
+
'attribute' => 'data-requirement'
|
193 |
+
),
|
194 |
+
'type' => array(
|
195 |
+
'type' => 'string',
|
196 |
+
'source' => 'attribute',
|
197 |
+
'attribute' => 'data-field_type'
|
198 |
+
),
|
199 |
+
),
|
200 |
+
'default' => array(),
|
201 |
+
),
|
202 |
+
),
|
203 |
+
'render_callback' => array( $this, 'render_block' ),
|
204 |
+
);
|
205 |
+
|
206 |
+
// Create form settings
|
207 |
+
foreach ( $this->forms_config['controls'] as $name => $control ) {
|
208 |
+
$gutenberg_args['attributes'][ $name ] = array(
|
209 |
+
'type' => 'string',
|
210 |
+
'default' => isset( $control['default'] ) ? $control['default'] : '',
|
211 |
+
);
|
212 |
+
}
|
213 |
+
|
214 |
+
foreach ( $this->forms_config['fields'] as $name => $field ) {
|
215 |
+
$gutenberg_args['attributes']['fields']['default'][ $name ] = array(
|
216 |
+
'field_id' => $name,
|
217 |
+
'label' => $field['label'],
|
218 |
+
'type' => $field['type'],
|
219 |
+
'requirement' => ( $field['require'] === 'required' ) ? 'true' : 'false',
|
220 |
+
);
|
221 |
+
}
|
222 |
+
|
223 |
+
register_block_type( 'content-forms/' . $this->form_type, $gutenberg_args );
|
224 |
+
}
|
225 |
+
|
226 |
+
/**
|
227 |
+
* Retrieve the widget name.
|
228 |
+
*
|
229 |
+
* @since 1.0.0
|
230 |
+
* @access public
|
231 |
+
*
|
232 |
+
* @return string Widget name.
|
233 |
+
*/
|
234 |
+
public function get_name() {
|
235 |
+
return $this->name;
|
236 |
+
}
|
237 |
+
|
238 |
+
/**
|
239 |
+
* Set the widget name property
|
240 |
+
*/
|
241 |
+
private function set_name( $name ) {
|
242 |
+
$this->name = $name;
|
243 |
+
}
|
244 |
+
|
245 |
+
/**
|
246 |
+
* Retrieve the widget title.
|
247 |
+
*
|
248 |
+
* @since 1.0.0
|
249 |
+
* @access public
|
250 |
+
*
|
251 |
+
* @return string Widget title.
|
252 |
+
*/
|
253 |
+
public function get_title() {
|
254 |
+
return $this->title;
|
255 |
+
}
|
256 |
+
|
257 |
+
/**
|
258 |
+
* Set the widget title property
|
259 |
+
*/
|
260 |
+
private function set_title( $title ) {
|
261 |
+
$this->title = $title;
|
262 |
+
}
|
263 |
+
|
264 |
+
/**
|
265 |
+
* Retrieve content form widget icon.
|
266 |
+
*
|
267 |
+
* @since 1.0.0
|
268 |
+
* @access public
|
269 |
+
*
|
270 |
+
* @return string Widget icon.
|
271 |
+
*/
|
272 |
+
public function get_icon() {
|
273 |
+
return $this->icon;
|
274 |
+
}
|
275 |
+
|
276 |
+
/**
|
277 |
+
* Set the widget title property
|
278 |
+
*/
|
279 |
+
private function set_icon( $icon ) {
|
280 |
+
$this->icon = $icon;
|
281 |
+
}
|
282 |
+
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace ThemeIsle\ContentForms;
|
4 |
+
|
5 |
+
use ThemeIsle\ContentForms\ContentFormBase as Base;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Class NewsletterForm
|
9 |
+
* @package ThemeIsle\ContentForms
|
10 |
+
*/
|
11 |
+
class NewsletterForm extends Base {
|
12 |
+
|
13 |
+
/**
|
14 |
+
* @var NewsletterForm
|
15 |
+
*/
|
16 |
+
public static $instance = null;
|
17 |
+
|
18 |
+
/**
|
19 |
+
* The Call To Action
|
20 |
+
*/
|
21 |
+
public function init() {
|
22 |
+
$this->set_type( 'newsletter' );
|
23 |
+
|
24 |
+
$this->notices = array(
|
25 |
+
'success' => esc_html__( 'Welcome to our newsletter!', 'elementor-addon-widgets' ),
|
26 |
+
'error' => esc_html__( 'Action failed!', 'elementor-addon-widgets' ),
|
27 |
+
);
|
28 |
+
}
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Create an abstract array config which should define the form.
|
32 |
+
*
|
33 |
+
* @param $config
|
34 |
+
*
|
35 |
+
* @return array
|
36 |
+
*/
|
37 |
+
public function make_form_config( $config ) {
|
38 |
+
return array(
|
39 |
+
'id' => 'newsletter',
|
40 |
+
'icon' => 'eicon-align-left',
|
41 |
+
'title' => esc_html__( 'Newsletter Form', 'elementor-addon-widgets' ),
|
42 |
+
|
43 |
+
'controls' => array(
|
44 |
+
'provider' => array(
|
45 |
+
'type' => 'select',
|
46 |
+
'label' => esc_html__( 'Subscribe to', 'elementor-addon-widgets' ),
|
47 |
+
'description' => esc_html__( 'Where to send the email?', 'elementor-addon-widgets' ),
|
48 |
+
'options' => array(
|
49 |
+
'mailchimp' => esc_html__( 'MailChimp', 'elementor-addon-widgets' ),
|
50 |
+
'sendinblue' => esc_html__( 'Sendinblue ', 'elementor-addon-widgets' )
|
51 |
+
)
|
52 |
+
),
|
53 |
+
'access_key' => array(
|
54 |
+
'type' => 'text',
|
55 |
+
'label' => esc_html__( 'Access Key', 'elementor-addon-widgets' ),
|
56 |
+
'description' => esc_html__( 'Provide an access key for the selected service', 'elementor-addon-widgets' ),
|
57 |
+
'required' => true
|
58 |
+
),
|
59 |
+
'list_id' => array(
|
60 |
+
'type' => 'text',
|
61 |
+
'label' => esc_html__( 'List ID', 'elementor-addon-widgets' ),
|
62 |
+
'description' => esc_html__( 'The List ID (based on the seleced service) where we should subscribe the user', 'elementor-addon-widgets' ),
|
63 |
+
'required' => true
|
64 |
+
),
|
65 |
+
'submit_label' => array(
|
66 |
+
'type' => 'text',
|
67 |
+
'label' => esc_html__( 'Submit Label', 'elementor-addon-widgets' ),
|
68 |
+
'default' => esc_html__( 'Join Newsletter', 'elementor-addon-widgets' ),
|
69 |
+
)
|
70 |
+
),
|
71 |
+
|
72 |
+
'fields' => array(
|
73 |
+
'email' => array(
|
74 |
+
'type' => 'email',
|
75 |
+
'label' => esc_html__( 'Email', 'elementor-addon-widgets' ),
|
76 |
+
'default' => esc_html__( 'Email', 'elementor-addon-widgets' ),
|
77 |
+
'placeholder' => esc_html__( 'Email', 'elementor-addon-widgets' ),
|
78 |
+
'require' => 'required'
|
79 |
+
)
|
80 |
+
),
|
81 |
+
|
82 |
+
);
|
83 |
+
}
|
84 |
+
|
85 |
+
/**
|
86 |
+
* This method is passed to the rest controller and it is responsible for submitting the data.
|
87 |
+
*
|
88 |
+
* @param $return array
|
89 |
+
* @param $data array Must contain the following keys: `email` but it can also have extra keys
|
90 |
+
* @param $widget_id string
|
91 |
+
* @param $post_id string
|
92 |
+
* @param $builder string
|
93 |
+
*
|
94 |
+
* @return mixed
|
95 |
+
*/
|
96 |
+
public function rest_submit_form( $return, $data, $widget_id, $post_id, $builder ) {
|
97 |
+
|
98 |
+
if ( empty( $data['email'] ) || ! is_email( $data['email'] ) ) {
|
99 |
+
$return['msg'] = esc_html__( 'Invalid email.', 'elementor-addon-widgets' );
|
100 |
+
|
101 |
+
return $return;
|
102 |
+
}
|
103 |
+
|
104 |
+
$email = $data['email'];
|
105 |
+
|
106 |
+
// prepare settings for submit
|
107 |
+
$settings = $this->get_widget_settings( $widget_id, $post_id, $builder );
|
108 |
+
|
109 |
+
$provider = 'mailchimp';
|
110 |
+
|
111 |
+
if ( ! empty( $settings['provider'] ) ) {
|
112 |
+
$provider = $settings['provider'];
|
113 |
+
}
|
114 |
+
|
115 |
+
$providerArgs = array();
|
116 |
+
|
117 |
+
if ( empty( $settings['access_key'] ) || empty( $settings['list_id'] ) ) {
|
118 |
+
$return['msg'] = esc_html__( 'Wrong email configuration! Please contact administration!', 'elementor-addon-widgets' );
|
119 |
+
|
120 |
+
return $return;
|
121 |
+
}
|
122 |
+
|
123 |
+
$providerArgs['access_key'] = $settings['access_key'];
|
124 |
+
$providerArgs['list_id'] = $settings['list_id'];
|
125 |
+
|
126 |
+
$return = $this->_subscribe_mail( $return, $email, $provider, $providerArgs );
|
127 |
+
|
128 |
+
return $return;
|
129 |
+
}
|
130 |
+
|
131 |
+
/**
|
132 |
+
* Subscribe the given email to the given provider; either mailchimp or sendinblue.
|
133 |
+
*
|
134 |
+
* @param $result
|
135 |
+
* @param $email
|
136 |
+
* @param string $provider
|
137 |
+
* @param array $provider_args
|
138 |
+
*
|
139 |
+
* @return bool|array
|
140 |
+
*/
|
141 |
+
private function _subscribe_mail( $result, $email, $provider = 'mailchimp', $provider_args = array() ) {
|
142 |
+
|
143 |
+
$api_key = $provider_args['access_key'];
|
144 |
+
$list_id = $provider_args['list_id'];
|
145 |
+
|
146 |
+
switch ( $provider ) {
|
147 |
+
|
148 |
+
case 'mailchimp':
|
149 |
+
// add a pending subscription for the user to confirm
|
150 |
+
$status = 'pending';
|
151 |
+
|
152 |
+
$args = array(
|
153 |
+
'method' => 'PUT',
|
154 |
+
'headers' => array(
|
155 |
+
'Authorization' => 'Basic ' . base64_encode( 'user:' . $api_key )
|
156 |
+
),
|
157 |
+
'body' => json_encode( array(
|
158 |
+
'email_address' => $email,
|
159 |
+
'status' => $status
|
160 |
+
) )
|
161 |
+
);
|
162 |
+
|
163 |
+
$url = 'https://' . substr( $api_key, strpos( $api_key, '-' ) + 1 ) . '.api.mailchimp.com/3.0/lists/' . $list_id . '/members/' . md5( strtolower( $email ) );
|
164 |
+
|
165 |
+
$response = wp_remote_post( $url, $args );
|
166 |
+
|
167 |
+
if ( is_wp_error( $response ) || 200 != wp_remote_retrieve_response_code( $response ) ) {
|
168 |
+
return $response;
|
169 |
+
}
|
170 |
+
|
171 |
+
$body = json_decode( wp_remote_retrieve_body( $response ), true );
|
172 |
+
|
173 |
+
if ( $body->status == $status ) {
|
174 |
+
$result['success'] = true;
|
175 |
+
$result['msg'] = $this->notices['success'];
|
176 |
+
} else {
|
177 |
+
$result['success'] = false;
|
178 |
+
$result['msg'] = $this->notices['error'];
|
179 |
+
}
|
180 |
+
|
181 |
+
return $result;
|
182 |
+
break;
|
183 |
+
case 'sendinblue':
|
184 |
+
|
185 |
+
$url = 'https://api.sendinblue.com/v3/contacts';
|
186 |
+
|
187 |
+
$args = array(
|
188 |
+
'method' => 'POST',
|
189 |
+
'headers' => array(
|
190 |
+
'content-type' => 'application/json',
|
191 |
+
'api-key' => $api_key
|
192 |
+
),
|
193 |
+
'body' => json_encode( array(
|
194 |
+
'email' => $email,
|
195 |
+
'listIds' => array( (int) $list_id ),
|
196 |
+
'emailBlacklisted' => false,
|
197 |
+
'smsBlacklisted' => false,
|
198 |
+
) )
|
199 |
+
);
|
200 |
+
|
201 |
+
$response = wp_remote_post( $url, $args );
|
202 |
+
|
203 |
+
if ( is_wp_error( $response ) || 200 != wp_remote_retrieve_response_code( $response ) ) {
|
204 |
+
|
205 |
+
$body = json_decode( wp_remote_retrieve_body( $response ), true );
|
206 |
+
|
207 |
+
if ( ! empty( $body['message'] ) ) {
|
208 |
+
$result['msg'] = $body['message'];
|
209 |
+
} else {
|
210 |
+
$result['msg'] = $response;
|
211 |
+
}
|
212 |
+
|
213 |
+
return $result;
|
214 |
+
}
|
215 |
+
|
216 |
+
$result['success'] = true;
|
217 |
+
$result['msg'] = $this->notices['success'];
|
218 |
+
|
219 |
+
return $result;
|
220 |
+
break;
|
221 |
+
|
222 |
+
default;
|
223 |
+
break;
|
224 |
+
}
|
225 |
+
|
226 |
+
return false;
|
227 |
+
}
|
228 |
+
|
229 |
+
/**
|
230 |
+
* @static
|
231 |
+
* @since 1.0.0
|
232 |
+
* @access public
|
233 |
+
* @return NewsletterForm
|
234 |
+
*/
|
235 |
+
public static function instance() {
|
236 |
+
if ( is_null( self::$instance ) ) {
|
237 |
+
self::$instance = new self();
|
238 |
+
self::$instance->init();
|
239 |
+
}
|
240 |
+
|
241 |
+
return self::$instance;
|
242 |
+
}
|
243 |
+
|
244 |
+
/**
|
245 |
+
* Throw error on object clone
|
246 |
+
*
|
247 |
+
* The whole idea of the singleton design pattern is that there is a single
|
248 |
+
* object therefore, we don't want the object to be cloned.
|
249 |
+
*
|
250 |
+
* @access public
|
251 |
+
* @since 1.0.0
|
252 |
+
* @return void
|
253 |
+
*/
|
254 |
+
public function __clone() {
|
255 |
+
// Cloning instances of the class is forbidden.
|
256 |
+
_doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin’ huh?', 'elementor-addon-widgets' ), '1.0.0' );
|
257 |
+
}
|
258 |
+
|
259 |
+
/**
|
260 |
+
* Disable unserializing of the class
|
261 |
+
*
|
262 |
+
* @access public
|
263 |
+
* @since 1.0.0
|
264 |
+
* @return void
|
265 |
+
*/
|
266 |
+
public function __wakeup() {
|
267 |
+
// Unserializing instances of the class is forbidden.
|
268 |
+
_doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin’ huh?', 'elementor-addon-widgets' ), '1.0.0' );
|
269 |
+
}
|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
|
3 |
+
namespace ThemeIsle\ContentForms;
|
4 |
+
|
5 |
+
use ThemeIsle\ContentForms\ContentFormBase as Base;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Class RegistrationForm
|
9 |
+
* @package ThemeIsle\ContentForms
|
10 |
+
*/
|
11 |
+
class RegistrationForm extends Base {
|
12 |
+
|
13 |
+
/**
|
14 |
+
* @var RegistrationForm
|
15 |
+
*/
|
16 |
+
public static $instance = null;
|
17 |
+
|
18 |
+
/**
|
19 |
+
* The Call To Action
|
20 |
+
*/
|
21 |
+
public function init() {
|
22 |
+
$this->set_type( 'registration' );
|
23 |
+
|
24 |
+
$this->notices = array(
|
25 |
+
'success' => esc_html__( 'Your message has been sent!', 'elementor-addon-widgets' ),
|
26 |
+
'error' => esc_html__( 'We failed to send your message!', 'elementor-addon-widgets' ),
|
27 |
+
);
|
28 |
+
}
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Create an abstract array config which should define the form.
|
32 |
+
*
|
33 |
+
* @param $config
|
34 |
+
*
|
35 |
+
* @return array
|
36 |
+
*/
|
37 |
+
public function make_form_config( $config ) {
|
38 |
+
|
39 |
+
return array(
|
40 |
+
'id' => $this->get_type(),
|
41 |
+
'icon' => 'eicon-align-left',
|
42 |
+
'title' => esc_html__( 'User Registration Form', 'elementor-addon-widgets' ),
|
43 |
+
|
44 |
+
'fields' => array(
|
45 |
+
'username' => array(
|
46 |
+
'type' => 'text',
|
47 |
+
'label' => esc_html__( 'User Name', 'elementor-addon-widgets' ),
|
48 |
+
'default' => esc_html__( 'User Name', 'elementor-addon-widgets' ),
|
49 |
+
'placeholder' => esc_html__( 'User Name', 'elementor-addon-widgets' ),
|
50 |
+
'require' => 'required',
|
51 |
+
'validation' => ''// name a function which should allow only letters and numbers
|
52 |
+
),
|
53 |
+
'email' => array(
|
54 |
+
'type' => 'email',
|
55 |
+
'label' => esc_html__( 'Email', 'elementor-addon-widgets' ),
|
56 |
+
'default' => esc_html__( 'Email', 'elementor-addon-widgets' ),
|
57 |
+
'placeholder' => esc_html__( 'Email', 'elementor-addon-widgets' ),
|
58 |
+
'require' => 'required'
|
59 |
+
),
|
60 |
+
'password' => array(
|
61 |
+
'type' => 'password',
|
62 |
+
'label' => esc_html__( 'Password', 'elementor-addon-widgets' ),
|
63 |
+
'default' => esc_html__( 'Password', 'elementor-addon-widgets' ),
|
64 |
+
'placeholder' => esc_html__( 'Password', 'elementor-addon-widgets' ),
|
65 |
+
'require' => 'required'
|
66 |
+
)
|
67 |
+
),
|
68 |
+
|
69 |
+
'controls' => array(
|
70 |
+
'submit_label' => array(
|
71 |
+
'type' => 'text',
|
72 |
+
'label' => esc_html__( 'Submit', 'elementor-addon-widgets' ),
|
73 |
+
'default' => esc_html__( 'Register', 'elementor-addon-widgets' ),
|
74 |
+
'description' => esc_html__( 'The Call To Action label', 'elementor-addon-widgets' )
|
75 |
+
)
|
76 |
+
)
|
77 |
+
);
|
78 |
+
}
|
79 |
+
|
80 |
+
/**
|
81 |
+
* This method is passed to the rest controller and it is responsible for submitting the data.
|
82 |
+
* // @TODO we still have to check for the requirement with the field settings
|
83 |
+
*
|
84 |
+
* @param $return array
|
85 |
+
* @param $data array Must contain the following keys: `email`, `name` but it can also have extra keys
|
86 |
+
* @param $widget_id string
|
87 |
+
* @param $post_id string
|
88 |
+
* @param $builder string
|
89 |
+
*
|
90 |
+
* @return mixed
|
91 |
+
*/
|
92 |
+
public function rest_submit_form( $return, $data, $widget_id, $post_id, $builder ) {
|
93 |
+
|
94 |
+
if ( empty( $data['email'] ) || ! is_email( $data['email'] ) ) {
|
95 |
+
$return['msg'] = esc_html__( 'Invalid email.', 'elementor-addon-widgets' );
|
96 |
+
|
97 |
+
return $return;
|
98 |
+
}
|
99 |
+
|
100 |
+
$email = sanitize_email( $data['email'] );
|
101 |
+
|
102 |
+
unset( $data['email'] );
|
103 |
+
|
104 |
+
if ( empty( $data['username'] ) ) {
|
105 |
+
$username = $email;
|
106 |
+
} else {
|
107 |
+
$username = sanitize_user( $data['username'] );
|
108 |
+
}
|
109 |
+
|
110 |
+
unset( $data['username'] );
|
111 |
+
|
112 |
+
// if there is no password we will auto-generate one
|
113 |
+
$password = null;
|
114 |
+
|
115 |
+
if ( ! empty( $data['password'] ) ) {
|
116 |
+
$password = $data['password'];
|
117 |
+
unset( $data['password'] );
|
118 |
+
}
|
119 |
+
|
120 |
+
$return = $this->_register_user( $return, $email, $username, $password, $data );
|
121 |
+
|
122 |
+
return $return;
|
123 |
+
}
|
124 |
+
|
125 |
+
/**
|
126 |
+
* Add a new user for the given details
|
127 |
+
*
|
128 |
+
* @param array $return
|
129 |
+
* @param string $user_email
|
130 |
+
* @param string $user_name
|
131 |
+
* @param null $password
|
132 |
+
* @param array $extra_data
|
133 |
+
*
|
134 |
+
* @return array mixed
|
135 |
+
*/
|
136 |
+
private function _register_user( $return, $user_email, $user_name, $password = null, $extra_data = array() ) {
|
137 |
+
|
138 |
+
if ( ! get_option( 'users_can_register' ) ) {
|
139 |
+
$return['msg'] = esc_html__( 'This website does not allow registrations at this moment!', 'elementor-addon-widgets' );
|
140 |
+
|
141 |
+
return $return;
|
142 |
+
}
|
143 |
+
|
144 |
+
if ( ! validate_username( $user_name ) ) {
|
145 |
+
$return['msg'] = esc_html__( 'Invalid user name', 'elementor-addon-widgets' );
|
146 |
+
|
147 |
+
return $return;
|
148 |
+
}
|
149 |
+
|
150 |
+
if ( username_exists( $user_name ) ) {
|
151 |
+
$return['msg'] = esc_html__( 'Username already exists', 'elementor-addon-widgets' );
|
152 |
+
|
153 |
+
return $return;
|
154 |
+
}
|
155 |
+
|
156 |
+
if ( email_exists( $user_email ) ) {
|
157 |
+
$return['msg'] = esc_html__( 'This email is already registered', 'elementor-addon-widgets' );
|
158 |
+
return $return;
|
159 |
+
}
|
160 |
+
|
161 |
+
// no pass? ok
|
162 |
+
if ( empty( $password ) ) {
|
163 |
+
$password = wp_generate_password(
|
164 |
+
$length = 12,
|
165 |
+
$include_standard_special_chars = false
|
166 |
+
);
|
167 |
+
}
|
168 |
+
|
169 |
+
$userdata = array(
|
170 |
+
'user_login' => $user_name,
|
171 |
+
'user_email' => $user_email,
|
172 |
+
'user_pass' => $password
|
173 |
+
);
|
174 |
+
|
175 |
+
$user_id = wp_insert_user( $userdata );
|
176 |
+
|
177 |
+
if ( ! is_wp_error( $user_id ) ) {
|
178 |
+
|
179 |
+
if ( ! empty( $extra_data ) ) {
|
180 |
+
foreach ( $extra_data as $key => $value ) {
|
181 |
+
update_user_meta( $user_id, sanitize_title( $key ), sanitize_text_field( $value ) );
|
182 |
+
}
|
183 |
+
}
|
184 |
+
|
185 |
+
$return['success'] = true;
|
186 |
+
$return['msg'] = esc_html__( 'Welcome, ', 'elementor-addon-widgets' ) . $user_name;
|
187 |
+
}
|
188 |
+
|
189 |
+
return $return;
|
190 |
+
}
|
191 |
+
|
192 |
+
|
193 |
+
/**
|
194 |
+
* @static
|
195 |
+
* @since 1.0.0
|
196 |
+
* @access public
|
197 |
+
* @return RegistrationForm
|
198 |
+
*/
|
199 |
+
public static function instance() {
|
200 |
+
if ( is_null( self::$instance ) ) {
|
201 |
+
self::$instance = new self();
|
202 |
+
self::$instance->init();
|
203 |
+
}
|
204 |
+
|
205 |
+
return self::$instance;
|
206 |
+
}
|
207 |
+
|
208 |
+
/**
|
209 |
+
* Throw error on object clone
|
210 |
+
*
|
211 |
+
* The whole idea of the singleton design pattern is that there is a single
|
212 |
+
* object therefore, we don't want the object to be cloned.
|
213 |
+
*
|
214 |
+
* @access public
|
215 |
+
* @since 1.0.0
|
216 |
+
* @return void
|
217 |
+
*/
|
218 |
+
public function __clone() {
|
219 |
+
// Cloning instances of the class is forbidden.
|
220 |
+
_doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin’ huh?', 'elementor-addon-widgets' ), '1.0.0' );
|
221 |
+
}
|
222 |
+
|
223 |
+
/**
|
224 |
+
* Disable unserializing of the class
|
225 |
+
*
|
226 |
+
* @access public
|
227 |
+
* @since 1.0.0
|
228 |
+
* @return void
|
229 |
+
*/
|
230 |
+
public function __wakeup() {
|
231 |
+
// Unserializing instances of the class is forbidden.
|
232 |
+
_doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin’ huh?', 'elementor-addon-widgets' ), '1.0.0' );
|
233 |
+
}
|
234 |
+
}
|
vendor/codeinwp/themeisle-content-forms/class-themeisle-content-forms-server.php
ADDED
@@ -0,0 +1,158 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace ThemeIsle\ContentForms;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Class RestServer
|
7 |
+
*
|
8 |
+
*/
|
9 |
+
class RestServer extends \WP_Rest_Controller {
|
10 |
+
|
11 |
+
/**
|
12 |
+
* @var RestServer
|
13 |
+
*/
|
14 |
+
public static $instance = null;
|
15 |
+
|
16 |
+
public $namespace = 'content-forms/';
|
17 |
+
public $version = 'v1';
|
18 |
+
|
19 |
+
public function init() {
|
20 |
+
add_action( 'rest_api_init', array( $this, 'register_routes' ) );
|
21 |
+
}
|
22 |
+
|
23 |
+
public function register_routes() {
|
24 |
+
$namespace = $this->namespace . $this->version;
|
25 |
+
|
26 |
+
register_rest_route( $namespace, '/check', array(
|
27 |
+
array(
|
28 |
+
'methods' => \WP_REST_Server::READABLE,
|
29 |
+
'callback' => array( $this, 'rest_check' )
|
30 |
+
),
|
31 |
+
) );
|
32 |
+
|
33 |
+
register_rest_route( $namespace, '/submit', array(
|
34 |
+
array(
|
35 |
+
'methods' => \WP_REST_Server::CREATABLE,
|
36 |
+
'callback' => array( $this, 'submit_form' ),
|
37 |
+
'permission_callback' => array( $this, 'submit_forms_permissions_check' ),
|
38 |
+
'args' => array(
|
39 |
+
'form_type' => array(
|
40 |
+
'type' => 'string',
|
41 |
+
'required' => true,
|
42 |
+
'description' => __( 'What type of form is submitted.', 'elementor-addon-widgets' ),
|
43 |
+
),
|
44 |
+
'nonce' => array(
|
45 |
+
'type' => 'string',
|
46 |
+
'required' => true,
|
47 |
+
'description' => __( 'The security key', 'elementor-addon-widgets' ),
|
48 |
+
),
|
49 |
+
'data' => array(
|
50 |
+
'type' => 'json',
|
51 |
+
'required' => true,
|
52 |
+
'description' => __( 'The form must have data', 'elementor-addon-widgets' ),
|
53 |
+
),
|
54 |
+
'form_id' => array(
|
55 |
+
'type' => 'string',
|
56 |
+
'required' => true,
|
57 |
+
'description' => __( 'The form identifier.', 'elementor-addon-widgets' ),
|
58 |
+
),
|
59 |
+
'post_id' => array(
|
60 |
+
'type' => 'string',
|
61 |
+
'required' => true,
|
62 |
+
'description' => __( 'The form identifier.', 'elementor-addon-widgets' ),
|
63 |
+
)
|
64 |
+
),
|
65 |
+
),
|
66 |
+
) );
|
67 |
+
}
|
68 |
+
|
69 |
+
public function rest_check( \WP_REST_Request $request ) {
|
70 |
+
return rest_ensure_response( 'success' );
|
71 |
+
}
|
72 |
+
|
73 |
+
/**
|
74 |
+
* @param \WP_REST_Request $request
|
75 |
+
*
|
76 |
+
* @return mixed|\WP_REST_Response
|
77 |
+
*/
|
78 |
+
public function submit_form( $request ) {
|
79 |
+
$return = array(
|
80 |
+
'success' => false,
|
81 |
+
'msg' => esc_html__( 'Something went wrong', 'elementor-addon-widgets' )
|
82 |
+
);
|
83 |
+
|
84 |
+
$nonce = $request->get_param( 'nonce' );
|
85 |
+
$form_id = $request->get_param( 'form_id' );
|
86 |
+
$post_id = $request->get_param( 'post_id' );
|
87 |
+
|
88 |
+
if ( ! wp_verify_nonce( $nonce, 'content-form-' . $form_id ) ) {
|
89 |
+
$return['msg'] = 'Invalid nonce';
|
90 |
+
return rest_ensure_response( $return );
|
91 |
+
}
|
92 |
+
|
93 |
+
$form_type = $request->get_param( 'form_type' );
|
94 |
+
$form_builder = $request->get_param( 'form_builder' );
|
95 |
+
$data = $request->get_param( 'data' );
|
96 |
+
|
97 |
+
if ( empty( $data[ $form_id ] ) ) {
|
98 |
+
$return['msg'] = esc_html__( 'Invalid Data ', 'elementor-addon-widgets' ) . $form_id;
|
99 |
+
return $return;
|
100 |
+
}
|
101 |
+
|
102 |
+
$data = $data[ $form_id ];
|
103 |
+
|
104 |
+
/**
|
105 |
+
* Each form type should be able to provide its own process of submitting data.
|
106 |
+
* Must return the success status and a message.
|
107 |
+
*/
|
108 |
+
$return = apply_filters( 'content_forms_submit_' . $form_type, $return, $data, $form_id, $post_id, $form_builder );
|
109 |
+
|
110 |
+
return rest_ensure_response( $return );
|
111 |
+
}
|
112 |
+
|
113 |
+
public function submit_forms_permissions_check() {
|
114 |
+
return 1;
|
115 |
+
}
|
116 |
+
|
117 |
+
/**
|
118 |
+
* @static
|
119 |
+
* @since 1.0.0
|
120 |
+
* @access public
|
121 |
+
* @return RestServer
|
122 |
+
*/
|
123 |
+
public static function instance() {
|
124 |
+
if ( is_null( self::$instance ) ) {
|
125 |
+
self::$instance = new self();
|
126 |
+
self::$instance->init();
|
127 |
+
}
|
128 |
+
|
129 |
+
return self::$instance;
|
130 |
+
}
|
131 |
+
|
132 |
+
/**
|
133 |
+
* Throw error on object clone
|
134 |
+
*
|
135 |
+
* The whole idea of the singleton design pattern is that there is a single
|
136 |
+
* object therefore, we don't want the object to be cloned.
|
137 |
+
*
|
138 |
+
* @access public
|
139 |
+
* @since 1.0.0
|
140 |
+
* @return void
|
141 |
+
*/
|
142 |
+
public function __clone() {
|
143 |
+
// Cloning instances of the class is forbidden.
|
144 |
+
_doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin’ huh?', 'elementor-addon-widgets' ), '1.0.0' );
|
145 |
+
}
|
146 |
+
|
147 |
+
/**
|
148 |
+
* Disable unserializing of the class
|
149 |
+
*
|
150 |
+
* @access public
|
151 |
+
* @since 1.0.0
|
152 |
+
* @return void
|
153 |
+
*/
|
154 |
+
public function __wakeup() {
|
155 |
+
// Unserializing instances of the class is forbidden.
|
156 |
+
_doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin’ huh?', 'elementor-addon-widgets' ), '1.0.0' );
|
157 |
+
}
|
158 |
+
}
|
vendor/codeinwp/themeisle-content-forms/composer.json
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "codeinwp/themeisle-content-forms",
|
3 |
+
"version": "1.0.1",
|
4 |
+
"description": "ThemeIsle Content Forms ",
|
5 |
+
"keywords": [
|
6 |
+
"wordpress"
|
7 |
+
],
|
8 |
+
"homepage": "https://github.com/Codeinwp/themeisle-content-forms",
|
9 |
+
"license": "GPL-2.0-or-later",
|
10 |
+
"authors": [
|
11 |
+
{
|
12 |
+
"name": "ThemeIsle team",
|
13 |
+
"email": "friends@themeisle.com",
|
14 |
+
"homepage": "https://themeisle.com"
|
15 |
+
}
|
16 |
+
],
|
17 |
+
"autoload": {
|
18 |
+
"files": [
|
19 |
+
"load.php"
|
20 |
+
]
|
21 |
+
},
|
22 |
+
"support": {
|
23 |
+
"issues": "https://github.com/Codeinwp/themeisle-content-forms/issues"
|
24 |
+
}
|
25 |
+
}
|
vendor/codeinwp/themeisle-content-forms/index.php
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @package ThemeIsle\ContentForms
|
4 |
+
* Ignore this.
|
5 |
+
*/
|
vendor/codeinwp/themeisle-content-forms/load.php
ADDED
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Loader for the ThemeIsle\ContentForms feature
|
4 |
+
*
|
5 |
+
* @package ThemeIsle\ContentForms
|
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 |
+
if ( ! function_exists( 'themeisle_content_forms_load' ) ) :
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Load the necessary resource for this library
|
15 |
+
*/
|
16 |
+
function themeisle_content_forms_load() {
|
17 |
+
$path = dirname( __FILE__ );
|
18 |
+
|
19 |
+
// @TODO we should autoload these
|
20 |
+
// get base classes
|
21 |
+
require_once $path . '/class-content-form-base.php';
|
22 |
+
require_once $path . '/class-themeisle-content-forms-server.php';
|
23 |
+
|
24 |
+
\Themeisle\ContentForms\RestServer::instance();
|
25 |
+
|
26 |
+
if ( defined( 'ELEMENTOR_PATH' ) && class_exists( 'Elementor\Widget_Base' ) ) {
|
27 |
+
// get builders generators
|
28 |
+
require_once $path . '/class-themeisle-content-forms-elementor.php';
|
29 |
+
}
|
30 |
+
|
31 |
+
if ( class_exists( '\FLBuilderModel' ) ) {
|
32 |
+
require_once $path . '/beaver/class-themeisle-content-forms-beaver-base.php';
|
33 |
+
require_once $path . '/beaver/class-themeisle-content-forms-beaver-contact.php';
|
34 |
+
require_once $path . '/beaver/class-themeisle-content-forms-beaver-newsletter.php';
|
35 |
+
require_once $path . '/beaver/class-themeisle-content-forms-beaver-registration.php';
|
36 |
+
}
|
37 |
+
|
38 |
+
// @TODO Gutenberg is not working yet
|
39 |
+
//require_once $path . '/class-themeisle-content-forms-gutenberg.php';
|
40 |
+
|
41 |
+
// get forms
|
42 |
+
require_once $path . '/class-themeisle-content-forms-contact.php';
|
43 |
+
require_once $path . '/class-themeisle-content-forms-newsletter.php';
|
44 |
+
require_once $path . '/class-themeisle-content-forms-registration.php';
|
45 |
+
|
46 |
+
/**
|
47 |
+
* At this point all the PHP classes are available and the forms can be loaded
|
48 |
+
*/
|
49 |
+
do_action( 'init_themeisle_content_forms' );
|
50 |
+
|
51 |
+
// Register CSS & JS assets + localizations
|
52 |
+
add_action( 'wp_enqueue_scripts', 'themeisle_content_forms_register_public_assets' );
|
53 |
+
}
|
54 |
+
endif;
|
55 |
+
|
56 |
+
if ( ! function_exists( 'themeisle_content_forms_register_public_assets' ) ) :
|
57 |
+
/**
|
58 |
+
* Register the library assets, they will be enqueue later by builders.
|
59 |
+
* Also, localize REST params
|
60 |
+
*/
|
61 |
+
function themeisle_content_forms_register_public_assets() {
|
62 |
+
$version = null; // a null version will go for a WordPress core version
|
63 |
+
|
64 |
+
$package = json_decode( file_get_contents( dirname( __FILE__ ) . '/composer.json' ) );
|
65 |
+
|
66 |
+
if ( isset( $package->version ) ) {
|
67 |
+
$version = $package->version;
|
68 |
+
}
|
69 |
+
|
70 |
+
wp_register_script( 'content-forms', plugins_url( '/assets/content-forms.js', __FILE__ ), array( 'jquery' ), $version );
|
71 |
+
|
72 |
+
wp_localize_script( 'content-forms', 'contentFormsSettings', array(
|
73 |
+
'restUrl' => esc_url_raw( rest_url() . 'content-forms/v1/' ),
|
74 |
+
'nonce' => wp_create_nonce( 'wp_rest' ),
|
75 |
+
) );
|
76 |
+
|
77 |
+
/**
|
78 |
+
* Use this filter to force the js loading on all pages.
|
79 |
+
* Otherwise, it will be loaded only if a content form is present
|
80 |
+
*/
|
81 |
+
if ( apply_filters( 'themeisle_content_forms_force_js_enqueue', false ) ) {
|
82 |
+
wp_enqueue_script( 'content-forms' );
|
83 |
+
}
|
84 |
+
|
85 |
+
/**
|
86 |
+
* Every theme with a better form style can disable the default content forms styles by returning a false
|
87 |
+
* to this filter `themeisle_content_forms_register_default_style`.
|
88 |
+
*/
|
89 |
+
if ( true === apply_filters( 'themeisle_content_forms_register_default_style', true ) ) {
|
90 |
+
wp_register_style( 'content-forms', plugins_url( '/assets/content-forms.css', __FILE__ ), array(), $version );
|
91 |
+
}
|
92 |
+
}
|
93 |
+
endif;
|
94 |
+
|
95 |
+
// Run the show only for PHP 5.3 or highier
|
96 |
+
if ( version_compare( PHP_VERSION, '5.3', '>=' ) ) {
|
97 |
+
add_action( 'init', 'themeisle_content_forms_load', 9 );
|
98 |
+
}
|
vendor/codeinwp/themeisle-sdk/LICENSE
ADDED
@@ -0,0 +1,674 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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>.
|
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-endpoints.php
ADDED
@@ -0,0 +1,312 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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' =>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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQyIDc5LjE2MDkyNCwgMjAxNy8wNy8xMy0wMTowNjozOSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyL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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['type'] ) && isset( $_POST['key'] ) && 'theme' === $_POST['type'] ) {
|
552 |
+
set_transient( 'ti_sdk_pause_' . $_POST['key'], true, PAUSE_DEACTIVATE_WINDOW_DAYS * DAY_IN_SECONDS );
|
553 |
+
}
|
554 |
+
}
|
555 |
+
}
|
556 |
+
endif;
|
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback-factory.php
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,209 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,983 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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;
|
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback.php
ADDED
@@ -0,0 +1,90 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,692 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
$this->product_key = $this->product->get_key() . '-update-response';
|
54 |
+
if ( ! $this->product->requires_license() ) {
|
55 |
+
$this->license_key = 'free';
|
56 |
+
} else {
|
57 |
+
$license_data = get_option( $this->product->get_key() . '_license_data', '' );
|
58 |
+
$this->failed_checks = intval( get_option( $this->product->get_key() . '_failed_checks', 0 ) );
|
59 |
+
if ( $license_data !== '' ) {
|
60 |
+
$this->license_key = isset( $license_data->key ) ? $license_data->key : get_option( $this->product->get_key() . '_license', '' );
|
61 |
+
} else {
|
62 |
+
$this->license_key = get_option( $this->product->get_key() . '_license', '' );
|
63 |
+
}
|
64 |
+
$this->register_license_hooks();
|
65 |
+
}
|
66 |
+
}
|
67 |
+
|
68 |
+
/**
|
69 |
+
* Register license hooks for the themeisle products
|
70 |
+
*/
|
71 |
+
public function register_license_hooks() {
|
72 |
+
add_action( 'admin_init', array( $this, 'register_settings' ) );
|
73 |
+
add_action( 'admin_init', array( $this, 'activate_license' ) );
|
74 |
+
add_action( 'admin_init', array( $this, 'product_valid' ), 99999999 );
|
75 |
+
add_action( 'admin_notices', array( $this, 'show_notice' ) );
|
76 |
+
add_filter( $this->product->get_key() . '_license_status', array( $this, 'get_license_status' ) );
|
77 |
+
}
|
78 |
+
|
79 |
+
/**
|
80 |
+
* @param string $r Update payload.
|
81 |
+
* @param string $url The api url.
|
82 |
+
*
|
83 |
+
* @return mixed List of themes to check for update.
|
84 |
+
*/
|
85 |
+
function disable_wporg_update( $r, $url ) {
|
86 |
+
|
87 |
+
if ( 0 !== strpos( $url, 'https://api.wordpress.org/themes/update-check/' ) ) {
|
88 |
+
return $r;
|
89 |
+
}
|
90 |
+
|
91 |
+
// Decode the JSON response
|
92 |
+
$themes = json_decode( $r['body']['themes'] );
|
93 |
+
|
94 |
+
unset( $themes->themes->{$this->product->get_slug()} );
|
95 |
+
|
96 |
+
// Encode the updated JSON response
|
97 |
+
$r['body']['themes'] = json_encode( $themes );
|
98 |
+
|
99 |
+
return $r;
|
100 |
+
}
|
101 |
+
|
102 |
+
/**
|
103 |
+
* Register the setting for the license of the product
|
104 |
+
*
|
105 |
+
* @return bool
|
106 |
+
*/
|
107 |
+
public function register_settings() {
|
108 |
+
if ( ! is_admin() ) {
|
109 |
+
return false;
|
110 |
+
}
|
111 |
+
add_settings_field(
|
112 |
+
$this->product->get_key() . '_license',
|
113 |
+
$this->product->get_name() . ' license',
|
114 |
+
array( $this, 'license_view' ),
|
115 |
+
'general'
|
116 |
+
);
|
117 |
+
}
|
118 |
+
|
119 |
+
/**
|
120 |
+
* The license view field
|
121 |
+
*/
|
122 |
+
public function license_view() {
|
123 |
+
$status = $this->get_license_status();
|
124 |
+
$value = $this->license_key;
|
125 |
+
|
126 |
+
$activate_string = apply_filters( $this->product->get_key() . '_lc_activate_string', 'Activate' );
|
127 |
+
$deactivate_string = apply_filters( $this->product->get_key() . '_lc_deactivate_string', 'Deactivate' );
|
128 |
+
$valid_string = apply_filters( $this->product->get_key() . '_lc_valid_string', 'Valid' );
|
129 |
+
$invalid_string = apply_filters( $this->product->get_key() . '_lc_invalid_string', 'Invalid' );
|
130 |
+
$license_message = apply_filters( $this->product->get_key() . '_lc_license_message', 'Enter your license from %s purchase history in order to get %s updates' );
|
131 |
+
|
132 |
+
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>';
|
133 |
+
|
134 |
+
}
|
135 |
+
|
136 |
+
/**
|
137 |
+
* Return the license status.
|
138 |
+
*
|
139 |
+
* @return string The License status.
|
140 |
+
*/
|
141 |
+
public function get_license_status() {
|
142 |
+
$license_data = get_option( $this->product->get_key() . '_license_data', '' );
|
143 |
+
if ( $license_data !== '' ) {
|
144 |
+
return isset( $license_data->license ) ? $license_data->license : get_option( $this->product->get_key() . '_license_status', 'not_active' );
|
145 |
+
} else {
|
146 |
+
return get_option( $this->product->get_key() . '_license_status', 'not_active' );
|
147 |
+
}
|
148 |
+
|
149 |
+
}
|
150 |
+
|
151 |
+
/**
|
152 |
+
* Check if the license is active or not
|
153 |
+
*
|
154 |
+
* @return bool
|
155 |
+
*/
|
156 |
+
public function check_activation() {
|
157 |
+
$license_data = get_option( $this->product->get_key() . '_license_data', '' );
|
158 |
+
if ( $license_data !== '' ) {
|
159 |
+
return isset( $license_data->error ) ? ( $license_data->error == 'no_activations_left' ) : false;
|
160 |
+
}
|
161 |
+
|
162 |
+
return false;
|
163 |
+
}
|
164 |
+
|
165 |
+
/**
|
166 |
+
* Check if the license is about to expire in the next month
|
167 |
+
*
|
168 |
+
* @return bool
|
169 |
+
*/
|
170 |
+
function check_expiration() {
|
171 |
+
$license_data = get_option( $this->product->get_key() . '_license_data', '' );
|
172 |
+
if ( $license_data !== '' ) {
|
173 |
+
if ( isset( $license_data->expires ) ) {
|
174 |
+
if ( strtotime( $license_data->expires ) - time() < 30 * 24 * 3600 ) {
|
175 |
+
return true;
|
176 |
+
}
|
177 |
+
}
|
178 |
+
}
|
179 |
+
|
180 |
+
return false;
|
181 |
+
}
|
182 |
+
|
183 |
+
/**
|
184 |
+
* Return the renew url from the store used
|
185 |
+
*
|
186 |
+
* @return string The renew url.
|
187 |
+
*/
|
188 |
+
function renew_url() {
|
189 |
+
$license_data = get_option( $this->product->get_key() . '_license_data', '' );
|
190 |
+
if ( $license_data !== '' ) {
|
191 |
+
if ( isset( $license_data->download_id ) && isset( $license_data->key ) ) {
|
192 |
+
return $this->product->get_store_url() . '/checkout/?edd_license_key=' . $license_data->key . '&download_id=' . $license_data->download_id;
|
193 |
+
}
|
194 |
+
}
|
195 |
+
|
196 |
+
return $this->product->get_store_url();
|
197 |
+
}
|
198 |
+
|
199 |
+
/**
|
200 |
+
* Check if we hide the notificatin nag or not
|
201 |
+
*
|
202 |
+
* @param string $hide The notification to hide.
|
203 |
+
*
|
204 |
+
* @return bool Either hide them or not.
|
205 |
+
*/
|
206 |
+
function check_hide( $hide ) {
|
207 |
+
return true;
|
208 |
+
}
|
209 |
+
|
210 |
+
/**
|
211 |
+
* Show the admin notice regarding the license status
|
212 |
+
*
|
213 |
+
* @return bool
|
214 |
+
*/
|
215 |
+
function show_notice() {
|
216 |
+
if ( ! is_admin() ) {
|
217 |
+
return false;
|
218 |
+
}
|
219 |
+
$status = $this->get_license_status();
|
220 |
+
$no_activations_string = apply_filters(
|
221 |
+
$this->product->get_key() . '_lc_no_activations_string', 'No activations left for %s !!!. You need to
|
222 |
+
upgrade your plan in order to use %s on more
|
223 |
+
websites. Please ask the %s
|
224 |
+
Staff for more details.'
|
225 |
+
);
|
226 |
+
$no_valid_string = apply_filters(
|
227 |
+
$this->product->get_key() . '_lc_no_valid_string', 'In order to benefit from updates and support for %s, please add
|
228 |
+
your license code from your <a href="%s" target="_blank">purchase history</a> and validate it <a
|
229 |
+
href="%s">here</a>. '
|
230 |
+
);
|
231 |
+
$expiration_string = apply_filters(
|
232 |
+
$this->product->get_key() . '_lc_expiration_string', 'Your license is about to expire
|
233 |
+
for %s. You can go to %s and renew it '
|
234 |
+
);
|
235 |
+
if ( $status != 'valid' ) {
|
236 |
+
if ( $this->check_activation() ) {
|
237 |
+
if ( $this->check_hide( 'activation' ) ) {
|
238 |
+
?>
|
239 |
+
<div class="error">
|
240 |
+
<p><strong>
|
241 |
+
<?php
|
242 |
+
echo sprintf(
|
243 |
+
$no_activations_string, $this->product->get_name(), $this->product->get_name(), '<a href="' . $this->product->get_store_url() . '"
|
244 |
+
target="_blank">' . $this->product->get_store_name() . '</a>'
|
245 |
+
);
|
246 |
+
?>
|
247 |
+
</strong>
|
248 |
+
</p>
|
249 |
+
</div>
|
250 |
+
<?php
|
251 |
+
return false;
|
252 |
+
}
|
253 |
+
}
|
254 |
+
?>
|
255 |
+
<?php if ( $this->check_hide( 'valid' ) ) : ?>
|
256 |
+
<div class="error">
|
257 |
+
<p>
|
258 |
+
<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>
|
259 |
+
</p>
|
260 |
+
</div>
|
261 |
+
<?php endif; ?>
|
262 |
+
<?php
|
263 |
+
} else {
|
264 |
+
if ( $this->check_expiration() ) {
|
265 |
+
if ( $this->check_hide( 'expiration' ) ) {
|
266 |
+
?>
|
267 |
+
<div class="update-nag">
|
268 |
+
<p>
|
269 |
+
<strong>
|
270 |
+
<?php
|
271 |
+
echo sprintf(
|
272 |
+
$expiration_string, $this->product->get_name() . ' ' . $this->product->get_type(), '<a
|
273 |
+
href="' . $this->renew_url() . '"
|
274 |
+
target="_blank">' . $this->product->get_store_name() . '</a>'
|
275 |
+
);
|
276 |
+
?>
|
277 |
+
</strong>
|
278 |
+
</p>
|
279 |
+
</div>
|
280 |
+
<?php
|
281 |
+
}
|
282 |
+
}
|
283 |
+
}
|
284 |
+
}
|
285 |
+
|
286 |
+
/**
|
287 |
+
* Run the license check call
|
288 |
+
*/
|
289 |
+
public function product_valid() {
|
290 |
+
if ( false === ( $license = get_transient( $this->product->get_key() . '_license_data' ) ) ) {
|
291 |
+
$license = $this->check_license();
|
292 |
+
set_transient( $this->product->get_key() . '_license_data', $license, 12 * HOUR_IN_SECONDS );
|
293 |
+
update_option( $this->product->get_key() . '_license_data', $license );
|
294 |
+
}
|
295 |
+
|
296 |
+
}
|
297 |
+
|
298 |
+
/**
|
299 |
+
* Increment the failed checks
|
300 |
+
*/
|
301 |
+
private function increment_failed_checks() {
|
302 |
+
$this->failed_checks ++;
|
303 |
+
update_option( $this->product->get_key() . '_failed_checks', $this->failed_checks );
|
304 |
+
}
|
305 |
+
|
306 |
+
/**
|
307 |
+
* Reset the failed checks
|
308 |
+
*/
|
309 |
+
private function reset_failed_checks() {
|
310 |
+
$this->failed_checks = 1;
|
311 |
+
update_option( $this->product->get_key() . '_failed_checks', $this->failed_checks );
|
312 |
+
}
|
313 |
+
|
314 |
+
/**
|
315 |
+
* Check the license status
|
316 |
+
*
|
317 |
+
* @return object The license data.
|
318 |
+
*/
|
319 |
+
public function check_license() {
|
320 |
+
$status = $this->get_license_status();
|
321 |
+
if ( $status == 'not_active' ) {
|
322 |
+
$license_data = new stdClass();
|
323 |
+
$license_data->license = 'not_active';
|
324 |
+
|
325 |
+
return $license_data;
|
326 |
+
}
|
327 |
+
$license = trim( $this->license_key );
|
328 |
+
$api_params = array(
|
329 |
+
'edd_action' => 'check_license',
|
330 |
+
'license' => $license,
|
331 |
+
'item_name' => rawurlencode( $this->product->get_name() ),
|
332 |
+
'url' => rawurlencode( home_url() ),
|
333 |
+
);
|
334 |
+
// Call the custom API.
|
335 |
+
$response = wp_remote_get(
|
336 |
+
add_query_arg( $api_params, $this->product->get_store_url() ), array(
|
337 |
+
'timeout' => 15,
|
338 |
+
'sslverify' => false,
|
339 |
+
)
|
340 |
+
);
|
341 |
+
if ( is_wp_error( $response ) ) {
|
342 |
+
$license_data = new stdClass();
|
343 |
+
$license_data->license = 'valid';
|
344 |
+
|
345 |
+
} else {
|
346 |
+
$license_data = json_decode( wp_remote_retrieve_body( $response ) );
|
347 |
+
if ( ! is_object( $license_data ) ) {
|
348 |
+
$license_data = new stdClass();
|
349 |
+
$license_data->license = 'valid';
|
350 |
+
}
|
351 |
+
}
|
352 |
+
$license_old = get_option( $this->product->get_key() . '_license_data', '' );
|
353 |
+
if ( $license_old->license == 'valid' && ( $license_data->license != $license_old->license ) ) {
|
354 |
+
$this->increment_failed_checks();
|
355 |
+
} else {
|
356 |
+
$this->reset_failed_checks();
|
357 |
+
}
|
358 |
+
|
359 |
+
if ( $this->failed_checks <= self::$max_failed ) {
|
360 |
+
return $license_old;
|
361 |
+
}
|
362 |
+
|
363 |
+
if ( isset( $license_old->hide_valid ) ) {
|
364 |
+
$license_data->hide_valid = true;
|
365 |
+
}
|
366 |
+
|
367 |
+
if ( ! isset( $license_data->key ) ) {
|
368 |
+
$license_data->key = isset( $license_old->key ) ? $license_old->key : '';
|
369 |
+
}
|
370 |
+
|
371 |
+
if ( isset( $license_old->hide_expiration ) ) {
|
372 |
+
$license_data->hide_expiration = true;
|
373 |
+
}
|
374 |
+
|
375 |
+
if ( isset( $license_old->hide_activation ) ) {
|
376 |
+
$license_data->hide_activation = true;
|
377 |
+
}
|
378 |
+
|
379 |
+
return $license_data;
|
380 |
+
|
381 |
+
}
|
382 |
+
|
383 |
+
/**
|
384 |
+
* Activate the license remotely
|
385 |
+
*/
|
386 |
+
function activate_license() {
|
387 |
+
// listen for our activate button to be clicked
|
388 |
+
if ( isset( $_POST[ $this->product->get_key() . '_btn_trigger' ] ) ) {
|
389 |
+
$status = $this->get_license_status();
|
390 |
+
// retrieve the license from the database
|
391 |
+
$license = $_POST[ $this->product->get_key() . '_license' ];
|
392 |
+
$api_params = array(
|
393 |
+
'license' => $license,
|
394 |
+
'item_name' => rawurlencode( $this->product->get_name() ),
|
395 |
+
'url' => rawurlencode( home_url() ),
|
396 |
+
);
|
397 |
+
if ( $status != 'valid' ) {
|
398 |
+
// data to send in our API request
|
399 |
+
$api_params['edd_action'] = 'activate_license';
|
400 |
+
} else {
|
401 |
+
$api_params['edd_action'] = 'deactivate_license';
|
402 |
+
}
|
403 |
+
// Call the custom API.
|
404 |
+
$response = wp_remote_get( add_query_arg( $api_params, $this->product->get_store_url() ) );
|
405 |
+
// make sure the response came back okay
|
406 |
+
if ( is_wp_error( $response ) ) {
|
407 |
+
$license_data = new stdClass();
|
408 |
+
$license_data->license = ( $status != 'valid' ) ? 'valid' : 'invalid';
|
409 |
+
|
410 |
+
} else {
|
411 |
+
$license_data = json_decode( wp_remote_retrieve_body( $response ) );
|
412 |
+
if ( ! is_object( $license_data ) ) {
|
413 |
+
$license_data = new stdClass();
|
414 |
+
$license_data->license = ( $status != 'valid' ) ? 'valid' : 'invalid';
|
415 |
+
}
|
416 |
+
}
|
417 |
+
if ( ! isset( $license_data->key ) ) {
|
418 |
+
$license_data->key = $license;
|
419 |
+
}
|
420 |
+
if ( $license_data->license == 'valid' ) {
|
421 |
+
$this->reset_failed_checks();
|
422 |
+
}
|
423 |
+
|
424 |
+
if ( isset( $license_data->plan ) ) {
|
425 |
+
update_option( $this->product->get_key() . '_license_plan', $license_data->plan );
|
426 |
+
}
|
427 |
+
|
428 |
+
update_option( $this->product->get_key() . '_license_data', $license_data );
|
429 |
+
delete_transient( $this->product->get_key() . '_license_data' );
|
430 |
+
set_transient( $this->product->get_key() . '_license_data', $license_data, 12 * HOUR_IN_SECONDS );
|
431 |
+
|
432 |
+
}
|
433 |
+
}
|
434 |
+
|
435 |
+
/**
|
436 |
+
* Enable the license system
|
437 |
+
*/
|
438 |
+
public function enable() {
|
439 |
+
if ( $this->product->get_type() == 'plugin' ) {
|
440 |
+
add_filter(
|
441 |
+
'pre_set_site_transient_update_plugins', array(
|
442 |
+
$this,
|
443 |
+
'pre_set_site_transient_update_plugins_filter',
|
444 |
+
)
|
445 |
+
);
|
446 |
+
add_filter( 'plugins_api', array( $this, 'plugins_api_filter' ), 10, 3 );
|
447 |
+
add_filter( 'http_request_args', array( $this, 'http_request_args' ), 10, 2 );
|
448 |
+
}
|
449 |
+
if ( $this->product->get_type() == 'theme' ) {
|
450 |
+
add_filter( 'site_transient_update_themes', array( &$this, 'theme_update_transient' ) );
|
451 |
+
add_filter( 'delete_site_transient_update_themes', array( &$this, 'delete_theme_update_transient' ) );
|
452 |
+
add_action( 'load-update-core.php', array( &$this, 'delete_theme_update_transient' ) );
|
453 |
+
add_action( 'load-themes.php', array( &$this, 'delete_theme_update_transient' ) );
|
454 |
+
add_action( 'load-themes.php', array( &$this, 'load_themes_screen' ) );
|
455 |
+
add_filter( 'http_request_args', array( $this, 'disable_wporg_update' ), 5, 2 );
|
456 |
+
|
457 |
+
}
|
458 |
+
|
459 |
+
}
|
460 |
+
|
461 |
+
/**
|
462 |
+
* Load the Themes screen
|
463 |
+
*/
|
464 |
+
function load_themes_screen() {
|
465 |
+
add_thickbox();
|
466 |
+
add_action( 'admin_notices', array( &$this, 'update_nag' ) );
|
467 |
+
}
|
468 |
+
|
469 |
+
/**
|
470 |
+
* Alter the nag for themes update
|
471 |
+
*/
|
472 |
+
function update_nag() {
|
473 |
+
$theme = wp_get_theme( $this->product->get_slug() );
|
474 |
+
$api_response = get_transient( $this->product_key );
|
475 |
+
if ( false === $api_response ) {
|
476 |
+
return;
|
477 |
+
}
|
478 |
+
$update_url = wp_nonce_url( 'update.php?action=upgrade-theme&theme=' . urlencode( $this->product->get_slug() ), 'upgrade-theme_' . $this->product->get_slug() );
|
479 |
+
$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.' );
|
480 |
+
$update_onclick = ' onclick="if ( confirm(\'' . esc_js( $update_message ) . '\') ) {return true;}return false;"';
|
481 |
+
if ( version_compare( $this->product->get_version(), $api_response->new_version, '<' ) ) {
|
482 |
+
echo '<div id="update-nag">';
|
483 |
+
printf(
|
484 |
+
'<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>.',
|
485 |
+
$theme->get( 'Name' ),
|
486 |
+
$api_response->new_version,
|
487 |
+
'#TB_inline?width=640&inlineId=' . $this->product->get_version() . '_changelog',
|
488 |
+
$theme->get( 'Name' ),
|
489 |
+
$update_url,
|
490 |
+
$update_onclick
|
491 |
+
);
|
492 |
+
echo '</div>';
|
493 |
+
echo '<div id="' . $this->product->get_slug() . '_' . 'changelog" style="display:none;">';
|
494 |
+
echo wpautop( $api_response->sections['changelog'] );
|
495 |
+
echo '</div>';
|
496 |
+
}
|
497 |
+
}
|
498 |
+
|
499 |
+
/**
|
500 |
+
* @param mixed $value The transient data.
|
501 |
+
*
|
502 |
+
* @return mixed
|
503 |
+
*/
|
504 |
+
function theme_update_transient( $value ) {
|
505 |
+
$update_data = $this->check_for_update();
|
506 |
+
if ( $update_data ) {
|
507 |
+
$value->response[ $this->product->get_slug() ] = $update_data;
|
508 |
+
}
|
509 |
+
|
510 |
+
return $value;
|
511 |
+
}
|
512 |
+
|
513 |
+
/**
|
514 |
+
* Delete the update transient
|
515 |
+
*/
|
516 |
+
function delete_theme_update_transient() {
|
517 |
+
delete_transient( $this->product_key );
|
518 |
+
}
|
519 |
+
|
520 |
+
/**
|
521 |
+
* Check for updates
|
522 |
+
*
|
523 |
+
* @return array|bool Either the update data or false in case of failure
|
524 |
+
*/
|
525 |
+
function check_for_update() {
|
526 |
+
$theme = wp_get_theme( $this->product->get_slug() );
|
527 |
+
$update_data = get_transient( $this->product_key );
|
528 |
+
if ( false === $update_data ) {
|
529 |
+
$failed = false;
|
530 |
+
if ( empty( $this->license_key ) ) {
|
531 |
+
return false;
|
532 |
+
}
|
533 |
+
$api_params = array(
|
534 |
+
'edd_action' => 'get_version',
|
535 |
+
'version' => $this->product->get_version(),
|
536 |
+
'license' => $this->license_key,
|
537 |
+
'name' => $this->product->get_name(),
|
538 |
+
'slug' => $this->product->get_slug(),
|
539 |
+
'author' => $this->product->get_store_name(),
|
540 |
+
'url' => rawurlencode( home_url() ),
|
541 |
+
);
|
542 |
+
$response = wp_remote_post(
|
543 |
+
$this->product->get_store_url(), array(
|
544 |
+
'timeout' => 15,
|
545 |
+
'sslverify' => false,
|
546 |
+
'body' => $api_params,
|
547 |
+
)
|
548 |
+
);
|
549 |
+
// make sure the response was successful
|
550 |
+
if ( is_wp_error( $response ) || 200 != wp_remote_retrieve_response_code( $response ) ) {
|
551 |
+
$failed = true;
|
552 |
+
}
|
553 |
+
$update_data = json_decode( wp_remote_retrieve_body( $response ) );
|
554 |
+
if ( ! is_object( $update_data ) ) {
|
555 |
+
$failed = true;
|
556 |
+
}
|
557 |
+
// if the response failed, try again in 30 minutes
|
558 |
+
if ( $failed ) {
|
559 |
+
$data = new stdClass;
|
560 |
+
$data->new_version = $this->product->get_version();
|
561 |
+
set_transient( $this->product_key, $data, strtotime( '+30 minutes' ) );
|
562 |
+
|
563 |
+
return false;
|
564 |
+
}
|
565 |
+
// if the status is 'ok', return the update arguments
|
566 |
+
if ( ! $failed ) {
|
567 |
+
$update_data->sections = maybe_unserialize( $update_data->sections );
|
568 |
+
set_transient( $this->product_key, $update_data, strtotime( '+12 hours' ) );
|
569 |
+
}
|
570 |
+
}
|
571 |
+
if ( version_compare( $this->product->get_version(), $update_data->new_version, '>=' ) ) {
|
572 |
+
return false;
|
573 |
+
}
|
574 |
+
|
575 |
+
return (array) $update_data;
|
576 |
+
}
|
577 |
+
|
578 |
+
/**
|
579 |
+
* Check for Updates at the defined API endpoint and modify the update array.
|
580 |
+
*
|
581 |
+
* This function dives into the update API just when WordPress creates its update array,
|
582 |
+
* then adds a custom API call and injects the custom plugin data retrieved from the API.
|
583 |
+
* It is reassembled from parts of the native WordPress plugin update code.
|
584 |
+
* See wp-includes/update.php line 121 for the original wp_update_plugins() function.
|
585 |
+
*
|
586 |
+
* @uses api_request()
|
587 |
+
*
|
588 |
+
* @param array $_transient_data Update array build by WordPress.
|
589 |
+
*
|
590 |
+
* @return array Modified update array with custom plugin data.
|
591 |
+
*/
|
592 |
+
public function pre_set_site_transient_update_plugins_filter( $_transient_data ) {
|
593 |
+
if ( empty( $_transient_data ) || ! $this->do_check ) {
|
594 |
+
$this->do_check = true;
|
595 |
+
|
596 |
+
return $_transient_data;
|
597 |
+
}
|
598 |
+
$api_response = $this->api_request();
|
599 |
+
if ( false !== $api_response && is_object( $api_response ) && isset( $api_response->new_version ) ) {
|
600 |
+
if ( version_compare( $this->product->get_version(), $api_response->new_version, '<' ) ) {
|
601 |
+
$_transient_data->response[ $this->product->get_slug() . '/' . $this->product->get_file() ] = $api_response;
|
602 |
+
}
|
603 |
+
}
|
604 |
+
|
605 |
+
return $_transient_data;
|
606 |
+
}
|
607 |
+
|
608 |
+
/**
|
609 |
+
* Calls the API and, if successfull, returns the object delivered by the API.
|
610 |
+
*
|
611 |
+
* @uses get_bloginfo()
|
612 |
+
* @uses wp_remote_post()
|
613 |
+
* @uses is_wp_error()
|
614 |
+
*
|
615 |
+
* @param string $_action The requested action.
|
616 |
+
* @param array $_data Parameters for the API action.
|
617 |
+
*
|
618 |
+
* @return false||object
|
619 |
+
*/
|
620 |
+
private function api_request( $_action = '', $_data = '' ) {
|
621 |
+
if ( empty( $this->license_key ) ) {
|
622 |
+
return;
|
623 |
+
}
|
624 |
+
$api_params = array(
|
625 |
+
'edd_action' => 'get_version',
|
626 |
+
'license' => $this->license_key,
|
627 |
+
'name' => rawurlencode( $this->product->get_name() ),
|
628 |
+
'slug' => rawurlencode( $this->product->get_slug() ),
|
629 |
+
'author' => $this->product->get_store_name(),
|
630 |
+
'url' => rawurlencode( home_url() ),
|
631 |
+
);
|
632 |
+
$request = wp_remote_post(
|
633 |
+
$this->product->get_store_url(), array(
|
634 |
+
'timeout' => 15,
|
635 |
+
'sslverify' => false,
|
636 |
+
'body' => $api_params,
|
637 |
+
)
|
638 |
+
);
|
639 |
+
if ( ! is_wp_error( $request ) ) :
|
640 |
+
$request = json_decode( wp_remote_retrieve_body( $request ) );
|
641 |
+
if ( $request && isset( $request->sections ) ) {
|
642 |
+
$request->sections = maybe_unserialize( $request->sections );
|
643 |
+
}
|
644 |
+
|
645 |
+
return $request;
|
646 |
+
else :
|
647 |
+
return false;
|
648 |
+
endif;
|
649 |
+
}
|
650 |
+
|
651 |
+
/**
|
652 |
+
* Updates information on the "View version x.x details" page with custom data.
|
653 |
+
*
|
654 |
+
* @uses api_request()
|
655 |
+
*
|
656 |
+
* @param mixed $_data Plugin data.
|
657 |
+
* @param string $_action Action to send.
|
658 |
+
* @param object $_args Arguments to use.
|
659 |
+
*
|
660 |
+
* @return object $_data
|
661 |
+
*/
|
662 |
+
public function plugins_api_filter( $_data, $_action = '', $_args = null ) {
|
663 |
+
if ( ( $_action != 'plugin_information' ) || ! isset( $_args->slug ) || ( $_args->slug != $this->product->get_slug() ) ) {
|
664 |
+
return $_data;
|
665 |
+
}
|
666 |
+
$api_response = $this->api_request();
|
667 |
+
if ( false !== $api_response ) {
|
668 |
+
$_data = $api_response;
|
669 |
+
}
|
670 |
+
|
671 |
+
return $_data;
|
672 |
+
}
|
673 |
+
|
674 |
+
/**
|
675 |
+
* Disable SSL verification in order to prevent download update failures
|
676 |
+
*
|
677 |
+
* @param array $args Http args.
|
678 |
+
* @param string $url Url to check.
|
679 |
+
*
|
680 |
+
* @return object $array
|
681 |
+
*/
|
682 |
+
function http_request_args( $args, $url ) {
|
683 |
+
// If it is an https request and we are performing a package download, disable ssl verification
|
684 |
+
if ( strpos( $url, 'https://' ) !== false && strpos( $url, 'edd_action=package_download' ) ) {
|
685 |
+
$args['sslverify'] = false;
|
686 |
+
}
|
687 |
+
|
688 |
+
return $args;
|
689 |
+
}
|
690 |
+
|
691 |
+
}
|
692 |
+
endif;
|
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-loader.php
ADDED
@@ -0,0 +1,96 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,227 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,105 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,562 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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( 'proteusthemes.com', 'anarieldesign.com', 'prothemedesign.com', 'cssigniter.com' );
|
64 |
+
/**
|
65 |
+
* @var array $allowed_external_products The allowed external_products.
|
66 |
+
*/
|
67 |
+
private $allowed_products = array( 'zermatt', 'neto', 'olsen', 'benson', 'romero', 'carmack', 'puzzle', 'broadsheet', 'girlywp', 'veggie', 'zeko', 'maishawp', 'didi', 'liber', 'medicpress-pt', 'adrenaline-pt', 'consultpress-pt', 'legalpress-pt', 'gympress-pt', 'readable-pt', 'bolts-pt' );
|
68 |
+
/**
|
69 |
+
* @var bool $requires_license Either user needs to activate it with license.
|
70 |
+
*/
|
71 |
+
private $requires_license;
|
72 |
+
/**
|
73 |
+
* @var bool $wordpress_available Either is available on WordPress or not.
|
74 |
+
*/
|
75 |
+
private $wordpress_available;
|
76 |
+
/**
|
77 |
+
* @var string $version The product version.
|
78 |
+
*/
|
79 |
+
private $version;
|
80 |
+
/**
|
81 |
+
* @var string $logger_option Logger option key.
|
82 |
+
*/
|
83 |
+
public $logger_option;
|
84 |
+
/**
|
85 |
+
* @var string $pro_slug Pro slug, if available.
|
86 |
+
*/
|
87 |
+
public $pro_slug;
|
88 |
+
/**
|
89 |
+
* @var string $feedback_types All the feedback types the product supports
|
90 |
+
*/
|
91 |
+
private $feedback_types = array();
|
92 |
+
|
93 |
+
/**
|
94 |
+
* @var string $widget_types All the widget types the product supports
|
95 |
+
*/
|
96 |
+
private $widget_types = array( 'dashboard_blog' );
|
97 |
+
|
98 |
+
/**
|
99 |
+
* ThemeIsle_SDK_Product constructor.
|
100 |
+
*
|
101 |
+
* @param string $basefile Product basefile.
|
102 |
+
*/
|
103 |
+
public function __construct( $basefile ) {
|
104 |
+
if ( ! empty( $basefile ) ) {
|
105 |
+
if ( is_readable( $basefile ) ) {
|
106 |
+
$this->basefile = $basefile;
|
107 |
+
$this->setup_from_path();
|
108 |
+
$this->setup_from_fileheaders();
|
109 |
+
}
|
110 |
+
}
|
111 |
+
$install = get_option( $this->get_key() . '_install', 0 );
|
112 |
+
if ( $install === 0 ) {
|
113 |
+
$install = time();
|
114 |
+
update_option( $this->get_key() . '_install', time() );
|
115 |
+
}
|
116 |
+
$this->install = $install;
|
117 |
+
|
118 |
+
$this->logger_option = $this->get_key() . '_logger_flag';
|
119 |
+
|
120 |
+
}
|
121 |
+
|
122 |
+
/**
|
123 |
+
* Setup props from fileheaders.
|
124 |
+
*/
|
125 |
+
public function setup_from_fileheaders() {
|
126 |
+
$file_headers = array(
|
127 |
+
'Requires License' => 'Requires License',
|
128 |
+
'WordPress Available' => 'WordPress Available',
|
129 |
+
'Pro Slug' => 'Pro Slug',
|
130 |
+
'Version' => 'Version',
|
131 |
+
);
|
132 |
+
if ( $this->type == 'plugin' ) {
|
133 |
+
$file_headers['Name'] = 'Plugin Name';
|
134 |
+
$file_headers['AuthorName'] = 'Author';
|
135 |
+
$file_headers['AuthorURI'] = 'Author URI';
|
136 |
+
}
|
137 |
+
if ( $this->type == 'theme' ) {
|
138 |
+
$file_headers['Name'] = 'Theme Name';
|
139 |
+
$file_headers['AuthorName'] = 'Author';
|
140 |
+
$file_headers['AuthorURI'] = 'Author URI';
|
141 |
+
}
|
142 |
+
$file_headers = get_file_data( $this->basefile, $file_headers );
|
143 |
+
|
144 |
+
$this->name = $file_headers['Name'];
|
145 |
+
$this->store_name = $file_headers['AuthorName'];
|
146 |
+
$this->author_url = $file_headers['AuthorURI'];
|
147 |
+
$this->store_url = $file_headers['AuthorURI'];
|
148 |
+
if ( $this->is_external_author() ) {
|
149 |
+
$this->store_url = 'https://themeisle.com';
|
150 |
+
$this->store_name = 'ThemeIsle';
|
151 |
+
}
|
152 |
+
$this->requires_license = ( $file_headers['Requires License'] == 'yes' ) ? true : false;
|
153 |
+
$this->wordpress_available = ( $file_headers['WordPress Available'] == 'yes' ) ? true : false;
|
154 |
+
$this->pro_slug = ! empty( $file_headers['Pro Slug'] ) ? $file_headers['Pro Slug'] : '';
|
155 |
+
$this->version = $file_headers['Version'];
|
156 |
+
if ( $this->require_uninstall_feedback() ) {
|
157 |
+
$this->feedback_types[] = 'deactivate';
|
158 |
+
}
|
159 |
+
if ( $this->is_wordpress_available() ) {
|
160 |
+
$this->feedback_types[] = 'review';
|
161 |
+
$this->feedback_types[] = 'translate';
|
162 |
+
}
|
163 |
+
}
|
164 |
+
|
165 |
+
/**
|
166 |
+
* Check if the product is by external author or not.
|
167 |
+
*
|
168 |
+
* @return bool Either is external author or no.
|
169 |
+
*/
|
170 |
+
public function is_external_author() {
|
171 |
+
foreach ( $this->allowed_authors as $author ) {
|
172 |
+
if ( strpos( $this->author_url, $author ) !== false ) {
|
173 |
+
return true;
|
174 |
+
}
|
175 |
+
if ( in_array( $this->get_slug(), $this->allowed_products ) ) {
|
176 |
+
return true;
|
177 |
+
}
|
178 |
+
}
|
179 |
+
|
180 |
+
return false;
|
181 |
+
}
|
182 |
+
|
183 |
+
/**
|
184 |
+
* The magic var_dump info method.
|
185 |
+
*
|
186 |
+
* @return array Debug info.
|
187 |
+
*/
|
188 |
+
public function __debugInfo() {
|
189 |
+
return array(
|
190 |
+
'name' => $this->name,
|
191 |
+
'slug' => $this->slug,
|
192 |
+
'version' => $this->version,
|
193 |
+
'basefile' => $this->basefile,
|
194 |
+
'key' => $this->key,
|
195 |
+
'type' => $this->type,
|
196 |
+
'store_name' => $this->store_name,
|
197 |
+
'store_url' => $this->store_url,
|
198 |
+
'wordpress_available' => $this->wordpress_available,
|
199 |
+
'requires_license' => $this->requires_license,
|
200 |
+
);
|
201 |
+
|
202 |
+
}
|
203 |
+
|
204 |
+
/**
|
205 |
+
* Setup props from path.
|
206 |
+
*/
|
207 |
+
public function setup_from_path() {
|
208 |
+
$this->file = basename( $this->basefile );
|
209 |
+
$dir = dirname( $this->basefile );
|
210 |
+
$this->slug = basename( $dir );
|
211 |
+
$exts = explode( '.', $this->basefile );
|
212 |
+
$ext = $exts[ count( $exts ) - 1 ];
|
213 |
+
if ( $ext == 'css' ) {
|
214 |
+
$this->type = 'theme';
|
215 |
+
}
|
216 |
+
if ( $ext == 'php' ) {
|
217 |
+
$this->type = 'plugin';
|
218 |
+
}
|
219 |
+
$this->key = self::key_ready_name( $this->slug );
|
220 |
+
}
|
221 |
+
|
222 |
+
/**
|
223 |
+
* @param string $string the String to be normalized for cron handler.
|
224 |
+
*
|
225 |
+
* @return string $name The normalized string.
|
226 |
+
*/
|
227 |
+
static function key_ready_name( $string ) {
|
228 |
+
return str_replace( '-', '_', strtolower( trim( $string ) ) );
|
229 |
+
}
|
230 |
+
|
231 |
+
/**
|
232 |
+
* Getter for product name.
|
233 |
+
*
|
234 |
+
* @return string The product name.
|
235 |
+
*/
|
236 |
+
public function get_name() {
|
237 |
+
return $this->name;
|
238 |
+
}
|
239 |
+
|
240 |
+
/**
|
241 |
+
* Getter for product version.
|
242 |
+
*
|
243 |
+
* @return string The product version.
|
244 |
+
*/
|
245 |
+
public function get_version() {
|
246 |
+
return $this->version;
|
247 |
+
}
|
248 |
+
|
249 |
+
/**
|
250 |
+
* If product is available on wordpress.org or not.
|
251 |
+
*
|
252 |
+
* @return bool Either is wp available or not.
|
253 |
+
*/
|
254 |
+
public function is_wordpress_available() {
|
255 |
+
return $this->wordpress_available;
|
256 |
+
}
|
257 |
+
|
258 |
+
/**
|
259 |
+
* @return array Array of available versions.
|
260 |
+
*/
|
261 |
+
private function get_plugin_versions() {
|
262 |
+
|
263 |
+
$url = sprintf( 'https://api.wordpress.org/plugins/info/1.0/%s', $this->get_slug() );
|
264 |
+
$response = wp_remote_get( $url );
|
265 |
+
if ( is_wp_error( $response ) ) {
|
266 |
+
return array();
|
267 |
+
}
|
268 |
+
$response = wp_remote_retrieve_body( $response );
|
269 |
+
$response = maybe_unserialize( $response );
|
270 |
+
|
271 |
+
if ( ! is_object( $response ) ) {
|
272 |
+
return array();
|
273 |
+
}
|
274 |
+
if ( ! isset( $response->versions ) ) {
|
275 |
+
return array();
|
276 |
+
}
|
277 |
+
$versions = array();
|
278 |
+
foreach ( $response->versions as $version => $zip ) {
|
279 |
+
$versions[] = array(
|
280 |
+
'version' => $version,
|
281 |
+
'url' => $zip,
|
282 |
+
);
|
283 |
+
}
|
284 |
+
|
285 |
+
return $versions;
|
286 |
+
}
|
287 |
+
|
288 |
+
/**
|
289 |
+
* Return theme versions.
|
290 |
+
*
|
291 |
+
* @return array Theme versions array.
|
292 |
+
*/
|
293 |
+
public function get_theme_versions() {
|
294 |
+
$url = sprintf( 'https://api.wordpress.org/themes/info/1.1/?action=theme_information&request[slug]=%s&request[fields][versions]=true', $this->get_slug() );
|
295 |
+
$response = wp_remote_get( $url );
|
296 |
+
if ( is_wp_error( $response ) ) {
|
297 |
+
return array();
|
298 |
+
}
|
299 |
+
$response = wp_remote_retrieve_body( $response );
|
300 |
+
$response = json_decode( $response );
|
301 |
+
|
302 |
+
if ( ! is_object( $response ) ) {
|
303 |
+
return array();
|
304 |
+
}
|
305 |
+
if ( ! isset( $response->versions ) ) {
|
306 |
+
return array();
|
307 |
+
}
|
308 |
+
$versions = array();
|
309 |
+
foreach ( $response->versions as $version => $zip ) {
|
310 |
+
$versions[] = array(
|
311 |
+
'version' => $version,
|
312 |
+
'url' => $zip,
|
313 |
+
);
|
314 |
+
}
|
315 |
+
|
316 |
+
return $versions;
|
317 |
+
}
|
318 |
+
|
319 |
+
/**
|
320 |
+
* Get versions array from wp.org
|
321 |
+
*
|
322 |
+
* @return array Array of versions.
|
323 |
+
*/
|
324 |
+
private function get_api_versions() {
|
325 |
+
if ( ! $this->is_wordpress_available() ) {
|
326 |
+
return array();
|
327 |
+
}
|
328 |
+
|
329 |
+
$cache_key = $this->get_key() . '_' . preg_replace( '/[^0-9a-zA-Z ]/m', '', $this->version ) . 'versions';
|
330 |
+
$cache_versions = get_transient( $this->get_key() . '_' . preg_replace( '/[^0-9a-zA-Z ]/m', '', $this->version ) . 'versions' );
|
331 |
+
if ( false == $cache_versions ) {
|
332 |
+
$versions = array();
|
333 |
+
if ( $this->get_type() === 'plugin' ) {
|
334 |
+
$versions = $this->get_plugin_versions();
|
335 |
+
}
|
336 |
+
|
337 |
+
if ( $this->get_type() === 'theme' ) {
|
338 |
+
$versions = $this->get_theme_versions();
|
339 |
+
}
|
340 |
+
set_transient( $cache_key, $versions, MONTH_IN_SECONDS );
|
341 |
+
} else {
|
342 |
+
$versions = is_array( $cache_versions ) ? $cache_versions : array();
|
343 |
+
}
|
344 |
+
|
345 |
+
return $versions;
|
346 |
+
}
|
347 |
+
|
348 |
+
/**
|
349 |
+
* Get the last rollback for this product.
|
350 |
+
*
|
351 |
+
* @return array The rollback version.
|
352 |
+
*/
|
353 |
+
public function get_rollback() {
|
354 |
+
$rollback = array();
|
355 |
+
$versions = $this->get_api_versions();
|
356 |
+
$versions = apply_filters( $this->get_key() . '_rollbacks', $versions );
|
357 |
+
|
358 |
+
if ( $versions ) {
|
359 |
+
usort( $versions, array( $this, 'sort_rollback_array' ) );
|
360 |
+
foreach ( $versions as $version ) {
|
361 |
+
if ( isset( $version['version'] ) && isset( $version['url'] ) && version_compare( $this->version, $version['version'], '>' ) ) {
|
362 |
+
$rollback = $version;
|
363 |
+
break;
|
364 |
+
}
|
365 |
+
}
|
366 |
+
}
|
367 |
+
|
368 |
+
return $rollback;
|
369 |
+
}
|
370 |
+
|
371 |
+
/**
|
372 |
+
* Sort the rollbacks array in descending order.
|
373 |
+
*/
|
374 |
+
public function sort_rollback_array( $a, $b ) {
|
375 |
+
return version_compare( $a['version'], $b['version'], '<' ) > 0;
|
376 |
+
}
|
377 |
+
|
378 |
+
/**
|
379 |
+
* If product can be rolled back.
|
380 |
+
*
|
381 |
+
* @return bool Can the product be rolled back or not.
|
382 |
+
*/
|
383 |
+
public function can_rollback() {
|
384 |
+
if ( $this->get_type() === 'theme' ) {
|
385 |
+
if ( ! current_user_can( 'switch_themes' ) ) {
|
386 |
+
return false;
|
387 |
+
}
|
388 |
+
}
|
389 |
+
if ( $this->get_type() === 'plugin' ) {
|
390 |
+
if ( ! current_user_can( 'install_plugins' ) ) {
|
391 |
+
return false;
|
392 |
+
}
|
393 |
+
}
|
394 |
+
$rollback = $this->get_rollback();
|
395 |
+
|
396 |
+
return ! empty( $rollback );
|
397 |
+
}
|
398 |
+
|
399 |
+
/**
|
400 |
+
* Return the product key.
|
401 |
+
*
|
402 |
+
* @return string The product key.
|
403 |
+
*/
|
404 |
+
public function get_key() {
|
405 |
+
return $this->key;
|
406 |
+
}
|
407 |
+
|
408 |
+
/**
|
409 |
+
* Return friendly name.
|
410 |
+
*
|
411 |
+
* @return string Friendly name.
|
412 |
+
*/
|
413 |
+
public function get_friendly_name() {
|
414 |
+
$name = apply_filters( $this->get_key() . '_friendly_name', trim( str_replace( 'Lite', '', $this->get_name() ) ) );
|
415 |
+
$name = rtrim( $name, '- ' );
|
416 |
+
|
417 |
+
return $name;
|
418 |
+
}
|
419 |
+
|
420 |
+
/**
|
421 |
+
* Either the product requires license or not.
|
422 |
+
*
|
423 |
+
* @return bool Either requires license or not.
|
424 |
+
*/
|
425 |
+
public function requires_license() {
|
426 |
+
return $this->requires_license;
|
427 |
+
}
|
428 |
+
|
429 |
+
/**
|
430 |
+
* Check if the product is either theme or plugin.
|
431 |
+
*
|
432 |
+
* @return string Product type.
|
433 |
+
*/
|
434 |
+
public function get_type() {
|
435 |
+
return $this->type;
|
436 |
+
}
|
437 |
+
|
438 |
+
/**
|
439 |
+
* Returns the Store name.
|
440 |
+
*
|
441 |
+
* @return string Store name.
|
442 |
+
*/
|
443 |
+
public function get_store_name() {
|
444 |
+
return $this->store_name;
|
445 |
+
}
|
446 |
+
|
447 |
+
/**
|
448 |
+
* Returns the store url.
|
449 |
+
*
|
450 |
+
* @return string The store url.
|
451 |
+
*/
|
452 |
+
public function get_store_url() {
|
453 |
+
return $this->store_url;
|
454 |
+
}
|
455 |
+
|
456 |
+
/**
|
457 |
+
* Returns the product slug.
|
458 |
+
*
|
459 |
+
* @return string The product slug.
|
460 |
+
*/
|
461 |
+
public function get_slug() {
|
462 |
+
return $this->slug;
|
463 |
+
}
|
464 |
+
|
465 |
+
/**
|
466 |
+
* Returns product basefile, which holds the metaheaders.
|
467 |
+
*
|
468 |
+
* @return string The product basefile.
|
469 |
+
*/
|
470 |
+
public function get_basefile() {
|
471 |
+
return $this->basefile;
|
472 |
+
}
|
473 |
+
|
474 |
+
/**
|
475 |
+
* Returns product filename.
|
476 |
+
*
|
477 |
+
* @return string The product filename.
|
478 |
+
*/
|
479 |
+
public function get_file() {
|
480 |
+
return $this->file;
|
481 |
+
}
|
482 |
+
|
483 |
+
/**
|
484 |
+
* Returns feedback types
|
485 |
+
*
|
486 |
+
* @return array The feedback types.
|
487 |
+
*/
|
488 |
+
public function get_feedback_types() {
|
489 |
+
return apply_filters( $this->get_key() . '_feedback_types', $this->feedback_types );
|
490 |
+
}
|
491 |
+
|
492 |
+
/**
|
493 |
+
* Returns widget types
|
494 |
+
*
|
495 |
+
* @return array The widget types.
|
496 |
+
*/
|
497 |
+
public function get_widget_types() {
|
498 |
+
return apply_filters( $this->get_key() . '_widget_types', $this->widget_types );
|
499 |
+
}
|
500 |
+
|
501 |
+
/**
|
502 |
+
* We log the user website and product version.
|
503 |
+
*
|
504 |
+
* @return bool Either we log the data or not.
|
505 |
+
*/
|
506 |
+
public function is_logger_active() {
|
507 |
+
// If is not available on WordPress log this automatically.
|
508 |
+
if ( ! $this->is_wordpress_available() ) {
|
509 |
+
return true;
|
510 |
+
} else {
|
511 |
+
$pro_slug = $this->get_pro_slug();
|
512 |
+
if ( ! empty( $pro_slug ) ) {
|
513 |
+
|
514 |
+
$all_products = ThemeIsle_SDK_Loader::get_products();
|
515 |
+
if ( isset( $all_products[ $pro_slug ] ) ) {
|
516 |
+
return true;
|
517 |
+
}
|
518 |
+
}
|
519 |
+
|
520 |
+
return ( get_option( $this->get_key() . '_logger_flag', 'no' ) === 'yes' );
|
521 |
+
|
522 |
+
}
|
523 |
+
}
|
524 |
+
|
525 |
+
/**
|
526 |
+
* Returns the pro slug, if available.
|
527 |
+
*
|
528 |
+
* @return string The pro slug.
|
529 |
+
*/
|
530 |
+
public function get_pro_slug() {
|
531 |
+
return $this->pro_slug;
|
532 |
+
}
|
533 |
+
|
534 |
+
/**
|
535 |
+
* Return the install timestamp.
|
536 |
+
*
|
537 |
+
* @return int The install timestamp.
|
538 |
+
*/
|
539 |
+
public function get_install_time() {
|
540 |
+
return $this->install;
|
541 |
+
}
|
542 |
+
|
543 |
+
/**
|
544 |
+
* We require feedback on uninstall.
|
545 |
+
*
|
546 |
+
* @return bool Either we should require feedback on uninstall or not.
|
547 |
+
*/
|
548 |
+
public function require_uninstall_feedback() {
|
549 |
+
if ( $this->get_type() == 'theme' && ! $this->is_external_author() ) {
|
550 |
+
return ! get_transient( 'ti_sdk_pause_' . $this->get_key(), false );
|
551 |
+
}
|
552 |
+
|
553 |
+
if ( $this->get_type() == 'plugin' ) {
|
554 |
+
|
555 |
+
return true;
|
556 |
+
}
|
557 |
+
|
558 |
+
return false;
|
559 |
+
}
|
560 |
+
|
561 |
+
}
|
562 |
+
endif;
|
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-rollback.php
ADDED
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right (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 |
+
)
|
219 |
+
);
|
220 |
+
}
|
221 |
+
}
|
222 |
+
}
|
223 |
+
endif;
|
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-widget-dashboard-blog.php
ADDED
@@ -0,0 +1,383 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
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 |
+
?>
|
112 |
+
<style type="text/css">
|
113 |
+
#themeisle ul {
|
114 |
+
margin-bottom: 0px;
|
115 |
+
}
|
116 |
+
|
117 |
+
#themeisle ul li.ti-dw-recommend-item {
|
118 |
+
|
119 |
+
padding-left: 7px;
|
120 |
+
border-top: 1px solid #eee;
|
121 |
+
|
122 |
+
margin-bottom: 0px;
|
123 |
+
padding-top: 6px;
|
124 |
+
}
|
125 |
+
|
126 |
+
#themeisle h2.hndle {
|
127 |
+
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB0AAAAdCAYAAABWk2cPAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAALfSURBVEhL7VW/ayJBFL7/5ZqziBzIcSCHxUE4hAiCgnAQsBASOAikEAIeCAaCiJAyIBICQURYwoJoEUmxa6MWioWxURu30mq77b57s86acX+oOQhp8sFjdmbfzrfve2/efMI74IP0VTB0gz/th/8iNbQxOt0eOmoN6WgAn78cwJeoYcLf78KrSPVneU3isEQZoz0D3pt03jhDrDTERJXxWM3A5yAOIPmgce/t2IvUGFzjkDa+7C5RTx0gWbxG0v8bBXUG3fLReigk4rh55gtbsAfpGDfhVTS+VA19bYbH7BkqU/56AzNU7nrYpbI7qfbEcxfBkSOHJGO27Vk0htqEYoXvARdS+tsEJyAJY1GRkOxnGTdq2zuaRZOkJ1Wi1+h7ODlJB/l1kYRKZVyKhMwoSmUw5M4uWMhIcl9f1l1qB2m/aMkZQIE2d5BeDTGiSD0VfC4jZPmSKiO+LMJGuoRE1bkiOIW00CAdW3NuxzLmxhD1hyHmug7dbBRD9KdLc4dR6Zfgn0ffXN2EjVSMLIcOrWxuwiyyPhYGI7X0m/agqPeIib5+yit/LWILKYuUlrTa5kbMwjko7J0AXc1RLZwifRF58Us1YXMzYSMV5WQ5ZWsG5VnYaG1BxM7zKBRzOAkHac460gxK9sUnVBqbu9rhKCS9lRaq1/poCeUq7tL6uPnjSLeoBRo9/KXjslqP4Na1gbiQssiULK9gP+VVqPnFQMblnwi+WmTfIji5amLES1mn/mz9yCFVuddZdiFlIJlTK+JtH2/AaPMogzipzrZ+4yQ1qCL1JSaNDL6bf81y1aOb5R6Vhow6G1tPNK9Borl0R2NLRiEaxNEF9Wa3yrHBSarTbeHot7ySqVmYR4AucDYuaJyzkfptZ0e/FeGa03m3jOQPizCAo0QG9W2ktL5HgGt45JRgaBh1x9R1WHY0KCTnLZOW5Kw0miuZq01ITGa6Z18Db9I3xAfpm+IdSIF/du91gSA2+I8AAAAASUVORK5CYII=');
|
128 |
+
background-repeat: no-repeat;
|
129 |
+
background-position: 90% 50%;
|
130 |
+
background-size: 29px;
|
131 |
+
}
|
132 |
+
|
133 |
+
.ti-dw-feed-item {
|
134 |
+
display: flex;
|
135 |
+
align-items: center;
|
136 |
+
}
|
137 |
+
|
138 |
+
.ti-dw-feed-item a {
|
139 |
+
float: left;
|
140 |
+
width: 89.9%;
|
141 |
+
}
|
142 |
+
|
143 |
+
.ti-dw-feed-item .ti-dw-day-container {
|
144 |
+
width: 100%;
|
145 |
+
letter-spacing: 3px;
|
146 |
+
display: block;
|
147 |
+
}
|
148 |
+
|
149 |
+
.ti-dw-feed-item .ti-dw-month-container {
|
150 |
+
|
151 |
+
width: 100%;
|
152 |
+
display: block;
|
153 |
+
font-weight: 600;
|
154 |
+
padding: 0px;
|
155 |
+
margin-top: -6px;
|
156 |
+
text-transform: uppercase;
|
157 |
+
font-size: 10px;
|
158 |
+
letter-spacing: 1px;
|
159 |
+
}
|
160 |
+
|
161 |
+
.ti-dw-feed-item .ti-dw-date-container {
|
162 |
+
float: left;
|
163 |
+
min-height: 30px;
|
164 |
+
margin-right: 0.1%;
|
165 |
+
width: 10%;
|
166 |
+
text-align: center;
|
167 |
+
}
|
168 |
+
|
169 |
+
.ti-dw-recommend-item span {
|
170 |
+
color: #72777c;
|
171 |
+
}
|
172 |
+
|
173 |
+
.ti-dw-powered-by {
|
174 |
+
font-style: italic;
|
175 |
+
text-align: right;
|
176 |
+
margin-top:3px;
|
177 |
+
}
|
178 |
+
|
179 |
+
</style>
|
180 |
+
<ul>
|
181 |
+
<?php
|
182 |
+
foreach ( $this->items as $item ) {
|
183 |
+
?>
|
184 |
+
<li class="ti-dw-feed-item"><span class="ti-dw-date-container"><span
|
185 |
+
class="ti-dw-day-container"><?php echo date( 'd', $item['date'] ); ?></span> <span
|
186 |
+
class="ti-dw-month-container"><?php echo substr( date( 'M', $item['date'] ), 0, 3 ); ?></span></span><a
|
187 |
+
href="
|
188 |
+
<?php
|
189 |
+
echo add_query_arg(
|
190 |
+
array(
|
191 |
+
'utm_campaign' => 'feed',
|
192 |
+
'utm_medium' => 'dashboard_widget',
|
193 |
+
), $item['link']
|
194 |
+
);
|
195 |
+
?>
|
196 |
+
" target="_blank"><?php echo $item['title']; ?></a>
|
197 |
+
<div class="clear"></div>
|
198 |
+
</li>
|
199 |
+
<?php
|
200 |
+
}
|
201 |
+
|
202 |
+
$recommend = apply_filters( 'themeisle_sdk_recommend_plugin_or_theme', array() );
|
203 |
+
if ( is_array( $recommend ) && ! empty( $recommend ) ) {
|
204 |
+
|
205 |
+
$type = $recommend['type'];
|
206 |
+
if ( ( $type == 'theme' && current_user_can( 'install_themes' ) ) || ( $type == 'plugin' && current_user_can( 'install_plugins' ) ) ) {
|
207 |
+
add_thickbox();
|
208 |
+
$url = add_query_arg(
|
209 |
+
array(
|
210 |
+
'theme' => $recommend['slug'],
|
211 |
+
), network_admin_url( 'theme-install.php' )
|
212 |
+
);
|
213 |
+
|
214 |
+
if ( 'plugin' === $type ) {
|
215 |
+
|
216 |
+
$url = add_query_arg(
|
217 |
+
array(
|
218 |
+
'tab' => 'plugin-information',
|
219 |
+
'plugin' => $recommend['slug'],
|
220 |
+
), network_admin_url( 'plugin-install.php' )
|
221 |
+
);
|
222 |
+
}
|
223 |
+
?>
|
224 |
+
<li class="ti-dw-recommend-item ">
|
225 |
+
<span class="ti-dw-recommend"><?php echo apply_filters( 'themeisle_sdk_dashboard_popular_label', sprintf( 'Popular %s', ucwords( $type ) ) ); ?>
|
226 |
+
: </span>
|
227 |
+
<?php
|
228 |
+
echo trim(
|
229 |
+
str_replace(
|
230 |
+
array(
|
231 |
+
'lite',
|
232 |
+
'Lite',
|
233 |
+
), '', $recommend['name']
|
234 |
+
)
|
235 |
+
);
|
236 |
+
?>
|
237 |
+
(<a class="thickbox open-plugin-details-modal"
|
238 |
+
href="<?php echo $url . '&TB_iframe=true&width=600&height=500'; ?>"><?php echo apply_filters( 'themeisle_sdk_dashboard_install_label', 'Install' ); ?></a>)
|
239 |
+
</li>
|
240 |
+
<li class="ti-dw-powered-by">
|
241 |
+
Powered by <?php echo esc_attr( $this->product->get_friendly_name() ); ?>
|
242 |
+
</li>
|
243 |
+
|
244 |
+
<?php
|
245 |
+
}
|
246 |
+
}
|
247 |
+
?>
|
248 |
+
</ul>
|
249 |
+
|
250 |
+
<?php
|
251 |
+
|
252 |
+
}
|
253 |
+
|
254 |
+
/**
|
255 |
+
* Either the current product is installed or not.
|
256 |
+
*
|
257 |
+
* @param array $val The current recommended product.
|
258 |
+
*
|
259 |
+
* @return bool Either we should exclude the plugin or not.
|
260 |
+
*/
|
261 |
+
public function remove_current_products( $val ) {
|
262 |
+
if ( $val['type'] === 'theme' ) {
|
263 |
+
$exist = wp_get_theme( $val['slug'] );
|
264 |
+
|
265 |
+
return ! $exist->exists();
|
266 |
+
} else {
|
267 |
+
$all_plugins = array_keys( get_plugins() );
|
268 |
+
foreach ( $all_plugins as $slug ) {
|
269 |
+
if ( strpos( $slug, $val['slug'] ) !== false ) {
|
270 |
+
return false;
|
271 |
+
}
|
272 |
+
}
|
273 |
+
|
274 |
+
return true;
|
275 |
+
}
|
276 |
+
}
|
277 |
+
|
278 |
+
/**
|
279 |
+
* Fetch themes from wporg api.
|
280 |
+
*
|
281 |
+
* @param string $author The author name.
|
282 |
+
*
|
283 |
+
* @return array The list of themes.
|
284 |
+
*/
|
285 |
+
function get_themes_from_wporg( $author ) {
|
286 |
+
$products = wp_remote_get(
|
287 |
+
'https://api.wordpress.org/themes/info/1.1/?action=query_themes&request[author]=' . $author . '&request[per_page]=30&request[fields][active_installs]=true'
|
288 |
+
);
|
289 |
+
$products = json_decode( wp_remote_retrieve_body( $products ) );
|
290 |
+
if ( is_object( $products ) ) {
|
291 |
+
$products = isset( $products->themes ) ? $products->themes : array();
|
292 |
+
} else {
|
293 |
+
$products = array();
|
294 |
+
}
|
295 |
+
|
296 |
+
return $products;
|
297 |
+
}
|
298 |
+
|
299 |
+
/**
|
300 |
+
* Fetch plugin from wporg api.
|
301 |
+
*
|
302 |
+
* @param string $author The author slug.
|
303 |
+
*
|
304 |
+
* @return array The list of plugins for the selected author.
|
305 |
+
*/
|
306 |
+
function get_plugins_from_wporg( $author ) {
|
307 |
+
$products = wp_remote_get(
|
308 |
+
'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'
|
309 |
+
);
|
310 |
+
$products = json_decode( wp_remote_retrieve_body( $products ) );
|
311 |
+
if ( is_object( $products ) ) {
|
312 |
+
$products = isset( $products->plugins ) ? $products->plugins : array();
|
313 |
+
} else {
|
314 |
+
$products = array();
|
315 |
+
}
|
316 |
+
|
317 |
+
return $products;
|
318 |
+
}
|
319 |
+
|
320 |
+
/**
|
321 |
+
* Fetch products from the recomended section.
|
322 |
+
*
|
323 |
+
* @return array|mixed The list of products to use in recomended section.
|
324 |
+
*/
|
325 |
+
function get_product_from_api() {
|
326 |
+
if ( false === ( $products = get_transient( 'themeisle_sdk_products' ) ) ) {
|
327 |
+
$products = array();
|
328 |
+
$themeisle_themes = $this->get_themes_from_wporg( 'themeisle' );
|
329 |
+
$codeinwp_themes = $this->get_themes_from_wporg( 'codeinwp' );
|
330 |
+
|
331 |
+
$themeisle_plugins = $this->get_plugins_from_wporg( 'themeisle' );
|
332 |
+
$codeinwp_plugins = $this->get_plugins_from_wporg( 'codeinwp' );
|
333 |
+
|
334 |
+
$all_themes = array_merge( $themeisle_themes, $codeinwp_themes );
|
335 |
+
foreach ( $all_themes as $theme ) {
|
336 |
+
if ( $theme->active_installs < 4999 ) {
|
337 |
+
continue;
|
338 |
+
}
|
339 |
+
$products[] = array(
|
340 |
+
'name' => $theme->name,
|
341 |
+
'type' => 'theme',
|
342 |
+
'slug' => $theme->slug,
|
343 |
+
'installs' => $theme->active_installs,
|
344 |
+
);
|
345 |
+
}
|
346 |
+
$all_plugins = array_merge( $themeisle_plugins, $codeinwp_plugins );
|
347 |
+
foreach ( $all_plugins as $plugin ) {
|
348 |
+
if ( $plugin->active_installs < 5999 ) {
|
349 |
+
continue;
|
350 |
+
}
|
351 |
+
$products[] = array(
|
352 |
+
'name' => $plugin->name,
|
353 |
+
'type' => 'plugin',
|
354 |
+
'slug' => $plugin->slug,
|
355 |
+
'installs' => $plugin->active_installs,
|
356 |
+
);
|
357 |
+
}
|
358 |
+
set_transient( 'themeisle_sdk_products', $products, 6 * HOUR_IN_SECONDS );
|
359 |
+
}
|
360 |
+
|
361 |
+
return $products;
|
362 |
+
}
|
363 |
+
|
364 |
+
/**
|
365 |
+
* Contact the API and fetch the recommended plugins/themes
|
366 |
+
*/
|
367 |
+
function recommend_plugin_or_theme() {
|
368 |
+
$products = $this->get_product_from_api();
|
369 |
+
if ( ! is_array( $products ) ) {
|
370 |
+
$products = array();
|
371 |
+
}
|
372 |
+
$products = array_filter( $products, array( $this, 'remove_current_products' ) );
|
373 |
+
$products = array_merge( $products );
|
374 |
+
if ( count( $products ) > 1 ) {
|
375 |
+
shuffle( $products );
|
376 |
+
$products = array_slice( $products, 0, 1 );
|
377 |
+
}
|
378 |
+
$to_recommend = isset( $products[0] ) ? $products[0] : $products;
|
379 |
+
|
380 |
+
return $to_recommend;
|
381 |
+
}
|
382 |
+
}
|
383 |
+
endif;
|
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-widget.php
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @package ThemeIsleSDK
|
4 |
+
* Ignore this.
|
5 |
+
*/
|
vendor/codeinwp/themeisle-sdk/load.php
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.1.2';
|
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
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,413 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
}
|
vendor/composer/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
'62bc7c35996f19a64625f7ff3ba2fb5e' => $vendorDir . '/codeinwp/full-width-page-templates/load.php',
|
10 |
+
'2e85745cdd367ff6e5579a8598f422b9' => $vendorDir . '/codeinwp/elementor-extra-widgets/load.php',
|
11 |
+
'7b1f4385ddfc86d120fe4380e8cb0fa6' => $vendorDir . '/codeinwp/themeisle-content-forms/load.php',
|
12 |
+
'957c51f8f334b5ea3be310bfb8b3492c' => $vendorDir . '/codeinwp/themeisle-sdk/load.php',
|
13 |
+
'b4f42ddc6ece5b15b772913931d8824c' => $vendorDir . '/codeinwp/templates-directory/load.php',
|
14 |
+
);
|
vendor/composer/autoload_namespaces.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// autoload_real.php @generated by Composer
|
4 |
+
|
5 |
+
class ComposerAutoloaderInit2cec8a2544647b27871b548196a9e428
|
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('ComposerAutoloaderInit2cec8a2544647b27871b548196a9e428', 'loadClassLoader'), true, true);
|
23 |
+
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit2cec8a2544647b27871b548196a9e428', '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 |
+
composerRequire2cec8a2544647b27871b548196a9e428($fileIdentifier, $file);
|
46 |
+
}
|
47 |
+
|
48 |
+
return $loader;
|
49 |
+
}
|
50 |
+
}
|
51 |
+
|
52 |
+
function composerRequire2cec8a2544647b27871b548196a9e428($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
ADDED
@@ -0,0 +1,195 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
[
|
2 |
+
{
|
3 |
+
"name": "codeinwp/elementor-extra-widgets",
|
4 |
+
"version": "dev-master",
|
5 |
+
"version_normalized": "9999999-dev",
|
6 |
+
"source": {
|
7 |
+
"type": "git",
|
8 |
+
"url": "https://github.com/Codeinwp/elementor-extra-widgets.git",
|
9 |
+
"reference": "3a0f72ba563210594769acc56529d6a0235bc093"
|
10 |
+
},
|
11 |
+
"dist": {
|
12 |
+
"type": "zip",
|
13 |
+
"url": "https://api.github.com/repos/Codeinwp/elementor-extra-widgets/zipball/3a0f72ba563210594769acc56529d6a0235bc093",
|
14 |
+
"reference": "3a0f72ba563210594769acc56529d6a0235bc093",
|
15 |
+
"shasum": ""
|
16 |
+
},
|
17 |
+
"time": "2018-03-29 14:11:23",
|
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-3.0-or-later"
|
28 |
+
],
|
29 |
+
"authors": [
|
30 |
+
{
|
31 |
+
"name": "ThemeIsle team",
|
32 |
+
"email": "friends@themeisle.com",
|
33 |
+
"homepage": "https://themeisle.com"
|
34 |
+
}
|
35 |
+
],
|
36 |
+
"homepage": "https://github.com/Codeinwp/elementor-extra-widgets"
|
37 |
+
},
|
38 |
+
{
|
39 |
+
"name": "codeinwp/themeisle-content-forms",
|
40 |
+
"version": "dev-master",
|
41 |
+
"version_normalized": "9999999-dev",
|
42 |
+
"source": {
|
43 |
+
"type": "git",
|
44 |
+
"url": "https://github.com/Codeinwp/themeisle-content-forms.git",
|
45 |
+
"reference": "725092d043db8212e2a0eee2e282e3d8acf49058"
|
46 |
+
},
|
47 |
+
"dist": {
|
48 |
+
"type": "zip",
|
49 |
+
"url": "https://api.github.com/repos/Codeinwp/themeisle-content-forms/zipball/725092d043db8212e2a0eee2e282e3d8acf49058",
|
50 |
+
"reference": "725092d043db8212e2a0eee2e282e3d8acf49058",
|
51 |
+
"shasum": ""
|
52 |
+
},
|
53 |
+
"time": "2018-03-13 15:10:31",
|
54 |
+
"type": "library",
|
55 |
+
"installation-source": "dist",
|
56 |
+
"autoload": {
|
57 |
+
"files": [
|
58 |
+
"load.php"
|
59 |
+
]
|
60 |
+
},
|
61 |
+
"notification-url": "https://packagist.org/downloads/",
|
62 |
+
"license": [
|
63 |
+
"GPL-2.0-or-later"
|
64 |
+
],
|
65 |
+
"authors": [
|
66 |
+
{
|
67 |
+
"name": "ThemeIsle team",
|
68 |
+
"email": "friends@themeisle.com",
|
69 |
+
"homepage": "https://themeisle.com"
|
70 |
+
}
|
71 |
+
],
|
72 |
+
"description": "ThemeIsle Content Forms ",
|
73 |
+
"homepage": "https://github.com/Codeinwp/themeisle-content-forms",
|
74 |
+
"keywords": [
|
75 |
+
"wordpress"
|
76 |
+
]
|
77 |
+
},
|
78 |
+
{
|
79 |
+
"name": "codeinwp/themeisle-sdk",
|
80 |
+
"version": "dev-master",
|
81 |
+
"version_normalized": "9999999-dev",
|
82 |
+
"source": {
|
83 |
+
"type": "git",
|
84 |
+
"url": "https://github.com/Codeinwp/themeisle-sdk.git",
|
85 |
+
"reference": "18bcad4b82796f4b6996dea42832ce3518924f25"
|
86 |
+
},
|
87 |
+
"dist": {
|
88 |
+
"type": "zip",
|
89 |
+
"url": "https://api.github.com/repos/Codeinwp/themeisle-sdk/zipball/18bcad4b82796f4b6996dea42832ce3518924f25",
|
90 |
+
"reference": "18bcad4b82796f4b6996dea42832ce3518924f25",
|
91 |
+
"shasum": ""
|
92 |
+
},
|
93 |
+
"time": "2018-03-19 21:12:50",
|
94 |
+
"type": "library",
|
95 |
+
"installation-source": "dist",
|
96 |
+
"autoload": {
|
97 |
+
"files": [
|
98 |
+
"load.php"
|
99 |
+
]
|
100 |
+
},
|
101 |
+
"notification-url": "https://packagist.org/downloads/",
|
102 |
+
"license": [
|
103 |
+
"GPL-2.0+"
|
104 |
+
],
|
105 |
+
"authors": [
|
106 |
+
{
|
107 |
+
"name": "ThemeIsle team",
|
108 |
+
"email": "friends@themeisle.com",
|
109 |
+
"homepage": "https://themeisle.com"
|
110 |
+
}
|
111 |
+
],
|
112 |
+
"description": "ThemeIsle SDK ",
|
113 |
+
"homepage": "https://github.com/Codeinwp/themeisle-sdk",
|
114 |
+
"keywords": [
|
115 |
+
"wordpress"
|
116 |
+
]
|
117 |
+
},
|
118 |
+
{
|
119 |
+
"name": "codeinwp/full-width-page-templates",
|
120 |
+
"version": "dev-master",
|
121 |
+
"version_normalized": "9999999-dev",
|
122 |
+
"source": {
|
123 |
+
"type": "git",
|
124 |
+
"url": "https://github.com/Codeinwp/full-width-page-templates.git",
|
125 |
+
"reference": "770990cf96bd9cb6b8c846b1c9bff16450e2dff9"
|
126 |
+
},
|
127 |
+
"dist": {
|
128 |
+
"type": "zip",
|
129 |
+
"url": "https://api.github.com/repos/Codeinwp/full-width-page-templates/zipball/770990cf96bd9cb6b8c846b1c9bff16450e2dff9",
|
130 |
+
"reference": "770990cf96bd9cb6b8c846b1c9bff16450e2dff9",
|
131 |
+
"shasum": ""
|
132 |
+
},
|
133 |
+
"time": "2018-03-02 08:33:03",
|
134 |
+
"type": "library",
|
135 |
+
"installation-source": "dist",
|
136 |
+
"autoload": {
|
137 |
+
"files": [
|
138 |
+
"load.php"
|
139 |
+
]
|
140 |
+
},
|
141 |
+
"notification-url": "https://packagist.org/downloads/",
|
142 |
+
"license": [
|
143 |
+
"GPL-2.0-or-later"
|
144 |
+
],
|
145 |
+
"authors": [
|
146 |
+
{
|
147 |
+
"name": "ThemeIsle team",
|
148 |
+
"email": "friends@themeisle.com",
|
149 |
+
"homepage": "https://themeisle.com"
|
150 |
+
}
|
151 |
+
],
|
152 |
+
"description": "A WordPress library to create full width page templates.",
|
153 |
+
"homepage": "https://github.com/Codeinwp/full-width-page-templates"
|
154 |
+
},
|
155 |
+
{
|
156 |
+
"name": "codeinwp/templates-directory",
|
157 |
+
"version": "dev-master",
|
158 |
+
"version_normalized": "9999999-dev",
|
159 |
+
"source": {
|
160 |
+
"type": "git",
|
161 |
+
"url": "https://github.com/Codeinwp/templates-directory.git",
|
162 |
+
"reference": "ef34db431aa55748fd0f1d313e67178ee9a02d59"
|
163 |
+
},
|
164 |
+
"dist": {
|
165 |
+
"type": "zip",
|
166 |
+
"url": "https://api.github.com/repos/Codeinwp/templates-directory/zipball/ef34db431aa55748fd0f1d313e67178ee9a02d59",
|
167 |
+
"reference": "ef34db431aa55748fd0f1d313e67178ee9a02d59",
|
168 |
+
"shasum": ""
|
169 |
+
},
|
170 |
+
"require": {
|
171 |
+
"codeinwp/full-width-page-templates": "master"
|
172 |
+
},
|
173 |
+
"time": "2018-03-29 12:05:43",
|
174 |
+
"type": "library",
|
175 |
+
"installation-source": "dist",
|
176 |
+
"autoload": {
|
177 |
+
"files": [
|
178 |
+
"load.php"
|
179 |
+
]
|
180 |
+
},
|
181 |
+
"notification-url": "https://packagist.org/downloads/",
|
182 |
+
"license": [
|
183 |
+
"GPL-2.0-or-later"
|
184 |
+
],
|
185 |
+
"authors": [
|
186 |
+
{
|
187 |
+
"name": "ThemeIsle team",
|
188 |
+
"email": "friends@themeisle.com",
|
189 |
+
"homepage": "https://themeisle.com"
|
190 |
+
}
|
191 |
+
],
|
192 |
+
"description": "A WordPress library to manage page templates.",
|
193 |
+
"homepage": "https://github.com/Codeinwp/templates-directory"
|
194 |
+
}
|
195 |
+
]
|