first commit

This commit is contained in:
CHIEFSOFT\ameye
2023-11-30 13:20:54 -05:00
commit e9e5c0546c
5833 changed files with 1801865 additions and 0 deletions
@@ -0,0 +1,446 @@
<?php
/**
* Add theme dashboard page
*/
/**
* Get theme actions required
*
* @return array|mixed|void
*/
if (!function_exists('envo_extra_get_actions_required')) :
function envo_extra_get_actions_required() {
$actions = array();
$actions['recommend_plugins'] = 'dismiss';
$recommend_plugins = get_theme_support('recommend-plugins');
if (is_array($recommend_plugins) && isset($recommend_plugins[0])) {
$recommend_plugins = $recommend_plugins[0];
} else {
$recommend_plugins[] = array();
}
if (!empty($recommend_plugins)) {
foreach ($recommend_plugins as $plugin_slug => $plugin_info) {
$plugin_info = wp_parse_args($plugin_info, array(
'name' => '',
'active_filename' => '',
));
if ($plugin_info['active_filename']) {
$active_file_name = $plugin_info['active_filename'];
} else {
$active_file_name = $plugin_slug . '/' . $plugin_slug . '.php';
}
if (!is_plugin_active($active_file_name)) {
$actions['recommend_plugins'] = 'active';
}
}
}
$actions = apply_filters('envo_extra_get_actions_required', $actions);
$hide_by_click = get_option('envo_extra_actions_dismiss');
if (!is_array($hide_by_click)) {
$hide_by_click = array();
}
$n_active = $n_dismiss = 0;
$number_notice = 0;
foreach ($actions as $k => $v) {
if (!isset($hide_by_click[$k])) {
$hide_by_click[$k] = false;
}
if ($v == 'active') {
$n_active ++;
$number_notice ++;
if ($hide_by_click[$k]) {
if ($hide_by_click[$k] == 'hide') {
$number_notice --;
}
}
} else if ($v == 'dismiss') {
$n_dismiss ++;
}
}
$return = array(
'actions' => $actions,
'number_actions' => count($actions),
'number_active' => $n_active,
'number_dismiss' => $n_dismiss,
'hide_by_click' => $hide_by_click,
'number_notice' => $number_notice,
);
if ($return['number_notice'] < 0) {
$return['number_notice'] = 0;
}
return $return;
}
endif;
add_action('switch_theme', 'envo_extra_reset_actions_required');
function envo_extra_reset_actions_required() {
delete_option('envo_extra_actions_dismiss');
}
if (!function_exists('envo_extra_admin_scripts')) :
/**
* Enqueue scripts for admin page only: Theme info page
*/
function envo_extra_admin_scripts($hook) {
wp_enqueue_style('enwoo-admin-css', ENVO_EXTRA_PLUGIN_URL . '/css/admin/admin.css');
if ($hook === 'appearance_page_et_enwoo') {
// Add recommend plugin css
wp_enqueue_style('plugin-install');
wp_enqueue_script('plugin-install');
wp_enqueue_script('updates');
add_thickbox();
}
}
endif;
add_action('admin_enqueue_scripts', 'envo_extra_admin_scripts');
add_action('admin_menu', 'envo_extra_theme_info');
function envo_extra_theme_info() {
$actions = envo_extra_get_actions_required();
$number_count = $actions['number_notice'];
if ($number_count > 0) {
/* translators: %1$s: replaced with number (counter) */
$update_label = sprintf(_n('%1$s action required', '%1$s actions required', $number_count, 'envo-extra'), $number_count);
$count = "<span class='update-plugins count-" . esc_attr($number_count) . "' title='" . esc_attr($update_label) . "'><span class='update-count'>" . number_format_i18n($number_count) . "</span></span>";
/* translators: %s: replaced with number (counter) */
$menu_title = sprintf(esc_html__('Enwoo theme %s', 'envo-extra'), $count);
} else {
$menu_title = esc_html__('Enwoo theme', 'envo-extra');
}
add_theme_page(esc_html__('Enwoo dashboard', 'envo-extra'), $menu_title, 'edit_theme_options', 'et_enwoo', 'envo_extra_theme_info_page');
}
/**
* Add admin notice when active theme, just show one time
*
* @return bool|null
*/
add_action('admin_notices', 'envo_extra_admin_notice');
function envo_extra_admin_notice() {
global $current_user;
$user_id = $current_user->ID;
$theme_data = wp_get_theme();
if (!get_user_meta($user_id, esc_html($theme_data->get('TextDomain')) . '_notice_ignore')) {
?>
<div class="notice notice-success enwoo-notice">
<h1>
<?php
/* translators: %1$s: theme name, %2$s theme version */
printf(esc_html__('Welcome to %1$s - Version %2$s', 'envo-extra'), esc_html($theme_data->Name), esc_html($theme_data->Version));
?>
</h1>
<p>
<?php
/* translators: %1$s: theme name, %2$s link */
printf(__('Welcome! Thank you for choosing %1$s! To fully take advantage of the best our theme can offer please make sure you visit our <a href="%2$s">Welcome page</a>', 'envo-extra'), esc_html($theme_data->Name), esc_url(admin_url('themes.php?page=et_enwoo')));
printf('<a href="%1$s" class="notice-dismiss dashicons dashicons-dismiss dashicons-dismiss-icon"></a>', '?' . esc_html($theme_data->get('TextDomain')) . '_notice_ignore=0');
?>
</p>
<p>
<a href="<?php echo esc_url(admin_url('themes.php?page=et_enwoo')) ?>" class="button button-primary button-hero" style="text-decoration: none;">
<?php
/* translators: %s theme name */
printf(esc_html__('Get started with %s', 'envo-extra'), esc_html($theme_data->Name))
?>
</a>
</p>
</div>
<?php
}
}
add_action('admin_init', 'envo_extra_notice_ignore');
function envo_extra_notice_ignore() {
global $current_user;
$theme_data = wp_get_theme();
$user_id = $current_user->ID;
/* If user clicks to ignore the notice, add that to their user meta */
if (isset($_GET[esc_html($theme_data->get('TextDomain')) . '_notice_ignore']) && '0' == $_GET[esc_html($theme_data->get('TextDomain')) . '_notice_ignore']) {
add_user_meta($user_id, esc_html($theme_data->get('TextDomain')) . '_notice_ignore', 'true', true);
}
}
function envo_extra_render_recommend_plugins($recommend_plugins = array()) {
foreach ($recommend_plugins as $plugin_slug => $plugin_info) {
$plugin_info = wp_parse_args($plugin_info, array(
'name' => '',
'active_filename' => '',
'description' => '',
));
$plugin_name = $plugin_info['name'];
$plugin_desc = $plugin_info['description'];
$status = is_dir(WP_PLUGIN_DIR . '/' . $plugin_slug);
$button_class = 'install-now button';
if ($plugin_info['active_filename']) {
$active_file_name = $plugin_info['active_filename'];
} else {
$active_file_name = $plugin_slug . '/' . $plugin_slug . '.php';
}
if (!is_plugin_active($active_file_name)) {
$button_txt = __('Install Now', 'envo-extra');
if (!$status) {
$install_url = wp_nonce_url(
add_query_arg(
array(
'action' => 'install-plugin',
'plugin' => $plugin_slug
), network_admin_url('update.php')
), 'install-plugin_' . $plugin_slug
);
} else {
$install_url = add_query_arg(array(
'action' => 'activate',
'plugin' => rawurlencode($active_file_name),
'plugin_status' => 'all',
'paged' => '1',
'_wpnonce' => wp_create_nonce('activate-plugin_' . $active_file_name),
), network_admin_url('plugins.php'));
$button_class = 'activate-now button-primary';
$button_txt = __('Activate', 'envo-extra');
}
$detail_link = add_query_arg(
array(
'tab' => 'plugin-information',
'plugin' => $plugin_slug,
'TB_iframe' => 'true',
'width' => '772',
'height' => '349',
), network_admin_url('plugin-install.php')
);
echo '<div class="rcp">';
echo '<h4 class="rcp-name">';
echo esc_html($plugin_name);
echo '</h4>';
echo '<p class="rcp-desc">';
echo wp_kses_post($plugin_desc);
echo '</p>';
echo '<p class="action-btn plugin-card-' . esc_attr($plugin_slug) . '"><a href="' . esc_url($install_url) . '" data-slug="' . esc_attr($plugin_slug) . '" class="' . esc_attr($button_class) . '">' . esc_html($button_txt) . '</a></p>';
echo '<a class="plugin-detail thickbox open-plugin-details-modal" href="' . esc_url($detail_link) . '">' . esc_html__('Details', 'envo-extra') . '</a>';
echo '</div>';
}
}
}
function envo_extra_admin_dismiss_actions() {
// Action for dismiss
if (isset($_GET['envo_extra_action_notice'])) {
$actions_dismiss = get_option('envo_extra_actions_dismiss');
if (!is_array($actions_dismiss)) {
$actions_dismiss = array();
}
$action_key = sanitize_text_field(wp_unslash($_GET['envo_extra_action_notice']));
if (isset($actions_dismiss[$action_key]) && $actions_dismiss[$action_key] == 'hide') {
$actions_dismiss[$action_key] = 'show';
} else {
$actions_dismiss[$action_key] = 'hide';
}
update_option('envo_extra_actions_dismiss', $actions_dismiss);
$url = null;
if (isset($_SERVER['REQUEST_URI'])) { // Input var okay.
$url = sanitize_text_field(wp_unslash($_SERVER['REQUEST_URI']));
$url = remove_query_arg('envo_extra_action_notice', $url);
}
wp_redirect($url);
die();
}
}
add_action('admin_init', 'envo_extra_admin_dismiss_actions');
add_action('envo_extra_recommended_title', 'envo_extra_recommended_title_construct');
function envo_extra_recommended_title_construct() {
// Check for current viewing tab
$tab = null;
if (isset($_GET['tab'])) {
$tab = sanitize_text_field(wp_unslash($_GET['tab']));
} else {
$tab = null;
}
$actions_r = envo_extra_get_actions_required();
$number_action = absint($actions_r['number_notice']);
$actions = $actions_r['actions'];
?>
<a href="?page=et_enwoo&tab=actions_required" class="nav-tab<?php echo $tab == 'actions_required' ? ' nav-tab-active' : null; ?>"><?php
esc_html_e('Recommended Actions', 'envo-extra');
echo ( $number_action > 0 ) ? '<span class="theme-action-count">' . absint($number_action) . '</span>' : '';
?>
</a>
<?php
}
add_action('envo_extra_import_title', 'envo_extra_recommended_import_construct');
function envo_extra_recommended_import_construct() {
// Check for current viewing tab
$tab = null;
if (isset($_GET['tab'])) {
$tab = sanitize_text_field(wp_unslash($_GET['tab']));
} else {
$tab = null;
}
?>
<a href="themes.php?page=envothemes-panel-install-demos" class="nav-tab<?php echo $tab == 'import_data' ? ' nav-tab-active' : null; ?>"><?php esc_html_e('One Click Demo Import', 'envo-extra') ?></a>
<?php
}
function envo_extra_theme_info_page() {
$theme_data = wp_get_theme();
if (isset($_GET['envo_extra_action_dismiss'])) {
$actions_dismiss = get_option('envo_extra_actions_dismiss');
if (!is_array($actions_dismiss)) {
$actions_dismiss = array();
}
$actions_dismiss[sanitize_text_field(wp_unslash($_GET['envo_extra_action_dismiss']))] = 'dismiss';
update_option('envo_extra_actions_dismiss', $actions_dismiss);
}
// Check for current viewing tab
$tab = null;
if (isset($_GET['tab'])) {
$tab = sanitize_text_field(wp_unslash($_GET['tab']));
} else {
$tab = null;
}
$actions_r = envo_extra_get_actions_required();
$number_action = $actions_r['number_notice'];
$actions = $actions_r['actions'];
$current_action_link = esc_url(admin_url('themes.php?page=et_enwoo&tab=actions_required'));
$recommend_plugins = get_theme_support('recommend-plugins');
if (is_array($recommend_plugins) && isset($recommend_plugins[0])) {
$recommend_plugins = $recommend_plugins[0];
} else {
$recommend_plugins[] = array();
}
?>
<div class="wrap about-wrap theme_info_wrapper">
<h1>
<?php
/* translators: %1$s theme name, %2$s theme version */
printf(esc_html__('Welcome to %1$s - Version %2$s', 'envo-extra'), esc_html($theme_data->Name), esc_html($theme_data->Version));
?>
</h1>
<div class="about-text"><?php echo esc_html($theme_data->Description); ?></div>
<h2 class="nav-tab-wrapper">
<a href="?page=et_enwoo" class="nav-tab<?php echo is_null($tab) ? ' nav-tab-active' : null; ?>"><?php echo esc_html($theme_data->Name); ?></a>
<?php do_action('envo_extra_recommended_title'); ?>
<?php do_action('envo_extra_import_title'); ?>
<?php do_action('envo_extra_admin_more_tabs'); ?>
</h2>
<?php if (is_null($tab)) { ?>
<div class="theme_info info-tab-content">
<div class="theme_info_column clearfix">
<div class="theme_info_left">
<div class="theme_link">
<h3><?php esc_html_e('Theme Customizer', 'envo-extra'); ?></h3>
<p class="about">
<?php
/* translators: %s theme name */
printf(esc_html__('%s supports the Theme Customizer for all theme settings. Click "Customize" to personalize your site.', 'envo-extra'), esc_html($theme_data->Name));
?>
</p>
<p>
<a href="<?php echo esc_url(admin_url('customize.php')); ?>" class="button button-primary"><?php esc_html_e('Start customizing', 'envo-extra'); ?></a>
</p>
</div>
<div class="theme_link">
<h3><?php esc_html_e('Theme documentation', 'envo-extra'); ?></h3>
<p class="about">
<?php
/* translators: %s theme name */
printf(esc_html__('Need help in setting up and configuring %s? Please take a look at our documentation page.', 'envo-extra'), esc_html($theme_data->Name));
?>
</p>
<p>
<a href="<?php echo esc_url('https://envothemes.com/docs/docs/enwoo/'); ?>" target="_blank" class="button button-secondary">
<?php
/* translators: %s theme name */
printf(esc_html__('%s Documentation', 'envo-extra'), esc_html($theme_data->Name));
?>
</a>
</p>
</div>
<div class="theme_link">
<h3><?php esc_html_e('Having trouble? Need support?', 'envo-extra'); ?></h3>
<p>
<a href="<?php echo esc_url('https://envothemes.com/contact/'); ?>" target="_blank" class="button button-secondary"><?php esc_html_e('Contact us', 'envo-extra'); ?></a>
</p>
</div>
</div>
<div class="theme_info_right">
<img src="<?php echo esc_url(get_stylesheet_directory_uri()); ?>/screenshot.png" />
</div>
</div>
</div>
<?php } ?>
<?php if ($tab == 'actions_required') { ?>
<div class="action-required-tab info-tab-content">
<?php if ($actions_r['number_active'] > 0) { ?>
<?php $actions = wp_parse_args($actions, array('page_on_front' => '', 'page_template')) ?>
<?php if ($actions['recommend_plugins'] == 'active') { ?>
<div id="plugin-filter" class="recommend-plugins action-required">
<a title="" class="dismiss" href="<?php echo esc_url(add_query_arg(array('envo_extra_action_notice' => 'recommend_plugins'), $current_action_link)); ?>">
<?php if ($actions_r['hide_by_click']['recommend_plugins'] == 'hide') { ?>
<span class="dashicons dashicons-hidden"></span>
<?php } else { ?>
<span class="dashicons dashicons-visibility"></span>
<?php } ?>
</a>
<h3><?php esc_html_e('Recommended plugins', 'envo-extra'); ?></h3>
<?php
envo_extra_render_recommend_plugins($recommend_plugins);
?>
</div>
<?php } ?>
<?php do_action('envo_extra_more_required_details', $actions); ?>
<?php } else { ?>
<p>
<?php esc_html_e('Hooray! There are no required actions for you right now.', 'envo-extra'); ?>
</p>
<?php } ?>
</div>
<?php } ?>
<?php if ($tab == 'import_data') { ?>
<div class="import-data-tab info-tab-content">
<a href="<?php echo esc_url(admin_url('themes.php?page=envothemes-panel-install-demos')) ?>" class="button" style="text-decoration: none;">
<?php esc_html_e('Import demo data', 'envo-extra'); ?>
</a>
</div>
<?php } ?>
</div> <!-- END .theme_info -->
<?php
}
@@ -0,0 +1,155 @@
<?php
// Meta-Box
// How to use: $meta_value = get_post_meta( $post_id, $field_id, true );
class EnwooOptionsMetabox {
private $screens = array( 'post', 'page' );
private $fields = array(
array(
'label' => 'Hide Title',
'id' => 'envo_extra_hide_title',
'type' => 'checkbox',
),
array(
'label' => 'Hide Sidebar',
'id' => 'envo_extra_hide_sidebar',
'type' => 'checkbox',
),
array(
'label' => 'Transparent Header',
'id' => 'envo_extra_transparent_header',
'type' => 'checkbox',
),
array(
'label' => 'Transparent Header Text Color',
'id' => 'envo_extra_header_text_color',
'type' => 'color',
'default' => '#000',
),
);
public function __construct() {
add_action( 'add_meta_boxes', array( $this, 'add_meta_boxes' ) );
add_action( 'save_post', array( $this, 'save_fields' ) );
add_action( 'admin_head', array( $this, 'admin_head' ) );
}
public function admin_head() {
global $typenow;
if ( in_array( $typenow, $this->screens ) ) {
?><script>
jQuery.noConflict();
(function($) {
$(document).ready(function () {
if (document.getElementById('envo_extra_transparent_header').checked) {
$("#envo_extra_header_text_color").closest("tr").show()
} else {
$("#envo_extra_header_text_color").closest("tr").hide()
}
$('#envo_extra_transparent_header').on('change', function (e) {
if (e.currentTarget.checked) {
$("#envo_extra_header_text_color").closest("tr").show()
} else {
$("#envo_extra_header_text_color").closest("tr").hide()
}
})
})
})
(jQuery);
</script><?php
?><?php
}
}
public function add_meta_boxes() {
foreach ( $this->screens as $s ) {
add_meta_box(
'EnwooOptions', esc_html__( 'Enwoo Options', 'envo-extra' ), array( $this, 'meta_box_callback' ), $s, 'side', 'high'
);
}
}
public function meta_box_callback( $post ) {
wp_nonce_field( 'EnwooOptions_data', 'EnwooOptions_nonce' );
esc_html_e( 'Custom page options', 'envo-extra' );
$this->field_generator( $post );
}
public function field_generator( $post ) {
$output = '';
$allowed_html = array(
'input' => array(
'id' => array(),
'name' => array(),
'type' => array(),
'value' => array(),
'checked' => array(),
'onclick' => array(),
),
'label' => array(
'for' => array(),
),
'strong' => array(),
'tr' => array(),
'td' => array(),
);
foreach ( $this->fields as $field ) {
$label = '<label for="' . esc_attr($field[ 'id' ]) . '">' . esc_html($field[ 'label' ]) . '</label>';
$meta_value = get_post_meta( $post->ID, $field[ 'id' ], true );
if ( empty( $meta_value ) ) {
if ( isset( $field[ 'default' ] ) ) {
$meta_value = $field[ 'default' ];
}
}
switch ( $field[ 'type' ] ) {
case 'checkbox':
$input = sprintf(
'<input %1$s id="%2$s" name="%3$s" type="checkbox" value="on">', $meta_value === 'on' ? 'checked' : '', esc_attr($field[ 'id' ]), esc_attr($field[ 'id' ])
);
break;
default:
$input = sprintf(
'<input %1$s id="%2$s" name="%3$s" type="%4$s" value="%5$s">', $field[ 'type' ] !== 'color' ? 'style="width: 100%"' : '', esc_attr($field[ 'id' ]), esc_attr($field[ 'id' ]), esc_attr($field[ 'type' ]), esc_attr($meta_value)
);
}
$output .= $this->format_rows( $label, $input );
}
echo '<table class="form-table"><tbody>' . wp_kses($output, $allowed_html) . '</tbody></table>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
}
public function format_rows( $label, $input ) {
return '<tr><td><strong>' . $label . '</strong></td><td>' . $input . '</td><tr>';
}
public function save_fields( $post_id ) {
if ( !isset( $_POST[ 'EnwooOptions_nonce' ] ) ) {
return $post_id;
}
$nonce = ( isset( $_POST[ 'EnwooOptions_nonce' ] ) ? sanitize_text_field( wp_unslash( $_POST[ 'EnwooOptions_nonce' ] ) ) : '' );
if ( !wp_verify_nonce( $nonce, 'EnwooOptions_data' ) ) {
return $post_id;
}
if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {
return $post_id;
}
foreach ( $this->fields as $field ) {
switch ( $field['type'] ) {
case 'checkbox':
update_post_meta( $post_id, $field['id'], isset( $_POST[ $field['id'] ] ) ? sanitize_text_field( wp_unslash( $_POST[ $field['id'] ])) : '' );
break;
default:
if ( isset( $_POST[ $field['id'] ] ) ) {
$sanitized = sanitize_text_field( wp_unslash($_POST[ $field['id'] ]) );
update_post_meta( $post_id, $field['id'], $sanitized );
}
}
}
}
}
if ( class_exists( 'EnwooOptionsMetabox' ) ) {
new EnwooOptionsMetabox;
};
@@ -0,0 +1,515 @@
.envo-extra-block-quote-wrapper .envo-extra-block-quote-inner {
padding: 20px;
border-left: 5px solid #6ec1e4;
background-color: #f9f9f9;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
align-items: center;
justify-content: center;
}
.envo-extra-block-quote-icon {
position: relative;
display: inline-flex;
align-items: center;
justify-content: center;
}
.envo-extra-block-quote-icon > i {
color: #6ec1e4;
font-size: 22px;
}
.envo-extra-block-quote-icon > svg {
width: 30px;
height: auto;
fill: #6ec1e4;
}
.envo-extra-block-quote-content-wrap {
margin: 0 20px;
}
.envo-extra-block-quote-content-wrap > .envo-extra-block-quote-text {
margin: 0 0 10px;
font-size: 15px;
color: #282828;
}
.envo-extra-block-quote-desc {
margin: 10px 15px;
}
.envo-extra-block-quote-title {
position: relative;
display: inline-block;
font-size: 19px;
color: #282828;
font-weight: 500;
}
.envo-extra-block-quote-title::before {
content: "";
position: absolute;
width: 10px;
background-color: #282828;
height: 2px;
top: 50%;
right: 100%;
margin-right: 5px;
}
.envo-extra-block-quote-designation {
display: block;
font-size: 14px;
}
.envo-extra-block-quote-layout-2 .envo-extra-block-quote-inner {
display: inline-block;
border: 2px solid #6ec1e4;
}
.envo-extra-block-quote-layout-2 .envo-extra-block-quote-icon {
position: absolute;
top: 0;
left: 50%;
-webkit-transform: translateX(-50%);
-ms-transform: translateX(-50%);
transform: translateX(-50%);
margin-top: -25px;
width: 60px;
height: 60px;
line-height: 60px;
border-radius: 50%;
background-color: #6ec1e4;
color: #fff;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
}
.envo-extra-block-quote-layout-2 .envo-extra-block-quote-icon > i {
color: #fff;
font-size: 22px;
}
.envo-extra-block-quote-layout-2 .envo-extra-block-quote-icon > svg {
width: 20px;
height: 20px;
fill: #ffffff;
}
.envo-extra-block-quote-layout-2 .envo-extra-block-quote-content-wrap {
margin: 38px 0 20px;
text-align: center;
}
.envo-extra-block-quote-layout-3 {
overflow: hidden;
display: inline-block;
margin: 1rem;
}
.envo-extra-block-quote-layout-3 .envo-extra-block-quote-inner {
border: 1px solid #6ec1e4;
background-color: #fff;
position: relative;
display: inline-block;
margin: 0;
padding: 1rem;
}
.envo-extra-block-quote-layout-3 .envo-extra-block-quote-inner::before {
content: "";
position: absolute;
background-color: #fff;
bottom: -10%;
left: 0;
right: 0;
top: -10%;
-webkit-transform: rotate(-25deg) skew(5deg);
-ms-transform: rotate(-25deg) skew(5deg);
transform: rotate(-25deg) skew(5deg);
}
.envo-extra-block-quote-layout-3 .envo-extra-block-quote-content-wrap {
margin: 27px 0;
z-index: 1;
position: relative;
}
.envo-extra-block-quote-layout-3 .envo-extra-block-quote-content-wrap > .envo-extra-block-quote-title {
position: relative;
margin: 15px;
}
.envo-extra-block-quote-layout-4 .envo-extra-block-quote-icon {
position: absolute;
left: 145px;
}
.envo-extra-block-quote-layout-4 .envo-extra-block-quote-icon > i,
.envo-extra-block-quote-layout-5 .envo-extra-block-quote-icon > i {
font-size: 50px;
color: #dbdbdb;
}
.envo-extra-block-quote-layout-4 .envo-extra-block-quote-icon > svg,
.envo-extra-block-quote-layout-5 .envo-extra-block-quote-icon > svg {
width: 60px;
height: 60px;
fill: #dbdbdb;
}
.envo-extra-block-quote-layout-4 .envo-extra-block-quote-content-img > img {
min-width: 100px;
width: 100px;
height: 100px;
-o-object-fit: cover;
object-fit: cover;
border-radius: 50%;
}
.envo-extra-block-quote-layout-4 .envo-extra-block-quote-content-wrap,
.envo-extra-block-quote-layout-9 .envo-extra-block-quote-content {
z-index: 1;
}
.envo-extra-block-quote-layout-5 .envo-extra-block-quote-icon {
position: absolute;
left: 40px;
top: 30px;
}
.envo-extra-block-quote-layout-5 .envo-extra-block-quote-content-wrap {
text-align: center;
margin: 30px 20px 20px;
z-index: 1;
position: relative;
}
.envo-extra-block-quote-layout-5 .envo-extra-block-quote-content-wrap::before {
content: "";
position: absolute;
width: 100px;
height: 1px;
background-color: #6ec1e4;
top: 0;
left: 0;
margin: -15px 0 0;
max-width: 100%;
}
.envo-extra-block-quote-layout-6 .envo-extra-block-quote-inner,
.envo-extra-block-quote-layout-7 .envo-extra-block-quote-inner,
.envo-extra-block-quote-layout-8 .envo-extra-block-quote-inner {
border: none;
display: inline-block;
}
.envo-extra-block-quote-layout-6 .envo-extra-block-quote-text {
border: 2px solid #6ec1e4;
padding: 20px;
position: relative;
}
.envo-extra-block-quote-layout-6 .envo-extra-block-quote-text::before {
content: "";
position: absolute;
width: 80px;
height: 10px;
background-color: #f9f9f9;
bottom: -6px;
left: 50px;
z-index: 2;
}
.envo-extra-block-quote-layout-6 .envo-extra-block-quote-text::after {
content: "";
position: absolute;
border: 2px solid #6ec1e4;
border-radius: 0 50px 0 0;
width: 60px;
height: 60px;
bottom: -60px;
left: 50px;
z-index: 3;
border-bottom: none !important;
}
.envo-extra-block-quote-layout-6 .envo-extra-block-quote-desc {
margin: 10px 0 0 148px;
}
.envo-extra-block-quote-layout-7 .envo-extra-block-quote-icon {
position: absolute;
top: 20px;
left: 27px;
}
.envo-extra-block-quote-layout-7 .envo-extra-block-quote-icon > i {
font-size: 50px;
color: #707070;
display: inline-block;
}
.envo-extra-block-quote-layout-7 .envo-extra-block-quote-icon > svg {
width: 60px;
height: 60px;
fill: #707070;
display: inline-block;
}
.envo-extra-block-quote-layout-7 .envo-extra-block-quote-content-wrap {
margin: 70px 10px;
text-align: center;
}
.envo-extra-block-quote-layout-8 .envo-extra-block-quote-icon {
position: absolute;
top: 0;
left: 20px;
margin-top: -30px;
}
.envo-extra-block-quote-layout-8 .envo-extra-block-quote-icon > i {
font-size: 50px;
color: #707070;
}
.envo-extra-block-quote-layout-8 .envo-extra-block-quote-icon > svg {
width: 60px;
height: 60px;
fill: #707070;
}
.envo-extra-block-quote-layout-8 .envo-extra-block-quote-content-wrap {
margin: 30px 0;
}
.envo-extra-block-quote-layout-9 .envo-extra-block-quote-icon {
position: absolute;
top: 0;
left: 0;
margin-top: -5px;
}
.envo-extra-block-quote-layout-9 .envo-extra-block-quote-icon > i {
font-size: 50px;
color: #ddd;
}
.envo-extra-block-quote-layout-9 .envo-extra-block-quote-icon > svg {
width: 70px;
height: 70px;
fill: #dddddd;
}
.envo-extra-block-quote-layout-9 .envo-extra-block-quote-content-wrap {
margin: 45px 0;
}
.envo-extra-block-quote-layout-10 .envo-extra-block-quote-icon {
width: 60px;
height: 60px;
display: -webkit-inline-box;
display: -ms-inline-flexbox;
display: inline-flex;
background-color: #6ec1e4;
overflow: hidden;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
border-radius: 50%;
}
.envo-extra-block-quote-layout-10 .envo-extra-block-quote-icon > i {
font-size: 22px;
color: #fff;
}
.envo-extra-block-quote-layout-10 .envo-extra-block-quote-icon > svg {
fill: #fff;
width: 20px;
height: auto;
}
.envo-extra-block-quote-layout-10 .envo-extra-block-quote-content-wrap {
margin: 10px 0;
}
@media screen and (min-width: 1025px) {
.envo-extra-content-alignright .envo-extra-box-icon-wrapper-inner {
-webkit-box-orient: horizontal;
-webkit-box-direction: reverse;
-ms-flex-direction: row-reverse;
flex-direction: row-reverse;
}
.elementor-align-center .envo-extra-block-quote-layout-1 .envo-extra-block-quote-inner {
display: inline-block;
text-align: center;
}
.elementor-align-center .envo-extra-block-quote-layout-1 .envo-extra-block-quote-icon > i,
.elementor-align-center .envo-extra-block-quote-layout-1 .envo-extra-block-quote-icon > svg {
margin-bottom: 10px;
}
.elementor-align-right .envo-extra-block-quote-layout-1 .envo-extra-block-quote-inner {
text-align: right;
-webkit-box-orient: horizontal;
-webkit-box-direction: reverse;
-ms-flex-direction: row-reverse;
flex-direction: row-reverse;
border-right: 5px solid #6ec1e4;
border-left: none;
}
.elementor-align-right .envo-extra-block-quote-layout-1 .envo-extra-block-quote-icon,
.elementor-align-right .envo-extra-block-quote-layout-10 .envo-extra-block-quote-icon > i,
.elementor-align-right .envo-extra-block-quote-layout-10 .envo-extra-block-quote-icon > svg {
-webkit-transform: rotateY(180deg);
transform: rotateY(180deg);
}
.elementor-align-right .envo-extra-block-quote-layout-1 .envo-extra-block-quote-title::before,
.elementor-align-right .envo-extra-block-quote-layout-10 .envo-extra-block-quote-title::before,
.elementor-align-right .envo-extra-block-quote-layout-2 .envo-extra-block-quote-title::before,
.elementor-align-right .envo-extra-block-quote-layout-3 .envo-extra-block-quote-title::before,
.elementor-align-right .envo-extra-block-quote-layout-4 .envo-extra-block-quote-title::before,
.elementor-align-right .envo-extra-block-quote-layout-5 .envo-extra-block-quote-title::before,
.elementor-align-right .envo-extra-block-quote-layout-6 .envo-extra-block-quote-title::before,
.elementor-align-right .envo-extra-block-quote-layout-7 .envo-extra-block-quote-title::before,
.elementor-align-right .envo-extra-block-quote-layout-8 .envo-extra-block-quote-title::before,
.elementor-align-right .envo-extra-block-quote-layout-9 .envo-extra-block-quote-title::before {
left: 100%;
margin-left: 5px;
}
.elementor-align-left .envo-extra-block-quote-layout-2 {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
text-align: right;
}
.elementor-align-left .envo-extra-block-quote-layout-2 .envo-extra-block-quote-icon {
top: 50%;
left: 0;
-webkit-transform: translateY(-50%);
-ms-transform: translateY(-50%);
transform: translateY(-50%);
margin-top: 0;
margin-left: -30px;
}
.elementor-align-left .envo-extra-block-quote-layout-2 .envo-extra-block-quote-content-wrap {
text-align: left;
margin: 25px;
}
.elementor-align-right .envo-extra-block-quote-layout-2 {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
text-align: right;
-webkit-box-orient: horizontal;
-webkit-box-direction: reverse;
-ms-flex-direction: row-reverse;
flex-direction: row-reverse;
}
.elementor-align-right .envo-extra-block-quote-layout-2 .envo-extra-block-quote-icon {
top: 50%;
left: 100%;
-webkit-transform: translateY(-50%) rotateY(180deg);
transform: translateY(-50%) rotateY(180deg);
margin-top: 0;
margin-left: -30px;
}
.elementor-align-right .envo-extra-block-quote-layout-2 .envo-extra-block-quote-content-wrap {
text-align: right;
margin: 25px;
}
.elementor-align-right .envo-extra-block-quote-layout-3,
.elementor-align-right .envo-extra-block-quote-layout-5 .envo-extra-block-quote-content-wrap,
.elementor-align-right .envo-extra-block-quote-layout-7 .envo-extra-block-quote-content-wrap {
text-align: right;
}
.elementor-align-center .envo-extra-block-quote-layout-3 {
text-align: center;
}
.elementor-align-right .envo-extra-block-quote-layout-4 .envo-extra-block-quote-icon {
-webkit-transform: rotateY(180deg);
transform: rotateY(180deg);
right: 145px;
left: auto;
}
.elementor-align-right .envo-extra-block-quote-layout-4 .envo-extra-block-quote-content {
-webkit-box-orient: horizontal;
-webkit-box-direction: reverse;
-ms-flex-direction: row-reverse;
flex-direction: row-reverse;
text-align: right;
}
.elementor-align-center .envo-extra-block-quote-layout-4 .envo-extra-block-quote-icon {
-webkit-transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
left: 50%;
top: 50%;
margin-top: 25px;
}
.elementor-align-center .envo-extra-block-quote-layout-4 .envo-extra-block-quote-content {
display: inline-block;
text-align: center;
z-index: 1;
}
.elementor-align-center .envo-extra-block-quote-layout-4 .envo-extra-block-quote-content .envo-extra-block-quote-content-img > img {
margin-bottom: 15px;
}
.elementor-align-left .envo-extra-block-quote-layout-5 .envo-extra-block-quote-content-wrap,
.elementor-align-left .envo-extra-block-quote-layout-7 .envo-extra-block-quote-content-wrap {
text-align: left;
}
.elementor-align-left .envo-extra-block-quote-layout-5 .envo-extra-block-quote-content-wrap::before {
left: 0;
}
.elementor-align-center .envo-extra-block-quote-layout-5 .envo-extra-block-quote-content-wrap::before,
.elementor-align-center .envo-extra-block-quote-layout-6 .envo-extra-block-quote-text::before,
.elementor-align-center .envo-extra-block-quote-layout-8 .envo-extra-block-quote-icon {
left: 50%;
-webkit-transform: translateX(-50%);
-ms-transform: translateX(-50%);
transform: translateX(-50%);
}
.elementor-align-right .envo-extra-block-quote-layout-5 .envo-extra-block-quote-icon {
-webkit-transform: rotateY(180deg);
transform: rotateY(180deg);
left: auto;
top: 30px;
right: 40px;
}
.elementor-align-right .envo-extra-block-quote-layout-5 .envo-extra-block-quote-content-wrap::before {
left: auto;
right: 0;
}
.elementor-align-center .envo-extra-block-quote-layout-6 .envo-extra-block-quote-text::after,
.elementor-align-left .envo-extra-block-quote-layout-6 .envo-extra-block-quote-text::after {
border-left: none !important;
}
.elementor-align-right .envo-extra-block-quote-layout-6 .envo-extra-block-quote-text::after {
left: 100%;
-webkit-transform: translateX(-50%);
-ms-transform: translateX(-50%);
transform: translateX(-50%);
margin-left: -62px;
border-right: none !important;
border-radius: 50px 0 0;
border-left: 2px solid #6ec1e4;
}
.elementor-align-center .envo-extra-block-quote-layout-6 .envo-extra-block-quote-text::after {
left: 50%;
-webkit-transform: translateX(-50%);
-ms-transform: translateX(-50%);
transform: translateX(-50%);
margin-left: -25px;
}
.elementor-align-center .envo-extra-block-quote-layout-6 .envo-extra-block-quote-desc {
margin: 10px 0 10px 217px;
text-align: center;
}
.elementor-align-right .envo-extra-block-quote-layout-6 .envo-extra-block-quote-text::before {
left: 100%;
-webkit-transform: translateX(-50%);
-ms-transform: translateX(-50%);
transform: translateX(-50%);
margin-left: -85px;
}
.elementor-align-right .envo-extra-block-quote-layout-6 .envo-extra-block-quote-desc {
margin: 10px 144px 10px 0;
text-align: right;
}
.elementor-align-right .envo-extra-block-quote-layout-7 .envo-extra-block-quote-icon {
-webkit-transform: rotateY(180deg);
transform: rotateY(180deg);
left: auto;
right: 27px;
}
.elementor-align-right .envo-extra-block-quote-layout-8 .envo-extra-block-quote-icon {
-webkit-transform: rotateY(180deg);
transform: rotateY(180deg);
right: 20px;
left: auto;
}
.elementor-align-left .envo-extra-block-quote-layout-9 .envo-extra-block-quote-icon {
right: 0;
left: auto;
-webkit-transform: rotate(180deg);
-ms-transform: rotate(180deg);
transform: rotate(180deg);
}
.elementor-align-center .envo-extra-block-quote-layout-9 .envo-extra-block-quote-icon {
left: 50%;
-webkit-transform: translateX(-50%) rotate(0);
-ms-transform: translateX(-50%) rotate(0);
transform: translateX(-50%) rotate(0);
}
.elementor-align-right .envo-extra-block-quote-layout-10 .envo-extra-block-quote-inner,
.elementor-align-right .envo-extra-block-quote-layout-9 .envo-extra-block-quote-inner {
border-right: 5px solid #6ec1e4;
border-left: none;
}
}
@@ -0,0 +1,293 @@
.envo-extra-elementor-button {
position: relative;
display: inline-block;
line-height: 1;
background-color: var(--e-global-color-accent);
font-size: 15px;
padding: 15px 30px;
border-radius: 3px;
color: #fff;
fill: #fff;
text-align: center;
overflow: hidden;
-webkit-transition: 0.3s ease-in-out;
-o-transition: 0.3s ease-in-out;
transition: 0.3s ease-in-out;
}
.envo-extra-elementor-button-inner {
display: -webkit-inline-box;
display: -ms-inline-flexbox;
display: inline-flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
position: relative;
z-index: 1;
}
.envo-extra-elementor-button-media {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
margin: 0;
}
.envo-extra-elementor-button-media > svg {
width: 20px;
height: auto;
}
.envo-extra-align-icon-left .envo-extra-elementor-button-media,
.envo-extra-promo-box-align-left > i,
.envo-extra-promo-box-align-left > svg {
margin-right: 5px;
}
.envo-extra-align-icon-right .envo-extra-elementor-button-media {
margin-left: 5px;
-webkit-box-ordinal-group: 3;
-ms-flex-order: 2;
order: 2;
}
[class*="envo-extra-elementor-button-hover-style-underline"]:before {
content: "";
position: absolute;
background-color: #2b2b2b;
height: 5px;
-webkit-transition-property: all;
-o-transition-property: all;
transition-property: all;
-webkit-transition-duration: 0.3s;
-o-transition-duration: 0.3s;
transition-duration: 0.3s;
-webkit-transition-timing-function: ease-out;
-o-transition-timing-function: ease-out;
transition-timing-function: ease-out;
}
.envo-extra-elementor-button-hover-style-underlineFromLeft:before,
.envo-extra-elementor-horizontal-menu-style-underlineFromLeft .envo-extra-elementor-horizontal-navbar-nav > li > a:before {
left: 0;
right: 100%;
bottom: 0;
}
.envo-extra-elementor-button-hover-style-underlineFromRight:before,
.envo-extra-elementor-horizontal-menu-style-underlineFromRight .envo-extra-elementor-horizontal-navbar-nav > li > a:before {
left: 100%;
right: 0;
bottom: 0;
}
.envo-extra-elementor-button-hover-style-underlineFromCenter:before,
.envo-extra-elementor-horizontal-menu-style-underlineFromCenter .envo-extra-elementor-horizontal-navbar-nav > li > a:before {
left: 51%;
right: 51%;
bottom: 0;
}
.envo-extra-elementor-button-hover-style-underlineFromLeft:focus:before,
.envo-extra-elementor-button-hover-style-underlineFromLeft:hover:before,
.envo-extra-elementor-horizontal-menu-style-underlineCrossOver .envo-extra-elementor-horizontal-navbar-nav > li.current_page_item > a:before,
.envo-extra-elementor-horizontal-menu-style-underlineCrossOver .envo-extra-elementor-horizontal-navbar-nav > li:hover > a:before,
.envo-extra-elementor-horizontal-menu-style-underlineFromLeft .envo-extra-elementor-horizontal-navbar-nav > li.current_page_item > a:before,
.envo-extra-elementor-horizontal-menu-style-underlineFromLeft .envo-extra-elementor-horizontal-navbar-nav > li:hover > a:before,
.envo-extra-horizontal-timeline-next {
right: 0;
}
.envo-extra-elementor-button-hover-style-underlineFromRight:focus:before,
.envo-extra-elementor-button-hover-style-underlineFromRight:hover:before,
.envo-extra-elementor-horizontal-menu-style-underlineFromRight .envo-extra-elementor-horizontal-navbar-nav > li.current_page_item > a:before,
.envo-extra-elementor-horizontal-menu-style-underlineFromRight .envo-extra-elementor-horizontal-navbar-nav > li:hover > a:before,
.envo-extra-horizontal-timeline-prev {
left: 0;
}
.envo-extra-elementor-button-hover-style-underlineFromCenter:focus:before,
.envo-extra-elementor-button-hover-style-underlineFromCenter:hover:before,
.envo-extra-elementor-horizontal-menu-style-underlineFromCenter .envo-extra-elementor-horizontal-navbar-nav > li.current_page_item > a:before,
.envo-extra-elementor-horizontal-menu-style-underlineFromCenter .envo-extra-elementor-horizontal-navbar-nav > li:hover > a:before {
left: 0;
right: 0;
}
.envo-extra-elementor-button-hover-style-skewFill:before {
position: absolute;
top: 0;
height: 100%;
content: "";
background-color: #e1e1e1;
width: 120%;
left: -10%;
-webkit-transform: skew(30deg);
-ms-transform: skew(30deg);
transform: skew(30deg);
-webkit-transition: -webkit-transform 0.4s cubic-bezier(0.3, 1, 0.8, 1);
transition: transform 0.4s cubic-bezier(0.3, 1, 0.8, 1);
-o-transition: transform 0.4s cubic-bezier(0.3, 1, 0.8, 1);
transition: transform 0.4s cubic-bezier(0.3, 1, 0.8, 1), -webkit-transform 0.4s cubic-bezier(0.3, 1, 0.8, 1);
}
.envo-extra-elementor-button-hover-style-skewFill:focus::before,
.envo-extra-elementor-button-hover-style-skewFill:hover::before {
-webkit-transform: translate3d(100%, 0, 0);
transform: translate3d(100%, 0, 0);
}
.envo-extra-elementor-button-hover-style-bubbleFromDown::before {
position: absolute;
content: "";
background-color: #e1e1e1;
width: 120%;
height: 0;
padding-bottom: 120%;
top: -110%;
left: -10%;
border-radius: 50%;
-webkit-transform: translate3d(0, 68%, 0) scale3d(0, 0, 0);
transform: translate3d(0, 68%, 0) scale3d(0, 0, 0);
}
.envo-extra-elementor-button-hover-style-bubbleFromDown:focus::before,
.envo-extra-elementor-button-hover-style-bubbleFromDown:hover::before {
-webkit-transform: translate3d(0, 0, 0) scale3d(1, 1, 1);
transform: translate3d(0, 0, 0) scale3d(1, 1, 1);
-webkit-transition: -webkit-transform 0.4s cubic-bezier(0.1, 0, 0.3, 1);
transition: transform 0.4s cubic-bezier(0.1, 0, 0.3, 1);
-o-transition: transform 0.4s cubic-bezier(0.1, 0, 0.3, 1);
transition: transform 0.4s cubic-bezier(0.1, 0, 0.3, 1), -webkit-transform 0.4s cubic-bezier(0.1, 0, 0.3, 1);
}
.envo-extra-elementor-button-hover-style-bubbleFromDown::after {
content: "";
background-color: #e1e1e1;
-webkit-transform: translate3d(0, -100%, 0);
transform: translate3d(0, -100%, 0);
-webkit-transition: -webkit-transform 0.4s cubic-bezier(0.1, 0, 0.3, 1);
transition: transform 0.4s cubic-bezier(0.1, 0, 0.3, 1);
-o-transition: transform 0.4s cubic-bezier(0.1, 0, 0.3, 1);
transition: transform 0.4s cubic-bezier(0.1, 0, 0.3, 1), -webkit-transform 0.4s cubic-bezier(0.1, 0, 0.3, 1);
}
.envo-extra-elementor-button-hover-style-bubbleFromDown:focus::after,
.envo-extra-elementor-button-hover-style-bubbleFromDown:hover::after {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
-webkit-transition-duration: 50ms;
-o-transition-duration: 50ms;
transition-duration: 50ms;
-webkit-transition-delay: 0.4s;
-o-transition-delay: 0.4s;
transition-delay: 0.4s;
-webkit-transition-timing-function: linear;
-o-transition-timing-function: linear;
transition-timing-function: linear;
}
.envo-extra-elementor-button-hover-style-bubbleFromCenter::after,
.envo-extra-elementor-button-hover-style-bubbleFromCenter::before {
content: "";
position: absolute;
background-color: #e1e1e1;
}
.envo-extra-elementor-button-hover-style-bubbleFromCenter::before {
width: 110%;
height: 0;
padding-bottom: 110%;
top: 50%;
left: 50%;
border-radius: 50%;
-webkit-transform: translate3d(-50%, -50%, 0) scale3d(0, 0, 1);
transform: translate3d(-50%, -50%, 0) scale3d(0, 0, 1);
}
.envo-extra-elementor-button-hover-style-bubbleFromCenter:focus::before,
.envo-extra-elementor-button-hover-style-bubbleFromCenter:hover::before {
-webkit-transition: -webkit-transform 0.4s cubic-bezier(0.1, 0, 0.3, 1);
transition: transform 0.4s cubic-bezier(0.1, 0, 0.3, 1);
-o-transition: transform 0.4s cubic-bezier(0.1, 0, 0.3, 1);
transition: transform 0.4s cubic-bezier(0.1, 0, 0.3, 1), -webkit-transform 0.4s cubic-bezier(0.1, 0, 0.3, 1);
-webkit-transform: translate3d(-50%, -50%, 0) scale3d(1, 1, 1);
transform: translate3d(-50%, -50%, 0) scale3d(1, 1, 1);
}
.envo-extra-elementor-button-hover-style-bubbleFromCenter::after {
top: 0;
left: 0;
width: 100%;
height: 100%;
opacity: 0;
-webkit-transition: opacity 0.3s;
-o-transition: opacity 0.3s;
transition: opacity 0.3s;
}
.envo-extra-elementor-button-hover-style-bubbleFromCenter:focus::after,
.envo-extra-elementor-button-hover-style-bubbleFromCenter:hover::after {
opacity: 1;
-webkit-transition-duration: 10ms;
-o-transition-duration: 10ms;
transition-duration: 10ms;
-webkit-transition-delay: 0.3s;
-o-transition-delay: 0.3s;
transition-delay: 0.3s;
}
.envo-extra-elementor-button-hover-style-flipSlide:focus > .envo-extra-elementor-button-inner,
.envo-extra-elementor-button-hover-style-flipSlide:hover > .envo-extra-elementor-button-inner {
-webkit-animation: 0.2s forwards MoveUpInitial, 0.2s 0.2s forwards MoveUpEnd;
animation: 0.2s forwards MoveUpInitial, 0.2s 0.2s forwards MoveUpEnd;
}
@-webkit-keyframes MoveUpInitial {
to {
-webkit-transform: translate3d(0, -105%, 0);
transform: translate3d(0, -105%, 0);
opacity: 0;
}
}
@keyframes MoveUpInitial {
to {
-webkit-transform: translate3d(0, -105%, 0);
transform: translate3d(0, -105%, 0);
opacity: 0;
}
}
@-webkit-keyframes MoveUpEnd {
from {
-webkit-transform: translate3d(0, 100%, 0);
transform: translate3d(0, 100%, 0);
opacity: 0;
}
to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
opacity: 1;
}
}
@keyframes MoveUpEnd {
from {
-webkit-transform: translate3d(0, 100%, 0);
transform: translate3d(0, 100%, 0);
opacity: 0;
}
to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
opacity: 1;
}
}
.envo-extra-elementor-button-hover-style-flipSlide::before {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
content: "";
background: #e1e1e1;
-webkit-transition: -webkit-transform 0.3s cubic-bezier(0.7, 0, 0.2, 1);
transition: transform 0.3s cubic-bezier(0.7, 0, 0.2, 1);
-o-transition: transform 0.3s cubic-bezier(0.7, 0, 0.2, 1);
transition: transform 0.3s cubic-bezier(0.7, 0, 0.2, 1), -webkit-transform 0.3s cubic-bezier(0.7, 0, 0.2, 1);
-webkit-transform-origin: 100% 50%;
-ms-transform-origin: 100% 50%;
transform-origin: 100% 50%;
}
.envo-extra-business-hour-day,
.envo-extra-elementor-horizontal-navbar-nav > li > a {
-webkit-transition: color 0.2s ease-in-out;
-o-transition: color 0.2s ease-in-out;
}
.envo-extra-elementor-button-hover-style-flipSlide:hover::before,
.envo-extra-elementor-button-hover-style-flipSlide:hover:focus {
-webkit-transform: scale3d(0, 1, 1);
transform: scale3d(0, 1, 1);
-webkit-transform-origin: 0% 50%;
-ms-transform-origin: 0% 50%;
transform-origin: 0% 50%;
}
@@ -0,0 +1,32 @@
.envo-extra-wrapper-inner {
position: relative;
}
.envo-extra-counter-item {
font-size: 45px;
font-weight: 700;
margin-bottom: 10px;
display: -webkit-inline-box;
display: -ms-inline-flexbox;
display: inline-flex;
line-height: 1;
text-align: center;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
color: var(--e-global-color-primary);
-webkit-transition: 0.3s ease-in-out;
-o-transition: 0.3s ease-in-out;
transition: 0.3s ease-in-out;
}
.envo-extra-counter-title {
font-size: 25px;
font-weight: 500;
margin: 0 0 5px;
line-height: 1.2;
-webkit-transition: color 0.3s ease-in-out;
-o-transition: color 0.3s ease-in-out;
transition: color 0.3s ease-in-out;
}
@@ -0,0 +1,17 @@
.envo-extra-simple-heading-wrapper {
text-align: center;
}
.envo-extra-simple-heading-wrapper .envo-extra-heading-title {
position: relative;
line-height: 1.2;
font-size: 3rem;
margin: 5px 0;
font-weight: 500;
z-index: 2;
display: inline-block;
}
.envo-extra-simple-heading-wrapper .envo-extra-title-focus {
color: var(--e-global-color-primary);
-webkit-text-fill-color: initial;
display: inline;
}
@@ -0,0 +1,123 @@
.envo-extra-box-icon-wrapper-inner {
position: relative;
}
.envo-extra-box-icon-wrapper {
position: relative;
display: block;
text-align: center;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
}
.envo-extra-box-icon-wrapper-inner {
width: auto;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
}
.envo-extra-box-icon-item {
display: -webkit-inline-box;
display: -ms-inline-flexbox;
display: inline-flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
margin: 10px;
color: #2b2b2b;
text-align: center;
font-size: 40px;
line-height: 1;
overflow: hidden;
min-height: -webkit-max-content;
min-height: -moz-max-content;
min-height: max-content;
-webkit-transition: color 0.3s ease-in-out, background-color 0.3s ease-in-out;
-o-transition: color 0.3s ease-in-out, background-color 0.3s ease-in-out;
transition: color 0.3s ease-in-out, background-color 0.3s ease-in-out;
}
.envo-extra-box-icon-item > svg {
width: 100%;
height: auto;
}
.envo-extra-badge {
position: absolute;
z-index: 3;
background-color: var(--e-global-color-accent);
color: #fff;
padding: 8px 18px;
border-radius: 50px;
font-size: 12px;
line-height: 1;
text-align: center;
-webkit-transform: translate(var(-translate-x), var(-translate-y)) rotate(var(-rotate));
-ms-transform: translate(var(-translate-x), var(-translate-y)) rotate(var(-rotate));
transform: translate(var(-translate-x), var(-translate-y)) rotate(var(-rotate));
-translate-x: 0;
-translate-y: 0;
-rotate: 0;
}
.envo-extra-badge-middle-center,
.envo-extra-badge-middle-left,
.envo-extra-badge-middle-right {
-translate-y: -50%;
top: 50%;
}
.envo-extra-badge-top-left {
top: 0;
left: 0;
}
.envo-extra-badge-top-center {
top: 0;
left: 50%;
-translate-x: -50%;
}
.envo-extra-badge-top-right {
top: 0;
right: 0;
}
.envo-extra-badge-middle-left {
left: 0;
}
.envo-extra-badge-middle-center {
left: 50%;
-translate-x: -50%;
}
.envo-extra-badge-middle-right {
right: 0;
}
.envo-extra-badge-bottom-left {
bottom: 0;
left: 0;
}
.envo-extra-badge-bottom-center {
bottom: 0;
left: 50%;
-translate-x: -50%;
}
.envo-extra-badge-bottom-right,
.envo-extra-elementor-horizontal-menu-style-lineTopBottom .envo-extra-elementor-horizontal-navbar-nav > li > a:after {
bottom: 0;
right: 0;
}
.envo-extra-box-icon-title {
margin: 0;
line-height: 1.2;
transition: color 0.3s ease-in-out;
}
.envo-extra-box-icon-description {
margin: 0;
color: #383838;
line-height: 1.2;
-webkit-transition: color 0.3s ease-in-out;
-o-transition: color 0.3s ease-in-out;
transition: color 0.3s ease-in-out;
}
@@ -0,0 +1,261 @@
.envo-extra-pricing-tooltip-toggle:hover .envo-extra-pricing-tooltip {
opacity: 1;
visibility: visible;
}
.envo-extra-pricing-features-list {
margin: 0;
padding: 0;
list-style: none;
display: inline-block;
}
ul.envo-extra-pricing-features-list {
padding-left: 0;
}
.xpro-pricing-icon > svg {
height: auto;
}
.envo-extra-pricing-item .envo-extra-badge {
min-width: -webkit-max-content;
min-width: -moz-max-content;
}
.envo-extra-pricing-icon,
.envo-extra-pricing-media,
.envo-extra-pricing-price-box,
.envo-extra-testimonial-description,
.envo-extra-testimonial-layout-2 .envo-extra-testimonial-rating {
margin-bottom: 15px;
}
.elementor-widget-envo-extra-pricing > .elementor-widget-container {
position: relative;
overflow: initial;
padding: 3em 4em;
border-radius: 0.5rem;
background-color: #fff;
-webkit-box-shadow: 0 0.2rem 2.8rem rgb(36 36 36 / 10%);
box-shadow: 0 0.2rem 2.8rem rgb(36 36 36 / 10%);
word-wrap: break-word;
overflow-wrap: break-word;
}
.envo-extra-pricing-media img {
width: 150px;
display: inline-block;
}
.envo-extra-pricing-item .envo-extra-badge {
min-width: max-content;
padding: 0.8rem 1.5rem;
background-color: var(--e-global-color-primary);
color: #fff;
font-size: 14px;
line-height: 1;
border-radius: 0;
}
.envo-extra-pricing-icon {
display: -webkit-inline-box;
display: -ms-inline-flexbox;
display: inline-flex;
}
.envo-extra-pricing-icon > i {
font-size: 2.5rem;
line-height: 1;
}
.envo-extra-pricing-title {
font-size: 2rem;
line-height: 1.2;
margin: 0 0 15px;
}
.envo-extra-pricing-description-wrapper {
margin-bottom: 10px;
}
.envo-extra-pricing-description {
max-width: 400px;
display: inline-block;
}
.envo-extra-pricing-features {
margin: 1.5rem 0;
}
.envo-extra-pricing-features-title {
font-size: 1.6rem;
line-height: 1.2;
margin: 0 0 1rem;
}
.envo-extra-pricing-features-list li {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
font-size: 16px;
margin-bottom: 1rem;
}
.envo-extra-pricing-features-list li:nth-last-child(1),
.envo-extra-team-layout-13 .envo-extra-team-social-list > li:nth-last-child(1),
.envo-extra-team-layout-15 .envo-extra-team-social-list > li:nth-last-child(1),
.envo-extra-team-layout-9 .envo-extra-team-social-list > li:nth-last-child(1) {
margin-bottom: 0 !important;
}
.envo-extra-pricing-feature-icon {
display: inline-block;
margin: 0 10px 0 0;
font-size: 14px;
}
.envo-extra-infolist-wrapper,
.envo-extra-pricing-feature-title,
.envo-extra-pricing-item .envo-extra-pricing-tooltip-toggle {
display: -webkit-inline-box;
display: -ms-inline-flexbox;
}
.envo-extra-pricing-feature-title {
display: inline-flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
position: relative;
}
.envo-extra-pricing-item .envo-extra-pricing-tooltip-toggle {
position: absolute;
right: -30px;
font-size: 8px;
height: 18px;
width: 18px;
min-width: 18px;
color: #ffcc6c;
background-color: #fff3df;
text-align: center;
display: inline-flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
border-radius: 50px;
cursor: pointer;
}
.envo-extra-pricing-tooltip {
position: absolute;
left: 25px;
width: 200px;
text-align: left;
padding: 10px;
background-color: #efefef;
color: #2b2b2b;
font-size: 12px;
border-radius: 5px;
opacity: 0;
visibility: hidden;
font-family: var(--e-global-typography-primary-font-family);
-webkit-transition: opacity 0.2s ease-in-out;
-o-transition: opacity 0.2s ease-in-out;
transition: opacity 0.2s ease-in-out;
font-weight: 500;
letter-spacing: 0.5px;
}
.envo-extra-infolist-media-type-custom,
.envo-extra-infolist-media-type-icon,
.envo-extra-pricing-btn {
background-color: var(--e-global-color-primary);
line-height: 1;
}
.envo-extra-pricing-tooltip::after {
content: "";
position: absolute;
top: 50%;
right: 100%;
margin-top: -5px;
border-width: 5px;
border-style: solid;
border-color: transparent #efefef transparent transparent;
}
.envo-extra-pricing-btn {
padding: 15px 35px;
text-align: center;
border: 1px solid var(--e-global-color-primary);
color: #fff;
display: inline-block;
-webkit-transition: color 0.3s ease-in-out, background-color, 0.3s ease-in-out, border-color 0.3s ease-in-out;
-o-transition: color 0.3s ease-in-out, background-color, 0.3s ease-in-out, border-color 0.3s ease-in-out;
transition: color 0.3s ease-in-out, background-color, 0.3s ease-in-out, border-color 0.3s ease-in-out;
}
.envo-extra-pricing-btn:focus,
.envo-extra-pricing-btn:hover {
color: var(--e-global-color-primary);
background-color: transparent;
}
.envo-extra-pricing-price-tag {
margin-bottom: 0.5rem;
color: #242424;
font-weight: 500;
font-size: 3rem;
line-height: 1;
display: inline-block;
}
.envo-extra-pricing-currency {
font-size: 1.5rem;
display: inline-block;
margin-right: -10px;
}
.envo-extra-pricing-price-period {
color: #8c8c8c;
font-size: 16px;
}
.envo-extra-pricing-price-box-style-2 .envo-extra-pricing-price-tag {
display: inline-block;
margin: 0;
}
.envo-extra-pricing-price-box-style-2 .envo-extra-pricing-price-period {
display: inline-block;
margin: 0 0 0 10px;
}
.envo-extra-pricing-align-right .envo-extra-pricing-feature-title,
.envo-extra-pricing-align-right .envo-extra-pricing-features-list li {
-webkit-box-orient: horizontal;
-webkit-box-direction: reverse;
-ms-flex-direction: row-reverse;
flex-direction: row-reverse;
}
.envo-extra-pricing-align-right .envo-extra-pricing-feature-icon {
margin: 0 0 0 10px;
}
.envo-extra-pricing-align-right .envo-extra-pricing-item .envo-extra-pricing-tooltip-toggle {
left: -30px;
}
.envo-extra-pricing-align-right .envo-extra-pricing-tooltip {
left: auto;
right: 25px;
text-align: right;
}
.envo-extra-pricing-align-right .envo-extra-pricing-tooltip::after {
left: 100%;
border-color: transparent transparent transparent #efefef;
}
.envo-extra-pricing-align-right .envo-extra-pricing-price-box-style-2 {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: baseline;
-ms-flex-align: baseline;
align-items: baseline;
-webkit-box-orient: horizontal;
-webkit-box-direction: reverse;
-ms-flex-direction: row-reverse;
flex-direction: row-reverse;
}
.envo-extra-pricing-align-right .envo-extra-pricing-price-box-style-2 .envo-extra-pricing-price-period {
display: inline-block;
margin: 0 10px 0 0;
}
.envo-extra-pricing-separator {
display: block;
position: relative;
}
.envo-extra-pricing-separator:before {
content: "";
position: relative;
display: inline-block;
border-top: 1px solid;
border-color: #e0e0e0;
width: 100px;
margin: 10px 0 25px;
padding: 2px;
}
@@ -0,0 +1,650 @@
.envo-extra-team-wrapper {
position: relative;
}
.envo-extra-team-content {
padding: 30px;
}
.envo-extra-team-title,
.envo-extra-testimonial-title {
font-size: 25px;
margin-bottom: 10px;
font-weight: 700;
line-height: 1.2;
color: #2b2b2b;
position: relative;
}
.envo-extra-team-designation,
.envo-extra-testimonial-designation {
font-size: 18px;
color: #969696;
margin-bottom: 15px;
line-height: 1.2;
position: relative;
}
.envo-extra-team-social-list {
position: relative;
list-style: none;
padding: 0;
margin: 20px 0 0;
}
.envo-extra-team-social-list > li {
display: inline-block;
margin-right: 5px;
-webkit-transition: -webkit-transform 0.5s;
-o-transition: transform 0.5s;
transition: transform 0.5s;
transition: transform 0.5s, -webkit-transform 0.5s;
}
.envo-extra-team-social-list > li:first-child {
-webkit-transition-delay: 0.1s;
-o-transition-delay: 0.1s;
transition-delay: 0.1s;
}
.envo-extra-team-social-list > li:nth-child(2) {
-webkit-transition-delay: 0.2s;
-o-transition-delay: 0.2s;
transition-delay: 0.2s;
}
.envo-extra-team-social-list > li:nth-child(3) {
-webkit-transition-delay: 0.3s;
-o-transition-delay: 0.3s;
transition-delay: 0.3s;
}
.envo-extra-team-social-list > li:nth-child(4) {
-webkit-transition-delay: 0.4s;
-o-transition-delay: 0.4s;
transition-delay: 0.4s;
}
.envo-extra-team-social-list > li:nth-child(5) {
-webkit-transition-delay: 0.5s;
-o-transition-delay: 0.5s;
transition-delay: 0.5s;
}
.envo-extra-team-social-list > li:nth-child(6) {
-webkit-transition-delay: 0.6s;
-o-transition-delay: 0.6s;
transition-delay: 0.6s;
}
.envo-extra-team-social-list > li:nth-child(7) {
-webkit-transition-delay: 0.7s;
-o-transition-delay: 0.7s;
transition-delay: 0.7s;
}
.envo-extra-team-social-list > li:nth-child(8) {
-webkit-transition-delay: 0.8s;
-o-transition-delay: 0.8s;
transition-delay: 0.8s;
}
.envo-extra-team-social-list > li:nth-child(9) {
-webkit-transition-delay: 0.9s;
-o-transition-delay: 0.9s;
transition-delay: 0.9s;
}
.envo-extra-team-social-list > li:nth-child(10) {
-webkit-transition-delay: 0.1s;
-o-transition-delay: 0.1s;
transition-delay: 0.1s;
}
.envo-extra-team-social-list .envo-extra-team-social-icon {
height: 40px;
width: 40px;
min-width: max-content;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
border: 1px solid #c1c1c1;
color: #8a8a8a;
-webkit-transition: color 0.3s ease-in-out, background 0.3s ease-in-out, border-color 0.3s ease-in-out;
-o-transition: color 0.3s ease-in-out, background 0.3s ease-in-out, border-color 0.3s ease-in-out;
transition: color 0.3s ease-in-out, background 0.3s ease-in-out, border-color 0.3s ease-in-out;
}
.envo-extra-team-social-icon > i {
font-size: 16px;
line-height: 1;
}
.envo-extra-team-social-icon > svg {
width: 60px;
height: auto;
}
.envo-extra-team-image {
position: relative;
overflow: hidden;
display: inline-table;
max-width: 100%;
-webkit-box-flex: 0;
-ms-flex: none;
flex: none;
}
.envo-extra-team-wrapper .envo-extra-team-image > img {
width: 100%;
height: 100%;
}
.envo-extra-team-layout-1 .envo-extra-team-image > img {
-webkit-transition: 0.3s ease-in-out;
transition: 0.3s ease-in-out;
-o-transition: 0.3s ease-in-out;
transition: 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;
}
.envo-extra-team-layout-1:hover .envo-extra-team-image > img,
.envo-extra-team-layout-4:hover .envo-extra-team-image > img {
-webkit-transform: scale(1.2);
-ms-transform: scale(1.2);
transform: scale(1.2);
}
.envo-extra-team-layout-2 .envo-extra-team-designation {
font-size: 25px;
font-weight: 700;
color: #2b2b2b;
}
.envo-extra-team-layout-2 .envo-extra-team-title {
font-size: 35px;
margin-bottom: 15px;
}
.envo-extra-team-layout-2 .envo-extra-team-social-list {
position: absolute;
bottom: 0;
left: 50%;
-webkit-transform: translateX(-50%);
-ms-transform: translateX(-50%);
transform: translateX(-50%);
margin: 0 0 50px;
display: inline-block;
opacity: 0;
-webkit-transition: 0.3s 0.3s;
-o-transition: 0.3s 0.3s;
transition: 0.3s 0.3s;
}
.envo-extra-team-layout-2 .envo-extra-team-social-list > li {
-webkit-transform: translateY(300%);
-ms-transform: translateY(300%);
transform: translateY(300%);
}
.envo-extra-post-grid-layout-9 .envo-extra-post-grid-item:hover .envo-extra-post-grid-content,
.envo-extra-team-layout-12:hover .envo-extra-team-image::after,
.envo-extra-team-layout-2:hover .envo-extra-team-social-list > li,
.envo-extra-team-layout-3:hover .envo-extra-team-social-list > li,
.envo-extra-team-layout-6:hover .envo-extra-team-social-list > li {
-webkit-transform: translateY(0);
-ms-transform: translateY(0);
transform: translateY(0);
}
.envo-extra-team-layout-2 .envo-extra-team-social-list .envo-extra-team-social-icon {
background-color: #fff;
border-radius: 50px;
border-color: transparent;
}
.envo-extra-team-layout-3 .envo-extra-team-social-list {
position: absolute;
bottom: 0;
right: 0;
margin: 0;
opacity: 0;
-webkit-transition: 0.3s 0.3s;
-o-transition: 0.3s 0.3s;
transition: 0.3s 0.3s;
}
.envo-extra-team-layout-3 .envo-extra-team-social-list > li {
margin: 0;
-webkit-transform: translateY(100%);
-ms-transform: translateY(100%);
transform: translateY(100%);
}
.envo-extra-team-layout-3 .envo-extra-team-social-list .envo-extra-team-social-icon {
background-color: #fff;
border-color: transparent;
}
.envo-extra-team-layout-3 .envo-extra-team-content {
position: relative;
padding: 30px;
z-index: 2;
background-color: #eaeaea;
}
.envo-extra-team-layout-4 .envo-extra-team-image > img {
-webkit-transition: -webkit-transform 0.3s ease-in-out;
transition: transform 0.3s ease-in-out;
-o-transition: transform 0.3s ease-in-out;
transition: transform 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;
}
.envo-extra-team-layout-4 .envo-extra-team-content {
position: absolute;
top: 20px;
left: 20px;
right: 20px;
bottom: 20px;
background-color: #fff;
padding: 50px;
text-align: center;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
border-radius: 10px;
opacity: 0;
-webkit-transition: opacity 0.4s ease-in-out;
-o-transition: opacity 0.4s ease-in-out;
transition: opacity 0.4s ease-in-out;
}
.envo-extra-team-layout-6 .envo-extra-team-content,
.envo-extra-team-layout-9 .envo-extra-team-inner-content {
position: absolute;
display: -webkit-box;
display: -ms-flexbox;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
}
.envo-extra-team-layout-4 .envo-extra-team-social-icon {
color: #fff;
background-color: #2b2b2b;
border-color: #2b2b2b;
border-radius: 50px;
}
.envo-extra-team-layout-5 .envo-extra-team-image::before {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
opacity: 0;
z-index: 2;
background-color: #2b2b2ba3;
-webkit-transition: opacity 0.3s ease-in-out;
-o-transition: opacity 0.3s ease-in-out;
transition: opacity 0.3s ease-in-out;
}
.envo-extra-team-layout-5 .envo-extra-team-social-list {
position: absolute;
top: 50%;
left: 50%;
width: 100%;
-webkit-transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
margin: 0;
z-index: 3;
opacity: 0;
-webkit-transition: 0.3s;
-o-transition: 0.3s;
transition: 0.3s;
}
.envo-extra-team-layout-5 .envo-extra-team-social-list .envo-extra-team-social-icon {
color: #2b2b2b;
background-color: #fff;
border-color: #fff;
border-radius: 50px;
}
.envo-extra-team-layout-6 .envo-extra-team-content {
padding: 50px;
bottom: 0;
right: 0;
width: 80%;
height: 80%;
z-index: 2;
border: 1px solid #fff;
display: flex;
-ms-flex-direction: column;
flex-direction: column;
}
.envo-extra-team-layout-6 .envo-extra-team-content::before {
content: "";
position: absolute;
bottom: 0;
right: 0;
width: 100%;
height: 100%;
-webkit-backdrop-filter: blur(3px);
backdrop-filter: blur(3px);
z-index: -1;
}
.envo-extra-team-layout-6 .envo-extra-team-social-list {
margin-top: auto;
opacity: 0;
-webkit-transition: 0.3s 0.3s;
-o-transition: 0.3s 0.3s;
transition: 0.3s 0.3s;
}
.envo-extra-team-layout-6 .envo-extra-team-social-list .envo-extra-team-social-icon {
border: 1px solid #fff;
color: #585858;
background-color: #fff;
}
.envo-extra-team-layout-6 .envo-extra-team-social-list > li {
-webkit-transform: translateY(100%);
-ms-transform: translateY(100%);
transform: translateY(100%);
}
.envo-extra-team-layout-7 .envo-extra-team-content {
padding: 30px;
border: 1px solid #f3f3f3;
border-radius: 10px;
bottom: 0;
left: 0;
position: absolute;
width: 100%;
background-color: #fff;
}
.envo-extra-team-layout-8 .envo-extra-team-inner-content {
position: absolute;
bottom: 15%;
left: 50%;
-webkit-transform: translateX(-50%);
-ms-transform: translateX(-50%);
transform: translateX(-50%);
}
.envo-extra-team-layout-8 .envo-extra-team-image {
overflow: initial;
padding-bottom: 30px;
}
.envo-extra-team-layout-8 .envo-extra-team-social-list {
position: absolute;
bottom: 0;
left: 50%;
min-width: -webkit-max-content;
min-width: -moz-max-content;
min-width: max-content;
-webkit-transform: translateX(-50%);
-ms-transform: translateX(-50%);
transform: translateX(-50%);
margin: 0;
padding: 10px 30px;
border-radius: 50px;
background-color: #ffc460;
}
.envo-extra-team-layout-8 .envo-extra-team-social-list .envo-extra-team-social-icon {
background-color: #fff;
border-color: #fff;
border-radius: 50px;
color: #2b2b2b;
}
.envo-extra-team-layout-8 .envo-extra-team-content {
padding: 50px;
display: none;
}
.envo-extra-team-layout-9 .envo-extra-team-inner-content {
bottom: 0;
left: 100px;
-webkit-transform-origin: bottom left;
-ms-transform-origin: bottom left;
transform-origin: bottom left;
padding: 0;
-webkit-transform: rotate(-90deg);
-ms-transform: rotate(-90deg);
transform: rotate(-90deg);
background-color: #fff;
min-height: 100px;
display: flex;
-ms-flex-direction: column;
flex-direction: column;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
}
.envo-extra-team-layout-9 .envo-extra-team-inner-content .envo-extra-team-title {
padding-left: 30px;
}
.envo-extra-team-layout-9 .envo-extra-team-inner-content .envo-extra-team-designation {
padding-left: 30px;
margin: 0;
}
.envo-extra-team-layout-10,
.envo-extra-team-layout-9 .envo-extra-team-content {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: horizontal;
-webkit-box-direction: reverse;
-ms-flex-direction: row-reverse;
flex-direction: row-reverse;
-webkit-box-pack: justify;
-ms-flex-pack: justify;
justify-content: space-between;
}
.envo-extra-team-layout-9 .envo-extra-team-social-list {
display: -webkit-inline-box;
display: -ms-inline-flexbox;
display: inline-flex;
margin: 0;
min-width: 100px;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
padding: 50px 0;
background-color: #f0c46b;
}
.envo-extra-team-layout-9 .envo-extra-team-social-list > li {
margin-right: 0 !important;
margin-bottom: 10px;
}
.envo-extra-team-layout-9 .envo-extra-team-social-list .envo-extra-team-social-icon {
background-color: #ffffff47;
border-color: transparent;
color: #fff;
border-radius: 50px;
}
.envo-extra-team-layout-9 .envo-extra-team-content {
padding: 0 !important;
}
.envo-extra-team-layout-9 .envo-extra-team-description {
-webkit-box-flex: 1;
-ms-flex: 1;
flex: 1;
padding: 50px;
}
.envo-extra-team-layout-9 .envo-extra-team-description::before {
content: "";
position: relative;
width: 100px;
height: 5px;
display: block;
margin-bottom: 30px;
background-color: #f0c46b;
}
.envo-extra-team-layout-10 .envo-extra-team-content,
.envo-extra-team-layout-11 .envo-extra-team-content {
padding: 30px;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
}
.envo-extra-author-box,
.envo-extra-team-layout-11,
.envo-extra-testimonial-layout-4 > .elementor-widget-container,
.envo-extra-testimonial-layout-5 > .elementor-widget-container {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
}
.envo-extra-team-layout-12 .envo-extra-team-content {
background-color: #002569e8;
}
.envo-extra-team-layout-12 .envo-extra-team-social-list {
margin: 0;
position: absolute;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
z-index: 2;
opacity: 0;
min-width: -webkit-max-content;
min-width: -moz-max-content;
min-width: max-content;
-webkit-transition: opacity 0.2s ease-in-out;
-o-transition: opacity 0.2s ease-in-out;
transition: opacity 0.2s ease-in-out;
}
.envo-extra-team-layout-12 .envo-extra-team-image::after {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #002569e8;
-webkit-transform: translateY(-100%);
-ms-transform: translateY(-100%);
transform: translateY(-100%);
-webkit-transition: -webkit-transform 0.3s linear;
transition: transform 0.3s linear;
-o-transition: transform 0.3s linear;
transition: transform 0.3s linear, -webkit-transform 0.3s linear;
}
.envo-extra-team-layout-12 .envo-extra-team-social-list .envo-extra-team-social-icon {
border: 1px solid #ffffff78;
color: #fff;
background-color: #ffffff78;
}
.envo-extra-team-layout-13::after {
content: "";
position: absolute;
bottom: 0;
right: 0;
background-color: #fff;
height: 500px;
width: 500px;
max-width: 90%;
max-height: 90%;
margin-bottom: 4%;
margin-right: 4%;
-webkit-mask-image: url("../images/team-shape-2.png");
mask-image: url("../images/team-shape-2.png");
-webkit-mask-position: center center;
mask-position: center center;
-webkit-mask-size: 100%;
mask-size: 100%;
-webkit-mask-repeat: no-repeat;
mask-repeat: no-repeat;
-webkit-transition: background-color 0.3s ease-in-out;
-o-transition: background-color 0.3s ease-in-out;
transition: background-color 0.3s ease-in-out;
}
.envo-extra-team-layout-13 .envo-extra-team-social-list {
margin: 0;
display: -webkit-inline-box;
display: -ms-inline-flexbox;
display: inline-flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
position: absolute;
top: 50px;
left: -40px;
z-index: -1;
}
.envo-extra-team-layout-13 .envo-extra-team-image {
overflow: initial;
z-index: 0;
}
.envo-extra-team-layout-13 .envo-extra-team-social-list > li {
margin-right: 0 !important;
margin-bottom: 10px;
-webkit-transition: opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;
transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;
-o-transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
opacity: 0;
-webkit-transform: translateX(100%);
-ms-transform: translateX(100%);
transform: translateX(100%);
}
.envo-extra-team-layout-13:hover .envo-extra-team-social-list > li {
opacity: 1;
-webkit-transform: translateX(0);
-ms-transform: translateX(0);
transform: translateX(0);
}
.envo-extra-team-layout-13 .envo-extra-team-social-list .envo-extra-team-social-icon {
background-color: #2b2b2b;
border-color: #2b2b2b;
color: #fff;
border-top-left-radius: 50px;
border-bottom-left-radius: 50px;
}
.envo-extra-team-layout-13 .envo-extra-team-content {
position: absolute;
bottom: 100px;
left: 50%;
width: 100%;
padding: 0 0 0 30px;
z-index: 2;
max-width: calc(100% - 100px);
-webkit-transform: translateX(-50%);
-ms-transform: translateX(-50%);
transform: translateX(-50%);
border-left: 5px solid #2b2b2b;
}
.envo-extra-team-layout-15 {
border: 1px solid #efefef;
padding: 20px 0 20px 20px;
border-radius: 5px;
}
.envo-extra-team-layout-15 .envo-extra-team-social-list {
position: absolute;
top: 0;
-webkit-transform: none;
right: 0;
text-align: center;
margin: 0;
height: 100%;
padding: 20px;
background-color: #fff;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
}
.envo-extra-team-layout-15 .envo-extra-team-social-list > li {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
margin-right: 0 !important;
margin-bottom: 10px;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
}
.envo-extra-team-layout-15 .envo-extra-team-content {
padding: 50px 0 0;
}
@@ -0,0 +1,291 @@
.envo-extra-testimonial-layout-1 > .elementor-widget-container,
.envo-extra-testimonial-layout-2 > .elementor-widget-container {
border-radius: 5px;
background-color: #fff;
padding: 30px;
position: relative;
-webkit-box-shadow: 0 3px 40px rgb(36 36 36 / 10%);
box-shadow: 0 3px 40px rgb(36 36 36 / 10%);
}
.envo-extra-testimonial-rating {
display: inline-block;
font-size: 12px;
line-height: 1;
margin-bottom: 30px;
}
.envo-extra-rating-layout-num {
padding: 5px 10px;
border-radius: 20px;
background-color: #ffbf36;
color: #fff;
display: -webkit-inline-box;
display: -ms-inline-flexbox;
display: inline-flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
}
.envo-extra-rating-layout-num > i {
font-size: 80%;
margin-left: 5px;
}
.envo-extra-rating-layout-star > i {
color: #e6e6e6;
}
.envo-extra-rating-layout-star > .envo-extra-rating-filled {
color: #ffbf36;
}
.envo-extra-testimonial-quote {
font-size: 25px;
line-height: 1;
margin-bottom: 15px;
display: inline-block;
}
.envo-extra-testimonial-quote svg {
width: 40px;
height: auto;
}
.envo-extra-testimonial-image {
position: relative;
margin-bottom: 30px;
z-index: 2;
}
.envo-extra-testimonial-image > img {
width: 200px;
-webkit-transition: 0.3s ease-in-out;
-o-transition: 0.3s ease-in-out;
transition: 0.3s ease-in-out;
}
.envo-extra-testimonial-layout-2 .envo-extra-testimonial-quote {
position: absolute;
bottom: 0;
font-size: 70px;
right: 0;
line-height: 1;
margin: 0 30px -30px 0;
color: #bfbfbf;
}
.envo-extra-testimonial-layout-2.envo-extra-testimonial-align-center .envo-extra-testimonial-quote {
left: 50%;
-webkit-transform: translateX(-50%);
-ms-transform: translateX(-50%);
transform: translateX(-50%);
margin: 0 0 -30px;
}
.envo-extra-testimonial-layout-2.envo-extra-testimonial-align-right .envo-extra-testimonial-quote {
right: auto;
left: 0;
margin: 0 0 -30px 30px;
}
.envo-extra-testimonial-layout-3 > .elementor-widget-container {
border-radius: 5px;
background-color: #fff;
padding: 30px;
position: relative;
height: 100%;
margin-bottom: -200px;
-webkit-box-shadow: 0 3px 40px rgb(36 36 36 / 10%);
box-shadow: 0 3px 40px rgb(36 36 36 / 10%);
}
.envo-extra-testimonial-layout-4 .envo-extra-testimonial-image,
.envo-extra-testimonial-layout-5 .envo-extra-testimonial-image {
margin: 0 30px 0 0;
min-width: -webkit-max-content;
min-width: -moz-max-content;
min-width: max-content;
}
.envo-extra-testimonial-layout-4 .envo-extra-testimonial-image > img,
.envo-extra-testimonial-layout-5 .envo-extra-testimonial-image > img {
height: 150px;
width: 150px;
-o-object-fit: cover;
object-fit: cover;
border-radius: 50%;
}
.envo-extra-testimonial-layout-4 .envo-extra-testimonial-inner-wrapper {
-webkit-box-flex: 1;
-ms-flex-positive: 1;
flex-grow: 1;
padding: 50px;
border-radius: 10px;
background-color: #f1f1f1;
}
.envo-extra-testimonial-layout-4 .envo-extra-testimonial-quote {
font-size: 30px;
margin-bottom: 25px;
}
.envo-extra-block-quote-layout-6 .envo-extra-block-quote-content-wrap,
.envo-extra-testimonial-layout-4 .envo-extra-testimonial-rating,
.envo-extra-testimonial-layout-5 .envo-extra-testimonial-rating,
.envo-extra-testimonial-layout-6 .envo-extra-testimonial-designation,
.envo-extra-testimonial-layout-7 .envo-extra-testimonial-designation,
.envo-extra-testimonial-layout-8 .envo-extra-testimonial-designation {
margin: 0;
}
.envo-extra-horizontal-timeline-col .envo-extra-horizontal-timeline-item,
.envo-extra-table-head-icon-bottom .envo-extra-table-head-column-cell-inner,
.envo-extra-table-row-icon-bottom .envo-extra-table-body-row-cell-inner,
.envo-extra-testimonial-layout-4.envo-extra-testimonial-align-center > .elementor-widget-container,
.envo-extra-testimonial-layout-5.envo-extra-testimonial-align-center > .elementor-widget-container,
.envo-extra-testimonial-layout-6.envo-extra-testimonial-align-center .envo-extra-testimonial-author,
.envo-extra-testimonial-layout-7.envo-extra-testimonial-align-center .envo-extra-testimonial-author,
.envo-extra-testimonial-layout-8.envo-extra-testimonial-align-center .envo-extra-testimonial-author,
.envo-extra-testimonial-layout-9.envo-extra-testimonial-align-center .envo-extra-testimonial-author {
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
}
.envo-extra-testimonial-layout-4.envo-extra-testimonial-align-center .envo-extra-testimonial-image,
.envo-extra-testimonial-layout-5.envo-extra-testimonial-align-center .envo-extra-testimonial-image,
.envo-extra-testimonial-layout-6.envo-extra-testimonial-align-center .envo-extra-testimonial-image,
.envo-extra-testimonial-layout-7.envo-extra-testimonial-align-center .envo-extra-testimonial-image,
.envo-extra-testimonial-layout-8.envo-extra-testimonial-align-center .envo-extra-testimonial-image,
.envo-extra-testimonial-layout-9.envo-extra-testimonial-align-center .envo-extra-testimonial-image {
margin: 0 0 30px;
}
.envo-extra-testimonial-layout-4.envo-extra-testimonial-align-right .envo-extra-testimonial-image,
.envo-extra-testimonial-layout-5.envo-extra-testimonial-align-right .envo-extra-testimonial-image,
.envo-extra-testimonial-layout-6.envo-extra-testimonial-align-right .envo-extra-testimonial-image,
.envo-extra-testimonial-layout-7.envo-extra-testimonial-align-right .envo-extra-testimonial-image,
.envo-extra-testimonial-layout-8.envo-extra-testimonial-align-right .envo-extra-testimonial-image,
.envo-extra-testimonial-layout-9.envo-extra-testimonial-align-right .envo-extra-testimonial-image {
margin: 0 0 0 30px;
}
.envo-extra-testimonial-layout-5 .envo-extra-testimonial-inner-wrapper {
position: relative;
-webkit-box-flex: 1;
-ms-flex-positive: 1;
flex-grow: 1;
padding: 50px;
border-radius: 10px;
background-color: #f1f1f1;
}
.envo-extra-testimonial-layout-5 .envo-extra-testimonial-quote {
font-size: 100px;
position: absolute;
top: 0;
left: 0;
margin: 20px;
color: #e4e4e4;
}
.envo-extra-testimonial-layout-5.envo-extra-testimonial-align-center .envo-extra-testimonial-quote {
left: 50%;
-webkit-transform: translateX(-50%);
-ms-transform: translateX(-50%);
transform: translateX(-50%);
margin: 15px 0 0;
}
.envo-extra-testimonial-layout-5.envo-extra-testimonial-align-right .envo-extra-testimonial-quote {
right: 0;
left: auto;
}
.envo-extra-testimonial-layout-6 .envo-extra-testimonial-content,
.envo-extra-testimonial-layout-8 .envo-extra-testimonial-content {
position: relative;
-webkit-box-flex: 1;
-ms-flex-positive: 1;
flex-grow: 1;
padding: 50px;
border-radius: 10px;
margin-bottom: 30px;
background-color: #f1f1f1;
}
.envo-extra-testimonial-layout-6 .envo-extra-testimonial-author,
.envo-extra-testimonial-layout-7 .envo-extra-testimonial-author,
.envo-extra-testimonial-layout-8 .envo-extra-testimonial-author,
.envo-extra-testimonial-layout-9 .envo-extra-testimonial-author {
display: -webkit-inline-box;
display: -ms-inline-flexbox;
display: inline-flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
}
.envo-extra-testimonial-layout-6 .envo-extra-testimonial-author-bio,
.envo-extra-testimonial-layout-7 .envo-extra-testimonial-author-bio,
.envo-extra-testimonial-layout-8 .envo-extra-testimonial-author-bio {
-webkit-box-flex: 1;
-ms-flex-positive: 1;
flex-grow: 1;
}
.envo-extra-testimonial-layout-6 .envo-extra-testimonial-image,
.envo-extra-testimonial-layout-7 .envo-extra-testimonial-image,
.envo-extra-testimonial-layout-8 .envo-extra-testimonial-image,
.envo-extra-testimonial-layout-9 .envo-extra-testimonial-image {
margin: 0 30px 0 0;
}
.envo-extra-testimonial-layout-6 .envo-extra-testimonial-image > img,
.envo-extra-testimonial-layout-8 .envo-extra-testimonial-image > img,
.envo-extra-testimonial-layout-9 .envo-extra-testimonial-image > img {
height: 120px;
width: 120px;
-o-object-fit: cover;
object-fit: cover;
border-radius: 50%;
}
.envo-extra-testimonial-layout-7 .elementor-widget-container {
padding: 50px;
border-width: 2px 2px 2px 15px;
border-style: solid;
border-color: var(--e-global-color-primary);
}
.envo-extra-testimonial-layout-7 .envo-extra-testimonial-image > img {
height: 120px;
width: 120px;
min-width: 120px;
-o-object-fit: cover;
object-fit: cover;
border-radius: 50%;
}
.envo-extra-testimonial-layout-8 .envo-extra-testimonial-content::after {
content: "";
position: absolute;
bottom: 0;
left: 40px;
z-index: -1;
display: block;
width: 25px;
height: 25px;
-webkit-transform: rotate(-45deg) translateY(1rem);
-ms-transform: rotate(-45deg) translateY(1rem);
transform: rotate(-45deg) translateY(1rem);
border-radius: 3px;
background: inherit;
-webkit-box-shadow: none;
box-shadow: none;
}
.envo-extra-testimonial-layout-8.envo-extra-testimonial-align-center .envo-extra-testimonial-content::after {
left: calc(50% - 20px);
}
.envo-extra-testimonial-layout-8.envo-extra-testimonial-align-right .envo-extra-testimonial-content::after {
left: auto;
right: 60px;
}
.envo-extra-testimonial-layout-9 .elementor-widget-container {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: reverse;
-ms-flex-direction: column-reverse;
flex-direction: column-reverse;
}
.envo-extra-testimonial-layout-9.envo-extra-testimonial-align-center .elementor-widget-container {
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
}
.envo-extra-horizontal-timeline-col .envo-extra-horizontal-timeline-date,
.envo-extra-horizontal-timeline-col-reverse .envo-extra-horizontal-timeline-content,
.envo-extra-testimonial-layout-9.envo-extra-testimonial-align-right .elementor-widget-container {
-webkit-box-align: end;
-ms-flex-align: end;
align-items: flex-end;
}
.envo-extra-testimonial-layout-9 .envo-extra-testimonial-content {
margin-top: 20px;
}
.envo-extra-testimonial-layout-10 .envo-extra-testimonial-description {
margin-bottom: 30px;
}
@@ -0,0 +1,8 @@
(function ($) {
'use strict';
$(document).ready(function(){
$('.e-notice-bar__action a').attr('href','').attr('href','https://be.elementor.com/visit/?bta=1876&brand=elementor');
});
})(jQuery);
@@ -0,0 +1,91 @@
<?php
/**
* Shortcode for elementor
*
* Based on plugin https://wordpress.org/plugins/anywhere-elementor/
*
* @since 1.0.0
*/
namespace Elementor;
if ( !defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
class envo_extra_Shortcode {
const SHORTCODE = 'elementor-template';
public function __construct() {
$this->add_actions();
}
public function admin_columns_headers( $defaults ) {
$defaults[ 'shortcode' ] = esc_html__( 'Shortcode', 'envo-extra' );
return $defaults;
}
public function admin_columns_content( $column_name, $post_id ) {
if ( 'shortcode' === $column_name ) {
// %s = shortcode, %d = post_id
$shortcode = sprintf( '[%s id="%d"]', self::SHORTCODE, $post_id );
printf( '<input class="widefat" type="text" readonly onfocus="this.select()" value="%s" />', esc_attr( $shortcode ) );
}
}
public function shortcode( $attributes = [ ] ) {
if ( !class_exists( 'Elementor\Plugin' ) ) {
return '';
}
if ( empty( $attributes[ 'id' ] ) ) {
return '';
}
$response = Plugin::instance()->frontend->get_builder_content_for_display( $attributes[ 'id' ] );
return $response;
}
public function css_head() {
if ( class_exists( '\Elementor\Core\Files\CSS\Post' ) ) {
//$blog_id = get_theme_mod( 'enwoo_custom_blog_feed', '' );
$error_id = get_theme_mod( 'enwoo_custom_404', '' );
$header_id = get_theme_mod( 'enwoo_custom_header', '' );
$footer_id = get_theme_mod( 'enwoo_custom_footer', '' );
// if ( $blog_id != '' ) {
// $blog_css = new \Elementor\Core\Files\CSS\Post( $blog_id );
// $blog_css->enqueue();
// }
if ( $error_id != '' ) {
$error_css = new \Elementor\Core\Files\CSS\Post( $error_id );
$error_css->enqueue();
}
if ( $header_id != '' ) {
$header_css = new \Elementor\Core\Files\CSS\Post( $header_id );
$header_css->enqueue();
}
if ( $footer_id != '' ) {
$footer_css = new \Elementor\Core\Files\CSS\Post( $footer_id );
$footer_css->enqueue();
}
}
}
private function add_actions() {
if ( is_admin() ) {
add_action( 'manage_elementor_library_posts_columns', [ $this, 'admin_columns_headers' ] );
add_action( 'manage_elementor_library_posts_custom_column', [ $this, 'admin_columns_content' ], 10, 2 );
}
add_shortcode( self::SHORTCODE, [ $this, 'shortcode' ] );
// add_action( 'wp_enqueue_scripts', [ $this, 'css_head' ] );
}
}
new envo_extra_Shortcode();
@@ -0,0 +1,156 @@
<?php
if ( !defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
/**
* Custom widgets for Elementor
*
* This class handles custom widgets for Elementor
*
* @since 1.0.0
*/
final class Enwoo_Extra_Elementor_Extension {
private static $_instance = null;
public static function instance() {
if ( is_null( self::$_instance ) ) {
self::$_instance = new self();
}
return self::$_instance;
}
/**
* Registers widgets in Elementor
*
*
* @since 1.0.0
* @access public
*/
public function register_widgets() {
foreach ( $this->modules as $key => $value ) {
require_once ENVO_EXTRA_PATH . 'lib/elementor/widgets/' . $key . '/' . $key . '.php';
\Elementor\Plugin::instance()->widgets_manager->register( new $value[ 'class' ]() );
}
}
/**
* Registers widgets scripts
*
*
* @since 1.0.0
* @access public
*/
public function widget_scripts() {
}
public function editor_scripts() {
wp_register_script( 'preview-script-1s', ENVO_EXTRA_PLUGIN_URL . 'lib/elementor/assets/js/elementor.js', __FILE__ );
wp_enqueue_script( 'preview-script-1s' );
}
/**
* Enqueue widgets scripts in preview mode, as later calls in widgets render will not work,
* as it happens in admin env
*
*
* @since 1.0.0
* @access public
*/
public function widget_scripts_preview() {
}
/**
* Registers widgets styles
*
*
* @since 1.0.0
* @access public
*/
public function widget_styles() {
foreach ($this->modules as $key => $value) {
wp_register_style('envo-extra-' . $key . '', ENVO_EXTRA_PLUGIN_URL . 'lib/elementor/assets/css/' . $key . '/' . $key . '.css');
}
}
public function widget_styles_preview() {
foreach ($this->modules as $key => $value) {
wp_register_style('envo-extra-' . $key . '', ENVO_EXTRA_PLUGIN_URL . 'lib/elementor/assets/css/' . $key . '/' . $key . '.css');
}
}
public function add_elementor_widget_categories( $elements_manager ) {
$elements_manager->add_category(
'envo-extra-widgets', [
'title' => __( 'Envo Extra', 'envo-extra' ),
'icon' => 'fa fa-plug',
]
);
}
/**
* Widget constructor.
*
*
* @since 1.0.0
* @access public
*/
public function __construct() {
add_action( 'elementor/widgets/widgets_registered', [$this, 'register_widgets' ] );
// Register Widget Styles
add_action( 'elementor/frontend/after_register_styles', [$this, 'widget_styles' ] );
//add_action('elementor/frontend/after_enqueue_styles', [ $this, 'enqueue_styles' ]);
add_action( 'elementor/editor/after_enqueue_scripts', [$this, 'editor_scripts' ] );
// Register Widget Scripts
add_action( 'elementor/frontend/after_register_scripts', [$this, 'widget_scripts' ] );
// Enqueue ALL Widgets Scripts for preview
add_action( 'elementor/preview/enqueue_scripts', [$this, 'widget_scripts_preview' ] );
add_action( 'elementor/elements/categories_registered', [$this, 'add_elementor_widget_categories' ] );
add_action( 'elementor/preview/enqueue_styles', [$this, 'widget_styles_preview' ] );
$this->modules = array(
'block-quote' => array(
'class' => 'Block_Quote',
),
'button' => array(
'class' => 'Button',
),
'counter' => array(
'class' => 'Counter',
),
'heading' => array(
'class' => 'Heading',
),
'team' => array(
'class' => 'Team',
),
'icon-box' => array(
'class' => 'Icon_Box',
),
'pricing' => array(
'class' => 'Pricing',
),
'testimonial' => array(
'class' => 'Testimonial',
),
);
}
}
Enwoo_Extra_Elementor_Extension::instance();
@@ -0,0 +1,822 @@
<?php
use Elementor\Controls_Manager;
use Elementor\Group_Control_Background;
use Elementor\Group_Control_Border;
use Elementor\Group_Control_Box_Shadow;
use Elementor\Group_Control_Image_Size;
use Elementor\Group_Control_Typography;
use Elementor\Utils;
use Elementor\Widget_Base;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
/**
* Elementor Addons
*
* Elementor widget.
*
* @since 1.0.0
*/
class Block_Quote extends Widget_Base {
/**
* Get widget name.
*
* Retrieve image widget name.
*
* @return string Widget name.
* @since 1.0.0
* @access public
*
*/
public function get_name() {
return 'envo-extra-block-quote';
}
/**
* Get widget title.
*
* Retrieve image widget title.
*
* @return string Widget title.
* @since 1.0.0
* @access public
*
*/
public function get_title() {
return __( 'Block Quote', 'envo-extra' );
}
/**
* Get widget icon.
*
* Retrieve image widget icon.
*
* @return string Widget icon.
* @since 1.0.0
* @access public
*
*/
public function get_icon() {
return 'eicon-blockquote';
}
/**
* Get widget categories.
*
* Retrieve the list of categories the image widget belongs to.
*
* Used to determine where to display the widget in the editor.
*
* @return array Widget categories.
* @since 1.0.0
* @access public
*
*/
public function get_categories() {
return array( 'envo-extra-widgets' );
}
/**
* Get widget keywords.
*
* Retrieve the list of keywords the widget belongs to.
*
* @return array Widget keywords.
* @since 1.0.0
* @access public
*
*/
public function get_keywords() {
return array( 'block', 'quote' );
}
/**
* Retrieve the list of style the widget depended on.
*
* Used to set style dependencies required to run the widget.
*
* @return array Widget style dependencies.
* @since 1.0.0
*
* @access public
*
*/
public function get_style_depends() {
return array( 'envo-extra-block-quote' );
}
/**
* Register widget controls.
*
* Adds different input fields to allow the user to change and customize the widget settings.
*
* @since 1.0.0
* @access protected
*/
protected function register_controls() {
$this->start_controls_section(
'section_blockquote',
array(
'label' => __( 'Block Quote', 'envo-extra' ),
'tab' => Controls_Manager::TAB_CONTENT,
)
);
$this->add_control(
'quote_position',
array(
'label' => __( 'Position', 'envo-extra' ),
'type' => Controls_Manager::SELECT,
'default' => 'layout-1',
'options' => array(
'layout-1' => __( 'Layout 1', 'envo-extra' ),
'layout-2' => __( 'Layout 2', 'envo-extra' ),
'layout-3' => __( 'Layout 3', 'envo-extra' ),
'layout-4' => __( 'Layout 4', 'envo-extra' ),
'layout-5' => __( 'Layout 5', 'envo-extra' ),
'layout-6' => __( 'Layout 6', 'envo-extra' ),
'layout-7' => __( 'Layout 7', 'envo-extra' ),
'layout-8' => __( 'Layout 8', 'envo-extra' ),
'layout-9' => __( 'Layout 9', 'envo-extra' ),
'layout-10' => __( 'Layout 10', 'envo-extra' ),
),
)
);
$this->add_control(
'quote_icon',
array(
'label' => esc_html__( 'Icons', 'envo-extra' ),
'type' => \Elementor\Controls_Manager::ICONS,
'default' => array(
'value' => 'fas fa-quote-left',
'library' => 'solid',
),
'condition' => array(
'quote_position!' => array( 'layout-3', 'layout-6' ),
),
)
);
$this->add_control(
'image',
array(
'label' => __( 'Image', 'envo-extra' ),
'type' => Controls_Manager::MEDIA,
'default' => array(
'url' => Utils::get_placeholder_image_src(),
),
'condition' => array(
'quote_position' => array( 'layout-4' ),
),
'dynamic' => array(
'active' => true,
),
)
);
$this->add_group_control(
Group_Control_Image_Size::get_type(),
array(
'name' => 'media_thumbnail',
'default' => 'full',
'separator' => 'none',
'exclude' => array(
'custom',
),
'condition' => array(
'quote_position' => array( 'layout-4' ),
),
)
);
$this->add_control(
'quote_title',
array(
'label' => __( 'Title', 'envo-extra' ),
'type' => Controls_Manager::TEXT,
'label_block' => false,
'default' => __( 'Steve Smith', 'envo-extra' ),
'placeholder' => __( 'Type Block Quote Title', 'envo-extra' ),
'dynamic' => array(
'active' => true,
),
)
);
$this->add_control(
'quote_designation',
array(
'label' => __( 'Designation', 'envo-extra' ),
'type' => Controls_Manager::TEXT,
'label_block' => false,
'default' => __( 'By Developer', 'envo-extra' ),
'placeholder' => __( 'Type Block Quote Designation', 'envo-extra' ),
'dynamic' => array(
'active' => true,
),
)
);
$this->add_control(
'quote_description',
array(
'label' => esc_html__( 'Description', 'envo-extra' ),
'type' => Controls_Manager::TEXTAREA,
'rows' => 5,
'placeholder' => esc_html__( 'Type your description here', 'envo-extra' ),
'default' => 'Lorem Ipsum has been the industry standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.',
'label_block' => true,
'dynamic' => array(
'active' => true,
),
)
);
$this->end_controls_section();
//Styling Tab
$this->start_controls_section(
'section_style_general',
array(
'label' => __( 'General', 'envo-extra' ),
'tab' => Controls_Manager::TAB_STYLE,
)
);
$this->add_responsive_control(
'box_alignment',
array(
'label' => __( 'Alignment', 'envo-extra' ),
'type' => Controls_Manager::CHOOSE,
'options' => array(
'left' => array(
'title' => __( 'Left', 'envo-extra' ),
'icon' => 'eicon-h-align-left',
),
'center' => array(
'title' => __( 'Center', 'envo-extra' ),
'icon' => 'eicon-h-align-center',
),
'right' => array(
'title' => __( 'Right', 'envo-extra' ),
'icon' => 'eicon-h-align-right',
),
),
'toggle' => false,
'default' => 'left',
'tablet_default' => 'left',
'mobile_default' => 'center',
'prefix_class' => 'elementor%s-align-',
)
);
$this->add_group_control(
Group_Control_Background::get_type(),
array(
'name' => 'box_background',
'label' => __( 'Background', 'envo-extra' ),
'types' => array( 'classic', 'gradient' ),
'selector' => '{{WRAPPER}} .envo-extra-block-quote-inner, {{WRAPPER}} .envo-extra-block-quote-layout-3 .envo-extra-block-quote-inner::before, {{WRAPPER}} .envo-extra-block-quote-layout-6 .envo-extra-block-quote-text::before',
)
);
$this->add_group_control(
Group_Control_Border::get_type(),
array(
'name' => 'style_border',
'selector' => '{{WRAPPER}} .envo-extra-block-quote-inner',
)
);
$this->add_group_control(
Group_Control_Box_Shadow::get_type(),
array(
'name' => 'box_shadow',
'exclude' => array(
'box_shadow_position',
),
'selector' => '{{WRAPPER}} .envo-extra-block-quote-inner',
)
);
$this->add_responsive_control(
'box_border_radius',
array(
'label' => __( 'Border Radius', 'envo-extra' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => array( 'px', '%' ),
'selectors' => array(
'{{WRAPPER}} .envo-extra-block-quote-inner' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
),
)
);
$this->add_responsive_control(
'box_padding',
array(
'label' => __( 'Padding', 'envo-extra' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => array( 'px', '%' ),
'selectors' => array(
'{{WRAPPER}} .envo-extra-block-quote-inner' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
),
)
);
$this->end_controls_section();
// Image
$this->start_controls_section(
'section_block_quote_image',
array(
'label' => __( 'Image', 'envo-extra' ),
'tab' => Controls_Manager::TAB_STYLE,
'condition' => array(
'quote_position' => 'layout-4',
),
)
);
$this->add_responsive_control(
'image_size',
array(
'label' => __( 'Size', 'envo-extra' ),
'type' => Controls_Manager::SLIDER,
'size_units' => array( 'px' ),
'range' => array(
'px' => array(
'min' => 0,
'max' => 1000,
),
),
'default' => array(
'unit' => 'px',
'size' => 100,
),
'selectors' => array(
'{{WRAPPER}} .envo-extra-block-quote-layout-4 .envo-extra-block-quote-content-img > img' => 'min-width: {{SIZE}}{{UNIT}}; width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}};',
),
)
);
$this->add_responsive_control(
'image_margin',
array(
'label' => __( 'Margin', 'envo-extra' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => array( 'px', '%' ),
'selectors' => array(
'{{WRAPPER}} .envo-extra-block-quote-layout-4 .envo-extra-block-quote-content-img > img' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
),
)
);
$this->end_controls_section();
// Separator
$this->start_controls_section(
'section_block_quote_separator',
array(
'label' => __( 'Separator', 'envo-extra' ),
'tab' => Controls_Manager::TAB_STYLE,
'condition' => array(
'quote_position' => 'layout-5',
),
)
);
$this->add_responsive_control(
'separator_size',
array(
'label' => __( 'Size', 'envo-extra' ),
'type' => Controls_Manager::SLIDER,
'size_units' => array( 'px', 'vw' ),
'range' => array(
'px' => array(
'min' => 0,
'max' => 1000,
),
),
'default' => array(
'unit' => 'px',
'size' => 100,
),
'selectors' => array(
'{{WRAPPER}} .envo-extra-block-quote-layout-5 .envo-extra-block-quote-content-wrap::before' => 'width: {{SIZE}}{{UNIT}};',
),
)
);
$this->add_control(
'separator_color',
array(
'label' => __( 'Color', 'envo-extra' ),
'type' => Controls_Manager::COLOR,
'selectors' => array(
'{{WRAPPER}} .envo-extra-block-quote-layout-5 .envo-extra-block-quote-content-wrap::before' => 'background-color: {{VALUE}};',
),
)
);
$this->add_responsive_control(
'separator_margin',
array(
'label' => __( 'Margin', 'envo-extra' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => array( 'px', '%' ),
'selectors' => array(
'{{WRAPPER}} .envo-extra-block-quote-layout-5 .envo-extra-block-quote-content-wrap::before' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
),
)
);
$this->end_controls_section();
// Quote
$this->start_controls_section(
'section_block_quote',
array(
'label' => __( 'Quote', 'envo-extra' ),
'tab' => Controls_Manager::TAB_STYLE,
'condition' => array(
'quote_position!' => array( 'layout-3', 'layout-6' ),
),
)
);
$this->add_responsive_control(
'quote_size',
array(
'label' => __( 'Size', 'envo-extra' ),
'type' => Controls_Manager::SLIDER,
'size_units' => array( 'px' ),
'range' => array(
'px' => array(
'min' => 5,
'max' => 300,
),
),
'selectors' => array(
'{{WRAPPER}} .envo-extra-block-quote-icon > i' => 'font-size: {{SIZE}}{{UNIT}};',
'{{WRAPPER}} .envo-extra-block-quote-icon > svg' => 'width: {{SIZE}}{{UNIT}}; height: auto;',
),
)
);
$this->add_responsive_control(
'quote_bg_size',
array(
'label' => __( 'Background Size', 'envo-extra' ),
'type' => Controls_Manager::SLIDER,
'size_units' => array( 'px' ),
'range' => array(
'px' => array(
'min' => 5,
'max' => 300,
),
),
'selectors' => array(
'{{WRAPPER}} .envo-extra-block-quote-icon' => 'min-width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}};',
),
)
);
$this->add_control(
'quote_color',
array(
'label' => __( 'Color', 'envo-extra' ),
'type' => Controls_Manager::COLOR,
'selectors' => array(
'{{WRAPPER}} .envo-extra-block-quote-icon > i' => 'color: {{VALUE}};',
'{{WRAPPER}} .envo-extra-block-quote-icon > svg' => 'fill: {{VALUE}};',
),
)
);
$this->add_control(
'quote_bg_color',
array(
'label' => __( 'Background Color', 'envo-extra' ),
'type' => Controls_Manager::COLOR,
'selectors' => array(
'{{WRAPPER}} .envo-extra-block-quote-icon' => 'background-color: {{VALUE}};',
),
)
);
$this->add_group_control(
Group_Control_Border::get_type(),
array(
'name' => 'quote_border',
'selector' => '{{WRAPPER}} .envo-extra-block-quote-icon',
)
);
$this->add_group_control(
Group_Control_Box_Shadow::get_type(),
array(
'name' => 'quote_shadow',
'exclude' => array(
'box_shadow_position',
),
'selector' => '{{WRAPPER}} .envo-extra-block-quote-icon',
)
);
$this->add_responsive_control(
'quote_border_radius',
array(
'label' => __( 'Border Radius', 'envo-extra' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => array( 'px', '%' ),
'selectors' => array(
'{{WRAPPER}} .envo-extra-block-quote-icon' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
),
)
);
$this->add_responsive_control(
'quote_padding',
array(
'label' => __( 'Padding', 'envo-extra' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => array( 'px', '%' ),
'selectors' => array(
'{{WRAPPER}} .envo-extra-block-quote-icon' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
),
)
);
$this->add_responsive_control(
'quote_margin',
array(
'label' => __( 'Margin', 'envo-extra' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => array( 'px', '%' ),
'selectors' => array(
'{{WRAPPER}} .envo-extra-block-quote-icon' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
),
)
);
$this->end_controls_section();
//Description
$this->start_controls_section(
'section_block_quote_desc',
array(
'label' => __( 'Description', 'envo-extra' ),
'tab' => Controls_Manager::TAB_STYLE,
)
);
$this->add_group_control(
Group_Control_Typography::get_type(),
array(
'name' => 'desc_typography',
'label' => __( 'Typography', 'envo-extra' ),
'selector' => '{{WRAPPER}} .envo-extra-block-quote-content-wrap > .envo-extra-block-quote-text',
)
);
$this->add_control(
'desc_color',
array(
'label' => __( 'Color', 'envo-extra' ),
'type' => Controls_Manager::COLOR,
'selectors' => array(
'{{WRAPPER}} .envo-extra-block-quote-content-wrap > .envo-extra-block-quote-text' => 'color: {{VALUE}};',
),
)
);
$this->add_group_control(
Group_Control_Border::get_type(),
array(
'name' => 'desc_border',
'selector' => '{{WRAPPER}} .envo-extra-block-quote-content-wrap > .envo-extra-block-quote-text,
{{WRAPPER}} .envo-extra-block-quote-layout-6 .envo-extra-block-quote-text::after',
'condition' => array(
'quote_position' => 'layout-6',
),
)
);
$this->add_group_control(
Group_Control_Box_Shadow::get_type(),
array(
'name' => 'desc_shadow',
'exclude' => array(
'box_shadow_position',
),
'selector' => '{{WRAPPER}} .envo-extra-block-quote-content-wrap > .envo-extra-block-quote-text',
'condition' => array(
'quote_position' => 'layout-6',
),
)
);
$this->add_responsive_control(
'desc_border_radius',
array(
'label' => __( 'Border Radius', 'envo-extra' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => array( 'px', '%' ),
'selectors' => array(
'{{WRAPPER}} .envo-extra-block-quote-content-wrap > .envo-extra-block-quote-text' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
),
'condition' => array(
'quote_position' => 'layout-6',
),
)
);
$this->add_responsive_control(
'desc_padding',
array(
'label' => __( 'Padding', 'envo-extra' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => array( 'px', '%' ),
'selectors' => array(
'{{WRAPPER}} .envo-extra-block-quote-content-wrap > .envo-extra-block-quote-text' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
),
'condition' => array(
'quote_position' => 'layout-6',
),
)
);
$this->add_responsive_control(
'desc_margin',
array(
'label' => __( 'Margin', 'envo-extra' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => array( 'px', '%' ),
'selectors' => array(
'{{WRAPPER}} .envo-extra-block-quote-content-wrap > .envo-extra-block-quote-text' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
),
)
);
$this->end_controls_section();
// Title
$this->start_controls_section(
'section_block_quote_title',
array(
'label' => __( 'Title', 'envo-extra' ),
'tab' => Controls_Manager::TAB_STYLE,
)
);
$this->add_group_control(
Group_Control_Typography::get_type(),
array(
'name' => 'title_typography',
'label' => __( 'Typography', 'envo-extra' ),
'selector' => '{{WRAPPER}} .envo-extra-block-quote-desc > .envo-extra-block-quote-title',
)
);
$this->add_control(
'title_color',
array(
'label' => __( 'Color', 'envo-extra' ),
'type' => Controls_Manager::COLOR,
'selectors' => array(
'{{WRAPPER}} .envo-extra-block-quote-desc > .envo-extra-block-quote-title' => 'color: {{VALUE}};',
'{{WRAPPER}} .envo-extra-block-quote-desc > .envo-extra-block-quote-title::before' => 'background-color: {{VALUE}};',
),
)
);
$this->add_responsive_control(
'title_margin',
array(
'label' => __( 'Margin', 'envo-extra' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => array( 'px', '%' ),
'selectors' => array(
'{{WRAPPER}} .envo-extra-block-quote-desc > .envo-extra-block-quote-title' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
),
)
);
$this->end_controls_section();
// Destination
$this->start_controls_section(
'section_block_quote_designation',
array(
'label' => __( 'Designation', 'envo-extra' ),
'tab' => Controls_Manager::TAB_STYLE,
)
);
$this->add_group_control(
Group_Control_Typography::get_type(),
array(
'name' => 'designation_typography',
'label' => __( 'Typography', 'envo-extra' ),
'selector' => '{{WRAPPER}} .envo-extra-block-quote-desc > .envo-extra-block-quote-designation',
)
);
$this->add_control(
'designation_color',
array(
'label' => __( 'Color', 'envo-extra' ),
'type' => Controls_Manager::COLOR,
'selectors' => array(
'{{WRAPPER}} .envo-extra-block-quote-desc > .envo-extra-block-quote-designation' => 'color: {{VALUE}};',
),
)
);
$this->add_responsive_control(
'designation_margin',
array(
'label' => __( 'Margin', 'envo-extra' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => array( 'px', '%' ),
'selectors' => array(
'{{WRAPPER}} .envo-extra-block-quote-desc > .envo-extra-block-quote-designation' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
),
)
);
$this->end_controls_section();
}
/**
* Render image widget output on the frontend.
*
* Written in PHP and used to generate the final HTML.
*
* @since 1.0.0
* @access protected
*/
protected function render() {
$settings = $this->get_settings_for_display();
?>
<div class="envo-extra-block-quote-wrapper envo-extra-block-quote-<?php echo esc_attr( $settings['quote_position'] ); ?>">
<div class="envo-extra-block-quote-inner">
<?php if ( $settings['quote_icon']['value'] && ( 'layout-3' !== $settings['quote_position'] && 'layout-6' !== $settings['quote_position'] ) ) : ?>
<span class="envo-extra-block-quote-icon">
<?php
if ( $settings['quote_icon'] ) {
\Elementor\Icons_Manager::render_icon( $settings['quote_icon'], array( 'aria-hidden' => 'true' ) );
}
?>
</span>
<?php endif; ?>
<div class="envo-extra-block-quote-content">
<?php if ( $settings['image'] || 'layout-4' === $settings['quote_position'] ) : ?>
<span class="envo-extra-block-quote-content-img">
<?php
if ( $settings['image'] ) {
echo wp_kses_post( \Elementor\Group_Control_Image_Size::get_attachment_image_html( $settings, 'media_thumbnail', 'image' ) );
}
?>
</span>
<?php endif; ?>
<div class="envo-extra-block-quote-content-wrap">
<?php if ( $settings['quote_description'] ) : ?>
<!-- Text -->
<p class="envo-extra-block-quote-text"><?php wp_kses_post( $settings['quote_description'] ); ?></p>
<?php endif; ?>
<div class="envo-extra-block-quote-desc">
<?php if ( $settings['quote_title'] ) : ?>
<!-- Title -->
<span class="envo-extra-block-quote-title"><?php echo esc_html( $settings['quote_title'] ); ?></span>
<?php endif; ?>
<?php if ( $settings['quote_designation'] ) : ?>
<!-- Designation -->
<span class="envo-extra-block-quote-designation"><?php echo esc_html( $settings['quote_designation'] ); ?></span>
<?php endif; ?>
</div>
</div>
</div>
</div>
</div>
<?php
}
}
@@ -0,0 +1,695 @@
<?php
use Elementor\Controls_Manager;
use Elementor\Core\Kits\Documents\Tabs\Global_Typography;
use Elementor\Group_Control_Background;
use Elementor\Group_Control_Border;
use Elementor\Group_Control_Box_Shadow;
use Elementor\Group_Control_Text_Shadow;
use Elementor\Group_Control_Typography;
use Elementor\Widget_Base;
use Elementor\Icons_Manager;
if ( !defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
/**
* Elementor Addons
*
* Elementor widget.
*
* @since 1.0.0
*/
class Button extends Widget_Base {
/**
* Get widget name.
*
* Retrieve image widget name.
*
* @return string Widget name.
* @since 1.0.0
* @access public
*
*/
public function get_name() {
return 'envo-extra-button';
}
/**
* Get widget title.
*
* Retrieve image widget title.
*
* @return string Widget title.
* @since 1.0.0
* @access public
*
*/
public function get_title() {
return __( 'Button', 'envo-extra' );
}
/**
* Get widget icon.
*
* Retrieve image widget icon.
*
* @return string Widget icon.
* @since 1.0.0
* @access public
*
*/
public function get_icon() {
return 'eicon-button';
}
/**
* Get widget categories.
*
* Retrieve the list of categories the image widget belongs to.
*
* Used to determine where to display the widget in the editor.
*
* @return array Widget categories.
* @since 1.0.0
* @access public
*
*/
public function get_categories() {
return array( 'envo-extra-widgets' );
}
/**
* Get widget keywords.
*
* Retrieve the list of keywords the widget belongs to.
*
* @return array Widget keywords.
* @since 1.0.0
* @access public
*
*/
public function get_keywords() {
return array( 'button', 'link', 'cta' );
}
/**
* Retrieve the list of style the widget depended on.
*
* Used to set style dependencies required to run the widget.
*
* @return array Widget style dependencies.
* @since 1.0.0
*
* @access public
*
*/
public function get_style_depends() {
return array( 'envo-extra-button' );
}
/**
* Register widget controls.
*
* Adds different input fields to allow the user to change and customize the widget settings.
*
* @since 1.0.0
* @access protected
*/
protected function register_controls() {
$this->start_controls_section(
'section_general', array(
'label' => __( 'General', 'envo-extra' ),
)
);
$this->add_control(
'text', array(
'label' => __( 'Text', 'envo-extra' ),
'type' => Controls_Manager::TEXT,
'dynamic' => array(
'active' => true,
),
'default' => __( 'Click here', 'envo-extra' ),
'placeholder' => __( 'Click here', 'envo-extra' ),
)
);
$this->add_control(
'link', array(
'label' => __( 'Link', 'envo-extra' ),
'type' => Controls_Manager::URL,
'dynamic' => array(
'active' => true,
),
'placeholder' => __( 'https://your-link.com', 'envo-extra' ),
'default' => array(
'url' => '#',
),
)
);
$this->add_responsive_control(
'align', array(
'label' => __( 'Alignment', 'envo-extra' ),
'type' => Controls_Manager::CHOOSE,
'options' => array(
'left' => array(
'title' => __( 'Left', 'envo-extra' ),
'icon' => 'eicon-h-align-left',
),
'center' => array(
'title' => __( 'Center', 'envo-extra' ),
'icon' => 'eicon-h-align-center',
),
'right' => array(
'title' => __( 'Right', 'envo-extra' ),
'icon' => 'eicon-h-align-right',
),
'justify' => array(
'title' => __( 'Justified', 'envo-extra' ),
'icon' => 'eicon-text-align-justify',
),
),
'prefix_class' => 'elementor%s-align-',
'default' => '',
)
);
$this->add_control(
'icon', array(
'label' => __( 'Icon', 'envo-extra' ),
'type' => Controls_Manager::ICONS,
'skin' => 'inline',
'label_block' => false,
)
);
$this->add_control(
'icon_align', array(
'label' => __( 'Icon Position', 'envo-extra' ),
'type' => Controls_Manager::SELECT,
'default' => 'left',
'options' => array(
'left' => __( 'Before', 'envo-extra' ),
'right' => __( 'After', 'envo-extra' ),
),
'condition' => array(
'icon[value]!' => '',
),
)
);
$this->add_control(
'icon_indent', array(
'label' => __( 'Icon Spacing', 'envo-extra' ),
'type' => Controls_Manager::SLIDER,
'range' => array(
'px' => array(
'max' => 50,
),
),
'selectors' => array(
'{{WRAPPER}} .envo-extra-align-icon-right .envo-extra-elementor-button-media' => 'margin-left: {{SIZE}}{{UNIT}};',
'{{WRAPPER}} .envo-extra-align-icon-left .envo-extra-elementor-button-media' => 'margin-right: {{SIZE}}{{UNIT}};',
),
'condition' => array(
'icon[value]!' => '',
),
)
);
$this->add_control(
'button_css_id', array(
'label' => __( 'Button ID', 'envo-extra' ),
'type' => Controls_Manager::TEXT,
'dynamic' => array(
'active' => true,
),
'default' => '',
'title' => __( 'Add your custom id WITHOUT the Pound key. e.g: my-id', 'envo-extra' ),
'description' => __( 'Please make sure the ID is unique and not used elsewhere on the page this form is displayed. This field allows <code>A-z 0-9</code> & underscore chars without spaces.', 'envo-extra' ),
'separator' => 'before',
)
);
$this->end_controls_section();
$this->start_controls_section(
'section_style', array(
'label' => __( 'General', 'envo-extra' ),
'tab' => Controls_Manager::TAB_STYLE,
)
);
$this->add_group_control(
Group_Control_Typography::get_type(), array(
'name' => 'typography',
'global' => array(
'default' => Global_Typography::TYPOGRAPHY_ACCENT,
),
'selector' => '{{WRAPPER}} .envo-extra-elementor-button',
)
);
$this->add_group_control(
Group_Control_Text_Shadow::get_type(), array(
'name' => 'text_shadow',
'selector' => '{{WRAPPER}} .envo-extra-elementor-button',
)
);
$this->start_controls_tabs( 'tabs_button_style' );
$this->start_controls_tab(
'tab_button_normal', array(
'label' => __( 'Normal', 'envo-extra' ),
)
);
$this->add_control(
'button_text_color', array(
'label' => __( 'Text Color', 'envo-extra' ),
'type' => Controls_Manager::COLOR,
'default' => '',
'selectors' => array(
'{{WRAPPER}} .envo-extra-elementor-button' => 'color: {{VALUE}};',
'{{WRAPPER}} .envo-extra-elementor-button svg' => 'color: {{VALUE}};',
),
)
);
$this->add_group_control(
Group_Control_Background::get_type(), array(
'name' => 'background',
'label' => __( 'Background', 'envo-extra' ),
'types' => array( 'classic', 'gradient' ),
'exclude' => array( 'image' ),
'selector' => '{{WRAPPER}} .envo-extra-elementor-button,{{WRAPPER}} .envo-extra-elementor-button-hover-style-skewFill:before,
{{WRAPPER}} .envo-extra-elementor-button-hover-style-flipSlide::before',
)
);
$this->add_group_control(
Group_Control_Box_Shadow::get_type(), array(
'name' => 'button_box_shadow',
'selector' => '{{WRAPPER}} .envo-extra-elementor-button',
)
);
$this->end_controls_tab();
$this->start_controls_tab(
'tab_button_hover', array(
'label' => __( 'Hover', 'envo-extra' ),
)
);
$this->add_control(
'hover_color', array(
'label' => __( 'Text Color', 'envo-extra' ),
'type' => Controls_Manager::COLOR,
'selectors' => array(
'{{WRAPPER}} .envo-extra-elementor-button:hover, {{WRAPPER}} .envo-extra-elementor-button:focus' => 'color: {{VALUE}};',
'{{WRAPPER}} .envo-extra-elementor-button:hover svg, {{WRAPPER}} .envo-extra-elementor-button:focus svg' => 'fill: {{VALUE}};',
),
)
);
$this->add_group_control(
Group_Control_Background::get_type(), array(
'name' => 'button_background_hover',
'label' => __( 'Background', 'envo-extra' ),
'types' => array( 'classic', 'gradient' ),
'exclude' => array( 'image' ),
'selector' => '{{WRAPPER}} .envo-extra-elementor-button-animation-none:hover,{{WRAPPER}} .envo-extra-button-2d-animation:hover,
{{WRAPPER}} .envo-extra-button-bg-animation::before,{{WRAPPER}} .envo-extra-elementor-button-hover-style-bubbleFromDown::before,
{{WRAPPER}} .envo-extra-elementor-button-hover-style-bubbleFromDown::after,{{WRAPPER}} .envo-extra-elementor-button-hover-style-bubbleFromCenter::before,
{{WRAPPER}} .envo-extra-elementor-button-hover-style-bubbleFromCenter::after,{{WRAPPER}} .envo-extra-elementor-button-hover-style-flipSlide,
{{WRAPPER}} [class*=envo-extra-elementor-button-hover-style-underline]:hover,{{WRAPPER}} .envo-extra-elementor-button-hover-style-skewFill,
{{WRAPPER}} .envo-extra-elementor-button-animation-none:focus,{{WRAPPER}} .envo-extra-button-2d-animation:focus,
{{WRAPPER}} [class*=envo-extra-elementor-button-focus-style-underline]:focus',
)
);
$this->add_group_control(
Group_Control_Box_Shadow::get_type(), array(
'name' => 'button_box_hshadow',
'selector' => '{{WRAPPER}} .envo-extra-elementor-button:hover',
)
);
$this->add_control(
'button_hover_border_color', array(
'label' => __( 'Border Color', 'envo-extra' ),
'type' => Controls_Manager::COLOR,
'condition' => array(
'border_border!' => '',
'hover_unique_animation!' => array(
'underlineFromLeft',
'underlineFromRight',
'underlineFromCenter',
'underlineReveal',
),
),
'selectors' => array(
'{{WRAPPER}} .envo-extra-elementor-button:hover, {{WRAPPER}} .envo-extra-elementor-button:focus' => 'border-color: {{VALUE}};',
),
)
);
$this->add_control(
'button_hover_underline', array(
'label' => __( 'Line Color', 'envo-extra' ),
'type' => Controls_Manager::COLOR,
'condition' => array(
'hover_animation' => 'unique',
'hover_unique_animation' => array(
'underlineFromLeft',
'underlineFromRight',
'underlineFromCenter',
'underlineReveal',
),
),
'selectors' => array(
'{{WRAPPER}} [class*=envo-extra-elementor-button-hover-style-underline]:before' => 'background-color: {{VALUE}};',
),
)
);
$this->add_control(
'hover_animation', array(
'label' => __( 'Hover Animation', 'envo-extra' ),
'type' => Controls_Manager::SELECT,
'default' => 'none',
'options' => array(
'none' => __( 'None', 'envo-extra' ),
'2d-transition' => __( '2D', 'envo-extra' ),
'background-transition' => __( 'Background', 'envo-extra' ),
'unique' => __( 'Unique', 'envo-extra' ),
),
)
);
$this->add_control(
'hover_2d_css_animation', array(
'label' => __( 'Animation Type', 'envo-extra' ),
'type' => Controls_Manager::SELECT,
'default' => 'hvr-grow',
'options' => array(
'hvr-grow' => __( 'Grow', 'envo-extra' ),
'hvr-shrink' => __( 'Shrink', 'envo-extra' ),
'hvr-pulse' => __( 'Pulse', 'envo-extra' ),
'hvr-pulse-grow' => __( 'Pulse Grow', 'envo-extra' ),
'hvr-pulse-shrink' => __( 'Pulse Shrink', 'envo-extra' ),
'hvr-push' => __( 'Push', 'envo-extra' ),
'hvr-pop' => __( 'Pop', 'envo-extra' ),
'hvr-bounce-in' => __( 'Bounce In', 'envo-extra' ),
'hvr-bounce-out' => __( 'Bounce Out', 'envo-extra' ),
'hvr-rotate' => __( 'Rotate', 'envo-extra' ),
'hvr-grow-rotate' => __( 'Grow Rotate', 'envo-extra' ),
'hvr-float' => __( 'Float', 'envo-extra' ),
'hvr-sink' => __( 'Sink', 'envo-extra' ),
'hvr-bob' => __( 'Bob', 'envo-extra' ),
'hvr-hang' => __( 'Hang', 'envo-extra' ),
'hvr-wobble-vertical' => __( 'Wobble Vertical', 'envo-extra' ),
'hvr-wobble-horizontal' => __( 'Wobble Horizontal', 'envo-extra' ),
'hvr-wobble-to-bottom-right' => __( 'Wobble To Bottom Right', 'envo-extra' ),
'hvr-wobble-to-top-right' => __( 'Wobble To Top Right', 'envo-extra' ),
'hvr-buzz' => __( 'Buzz', 'envo-extra' ),
'hvr-buzz-out' => __( 'Buzz Out', 'envo-extra' ),
),
'condition' => array(
'hover_animation' => '2d-transition',
),
)
);
$this->add_control(
'hover_background_css_animation', array(
'label' => __( 'Animation', 'envo-extra' ),
'type' => Controls_Manager::SELECT,
'default' => 'hvr-sweep-to-right',
'options' => array(
'hvr-sweep-to-right' => __( 'Sweep To Right', 'envo-extra' ),
'hvr-sweep-to-left' => __( 'Sweep To Left', 'envo-extra' ),
'hvr-sweep-to-bottom' => __( 'Sweep To Bottom', 'envo-extra' ),
'hvr-sweep-to-top' => __( 'Sweep To Top', 'envo-extra' ),
'hvr-bounce-to-right' => __( 'Bounce To Right', 'envo-extra' ),
'hvr-bounce-to-left' => __( 'Bounce To Left', 'envo-extra' ),
'hvr-bounce-to-bottom' => __( 'Bounce To Bottom', 'envo-extra' ),
'hvr-bounce-to-top' => __( 'Bounce To Top', 'envo-extra' ),
'hvr-radial-out' => __( 'Radial Out', 'envo-extra' ),
'hvr-radial-in' => __( 'Radial In', 'envo-extra' ),
'hvr-rectangle-in' => __( 'Rectangle In', 'envo-extra' ),
'hvr-rectangle-out' => __( 'Rectangle Out', 'envo-extra' ),
'hvr-shutter-in-horizontal' => __( 'Shutter In Horizontal', 'envo-extra' ),
'hvr-shutter-out-horizontal' => __( 'Shutter Out Horizontal', 'envo-extra' ),
'hvr-shutter-in-vertical' => __( 'Shutter In Vertical', 'envo-extra' ),
'hvr-shutter-out-vertical' => __( 'Shutter Out Vertical', 'envo-extra' ),
),
'condition' => array(
'hover_animation' => 'background-transition',
),
)
);
$this->add_control(
'hover_unique_animation', array(
'label' => __( 'Animation', 'envo-extra' ),
'type' => Controls_Manager::SELECT,
'default' => 'skewFill',
'options' => array(
'underlineFromLeft' => __( 'Underline From Left', 'envo-extra' ),
'underlineFromRight' => __( 'Underline From Right', 'envo-extra' ),
'underlineFromCenter' => __( 'Underline From Center', 'envo-extra' ),
'skewFill' => __( 'Skew Fill', 'envo-extra' ),
'flipSlide' => __( 'Flip Slide', 'envo-extra' ),
'bubbleFromDown' => __( 'Bubble From Down', 'envo-extra' ),
'bubbleFromCenter' => __( 'Bubble From Center', 'envo-extra' ),
),
'condition' => array(
'hover_animation' => 'unique',
),
)
);
$this->end_controls_tab();
$this->end_controls_tabs();
$this->add_group_control(
Group_Control_Border::get_type(), array(
'name' => 'border',
'selector' => '{{WRAPPER}} .envo-extra-elementor-button',
'separator' => 'before',
)
);
$this->add_responsive_control(
'border_radius', array(
'label' => __( 'Border Radius', 'envo-extra' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => array( 'px', '%', 'em' ),
'selectors' => array(
'{{WRAPPER}} .envo-extra-elementor-button' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
),
)
);
$this->add_responsive_control(
'button_padding', array(
'label' => __( 'Padding', 'envo-extra' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => array( 'px', 'em', '%' ),
'selectors' => array(
'{{WRAPPER}} .envo-extra-elementor-button' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
),
)
);
$this->end_controls_section();
$this->start_controls_section(
'section_style_icon', array(
'label' => __( 'Icon', 'envo-extra' ),
'tab' => Controls_Manager::TAB_STYLE,
'condition' => array(
'icon[value]!' => '',
),
)
);
$this->add_responsive_control(
'icon_size', array(
'label' => __( 'Size', 'envo-extra' ),
'type' => Controls_Manager::SLIDER,
'size_units' => array( 'px' ),
'range' => array(
'px' => array(
'min' => 5,
'max' => 300,
),
),
'selectors' => array(
'{{WRAPPER}} .envo-extra-elementor-button-media > i' => 'font-size: {{SIZE}}{{UNIT}};',
'{{WRAPPER}} .envo-extra-elementor-button-media > svg' => 'width: {{SIZE}}{{UNIT}};',
'{{WRAPPER}} .envo-extra-elementor-button-media' => 'min-width: {{SIZE}}{{UNIT}};',
),
)
);
$this->add_responsive_control(
'icon_bg_size', array(
'label' => __( 'Background Size', 'envo-extra' ),
'type' => Controls_Manager::SLIDER,
'size_units' => array( 'px' ),
'range' => array(
'px' => array(
'min' => 5,
'max' => 500,
),
),
'selectors' => array(
'{{WRAPPER}} .envo-extra-elementor-button-media' => 'height: {{SIZE}}{{UNIT}}; width: {{SIZE}}{{UNIT}};',
),
)
);
$this->start_controls_tabs( 'button_icon_style' );
$this->start_controls_tab(
'icon_normal', array(
'label' => __( 'Normal', 'envo-extra' ),
)
);
$this->add_control(
'icon_color', array(
'label' => __( 'Color', 'envo-extra' ),
'type' => Controls_Manager::COLOR,
'default' => '',
'selectors' => array(
'{{WRAPPER}} .envo-extra-elementor-button-media > i' => 'color: {{VALUE}};',
'{{WRAPPER}} .envo-extra-elementor-button-media > svg' => 'fill: {{VALUE}};',
),
)
);
$this->add_group_control(
Group_Control_Background::get_type(), array(
'name' => 'icon_background',
'label' => __( 'Background', 'envo-extra' ),
'types' => array( 'classic', 'gradient' ),
'exclude' => array( 'image' ),
'selector' => '{{WRAPPER}} .envo-extra-elementor-button-media',
)
);
$this->end_controls_tab();
$this->start_controls_tab(
'icon_hover', array(
'label' => __( 'Hover', 'envo-extra' ),
)
);
$this->add_control(
'icon_hover_color', array(
'label' => __( 'Color', 'envo-extra' ),
'type' => Controls_Manager::COLOR,
'selectors' => array(
'{{WRAPPER}} .envo-extra-elementor-button:hover .envo-extra-elementor-button-media > i, {{WRAPPER}} .envo-extra-elementor-button:focus .envo-extra-elementor-button-media > i' => 'color: {{VALUE}};',
'{{WRAPPER}} .envo-extra-elementor-button:hover .envo-extra-elementor-button-media > svg, {{WRAPPER}} .envo-extra-elementor-button:focus .envo-extra-elementor-button-media > svg' => 'fill: {{VALUE}};',
),
)
);
$this->add_group_control(
Group_Control_Background::get_type(), array(
'name' => 'icon_background_hover',
'label' => __( 'Background', 'envo-extra' ),
'types' => array( 'classic', 'gradient' ),
'exclude' => array( 'image' ),
'selector' => '{{WRAPPER}} .envo-extra-elementor-button:hover .envo-extra-elementor-button-media, {{WRAPPER}} .envo-extra-elementor-button:focus .envo-extra-elementor-button-media',
)
);
$this->add_control(
'icon_border_hover_color', array(
'label' => __( 'Border Color', 'envo-extra' ),
'type' => Controls_Manager::COLOR,
'condition' => array(
'icon_border!' => '',
),
'selectors' => array(
'{{WRAPPER}} .envo-extra-elementor-button:hover .envo-extra-elementor-button-media, {{WRAPPER}} .envo-extra-elementor-button:focus .envo-extra-elementor-button-media' => 'border-color: {{VALUE}};',
),
)
);
$this->end_controls_tab();
$this->end_controls_tabs();
$this->add_group_control(
Group_Control_Border::get_type(), array(
'name' => 'icon_border',
'selector' => '{{WRAPPER}} .envo-extra-elementor-button-media',
'separator' => 'before',
)
);
$this->add_responsive_control(
'icon_border_radius', array(
'label' => __( 'Border Radius', 'envo-extra' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => array( 'px', '%', 'em' ),
'selectors' => array(
'{{WRAPPER}} .envo-extra-elementor-button-media' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
),
)
);
$this->end_controls_section();
}
/**
* Render image widget output on the frontend.
*
* Written in PHP and used to generate the final HTML.
*
* @since 1.0.0
* @access protected
*/
protected function render() {
$settings = $this->get_settings_for_display();
$html_tag = ( $settings[ 'link' ][ 'url' ] ) ? 'a' : 'span';
$attr = ( $settings[ 'button_css_id' ] ) ? ' id="' . $settings[ 'button_css_id' ] . '"' : '';
$attr .= $settings[ 'link' ][ 'is_external' ] ? ' target="_blank"' : '';
$attr .= $settings[ 'link' ][ 'nofollow' ] ? ' rel="nofollow"' : '';
$attr .= $settings[ 'link' ][ 'url' ] ? ' href="' . $settings[ 'link' ][ 'url' ] . '"' : '';
$hover_animation = ( '2d-transition' === $settings[ 'hover_animation' ] ) ? 'envo-extra-button-2d-animation ' . $settings[ 'hover_2d_css_animation' ] : ( ( 'background-transition' === $settings[ 'hover_animation' ] ) ? 'envo-extra-button-bg-animation ' . $settings[ 'hover_background_css_animation' ] : ( ( 'unique' === $settings[ 'hover_animation' ] ) ? 'envo-extra-elementor-button-hover-style-' . $settings[ 'hover_unique_animation' ] : 'envo-extra-elementor-button-animation-none' ) );
?>
<<?php echo esc_attr( $html_tag ); ?> <?php echo wp_kses_data( $attr ); ?> class="envo-extra-elementor-button <?php echo esc_attr( $hover_animation ); ?> envo-extra-align-icon-<?php echo ( 'left' === $settings[ 'icon_align' ] ) ? 'left' : 'right'; ?>">
<span class="envo-extra-elementor-button-inner">
<?php if ( $settings[ 'icon' ][ 'value' ] ) { ?>
<span class="envo-extra-elementor-button-media"><?php Icons_Manager::render_icon( $settings[ 'icon' ], array( 'aria-hidden' => 'true' ) ); ?></span>
<?php } ?>
<span class="envo-extra-button-text"><?php echo esc_html( $settings[ 'text' ] ); ?></span>
</span>
</<?php echo esc_attr( $html_tag ); ?>>
<?php
}
}
@@ -0,0 +1,784 @@
<?php
use Elementor\Controls_Manager;
use Elementor\Group_Control_Background;
use Elementor\Group_Control_Border;
use Elementor\Group_Control_Box_Shadow;
use Elementor\Group_Control_Text_Shadow;
use Elementor\Group_Control_Typography;
use Elementor\Widget_Base;
if ( !defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
/**
* Elementor Addons
*
* Elementor widget.
*
* @since 1.0.0
*/
class Counter extends Widget_Base {
/**
* Get widget name.
*
* Retrieve image widget name.
*
* @return string Widget name.
* @since 1.0.0
* @access public
*
*/
public function get_name() {
return 'envo-extra-counter';
}
/**
* Get widget title.
*
* Retrieve image widget title.
*
* @return string Widget title.
* @since 1.0.0
* @access public
*
*/
public function get_title() {
return __( 'Counter', 'envo-extra' );
}
/**
* Get widget icon.
*
* Retrieve image widget icon.
*
* @return string Widget icon.
* @since 1.0.0
* @access public
*
*/
public function get_icon() {
return 'eicon-counter-circle';
}
/**
* Get widget categories.
*
* Retrieve the list of categories the image widget belongs to.
*
* Used to determine where to display the widget in the editor.
*
* @return array Widget categories.
* @since 1.0.0
* @access public
*
*/
public function get_categories() {
return array( 'envo-extra-widgets' );
}
/**
* Get widget keywords.
*
* Retrieve the list of keywords the widget belongs to.
*
* @return array Widget keywords.
* @since 1.0.0
* @access public
*
*/
public function get_keywords() {
return array( 'number', 'counter' );
}
/**
* Retrieve the list of style the widget depended on.
*
* Used to set style dependencies required to run the widget.
*
* @return array Widget style dependencies.
* @since 1.0.0
*
* @access public
*
*/
public function get_style_depends() {
return array( 'envo-extra-counter' );
}
/**
* Register widget controls.
*
* Adds different input fields to allow the user to change and customize the widget settings.
*
* @since 1.0.0
* @access protected
*/
protected function register_controls() {
$this->start_controls_section(
'section_counter', array(
'label' => __( 'General', 'envo-extra' ),
'tab' => Controls_Manager::TAB_CONTENT,
)
);
$this->add_control(
'value', array(
'label' => esc_html__( 'Counter Value', 'envo-extra' ),
'type' => Controls_Manager::NUMBER,
'min' => 1,
'max' => 10000,
'step' => 1,
'default' => 90,
'frontend_available' => true,
'dynamic' => array(
'active' => true,
),
)
);
$this->add_control(
'symbol', array(
'label' => __( 'Character', 'envo-extra' ),
'type' => Controls_Manager::TEXT,
'default' => __( 'K', 'envo-extra' ),
'frontend_available' => true,
'dynamic' => array(
'active' => true,
),
)
);
$this->add_control(
'title', array(
'label' => __( 'Title', 'envo-extra' ),
'type' => Controls_Manager::TEXT,
'label_block' => true,
'default' => __( 'Counter Title', 'envo-extra' ),
'placeholder' => __( 'Type Counter Title', 'envo-extra' ),
'dynamic' => array(
'active' => true,
),
)
);
$this->add_control(
'description', array(
'label' => esc_html__( 'Description', 'envo-extra' ),
'type' => Controls_Manager::TEXTAREA,
'rows' => 5,
'default' => __( 'Description Here', 'envo-extra' ),
'placeholder' => esc_html__( 'Type your description here', 'envo-extra' ),
'label_block' => true,
'dynamic' => array(
'active' => true,
),
)
);
$this->add_control(
'badge_text', array(
'label' => __( 'Badge Text', 'envo-extra' ),
'type' => Controls_Manager::TEXT,
'label_block' => true,
'placeholder' => __( 'Type Icon Badge Text', 'envo-extra' ),
'dynamic' => array(
'active' => true,
),
)
);
$this->add_control(
'link', array(
'label' => __( 'Box Link', 'envo-extra' ),
'separator' => 'before',
'type' => Controls_Manager::URL,
'placeholder' => 'https://example.com',
'dynamic' => array(
'active' => true,
),
)
);
$this->add_control(
'title_tag', array(
'label' => __( 'Title HTML Tag', 'envo-extra' ),
'type' => Controls_Manager::CHOOSE,
'separator' => 'before',
'options' => array(
'h1' => array(
'title' => __( 'H1', 'envo-extra' ),
'icon' => 'eicon-editor-h1',
),
'h2' => array(
'title' => __( 'H2', 'envo-extra' ),
'icon' => 'eicon-editor-h2',
),
'h3' => array(
'title' => __( 'H3', 'envo-extra' ),
'icon' => 'eicon-editor-h3',
),
'h4' => array(
'title' => __( 'H4', 'envo-extra' ),
'icon' => 'eicon-editor-h4',
),
'h5' => array(
'title' => __( 'H5', 'envo-extra' ),
'icon' => 'eicon-editor-h5',
),
'h6' => array(
'title' => __( 'H6', 'envo-extra' ),
'icon' => 'eicon-editor-h6',
),
),
'default' => 'h3',
'toggle' => false,
)
);
$this->add_responsive_control(
'align', array(
'label' => __( 'Alignment', 'envo-extra' ),
'type' => Controls_Manager::CHOOSE,
'options' => array(
'left' => array(
'title' => __( 'Left', 'envo-extra' ),
'icon' => 'eicon-h-align-left',
),
'center' => array(
'title' => __( 'Center', 'envo-extra' ),
'icon' => 'eicon-h-align-center',
),
'right' => array(
'title' => __( 'Right', 'envo-extra' ),
'icon' => 'eicon-h-align-right',
),
),
'selectors' => array(
'{{WRAPPER}} .envo-extra-counter-wrapper' => 'text-align: {{VALUE}};',
),
)
);
$this->end_controls_section();
//Styling Tab
$this->start_controls_section(
'section_style_counter', array(
'label' => __( 'Counter', 'envo-extra' ),
'tab' => Controls_Manager::TAB_STYLE,
)
);
$this->add_group_control(
Group_Control_Typography::get_type(), array(
'name' => 'counter_typography',
'label' => __( 'Typography', 'envo-extra' ),
'selector' => '{{WRAPPER}} .envo-extra-counter-item',
)
);
$this->add_responsive_control(
'counter_bg_size', array(
'label' => __( 'Background Size', 'envo-extra' ),
'type' => Controls_Manager::SLIDER,
'size_units' => array( 'px' ),
'range' => array(
'px' => array(
'min' => 5,
'max' => 500,
),
),
'selectors' => array(
'{{WRAPPER}} .envo-extra-counter-item' => 'height: {{SIZE}}{{UNIT}}; width: {{SIZE}}{{UNIT}};',
),
)
);
$this->add_responsive_control(
'counter_margin', array(
'label' => __( 'Margin', 'envo-extra' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => array( 'px', '%' ),
'selectors' => array(
'{{WRAPPER}} .envo-extra-counter-item' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
),
)
);
$this->add_group_control(
Group_Control_Border::get_type(), array(
'name' => 'counter_border',
'selector' => '{{WRAPPER}} .envo-extra-counter-item',
)
);
$this->add_responsive_control(
'counter_border_radius', array(
'label' => __( 'Border Radius', 'envo-extra' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => array( 'px', '%' ),
'selectors' => array(
'{{WRAPPER}} .envo-extra-counter-item' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
),
)
);
$this->add_group_control(
Group_Control_Box_Shadow::get_type(), array(
'name' => 'counter_shadow',
'exclude' => array(
'box_shadow_position',
),
'selector' => '{{WRAPPER}} .envo-extra-counter-item',
)
);
$this->start_controls_tabs( '_tabs_icon' );
$this->start_controls_tab(
'_tab_counter_normal', array(
'label' => __( 'Normal', 'envo-extra' ),
)
);
$this->add_control(
'counter_color', array(
'label' => __( 'Color', 'envo-extra' ),
'type' => Controls_Manager::COLOR,
'selectors' => array(
'{{WRAPPER}} .envo-extra-counter-item' => 'color: {{VALUE}};',
),
)
);
$this->add_group_control(
Group_Control_Background::get_type(), array(
'name' => 'counter_bg_color',
'types' => array( 'classic', 'gradient' ),
'exclude' => array( 'image' ),
'selector' => '{{WRAPPER}} .envo-extra-counter-item',
)
);
$this->end_controls_tab();
$this->start_controls_tab(
'_tab_button_hover', array(
'label' => __( 'Hover', 'envo-extra' ),
)
);
$this->add_control(
'counter_hover_color', array(
'label' => __( 'Color', 'envo-extra' ),
'type' => Controls_Manager::COLOR,
'selectors' => array(
'{{WRAPPER}}:hover .envo-extra-counter-item' => 'color: {{VALUE}};',
),
)
);
$this->add_group_control(
Group_Control_Background::get_type(), array(
'name' => 'counter_hover_bg_color',
'types' => array( 'classic', 'gradient' ),
'exclude' => array( 'image' ),
'selector' => '{{WRAPPER}}:hover .envo-extra-counter-item',
)
);
$this->add_control(
'counter_hover_border_color', array(
'label' => __( 'Border Color', 'envo-extra' ),
'type' => Controls_Manager::COLOR,
'selectors' => array(
'{{WRAPPER}}:hover .envo-extra-counter-item' => 'border-color: {{VALUE}};',
),
'condition' => array(
'counter_border_border!' => '',
),
)
);
$this->end_controls_tab();
$this->end_controls_tabs();
$this->end_controls_section();
$this->start_controls_section(
'section_style_title', array(
'label' => __( 'Title', 'envo-extra' ),
'tab' => Controls_Manager::TAB_STYLE,
'condition' => array(
'title!' => '',
),
)
);
$this->add_group_control(
Group_Control_Typography::get_type(), array(
'name' => 'title',
'selector' => '{{WRAPPER}} .envo-extra-counter-title',
)
);
$this->add_group_control(
Group_Control_Text_Shadow::get_type(), array(
'name' => 'title',
'selector' => '{{WRAPPER}} .envo-extra-counter-title',
)
);
$this->start_controls_tabs( 'tabs_title' );
$this->start_controls_tab(
'_tab_title_normal', array(
'label' => __( 'Normal', 'envo-extra' ),
)
);
$this->add_control(
'title_color', array(
'label' => __( 'Text Color', 'envo-extra' ),
'type' => Controls_Manager::COLOR,
'selectors' => array(
'{{WRAPPER}} .envo-extra-counter-title' => 'color: {{VALUE}};',
),
)
);
$this->end_controls_tab();
$this->start_controls_tab(
'tab_title_hover', array(
'label' => __( 'Hover', 'envo-extra' ),
)
);
$this->add_control(
'title_hover_color', array(
'label' => __( 'Text Color', 'envo-extra' ),
'type' => Controls_Manager::COLOR,
'selectors' => array(
'{{WRAPPER}}:hover .envo-extra-counter-title' => 'color: {{VALUE}};',
),
)
);
$this->end_controls_tab();
$this->end_controls_tabs();
$this->add_responsive_control(
'title_margin', array(
'label' => __( 'Margin', 'envo-extra' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => array( 'px', '%' ),
'selectors' => array(
'{{WRAPPER}} .envo-extra-counter-title' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
),
)
);
$this->end_controls_section();
//Description
$this->start_controls_section(
'section_style_description', array(
'label' => __( 'Description', 'envo-extra' ),
'tab' => Controls_Manager::TAB_STYLE,
'condition' => array(
'description!' => '',
),
)
);
$this->add_group_control(
Group_Control_Typography::get_type(), array(
'name' => 'description',
'selector' => '{{WRAPPER}} .envo-extra-counter-description',
)
);
$this->add_group_control(
Group_Control_Text_Shadow::get_type(), array(
'name' => 'description',
'selector' => '{{WRAPPER}} .envo-extra-counter-description',
)
);
$this->start_controls_tabs( 'tabs_description' );
$this->start_controls_tab(
'tab_description_normal', array(
'label' => __( 'Normal', 'envo-extra' ),
)
);
$this->add_control(
'description_color', array(
'label' => __( 'Text Color', 'envo-extra' ),
'type' => Controls_Manager::COLOR,
'selectors' => array(
'{{WRAPPER}} .envo-extra-counter-description' => 'color: {{VALUE}};',
),
)
);
$this->end_controls_tab();
$this->start_controls_tab(
'tab_description_hover', array(
'label' => __( 'Hover', 'envo-extra' ),
)
);
$this->add_control(
'description_hover_color', array(
'label' => __( 'Text Color', 'envo-extra' ),
'type' => Controls_Manager::COLOR,
'selectors' => array(
'{{WRAPPER}}:hover .envo-extra-counter-description' => 'color: {{VALUE}};',
),
)
);
$this->end_controls_tab();
$this->end_controls_tabs();
$this->add_responsive_control(
'description_margin', array(
'label' => __( 'Margin', 'envo-extra' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => array( 'px', '%' ),
'selectors' => array(
'{{WRAPPER}} .envo-extra-counter-description' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
),
)
);
$this->end_controls_section();
$this->start_controls_section(
'section_style_badge', array(
'label' => __( 'Badge', 'envo-extra' ),
'tab' => Controls_Manager::TAB_STYLE,
'condition' => array(
'badge_text!' => '',
),
)
);
$this->add_control(
'badge_position', array(
'label' => __( 'Position', 'envo-extra' ),
'type' => Controls_Manager::SELECT,
'options' => array(
'top-left' => __( 'Top Left', 'envo-extra' ),
'top-center' => __( 'Top Center', 'envo-extra' ),
'top-right' => __( 'Top Right', 'envo-extra' ),
'middle-left' => __( 'Middle Left', 'envo-extra' ),
'middle-center' => __( 'Middle Center', 'envo-extra' ),
'middle-right' => __( 'Middle Right', 'envo-extra' ),
'bottom-left' => __( 'Bottom Left', 'envo-extra' ),
'bottom-center' => __( 'Bottom Center', 'envo-extra' ),
'bottom-right' => __( 'Bottom Right', 'envo-extra' ),
),
'default' => 'top-right',
)
);
$this->add_group_control(
Group_Control_Typography::get_type(), array(
'name' => 'badge_typography',
'label' => __( 'Typography', 'envo-extra' ),
'selector' => '{{WRAPPER}} .envo-extra-badge',
)
);
$this->add_control(
'badge_offset_toggle', array(
'label' => __( 'Offset', 'envo-extra' ),
'type' => Controls_Manager::POPOVER_TOGGLE,
'label_off' => __( 'None', 'envo-extra' ),
'label_on' => __( 'Custom', 'envo-extra' ),
'return_value' => 'yes',
)
);
$this->start_popover();
$this->add_responsive_control(
'badge_offset_x', array(
'label' => __( 'Offset Left', 'envo-extra' ),
'type' => Controls_Manager::SLIDER,
'size_units' => array( 'px', '%' ),
'condition' => array(
'badge_offset_toggle' => 'yes',
),
'default' => array(
'unit' => 'px',
),
'range' => array(
'px' => array(
'min' => - 1000,
'max' => 1000,
),
'%' => array(
'min' => - 100,
'max' => 100,
),
),
'selectors' => array(
'{{WRAPPER}} .envo-extra-badge' => '--envo-extra-badge-translate-x: {{SIZE}}{{UNIT}};',
),
)
);
$this->add_responsive_control(
'badge_offset_y', array(
'label' => __( 'Offset Top', 'envo-extra' ),
'type' => Controls_Manager::SLIDER,
'size_units' => array( 'px', '%' ),
'condition' => array(
'badge_offset_toggle' => 'yes',
),
'default' => array(
'unit' => 'px',
),
'range' => array(
'px' => array(
'min' => - 1000,
'max' => 1000,
),
'%' => array(
'min' => - 100,
'max' => 100,
),
),
'selectors' => array(
'{{WRAPPER}} .envo-extra-badge' => '--envo-extra-badge-translate-y: {{SIZE}}{{UNIT}};',
),
)
);
$this->end_popover();
$this->add_responsive_control(
'badge_padding', array(
'label' => __( 'Padding', 'envo-extra' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => array( 'px', '%', 'em' ),
'selectors' => array(
'{{WRAPPER}} .envo-extra-badge' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
),
)
);
$this->add_control(
'badge_color', array(
'label' => __( 'Text Color', 'envo-extra' ),
'type' => Controls_Manager::COLOR,
'selectors' => array(
'{{WRAPPER}} .envo-extra-badge' => 'color: {{VALUE}};',
),
)
);
$this->add_control(
'badge_bg_color', array(
'label' => __( 'Background Color', 'envo-extra' ),
'type' => Controls_Manager::COLOR,
'selectors' => array(
'{{WRAPPER}} .envo-extra-badge' => 'background-color: {{VALUE}};',
),
)
);
$this->add_group_control(
Group_Control_Border::get_type(), array(
'name' => 'badge_border',
'selector' => '{{WRAPPER}} .envo-extra-badge',
)
);
$this->add_responsive_control(
'badge_border_radius', array(
'label' => __( 'Border Radius', 'envo-extra' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => array( 'px', '%' ),
'selectors' => array(
'{{WRAPPER}} .envo-extra-badge' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
),
)
);
$this->add_group_control(
Group_Control_Box_Shadow::get_type(), array(
'name' => 'badge_box_shadow',
'exclude' => array(
'box_shadow_position',
),
'selector' => '{{WRAPPER}} .envo-extra-badge',
)
);
$this->end_controls_section();
}
/**
* Render image widget output on the frontend.
*
* Written in PHP and used to generate the final HTML.
*
* @since 1.0.0
* @access protected
*/
protected function render() {
$settings = $this->get_settings_for_display();
$this->add_inline_editing_attributes( 'title', 'basic' );
$this->add_render_attribute( 'title', 'class', 'envo-extra-counter-title' );
$this->add_inline_editing_attributes( 'description', 'basic' );
$this->add_render_attribute( 'description', 'class', 'envo-extra-counter-description' );
$this->add_inline_editing_attributes( 'badge_text', 'none' );
$this->add_render_attribute( 'badge_text', 'class', 'envo-extra-badge envo-extra-badge-' . $settings[ 'badge_position' ] );
$html_tag = ( $settings[ 'link' ][ 'url' ] ) ? 'a' : 'div';
$attr = $settings[ 'link' ][ 'url' ] ? ' href="' . $settings[ 'link' ][ 'url' ] . '"' : '';
$attr .= $settings[ 'link' ][ 'is_external' ] ? ' target="_blank"' : '';
$attr .= $settings[ 'link' ][ 'nofollow' ] ? ' rel="nofollow"' : '';
?>
<<?php echo esc_attr( $html_tag ); ?> <?php echo wp_kses_data( $attr ); ?> class="envo-extra-counter-wrapper">
<div class="envo-extra-counter-wrapper-inner">
<?php if ( $settings[ 'badge_text' ] ) : ?>
<div <?php $this->print_render_attribute_string( 'badge_text' ); ?>><?php echo esc_html( $settings[ 'badge_text' ] ); ?></div>
<?php endif; ?>
<?php if ( !empty( $settings[ 'value' ] ) ) : ?>
<div class="envo-extra-counter-item"><?php echo esc_html( $settings[ 'value' ] ); ?><?php echo esc_html( $settings[ 'symbol' ] ); ?></div>
<?php endif; ?>
<div class="envo-extra-counter-content">
<?php
if ( $settings[ 'title' ] ) :
printf( '<%1$s %2$s>%3$s</%1$s>', tag_escape( $settings[ 'title_tag' ] ), $this->get_render_attribute_string( 'title' ), $settings[ 'title' ] ); //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
endif;
if ( $settings[ 'description' ] ) :
?>
<p <?php $this->print_render_attribute_string( 'description' ); ?>><?php echo esc_html( $settings[ 'description' ] ); ?></p>
<?php endif; ?>
</div>
</div>
</<?php echo esc_attr( $html_tag ); ?>>
<?php
}
}
@@ -0,0 +1,560 @@
<?php
use Elementor\Controls_Manager;
use Elementor\Group_Control_Background;
use Elementor\Group_Control_Border;
use Elementor\Group_Control_Text_Shadow;
use Elementor\Group_Control_Typography;
use Elementor\Widget_Base;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
/**
* Elementor Addons
*
* Elementor widget.
*
* @since 1.0.0
*/
class Heading extends Widget_Base {
/**
* Get widget name.
*
* Retrieve image widget name.
*
* @return string Widget name.
* @since 1.0.0
* @access public
*
*/
public function get_name() {
return 'envo-extra-heading';
}
/**
* Get widget title.
*
* Retrieve image widget title.
*
* @return string Widget title.
* @since 1.0.0
* @access public
*
*/
public function get_title() {
return __( 'Heading', 'envo-extra' );
}
/**
* Get widget icon.
*
* Retrieve image widget icon.
*
* @return string Widget icon.
* @since 1.0.0
* @access public
*
*/
public function get_icon() {
return 'eicon-heading';
}
/**
* Get widget categories.
*
* Retrieve the list of categories the image widget belongs to.
*
* Used to determine where to display the widget in the editor.
*
* @return array Widget categories.
* @since 1.0.0
* @access public
*
*/
public function get_categories() {
return array( 'envo-extra-widgets' );
}
/**
* Get widget keywords.
*
* Retrieve the list of keywords the widget belongs to.
*
* @return array Widget keywords.
* @since 1.0.0
* @access public
*
*/
public function get_keywords() {
return array( 'heading', 'masking' );
}
/**
* Retrieve the list of style the widget depended on.
*
* Used to set style dependencies required to run the widget.
*
* @return array Widget style dependencies.
* @since 1.0.0
*
* @access public
*
*/
public function get_style_depends() {
return array( 'envo-extra-heading' );
}
public function render_title() {
$settings = $this->get_settings_for_display();
$target = $settings['title_link']['is_external'] ? ' target="_blank"' : '';
$nofollow = $settings['title_link']['nofollow'] ? ' rel="nofollow"' : '';
$title = $settings['title_before'] . ( ( ! empty( $settings['title_center'] ) ) ? ' <span class="envo-extra-title-focus">' . $settings['title_center'] . '</span>' : '' ) . ' ' . $settings['title_after'];
$html = '';
if ( ! empty( $settings['title_link']['url'] ) ) {
$html .= '<a href="' . esc_url( $settings['title_link']['url'] ) . '"' . esc_attr( $target ) . esc_attr( $nofollow ) . '>';
}
$html .= '<' . esc_attr( $settings['title_tag'] ) . ' class="envo-extra-heading-title">';
$html .= wp_kses_post( $title );
$html .= '</' . esc_attr( $settings['title_tag'] ) . '>';
if ( ! empty( $settings['title_link']['url'] ) ) {
$html .= '</a>';
}
return $html;
}
/**
* Register widget controls.
*
* Adds different input fields to allow the user to change and customize the widget settings.
*
* @since 1.0.0
* @access protected
*/
protected function register_controls() {
$this->start_controls_section(
'section_title',
array(
'label' => __( 'Title', 'envo-extra' ),
)
);
$this->add_control(
'title_before',
array(
'label' => __( 'Title Before', 'envo-extra' ),
'type' => Controls_Manager::TEXT,
'default' => __( 'Your', 'envo-extra' ),
'label_block' => true,
'dynamic' => array(
'active' => true,
),
)
);
$this->add_control(
'title_center',
array(
'label' => __( 'Title Center', 'envo-extra' ),
'type' => Controls_Manager::TEXT,
'default' => __( 'Simple', 'envo-extra' ),
'label_block' => true,
'dynamic' => array(
'active' => true,
),
)
);
$this->add_control(
'title_after',
array(
'label' => __( 'Title After', 'envo-extra' ),
'type' => Controls_Manager::TEXT,
'default' => __( 'Heading', 'envo-extra' ),
'label_block' => true,
'dynamic' => array(
'active' => true,
),
)
);
$this->add_control(
'title_link',
array(
'label' => __( 'Link', 'envo-extra' ),
'type' => Controls_Manager::URL,
'placeholder' => 'https://example.com',
'dynamic' => array(
'active' => true,
),
)
);
$this->add_control(
'title_tag',
array(
'label' => __( 'HTML Tag', 'envo-extra' ),
'type' => Controls_Manager::CHOOSE,
'options' => array(
'h1' => array(
'title' => __( 'H1', 'envo-extra' ),
'icon' => 'eicon-editor-h1',
),
'h2' => array(
'title' => __( 'H2', 'envo-extra' ),
'icon' => 'eicon-editor-h2',
),
'h3' => array(
'title' => __( 'H3', 'envo-extra' ),
'icon' => 'eicon-editor-h3',
),
'h4' => array(
'title' => __( 'H4', 'envo-extra' ),
'icon' => 'eicon-editor-h4',
),
'h5' => array(
'title' => __( 'H5', 'envo-extra' ),
'icon' => 'eicon-editor-h5',
),
'h6' => array(
'title' => __( 'H6', 'envo-extra' ),
'icon' => 'eicon-editor-h6',
),
),
'default' => 'h2',
'toggle' => false,
)
);
$this->add_responsive_control(
'box_align',
array(
'label' => __( 'Alignment', 'envo-extra' ),
'type' => Controls_Manager::CHOOSE,
'options' => array(
'left' => array(
'title' => __( 'Left', 'envo-extra' ),
'icon' => 'eicon-h-align-left',
),
'center' => array(
'title' => __( 'Center', 'envo-extra' ),
'icon' => 'eicon-h-align-center',
),
'right' => array(
'title' => __( 'Right', 'envo-extra' ),
'icon' => 'eicon-h-align-right',
),
),
'toggle' => true,
'selectors' => array(
'{{WRAPPER}} .envo-extra-simple-heading-wrapper' => 'text-align: {{VALUE}};',
),
)
);
$this->end_controls_section();
//Title Style
$this->start_controls_section(
'section_style_title',
array(
'label' => __( 'Title', 'envo-extra' ),
'tab' => Controls_Manager::TAB_STYLE,
)
);
$this->add_group_control(
Group_Control_Typography::get_type(),
array(
'name' => 'title_typography',
'label' => __( 'Typography', 'envo-extra' ),
'selector' => '{{WRAPPER}} .envo-extra-heading-title',
)
);
$this->add_control(
'title_text_color', array(
'label' => __( 'Text Color', 'envo-extra' ),
'type' => Controls_Manager::COLOR,
'selectors' => array(
'{{WRAPPER}} .envo-extra-heading-title' => 'color: {{VALUE}};',
),
)
);
$this->add_control(
'title_stroke',
array(
'label' => __( 'Text Stroke', 'envo-extra' ),
'type' => Controls_Manager::POPOVER_TOGGLE,
'label_off' => __( 'None', 'envo-extra' ),
'label_on' => __( 'Custom', 'envo-extra' ),
'return_value' => 'yes',
)
);
$this->start_popover();
$this->add_control(
'stroke_width',
array(
'label' => __( 'Stroke Width', 'envo-extra' ),
'type' => Controls_Manager::SLIDER,
'size_units' => array( 'px', 'em', 'rem' ),
'range' => array(
'px' => array(
'min' => 0,
'max' => 10,
'step' => 1,
),
),
'default' => array(
'unit' => 'px',
'size' => 1,
),
'selectors' => array(
'{{WRAPPER}} .envo-extra-heading-title' => '-webkit-text-stroke-width: {{SIZE}}{{UNIT}};',
),
'condition' => array(
'title_stroke' => 'yes',
),
)
);
$this->add_control(
'stroke_color',
array(
'label' => __( 'Stroke Color', 'envo-extra' ),
'type' => Controls_Manager::COLOR,
'selectors' => array(
'{{WRAPPER}} .envo-extra-heading-title' => '-webkit-text-stroke-color: {{VALUE}};',
),
'condition' => array(
'title_stroke' => 'yes',
),
)
);
$this->end_popover();
$this->add_group_control(
Group_Control_Text_Shadow::get_type(),
array(
'name' => 'text_shadow',
'selector' => '{{WRAPPER}} .envo-extra-heading-title',
)
);
$this->add_control(
'blend_mode',
array(
'label' => esc_html__( 'Blend Mode', 'envo-extra' ),
'type' => Controls_Manager::SELECT,
'options' => array(
'' => esc_html__( 'Normal', 'envo-extra' ),
'multiply' => 'Multiply',
'screen' => 'Screen',
'overlay' => 'Overlay',
'darken' => 'Darken',
'lighten' => 'Lighten',
'color-dodge' => 'Color Dodge',
'saturation' => 'Saturation',
'color' => 'Color',
'difference' => 'Difference',
'exclusion' => 'Exclusion',
'hue' => 'Hue',
'luminosity' => 'Luminosity',
),
'selectors' => array(
'{{WRAPPER}} .envo-extra-heading-title' => 'mix-blend-mode: {{VALUE}}',
),
'separator' => 'none',
)
);
$this->end_controls_section();
//Center Title Style
$this->start_controls_section(
'section_style_center_title',
array(
'label' => __( 'Center Title', 'envo-extra' ),
'tab' => Controls_Manager::TAB_STYLE,
)
);
$this->add_group_control(
Group_Control_Typography::get_type(),
array(
'name' => 'center_title_typography',
'label' => __( 'Typography', 'envo-extra' ),
'selector' => '{{WRAPPER}} .envo-extra-title-focus',
)
);
$this->add_control(
'center_text_color', array(
'label' => __( 'Text Color', 'envo-extra' ),
'type' => Controls_Manager::COLOR,
'selectors' => array(
'{{WRAPPER}} .envo-extra-title-focus' => 'color: {{VALUE}};',
),
)
);
$this->add_control(
'center_title_stroke',
array(
'label' => __( 'Text Stroke', 'envo-extra' ),
'type' => Controls_Manager::POPOVER_TOGGLE,
'label_off' => __( 'None', 'envo-extra' ),
'label_on' => __( 'Custom', 'envo-extra' ),
'return_value' => 'yes',
)
);
$this->start_popover();
$this->add_control(
'center_stroke_width',
array(
'label' => __( 'Stroke Width', 'envo-extra' ),
'type' => Controls_Manager::SLIDER,
'size_units' => array( 'px', 'em', 'rem' ),
'range' => array(
'px' => array(
'min' => 0,
'max' => 10,
'step' => 1,
),
),
'default' => array(
'unit' => 'px',
'size' => 1,
),
'selectors' => array(
'{{WRAPPER}} .envo-extra-title-focus' => '-webkit-text-stroke-width: {{SIZE}}{{UNIT}};',
),
'condition' => array(
'center_title_stroke' => 'yes',
),
)
);
$this->add_control(
'center_stroke_color',
array(
'label' => __( 'Stroke Color', 'envo-extra' ),
'type' => Controls_Manager::COLOR,
'selectors' => array(
'{{WRAPPER}} .envo-extra-title-focus' => '-webkit-text-stroke-color: {{VALUE}};',
),
'condition' => array(
'center_title_stroke' => 'yes',
),
)
);
$this->end_popover();
$this->add_group_control(
Group_Control_Text_Shadow::get_type(),
array(
'name' => 'center_title_text_shadow',
'selector' => '{{WRAPPER}} .envo-extra-title-focus',
)
);
$this->add_control(
'center_title_blend_mode',
array(
'label' => esc_html__( 'Blend Mode', 'envo-extra' ),
'type' => Controls_Manager::SELECT,
'options' => array(
'' => esc_html__( 'Normal', 'envo-extra' ),
'multiply' => 'Multiply',
'screen' => 'Screen',
'overlay' => 'Overlay',
'darken' => 'Darken',
'lighten' => 'Lighten',
'color-dodge' => 'Color Dodge',
'saturation' => 'Saturation',
'color' => 'Color',
'difference' => 'Difference',
'exclusion' => 'Exclusion',
'hue' => 'Hue',
'luminosity' => 'Luminosity',
),
'selectors' => array(
'{{WRAPPER}} .envo-extra-title-focus' => 'mix-blend-mode: {{VALUE}}',
),
'separator' => 'none',
)
);
$this->add_group_control(
Group_Control_Border::get_type(),
array(
'name' => 'center_title_border',
'label' => __( 'Border', 'envo-extra' ),
'selector' => '{{WRAPPER}} .envo-extra-title-focus',
)
);
$this->add_responsive_control(
'center_title_border_radius',
array(
'label' => __( 'Border Radius', 'envo-extra' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => array( 'px', '%' ),
'selectors' => array(
'{{WRAPPER}} .envo-extra-title-focus' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
),
)
);
$this->add_responsive_control(
'center_title_padding',
array(
'label' => __( 'Padding', 'envo-extra' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => array( 'px', '%', 'em' ),
'selectors' => array(
'{{WRAPPER}} .envo-extra-title-focus' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
),
)
);
$this->end_controls_section();
}
/**
* Render image widget output on the frontend.
*
* Written in PHP and used to generate the final HTML.
*
* @since 1.0.0
* @access protected
*/
protected function render() {
$settings = $this->get_settings_for_display();
?>
<div class="envo-extra-heading-wrapper envo-extra-simple-heading-wrapper">
<?php echo $this->render_title() // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
</div>
<?php
}
}
@@ -0,0 +1,950 @@
<?php
use Elementor\Controls_Manager;
use Elementor\Group_Control_Background;
use Elementor\Group_Control_Border;
use Elementor\Group_Control_Box_Shadow;
use Elementor\Group_Control_Image_Size;
use Elementor\Group_Control_Text_Shadow;
use Elementor\Group_Control_Typography;
use Elementor\Utils;
use Elementor\Widget_Base;
use Elementor\Icons_Manager;
if ( !defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
/**
* Elementor Addons
*
* Elementor widget.
*
* @since 1.0.0
*/
class Icon_Box extends Widget_Base {
/**
* Get widget name.
*
* Retrieve image widget name.
*
* @return string Widget name.
* @since 1.0.0
* @access public
*
*/
public function get_name() {
return 'envo-extra-icon-box';
}
/**
* Get widget title.
*
* Retrieve image widget title.
*
* @return string Widget title.
* @since 1.0.0
* @access public
*
*/
public function get_title() {
return __( 'Icon Box', 'envo-extra' );
}
/**
* Get widget icon.
*
* Retrieve image widget icon.
*
* @return string Widget icon.
* @since 1.0.0
* @access public
*
*/
public function get_icon() {
return 'eicon-icon-box';
}
/**
* Get widget categories.
*
* Retrieve the list of categories the image widget belongs to.
*
* Used to determine where to display the widget in the editor.
*
* @return array Widget categories.
* @since 1.0.0
* @access public
*
*/
public function get_categories() {
return array( 'envo-extra-widgets' );
}
/**
* Get widget keywords.
*
* Retrieve the list of keywords the widget belongs to.
*
* @return array Widget keywords.
* @since 1.0.0
* @access public
*
*/
public function get_keywords() {
return array( 'icon', 'icon-box' );
}
/**
* Retrieve the list of style the widget depended on.
*
* Used to set style dependencies required to run the widget.
*
* @return array Widget style dependencies.
* @since 1.0.0
*
* @access public
*
*/
public function get_style_depends() {
return array( 'animate', 'envo-extra-icon-box' );
}
/**
* Register widget controls.
*
* Adds different input fields to allow the user to change and customize the widget settings.
*
* @since 1.0.0
* @access protected
*/
protected function register_controls() {
$this->start_controls_section(
'section_icon', array(
'label' => __( 'Content', 'envo-extra' ),
'tab' => Controls_Manager::TAB_CONTENT,
)
);
$this->add_control(
'media_type', array(
'label' => __( 'Media Type', 'envo-extra' ),
'type' => Controls_Manager::CHOOSE,
'label_block' => false,
'options' => array(
'icon' => array(
'title' => __( 'Icon', 'envo-extra' ),
'icon' => 'eicon-star-o',
),
'image' => array(
'title' => __( 'Image', 'envo-extra' ),
'icon' => 'eicon-image',
),
),
'default' => 'icon',
'toggle' => false,
)
);
$this->add_control(
'icon', array(
'show_label' => false,
'type' => Controls_Manager::ICONS,
'label_block' => true,
'default' => array(
'value' => 'fas fa-fingerprint',
'library' => 'fa-solid',
),
'condition' => array(
'media_type' => 'icon',
),
)
);
$this->add_control(
'image', array(
'label' => __( 'Image', 'envo-extra' ),
'type' => Controls_Manager::MEDIA,
'default' => array(
'url' => Utils::get_placeholder_image_src(),
),
'condition' => array(
'media_type' => 'image',
),
'dynamic' => array(
'active' => true,
),
)
);
$this->add_group_control(
Group_Control_Image_Size::get_type(), array(
'name' => 'media_thumbnail',
'default' => 'full',
'separator' => 'none',
'exclude' => array(
'custom',
),
'condition' => array(
'media_type' => 'image',
),
)
);
$this->add_control(
'title', array(
'label' => __( 'Title', 'envo-extra' ),
'type' => Controls_Manager::TEXT,
'label_block' => true,
'default' => __( 'Icon Box', 'envo-extra' ),
'placeholder' => __( 'Type Icon Box Title', 'envo-extra' ),
'dynamic' => array(
'active' => true,
),
)
);
$this->add_control(
'description', array(
'label' => esc_html__( 'Description', 'envo-extra' ),
'type' => Controls_Manager::TEXTAREA,
'rows' => 5,
'placeholder' => esc_html__( 'Type your description here', 'envo-extra' ),
'label_block' => true,
'dynamic' => array(
'active' => true,
),
)
);
$this->add_control(
'badge_text', array(
'label' => __( 'Badge Text', 'envo-extra' ),
'type' => Controls_Manager::TEXT,
'label_block' => true,
'placeholder' => __( 'Type Icon Badge Text', 'envo-extra' ),
'dynamic' => array(
'active' => true,
),
)
);
$this->add_control(
'link', array(
'label' => __( 'Box Link', 'envo-extra' ),
'separator' => 'before',
'type' => Controls_Manager::URL,
'placeholder' => 'https://example.com',
'dynamic' => array(
'active' => true,
),
)
);
$this->add_control(
'title_tag', array(
'label' => __( 'Title HTML Tag', 'envo-extra' ),
'type' => Controls_Manager::CHOOSE,
'separator' => 'before',
'options' => array(
'h1' => array(
'title' => __( 'H1', 'envo-extra' ),
'icon' => 'eicon-editor-h1',
),
'h2' => array(
'title' => __( 'H2', 'envo-extra' ),
'icon' => 'eicon-editor-h2',
),
'h3' => array(
'title' => __( 'H3', 'envo-extra' ),
'icon' => 'eicon-editor-h3',
),
'h4' => array(
'title' => __( 'H4', 'envo-extra' ),
'icon' => 'eicon-editor-h4',
),
'h5' => array(
'title' => __( 'H5', 'envo-extra' ),
'icon' => 'eicon-editor-h5',
),
'h6' => array(
'title' => __( 'H6', 'envo-extra' ),
'icon' => 'eicon-editor-h6',
),
),
'default' => 'h3',
'toggle' => false,
)
);
$this->add_responsive_control(
'layout', array(
'label' => __( 'Layout', 'envo-extra' ),
'type' => Controls_Manager::CHOOSE,
'options' => array(
'inline-flex' => array(
'title' => __( 'Inline', 'envo-extra' ),
'icon' => 'eicon-ellipsis-h',
),
'inline-block' => array(
'title' => __( 'Block', 'envo-extra' ),
'icon' => 'eicon-menu-bar',
),
),
'selectors' => array(
'{{WRAPPER}} .envo-extra-box-icon-wrapper-inner' => 'display: {{VALUE}};',
),
)
);
$this->add_responsive_control(
'align', array(
'label' => __( 'Alignment', 'envo-extra' ),
'type' => Controls_Manager::CHOOSE,
'options' => array(
'left' => array(
'title' => __( 'Left', 'envo-extra' ),
'icon' => 'eicon-h-align-left',
),
'center' => array(
'title' => __( 'Center', 'envo-extra' ),
'icon' => 'eicon-h-align-center',
),
'right' => array(
'title' => __( 'Right', 'envo-extra' ),
'icon' => 'eicon-h-align-right',
),
),
'prefix_class' => 'envo-extra-content-align%s',
'selectors' => array(
'{{WRAPPER}} .envo-extra-box-icon-wrapper' => 'text-align: {{VALUE}};',
),
)
);
$this->end_controls_section();
//Styling Tab
$this->start_controls_section(
'section_style_icon', array(
'label' => __( 'Icon', 'envo-extra' ),
'tab' => Controls_Manager::TAB_STYLE,
)
);
$this->add_responsive_control(
'icon_size', array(
'label' => __( 'Size', 'envo-extra' ),
'type' => Controls_Manager::SLIDER,
'size_units' => array( 'px' ),
'range' => array(
'px' => array(
'min' => 5,
'max' => 300,
),
),
'default' => array(
'unit' => 'px',
'size' => 40,
),
'selectors' => array(
'{{WRAPPER}} .envo-extra-box-icon-item' => 'font-size: {{SIZE}}{{UNIT}}; min-width: {{SIZE}}{{UNIT}}; min-height: {{SIZE}}{{UNIT}};',
'{{WRAPPER}} .envo-extra-box-icon-item > svg,{{WRAPPER}} .envo-extra-box-icon-item > img' => 'width: {{SIZE}}{{UNIT}};',
),
)
);
$this->add_responsive_control(
'icon_bg_size', array(
'label' => __( 'Background Size', 'envo-extra' ),
'type' => Controls_Manager::SLIDER,
'size_units' => array( 'px' ),
'range' => array(
'px' => array(
'min' => 5,
'max' => 500,
),
),
'default' => array(
'unit' => 'px',
'size' => 50,
),
'selectors' => array(
'{{WRAPPER}} .envo-extra-box-icon-item' => 'height: {{SIZE}}{{UNIT}}; width: {{SIZE}}{{UNIT}};',
),
'condition' => array(
'media_type' => 'icon',
),
)
);
$this->add_responsive_control(
'image_height', array(
'label' => __( 'Height', 'envo-extra' ),
'type' => Controls_Manager::SLIDER,
'default' => array(
'unit' => 'px',
),
'tablet_default' => array(
'unit' => 'px',
),
'mobile_default' => array(
'unit' => 'px',
),
'size_units' => array( 'px', 'vh' ),
'range' => array(
'px' => array(
'min' => 1,
'max' => 500,
),
'vh' => array(
'min' => 1,
'max' => 100,
),
),
'condition' => array(
'media_type' => 'image',
),
'selectors' => array(
'{{WRAPPER}} .envo-extra-box-icon-item > img' => 'height: {{SIZE}}{{UNIT}};',
),
)
);
$this->add_responsive_control(
'object-fit', array(
'label' => __( 'Object Fit', 'envo-extra' ),
'type' => Controls_Manager::SELECT,
'options' => array(
'' => __( 'Default', 'envo-extra' ),
'fill' => __( 'Fill', 'envo-extra' ),
'cover' => __( 'Cover', 'envo-extra' ),
'contain' => __( 'Contain', 'envo-extra' ),
),
'default' => '',
'condition' => array(
'media_type' => 'image',
'image_height[size]!' => '',
),
'selectors' => array(
'{{WRAPPER}} .envo-extra-box-icon-item > img' => 'object-fit: {{VALUE}};',
),
)
);
$this->add_control(
'icon_vertical_align', array(
'label' => __( 'Vertical Align', 'envo-extra' ),
'type' => Controls_Manager::CHOOSE,
'options' => array(
'flex-start' => array(
'title' => __( 'Start', 'envo-extra' ),
'icon' => 'eicon-v-align-top',
),
'center' => array(
'title' => __( 'Center', 'envo-extra' ),
'icon' => 'eicon-v-align-middle',
),
'flex-end' => array(
'title' => __( 'End', 'envo-extra' ),
'icon' => 'eicon-v-align-bottom',
),
),
'condition' => array(
'layout' => 'inline-flex',
),
'selectors' => array(
'{{WRAPPER}} .envo-extra-box-icon-wrapper-inner' => 'align-items: {{VALUE}};',
),
)
);
$this->add_responsive_control(
'icon_margin', array(
'label' => __( 'Margin', 'envo-extra' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => array( 'px', '%' ),
'selectors' => array(
'{{WRAPPER}} .envo-extra-box-icon-item' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
),
)
);
$this->add_group_control(
Group_Control_Border::get_type(), array(
'name' => 'icon_border',
'selector' => '{{WRAPPER}} .envo-extra-box-icon-item',
)
);
$this->add_responsive_control(
'icon_border_radius', array(
'label' => __( 'Border Radius', 'envo-extra' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => array( 'px', '%' ),
'selectors' => array(
'{{WRAPPER}} .envo-extra-box-icon-item' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
),
)
);
$this->add_responsive_control(
'icon_padding', array(
'label' => __( 'Padding', 'envo-extra' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => array( 'px', '%' ),
'condition' => array(
'media_type' => 'image',
),
'selectors' => array(
'{{WRAPPER}} .envo-extra-box-icon-item' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
),
)
);
$this->add_group_control(
Group_Control_Box_Shadow::get_type(), array(
'name' => 'icon_shadow',
'exclude' => array(
'box_shadow_position',
),
'selector' => '{{WRAPPER}} .envo-extra-box-icon-item',
)
);
$this->start_controls_tabs( '_tabs_icon' );
$this->start_controls_tab(
'_tab_icon_normal', array(
'label' => __( 'Normal', 'envo-extra' ),
)
);
$this->add_control(
'icon_color', array(
'label' => __( 'Color', 'envo-extra' ),
'type' => Controls_Manager::COLOR,
'selectors' => array(
'{{WRAPPER}} .envo-extra-box-icon-item' => 'color: {{VALUE}};',
'{{WRAPPER}} .envo-extra-box-icon-item > svg' => 'fill: {{VALUE}};',
),
)
);
$this->add_group_control(
Group_Control_Background::get_type(), array(
'name' => 'icon_bg_color',
'label' => __( 'Background', 'envo-extra' ),
'types' => array( 'classic', 'gradient' ),
'exclude' => array( 'image' ),
'selector' => '{{WRAPPER}} .envo-extra-box-icon-item',
)
);
$this->end_controls_tab();
$this->start_controls_tab(
'_tab_icon_hover', array(
'label' => __( 'Hover', 'envo-extra' ),
)
);
$this->add_control(
'icon_hover_color', array(
'label' => __( 'Color', 'envo-extra' ),
'type' => Controls_Manager::COLOR,
'selectors' => array(
'{{WRAPPER}}:hover .envo-extra-box-icon-item' => 'color: {{VALUE}};',
'{{WRAPPER}}:hover .envo-extra-box-icon-item > svg' => 'fill: {{VALUE}};',
),
)
);
$this->add_group_control(
Group_Control_Background::get_type(), array(
'name' => 'icon_hover_bg_color',
'label' => __( 'Background', 'envo-extra' ),
'types' => array( 'classic', 'gradient' ),
'exclude' => array( 'image' ),
'selector' => '{{WRAPPER}}:hover .envo-extra-box-icon-item',
)
);
$this->add_control(
'icon_hover_border_color', array(
'label' => __( 'Border Color', 'envo-extra' ),
'type' => Controls_Manager::COLOR,
'selectors' => array(
'{{WRAPPER}}:hover .envo-extra-box-icon-item' => 'border-color: {{VALUE}};',
),
'condition' => array(
'icon_border_border!' => '',
),
)
);
$this->add_control(
'icon_hover_animation', array(
'label' => __( 'Animation', 'envo-extra' ),
'type' => Controls_Manager::SELECT,
'default' => '',
'options' => array(
'' => __( 'None', 'envo-extra' ),
'fadeIn' => __( 'FadeIn', 'envo-extra' ),
'bounce' => __( 'Bounce', 'envo-extra' ),
'bounceIn' => __( 'BounceIn', 'envo-extra' ),
'bounceOut' => __( 'BounceOut', 'envo-extra' ),
'flash' => __( 'Flash', 'envo-extra' ),
'pulse' => __( 'Pulse', 'envo-extra' ),
'rubberBand' => __( 'Rubber', 'envo-extra' ),
'shake' => __( 'Shake', 'envo-extra' ),
'swing' => __( 'Swing', 'envo-extra' ),
'tada' => __( 'Tada', 'envo-extra' ),
'wobble' => __( 'Wobble', 'envo-extra' ),
'flipInX' => __( 'Flip X', 'envo-extra' ),
'flipInY' => __( 'Flip Y', 'envo-extra' ),
),
'frontend_available' => true,
'render_type' => 'template',
)
);
$this->add_control(
'icon_hover_transition', array(
'label' => __( 'Transition Duration', 'envo-extra' ),
'type' => Controls_Manager::SLIDER,
'range' => array(
'px' => array(
'max' => 3,
'step' => 0.1,
),
),
'selectors' => array(
'{{WRAPPER}} .envo-extra-box-icon-item' => 'animation-duration: {{SIZE}}s; transition-duration: {{SIZE}}s;',
),
)
);
$this->end_controls_tab();
$this->end_controls_tabs();
$this->end_controls_section();
$this->start_controls_section(
'section_style_title', array(
'label' => __( 'Title', 'envo-extra' ),
'tab' => Controls_Manager::TAB_STYLE,
'condition' => array(
'title!' => '',
),
)
);
$this->add_group_control(
Group_Control_Typography::get_type(), array(
'name' => 'title',
'selector' => '{{WRAPPER}} .envo-extra-box-icon-title',
)
);
$this->add_group_control(
Group_Control_Text_Shadow::get_type(), array(
'name' => 'title',
'selector' => '{{WRAPPER}} .envo-extra-box-icon-title',
)
);
$this->start_controls_tabs( '_tabs_title' );
$this->start_controls_tab(
'_tab_title_normal', array(
'label' => __( 'Normal', 'envo-extra' ),
)
);
$this->add_control(
'title_color', array(
'label' => __( 'Text Color', 'envo-extra' ),
'type' => Controls_Manager::COLOR,
'selectors' => array(
'{{WRAPPER}} .envo-extra-box-icon-title' => 'color: {{VALUE}};',
),
)
);
$this->end_controls_tab();
$this->start_controls_tab(
'_tab_title_hover', array(
'label' => __( 'Hover', 'envo-extra' ),
)
);
$this->add_control(
'title_hover_color', array(
'label' => __( 'Text Color', 'envo-extra' ),
'type' => Controls_Manager::COLOR,
'selectors' => array(
'{{WRAPPER}}:hover .envo-extra-box-icon-title' => 'color: {{VALUE}};',
),
)
);
$this->end_controls_tab();
$this->end_controls_tabs();
$this->add_responsive_control(
'title_margin', array(
'label' => __( 'Margin', 'envo-extra' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => array( 'px', '%' ),
'separator' => 'before',
'selectors' => array(
'{{WRAPPER}} .envo-extra-box-icon-title' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
),
)
);
$this->end_controls_section();
//Description
$this->start_controls_section(
'section_style_description', array(
'label' => __( 'Description', 'envo-extra' ),
'tab' => Controls_Manager::TAB_STYLE,
'condition' => array(
'description!' => '',
),
)
);
$this->add_group_control(
Group_Control_Typography::get_type(), array(
'name' => 'description',
'selector' => '{{WRAPPER}} .envo-extra-box-icon-description',
)
);
$this->add_group_control(
Group_Control_Text_Shadow::get_type(), array(
'name' => 'description',
'selector' => '{{WRAPPER}} .envo-extra-box-icon-description',
)
);
$this->start_controls_tabs( '_tabs_description' );
$this->start_controls_tab(
'_tab_description_normal', array(
'label' => __( 'Normal', 'envo-extra' ),
)
);
$this->add_control(
'description_color', array(
'label' => __( 'Text Color', 'envo-extra' ),
'type' => Controls_Manager::COLOR,
'selectors' => array(
'{{WRAPPER}} .envo-extra-box-icon-description' => 'color: {{VALUE}};',
),
)
);
$this->end_controls_tab();
$this->start_controls_tab(
'_tab_description_hover', array(
'label' => __( 'Hover', 'envo-extra' ),
)
);
$this->add_control(
'description_hover_color', array(
'label' => __( 'Text Color', 'envo-extra' ),
'type' => Controls_Manager::COLOR,
'selectors' => array(
'{{WRAPPER}}:hover .envo-extra-box-icon-description' => 'color: {{VALUE}};',
),
)
);
$this->end_controls_tab();
$this->end_controls_tabs();
$this->add_responsive_control(
'description_margin', array(
'label' => __( 'Margin', 'envo-extra' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => array( 'px', '%' ),
'separator' => 'before',
'selectors' => array(
'{{WRAPPER}} .envo-extra-box-icon-description' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
),
)
);
$this->end_controls_section();
$this->start_controls_section(
'section_style_badge', array(
'label' => __( 'Badge', 'envo-extra' ),
'tab' => Controls_Manager::TAB_STYLE,
'condition' => array(
'badge_text!' => '',
),
)
);
$this->add_control(
'badge_position', array(
'label' => __( 'Position', 'envo-extra' ),
'type' => Controls_Manager::SELECT,
'options' => array(
'top-left' => __( 'Top Left', 'envo-extra' ),
'top-center' => __( 'Top Center', 'envo-extra' ),
'top-right' => __( 'Top Right', 'envo-extra' ),
'middle-left' => __( 'Middle Left', 'envo-extra' ),
'middle-center' => __( 'Middle Center', 'envo-extra' ),
'middle-right' => __( 'Middle Right', 'envo-extra' ),
'bottom-left' => __( 'Bottom Left', 'envo-extra' ),
'bottom-center' => __( 'Bottom Center', 'envo-extra' ),
'bottom-right' => __( 'Bottom Right', 'envo-extra' ),
),
'default' => 'top-right',
)
);
$this->add_group_control(
Group_Control_Typography::get_type(), array(
'name' => 'badge_typography',
'label' => __( 'Typography', 'envo-extra' ),
'selector' => '{{WRAPPER}} .envo-extra-badge',
)
);
$this->add_responsive_control(
'badge_padding', array(
'label' => __( 'Padding', 'envo-extra' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => array( 'px', '%', 'em' ),
'selectors' => array(
'{{WRAPPER}} .envo-extra-badge' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
),
)
);
$this->add_control(
'badge_color', array(
'label' => __( 'Text Color', 'envo-extra' ),
'type' => Controls_Manager::COLOR,
'selectors' => array(
'{{WRAPPER}} .envo-extra-badge' => 'color: {{VALUE}};',
),
)
);
$this->add_control(
'badge_bg_color', array(
'label' => __( 'Background Color', 'envo-extra' ),
'type' => Controls_Manager::COLOR,
'selectors' => array(
'{{WRAPPER}} .envo-extra-badge' => 'background-color: {{VALUE}};',
),
)
);
$this->add_group_control(
Group_Control_Border::get_type(), array(
'name' => 'badge_border',
'selector' => '{{WRAPPER}} .envo-extra-badge',
)
);
$this->add_responsive_control(
'badge_border_radius', array(
'label' => __( 'Border Radius', 'envo-extra' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => array( 'px', '%' ),
'selectors' => array(
'{{WRAPPER}} .envo-extra-badge' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
),
)
);
$this->add_group_control(
Group_Control_Box_Shadow::get_type(), array(
'name' => 'badge_box_shadow',
'selector' => '{{WRAPPER}} .envo-extra-badge',
)
);
$this->end_controls_section();
}
/**
* Render image widget output on the frontend.
*
* Written in PHP and used to generate the final HTML.
*
* @since 1.0.0
* @access protected
*/
protected function render() {
$settings = $this->get_settings_for_display();
$this->add_inline_editing_attributes( 'title', 'basic' );
$this->add_render_attribute( 'title', 'class', 'envo-extra-box-icon-title' );
$this->add_inline_editing_attributes( 'description', 'basic' );
$this->add_render_attribute( 'description', 'class', 'envo-extra-box-icon-description' );
$this->add_inline_editing_attributes( 'badge_text', 'none' );
$this->add_render_attribute( 'badge_text', 'class', 'envo-extra-badge envo-extra-badge-' . $settings[ 'badge_position' ] );
$html_tag = ( $settings[ 'link' ] ) ? 'a' : 'div';
$attr = $settings[ 'link' ][ 'url' ] ? ' href="' . $settings[ 'link' ][ 'url' ] . '"' : '';
$attr .= $settings[ 'link' ][ 'is_external' ] ? ' target="_blank"' : '';
$attr .= $settings[ 'link' ][ 'nofollow' ] ? ' rel="nofollow"' : '';
?>
<<?php echo esc_attr( $html_tag ); ?> <?php echo wp_kses_data( $attr ); ?> class="envo-extra-box-icon-wrapper">
<div class="envo-extra-box-icon-wrapper-inner">
<?php if ( $settings[ 'badge_text' ] ) : ?>
<span <?php $this->print_render_attribute_string( 'badge_text' ); ?>><?php echo esc_html( $settings[ 'badge_text' ] ); ?></span>
<?php endif; ?>
<?php if ( 'icon' === $settings[ 'media_type' ] || 'image' === $settings[ 'media_type' ] ) : ?>
<span class="envo-extra-box-icon-item">
<?php
if ( 'icon' === $settings[ 'media_type' ] && $settings[ 'icon' ] ) {
Icons_Manager::render_icon( $settings[ 'icon' ], array( 'aria-hidden' => 'true' ) );
}
if ( 'image' === $settings[ 'media_type' ] ) {
echo wp_kses_post( Group_Control_Image_Size::get_attachment_image_html( $settings, 'media_thumbnail', 'image' ) );
}
?>
</span>
<?php endif; ?>
<span class="envo-extra-box-icon-content">
<?php
if ( $settings[ 'title' ] ) :
printf( '<%1$s %2$s>%3$s</%1$s>', tag_escape( $settings[ 'title_tag' ] ), $this->get_render_attribute_string( 'title' ), $settings[ 'title' ] ); //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
endif;
?>
<?php if ( $settings[ 'description' ] ) : ?>
<p <?php $this->print_render_attribute_string( 'description' ); ?>><?php echo wp_kses_data( $settings[ 'description' ] ); ?></p>
<?php endif; ?>
</span>
</div>
</<?php echo esc_attr( $html_tag ); ?>>
<?php
}
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,216 @@
<?php
/**
* Plugin Name: EnvoThemes Demo Import
* Description: Import EnvoThemes official themes demo content, widgets and theme settings with just one click.
* Version: 1.2.2
* Author: EnvoThemes
* Author URI: https://envothemes.com
* Text Domain: envothemes-demo-import
* Domain Path: /languages/
*
*/
// Exit if accessed directly
if (!defined('ABSPATH')) {
exit;
}
/**
* Returns the main instance of EnvoThemes_Demo_Import to prevent the need to use globals.
*
* @since 1.0.0
* @return object EnvoThemes_Demo_Import
*/
function EnvoThemes_Demo_Import() {
return EnvoThemes_Demo_Import::instance();
}
// End EnvoThemes_Demo_Import()
EnvoThemes_Demo_Import();
/**
* Main EnvoThemes_Demo_Import Class
*
* @class EnvoThemes_Demo_Import
* @version 1.0.0
* @since 1.0.0
* @package EnvoThemes_Demo_Import
*/
final class EnvoThemes_Demo_Import {
/**
* EnvoThemes_Demo_Import The single instance of EnvoThemes_Demo_Import.
* @var object
* @access private
* @since 1.0.0
*/
private static $_instance = null;
/**
* The token.
* @var string
* @access public
* @since 1.0.0
*/
public $token;
/**
* The version number.
* @var string
* @access public
* @since 1.0.0
*/
public $version;
// Admin - Start
/**
* The admin object.
* @var object
* @access public
* @since 1.0.0
*/
public $admin;
/**
* Constructor function.
* @access public
* @since 1.0.0
* @return void
*/
public function __construct($widget_areas = array()) {
$this->token = 'envothemes-demo-import';
$this->plugin_url = plugin_dir_url(__FILE__);
$this->plugin_path = plugin_dir_path(__FILE__);
$this->version = '1.0';
define('ENVO_URL', $this->plugin_url);
define('ENVO_PATH', $this->plugin_path);
define('ENVO_VERSION', $this->version);
define('ENVO_FILE_PATH', __FILE__);
define('ENVO_ADMIN_PANEL_HOOK_PREFIX', 'theme-panel_page_envothemes-panel');
register_activation_hook(__FILE__, array($this, 'install'));
add_action('init', array($this, 'load_plugin_textdomain'));
// Demos scripts
add_action('admin_enqueue_scripts', array($this, 'scripts'));
$theme = wp_get_theme();
//if ('Enwoo' == $theme->name || 'enwoo' == $theme->template) {
require_once( ENVO_PATH . 'includes/panel/demos.php' );
//}
require_once( ENVO_PATH . 'includes/notify/notify.php' );
}
public static function scripts() {
wp_enqueue_style('envo-notices', plugins_url('includes/panel/assets/css/notify.css', __FILE__));
}
/**
* Main EnvoThemes_Demo_Import Instance
*
* Ensures only one instance of EnvoThemes_Demo_Import is loaded or can be loaded.
*
* @since 1.0.0
* @static
* @see EnvoThemes_Demo_Import()
* @return Main EnvoThemes_Demo_Import instance
*/
public static function instance() {
if (is_null(self::$_instance))
self::$_instance = new self();
return self::$_instance;
}
// End instance()
/**
* Load the localisation file.
* @access public
* @since 1.0.0
* @return void
*/
public function load_plugin_textdomain() {
load_plugin_textdomain('envothemes-demo-import', false, dirname(plugin_basename(__FILE__)) . '/languages/');
}
/**
* Cloning is forbidden.
*
* @since 1.0.0
*/
public function __clone() {
_doing_it_wrong(__FUNCTION__, esc_html__('Cheatin&#8217; huh?'), '1.0.0');
}
/**
* Unserializing instances of this class is forbidden.
*
* @since 1.0.0
*/
public function __wakeup() {
_doing_it_wrong(__FUNCTION__, esc_html__('Cheatin&#8217; huh?'), '1.0.0');
}
/**
* Installation.
* Runs on activation. Logs the version number and assigns a notice message to a WordPress option.
* @access public
* @since 1.0.0
* @return void
*/
public function install() {
$this->_log_version_number();
}
/**
* Log the plugin version number.
* @access private
* @since 1.0.0
* @return void
*/
private function _log_version_number() {
// Log the version number.
update_option($this->token . '-version', $this->version);
}
}
// End Class
/**
* Add Metadata on plugin activation.
*/
function envo_extra_activate() {
add_site_option('envothemes_active_time', time());
add_site_option('envothemes_active_pro_time', time());
add_option('envothemes_activation_redirect', true);
}
register_activation_hook(__FILE__, 'envo_extra_activate');
/**
* Remove Metadata on plugin Deactivation.
*/
function envo_extra_deactivate() {
delete_option('envothemes_active_time');
delete_option('envothemes_maybe_later');
delete_option('envothemes_review_dismiss');
delete_option('envothemes_active_pro_time');
}
register_deactivation_hook(__FILE__, 'envo_extra_deactivate');
add_filter('plugin_action_links_' . plugin_basename(__FILE__), 'envothemes_action_links');
function envothemes_action_links($links) {
$links['install_demos'] = sprintf('<a href="%1$s" class="install-demos">%2$s</a>', esc_url(admin_url('themes.php?page=envothemes-panel-install-demos')), esc_html__('Install Demos', 'envothemes-demo-import'));
return $links;
}
remove_filter( 'wp_import_post_meta', 'Elementor\Compatibility::on_wp_import_post_meta');
remove_filter( 'wxr_importer.pre_process.post_meta', 'Elementor\Compatibility::on_wxr_importer_pre_process_post_meta');
Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 504 B

@@ -0,0 +1,328 @@
<?php
// Exit if accessed directly.
if (!defined('ABSPATH')) {
exit;
}
/**
* @review_dismiss()
* @review_pending()
* @envothemes_review_notice_message()
* Make all the above functions working.
*/
function envothemes_review_notice() {
envothemes_review_dismiss();
envothemes_review_pending();
$activation_time = get_site_option('envothemes_active_time');
$review_dismissal = get_site_option('envothemes_review_dismiss');
$maybe_later = get_site_option('envothemes_maybe_later');
$onboard = get_site_option('elementor_onboarded');
if (!$onboard) {
add_site_option('elementor_onboarded', true);
}
if ('yes' == $review_dismissal) {
return;
}
if (!$activation_time) {
add_site_option('envothemes_active_time', time());
}
$daysinseconds = 1209600; // 1209600 14 Days in seconds.
if ('yes' == $maybe_later) {
$daysinseconds = 2419200; // 28 Days in seconds.
}
if (time() - $activation_time > $daysinseconds) {
add_action('admin_notices', 'envothemes_review_notice_message');
}
}
add_action('admin_init', 'envothemes_review_notice');
/**
* For the notice preview.
*/
function envothemes_review_notice_message() {
if (isset($_SERVER['REQUEST_URI'])) {
$server = sanitize_text_field( wp_unslash($_SERVER['REQUEST_URI']));
}
$scheme = (parse_url($server, PHP_URL_QUERY)) ? '&' : '?';
$url = $server . $scheme . 'envothemes_review_dismiss=yes';
$dismiss_url = wp_nonce_url($url, 'envo-review-nonce');
$_later_link = $server . $scheme . 'envothemes_review_later=yes';
$later_url = wp_nonce_url($_later_link, 'envo-review-nonce');
$theme = wp_get_theme();
$themetemplate = $theme->template;
$themename = $theme->name;
?>
<div class="envo-review-notice">
<div class="envo-review-thumbnail">
<img src="<?php echo esc_url(ENVO_URL) . 'img/et-logo.png'; ?>" alt="">
</div>
<div class="envo-review-text">
<h3><?php esc_html_e('Leave A Review?', 'envothemes-demo-import') ?></h3>
<p><?php echo sprintf(esc_html__('We hope you\'ve enjoyed using %1$s theme! Would you consider leaving us a review on WordPress.org?', 'envothemes-demo-import'), esc_html($themename)) ?></p>
<ul class="envo-review-ul">
<li>
<a href="https://wordpress.org/support/theme/<?php echo esc_html($themetemplate); ?>/reviews/?rate=5#new-post" target="_blank">
<span class="dashicons dashicons-external"></span>
<?php esc_html_e('Sure! I\'d love to!', 'envothemes-demo-import') ?>
</a>
</li>
<li>
<a href="<?php echo esc_url($dismiss_url) ?>">
<span class="dashicons dashicons-smiley"></span>
<?php esc_html_e('I\'ve already left a review', 'envothemes-demo-import') ?>
</a>
</li>
<li>
<a href="<?php echo esc_url($later_url) ?>">
<span class="dashicons dashicons-calendar-alt"></span>
<?php esc_html_e('Maybe Later', 'envothemes-demo-import') ?>
</a>
</li>
<li>
<a href="https://envothemes.com/contact/" target="_blank">
<span class="dashicons dashicons-sos"></span>
<?php esc_html_e('I need help!', 'envothemes-demo-import') ?>
</a>
</li>
<li>
<a href="<?php echo esc_url($dismiss_url) ?>">
<span class="dashicons dashicons-dismiss"></span>
<?php esc_html_e('Never show again', 'envothemes-demo-import') ?>
</a>
</li>
</ul>
</div>
</div>
<?php
}
/**
* For Dismiss!
*/
function envothemes_review_dismiss() {
if (!is_admin() ||
!current_user_can('manage_options') ||
!isset($_GET['_wpnonce']) ||
!wp_verify_nonce(sanitize_key(wp_unslash($_GET['_wpnonce'])), 'envo-review-nonce') ||
!isset($_GET['envothemes_review_dismiss'])) {
return;
}
add_site_option('envothemes_review_dismiss', 'yes');
}
/**
* For Maybe Later Update.
*/
function envothemes_review_pending() {
if (!is_admin() ||
!current_user_can('manage_options') ||
!isset($_GET['_wpnonce']) ||
!wp_verify_nonce(sanitize_key(wp_unslash($_GET['_wpnonce'])), 'envo-review-nonce') ||
!isset($_GET['envothemes_review_later'])) {
return;
}
// Reset Time to current time.
update_site_option('envothemes_active_time', time());
update_site_option('envothemes_maybe_later', 'yes');
}
function envothemes_pro_notice() {
envothemes_pro_dismiss();
$theme = wp_get_theme();
$themetemplate = $theme->template;
$activetheme = str_replace('-', '_', strtoupper($themetemplate));
$activation_time = get_site_option('envothemes_active_pro_time');
if (!$activation_time) {
add_site_option('envothemes_active_pro_time', time());
}
$daysinseconds = 86400; // 1 Day in seconds.
if (time() - $activation_time > $daysinseconds) {
if (defined($activetheme . '_PRO_CURRENT_VERSION')) {
return;
}
add_action('admin_notices', 'envothemes_pro_notice_message');
}
}
add_action('admin_init', 'envothemes_pro_notice');
/**
* For PRO notice
*/
function envothemes_pro_notice_message() {
if (isset($_SERVER['REQUEST_URI'])) {
$server = sanitize_text_field( wp_unslash($_SERVER['REQUEST_URI']));
}
$scheme = (parse_url($server, PHP_URL_QUERY)) ? '&' : '?';
$url = $server . $scheme . 'envothemes_pro_dismiss=yes';
$dismiss_url = wp_nonce_url($url, 'envo-pro-nonce');
$theme = wp_get_theme();
$themetemplate = $theme->template;
$themename = $theme->name;
if ($themetemplate == 'enwoo') {
$templateurl = 'https://enwoo-wp.com/' . $themetemplate . '-pro/';
} else {
$templateurl = 'https://envothemes.com/product/' . $themetemplate . '-pro/';
}
?>
<div class="envo-review-notice">
<div class="envo-review-thumbnail">
<img src="<?php echo esc_url(ENVO_URL) . 'img/et-logo.png'; ?>" alt="">
</div>
<div class="envo-review-text">
<h3><?php esc_html_e('Go PRO for More Features', 'envothemes-demo-import') ?></h3>
<p>
<?php echo sprintf(esc_html__('Get the %1$s for more stunning elements, demos and customization options.', 'envothemes-demo-import'), '<a href="'.esc_url($templateurl).'" target="_blank">PRO addon</a>') ?>
</p>
<ul class="envo-review-ul">
<li class="show-mor-message">
<a href="<?php echo esc_url($templateurl) ?>" target="_blank">
<span class="dashicons dashicons-external"></span>
<?php esc_html_e('Show me more', 'envothemes-demo-import') ?>
</a>
</li>
<li class="hide-message">
<a href="<?php echo esc_url($dismiss_url) ?>">
<span class="dashicons dashicons-smiley"></span>
<?php esc_html_e('Hide this message', 'envothemes-demo-import') ?>
</a>
</li>
</ul>
</div>
</div>
<?php
}
/**
* For PRO Dismiss!
*/
function envothemes_pro_dismiss() {
if (!is_admin() ||
!current_user_can('manage_options') ||
!isset($_GET['_wpnonce']) ||
!wp_verify_nonce(sanitize_key(wp_unslash($_GET['_wpnonce'])), 'envo-pro-nonce') ||
!isset($_GET['envothemes_pro_dismiss'])) {
return;
}
$daysinseconds = 604800; // 14 Days in seconds (1209600).
$newtime = time() + $daysinseconds;
update_site_option('envothemes_active_pro_time', $newtime);
}
/**
* Enwoo notice
*/
function envo_extra_enwoo_notice() {
envo_extra_enwoo_dismiss();
$theme = wp_get_theme();
$activation_time = get_site_option('active_enwoo_time');
if (!$activation_time) {
add_site_option('active_enwoo_time', time());
}
$daysinseconds = 300; // 1 Day in seconds.
if (time() - $activation_time > $daysinseconds) {
if (defined('ENWOO_PRO_CURRENT_VERSION') || defined('ENVO_SHOPPER_PRO_CURRENT_VERSION') || defined('ENVO_ECOMMERCE_PRO_CURRENT_VERSION') || defined('ENVO_STOREFRONT_PRO_CURRENT_VERSION') || defined('ENVO_SHOP_PRO_CURRENT_VERSION') || defined('ENVO_ONLINE_STORE_PRO_CURRENT_VERSION') || defined('ENVO_MARKETPLACE_PRO_CURRENT_VERSION') || defined('ENVO_SHOPPER_PRO_CURRENT_VERSION')) {
return;
}
if ( 'Enwoo' != $theme->name || 'enwoo' != $theme->template ) {
add_action('admin_notices', 'envo_extra_enwoo_notice_message');
}
}
}
add_action('admin_init', 'envo_extra_enwoo_notice');
/**
* For shop notice
*/
function envo_extra_enwoo_notice_message() {
if (isset($_SERVER['REQUEST_URI'])) {
$server = sanitize_text_field( wp_unslash($_SERVER['REQUEST_URI']));
}
$scheme = (parse_url($server, PHP_URL_QUERY)) ? '&' : '?';
$url = $server . $scheme . 'envo_extra_enwoo_dismiss=yes';
$dismiss_url = wp_nonce_url($url, 'enwoo-nonce');
?>
<div class="envo-review-notice envo-shop-notice">
<div class="envo-review-thumbnail">
<img src="<?php echo esc_url(ENVO_EXTRA_PLUGIN_URL) . 'images/enwoo.jpg'; ?>" alt="">
</div>
<div class="envo-review-text">
<h3><?php esc_html_e('Try our new FREE Multipurspose and WooCommerce WordPress Theme - Enwoo', 'envothemes-demo-import') ?></h3>
<p>
<?php
echo sprintf(
esc_html__('%1$s - new free Multipurpose and WooCommerce theme. Check out theme %2$s, that can be imported for FREE with simple click.', 'envothemes-demo-import'),
'<a href="https://enwoo-wp.com/" target="_blank">Enwoo</a>',
'<a href="https://enwoo-wp.com/demos/" target="_blank">Demos</a>')
?>
</p>
<ul class="envo-review-ul">
<li class="show-mor-message">
<a href="https://enwoo-wp.com/" target="_blank">
<span class="dashicons dashicons-external"></span>
<?php esc_html_e('Show me more', 'envothemes-demo-import') ?>
</a>
</li>
<li class="hide-message">
<a href="<?php echo $dismiss_url ?>">
<span class="dashicons dashicons-smiley"></span>
<?php esc_html_e('Hide this message', 'envothemes-demo-import') ?>
</a>
</li>
</ul>
</div>
</div>
<?php
}
/**
* For shop Dismiss!
*/
function envo_extra_enwoo_dismiss() {
if (!is_admin() ||
!current_user_can('manage_options') ||
!isset($_GET['_wpnonce']) ||
!wp_verify_nonce(sanitize_key(wp_unslash($_GET['_wpnonce'])), 'enwoo-nonce') ||
!isset($_GET['envo_extra_enwoo_dismiss'])) {
return;
}
$daysinseconds = 604800; // 14 Days in seconds (1209600).
$newtime = time() + $daysinseconds;
update_site_option('active_enwoo_time', $newtime);
}
@@ -0,0 +1,516 @@
<?php
/**
* Plugin Installer
*/
// Exit if accessed directly
if (!defined('ABSPATH')) {
exit;
}
// Start Class
class EnvoThemes_Demo_Import_Plugin_Installer {
public function start() {
add_action('wp_ajax_oe_plugin_installer', array($this, 'oe_plugin_installer'));
add_action('wp_ajax_oe_plugin_activation', array($this, 'oe_plugin_activation'));
add_action('wp_ajax_oe_premium_plugin_activation', array($this, 'oe_premium_plugin_activation'));
add_action('admin_enqueue_scripts', array($this, 'enqueue_scripts'));
}
/**
* Initialize the display of the free plugins
*
* @since 1.0.0
*/
public static function init($plugins) {
?>
<?php
require_once( ABSPATH . 'wp-admin/includes/plugin-install.php' );
foreach ($plugins as $plugin) :
$button_classes = 'install button';
$button_text = __('Install Now', 'envothemes-demo-import');
$api = plugins_api('plugin_information',
array(
'slug' => sanitize_file_name($plugin['slug']),
'fields' => array(
'short_description' => true,
'sections' => false,
'requires' => false,
'downloaded' => true,
'last_updated' => false,
'added' => false,
'tags' => false,
'compatibility' => false,
'homepage' => false,
'donate_link' => false,
'icons' => true,
'banners' => true,
),
)
);
if (!is_wp_error($api)) { // confirm error free
$main_plugin_file = EnvoThemes_Demo_Import_Plugin_Installer::get_plugin_file($plugin['slug']); // Get main plugin file
if (self::check_file_extension($main_plugin_file)) { // check file extension
if (is_plugin_active($main_plugin_file)) {
// plugin activation, confirmed!
$button_classes = 'button disabled';
$button_text = __('Activated', 'envothemes-demo-import');
} else {
// It's installed, let's activate it
$button_classes = 'activate button button-primary';
$button_text = __('Activate', 'envothemes-demo-import');
}
}
// Send plugin data to template
self::render_template($plugin, $api, $button_text, $button_classes);
}
endforeach;
?>
<?php
}
/**
* Render display template for each free plugin
*
* @since 1.0.0
*/
public static function render_template($plugin, $api, $button_text, $button_classes) {
?>
<div class="plugin">
<div class="plugin-wrap">
<img src="<?php echo esc_html($api->icons['1x']); ?>" alt="">
<h2><?php echo esc_html($api->name); ?></h2>
<p><?php echo esc_html($api->short_description); ?></p>
<p class="plugin-author"><?php esc_html_e('By', 'envothemes-demo-import'); ?> <?php echo esc_html($api->author); ?></p>
</div>
<ul class="activation-row">
<li>
<a class="<?php echo esc_attr($button_classes); ?>" data-slug="<?php echo esc_attr($api->slug); ?>" data-name="<?php echo esc_attr($api->name); ?>" href="<?php echo esc_url(get_admin_url()); ?>update.php?action=install-plugin&amp;plugin=<?php echo esc_attr($api->slug); ?>&amp;_wpnonce=<?php echo esc_attr(wp_create_nonce('install-plugin_' . esc_attr($api->slug))) ?>"><?php echo esc_html($button_text); ?></a>
</li>
<li>
<a href="https://wordpress.org/plugins/<?php echo esc_attr($api->slug); ?>/" target="_blank"><?php esc_html_e('More Details', 'envothemes-demo-import'); ?></a>
</li>
</ul>
</div>
<?php
}
/**
* Initialize the display of the premium plugins
*
* @since 1.0.0
*/
public static function init_premium($plugins) {
?>
<?php
foreach ($plugins as $plugin) :
$button_classes = '';
$button_text = '';
$api = array(
'slug' => isset($plugin['slug']) ? $plugin['slug'] : '',
'url' => isset($plugin['url']) ? $plugin['url'] : '',
'full_url' => isset($plugin['full_url']) ? $plugin['full_url'] : '',
'name' => isset($plugin['name']) ? $plugin['name'] : '',
'description' => isset($plugin['description']) ? $plugin['description'] : '',
'icons' => isset($plugin['icons']) ? $plugin['icons'] : '',
'author' => isset($plugin['author']) ? $plugin['author'] : '',
'author_url' => isset($plugin['author_url']) ? $plugin['author_url'] : '',
);
if (!is_wp_error($api)) { // confirm error free
$main_plugin_file = EnvoThemes_Demo_Import_Plugin_Installer::get_plugin_file($plugin['slug']); // Get main plugin file
if (self::check_file_extension($main_plugin_file)) { // check file extension
if (is_plugin_active($main_plugin_file)) {
// plugin activation, confirmed!
$button_classes = 'button disabled';
$button_text = __('Activated', 'envothemes-demo-import');
} else {
// It's installed, let's activate it
$button_classes = 'activate button button-primary premium-activation';
$button_text = __('Activate', 'envothemes-demo-import');
}
}
// Send plugin data to template
self::render_premium_template($plugin, $api, $button_text, $button_classes);
}
endforeach;
?>
<?php
}
/**
* Render display template for each premium plugin
*
* @since 1.0.0
*/
public static function render_premium_template($plugin, $api, $button_text, $button_classes) {
// Var
$slug = $api['slug'];
$url = $api['url'];
$full_url = $api['full_url'];
$name = $api['name'];
$description = $api['description'];
$icons = $api['icons'];
$author = $api['author'];
$author_url = $api['author_url'];
?>
<div class="plugin">
<div class="plugin-wrap">
<?php if ($icons) { ?>
<img src="<?php echo esc_url($icons); ?>" alt="<?php echo esc_attr($name); ?>" />
<?php
}
if ($name) {
?>
<h2><?php echo esc_html($name); ?></h2>
<?php
}
if ($description) {
?>
<p><?php echo esc_html($description); ?></p>
<?php
}
if ($author) {
?>
<p class="plugin-author"><?php esc_html_e('By', 'envothemes-demo-import'); ?> <a href="<?php echo esc_url($author_url); ?>"><?php echo esc_html($author); ?></a></p>
<?php }
?>
</div>
<ul class="activation-row">
<li>
<?php
// Get main plugin file
$main_plugin_file = EnvoThemes_Demo_Import_Plugin_Installer::get_plugin_file($plugin['slug']);
// If the plugin is installed
if (self::check_file_extension($main_plugin_file)) {
?>
<a class="<?php echo esc_attr($button_classes); ?>" data-slug="<?php echo esc_attr($slug); ?>" data-name="<?php echo esc_attr($name); ?>" href="<?php echo esc_url(get_admin_url()); ?>update.php?action=install-plugin&amp;plugin=<?php echo esc_attr($slug); ?>&amp;_wpnonce=<?php echo esc_attr(wp_create_nonce('install-plugin_' . $slug)) ?>"><?php echo esc_html($button_text); ?></a>
<?php
// If the plugin is not installed
} else {
// If full url, used for the rec. plugins tab
if ($full_url) {
?>
<a class="button premium-link" href="<?php echo esc_url($full_url); ?>" target="_blank"><?php esc_html_e('Get This Plugin', 'envothemes-demo-import'); ?></a>
<?php
}
}
?>
</li>
<li>
<?php
// If full url, used for the rec. plugins tab
if ($full_url) {
?>
<a href="<?php echo esc_url($full_url); ?>" target="_blank"><?php esc_html_e('More Details', 'envothemes-demo-import'); ?></a>
<?php
}
?>
</li>
<li class="ribbon">
<?php esc_html_e('Premium', 'envothemes-demo-import'); ?>
</li>
</ul>
</div>
<?php
}
/**
* An Ajax method for installing plugin
*
* @since 1.0.0
*/
public function oe_plugin_installer() {
if (!current_user_can('install_plugins')) {
wp_die(esc_html__('Sorry, you are not allowed to install plugins on this site.', 'envothemes-demo-import'));
}
if (isset($_POST['nonce'])) {
$nonce = sanitize_text_field(wp_unslash($_POST["nonce"]));
}
if (isset($_POST['plugin'])) {
$plugin = sanitize_text_field(wp_unslash($_POST["plugin"]));
}
// Check our nonce, if they don't match then bounce!
if (!wp_verify_nonce($nonce, 'oe_installer_nonce')) {
wp_die(esc_html__('Error - unable to verify nonce, please try again.', 'envothemes-demo-import'));
}
// Include required libs for installation
require_once( ABSPATH . 'wp-admin/includes/plugin-install.php' );
require_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
require_once( ABSPATH . 'wp-admin/includes/class-wp-ajax-upgrader-skin.php' );
require_once( ABSPATH . 'wp-admin/includes/class-plugin-upgrader.php' );
// Get Plugin Info
$api = plugins_api('plugin_information',
array(
'slug' => $plugin,
'fields' => array(
'short_description' => false,
'sections' => false,
'requires' => false,
'rating' => false,
'ratings' => false,
'downloaded' => false,
'last_updated' => false,
'added' => false,
'tags' => false,
'compatibility' => false,
'homepage' => false,
'donate_link' => false,
),
)
);
$skin = new WP_Ajax_Upgrader_Skin();
$upgrader = new Plugin_Upgrader($skin);
$upgrader->install($api->download_link);
if ($api->name) {
$status = 'success';
$msg = $api->name . ' successfully installed.';
} else {
$status = 'failed';
$msg = 'There was an error installing ' . $api->name . '.';
}
$json = array(
'status' => $status,
'msg' => $msg,
);
wp_send_json($json);
}
/**
* Activate plugin via Ajax
*
* @since 1.0.0
*/
public function oe_plugin_activation() {
if (!current_user_can('install_plugins')) {
wp_die(esc_html__('Sorry, you are not allowed to activate plugins on this site.', 'envothemes-demo-import'));
}
if (isset($_POST['nonce'])) {
$nonce = sanitize_text_field(wp_unslash($_POST["nonce"]));
}
if (isset($_POST['plugin'])) {
$plugin = sanitize_text_field(wp_unslash($_POST["plugin"]));
}
// Check our nonce, if they don't match then bounce!
if (!wp_verify_nonce($nonce, 'oe_installer_nonce')) {
die(esc_html__('Error - unable to verify nonce, please try again.', 'envothemes-demo-import'));
}
// Include required libs for activation
require_once( ABSPATH . 'wp-admin/includes/plugin-install.php' );
require_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
require_once( ABSPATH . 'wp-admin/includes/class-plugin-upgrader.php' );
// Get Plugin Info
$api = plugins_api('plugin_information',
array(
'slug' => $plugin,
'fields' => array(
'short_description' => false,
'sections' => false,
'requires' => false,
'rating' => false,
'ratings' => false,
'downloaded' => false,
'last_updated' => false,
'added' => false,
'tags' => false,
'compatibility' => false,
'homepage' => false,
'donate_link' => false,
),
)
);
if ($api->name) {
$main_plugin_file = EnvoThemes_Demo_Import_Plugin_Installer::get_plugin_file($plugin);
$status = 'success';
if ($main_plugin_file) {
activate_plugin($main_plugin_file);
$msg = $api->name . ' successfully activated.';
}
} else {
$status = 'failed';
$msg = 'There was an error activating ' . $api->name . '.';
}
$json = array(
'status' => $status,
'msg' => $msg,
);
wp_send_json($json);
}
/**
* Activate premium plugin via Ajax
*
* @since 1.0.0
*/
public function oe_premium_plugin_activation() {
if (!current_user_can('install_plugins')) {
wp_die(esc_html__('Sorry, you are not allowed to activate plugins on this site.', 'envothemes-demo-import'));
}
if (isset($_POST['nonce'])) {
$nonce = sanitize_text_field(wp_unslash($_POST["nonce"]));
}
if (isset($_POST['plugin'])) {
$plugin = sanitize_text_field(wp_unslash($_POST["plugin"]));
}
// Check our nonce, if they don't match then bounce!
if (!wp_verify_nonce($nonce, 'oe_installer_nonce')) {
die(esc_html__('Error - unable to verify nonce, please try again.', 'envothemes-demo-import'));
}
// Include required libs for activation
require_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
require_once( ABSPATH . 'wp-admin/includes/class-plugin-upgrader.php' );
// Get Plugin Info
$api = array(
'slug' => $plugin,
'name' => $plugin['name'],
);
if ($api['name']) {
$main_plugin_file = EnvoThemes_Demo_Import_Plugin_Installer::get_plugin_file($plugin);
$status = 'success';
if ($main_plugin_file) {
activate_plugin($main_plugin_file);
$msg = $api['name'] . ' successfully activated.';
}
} else {
$status = 'failed';
$msg = 'There was an error activating ' . $api['name'] . '.';
}
$json = array(
'status' => $status,
'msg' => $msg,
);
wp_send_json($json);
}
/**
* A method to get the main plugin file
*
* @since 1.0.0
*/
public static function get_plugin_file($plugin_slug) {
require_once( ABSPATH . '/wp-admin/includes/plugin.php' ); // Load plugin lib
$plugins = get_plugins();
foreach ($plugins as $plugin_file => $plugin_info) {
// Get the basename of the plugin e.g. [askismet]/askismet.php
$slug = dirname(plugin_basename($plugin_file));
if ($slug) {
if ($slug == $plugin_slug) {
return $plugin_file; // If $slug = $plugin_name
}
}
}
return null;
}
/**
* A helper to check file extension
*
* @since 1.0.0
*/
public static function check_file_extension($filename) {
if (substr(strrchr($filename, '.'), 1) === 'php') {
// has .php exension
return true;
} else {
// ./wp-content/plugins
return false;
}
}
/**
* Load scripts
*
* @since 1.0.0
*/
public static function enqueue_scripts($hook) {
// Only load scripts when needed
if (ENVO_ADMIN_PANEL_HOOK_PREFIX . '-extensions' != $hook && ENVO_ADMIN_PANEL_HOOK_PREFIX . '-rec-plugins' != $hook) {
return;
}
// JS
wp_enqueue_script('envothemes-installer', plugins_url('/js/installer.min.js', __FILE__), array('jquery'));
wp_localize_script('envothemes-installer', 'oe_installer_localize', array(
'ajax_url' => admin_url('admin-ajax.php'),
'admin_nonce' => wp_create_nonce('oe_installer_nonce'),
'install_now' => __('Are you sure you want to install this plugin?', 'envothemes-demo-import'),
'install_btn' => __('Install Now', 'envothemes-demo-import'),
'activate_btn' => __('Activate', 'envothemes-demo-import'),
'installed_btn' => __('Activated', 'envothemes-demo-import')
));
// CSS
wp_enqueue_style('envothemes-installer', plugins_url('/css/installer.min.css', __FILE__));
}
}
// initialize
$EnvoThemes_Demo_Import_plugin_installer = new EnvoThemes_Demo_Import_Plugin_Installer();
$EnvoThemes_Demo_Import_plugin_installer->start();
@@ -0,0 +1,653 @@
.envo-clr:after {
content: '';
display: block;
visibility: hidden;
clear: both;
zoom: 1;
height: 0;
}
.envo-demo-wrap {
display: block;
}
.envo-demo-wrap .envo-about-description {
margin-top: 30px;
}
.envo-demo-wrap .envo-about-description p {
font-size: 15px;
font-weight: 400;
line-height: 1.8;
margin: 0;
}
.envo-demo-wrap hr {
margin: 32px 0 40px;
}
.envo-demo-wrap .themes {
margin: 0 -15px;
min-width: 100% !important; /* Fix the zoom image bug */
}
.envo-demo-wrap .envo-header-bar {
display: inline-block;
width: -webkit-calc(100% - 40px);
width: calc(100% - 40px);
margin: 20px 0 30px;
padding: 0 20px;
background-color: #fff;
}
.envo-demo-wrap .envo-navigation {
font-size: 13px;
float: left;
width: 100%;
}
.envo-demo-wrap .envo-navigation ul {
overflow: hidden;
margin: 0;
padding: 0;
list-style-type: none;
}
.envo-demo-wrap .envo-navigation li {
float: left;
margin: 0 15px;
}
.envo-demo-wrap .envo-navigation li.active a,
.envo-demo-wrap .envo-navigation li.active a:hover {
border-bottom: 4px solid #666;
}
.envo-demo-wrap .envo-navigation li a {
display: block;
padding: 15px 0;
text-align: center;
text-decoration: none;
color: #444;
border-bottom: 4px solid #fff;
outline: 0;
-webkit-box-shadow: none;
box-shadow: none;
}
.envo-demo-wrap .envo-navigation li a:hover {
cursor: pointer;
color: #00a0d2;
border-bottom: 4px solid #fff;
}
.envo-demo-wrap .envo-search-input {
width: 100%;
margin: 10px 0;
-webkit-transition: 50ms border-color ease-in-out;
transition: 50ms border-color ease-in-out;
outline: 0;
-webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, .07);
box-shadow: inset 0 1px 2px rgba(0, 0, 0, .07);
}
.envo-demo-wrap .theme-wrap {
float: left;
-webkit-box-sizing: border-box;
box-sizing: border-box;
width: 33.33%;
padding: 0 15px 30px 15px;
}
.envo-demo-wrap .theme {
float: none;
width: 100% !important;
margin: 0 !important;
}
.envo-is-fadeout {
-webkit-animation: envo-fade linear 200ms 1 forwards;
animation: envo-fade linear 200ms 1 forwards;
}
.envo-is-fadein {
-webkit-animation: envo-fade linear 200ms 1 reverse forwards;
animation: envo-fade linear 200ms 1 reverse forwards;
}
.pro-badge {
position: absolute;
top: 10px;
right: 10px;
padding: 5px 10px;
background-color: #69cf11;
color: #fff;
border-radius: 5px;
text-decoration: none;
}
@-webkit-keyframes envo-fade {
from {
opacity: 1;
}
to {
opacity: 0;
}
}
@keyframes envo-fade {
from {
opacity: 1;
}
to {
opacity: 0;
}
}
.demo-import-loader {
position: absolute;
top: 0;
display: none;
width: 100%;
height: 100%;
text-align: center;
}
.demo-import-loader.preview-all {
background: rgba(255, 255, 255, .7);
}
.demo-import-loader i {
font-size: 32px;
line-height: 32px;
position: relative;
top: 50%;
display: inline-block;
width: 32px;
height: 32px;
margin: -16px auto 0 auto;
text-align: center;
}
.preview-icon i.custom-loader:before {
content: '';
position: absolute;
top: 50%;
left: 50%;
margin-left: -15px;
margin-top: -15px;
width: 30px;
height: 30px;
opacity: .8;
border-width: 3px;
border-style: solid;
border-color: rgba(0,0,0,0.2);
border-left-color: #000;
z-index: 99;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
-ms-border-radius: 50%;
border-radius: 50%;
-ms-animation: spinner 0.6s infinite linear;
-webkit-animation: spinner 0.6s infinite linear;
-o-animation: spinner 0.6s infinite linear;
-moz-animation: spinner 0.6s infinite linear;
animation: spinner 0.6s infinite linear;
}
.preview-icon i {
color: #333;
}
@-webkit-keyframes spinner {
0% {
-webkit-transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
}
}
@keyframes spinner {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
#envo-demo-popup-wrap {
display: none;
overflow-x: hidden;
overflow-y: auto;
}
#envo-demo-popup-wrap,
#envo-demo-popup-wrap .envo-demo-popup-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 99999;
}
.envo-demo-popup-overlay {
background-color: rgba(0, 0, 0, 0.7);
cursor: pointer;
}
.envo-demo-popup-container {
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
text-align: center;
}
.envo-demo-popup-container:before {
content: '';
display: inline-block;
height: 100%;
vertical-align: middle;
}
.envo-demo-popup-content-wrap {
position: relative;
display: inline-block;
vertical-align: middle;
text-align: left;
max-width: 100%;
z-index: 100000;
}
.envo-demo-popup-content-inner {
position: relative;
background-color: #fff;
width: 600px;
max-width: 100%;
margin: 0 auto;
z-index: 1000;
-webkit-box-shadow: 3px 3px 20px 0 rgba(0, 0, 0, 0.15);
-moz-box-shadow: 3px 3px 20px 0 rgba(0, 0, 0, 0.15);
box-shadow: 3px 3px 20px 0 rgba(0, 0, 0, 0.15);
}
.envo-demo-popup-content-inner a {
text-decoration: none;
outline: none;
box-shadow: none !important;
}
.envo-demo-popup-content-inner .envo-demo-popup-close {
position: absolute;
top: 0;
right: 0;
color: #333;
opacity: .5;
font-weight: 300;
font-size: 40px;
width: 40px;
height: 40px;
line-height: 30px;
text-align: center;
z-index: 1001;
}
.envo-demo-popup-content-inner .envo-demo-popup-close:hover {
opacity: 1;
}
#envo-demo-popup-content h2.title {
position: relative;
font-size: 15px;
text-transform: uppercase;
padding: 25px 15px 18px;
margin: 0 0 20px;
letter-spacing: 0.6px;
text-align: center;
}
#envo-demo-popup-content h2.title:after {
content: '';
position: absolute;
bottom: 0;
left: 50%;
margin-left: -43px;
display: inline-block;
width: 86px;
height: 2px;
background-color: #ddd;
}
.envo-popup-text {
padding: 0 30px 20px;
}
.envo-popup-text p {
font-size: 14px;
margin: 0 0 15px;
}
.envo-required-plugins-wrap {
border-top: 3px solid #eaeaea;
padding-top: 20px;
margin-top: 20px;
}
.envo-required-plugins-wrap h3 {
margin: 0 0 15px;
}
.envo-required-plugins {
margin: 25px auto 0;
}
.envo-required-plugins .envo-plugin {
position: relative;
border-bottom: 1px solid #eaeaea;
padding-bottom: 10px;
margin-bottom: 10px;
}
.envo-required-plugins .envo-plugin:last-child {
border-bottom: 0;
}
.envo-required-plugins h2 {
display: inline-block;
font-size: 14px;
font-weight: 400;
line-height: 28px;
margin: 0;
}
.envo-required-plugins .button {
float: right;
}
#envo-demo-popup-content .envo-button {
display: block;
width: 100%;
background-color: #13aff0;
color: #fff;
font-size: 13px;
font-weight: bold;
text-transform: uppercase;
margin: 0;
padding: 20px 20px;
border: 0;
cursor: pointer;
text-align: center;
letter-spacing: .1em;
line-height: 1;
outline: none;
box-shadow: none !important;
-webkit-transition: all .3s ease;
-moz-transition: all .3s ease;
-ms-transition: all .3s ease;
-o-transition: all .3s ease;
transition: all .3s ease;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
#envo-demo-popup-content .envo-button a{
color: #fff;
}
#envo-demo-popup-content .envo-button:hover {
background-color: #0b7cac;
}
#envo-demo-import-form,
.envo-loader,
.envo-last {
display: none;
}
#envo-demo-import-form ul.envo-popup-text,
.envo-loader .envo-import-status {
width: 360px;
max-width: 100%;
margin: 30px auto 10px;
}
.envo-loader .envo-import-status p {
text-align: center;
}
.envo-loader .envo-import-status p:before {
display: inline-block;
font: 400 18px/1 dashicons;
vertical-align: bottom;
margin-right: 5px;
}
.envo-loader .envo-import-status .envo-imported:before {
content: '\f147';
color: #79ba49;
}
.envo-loader .envo-import-status .envo-importing:before {
content: '\f463';
color: #f56e28;
-webkit-font-smoothing: antialiased;
-webkit-animation: spinner 2s infinite linear;
animation: spinner 2s infinite linear;
}
.envo-loader .envo-import-status .envo-importing-failed {
color: #ff0000;
}
.envo-loader .envo-import-status .envo-importing-failed:before {
content: '\f158';
color: #ff0000;
}
.envo-last {
padding: 30px;
text-align: center;
}
.envo-last .checkmark {
display: block;
width: 130px;
height: 130px;
margin: 0 auto;
-webkit-animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both;
animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both;
border-radius: 50%;
-webkit-box-shadow: inset 0 0 0 #5bc142;
box-shadow: inset 0 0 0 #5bc142;
stroke-width: 2;
stroke: #fff;
stroke-miterlimit: 10;
}
.envo-last .checkmark-circle {
-webkit-animation: stroke .6s cubic-bezier(.65, 0, .45, 1) forwards;
animation: stroke .6s cubic-bezier(.65, 0, .45, 1) forwards;
stroke-dasharray: 166;
stroke-dashoffset: 166;
stroke-width: 2;
stroke-miterlimit: 10;
stroke: #5bc142;
fill: none;
}
.envo-last .checkmark-check {
-webkit-transform-origin: 50% 50%;
-ms-transform-origin: 50% 50%;
transform-origin: 50% 50%;
-webkit-animation: stroke .3s cubic-bezier(.65, 0, .45, 1) .8s forwards;
animation: stroke .3s cubic-bezier(.65, 0, .45, 1) .8s forwards;
stroke-dasharray: 48;
stroke-dashoffset: 48;
}
@-webkit-keyframes stroke {
100% {
stroke-dashoffset: 0;
}
}
@keyframes stroke {
100% {
stroke-dashoffset: 0;
}
}
@-webkit-keyframes scale {
0%,
100% {
-webkit-transform: none;
transform: none;
}
50% {
-webkit-transform: scale3d(1.1, 1.1, 1);
transform: scale3d(1.1, 1.1, 1);
}
}
@keyframes scale {
0%,
100% {
-webkit-transform: none;
transform: none;
}
50% {
-webkit-transform: scale3d(1.1, 1.1, 1);
transform: scale3d(1.1, 1.1, 1);
}
}
@-webkit-keyframes fill {
100% {
-webkit-box-shadow: inset 0 0 0 100px #5bc142;
box-shadow: inset 0 0 0 100px #5bc142;
}
}
@keyframes fill {
100% {
-webkit-box-shadow: inset 0 0 0 100px #5bc142;
box-shadow: inset 0 0 0 100px #5bc142;
}
}
.envo-last h3 {
font-size: 20px;
margin: 30px 0 10px;
}
.envo-last p {
font-size: 14px;
margin: 0;
}
.envo-last a {
display: inline-block;
font-size: 12px;
font-weight: 600;
padding-bottom: 3px;
border-bottom: 2px solid;
margin-top: 6px;
text-transform: uppercase;
letter-spacing: 0.6px;
}
.envo-last a:after {
content: '\f345';
font: 400 16px/1 dashicons;
vertical-align: bottom;
margin-left: 3px;
}
/* RTL */
.rtl .envo-demo-wrap .theme-wrap,
.rtl .envo-demo-wrap .envo-navigation,
.rtl .envo-demo-wrap .envo-navigation li {
float: right;
}
.rtl .envo-demo-popup-content-wrap {
text-align: right;
}
.rtl .envo-demo-popup-content-inner .envo-demo-popup-close {
left: 0;
right: auto;
}
.rtl .envo-required-plugins .button {
float: left;
}
/* Responsive */
@media only screen and (min-width: 1640px) {
.envo-demo-wrap .theme-wrap {
width: 25%;
}
}
@media only screen and (max-width: 1080px) {
.envo-demo-wrap .theme-wrap {
width: 50%;
}
}
@media screen and (max-width: 850px) {
.envo-demo-popup-container:before {
display: none;
}
}
@media only screen and (max-width: 780px) {
.envo-demo-wrap .theme {
text-align: center;
}
.envo-demo-wrap .theme-actions {
position: relative;
display: block;
opacity: 1;
}
.envo-demo-wrap .theme-browser .theme .theme-actions .button-primary {
margin-right: 0 !important;
margin-left: 0 !important;
}
}
@media only screen and (min-width: 640px) {
.envo-demo-wrap .envo-navigation {
width: -webkit-calc(100% - 180px);
width: calc(100% - 180px);
}
.envo-demo-wrap .envo-navigation li {
margin: 0;
}
.envo-demo-wrap .envo-navigation li a {
padding: 15px;
}
.envo-demo-wrap .envo-search-input {
display: inline-block;
width: 180px;
height: 30px;
margin: 0;
margin-top: 11px;
}
}
@media only screen and (max-width: 580px) {
.envo-demo-wrap .theme-wrap {
float: none;
width: 100%;
}
}
File diff suppressed because one or more lines are too long
@@ -0,0 +1,77 @@
/* General */
a:focus, .wp-core-ui .button-link:focus,
.wp-core-ui .button-secondary:focus, .wp-core-ui .button.focus,
.wp-core-ui .button:focus { -webkit-box-shadow: none; box-shadow: none; }
.wp-core-ui .button-link:focus,
.wp-core-ui .button-secondary:focus, .wp-core-ui .button.focus,
.wp-core-ui .button:focus { border-color: #999; }
.wrap .envothemes-desc { padding: 10px 15px; margin: 12px 0 25px; }
.wrap .envothemes-callout { background-color: #fff; color: #444; border: 1px solid #e5e5e5; padding: 22px 20px; border-radius: 3px; box-shadow: 0 1px 1px rgba(0,0,0,.04); }
.wrap .envothemes-callout p { margin: 0; }
/* Plugins */
.oe-plugin-installer { box-sizing: border-box; display: -webkit-box; display: -moz-box; display: -ms-flexbox; display: -webkit-flex; display: flex; -webkit-flex-wrap: wrap; flex-wrap: wrap; flex-flow: row wrap; -webkit-flex-flow: row wrap; justify-content: space-between; width: 102%; position: relative; left: -1%; }
.oe-plugin-installer:after { content: ''; flex: auto; }
.oe-plugin-installer * { box-sizing: border-box; }
.oe-plugin-installer .plugin { width: 31.333%; margin: 0 1% 30px; padding: 0; overflow: hidden; text-align: left; border: 1px solid #e1e1e1; background: #fff; position: relative; border-radius: 2px; }
.oe-plugin-installer .plugin:hover { border-color: #cecece; }
.oe-plugin-installer .plugin-wrap { padding: 20px 20px 95px 145px; min-height: 214px; display: block; position: relative; }
.oe-plugin-installer li a,
.oe-plugin-installer .plugin-wrap a { text-decoration: none; }
.oe-plugin-installer .plugin-wrap img { display: block; position: absolute; left: 20px; top: 20px; max-width: 108px; max-height: 108px; border: 1px solid #f7f7f7; }
.oe-plugin-installer .plugin-wrap h2,
.oe-plugin-installer .plugin-wrap p { padding: 0; margin: 0; font-size: 17px; font-weight: 600; color: #333; line-height: 1.4; }
.oe-plugin-installer .plugin-wrap p { padding: 10px 0 0; margin: 0; font-size: 14px; font-weight: 400; color: #777; }
.oe-plugin-installer .plugin-wrap p.plugin-author { font-size: 13px; padding-top: 20px; font-style: italic; }
.oe-plugin-installer .activation-row { display: block; margin: 0; padding: 20px; background: #f7f7f7; border-top: 1px solid #e1e1e1; border-radius: 0 0 2px 2px; position: absolute; bottom: 0; width: 100%; overflow: hidden; border-radius: 0 0 2px 2px; text-align: left; }
.oe-plugin-installer .activation-row li { display: inline-block; vertical-align: top; margin: 0 10px 0 0; font-size: 13px; line-height: 27px; }
/* Ribbon */
.oe-plugin-installer li.ribbon { float: right; background-color: #67ce6b; color: #fff; padding: 0 10px; font-size: 12px; font-weight: 600; letter-spacing: 1px; text-align: center; text-transform: uppercase; border-radius: 3px; margin: 0; }
/* Notice */
.envothemes-admin-notice { display: inline-block; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; margin: 12px 0 25px; padding: 12px 16px; width: 100%; box-shadow: 0 1px 1px rgba(0,0,0,.04); border: 1px solid #e5e5e5; background-color: #fff; color: #555; font-size: 13px; }
.envothemes-admin-notice .alignleft { font-size: 15px; line-height: 38px; }
.envothemes-admin-notice a.button-primary { height: auto; font-size: 13px; font-weight: 600; line-height: 1; background-color: #13aff0; border: 0; color: #fff; padding: 12px 25px; text-transform: uppercase; letter-spacing: 1px; border-radius: 30px; text-align: center; transition: all .3s ease; -webkit-transition: all .3s ease; -moz-transition: all .3s ease; -o-transition: all .3s ease; -ms-transition: all .3s ease; text-shadow: none; -webkit-box-shadow: none; box-shadow: none; }
.envothemes-admin-notice a.button-primary:hover { background-color: #0b7cac; }
.envothemes-admin-notice a.button-secondary { opacity: 0.7 }
.envothemes-admin-notice a.button-secondary:hover { opacity: 0.9 }
.envothemes-admin-notice a { text-decoration: none;color: #3ba1da }
.envothemes-admin-notice a:hover { color: #44b0ec }
/* RTL */
body.rtl .oe-plugin-installer { right: -1%; left: auto; }
body.rtl .oe-plugin-installer .plugin { text-align: right; }
body.rtl .oe-plugin-installer .plugin-wrap { padding: 20px 145px 95px 20px; }
body.rtl .oe-plugin-installer .plugin-wrap img { right: 20px; left: auto; }
body.rtl .oe-plugin-installer .activation-row { border-radius: 0 2px 2px 0; border-radius: 0 2px 2px 0; text-align: right; }
body.rtl .oe-plugin-installer .activation-row li { margin: 0 0 0 10px; }
body.rtl .oe-plugin-installer li.ribbon { float: left; }
/* Responsive */
@media only screen and (max-width: 1280px) {
.envothemes-admin-notice { text-align: center; }
.envothemes-admin-notice .alignleft,
.envothemes-admin-notice .alignright { float: none; }
.envothemes-admin-notice .alignleft { line-height: 1.5; }
.envothemes-admin-notice a.button-primary { margin: 15px 0 5px; }
}
@media screen and (max-width: 1170px) {
.oe-plugin-installer .plugin { width: 48%; margin: 0 1% 15px; }
}
@media screen and (max-width: 960px) {
.oe-plugin-installer .plugin-wrap { padding: 20px 20px 95px 115px; min-height: 214px; }
.oe-plugin-installer .plugin-wrap img { max-width: 78px; max-height: 78px; }
body.rtl .oe-plugin-installer .plugin-wrap { padding: 20px 115px 95px 20px; }
}
@media screen and (max-width: 640px) {
.oe-plugin-installer { width: 100%; position: static; }
.oe-plugin-installer .plugin { width: 100%; margin: 0 0 20px; }
}
@media only screen and (max-width: 320px) {
.envothemes-admin-notice a.button-primary { padding: 12px 18px; }
}
@@ -0,0 +1 @@
.oe-plugin-installer,.oe-plugin-installer *{box-sizing:border-box}.wp-core-ui .button-link:focus,.wp-core-ui .button-secondary:focus,.wp-core-ui .button.focus,.wp-core-ui .button:focus,a:focus{-webkit-box-shadow:none;box-shadow:none}.wp-core-ui .button-link:focus,.wp-core-ui .button-secondary:focus,.wp-core-ui .button.focus,.wp-core-ui .button:focus{border-color:#999}.wrap .envothemes-desc{padding:10px 15px;margin:12px 0 25px}.wrap .envothemes-callout{background-color:#fff;color:#444;border:1px solid #e5e5e5;padding:22px 20px;border-radius:3px;box-shadow:0 1px 1px rgba(0,0,0,.04)}.wrap .envothemes-callout p{margin:0}.oe-plugin-installer{display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;flex-flow:row wrap;-webkit-flex-flow:row wrap;justify-content:space-between;width:102%;position:relative;left:-1%}.oe-plugin-installer:after{content:'';flex:auto}.oe-plugin-installer .plugin{width:31.333%;margin:0 1% 30px;padding:0;overflow:hidden;text-align:left;border:1px solid #e1e1e1;background:#fff;position:relative;border-radius:2px}.oe-plugin-installer .plugin:hover{border-color:#cecece}.oe-plugin-installer .plugin-wrap{padding:20px 20px 95px 145px;min-height:214px;display:block;position:relative}.oe-plugin-installer .plugin-wrap a,.oe-plugin-installer li a{text-decoration:none}.oe-plugin-installer .plugin-wrap img{display:block;position:absolute;left:20px;top:20px;max-width:108px;max-height:108px;border:1px solid #f7f7f7}.oe-plugin-installer .plugin-wrap h2,.oe-plugin-installer .plugin-wrap p{padding:0;margin:0;font-size:17px;font-weight:600;color:#333;line-height:1.4}.oe-plugin-installer .plugin-wrap p{padding:10px 0 0;margin:0;font-size:14px;font-weight:400;color:#777}.oe-plugin-installer .plugin-wrap p.plugin-author{font-size:13px;padding-top:20px;font-style:italic}.oe-plugin-installer .activation-row{display:block;margin:0;padding:20px;background:#f7f7f7;border-top:1px solid #e1e1e1;position:absolute;bottom:0;width:100%;overflow:hidden;border-radius:0 0 2px 2px;text-align:left}.envothemes-admin-notice a.button-primary,.oe-plugin-installer li.ribbon{font-weight:600;text-transform:uppercase;letter-spacing:1px;text-align:center}.oe-plugin-installer .activation-row li{display:inline-block;vertical-align:top;margin:0 10px 0 0;font-size:13px;line-height:27px}.oe-plugin-installer li.ribbon{float:right;background-color:#67ce6b;color:#fff;padding:0 10px;font-size:12px;border-radius:3px;margin:0}.envothemes-admin-notice{display:inline-block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:12px 0 25px;padding:12px 16px;width:100%;box-shadow:0 1px 1px rgba(0,0,0,.04);border:1px solid #e5e5e5;background-color:#fff;color:#555;font-size:13px}.envothemes-admin-notice .alignleft{font-size:15px;line-height:38px}.envothemes-admin-notice a.button-primary{height:auto;font-size:13px;line-height:1;background-color:#13aff0;border:0;color:#fff;padding:12px 25px;border-radius:30px;transition:all .3s ease;-webkit-transition:all .3s ease;-moz-transition:all .3s ease;-o-transition:all .3s ease;-ms-transition:all .3s ease;text-shadow:none;-webkit-box-shadow:none;box-shadow:none}.envothemes-admin-notice a.button-primary:hover{background-color:#0b7cac}.envothemes-admin-notice a.button-secondary{opacity:.7}.envothemes-admin-notice a.button-secondary:hover{opacity:.9}.envothemes-admin-notice a{text-decoration:none;color:#3ba1da}.envothemes-admin-notice a:hover{color:#44b0ec}body.rtl .oe-plugin-installer{right:-1%;left:auto}body.rtl .oe-plugin-installer .plugin{text-align:right}body.rtl .oe-plugin-installer .plugin-wrap{padding:20px 145px 95px 20px}body.rtl .oe-plugin-installer .plugin-wrap img{right:20px;left:auto}body.rtl .oe-plugin-installer .activation-row{border-radius:0 2px 2px 0;text-align:right}body.rtl .oe-plugin-installer .activation-row li{margin:0 0 0 10px}body.rtl .oe-plugin-installer li.ribbon{float:left}@media only screen and (max-width:1280px){.envothemes-admin-notice{text-align:center}.envothemes-admin-notice .alignleft,.envothemes-admin-notice .alignright{float:none}.envothemes-admin-notice .alignleft{line-height:1.5}.envothemes-admin-notice a.button-primary{margin:15px 0 5px}}@media screen and (max-width:1170px){.oe-plugin-installer .plugin{width:48%;margin:0 1% 15px}}@media screen and (max-width:960px){.oe-plugin-installer .plugin-wrap{padding:20px 20px 95px 115px;min-height:214px}.oe-plugin-installer .plugin-wrap img{max-width:78px;max-height:78px}body.rtl .oe-plugin-installer .plugin-wrap{padding:20px 115px 95px 20px}}@media screen and (max-width:640px){.oe-plugin-installer{width:100%;position:static}.oe-plugin-installer .plugin{width:100%;margin:0 0 20px}}@media only screen and (max-width:320px){.envothemes-admin-notice a.button-primary{padding:12px 18px}}
@@ -0,0 +1,82 @@
/* review notice */
.envo-review-notice{
padding: 50px 25px;
background-color: #fff;
border-radius: 3px;
margin: 20px 20px 0 0;
border-left: 4px solid transparent;
}
.envo-review-notice:after{
content: '';
display: table;
clear: both;
}
.envo-review-thumbnail{
float: left;
line-height: 85px;
text-align: center;
position: relative;
display: block;
width: 85px;
height: 85px;
background: #424242;
border-radius: 100%;
margin: auto 10px;
}
.envo-review-thumbnail img {
width: 55px;
vertical-align: middle;
opacity: .85;
transition: all .3s;
}
.envo-shop-notice .envo-review-thumbnail {
background: #f1f1f1;
width: 155px;
height: 155px;
margin-right: 45px;
margin-top: -30px;
margin-bottom: -30px;
}
.envo-shop-notice .envo-review-thumbnail img {
width: 196px;
opacity: 1;
margin-left: -20px;
margin-top: 7px;
}
.envo-review-thumbnail img:hover {
opacity: 1;
}
.envo-review-text{
overflow: hidden;
}
.envo-review-text h3{
font-size: 24px;
margin: 0 0 5px;
font-weight: 400;
line-height: 1.3;
}
.envo-review-text p{
font-size: 13px;
margin: 0 0 5px;
}
.envo-review-ul{
margin: 0;
padding: 0;
}
.envo-review-ul li{
display: inline-block;
margin-right: 15px;
}
.envo-review-ul li a{
display: inline-block;
color: #10738B;
text-decoration: none;
padding-left: 26px;
position: relative;
}
.envo-review-ul li a span{
position: absolute;
left: 0;
top: -2px;
}
@@ -0,0 +1,520 @@
( function ( $ ) {
"use strict";
$( document ).ready( function () {
EnvoDemoImport.init();
} );
var EnvoDemoImport = {
importData: { },
allowPopupClosing: true,
init: function () {
var that = this;
// Categories filter
this.categoriesFilter();
// Search functionality.
$( '.envo-search-input' ).on( 'keyup', function () {
if ( 0 < $( this ).val().length ) {
// Hide all items.
$( '.envo-demo-wrap .themes' ).find( '.theme-wrap' ).hide();
// Show just the ones that have a match on the import name.
$( '.envo-demo-wrap .themes' ).find( '.theme-wrap[data-name*="' + $( this ).val().toLowerCase() + '"]' ).show();
} else {
$( '.envo-demo-wrap .themes' ).find( '.theme-wrap' ).show();
}
} );
// Prevent the popup from showing when the live preview button
$( '.envo-demo-wrap .theme-actions a.button' ).on( 'click', function ( e ) {
e.stopPropagation();
} );
// Get demo data
$( '.envo-open-popup' ).click( function ( e ) {
e.preventDefault();
// Vars
var $selected_demo = $( this ).data( 'demo-id' ),
$loading_icon = $( '.preview-' + $selected_demo ),
$disable_preview = $( '.preview-all-' + $selected_demo );
$loading_icon.show();
$disable_preview.show();
that.getDemoData( $selected_demo );
} );
$( document ).on( 'click', '.install-now', this.installNow );
$( document ).on( 'click', '.activate-now', this.activatePlugins );
$( document ).on( 'wp-plugin-install-success', this.installSuccess );
$( document ).on( 'wp-plugin-installing', this.pluginInstalling );
$( document ).on( 'wp-plugin-install-error', this.installError );
},
// Category filter.
categoriesFilter: function () {
// Cache selector to all items
var $items = $( '.envo-demo-wrap .themes' ).find( '.theme-wrap' ),
fadeoutClass = 'envo-is-fadeout',
fadeinClass = 'envo-is-fadein',
animationDuration = 200;
// Hide all items.
var fadeOut = function () {
var dfd = $.Deferred();
$items.addClass( fadeoutClass );
setTimeout( function () {
$items.removeClass( fadeoutClass ).hide();
dfd.resolve();
}, animationDuration );
return dfd.promise();
};
var fadeIn = function ( category, dfd ) {
var filter = category ? '[data-categories*="' + category + '"]' : 'div';
if ( 'all' === category ) {
filter = 'div';
}
$items.filter( filter ).show().addClass( 'envo-is-fadein' );
setTimeout( function () {
$items.removeClass( fadeinClass );
dfd.resolve();
}, animationDuration );
};
var animate = function ( category ) {
var dfd = $.Deferred();
var promise = fadeOut();
promise.done( function () {
fadeIn( category, dfd );
} );
return dfd;
};
$( '.envo-navigation-link' ).on( 'click', function ( event ) {
event.preventDefault();
// Remove 'active' class from the previous nav list items.
$( this ).parent().siblings().removeClass( 'active' );
// Add the 'active' class to this nav list item.
$( this ).parent().addClass( 'active' );
var category = this.hash.slice( 1 );
// show/hide the right items, based on category selected
var $container = $( '.envo-demo-wrap .themes' );
$container.css( 'min-width', $container.outerHeight() );
var promise = animate( category );
promise.done( function () {
$container.removeAttr( 'style' );
} );
} );
},
// Get demo data.
getDemoData: function ( demo_name ) {
var that = this;
// Get import data
$.ajax( {
url: envoDemos.ajaxurl,
type: 'get',
data: {
action: 'envo_ajax_get_import_data',
demo_name: demo_name,
security: envoDemos.envo_import_data_nonce
},
complete: function ( data ) {
that.importData = $.parseJSON( data.responseText );
}
} );
// Run the import
$.ajax( {
url: envoDemos.ajaxurl,
type: 'get',
data: {
action: 'envo_ajax_get_demo_data',
demo_name: demo_name,
demo_data_nonce: envoDemos.demo_data_nonce
},
complete: function ( data ) {
that.runPopup( data );
// Vars
var $loading_icon = $( '.preview-' + demo_name ),
$disable_preview = $( '.preview-all-' + demo_name );
// Hide loader
$loading_icon.hide();
$disable_preview.hide();
}
} );
},
// Run popup.
runPopup: function ( data ) {
var that = this
var innerWidth = $( 'html' ).innerWidth();
$( 'html' ).css( 'overflow', 'hidden' );
var hiddenInnerWidth = $( 'html' ).innerWidth();
$( 'html' ).css( 'margin-right', hiddenInnerWidth - innerWidth );
// Show popup
$( '#envo-demo-popup-wrap' ).fadeIn();
$( data.responseText ).appendTo( $( '#envo-demo-popup-content' ) );
// Close popup
$( '.envo-demo-popup-close, .envo-demo-popup-overlay' ).on( 'click', function ( e ) {
e.preventDefault();
if ( that.allowPopupClosing === true ) {
that.closePopup();
}
} );
// Display the step two
$( '.envo-plugins-next' ).on( 'click', function ( e ) {
e.preventDefault();
// Hide step one
$( '#envo-demo-plugins' ).hide();
// Display step two
$( '#envo-demo-import-form' ).show();
} );
// if clicked on import data button
$( '#envo-demo-import-form' ).submit( function ( e ) {
e.preventDefault();
// Vars
var demo = $( this ).find( '[name="envo_import_demo"]' ).val(),
nonce = $( this ).find( '[name="envo_import_demo_data_nonce"]' ).val(),
contentToImport = [ ];
// Check what need to be imported
$( this ).find( 'input[type="checkbox"]' ).each( function () {
if ( $( this ).is( ':checked' ) === true ) {
contentToImport.push( $( this ).attr( 'name' ) );
}
} );
// Hide the checkboxes and show the loader
$( this ).hide();
$( '.envo-loader' ).show();
// Start importing the content
that.importContent( {
demo: demo,
nonce: nonce,
contentToImport: contentToImport,
isXML: $( '#envo_import_xml' ).is( ':checked' )
} );
} );
},
// importing the content.
importContent: function ( importData ) {
var that = this,
currentContent,
importingLimit,
timerStart = Date.now(),
ajaxData = {
envo_import_demo: importData.demo,
envo_import_demo_data_nonce: importData.nonce
};
this.allowPopupClosing = false;
$( '.envo-demo-popup-close' ).fadeOut();
// When all the selected content has been imported
if ( importData.contentToImport.length === 0 ) {
// Show the imported screen after 1 second
setTimeout( function () {
$( '.envo-loader' ).hide();
$( '.envo-last' ).show();
}, 1000 );
// Notify the server that the importing process is complete
$.ajax( {
url: envoDemos.ajaxurl,
type: 'post',
data: {
action: 'envo_after_import',
envo_import_demo: importData.demo,
envo_import_demo_data_nonce: importData.nonce,
envo_import_is_xml: importData.isXML
},
complete: function ( data ) {}
} );
this.allowPopupClosing = true;
$( '.envo-demo-popup-close' ).fadeIn();
return;
}
// Check the content that was selected to be imported.
for ( var key in this.importData ) {
// Check if the current item in the iteration is in the list of importable content
var contentIndex = $.inArray( this.importData[ key ][ 'input_name' ], importData.contentToImport );
// If it is:
if ( contentIndex !== -1 ) {
// Get a reference to the current content
currentContent = key;
// Remove the current content from the list of remaining importable content
importData.contentToImport.splice( contentIndex, 1 );
// Get the AJAX action name that corresponds to the current content
ajaxData.action = this.importData[ key ]['action'];
// After an item is found get out of the loop and execute the rest of the function
break;
}
}
// Tell the user which content is currently being imported
$( '.envo-import-status' ).append( '<p class="envo-importing">' + this.importData[ currentContent ]['loader'] + '</p>' );
// Tell the server to import the current content
var ajaxRequest = $.ajax( {
url: envoDemos.ajaxurl,
type: 'post',
data: ajaxData,
complete: function ( data ) {
clearTimeout( importingLimit );
// Indicates if the importing of the content can continue
var continueProcess = true;
// Check if the importing of the content was successful or if there was any error
if ( data.status === 500 || data.status === 502 || data.status === 503 ) {
$( '.envo-importing' )
.addClass( 'envo-importing-failed' )
.removeClass( 'envo-importing' )
.text( envoDemos.content_importing_error + ' ' + data.status );
} else if ( data.responseText.indexOf( 'successful import' ) !== -1 ) {
$( '.envo-importing' ).addClass( 'envo-imported' ).removeClass( 'envo-importing' );
} else {
var errors = $.parseJSON( data.responseText ),
errorMessage = '';
// Iterate through the list of errors
for ( var error in errors ) {
errorMessage += errors[ error ];
// If there was an error with the importing of the XML file, stop the process
if ( error === 'xml_import_error' ) {
continueProcess = false;
}
}
// Display the error message
$( '.envo-importing' )
.addClass( 'envo-importing-failed' )
.removeClass( 'envo-importing' )
.text( errorMessage );
that.allowPopupClosing = true;
$( '.envo-demo-popup-close' ).fadeIn();
}
// Continue with the loading only if an important error was not encountered
if ( continueProcess === true ) {
// Load the next content in the list
that.importContent( importData );
}
}
} );
// Set a time limit of 15 minutes for the importing process.
importingLimit = setTimeout( function () {
// Abort the AJAX request
ajaxRequest.abort();
// Allow the popup to be closed
that.allowPopupClosing = true;
$( '.envo-demo-popup-close' ).fadeIn();
$( '.envo-importing' )
.addClass( 'envo-importing-failed' )
.removeClass( 'envo-importing' )
.text( envoDemos.content_importing_error );
}, 15 * 60 * 1000 );
},
// Close demo popup.
closePopup: function () {
$( 'html' ).css( {
'overflow': '',
'margin-right': ''
} );
// Hide loader
$( '.preview-icon' ).hide();
$( '.preview-all' ).hide();
// Hide demo popup
$( '#envo-demo-popup-wrap' ).fadeOut();
// Remove content in the popup
setTimeout( function () {
$( '#envo-demo-popup-content' ).html( '' );
}, 600 );
},
// Install required plugins.
installNow: function ( e ) {
e.preventDefault();
// Vars
var $button = $( e.target ),
$document = $( document );
if ( $button.hasClass( 'updating-message' ) || $button.hasClass( 'button-disabled' ) ) {
return;
}
if ( wp.updates.shouldRequestFilesystemCredentials && !wp.updates.ajaxLocked ) {
wp.updates.requestFilesystemCredentials( e );
$document.on( 'credential-modal-cancel', function () {
var $message = $( '.install-now.updating-message' );
$message
.removeClass( 'updating-message' )
.text( wp.updates.l10n.installNow );
wp.a11y.speak( wp.updates.l10n.updateCancel, 'polite' );
} );
}
wp.updates.installPlugin( {
slug: $button.data( 'slug' )
} );
},
// Activate required plugins.
activatePlugins: function ( e ) {
e.preventDefault();
// Vars
var $button = $( e.target ),
$init = $button.data( 'init' ),
$slug = $button.data( 'slug' );
if ( $button.hasClass( 'updating-message' ) || $button.hasClass( 'button-disabled' ) ) {
return;
}
$button.addClass( 'updating-message button-primary' ).html( envoDemos.button_activating );
$.ajax( {
url: envoDemos.ajaxurl,
type: 'POST',
data: {
action: 'envo_ajax_required_plugins_activate',
init: $init,
},
} ).done( function ( result ) {
if ( result.success ) {
$button.removeClass( 'button-primary install-now activate-now updating-message' )
.attr( 'disabled', 'disabled' )
.addClass( 'disabled' )
.text( envoDemos.button_active );
}
} );
},
// Install success.
installSuccess: function ( e, response ) {
e.preventDefault();
var $message = $( '.envo-plugin-' + response.slug ).find( '.button' );
// Transform the 'Install' button into an 'Activate' button.
var $init = $message.data( 'init' );
$message.removeClass( 'install-now installed button-disabled updated-message' )
.addClass( 'updating-message' )
.html( envoDemos.button_activating );
// WordPress adds "Activate" button after waiting for 1000ms. So we will run our activation after that.
setTimeout( function () {
$.ajax( {
url: envoDemos.ajaxurl,
type: 'POST',
data: {
action: 'envo_ajax_required_plugins_activate',
init: $init,
},
} ).done( function ( result ) {
if ( result.success ) {
$message.removeClass( 'button-primary install-now activate-now updating-message' )
.attr( 'disabled', 'disabled' )
.addClass( 'disabled' )
.text( envoDemos.button_active );
} else {
$message.removeClass( 'updating-message' );
}
} );
}, 1200 );
},
// Plugin installing.
pluginInstalling: function ( e, args ) {
e.preventDefault();
var $card = $( '.envo-plugin-' + args.slug ),
$button = $card.find( '.button' );
$button.addClass( 'updating-message' );
},
// Plugin install error.
installError: function ( e, response ) {
e.preventDefault();
var $card = $( '.envo-plugin-' + response.slug );
$card.removeClass( 'button-primary' ).addClass( 'disabled' ).html( wp.updates.l10n.installFailedShort );
}
};
} )( jQuery );
File diff suppressed because one or more lines are too long
@@ -0,0 +1,167 @@
var oe_installer = oe_installer || {};
jQuery( document ).ready( function( $ ) {
"use strict";
var is_loading = false;
/**
* Install the plugin
*/
oe_installer.install_plugin = function( el, plugin ) {
// Confirm activation
var r = confirm( oe_installer_localize.install_now );
if ( r ) {
is_loading = true;
el.addClass( 'installing' );
$.ajax( {
type : 'POST',
url : oe_installer_localize.ajax_url,
data : {
action : 'oe_plugin_installer',
plugin : plugin,
nonce : oe_installer_localize.admin_nonce,
dataType : 'json'
},
success: function( data ) {
if ( data ){
if ( data.status === 'success' ) {
el.attr( 'class', 'activate button button-primary' );
el.html( oe_installer_localize.activate_btn );
} else {
el.removeClass( 'installing' );
}
} else {
el.removeClass( 'installing' );
}
is_loading = false;
},
error: function( xhr, status, error ) {
console.log( status );
el.removeClass( 'installing' );
is_loading = false;
}
} );
}
}
/**
* Activate the plugin
*/
oe_installer.activate_plugin = function( el, plugin ) {
$.ajax( {
type : 'POST',
url : oe_installer_localize.ajax_url,
data : {
action : 'oe_plugin_activation',
plugin : plugin,
nonce : oe_installer_localize.admin_nonce,
dataType : 'json'
},
success: function( data ) {
if ( data ) {
if ( data.status === 'success' ) {
el.attr( 'class', 'installed button disabled' );
el.html( oe_installer_localize.installed_btn );
}
}
is_loading = false;
},
error: function( xhr, status, error ) {
console.log( status );
is_loading = false;
}
} );
};
/**
* Activate the premium lugin
*/
oe_installer.activate_premium_plugin = function( el, plugin ) {
$.ajax( {
type : 'POST',
url : oe_installer_localize.ajax_url,
data : {
action : 'oe_premium_plugin_activation',
plugin : plugin,
nonce : oe_installer_localize.admin_nonce,
dataType : 'json'
},
success: function( data ) {
if ( data ) {
if ( data.status === 'success' ) {
el.attr( 'class', 'installed button disabled' );
el.html( oe_installer_localize.installed_btn );
}
}
is_loading = false;
},
error: function( xhr, status, error ) {
console.log( status );
is_loading = false;
}
} );
};
/**
* Install/Activate Button Click
*/
$( document ).on( 'click', '.oe-plugin-installer a.button:not(.premium-link)', function( e ) {
var el = $( this ),
plugin = el.data( 'slug' );
e.preventDefault();
if ( ! el.hasClass( 'disabled' ) ) {
if ( is_loading ) return false;
// Installation
if ( el.hasClass( 'install' ) ) {
oe_installer.install_plugin( el, plugin );
}
// Activation
if ( el.hasClass( 'activate' ) ) {
oe_installer.activate_plugin( el, plugin );
}
}
} );
/**
* Activate Premium Extension
*/
$( document ).on( 'click', '.oe-plugin-installer a.button.premium-activation', function( e ) {
var el = $( this ),
plugin = el.data( 'slug' );
e.preventDefault();
if ( ! el.hasClass( 'disabled' ) ) {
if ( is_loading ) return false;
// Activation
if ( el.hasClass( 'activate' ) ) {
oe_installer.activate_premium_plugin( el, plugin );
}
}
} );
});
@@ -0,0 +1 @@
var oe_installer=oe_installer||{};jQuery(document).ready(function(a){"use strict";var b=!1;oe_installer.install_plugin=function(c,d){var e=confirm(oe_installer_localize.install_now);e&&(b=!0,c.addClass("installing"),a.ajax({type:"POST",url:oe_installer_localize.ajax_url,data:{action:"oe_plugin_installer",plugin:d,nonce:oe_installer_localize.admin_nonce,dataType:"json"},success:function(a){a&&"success"===a.status?(c.attr("class","activate button button-primary"),c.html(oe_installer_localize.activate_btn)):c.removeClass("installing"),b=!1},error:function(a,d,e){console.log(d),c.removeClass("installing"),b=!1}}))},oe_installer.activate_plugin=function(c,d){a.ajax({type:"POST",url:oe_installer_localize.ajax_url,data:{action:"oe_plugin_activation",plugin:d,nonce:oe_installer_localize.admin_nonce,dataType:"json"},success:function(a){a&&"success"===a.status&&(c.attr("class","installed button disabled"),c.html(oe_installer_localize.installed_btn)),b=!1},error:function(a,c,d){console.log(c),b=!1}})},oe_installer.activate_premium_plugin=function(c,d){a.ajax({type:"POST",url:oe_installer_localize.ajax_url,data:{action:"oe_premium_plugin_activation",plugin:d,nonce:oe_installer_localize.admin_nonce,dataType:"json"},success:function(a){a&&"success"===a.status&&(c.attr("class","installed button disabled"),c.html(oe_installer_localize.installed_btn)),b=!1},error:function(a,c,d){console.log(c),b=!1}})},a(document).on("click",".oe-plugin-installer a.button:not(.premium-link)",function(c){var d=a(this),e=d.data("slug");if(c.preventDefault(),!d.hasClass("disabled")){if(b)return!1;d.hasClass("install")&&oe_installer.install_plugin(d,e),d.hasClass("activate")&&oe_installer.activate_plugin(d,e)}}),a(document).on("click",".oe-plugin-installer a.button.premium-activation",function(c){var d=a(this),e=d.data("slug");if(c.preventDefault(),!d.hasClass("disabled")){if(b)return!1;d.hasClass("activate")&&oe_installer.activate_premium_plugin(d,e)}})});
@@ -0,0 +1,137 @@
<?php
/**
* Install demos page
*
* @package EnvoThemes_Demo_Import
* @category Core
* @author EnvoThemes
*/
// Exit if accessed directly
if (!defined('ABSPATH')) {
exit;
}
// Start Class
class envo_Install_Demos {
/**
* Start things up
*/
public function __construct() {
add_action('admin_menu', array($this, 'add_page'), 999);
}
/**
* Add sub menu page for the custom CSS input
*
* @since 1.0.0
*/
public function add_page() {
$title = esc_html__('Install Demos', 'envothemes-demo-import');
add_theme_page(
esc_html__('Install Demos', 'envothemes-demo-import'),
$title,
'manage_options',
'envothemes-panel-install-demos',
array($this, 'create_admin_page')
);
}
/**
* Settings page output
*
* @since 1.0.0
*/
public function create_admin_page() {
// Theme branding
$brand = 'EnvoThemes'
?>
<div class="envo-demo-wrap wrap">
<h2><?php echo esc_html($brand); ?> - <?php esc_html_e('Install Demos', 'envothemes-demo-import'); ?></h2>
<div class="theme-browser rendered">
<?php
// Vars
$demos = EnvoThemes_Demos::get_demos_data();
$categories = EnvoThemes_Demos::get_demo_all_categories($demos);
?>
<?php if (!empty($categories)) : ?>
<div class="envo-header-bar">
<nav class="envo-navigation">
<ul>
<li class="active"><a href="#all" class="envo-navigation-link"><?php esc_html_e('All', 'envothemes-demo-import'); ?></a></li>
<?php foreach ($categories as $key => $name) : ?>
<li><a href="#<?php echo esc_attr($key); ?>" class="envo-navigation-link"><?php echo esc_html($name); ?></a></li>
<?php endforeach; ?>
</ul>
</nav>
<div clas="envo-search">
<input type="text" class="envo-search-input" name="envo-search" value="" placeholder="<?php esc_html_e('Search demos...', 'envothemes-demo-import'); ?>">
</div>
</div>
<?php endif; ?>
<div class="themes wp-clearfix">
<?php
// Loop through all demos
foreach ($demos as $demo => $key) {
// Vars
$item_categories = EnvoThemes_Demos::get_demo_item_categories($key);
$pro = isset($key['required_plugins']) ? $key['required_plugins'] : '';
?>
<div class="theme-wrap" data-categories="<?php echo esc_attr($item_categories); ?>" data-name="<?php echo esc_attr(strtolower($demo)); ?>">
<div class="theme envo-open-popup" data-demo-id="<?php echo esc_attr($demo); ?>">
<div class="theme-screenshot">
<img src="<?php echo esc_url($key['screenshot']); ?>" />
<div class="demo-import-loader preview-all preview-all-<?php echo esc_attr($demo); ?>"></div>
<div class="demo-import-loader preview-icon preview-<?php echo esc_attr($demo); ?>"><i class="custom-loader"></i></div>
<?php if (isset($pro['premium']) && !empty($pro['premium'])) { ?>
<div class="pro-badge">
<?php esc_html_e('PRO', 'envo-extra'); ?>
</div>
<?php } ?>
</div>
<div class="theme-id-container">
<h2 class="theme-name" id="<?php echo esc_attr($demo); ?>"><span><?php echo esc_html($key['demo_name']); ?></span></h2>
<div class="theme-actions">
<a class="button button-primary" href="https://enwoo-demos.com/<?php echo esc_attr($demo); ?>" target="_blank"><?php esc_html_e('Live Preview', 'envothemes-demo-import'); ?></a>
</div>
</div>
</div>
</div>
<?php } ?>
</div>
</div>
</div>
<?php
}
}
new envo_Install_Demos();
@@ -0,0 +1,112 @@
<?php
/**
* Helpers class
*/
class Envo_Demos_Helpers {
/**
* Gets and returns url body using wp_remote_get
*
* @since 1.0.0
*/
public static function get_remote($url) {
// Get data
$response = wp_remote_get($url);
// Check for errors
if (is_wp_error($response) or ( wp_remote_retrieve_response_code($response) != 200 )) {
return false;
}
// Get remote body val
$body = wp_remote_retrieve_body($response);
// Return data
if (!empty($body)) {
return $body;
} else {
return false;
}
}
/**
* Perform a HTTP HEAD or GET request.
*
* If $file_path is a writable filename, this will do a GET request and write
* the file to that path.
*
* This is a re-implementation of the deprecated wp_get_http() function from WP Core,
* but this time using the recommended WP_Http() class and the WordPress filesystem.
*
* @param string $url URL to fetch.
* @param string|bool $file_path Optional. File path to write request to. Default false.
* @param array $args Optional. Arguments to be passed-on to the request.
* @return bool|string False on failure and string of headers if HEAD request.
*/
public static function wp_get_http($url, $file_path = false, $red = 1) {
// No need to proceed if we don't have a $url or a $file_path.
if (!$url || !$file_path) {
return false;
}
$try_file_get_contents = false;
// Make sure we normalize $file_path.
$file_path = wp_normalize_path($file_path);
// Include the WP_Http class if it doesn't already exist.
if (!class_exists('WP_Http')) {
include_once( wp_normalize_path(ABSPATH . WPINC . '/class-http.php') );
}
// Inlude the wp_remote_get function if it doesn't already exist.
if (!function_exists('wp_remote_get')) {
include_once( wp_normalize_path(ABSPATH . WPINC . '/http.php') );
}
$args = wp_parse_args($args, array(
'timeout' => 30,
'user-agent' => 'avada-user-agent',
));
$response = wp_remote_get(esc_url_raw($url), $args);
$body = wp_remote_retrieve_body($response);
// Try file_get_contents if body is empty.
if (empty($body)) {
if (function_exists('ini_get') && ini_get('allow_url_fopen')) {
$body = @file_get_contents($url);
}
}
// Initialize the WordPress filesystem.
global $wp_filesystem;
if (empty($wp_filesystem)) {
require_once( ABSPATH . '/wp-admin/includes/file.php' );
WP_Filesystem();
}
// Attempt to write the file.
if (!$wp_filesystem->put_contents($file_path, $body, FS_CHMOD_FILE)) {
// If the attempt to write to the file failed, then fallback to fwrite.
@unlink($file_path);
$fp = fopen($file_path, 'w');
$written = fwrite($fp, $body);
fclose($fp);
if (false === $written) {
return false;
}
}
// If all went well, then return the headers of the request.
if (isset($response['headers'])) {
$response['headers']['response'] = $response['response']['code'];
return $response['headers'];
}
// If all else fails, then return false.
return false;
}
}
@@ -0,0 +1,712 @@
<?php
/**
* WordPress eXtended RSS file parser implementations
*
* @package WordPress
* @subpackage Importer
*/
/**
* WordPress Importer class for managing parsing of WXR files.
*/
class WXR_Parser {
function parse($file) {
// Attempt to use proper XML parsers first
if (extension_loaded('simplexml')) {
$parser = new WXR_Parser_SimpleXML;
$result = $parser->parse($file);
// If SimpleXML succeeds or this is an invalid WXR file then return the results
if (!is_wp_error($result) || 'SimpleXML_parse_error' != $result->get_error_code())
return $result;
} else if (extension_loaded('xml')) {
$parser = new WXR_Parser_XML;
$result = $parser->parse($file);
// If XMLParser succeeds or this is an invalid WXR file then return the results
if (!is_wp_error($result) || 'XML_parse_error' != $result->get_error_code())
return $result;
}
// We have a malformed XML file, so display the error and fallthrough to regex
if (isset($result) && defined('IMPORT_DEBUG') && IMPORT_DEBUG) {
echo '<pre>';
if ('SimpleXML_parse_error' == $result->get_error_code()) {
foreach ($result->get_error_data() as $error)
echo $error->line . ':' . $error->column . ' ' . esc_html($error->message) . "\n";
} else if ('XML_parse_error' == $result->get_error_code()) {
$error = $result->get_error_data();
echo $error[0] . ':' . $error[1] . ' ' . esc_html($error[2]);
}
echo '</pre>';
echo '<p><strong>' . esc_html__('There was an error when reading this WXR file', 'wordpress-importer') . '</strong><br />';
echo esc_html__('Details are shown above. The importer will now try again with a different parser...', 'wordpress-importer') . '</p>';
}
// use regular expressions if nothing else available or this is bad XML
$parser = new WXR_Parser_Regex;
return $parser->parse($file);
}
}
/**
* WXR Parser that makes use of the SimpleXML PHP extension.
*/
class WXR_Parser_SimpleXML {
function parse($file) {
$authors = $posts = $categories = $tags = $terms = array();
$internal_errors = libxml_use_internal_errors(true);
$dom = new DOMDocument;
$old_value = null;
if (function_exists('libxml_disable_entity_loader')) {
$old_value = libxml_disable_entity_loader(true);
}
$success = $dom->loadXML(file_get_contents($file));
if (!is_null($old_value)) {
libxml_disable_entity_loader($old_value);
}
if (!$success || isset($dom->doctype)) {
return new WP_Error('SimpleXML_parse_error', __('There was an error when reading this WXR file', 'wordpress-importer'), libxml_get_errors());
}
$xml = simplexml_import_dom($dom);
unset($dom);
// halt if loading produces an error
if (!$xml)
return new WP_Error('SimpleXML_parse_error', __('There was an error when reading this WXR file', 'wordpress-importer'), libxml_get_errors());
$wxr_version = $xml->xpath('/rss/channel/wp:wxr_version');
if (!$wxr_version)
return new WP_Error('WXR_parse_error', __('This does not appear to be a WXR file, missing/invalid WXR version number', 'wordpress-importer'));
$wxr_version = (string) trim($wxr_version[0]);
// confirm that we are dealing with the correct file format
if (!preg_match('/^\d+\.\d+$/', $wxr_version))
return new WP_Error('WXR_parse_error', __('This does not appear to be a WXR file, missing/invalid WXR version number', 'wordpress-importer'));
$base_url = $xml->xpath('/rss/channel/wp:base_site_url');
$base_url = (string) trim($base_url[0]);
$namespaces = $xml->getDocNamespaces();
if (!isset($namespaces['wp']))
$namespaces['wp'] = 'http://wordpress.org/export/1.1/';
if (!isset($namespaces['excerpt']))
$namespaces['excerpt'] = 'http://wordpress.org/export/1.1/excerpt/';
// grab authors
foreach ($xml->xpath('/rss/channel/wp:author') as $author_arr) {
$a = $author_arr->children($namespaces['wp']);
$login = (string) $a->author_login;
$authors[$login] = array(
'author_id' => (int) $a->author_id,
'author_login' => $login,
'author_email' => (string) $a->author_email,
'author_display_name' => (string) $a->author_display_name,
'author_first_name' => (string) $a->author_first_name,
'author_last_name' => (string) $a->author_last_name
);
}
// grab cats, tags and terms
foreach ($xml->xpath('/rss/channel/wp:category') as $term_arr) {
$t = $term_arr->children($namespaces['wp']);
$category = array(
'term_id' => (int) $t->term_id,
'category_nicename' => (string) $t->category_nicename,
'category_parent' => (string) $t->category_parent,
'cat_name' => (string) $t->cat_name,
'category_description' => (string) $t->category_description
);
foreach ($t->termmeta as $meta) {
$category['termmeta'][] = array(
'key' => (string) $meta->meta_key,
'value' => (string) $meta->meta_value
);
}
$categories[] = $category;
}
foreach ($xml->xpath('/rss/channel/wp:tag') as $term_arr) {
$t = $term_arr->children($namespaces['wp']);
$tag = array(
'term_id' => (int) $t->term_id,
'tag_slug' => (string) $t->tag_slug,
'tag_name' => (string) $t->tag_name,
'tag_description' => (string) $t->tag_description
);
foreach ($t->termmeta as $meta) {
$tag['termmeta'][] = array(
'key' => (string) $meta->meta_key,
'value' => (string) $meta->meta_value
);
}
$tags[] = $tag;
}
foreach ($xml->xpath('/rss/channel/wp:term') as $term_arr) {
$t = $term_arr->children($namespaces['wp']);
$term = array(
'term_id' => (int) $t->term_id,
'term_taxonomy' => (string) $t->term_taxonomy,
'slug' => (string) $t->term_slug,
'term_parent' => (string) $t->term_parent,
'term_name' => (string) $t->term_name,
'term_description' => (string) $t->term_description
);
foreach ($t->termmeta as $meta) {
$term['termmeta'][] = array(
'key' => (string) $meta->meta_key,
'value' => (string) $meta->meta_value
);
}
$terms[] = $term;
}
// grab posts
foreach ($xml->channel->item as $item) {
$post = array(
'post_title' => (string) $item->title,
'guid' => (string) $item->guid,
);
$dc = $item->children('http://purl.org/dc/elements/1.1/');
$post['post_author'] = (string) $dc->creator;
$content = $item->children('http://purl.org/rss/1.0/modules/content/');
$excerpt = $item->children($namespaces['excerpt']);
$post['post_content'] = (string) $content->encoded;
$post['post_excerpt'] = (string) $excerpt->encoded;
$wp = $item->children($namespaces['wp']);
$post['post_id'] = (int) $wp->post_id;
$post['post_date'] = (string) $wp->post_date;
$post['post_date_gmt'] = (string) $wp->post_date_gmt;
$post['comment_status'] = (string) $wp->comment_status;
$post['ping_status'] = (string) $wp->ping_status;
$post['post_name'] = (string) $wp->post_name;
$post['status'] = (string) $wp->status;
$post['post_parent'] = (int) $wp->post_parent;
$post['menu_order'] = (int) $wp->menu_order;
$post['post_type'] = (string) $wp->post_type;
$post['post_password'] = (string) $wp->post_password;
$post['is_sticky'] = (int) $wp->is_sticky;
if (isset($wp->attachment_url))
$post['attachment_url'] = (string) $wp->attachment_url;
foreach ($item->category as $c) {
$att = $c->attributes();
if (isset($att['nicename']))
$post['terms'][] = array(
'name' => (string) $c,
'slug' => (string) $att['nicename'],
'domain' => (string) $att['domain']
);
}
foreach ($wp->postmeta as $meta) {
$post['postmeta'][] = array(
'key' => (string) $meta->meta_key,
'value' => (string) $meta->meta_value
);
}
foreach ($wp->comment as $comment) {
$meta = array();
if (isset($comment->commentmeta)) {
foreach ($comment->commentmeta as $m) {
$meta[] = array(
'key' => (string) $m->meta_key,
'value' => (string) $m->meta_value
);
}
}
$post['comments'][] = array(
'comment_id' => (int) $comment->comment_id,
'comment_author' => (string) $comment->comment_author,
'comment_author_email' => (string) $comment->comment_author_email,
'comment_author_IP' => (string) $comment->comment_author_IP,
'comment_author_url' => (string) $comment->comment_author_url,
'comment_date' => (string) $comment->comment_date,
'comment_date_gmt' => (string) $comment->comment_date_gmt,
'comment_content' => (string) $comment->comment_content,
'comment_approved' => (string) $comment->comment_approved,
'comment_type' => (string) $comment->comment_type,
'comment_parent' => (string) $comment->comment_parent,
'comment_user_id' => (int) $comment->comment_user_id,
'commentmeta' => $meta,
);
}
$posts[] = $post;
}
return array(
'authors' => $authors,
'posts' => $posts,
'categories' => $categories,
'tags' => $tags,
'terms' => $terms,
'base_url' => $base_url,
'version' => $wxr_version
);
}
}
/**
* WXR Parser that makes use of the XML Parser PHP extension.
*/
class WXR_Parser_XML {
var $wp_tags = array(
'wp:post_id', 'wp:post_date', 'wp:post_date_gmt', 'wp:comment_status', 'wp:ping_status', 'wp:attachment_url',
'wp:status', 'wp:post_name', 'wp:post_parent', 'wp:menu_order', 'wp:post_type', 'wp:post_password',
'wp:is_sticky', 'wp:term_id', 'wp:category_nicename', 'wp:category_parent', 'wp:cat_name', 'wp:category_description',
'wp:tag_slug', 'wp:tag_name', 'wp:tag_description', 'wp:term_taxonomy', 'wp:term_parent',
'wp:term_name', 'wp:term_description', 'wp:author_id', 'wp:author_login', 'wp:author_email', 'wp:author_display_name',
'wp:author_first_name', 'wp:author_last_name',
);
var $wp_sub_tags = array(
'wp:comment_id', 'wp:comment_author', 'wp:comment_author_email', 'wp:comment_author_url',
'wp:comment_author_IP', 'wp:comment_date', 'wp:comment_date_gmt', 'wp:comment_content',
'wp:comment_approved', 'wp:comment_type', 'wp:comment_parent', 'wp:comment_user_id',
);
function parse($file) {
$this->wxr_version = $this->in_post = $this->cdata = $this->data = $this->sub_data = $this->in_tag = $this->in_sub_tag = false;
$this->authors = $this->posts = $this->term = $this->category = $this->tag = array();
$xml = xml_parser_create('UTF-8');
xml_parser_set_option($xml, XML_OPTION_SKIP_WHITE, 1);
xml_parser_set_option($xml, XML_OPTION_CASE_FOLDING, 0);
xml_set_object($xml, $this);
xml_set_character_data_handler($xml, 'cdata');
xml_set_element_handler($xml, 'tag_open', 'tag_close');
if (!xml_parse($xml, file_get_contents($file), true)) {
$current_line = xml_get_current_line_number($xml);
$current_column = xml_get_current_column_number($xml);
$error_code = xml_get_error_code($xml);
$error_string = xml_error_string($error_code);
return new WP_Error('XML_parse_error', 'There was an error when reading this WXR file', array($current_line, $current_column, $error_string));
}
xml_parser_free($xml);
if (!preg_match('/^\d+\.\d+$/', $this->wxr_version))
return new WP_Error('WXR_parse_error', __('This does not appear to be a WXR file, missing/invalid WXR version number', 'wordpress-importer'));
return array(
'authors' => $this->authors,
'posts' => $this->posts,
'categories' => $this->category,
'tags' => $this->tag,
'terms' => $this->term,
'base_url' => $this->base_url,
'version' => $this->wxr_version
);
}
function tag_open($parse, $tag, $attr) {
if (in_array($tag, $this->wp_tags)) {
$this->in_tag = substr($tag, 3);
return;
}
if (in_array($tag, $this->wp_sub_tags)) {
$this->in_sub_tag = substr($tag, 3);
return;
}
switch ($tag) {
case 'category':
if (isset($attr['domain'], $attr['nicename'])) {
$this->sub_data['domain'] = $attr['domain'];
$this->sub_data['slug'] = $attr['nicename'];
}
break;
case 'item': $this->in_post = true;
case 'title': if ($this->in_post)
$this->in_tag = 'post_title';
break;
case 'guid': $this->in_tag = 'guid';
break;
case 'dc:creator': $this->in_tag = 'post_author';
break;
case 'content:encoded': $this->in_tag = 'post_content';
break;
case 'excerpt:encoded': $this->in_tag = 'post_excerpt';
break;
case 'wp:term_slug': $this->in_tag = 'slug';
break;
case 'wp:meta_key': $this->in_sub_tag = 'key';
break;
case 'wp:meta_value': $this->in_sub_tag = 'value';
break;
}
}
function cdata($parser, $cdata) {
if (!trim($cdata))
return;
if (false !== $this->in_tag || false !== $this->in_sub_tag) {
$this->cdata .= $cdata;
} else {
$this->cdata .= trim($cdata);
}
}
function tag_close($parser, $tag) {
switch ($tag) {
case 'wp:comment':
unset($this->sub_data['key'], $this->sub_data['value']); // remove meta sub_data
if (!empty($this->sub_data))
$this->data['comments'][] = $this->sub_data;
$this->sub_data = false;
break;
case 'wp:commentmeta':
$this->sub_data['commentmeta'][] = array(
'key' => $this->sub_data['key'],
'value' => $this->sub_data['value']
);
break;
case 'category':
if (!empty($this->sub_data)) {
$this->sub_data['name'] = $this->cdata;
$this->data['terms'][] = $this->sub_data;
}
$this->sub_data = false;
break;
case 'wp:postmeta':
if (!empty($this->sub_data))
$this->data['postmeta'][] = $this->sub_data;
$this->sub_data = false;
break;
case 'item':
$this->posts[] = $this->data;
$this->data = false;
break;
case 'wp:category':
case 'wp:tag':
case 'wp:term':
$n = substr($tag, 3);
array_push($this->$n, $this->data);
$this->data = false;
break;
case 'wp:author':
if (!empty($this->data['author_login']))
$this->authors[$this->data['author_login']] = $this->data;
$this->data = false;
break;
case 'wp:base_site_url':
$this->base_url = $this->cdata;
break;
case 'wp:wxr_version':
$this->wxr_version = $this->cdata;
break;
default:
if ($this->in_sub_tag) {
$this->sub_data[$this->in_sub_tag] = !empty($this->cdata) ? $this->cdata : '';
$this->in_sub_tag = false;
} else if ($this->in_tag) {
$this->data[$this->in_tag] = !empty($this->cdata) ? $this->cdata : '';
$this->in_tag = false;
}
}
$this->cdata = false;
}
}
/**
* WXR Parser that uses regular expressions. Fallback for installs without an XML parser.
*/
class WXR_Parser_Regex {
var $authors = array();
var $posts = array();
var $categories = array();
var $tags = array();
var $terms = array();
var $base_url = '';
function __construct() {
$this->has_gzip = is_callable('gzopen');
}
function parse($file) {
$wxr_version = $in_post = false;
$fp = $this->fopen($file, 'r');
if ($fp) {
while (!$this->feof($fp)) {
$importline = rtrim($this->fgets($fp));
if (!$wxr_version && preg_match('|<wp:wxr_version>(\d+\.\d+)</wp:wxr_version>|', $importline, $version))
$wxr_version = $version[1];
if (false !== strpos($importline, '<wp:base_site_url>')) {
preg_match('|<wp:base_site_url>(.*?)</wp:base_site_url>|is', $importline, $url);
$this->base_url = $url[1];
continue;
}
if (false !== strpos($importline, '<wp:category>')) {
preg_match('|<wp:category>(.*?)</wp:category>|is', $importline, $category);
$this->categories[] = $this->process_category($category[1]);
continue;
}
if (false !== strpos($importline, '<wp:tag>')) {
preg_match('|<wp:tag>(.*?)</wp:tag>|is', $importline, $tag);
$this->tags[] = $this->process_tag($tag[1]);
continue;
}
if (false !== strpos($importline, '<wp:term>')) {
preg_match('|<wp:term>(.*?)</wp:term>|is', $importline, $term);
$this->terms[] = $this->process_term($term[1]);
continue;
}
if (false !== strpos($importline, '<wp:author>')) {
preg_match('|<wp:author>(.*?)</wp:author>|is', $importline, $author);
$a = $this->process_author($author[1]);
$this->authors[$a['author_login']] = $a;
continue;
}
if (false !== strpos($importline, '<item>')) {
$post = '';
$in_post = true;
continue;
}
if (false !== strpos($importline, '</item>')) {
$in_post = false;
$this->posts[] = $this->process_post($post);
continue;
}
if ($in_post) {
$post .= $importline . "\n";
}
}
$this->fclose($fp);
}
if (!$wxr_version)
return new WP_Error('WXR_parse_error', __('This does not appear to be a WXR file, missing/invalid WXR version number', 'wordpress-importer'));
return array(
'authors' => $this->authors,
'posts' => $this->posts,
'categories' => $this->categories,
'tags' => $this->tags,
'terms' => $this->terms,
'base_url' => $this->base_url,
'version' => $wxr_version
);
}
function get_tag($string, $tag) {
preg_match("|<$tag.*?>(.*?)</$tag>|is", $string, $return);
if (isset($return[1])) {
if (substr($return[1], 0, 9) == '<![CDATA[') {
if (strpos($return[1], ']]]]><![CDATA[>') !== false) {
preg_match_all('|<!\[CDATA\[(.*?)\]\]>|s', $return[1], $matches);
$return = '';
foreach ($matches[1] as $match)
$return .= $match;
} else {
$return = preg_replace('|^<!\[CDATA\[(.*)\]\]>$|s', '$1', $return[1]);
}
} else {
$return = $return[1];
}
} else {
$return = '';
}
return $return;
}
function process_category($c) {
return array(
'term_id' => $this->get_tag($c, 'wp:term_id'),
'cat_name' => $this->get_tag($c, 'wp:cat_name'),
'category_nicename' => $this->get_tag($c, 'wp:category_nicename'),
'category_parent' => $this->get_tag($c, 'wp:category_parent'),
'category_description' => $this->get_tag($c, 'wp:category_description'),
);
}
function process_tag($t) {
return array(
'term_id' => $this->get_tag($t, 'wp:term_id'),
'tag_name' => $this->get_tag($t, 'wp:tag_name'),
'tag_slug' => $this->get_tag($t, 'wp:tag_slug'),
'tag_description' => $this->get_tag($t, 'wp:tag_description'),
);
}
function process_term($t) {
return array(
'term_id' => $this->get_tag($t, 'wp:term_id'),
'term_taxonomy' => $this->get_tag($t, 'wp:term_taxonomy'),
'slug' => $this->get_tag($t, 'wp:term_slug'),
'term_parent' => $this->get_tag($t, 'wp:term_parent'),
'term_name' => $this->get_tag($t, 'wp:term_name'),
'term_description' => $this->get_tag($t, 'wp:term_description'),
);
}
function process_author($a) {
return array(
'author_id' => $this->get_tag($a, 'wp:author_id'),
'author_login' => $this->get_tag($a, 'wp:author_login'),
'author_email' => $this->get_tag($a, 'wp:author_email'),
'author_display_name' => $this->get_tag($a, 'wp:author_display_name'),
'author_first_name' => $this->get_tag($a, 'wp:author_first_name'),
'author_last_name' => $this->get_tag($a, 'wp:author_last_name'),
);
}
function process_post($post) {
$post_id = $this->get_tag($post, 'wp:post_id');
$post_title = $this->get_tag($post, 'title');
$post_date = $this->get_tag($post, 'wp:post_date');
$post_date_gmt = $this->get_tag($post, 'wp:post_date_gmt');
$comment_status = $this->get_tag($post, 'wp:comment_status');
$ping_status = $this->get_tag($post, 'wp:ping_status');
$status = $this->get_tag($post, 'wp:status');
$post_name = $this->get_tag($post, 'wp:post_name');
$post_parent = $this->get_tag($post, 'wp:post_parent');
$menu_order = $this->get_tag($post, 'wp:menu_order');
$post_type = $this->get_tag($post, 'wp:post_type');
$post_password = $this->get_tag($post, 'wp:post_password');
$is_sticky = $this->get_tag($post, 'wp:is_sticky');
$guid = $this->get_tag($post, 'guid');
$post_author = $this->get_tag($post, 'dc:creator');
$post_excerpt = $this->get_tag($post, 'excerpt:encoded');
$post_excerpt = preg_replace_callback('|<(/?[A-Z]+)|', array(&$this, '_normalize_tag'), $post_excerpt);
$post_excerpt = str_replace('<br>', '<br />', $post_excerpt);
$post_excerpt = str_replace('<hr>', '<hr />', $post_excerpt);
$post_content = $this->get_tag($post, 'content:encoded');
$post_content = preg_replace_callback('|<(/?[A-Z]+)|', array(&$this, '_normalize_tag'), $post_content);
$post_content = str_replace('<br>', '<br />', $post_content);
$post_content = str_replace('<hr>', '<hr />', $post_content);
$postdata = compact('post_id', 'post_author', 'post_date', 'post_date_gmt', 'post_content', 'post_excerpt',
'post_title', 'status', 'post_name', 'comment_status', 'ping_status', 'guid', 'post_parent',
'menu_order', 'post_type', 'post_password', 'is_sticky'
);
$attachment_url = $this->get_tag($post, 'wp:attachment_url');
if ($attachment_url)
$postdata['attachment_url'] = $attachment_url;
preg_match_all('|<category domain="([^"]+?)" nicename="([^"]+?)">(.+?)</category>|is', $post, $terms, PREG_SET_ORDER);
foreach ($terms as $t) {
$post_terms[] = array(
'slug' => $t[2],
'domain' => $t[1],
'name' => str_replace(array('<![CDATA[', ']]>'), '', $t[3]),
);
}
if (!empty($post_terms))
$postdata['terms'] = $post_terms;
preg_match_all('|<wp:comment>(.+?)</wp:comment>|is', $post, $comments);
$comments = $comments[1];
if ($comments) {
foreach ($comments as $comment) {
preg_match_all('|<wp:commentmeta>(.+?)</wp:commentmeta>|is', $comment, $commentmeta);
$commentmeta = $commentmeta[1];
$c_meta = array();
foreach ($commentmeta as $m) {
$c_meta[] = array(
'key' => $this->get_tag($m, 'wp:meta_key'),
'value' => $this->get_tag($m, 'wp:meta_value'),
);
}
$post_comments[] = array(
'comment_id' => $this->get_tag($comment, 'wp:comment_id'),
'comment_author' => $this->get_tag($comment, 'wp:comment_author'),
'comment_author_email' => $this->get_tag($comment, 'wp:comment_author_email'),
'comment_author_IP' => $this->get_tag($comment, 'wp:comment_author_IP'),
'comment_author_url' => $this->get_tag($comment, 'wp:comment_author_url'),
'comment_date' => $this->get_tag($comment, 'wp:comment_date'),
'comment_date_gmt' => $this->get_tag($comment, 'wp:comment_date_gmt'),
'comment_content' => $this->get_tag($comment, 'wp:comment_content'),
'comment_approved' => $this->get_tag($comment, 'wp:comment_approved'),
'comment_type' => $this->get_tag($comment, 'wp:comment_type'),
'comment_parent' => $this->get_tag($comment, 'wp:comment_parent'),
'comment_user_id' => $this->get_tag($comment, 'wp:comment_user_id'),
'commentmeta' => $c_meta,
);
}
}
if (!empty($post_comments))
$postdata['comments'] = $post_comments;
preg_match_all('|<wp:postmeta>(.+?)</wp:postmeta>|is', $post, $postmeta);
$postmeta = $postmeta[1];
if ($postmeta) {
foreach ($postmeta as $p) {
$post_postmeta[] = array(
'key' => $this->get_tag($p, 'wp:meta_key'),
'value' => $this->get_tag($p, 'wp:meta_value'),
);
}
}
if (!empty($post_postmeta))
$postdata['postmeta'] = $post_postmeta;
return $postdata;
}
function _normalize_tag($matches) {
return '<' . strtolower($matches[1]);
}
function fopen($filename, $mode = 'r') {
if ($this->has_gzip)
return gzopen($filename, $mode);
return fopen($filename, $mode);
}
function feof($fp) {
if ($this->has_gzip)
return gzeof($fp);
return feof($fp);
}
function fgets($fp, $len = 8192) {
if ($this->has_gzip)
return gzgets($fp, $len);
return fgets($fp, $len);
}
function fclose($fp) {
if ($this->has_gzip)
return gzclose($fp);
return fclose($fp);
}
}
@@ -0,0 +1,65 @@
<?php
/**
* Class for the settings importer.
*/
class envo_Settings_Importer {
/**
* Process import file - this parses the settings data and returns it.
*
* @param string $file path to json file.
*/
public function process_import_file( $file ) {
// Get file contents.
$data = Envo_Demos_Helpers::get_remote( $file );
// Return from this function if there was an error.
if ( is_wp_error( $data ) ) {
return $data;
}
// Get file contents and decode
$raw = file_get_contents( $file );
$data = @unserialize( $raw );
// Delete import file
unlink( $file );
// If wp_css is set then import it.
if ( function_exists( 'wp_update_custom_css_post' ) && isset( $data['wp_css'] ) && '' !== $data['wp_css'] ) {
wp_update_custom_css_post( $data['wp_css'] );
}
// Import the data
return $this->import_data( $data['mods'] );
}
/**
* Sanitization callback
*
* @since 1.0.5
*/
private function import_data( $file ) {
// Import the file
if ( ! empty( $file ) ) {
if ( '0' == json_last_error() ) {
// Loop through mods and add them
foreach ( $file as $mod => $value ) {
set_theme_mod( $mod, $value );
}
}
}
// Return file
return $file;
}
}
@@ -0,0 +1,235 @@
<?php
/**
* Class for the widget importer.
*
* Code is mostly from the Widget Importer & Exporter plugin.
*
* @see https://wordpress.org/plugins/widget-importer-exporter/
*/
class Envo_Widget_Importer {
/**
* Process import file - this parses the widget data and returns it.
*
* @param string $file path to json file.
* @global string $widget_import_results
*/
public function process_import_file( $file ) {
// Get file contents.
$data = Envo_Demos_Helpers::get_remote( $file );
// Return from this function if there was an error.
if ( is_wp_error( $data ) ) {
return $data;
}
// Decode file contents.
$data = json_decode( $data );
// Import the widget data
return $this->import_data( $data );
}
/**
* Import widget JSON data
*
* @global array $wp_registered_sidebars
* @param object $data JSON widget data.
* @return array $results
*/
private function import_data( $data ) {
global $wp_registered_sidebars;
// Have valid data? If no data or could not decode.
if ( empty( $data ) || ! is_object( $data ) ) {
return;
}
// Get all available widgets site supports.
$available_widgets = $this->available_widgets();
// Get all existing widget instances.
$widget_instances = array();
foreach ( $available_widgets as $widget_data ) {
$widget_instances[ $widget_data['id_base'] ] = get_option( 'widget_' . $widget_data['id_base'] );
}
// Begin results.
$results = array();
// Loop import data's sidebars.
foreach ( $data as $sidebar_id => $widgets ) {
// Skip inactive widgets (should not be in export file).
if ( 'wp_inactive_widgets' == $sidebar_id ) {
continue;
}
// Check if sidebar is available on this site. Otherwise add widgets to inactive, and say so.
if ( isset( $wp_registered_sidebars[ $sidebar_id ] ) ) {
$sidebar_available = true;
$use_sidebar_id = $sidebar_id;
$sidebar_message_type = 'success';
$sidebar_message = '';
}
else {
$sidebar_available = false;
$use_sidebar_id = 'wp_inactive_widgets'; // Add to inactive if sidebar does not exist in theme.
$sidebar_message_type = 'error';
$sidebar_message = esc_html__( 'Sidebar does not exist in theme (moving widget to Inactive)', 'envothemes-demo-import' );
}
// Result for sidebar.
$results[ $sidebar_id ]['name'] = ! empty( $wp_registered_sidebars[ $sidebar_id ]['name'] ) ? $wp_registered_sidebars[ $sidebar_id ]['name'] : $sidebar_id; // Sidebar name if theme supports it; otherwise ID.
$results[ $sidebar_id ]['message_type'] = $sidebar_message_type;
$results[ $sidebar_id ]['message'] = $sidebar_message;
$results[ $sidebar_id ]['widgets'] = array();
// Loop widgets.
foreach ( $widgets as $widget_instance_id => $widget ) {
$fail = false;
// Get id_base (remove -# from end) and instance ID number.
$id_base = preg_replace( '/-[0-9]+$/', '', $widget_instance_id );
$instance_id_number = str_replace( $id_base . '-', '', $widget_instance_id );
// Does site support this widget?
if ( ! $fail && ! isset( $available_widgets[ $id_base ] ) ) {
$fail = true;
$widget_message_type = 'error';
$widget_message = esc_html__( 'Site does not support widget', 'envothemes-demo-import' ); // Explain why widget not imported.
}
// Convert multidimensional objects to multidimensional arrays.
$widget = json_decode( json_encode( $widget ), true );
// Does widget with identical settings already exist in same sidebar?
if ( ! $fail && isset( $widget_instances[ $id_base ] ) ) {
// Get existing widgets in this sidebar.
$sidebars_widgets = get_option( 'sidebars_widgets' );
$sidebar_widgets = isset( $sidebars_widgets[ $use_sidebar_id ] ) ? $sidebars_widgets[ $use_sidebar_id ] : array(); // Check Inactive if that's where will go.
// Loop widgets with ID base.
$single_widget_instances = ! empty( $widget_instances[ $id_base ] ) ? $widget_instances[ $id_base ] : array();
foreach ( $single_widget_instances as $check_id => $check_widget ) {
// Is widget in same sidebar and has identical settings?
if ( in_array( "$id_base-$check_id", $sidebar_widgets ) && (array) $widget == $check_widget ) {
$fail = true;
$widget_message_type = 'warning';
$widget_message = esc_html__( 'Widget already exists', 'envothemes-demo-import' ); // Explain why widget not imported.
break;
}
}
}
// No failure.
if ( ! $fail ) {
// Add widget instance.
$single_widget_instances = get_option( 'widget_' . $id_base ); // All instances for that widget ID base, get fresh every time.
$single_widget_instances = ! empty( $single_widget_instances ) ? $single_widget_instances : array( '_multiwidget' => 1 ); // Start fresh if have to.
$single_widget_instances[] = $widget; // Add it.
// Get the key it was given.
end( $single_widget_instances );
$new_instance_id_number = key( $single_widget_instances );
// If key is 0, make it 1.
// When 0, an issue can occur where adding a widget causes data from other widget to load, and the widget doesn't stick (reload wipes it).
if ( '0' === strval( $new_instance_id_number ) ) {
$new_instance_id_number = 1;
$single_widget_instances[ $new_instance_id_number ] = $single_widget_instances[0];
unset( $single_widget_instances[0] );
}
// Move _multiwidget to end of array for uniformity.
if ( isset( $single_widget_instances['_multiwidget'] ) ) {
$multiwidget = $single_widget_instances['_multiwidget'];
unset( $single_widget_instances['_multiwidget'] );
$single_widget_instances['_multiwidget'] = $multiwidget;
}
// Update option with new widget.
update_option( 'widget_' . $id_base, $single_widget_instances );
// Assign widget instance to sidebar.
$sidebars_widgets = get_option( 'sidebars_widgets' ); // Which sidebars have which widgets, get fresh every time.
$new_instance_id = $id_base . '-' . $new_instance_id_number; // Use ID number from new widget instance.
$sidebars_widgets[ $use_sidebar_id ][] = $new_instance_id; // Add new instance to sidebar.
update_option( 'sidebars_widgets', $sidebars_widgets ); // Save the amended data.
// After widget import action.
$after_widget_import = array(
'sidebar' => $use_sidebar_id,
'sidebar_old' => $sidebar_id,
'widget' => $widget,
'widget_type' => $id_base,
'widget_id' => $new_instance_id,
'widget_id_old' => $widget_instance_id,
'widget_id_num' => $new_instance_id_number,
'widget_id_num_old' => $instance_id_number,
);
// Success message.
if ( $sidebar_available ) {
$widget_message_type = 'success';
$widget_message = esc_html__( 'Imported', 'envothemes-demo-import' );
}
else {
$widget_message_type = 'warning';
$widget_message = esc_html__( 'Imported to Inactive', 'envothemes-demo-import' );
}
}
// Result for widget instance.
$results[ $sidebar_id ]['widgets'][ $widget_instance_id ]['name'] = isset( $available_widgets[ $id_base ]['name'] ) ? $available_widgets[ $id_base ]['name'] : $id_base; // Widget name or ID if name not available (not supported by site).
$results[ $sidebar_id ]['widgets'][ $widget_instance_id ]['title'] = ! empty( $widget['title'] ) ? $widget['title'] : esc_html__( 'No Title', 'envothemes-demo-import' ); // Show "No Title" if widget instance is untitled.
$results[ $sidebar_id ]['widgets'][ $widget_instance_id ]['message_type'] = $widget_message_type;
$results[ $sidebar_id ]['widgets'][ $widget_instance_id ]['message'] = $widget_message;
}
}
// Return results.
return $results;
}
/**
* Available widgets.
*
* Gather site's widgets into array with ID base, name, etc.
*
* @global array $wp_registered_widget_controls
* @return array $available_widgets, Widget information
*/
private function available_widgets() {
global $wp_registered_widget_controls;
$widget_controls = $wp_registered_widget_controls;
$available_widgets = array();
foreach ( $widget_controls as $widget ) {
if ( ! empty( $widget['id_base'] ) && ! isset( $available_widgets[$widget['id_base']] ) ) { // no dupes
$available_widgets[$widget['id_base']]['id_base'] = $widget['id_base'];
$available_widgets[$widget['id_base']]['name'] = $widget['name'];
}
}
return $available_widgets;
}
}
@@ -0,0 +1,318 @@
<?php
/**
* WordPress eXtended RSS file parser implementations
*
* @package WordPress
* @subpackage Importer
*/
/**
* WXR Parser that uses regular expressions. Fallback for installs without an XML parser.
*/
class WXR_Parser_Regex {
var $authors = array();
var $posts = array();
var $categories = array();
var $tags = array();
var $terms = array();
var $base_url = '';
var $base_blog_url = '';
function __construct() {
$this->has_gzip = is_callable( 'gzopen' );
}
function parse( $file ) {
$wxr_version = $in_multiline = false;
$multiline_content = '';
$multiline_tags = array(
'item' => array( 'posts', array( $this, 'process_post' ) ),
'wp:category' => array( 'categories', array( $this, 'process_category' ) ),
'wp:tag' => array( 'tags', array( $this, 'process_tag' ) ),
'wp:term' => array( 'terms', array( $this, 'process_term' ) ),
);
$fp = $this->fopen( $file, 'r' );
if ( $fp ) {
while ( ! $this->feof( $fp ) ) {
$importline = rtrim( $this->fgets( $fp ) );
if ( ! $wxr_version && preg_match( '|<wp:wxr_version>(\d+\.\d+)</wp:wxr_version>|', $importline, $version ) )
$wxr_version = $version[1];
if ( false !== strpos( $importline, '<wp:base_site_url>' ) ) {
preg_match( '|<wp:base_site_url>(.*?)</wp:base_site_url>|is', $importline, $url );
$this->base_url = $url[1];
continue;
}
if ( false !== strpos( $importline, '<wp:base_blog_url>' ) ) {
preg_match( '|<wp:base_blog_url>(.*?)</wp:base_blog_url>|is', $importline, $blog_url );
$this->base_blog_url = $blog_url[1];
continue;
} else {
$this->base_blog_url = $this->base_url;
}
if ( false !== strpos( $importline, '<wp:author>' ) ) {
preg_match( '|<wp:author>(.*?)</wp:author>|is', $importline, $author );
$a = $this->process_author( $author[1] );
$this->authors[$a['author_login']] = $a;
continue;
}
foreach ( $multiline_tags as $tag => $handler ) {
// Handle multi-line tags on a singular line
if ( preg_match( '|<' . $tag . '>(.*?)</' . $tag . '>|is', $importline, $matches ) ) {
$this->{$handler[0]}[] = call_user_func( $handler[1], $matches[1] );
} elseif ( false !== ( $pos = strpos( $importline, "<$tag>" ) ) ) {
// Take note of any content after the opening tag
$multiline_content = trim( substr( $importline, $pos + strlen( $tag ) + 2 ) );
// We don't want to have this line added to `$is_multiline` below.
$importline = '';
$in_multiline = $tag;
} elseif ( false !== ( $pos = strpos( $importline, "</$tag>" ) ) ) {
$in_multiline = false;
$multiline_content .= trim( substr( $importline, 0, $pos ) );
$this->{$handler[0]}[] = call_user_func( $handler[1], $multiline_content );
}
}
if ( $in_multiline && $importline ) {
$multiline_content .= $importline . "\n";
}
}
$this->fclose($fp);
}
if ( ! $wxr_version )
return new WP_Error( 'WXR_parse_error', __( 'This does not appear to be a WXR file, missing/invalid WXR version number', 'wordpress-importer' ) );
return array(
'authors' => $this->authors,
'posts' => $this->posts,
'categories' => $this->categories,
'tags' => $this->tags,
'terms' => $this->terms,
'base_url' => $this->base_url,
'base_blog_url' => $this->base_blog_url,
'version' => $wxr_version
);
}
function get_tag( $string, $tag ) {
preg_match( "|<$tag.*?>(.*?)</$tag>|is", $string, $return );
if ( isset( $return[1] ) ) {
if ( substr( $return[1], 0, 9 ) == '<![CDATA[' ) {
if ( strpos( $return[1], ']]]]><![CDATA[>' ) !== false ) {
preg_match_all( '|<!\[CDATA\[(.*?)\]\]>|s', $return[1], $matches );
$return = '';
foreach( $matches[1] as $match )
$return .= $match;
} else {
$return = preg_replace( '|^<!\[CDATA\[(.*)\]\]>$|s', '$1', $return[1] );
}
} else {
$return = $return[1];
}
} else {
$return = '';
}
return $return;
}
function process_category( $c ) {
$term = array(
'term_id' => $this->get_tag( $c, 'wp:term_id' ),
'cat_name' => $this->get_tag( $c, 'wp:cat_name' ),
'category_nicename' => $this->get_tag( $c, 'wp:category_nicename' ),
'category_parent' => $this->get_tag( $c, 'wp:category_parent' ),
'category_description' => $this->get_tag( $c, 'wp:category_description' ),
);
$term_meta = $this->process_meta( $c, 'wp:termmeta' );
if ( ! empty( $term_meta ) ) {
$term['termmeta'] = $term_meta;
}
return $term;
}
function process_tag( $t ) {
$term = array(
'term_id' => $this->get_tag( $t, 'wp:term_id' ),
'tag_name' => $this->get_tag( $t, 'wp:tag_name' ),
'tag_slug' => $this->get_tag( $t, 'wp:tag_slug' ),
'tag_description' => $this->get_tag( $t, 'wp:tag_description' ),
);
$term_meta = $this->process_meta( $t, 'wp:termmeta' );
if ( ! empty( $term_meta ) ) {
$term['termmeta'] = $term_meta;
}
return $term;
}
function process_term( $t ) {
$term = array(
'term_id' => $this->get_tag( $t, 'wp:term_id' ),
'term_taxonomy' => $this->get_tag( $t, 'wp:term_taxonomy' ),
'slug' => $this->get_tag( $t, 'wp:term_slug' ),
'term_parent' => $this->get_tag( $t, 'wp:term_parent' ),
'term_name' => $this->get_tag( $t, 'wp:term_name' ),
'term_description' => $this->get_tag( $t, 'wp:term_description' ),
);
$term_meta = $this->process_meta( $t, 'wp:termmeta' );
if ( ! empty( $term_meta ) ) {
$term['termmeta'] = $term_meta;
}
return $term;
}
function process_meta( $string, $tag ) {
$parsed_meta = array();
preg_match_all( "|<$tag>(.+?)</$tag>|is", $string, $meta );
if ( ! isset( $meta[1] ) ) {
return $parsed_meta;
}
foreach ( $meta[1] as $m ) {
$parsed_meta[] = array(
'key' => $this->get_tag( $m, 'wp:meta_key' ),
'value' => $this->get_tag( $m, 'wp:meta_value' ),
);
}
return $parsed_meta;
}
function process_author( $a ) {
return array(
'author_id' => $this->get_tag( $a, 'wp:author_id' ),
'author_login' => $this->get_tag( $a, 'wp:author_login' ),
'author_email' => $this->get_tag( $a, 'wp:author_email' ),
'author_display_name' => $this->get_tag( $a, 'wp:author_display_name' ),
'author_first_name' => $this->get_tag( $a, 'wp:author_first_name' ),
'author_last_name' => $this->get_tag( $a, 'wp:author_last_name' ),
);
}
function process_post( $post ) {
$post_id = $this->get_tag( $post, 'wp:post_id' );
$post_title = $this->get_tag( $post, 'title' );
$post_date = $this->get_tag( $post, 'wp:post_date' );
$post_date_gmt = $this->get_tag( $post, 'wp:post_date_gmt' );
$comment_status = $this->get_tag( $post, 'wp:comment_status' );
$ping_status = $this->get_tag( $post, 'wp:ping_status' );
$status = $this->get_tag( $post, 'wp:status' );
$post_name = $this->get_tag( $post, 'wp:post_name' );
$post_parent = $this->get_tag( $post, 'wp:post_parent' );
$menu_order = $this->get_tag( $post, 'wp:menu_order' );
$post_type = $this->get_tag( $post, 'wp:post_type' );
$post_password = $this->get_tag( $post, 'wp:post_password' );
$is_sticky = $this->get_tag( $post, 'wp:is_sticky' );
$guid = $this->get_tag( $post, 'guid' );
$post_author = $this->get_tag( $post, 'dc:creator' );
$post_excerpt = $this->get_tag( $post, 'excerpt:encoded' );
$post_excerpt = preg_replace_callback( '|<(/?[A-Z]+)|', array( &$this, '_normalize_tag' ), $post_excerpt );
$post_excerpt = str_replace( '<br>', '<br />', $post_excerpt );
$post_excerpt = str_replace( '<hr>', '<hr />', $post_excerpt );
$post_content = $this->get_tag( $post, 'content:encoded' );
$post_content = preg_replace_callback( '|<(/?[A-Z]+)|', array( &$this, '_normalize_tag' ), $post_content );
$post_content = str_replace( '<br>', '<br />', $post_content );
$post_content = str_replace( '<hr>', '<hr />', $post_content );
$postdata = compact( 'post_id', 'post_author', 'post_date', 'post_date_gmt', 'post_content', 'post_excerpt',
'post_title', 'status', 'post_name', 'comment_status', 'ping_status', 'guid', 'post_parent',
'menu_order', 'post_type', 'post_password', 'is_sticky'
);
$attachment_url = $this->get_tag( $post, 'wp:attachment_url' );
if ( $attachment_url )
$postdata['attachment_url'] = $attachment_url;
preg_match_all( '|<category domain="([^"]+?)" nicename="([^"]+?)">(.+?)</category>|is', $post, $terms, PREG_SET_ORDER );
foreach ( $terms as $t ) {
$post_terms[] = array(
'slug' => $t[2],
'domain' => $t[1],
'name' => str_replace( array( '<![CDATA[', ']]>' ), '', $t[3] ),
);
}
if ( ! empty( $post_terms ) ) $postdata['terms'] = $post_terms;
preg_match_all( '|<wp:comment>(.+?)</wp:comment>|is', $post, $comments );
$comments = $comments[1];
if ( $comments ) {
foreach ( $comments as $comment ) {
$post_comments[] = array(
'comment_id' => $this->get_tag( $comment, 'wp:comment_id' ),
'comment_author' => $this->get_tag( $comment, 'wp:comment_author' ),
'comment_author_email' => $this->get_tag( $comment, 'wp:comment_author_email' ),
'comment_author_IP' => $this->get_tag( $comment, 'wp:comment_author_IP' ),
'comment_author_url' => $this->get_tag( $comment, 'wp:comment_author_url' ),
'comment_date' => $this->get_tag( $comment, 'wp:comment_date' ),
'comment_date_gmt' => $this->get_tag( $comment, 'wp:comment_date_gmt' ),
'comment_content' => $this->get_tag( $comment, 'wp:comment_content' ),
'comment_approved' => $this->get_tag( $comment, 'wp:comment_approved' ),
'comment_type' => $this->get_tag( $comment, 'wp:comment_type' ),
'comment_parent' => $this->get_tag( $comment, 'wp:comment_parent' ),
'comment_user_id' => $this->get_tag( $comment, 'wp:comment_user_id' ),
'commentmeta' => $this->process_meta( $comment, 'wp:commentmeta' ),
);
}
}
if ( ! empty( $post_comments ) ) {
$postdata['comments'] = $post_comments;
}
$post_meta = $this->process_meta( $post, 'wp:postmeta' );
if ( ! empty( $post_meta ) ) {
$postdata['postmeta'] = $post_meta;
}
return $postdata;
}
function _normalize_tag( $matches ) {
return '<' . strtolower( $matches[1] );
}
function fopen( $filename, $mode = 'r' ) {
if ( $this->has_gzip )
return gzopen( $filename, $mode );
return fopen( $filename, $mode );
}
function feof( $fp ) {
if ( $this->has_gzip )
return gzeof( $fp );
return feof( $fp );
}
function fgets( $fp, $len = 8192 ) {
if ( $this->has_gzip )
return gzgets( $fp, $len );
return fgets( $fp, $len );
}
function fclose( $fp ) {
if ( $this->has_gzip )
return gzclose( $fp );
return fclose( $fp );
}
}
@@ -0,0 +1,231 @@
<?php
/**
* WordPress eXtended RSS file parser implementations
*
* @package WordPress
* @subpackage Importer
*/
/**
* WXR Parser that makes use of the SimpleXML PHP extension.
*/
class WXR_Parser_SimpleXML {
function parse( $file ) {
$authors = $posts = $categories = $tags = $terms = array();
$internal_errors = libxml_use_internal_errors(true);
$dom = new DOMDocument;
$old_value = null;
if ( function_exists( 'libxml_disable_entity_loader' ) ) {
$old_value = libxml_disable_entity_loader( true );
}
$success = $dom->loadXML( file_get_contents( $file ) );
if ( ! is_null( $old_value ) ) {
libxml_disable_entity_loader( $old_value );
}
if ( ! $success || isset( $dom->doctype ) ) {
return new WP_Error( 'SimpleXML_parse_error', __( 'There was an error when reading this WXR file', 'wordpress-importer' ), libxml_get_errors() );
}
$xml = simplexml_import_dom( $dom );
unset( $dom );
// halt if loading produces an error
if ( ! $xml )
return new WP_Error( 'SimpleXML_parse_error', __( 'There was an error when reading this WXR file', 'wordpress-importer' ), libxml_get_errors() );
$wxr_version = $xml->xpath('/rss/channel/wp:wxr_version');
if ( ! $wxr_version )
return new WP_Error( 'WXR_parse_error', __( 'This does not appear to be a WXR file, missing/invalid WXR version number', 'wordpress-importer' ) );
$wxr_version = (string) trim( $wxr_version[0] );
// confirm that we are dealing with the correct file format
if ( ! preg_match( '/^\d+\.\d+$/', $wxr_version ) )
return new WP_Error( 'WXR_parse_error', __( 'This does not appear to be a WXR file, missing/invalid WXR version number', 'wordpress-importer' ) );
$base_url = $xml->xpath('/rss/channel/wp:base_site_url');
$base_url = (string) trim( isset( $base_url[0] ) ? $base_url[0] : '' );
$base_blog_url = $xml->xpath('/rss/channel/wp:base_blog_url');
if ( $base_blog_url ) {
$base_blog_url = (string) trim( $base_blog_url[0] );
} else {
$base_blog_url = $base_url;
}
$namespaces = $xml->getDocNamespaces();
if ( ! isset( $namespaces['wp'] ) )
$namespaces['wp'] = 'http://wordpress.org/export/1.1/';
if ( ! isset( $namespaces['excerpt'] ) )
$namespaces['excerpt'] = 'http://wordpress.org/export/1.1/excerpt/';
// grab authors
foreach ( $xml->xpath('/rss/channel/wp:author') as $author_arr ) {
$a = $author_arr->children( $namespaces['wp'] );
$login = (string) $a->author_login;
$authors[$login] = array(
'author_id' => (int) $a->author_id,
'author_login' => $login,
'author_email' => (string) $a->author_email,
'author_display_name' => (string) $a->author_display_name,
'author_first_name' => (string) $a->author_first_name,
'author_last_name' => (string) $a->author_last_name
);
}
// grab cats, tags and terms
foreach ( $xml->xpath('/rss/channel/wp:category') as $term_arr ) {
$t = $term_arr->children( $namespaces['wp'] );
$category = array(
'term_id' => (int) $t->term_id,
'category_nicename' => (string) $t->category_nicename,
'category_parent' => (string) $t->category_parent,
'cat_name' => (string) $t->cat_name,
'category_description' => (string) $t->category_description
);
foreach ( $t->termmeta as $meta ) {
$category['termmeta'][] = array(
'key' => (string) $meta->meta_key,
'value' => (string) $meta->meta_value
);
}
$categories[] = $category;
}
foreach ( $xml->xpath('/rss/channel/wp:tag') as $term_arr ) {
$t = $term_arr->children( $namespaces['wp'] );
$tag = array(
'term_id' => (int) $t->term_id,
'tag_slug' => (string) $t->tag_slug,
'tag_name' => (string) $t->tag_name,
'tag_description' => (string) $t->tag_description
);
foreach ( $t->termmeta as $meta ) {
$tag['termmeta'][] = array(
'key' => (string) $meta->meta_key,
'value' => (string) $meta->meta_value
);
}
$tags[] = $tag;
}
foreach ( $xml->xpath('/rss/channel/wp:term') as $term_arr ) {
$t = $term_arr->children( $namespaces['wp'] );
$term = array(
'term_id' => (int) $t->term_id,
'term_taxonomy' => (string) $t->term_taxonomy,
'slug' => (string) $t->term_slug,
'term_parent' => (string) $t->term_parent,
'term_name' => (string) $t->term_name,
'term_description' => (string) $t->term_description
);
foreach ( $t->termmeta as $meta ) {
$term['termmeta'][] = array(
'key' => (string) $meta->meta_key,
'value' => (string) $meta->meta_value
);
}
$terms[] = $term;
}
// grab posts
foreach ( $xml->channel->item as $item ) {
$post = array(
'post_title' => (string) $item->title,
'guid' => (string) $item->guid,
);
$dc = $item->children( 'http://purl.org/dc/elements/1.1/' );
$post['post_author'] = (string) $dc->creator;
$content = $item->children( 'http://purl.org/rss/1.0/modules/content/' );
$excerpt = $item->children( $namespaces['excerpt'] );
$post['post_content'] = (string) $content->encoded;
$post['post_excerpt'] = (string) $excerpt->encoded;
$wp = $item->children( $namespaces['wp'] );
$post['post_id'] = (int) $wp->post_id;
$post['post_date'] = (string) $wp->post_date;
$post['post_date_gmt'] = (string) $wp->post_date_gmt;
$post['comment_status'] = (string) $wp->comment_status;
$post['ping_status'] = (string) $wp->ping_status;
$post['post_name'] = (string) $wp->post_name;
$post['status'] = (string) $wp->status;
$post['post_parent'] = (int) $wp->post_parent;
$post['menu_order'] = (int) $wp->menu_order;
$post['post_type'] = (string) $wp->post_type;
$post['post_password'] = (string) $wp->post_password;
$post['is_sticky'] = (int) $wp->is_sticky;
if ( isset($wp->attachment_url) )
$post['attachment_url'] = (string) $wp->attachment_url;
foreach ( $item->category as $c ) {
$att = $c->attributes();
if ( isset( $att['nicename'] ) )
$post['terms'][] = array(
'name' => (string) $c,
'slug' => (string) $att['nicename'],
'domain' => (string) $att['domain']
);
}
foreach ( $wp->postmeta as $meta ) {
$post['postmeta'][] = array(
'key' => (string) $meta->meta_key,
'value' => (string) $meta->meta_value
);
}
foreach ( $wp->comment as $comment ) {
$meta = array();
if ( isset( $comment->commentmeta ) ) {
foreach ( $comment->commentmeta as $m ) {
$meta[] = array(
'key' => (string) $m->meta_key,
'value' => (string) $m->meta_value
);
}
}
$post['comments'][] = array(
'comment_id' => (int) $comment->comment_id,
'comment_author' => (string) $comment->comment_author,
'comment_author_email' => (string) $comment->comment_author_email,
'comment_author_IP' => (string) $comment->comment_author_IP,
'comment_author_url' => (string) $comment->comment_author_url,
'comment_date' => (string) $comment->comment_date,
'comment_date_gmt' => (string) $comment->comment_date_gmt,
'comment_content' => (string) $comment->comment_content,
'comment_approved' => (string) $comment->comment_approved,
'comment_type' => (string) $comment->comment_type,
'comment_parent' => (string) $comment->comment_parent,
'comment_user_id' => (int) $comment->comment_user_id,
'commentmeta' => $meta,
);
}
$posts[] = $post;
}
return array(
'authors' => $authors,
'posts' => $posts,
'categories' => $categories,
'tags' => $tags,
'terms' => $terms,
'base_url' => $base_url,
'base_blog_url' => $base_blog_url,
'version' => $wxr_version
);
}
}
@@ -0,0 +1,177 @@
<?php
/**
* WordPress eXtended RSS file parser implementations
*
* @package WordPress
* @subpackage Importer
*/
/**
* WXR Parser that makes use of the XML Parser PHP extension.
*/
class WXR_Parser_XML {
var $wp_tags = array(
'wp:post_id', 'wp:post_date', 'wp:post_date_gmt', 'wp:comment_status', 'wp:ping_status', 'wp:attachment_url',
'wp:status', 'wp:post_name', 'wp:post_parent', 'wp:menu_order', 'wp:post_type', 'wp:post_password',
'wp:is_sticky', 'wp:term_id', 'wp:category_nicename', 'wp:category_parent', 'wp:cat_name', 'wp:category_description',
'wp:tag_slug', 'wp:tag_name', 'wp:tag_description', 'wp:term_taxonomy', 'wp:term_parent',
'wp:term_name', 'wp:term_description', 'wp:author_id', 'wp:author_login', 'wp:author_email', 'wp:author_display_name',
'wp:author_first_name', 'wp:author_last_name',
);
var $wp_sub_tags = array(
'wp:comment_id', 'wp:comment_author', 'wp:comment_author_email', 'wp:comment_author_url',
'wp:comment_author_IP', 'wp:comment_date', 'wp:comment_date_gmt', 'wp:comment_content',
'wp:comment_approved', 'wp:comment_type', 'wp:comment_parent', 'wp:comment_user_id',
);
function parse( $file ) {
$this->wxr_version = $this->in_post = $this->cdata = $this->data = $this->sub_data = $this->in_tag = $this->in_sub_tag = false;
$this->authors = $this->posts = $this->term = $this->category = $this->tag = array();
$xml = xml_parser_create( 'UTF-8' );
xml_parser_set_option( $xml, XML_OPTION_SKIP_WHITE, 1 );
xml_parser_set_option( $xml, XML_OPTION_CASE_FOLDING, 0 );
xml_set_object( $xml, $this );
xml_set_character_data_handler( $xml, 'cdata' );
xml_set_element_handler( $xml, 'tag_open', 'tag_close' );
if ( ! xml_parse( $xml, file_get_contents( $file ), true ) ) {
$current_line = xml_get_current_line_number( $xml );
$current_column = xml_get_current_column_number( $xml );
$error_code = xml_get_error_code( $xml );
$error_string = xml_error_string( $error_code );
return new WP_Error( 'XML_parse_error', 'There was an error when reading this WXR file', array( $current_line, $current_column, $error_string ) );
}
xml_parser_free( $xml );
if ( ! preg_match( '/^\d+\.\d+$/', $this->wxr_version ) )
return new WP_Error( 'WXR_parse_error', __( 'This does not appear to be a WXR file, missing/invalid WXR version number', 'wordpress-importer' ) );
return array(
'authors' => $this->authors,
'posts' => $this->posts,
'categories' => $this->category,
'tags' => $this->tag,
'terms' => $this->term,
'base_url' => $this->base_url,
'base_blog_url' => $this->base_blog_url,
'version' => $this->wxr_version
);
}
function tag_open( $parse, $tag, $attr ) {
if ( in_array( $tag, $this->wp_tags ) ) {
$this->in_tag = substr( $tag, 3 );
return;
}
if ( in_array( $tag, $this->wp_sub_tags ) ) {
$this->in_sub_tag = substr( $tag, 3 );
return;
}
switch ( $tag ) {
case 'category':
if ( isset($attr['domain'], $attr['nicename']) ) {
$this->sub_data['domain'] = $attr['domain'];
$this->sub_data['slug'] = $attr['nicename'];
}
break;
case 'item': $this->in_post = true;
case 'title': if ( $this->in_post ) $this->in_tag = 'post_title'; break;
case 'guid': $this->in_tag = 'guid'; break;
case 'dc:creator': $this->in_tag = 'post_author'; break;
case 'content:encoded': $this->in_tag = 'post_content'; break;
case 'excerpt:encoded': $this->in_tag = 'post_excerpt'; break;
case 'wp:term_slug': $this->in_tag = 'slug'; break;
case 'wp:meta_key': $this->in_sub_tag = 'key'; break;
case 'wp:meta_value': $this->in_sub_tag = 'value'; break;
}
}
function cdata( $parser, $cdata ) {
if ( ! trim( $cdata ) )
return;
if ( false !== $this->in_tag || false !== $this->in_sub_tag ) {
$this->cdata .= $cdata;
} else {
$this->cdata .= trim( $cdata );
}
}
function tag_close( $parser, $tag ) {
switch ( $tag ) {
case 'wp:comment':
unset( $this->sub_data['key'], $this->sub_data['value'] ); // remove meta sub_data
if ( ! empty( $this->sub_data ) )
$this->data['comments'][] = $this->sub_data;
$this->sub_data = false;
break;
case 'wp:commentmeta':
$this->sub_data['commentmeta'][] = array(
'key' => $this->sub_data['key'],
'value' => $this->sub_data['value']
);
break;
case 'category':
if ( ! empty( $this->sub_data ) ) {
$this->sub_data['name'] = $this->cdata;
$this->data['terms'][] = $this->sub_data;
}
$this->sub_data = false;
break;
case 'wp:postmeta':
if ( ! empty( $this->sub_data ) )
$this->data['postmeta'][] = $this->sub_data;
$this->sub_data = false;
break;
case 'item':
$this->posts[] = $this->data;
$this->data = false;
break;
case 'wp:category':
case 'wp:tag':
case 'wp:term':
$n = substr( $tag, 3 );
array_push( $this->$n, $this->data );
$this->data = false;
break;
case 'wp:termmeta':
if ( ! empty( $this->sub_data ) ) {
$this->data['termmeta'][] = $this->sub_data;
}
$this->sub_data = false;
break;
case 'wp:author':
if ( ! empty($this->data['author_login']) )
$this->authors[$this->data['author_login']] = $this->data;
$this->data = false;
break;
case 'wp:base_site_url':
$this->base_url = $this->cdata;
if ( ! isset( $this->base_blog_url ) ) {
$this->base_blog_url = $this->cdata;
}
break;
case 'wp:base_blog_url':
$this->base_blog_url = $this->cdata;
break;
case 'wp:wxr_version':
$this->wxr_version = $this->cdata;
break;
default:
if ( $this->in_sub_tag ) {
$this->sub_data[$this->in_sub_tag] = ! empty( $this->cdata ) ? $this->cdata : '';
$this->in_sub_tag = false;
} else if ( $this->in_tag ) {
$this->data[$this->in_tag] = ! empty( $this->cdata ) ? $this->cdata : '';
$this->in_tag = false;
}
}
$this->cdata = false;
}
}
@@ -0,0 +1,50 @@
<?php
/**
* WordPress eXtended RSS file parser implementations
*
* @package WordPress
* @subpackage Importer
*/
/**
* WordPress Importer class for managing parsing of WXR files.
*/
class WXR_Parser {
function parse( $file ) {
// Attempt to use proper XML parsers first
if ( extension_loaded( 'simplexml' ) ) {
$parser = new WXR_Parser_SimpleXML;
$result = $parser->parse( $file );
// If SimpleXML succeeds or this is an invalid WXR file then return the results
if ( ! is_wp_error( $result ) || 'SimpleXML_parse_error' != $result->get_error_code() )
return $result;
} else if ( extension_loaded( 'xml' ) ) {
$parser = new WXR_Parser_XML;
$result = $parser->parse( $file );
// If XMLParser succeeds or this is an invalid WXR file then return the results
if ( ! is_wp_error( $result ) || 'XML_parse_error' != $result->get_error_code() )
return $result;
}
// We have a malformed XML file, so display the error and fallthrough to regex
if ( isset($result) && defined('IMPORT_DEBUG') && IMPORT_DEBUG ) {
echo '<pre>';
if ( 'SimpleXML_parse_error' == $result->get_error_code() ) {
foreach ( $result->get_error_data() as $error )
echo $error->line . ':' . $error->column . ' ' . esc_html( $error->message ) . "\n";
} else if ( 'XML_parse_error' == $result->get_error_code() ) {
$error = $result->get_error_data();
echo $error[0] . ':' . $error[1] . ' ' . esc_html( $error[2] );
}
echo '</pre>';
echo '<p><strong>' . __( 'There was an error when reading this WXR file', 'wordpress-importer' ) . '</strong><br />';
echo __( 'Details are shown above. The importer will now try again with a different parser...', 'wordpress-importer' ) . '</p>';
}
// use regular expressions if nothing else available or this is bad XML
$parser = new WXR_Parser_Regex;
return $parser->parse( $file );
}
}
@@ -0,0 +1,608 @@
<?php
function envo_extra_pro_get_demos_data( $data ) {
// Demos url
$url = 'https://enwoo-wp.com/wp-content/uploads/demo-import/pro/';
$extras = array(
'pro-demo-1' => array(
'demo_name' => 'Enwoo PRO #1',
'categories' => array( 'WooCommerce', 'Elementor', 'PRO' ),
'xml_file' => '',
'theme_settings' => '',
'widgets_file' => '',
'screenshot' => $url . 'pro1.jpg',
'home_title' => 'Home PRO #1',
'blog_title' => 'Blog',
'posts_to_show' => '6',
'elementor_width' => '1140',
'is_shop' => true,
'woo_image_size' => '600',
'woo_thumb_size' => '300',
'woo_crop_width' => '2',
'woo_crop_height' => '3',
'required_plugins' => array(
'free' => array(
array(
'slug' => 'elementor',
'init' => 'elementor/elementor.php',
'name' => 'Elementor',
),
array(
'slug' => 'woocommerce',
'init' => 'woocommerce/woocommerce.php',
'name' => 'WooCommerce',
),
array(
'slug' => 'envo-elementor-for-woocommerce',
'init' => 'envo-elementor-for-woocommerce/elementor-templates-widgets-woocommerce.php',
'name' => 'Elementor Templates and Widgets for WooCommerce',
),
),
'recommended' => array(
array(
'slug' => 'yith-woocommerce-wishlist',
'init' => 'yith-woocommerce-wishlist/init.php',
'name' => 'YITH WooCommerce Wishlist',
),
array(
'slug' => 'yith-woocommerce-compare',
'init' => 'yith-woocommerce-compare/init.php',
'name' => 'YITH WooCommerce Compare',
),
),
'premium' => array(
array(
'slug' => 'enwoo-pro',
'init' => 'enwoo-pro/enwoo-pro.php',
'name' => 'Enwoo PRO',
), ),
),
),
'pro-demo-2' => array(
'demo_name' => 'Enwoo PRO #2',
'categories' => array( 'WooCommerce', 'Elementor', 'PRO' ),
'xml_file' => '',
'theme_settings' => '',
'widgets_file' => '',
'screenshot' => $url . 'pro2.jpg',
'home_title' => 'Home PRO #2',
'blog_title' => 'Blog',
'posts_to_show' => '6',
'elementor_width' => '1140',
'is_shop' => true,
'woo_image_size' => '600',
'woo_thumb_size' => '300',
'woo_crop_width' => '2',
'woo_crop_height' => '3',
'required_plugins' => array(
'free' => array(
array(
'slug' => 'elementor',
'init' => 'elementor/elementor.php',
'name' => 'Elementor',
),
array(
'slug' => 'woocommerce',
'init' => 'woocommerce/woocommerce.php',
'name' => 'WooCommerce',
),
array(
'slug' => 'envo-elementor-for-woocommerce',
'init' => 'envo-elementor-for-woocommerce/elementor-templates-widgets-woocommerce.php',
'name' => 'Elementor Templates and Widgets for WooCommerce',
),
),
'recommended' => array(
array(
'slug' => 'yith-woocommerce-wishlist',
'init' => 'yith-woocommerce-wishlist/init.php',
'name' => 'YITH WooCommerce Wishlist',
),
array(
'slug' => 'yith-woocommerce-compare',
'init' => 'yith-woocommerce-compare/init.php',
'name' => 'YITH WooCommerce Compare',
),
),
'premium' => array(
array(
'slug' => 'enwoo-pro',
'init' => 'enwoo-pro/enwoo-pro.php',
'name' => 'Enwoo PRO',
), ),
),
),
'pro-demo-3' => array(
'demo_name' => 'Enwoo PRO #3',
'categories' => array( 'WooCommerce', 'Elementor', 'PRO' ),
'xml_file' => '',
'theme_settings' => '',
'widgets_file' => '',
'screenshot' => $url . 'pro3.jpg',
'home_title' => 'Home PRO #3',
'blog_title' => 'Blog',
'posts_to_show' => '6',
'elementor_width' => '1140',
'is_shop' => true,
'woo_image_size' => '600',
'woo_thumb_size' => '300',
'woo_crop_width' => '2',
'woo_crop_height' => '3',
'required_plugins' => array(
'free' => array(
array(
'slug' => 'elementor',
'init' => 'elementor/elementor.php',
'name' => 'Elementor',
),
array(
'slug' => 'woocommerce',
'init' => 'woocommerce/woocommerce.php',
'name' => 'WooCommerce',
),
array(
'slug' => 'envo-elementor-for-woocommerce',
'init' => 'envo-elementor-for-woocommerce/elementor-templates-widgets-woocommerce.php',
'name' => 'Elementor Templates and Widgets for WooCommerce',
),
),
'recommended' => array(
array(
'slug' => 'yith-woocommerce-wishlist',
'init' => 'yith-woocommerce-wishlist/init.php',
'name' => 'YITH WooCommerce Wishlist',
),
array(
'slug' => 'yith-woocommerce-compare',
'init' => 'yith-woocommerce-compare/init.php',
'name' => 'YITH WooCommerce Compare',
),
),
'premium' => array(
array(
'slug' => 'enwoo-pro',
'init' => 'enwoo-pro/enwoo-pro.php',
'name' => 'Enwoo PRO',
), ),
),
),
'pro-demo-4' => array(
'demo_name' => 'Enwoo PRO #4',
'categories' => array( 'WooCommerce', 'Elementor', 'PRO' ),
'xml_file' => '',
'theme_settings' => '',
'widgets_file' => '',
'screenshot' => $url . 'pro4.jpg',
'home_title' => 'Home PRO #4',
'blog_title' => 'Blog',
'posts_to_show' => '6',
'elementor_width' => '1140',
'is_shop' => true,
'woo_image_size' => '600',
'woo_thumb_size' => '300',
'woo_crop_width' => '2',
'woo_crop_height' => '3',
'required_plugins' => array(
'free' => array(
array(
'slug' => 'elementor',
'init' => 'elementor/elementor.php',
'name' => 'Elementor',
),
array(
'slug' => 'woocommerce',
'init' => 'woocommerce/woocommerce.php',
'name' => 'WooCommerce',
),
array(
'slug' => 'envo-elementor-for-woocommerce',
'init' => 'envo-elementor-for-woocommerce/elementor-templates-widgets-woocommerce.php',
'name' => 'Elementor Templates and Widgets for WooCommerce',
),
),
'recommended' => array(
array(
'slug' => 'yith-woocommerce-wishlist',
'init' => 'yith-woocommerce-wishlist/init.php',
'name' => 'YITH WooCommerce Wishlist',
),
array(
'slug' => 'yith-woocommerce-compare',
'init' => 'yith-woocommerce-compare/init.php',
'name' => 'YITH WooCommerce Compare',
),
),
'premium' => array(
array(
'slug' => 'enwoo-pro',
'init' => 'enwoo-pro/enwoo-pro.php',
'name' => 'Enwoo PRO',
), ),
),
),
'pro-demo-5' => array(
'demo_name' => 'Enwoo PRO #5',
'categories' => array( 'Business', 'Elementor', 'PRO' ),
'xml_file' => '',
'theme_settings' => '',
'widgets_file' => '',
'screenshot' => $url . 'pro5.jpg',
'home_title' => 'Home PRO #5',
'blog_title' => 'Blog',
'posts_to_show' => '6',
'elementor_width' => '1140',
'is_shop' => false,
'required_plugins' => array(
'free' => array(
array(
'slug' => 'elementor',
'init' => 'elementor/elementor.php',
'name' => 'Elementor',
),
),
'recommended' => array(),
'premium' => array(
array(
'slug' => 'enwoo-pro',
'init' => 'enwoo-pro/enwoo-pro.php',
'name' => 'Enwoo PRO',
), ),
),
),
'pro-demo-6' => array(
'demo_name' => 'Enwoo PRO #6',
'categories' => array( 'WooCommerce', 'Gutenberg', 'PRO' ),
'xml_file' => '',
'theme_settings' => '',
'widgets_file' => '',
'screenshot' => $url . 'pro6.jpg',
'home_title' => 'Home PRO #6',
'blog_title' => 'Blog',
'posts_to_show' => '6',
'elementor_width' => '1140',
'is_shop' => true,
'woo_image_size' => '600',
'woo_thumb_size' => '300',
'woo_crop_width' => '2',
'woo_crop_height' => '3',
'required_plugins' => array(
'free' => array(
array(
'slug' => 'woocommerce',
'init' => 'woocommerce/woocommerce.php',
'name' => 'WooCommerce',
),
),
'recommended' => array(),
'premium' => array(
array(
'slug' => 'enwoo-pro',
'init' => 'enwoo-pro/enwoo-pro.php',
'name' => 'Enwoo PRO',
), ),
),
),
'pro-demo-7' => array(
'demo_name' => 'Enwoo PRO #7',
'categories' => array( 'Business', 'Gutenberg', 'PRO', 'Landing Page' ),
'xml_file' => '',
'theme_settings' => '',
'widgets_file' => '',
'screenshot' => $url . 'pro7.jpg',
'home_title' => 'Home PRO #7',
'blog_title' => 'Blog',
'posts_to_show' => '6',
'is_shop' => false,
'required_plugins' => array(
'free' => array(),
'recommended' => array(),
'premium' => array(
array(
'slug' => 'enwoo-pro',
'init' => 'enwoo-pro/enwoo-pro.php',
'name' => 'Enwoo PRO',
), ),
),
),
'pro-demo-8' => array(
'demo_name' => 'Enwoo PRO #8',
'categories' => array( 'WooCommerce', 'Gutenberg', 'PRO' ),
'xml_file' => '',
'theme_settings' => '',
'widgets_file' => '',
'screenshot' => $url . 'pro8.jpg',
'home_title' => 'Home PRO #8',
'blog_title' => 'Blog',
'posts_to_show' => '6',
'is_shop' => true,
'woo_image_size' => '600',
'woo_thumb_size' => '300',
'woo_crop_width' => '2',
'woo_crop_height' => '3',
'required_plugins' => array(
'free' => array(
array(
'slug' => 'woocommerce',
'init' => 'woocommerce/woocommerce.php',
'name' => 'WooCommerce',
),
),
'recommended' => array(),
'premium' => array(
array(
'slug' => 'enwoo-pro',
'init' => 'enwoo-pro/enwoo-pro.php',
'name' => 'Enwoo PRO',
), ),
),
),
'pro-demo-9' => array(
'demo_name' => 'Enwoo PRO #9',
'categories' => array( 'WooCommerce', 'Gutenberg', 'PRO' ),
'xml_file' => '',
'theme_settings' => '',
'widgets_file' => '',
'screenshot' => $url . 'pro9.jpg',
'home_title' => 'Home PRO #9',
'blog_title' => 'Blog',
'posts_to_show' => '6',
'is_shop' => true,
'woo_image_size' => '600',
'woo_thumb_size' => '300',
'woo_crop_width' => '2',
'woo_crop_height' => '3',
'required_plugins' => array(
'free' => array(
array(
'slug' => 'woocommerce',
'init' => 'woocommerce/woocommerce.php',
'name' => 'WooCommerce',
),
),
'recommended' => array(),
'premium' => array(
array(
'slug' => 'enwoo-pro',
'init' => 'enwoo-pro/enwoo-pro.php',
'name' => 'Enwoo PRO',
), ),
),
),
'pro-demo-10' => array(
'demo_name' => 'Enwoo PRO #10',
'categories' => array( 'WooCommerce', 'Elementor', 'PRO', 'Business', 'Landing Page' ),
'xml_file' => '',
'theme_settings' => '',
'widgets_file' => '',
'screenshot' => $url . 'pro10.jpg',
'home_title' => 'Home PRO #10',
'blog_title' => 'Blog',
'posts_to_show' => '6',
'elementor_width' => '1140',
'is_shop' => true,
'woo_image_size' => '600',
'woo_thumb_size' => '300',
'woo_crop_width' => '2',
'woo_crop_height' => '3',
'required_plugins' => array(
'free' => array(
array(
'slug' => 'elementor',
'init' => 'elementor/elementor.php',
'name' => 'Elementor',
),
array(
'slug' => 'woocommerce',
'init' => 'woocommerce/woocommerce.php',
'name' => 'WooCommerce',
),
array(
'slug' => 'envo-elementor-for-woocommerce',
'init' => 'envo-elementor-for-woocommerce/elementor-templates-widgets-woocommerce.php',
'name' => 'Elementor Templates and Widgets for WooCommerce',
),
),
'recommended' => array(),
'premium' => array(
array(
'slug' => 'enwoo-pro',
'init' => 'enwoo-pro/enwoo-pro.php',
'name' => 'Enwoo PRO',
),
),
),
),
'pro-demo-11' => array(
'demo_name' => 'Enwoo PRO #11',
'categories' => array( 'Elementor', 'PRO', 'Business', 'Landing Page' ),
'xml_file' => '',
'theme_settings' => '',
'widgets_file' => '',
'screenshot' => $url . 'pro11.jpg',
'home_title' => 'Home PRO #11',
'blog_title' => 'Blog',
'posts_to_show' => '6',
'elementor_width' => '1140',
'is_shop' => true,
'woo_image_size' => '600',
'woo_thumb_size' => '300',
'woo_crop_width' => '2',
'woo_crop_height' => '3',
'required_plugins' => array(
'free' => array(
array(
'slug' => 'elementor',
'init' => 'elementor/elementor.php',
'name' => 'Elementor',
),
),
'recommended' => array(),
'premium' => array(
array(
'slug' => 'enwoo-pro',
'init' => 'enwoo-pro/enwoo-pro.php',
'name' => 'Enwoo PRO',
),
),
),
),
'pro-demo-12' => array(
'demo_name' => 'Enwoo PRO #12',
'categories' => array( 'Elementor', 'PRO', 'WooCommerce' ),
'xml_file' => '',
'theme_settings' => '',
'widgets_file' => '',
'screenshot' => $url . 'pro12.jpg',
'home_title' => 'Home PRO #12',
'blog_title' => 'Blog',
'posts_to_show' => '6',
'elementor_width' => '1140',
'is_shop' => true,
'woo_image_size' => '600',
'woo_thumb_size' => '300',
'woo_crop_width' => '2',
'woo_crop_height' => '3',
'required_plugins' => array(
'free' => array(
array(
'slug' => 'elementor',
'init' => 'elementor/elementor.php',
'name' => 'Elementor',
),
array(
'slug' => 'woocommerce',
'init' => 'woocommerce/woocommerce.php',
'name' => 'WooCommerce',
),
array(
'slug' => 'envo-elementor-for-woocommerce',
'init' => 'envo-elementor-for-woocommerce/elementor-templates-widgets-woocommerce.php',
'name' => 'Elementor Templates and Widgets for WooCommerce',
),
),
'recommended' => array(),
'premium' => array(
array(
'slug' => 'enwoo-pro',
'init' => 'enwoo-pro/enwoo-pro.php',
'name' => 'Enwoo PRO',
),
),
),
),
'pro-demo-13' => array(
'demo_name' => 'Enwoo PRO #13',
'categories' => array( 'Elementor', 'PRO', 'Landing Page' ),
'xml_file' => '',
'theme_settings' => '',
'widgets_file' => '',
'screenshot' => $url . 'pro13.jpg',
'home_title' => 'Home PRO #13',
'blog_title' => 'Blog',
'posts_to_show' => '6',
'elementor_width' => '1140',
'is_shop' => false,
'required_plugins' => array(
'free' => array(
array(
'slug' => 'elementor',
'init' => 'elementor/elementor.php',
'name' => 'Elementor',
),
),
'recommended' => array(),
'premium' => array(
array(
'slug' => 'enwoo-pro',
'init' => 'enwoo-pro/enwoo-pro.php',
'name' => 'Enwoo PRO',
),
),
),
),
'pro-demo-14' => array(
'demo_name' => 'Enwoo PRO #14',
'categories' => array( 'Elementor', 'PRO', 'WooCommerce', 'Business' ),
'xml_file' => '',
'theme_settings' => '',
'widgets_file' => '',
'screenshot' => $url . 'pro14.jpg',
'home_title' => 'Home PRO #14',
'blog_title' => 'Blog',
'posts_to_show' => '6',
'elementor_width' => '1140',
'is_shop' => true,
'woo_image_size' => '600',
'woo_thumb_size' => '300',
'woo_crop_width' => '2',
'woo_crop_height' => '3',
'required_plugins' => array(
'free' => array(
array(
'slug' => 'elementor',
'init' => 'elementor/elementor.php',
'name' => 'Elementor',
),
array(
'slug' => 'woocommerce',
'init' => 'woocommerce/woocommerce.php',
'name' => 'WooCommerce',
),
array(
'slug' => 'envo-elementor-for-woocommerce',
'init' => 'envo-elementor-for-woocommerce/elementor-templates-widgets-woocommerce.php',
'name' => 'Elementor Templates and Widgets for WooCommerce',
),
),
'recommended' => array(),
'premium' => array(
array(
'slug' => 'enwoo-pro',
'init' => 'enwoo-pro/enwoo-pro.php',
'name' => 'Enwoo PRO',
),
),
),
),
'pro-demo-15' => array(
'demo_name' => 'Enwoo PRO #15',
'categories' => array( 'Elementor', 'PRO', 'Landing Page', 'Business' ),
'xml_file' => '',
'theme_settings' => '',
'widgets_file' => '',
'screenshot' => $url . 'pro15.jpg',
'home_title' => 'Home PRO #15',
'blog_title' => 'Blog',
'posts_to_show' => '6',
'elementor_width' => '1140',
'is_shop' => false,
'required_plugins' => array(
'free' => array(
array(
'slug' => 'elementor',
'init' => 'elementor/elementor.php',
'name' => 'Elementor',
),
),
'recommended' => array(),
'premium' => array(
array(
'slug' => 'enwoo-pro',
'init' => 'enwoo-pro/enwoo-pro.php',
'name' => 'Enwoo PRO',
),
),
),
),
);
// combine the two arrays
$data = array_merge( $data, $extras );
return $data;
}
add_filter( 'envo_demos_data', 'envo_extra_pro_get_demos_data' );
@@ -0,0 +1,644 @@
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: EnvoThemes Demo Import\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-09-22 13:09+0200\n"
"PO-Revision-Date: 2016-03-09 16:20+0200\n"
"Last-Translator: \n"
"Language-Team: <info@envothemes.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Poedit-KeywordsList: _;gettext;gettext_noop;__;_e;esc_html__;esc_html_e;esc_attr__\n"
"X-Poedit-Basepath: ..\n"
"X-Generator: Poedit 2.2.3\n"
"X-Poedit-SearchPath-0: .\n"
#: envothemes-demo-import.php:148 envothemes-demo-import.php:157
msgid "Cheatin&#8217; huh?"
msgstr ""
#: envothemes-demo-import.php:227
#: includes/panel/classes/class-install-demos.php:32
#: includes/panel/classes/class-install-demos.php:36
#: includes/panel/classes/class-install-demos.php:57
msgid "Install Demos"
msgstr ""
#: includes/notify/notify.php:62
msgid "Leave A Review?"
msgstr ""
#: includes/notify/notify.php:63
#, php-format
msgid "We hope you've enjoyed using %1$s theme! Would you consider leaving us a review on WordPress.org?"
msgstr ""
#: includes/notify/notify.php:68
msgid "Sure! I'd love to!"
msgstr ""
#: includes/notify/notify.php:74
msgid "I've already left a review"
msgstr ""
#: includes/notify/notify.php:80
msgid "Maybe Later"
msgstr ""
#: includes/notify/notify.php:86
msgid "I need help!"
msgstr ""
#: includes/notify/notify.php:92
msgid "Never show again"
msgstr ""
#: includes/notify/notify.php:176
msgid "Go PRO for More Features"
msgstr ""
#: includes/notify/notify.php:178
#, php-format
msgid "Get the %1$s for more stunning elements, demos and customization options."
msgstr ""
#: includes/notify/notify.php:184 includes/notify/notify.php:276
msgid "Show me more"
msgstr ""
#: includes/notify/notify.php:190 includes/notify/notify.php:282
msgid "Hide this message"
msgstr ""
#: includes/notify/notify.php:263
msgid "New Awesome FREE WooCommerce Theme - Envo Shopper"
msgstr ""
#: includes/notify/notify.php:267
#, php-format
msgid "%1$s - new free WooCommerce theme form EnvoThemes. Check out theme %2$s, that can be imported for FREE with simple click."
msgstr ""
#: includes/panel/assets/class-plugin-installer.php:34
#: includes/panel/assets/class-plugin-installer.php:503
#: includes/panel/demos.php:494
msgid "Install Now"
msgstr ""
#: includes/panel/assets/class-plugin-installer.php:63
#: includes/panel/assets/class-plugin-installer.php:143
#: includes/panel/assets/class-plugin-installer.php:505
#: includes/panel/demos.php:499
msgid "Activated"
msgstr ""
#: includes/panel/assets/class-plugin-installer.php:67
#: includes/panel/assets/class-plugin-installer.php:147
#: includes/panel/assets/class-plugin-installer.php:504
#: includes/panel/demos.php:488
msgid "Activate"
msgstr ""
#: includes/panel/assets/class-plugin-installer.php:95
#: includes/panel/assets/class-plugin-installer.php:201
msgid "By"
msgstr ""
#: includes/panel/assets/class-plugin-installer.php:103
#: includes/panel/assets/class-plugin-installer.php:236
msgid "More Details"
msgstr ""
#: includes/panel/assets/class-plugin-installer.php:225
msgid "Get This Plugin"
msgstr ""
#: includes/panel/assets/class-plugin-installer.php:242
msgid "Premium"
msgstr ""
#: includes/panel/assets/class-plugin-installer.php:258
msgid "Sorry, you are not allowed to install plugins on this site."
msgstr ""
#: includes/panel/assets/class-plugin-installer.php:268
#: includes/panel/assets/class-plugin-installer.php:338
#: includes/panel/assets/class-plugin-installer.php:409
msgid "Error - unable to verify nonce, please try again."
msgstr ""
#: includes/panel/assets/class-plugin-installer.php:326
#: includes/panel/assets/class-plugin-installer.php:397
msgid "Sorry, you are not allowed to activate plugins on this site."
msgstr ""
#: includes/panel/assets/class-plugin-installer.php:502
msgid "Are you sure you want to install this plugin?"
msgstr ""
#: includes/panel/classes/class-install-demos.php:61
msgid "Are you ready to create an amazing website? "
msgstr ""
#: includes/panel/classes/class-install-demos.php:61
#: includes/wizard/wizard.php:116
msgid "Run the Setup Wizard"
msgstr ""
#: includes/panel/classes/class-install-demos.php:78
#: includes/wizard/wizard.php:424
msgid "All"
msgstr ""
#: includes/panel/classes/class-install-demos.php:85
msgid "Search demos..."
msgstr ""
#: includes/panel/classes/class-install-demos.php:117
#: includes/wizard/wizard.php:457
msgid "Live Preview"
msgstr ""
#: includes/panel/classes/importers/class-parsers.php:44
#: includes/panel/classes/importers/class-parsers.php:76
#: includes/panel/classes/importers/class-parsers.php:84
#: includes/panel/classes/importers/parsers/class-wxr-parser-simplexml.php:29
#: includes/panel/classes/importers/parsers/class-wxr-parser-simplexml.php:37
#: includes/panel/classes/importers/parsers/class-wxr-parser.php:42
msgid "There was an error when reading this WXR file"
msgstr ""
#: includes/panel/classes/importers/class-parsers.php:45
#: includes/panel/classes/importers/parsers/class-wxr-parser.php:43
msgid "Details are shown above. The importer will now try again with a different parser..."
msgstr ""
#: includes/panel/classes/importers/class-parsers.php:88
#: includes/panel/classes/importers/class-parsers.php:93
#: includes/panel/classes/importers/class-parsers.php:312
#: includes/panel/classes/importers/class-parsers.php:512
#: includes/panel/classes/importers/parsers/class-wxr-parser-regex.php:96
#: includes/panel/classes/importers/parsers/class-wxr-parser-simplexml.php:41
#: includes/panel/classes/importers/parsers/class-wxr-parser-simplexml.php:46
#: includes/panel/classes/importers/parsers/class-wxr-parser-xml.php:48
msgid "This does not appear to be a WXR file, missing/invalid WXR version number"
msgstr ""
#: includes/panel/classes/importers/class-widget-importer.php:84
msgid "Sidebar does not exist in theme (moving widget to Inactive)"
msgstr ""
#: includes/panel/classes/importers/class-widget-importer.php:106
msgid "Site does not support widget"
msgstr ""
#: includes/panel/classes/importers/class-widget-importer.php:127
msgid "Widget already exists"
msgstr ""
#: includes/panel/classes/importers/class-widget-importer.php:185
msgid "Imported"
msgstr ""
#: includes/panel/classes/importers/class-widget-importer.php:189
msgid "Imported to Inactive"
msgstr ""
#: includes/panel/classes/importers/class-widget-importer.php:195
msgid "No Title"
msgstr ""
#: includes/panel/classes/importers/class-wordpress-importer.php:152
#: includes/panel/classes/importers/class-wordpress-importer.php:161
#: includes/panel/classes/importers/class-wordpress-importer.php:212
#: includes/panel/classes/importers/class-wordpress-importer.php:216
#: includes/panel/classes/importers/class-wordpress-importer.php:225
msgid "Sorry, there has been an error."
msgstr ""
#: includes/panel/classes/importers/class-wordpress-importer.php:153
msgid "The file does not exist, please try again."
msgstr ""
#: includes/panel/classes/importers/class-wordpress-importer.php:196
msgid "All done."
msgstr ""
#: includes/panel/classes/importers/class-wordpress-importer.php:196
msgid "Have fun!"
msgstr ""
#: includes/panel/classes/importers/class-wordpress-importer.php:197
msgid "Remember to update the passwords and roles of imported users."
msgstr ""
#: includes/panel/classes/importers/class-wordpress-importer.php:217
#, php-format
msgid "The export file could not be found at <code>%s</code>. It is likely that this was caused by a permissions problem."
msgstr ""
#: includes/panel/classes/importers/class-wordpress-importer.php:233
#, php-format
msgid "This WXR file (version %s) may not be supported by this version of the importer. Please consider updating."
msgstr ""
#: includes/panel/classes/importers/class-wordpress-importer.php:258
#, php-format
msgid "Failed to import author %s. Their posts will be attributed to the current user."
msgstr ""
#: includes/panel/classes/importers/class-wordpress-importer.php:284
msgid "Assign Authors"
msgstr ""
#: includes/panel/classes/importers/class-wordpress-importer.php:285
msgid "To make it simpler for you to edit and save the imported content, you may want to reassign the author of the imported item to an existing user of this site, such as your primary administrator account."
msgstr ""
#: includes/panel/classes/importers/class-wordpress-importer.php:287
#, php-format
msgid "If a new user is created by WordPress, a new password will be randomly generated and the new user&#8217;s role will be set as %s. Manually changing the new user&#8217;s details will be necessary."
msgstr ""
#: includes/panel/classes/importers/class-wordpress-importer.php:297
msgid "Import Attachments"
msgstr ""
#: includes/panel/classes/importers/class-wordpress-importer.php:300
msgid "Download and import file attachments"
msgstr ""
#: includes/panel/classes/importers/class-wordpress-importer.php:317
msgid "Import author:"
msgstr ""
#: includes/panel/classes/importers/class-wordpress-importer.php:329
msgid "or create new user with login name:"
msgstr ""
#: includes/panel/classes/importers/class-wordpress-importer.php:332
msgid "as a new user:"
msgstr ""
#: includes/panel/classes/importers/class-wordpress-importer.php:342
msgid "assign posts to an existing user:"
msgstr ""
#: includes/panel/classes/importers/class-wordpress-importer.php:344
msgid "or assign posts to an existing user:"
msgstr ""
#: includes/panel/classes/importers/class-wordpress-importer.php:352
msgid "- Select -"
msgstr ""
#: includes/panel/classes/importers/class-wordpress-importer.php:406
#, php-format
msgid "Failed to create new user for %s. Their posts will be attributed to the current user."
msgstr ""
#: includes/panel/classes/importers/class-wordpress-importer.php:458
#, php-format
msgid "Failed to import category %s"
msgstr ""
#: includes/panel/classes/importers/class-wordpress-importer.php:503
#, php-format
msgid "Failed to import post tag %s"
msgstr ""
#: includes/panel/classes/importers/class-wordpress-importer.php:558
#: includes/panel/classes/importers/class-wordpress-importer.php:784
#, php-format
msgid "Failed to import %s %s"
msgstr ""
#: includes/panel/classes/importers/class-wordpress-importer.php:651
#, php-format
msgid "Failed to import &#8220;%s&#8221;: Invalid post type %s"
msgstr ""
#: includes/panel/classes/importers/class-wordpress-importer.php:688
#, php-format
msgid "%s &#8220;%s&#8221; already exists."
msgstr ""
#: includes/panel/classes/importers/class-wordpress-importer.php:750
#, php-format
msgid "Failed to import %s &#8220;%s&#8221;"
msgstr ""
#: includes/panel/classes/importers/class-wordpress-importer.php:924
msgid "Menu item skipped due to missing menu slug"
msgstr ""
#: includes/panel/classes/importers/class-wordpress-importer.php:931
#, php-format
msgid "Menu item skipped due to invalid menu slug: %s"
msgstr ""
#: includes/panel/classes/importers/class-wordpress-importer.php:994
msgid "Fetching attachments is not enabled"
msgstr ""
#: includes/panel/classes/importers/class-wordpress-importer.php:1007
msgid "Invalid file type"
msgstr ""
#: includes/panel/classes/importers/class-wordpress-importer.php:1051
msgid "Remote server did not respond"
msgstr ""
#: includes/panel/classes/importers/class-wordpress-importer.php:1057
#, php-format
msgid "Remote server returned error response %1$d %2$s"
msgstr ""
#: includes/panel/classes/importers/class-wordpress-importer.php:1064
msgid "Remote file is incorrect size"
msgstr ""
#: includes/panel/classes/importers/class-wordpress-importer.php:1069
msgid "Zero size file downloaded"
msgstr ""
#: includes/panel/classes/importers/class-wordpress-importer.php:1075
#, php-format
msgid "Remote file is too large, limit is %s"
msgstr ""
#: includes/panel/classes/importers/class-wordpress-importer.php:1175
msgid "Import WordPress"
msgstr ""
#: includes/panel/classes/importers/class-wordpress-importer.php:1182
#, php-format
msgid "A new version of this importer is available. Please update to version %s to ensure compatibility with newer export files."
msgstr ""
#: includes/panel/classes/importers/class-wordpress-importer.php:1197
msgid "Howdy! Upload your WordPress eXtended RSS (WXR) file and we&#8217;ll import the posts, pages, comments, custom fields, categories, and tags into this site."
msgstr ""
#: includes/panel/classes/importers/class-wordpress-importer.php:1198
msgid "Choose a WXR (.xml) file to upload, then click Upload file and import."
msgstr ""
#: includes/panel/demos.php:94 includes/wizard/wizard.php:177
msgid "There was a problem during the importing process resulting in the following error from your server:"
msgstr ""
#: includes/panel/demos.php:95 includes/wizard/wizard.php:178
msgid "Activating"
msgstr ""
#: includes/panel/demos.php:96 includes/wizard/wizard.php:179
msgid "Active"
msgstr ""
#: includes/panel/demos.php:385 includes/wizard/classes/WizardAjax.php:44
#, php-format
msgid "Import the %1$s demo"
msgstr ""
#: includes/panel/demos.php:392 includes/wizard/classes/WizardAjax.php:51
#, php-format
msgid "Importing demo data allow you to quickly edit everything instead of creating content from scratch. It is recommended uploading sample data on a fresh WordPress install to prevent conflicts with your current content. You can use this plugin to reset your site if needed: %1$sWordpress Database Reset%2$s."
msgstr ""
#: includes/panel/demos.php:399 includes/wizard/classes/WizardAjax.php:56
msgid "Required Plugins"
msgstr ""
#: includes/panel/demos.php:400 includes/wizard/classes/WizardAjax.php:57
msgid "For your site to look exactly like this demo, the plugins below need to be activated."
msgstr ""
#: includes/panel/demos.php:411
msgid "Go to the next step"
msgstr ""
#: includes/panel/demos.php:421 includes/wizard/classes/WizardAjax.php:77
msgid "Select what you want to import:"
msgstr ""
#: includes/panel/demos.php:427 includes/wizard/classes/WizardAjax.php:83
msgid "Import XML Data"
msgstr ""
#: includes/panel/demos.php:427 includes/wizard/classes/WizardAjax.php:83
msgid "pages, posts, images, menus, etc..."
msgstr ""
#: includes/panel/demos.php:434 includes/wizard/classes/WizardAjax.php:90
msgid "Import Customizer Settings"
msgstr ""
#: includes/panel/demos.php:441 includes/wizard/classes/WizardAjax.php:97
msgid "Import Widgets"
msgstr ""
#: includes/panel/demos.php:449
msgid "Install this demo"
msgstr ""
#: includes/panel/demos.php:454 includes/wizard/classes/WizardAjax.php:110
msgid "The import process could take some time, please be patient"
msgstr ""
#: includes/panel/demos.php:460 includes/wizard/classes/WizardAjax.php:116
msgid "Demo Imported!"
msgstr ""
#: includes/panel/demos.php:461
msgid "See the result"
msgstr ""
#: includes/panel/demos.php:510
msgid "Get This Addon"
msgstr ""
#: includes/panel/demos.php:532
msgid "No plugin specified"
msgstr ""
#: includes/panel/demos.php:552
msgid "Plugin Successfully Activated"
msgstr ""
#: includes/panel/demos.php:574
msgid "Importing XML Data"
msgstr ""
#: includes/panel/demos.php:580
msgid "Importing Customizer Settings"
msgstr ""
#: includes/panel/demos.php:586
msgid "Importing Widgets"
msgstr ""
#: includes/panel/demos.php:854
msgid "Can not retrieve sample data xml file. The server may be down at the moment please try again later. If you still have issues contact the theme developer for assistance."
msgstr ""
#: includes/panel/demos.php:869
msgid "The xml import file could not be accessed. Please try again or contact the theme developer."
msgstr ""
#: includes/panel/demos.php:905
msgid "Can not retrieve class-wp-importer.php"
msgstr ""
#: includes/panel/demos.php:915
msgid "Can not retrieve wordpress-importer.php"
msgstr ""
#: includes/panel/demos.php:926
msgid "Sample data file appears corrupt or can not be accessed."
msgstr ""
#: includes/wizard/classes/QuietSkin.php:35
#, php-format
msgid "Successfully installed the plugin <strong>%s %s</strong>."
msgstr ""
#: includes/wizard/classes/QuietSkin.php:48
msgid "Activate Plugin &amp; Run Importer"
msgstr ""
#: includes/wizard/classes/QuietSkin.php:50
msgid "Activate Plugin &amp; Return to Press This"
msgstr ""
#: includes/wizard/classes/QuietSkin.php:52
msgid "Activate Plugin"
msgstr ""
#: includes/wizard/classes/QuietSkin.php:56
msgid "Network Activate"
msgstr ""
#: includes/wizard/classes/QuietSkin.php:61
msgid "Return to Importers"
msgstr ""
#: includes/wizard/classes/QuietSkin.php:63
#: includes/wizard/classes/QuietSkin.php:65
msgid "Return to Plugin Installer"
msgstr ""
#: includes/wizard/classes/QuietSkin.php:67
msgid "Return to Plugins page"
msgstr ""
#: includes/wizard/classes/WizardAjax.php:105
msgid "Import"
msgstr ""
#: includes/wizard/classes/WizardAjax.php:119
msgid "The import didn't import well please contact the support."
msgstr ""
#: includes/wizard/wizard.php:114
msgid "Are you ready to create an amazing website?"
msgstr ""
#: includes/wizard/wizard.php:117
msgid "Skip setup"
msgstr ""
#: includes/wizard/wizard.php:144
msgid "Welcome"
msgstr ""
#: includes/wizard/wizard.php:148
msgid "Choosing Demo"
msgstr ""
#: includes/wizard/wizard.php:152
msgid "Customize"
msgstr ""
#: includes/wizard/wizard.php:156
msgid "Ready"
msgstr ""
#: includes/wizard/wizard.php:194
msgid "EnvoThemes &rsaquo; Setup Wizard"
msgstr ""
#: includes/wizard/wizard.php:413
#, php-format
msgid "Clicking %1$sLive Preview%2$s will open the demo in a new window for you to decide which template to use. Then %1$sSelect%2$s the demo you want and click %1$sInstall Demo%2$s in the bottom."
msgstr ""
#: includes/wizard/wizard.php:458
msgid "Select"
msgstr ""
#: includes/wizard/wizard.php:470
msgid "Install Demo"
msgstr ""
#: includes/wizard/wizard.php:471 includes/wizard/wizard.php:575
msgid "Skip Step"
msgstr ""
#: includes/wizard/wizard.php:478
msgid "Next Step"
msgstr ""
#: includes/wizard/wizard.php:518
msgid "Logo"
msgstr ""
#: includes/wizard/wizard.php:519
msgid "Please add your logo below."
msgstr ""
#: includes/wizard/wizard.php:524
msgid "Upload"
msgstr ""
#: includes/wizard/wizard.php:532
msgid "Site Title"
msgstr ""
#: includes/wizard/wizard.php:533
msgid "Please add your Site Title below."
msgstr ""
#: includes/wizard/wizard.php:538
msgid "Tagline"
msgstr ""
#: includes/wizard/wizard.php:539
msgid "Please add your Tagline below."
msgstr ""
#: includes/wizard/wizard.php:559
msgid "Site Icon"
msgstr ""
#: includes/wizard/wizard.php:560
msgid "Site Icons are what you see in browser tabs, bookmark bars, and within the WordPress mobile apps. Upload one here! Site Icons should be square and at least 512 × 512 pixels."
msgstr ""
#: includes/wizard/wizard.php:574
msgid "Continue"
msgstr ""
#: includes/wizard/wizard.php:617
msgid "Hooray!"
msgstr ""
#: includes/wizard/wizard.php:618
msgid "Your website is ready"
msgstr ""
#: includes/wizard/wizard.php:624
msgid "View Your Website"
msgstr ""
@@ -0,0 +1,121 @@
=== EnvoThemes Demo Import ===
Contributors: EnvoThemes
Requires at least: 4.5
Tested up to: 5.9.0
Stable tag: 1.2.2
License: GPLv2 or later
Requires PHP: 5.4.0
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: WordPress, import, content, demo, data, widgets, settings, theme options
== Description ==
Import EnvoThemes official themes demo content, widgets and theme settings with just one click.
== Supported Themes ==
* [Envo Shopper](https://envothemes.com/free-envo-shopper/)
* [Envo Marketplace](https://envothemes.com/free-envo-marketplace/)
* [Envo Online Store](https://envothemes.com/free-envo-online-store/)
* [Envo Shop](https://wordpress.org/themes/envo-shop/)
* [Envo Storefront](https://wordpress.org/themes/envo-storefront/)
* [Envo eCommerce](https://wordpress.org/themes/envo-ecommerce/)
== Installation ==
- Upload the entire `envothemes-demo-import` folder to the `/wp-content/plugins/` directory.
- Activate the plugin through the 'Plugins' menu in WordPress.
- Done!
= After the plugin active =
- You will find 'Appearance > Import Demos' menu in your WordPress admin panel.
== Copyright ==
EnvoThemes Demo Import bundles the following third-party resources:
WordPress Importer, by wordpressdotorg
License: GPL version 2 or later
Source: http://wordpress.org/extend/plugins/wordpress-importer/
== Changelog ==
= 1.2.2 =
* Tested with WP 5.9
= 1.2.1 =
* Fixed notice display
= 1.2.0 =
* Added support for new theme
= 1.1.3 =
* Tested with WP 5.8
= 1.1.2 =
* Fixed PHP 8+ import error
= 1.1.1 =
* Added compatibility for WP 5.7
= 1.1.0 =
* Added support for new theme
* Added compatibility for WP 5.6
= 1.0.17 =
* Fixed code
= 1.0.16 =
* Updated notification message
= 1.0.15 =
* Added support for new free WooCommerce theme - Envo Online Store
= 1.0.14 =
* Fixed errors on plugin installer screen
= 1.0.13 =
* Added support for WP v5.5
= 1.0.12 =
* Updated recommended plugins in the importer
= 1.0.11 =
* Updated import function
= 1.0.10 =
* Version update
= 1.0.9 =
* Fixed missing files
= 1.0.8 =
* Updated xml importer
* Added redirection after activate to demo import page
* Added link to demo import page
= 1.0.7 =
* Updated readmefile
= 1.0.6 =
* Added support for new Envo Shop theme
* Updated code
= 1.0.5 =
* Added support for WP 5.4
* Updated code
= 1.0.4 =
* Added support for WP 5.3
= 1.0.3 =
* Added support for new EnvoThemes themes
= 1.0.2 =
* Fix version conflict
= 1.0.1 =
* Added notify message
= 1.0.0 =
* Initial release
@@ -0,0 +1,24 @@
<?php
if (!function_exists('envo_extra_product_categories')) {
function envo_extra_product_categories() {
if (get_theme_mod('woo_archive_product_categories', 1) == 1) {
global $product;
$name = '';
$id = $product->get_id();
$cat_ids = $product->get_category_ids();
// if product has categories, concatenate cart item name with them
if ($cat_ids) {
$name = wc_get_product_category_list($id, ', ', '<div class="archive-product-categories">', '</div>');
}
echo wp_kses_post($name);
}
}
add_action('woocommerce_after_shop_loop_item_title', 'envo_extra_product_categories', 1);
}