From 849db5099d0310824df84ea819527438f627ec10 Mon Sep 17 00:00:00 2001 From: Giucu Date: Thu, 8 Feb 2018 10:56:22 +0200 Subject: [PATCH 1/9] #247 --- assets/js/shapely-scripts.js | 1 + woocommerce/product-searchform.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/assets/js/shapely-scripts.js b/assets/js/shapely-scripts.js index 93d0602..5d396c5 100644 --- a/assets/js/shapely-scripts.js +++ b/assets/js/shapely-scripts.js @@ -341,6 +341,7 @@ } ); } else { + $( play ).on( 'click', function( e ) { var parent = $( this ).parents( '.video-widget' ), instance = $( parent ).data( 'vide' ), diff --git a/woocommerce/product-searchform.php b/woocommerce/product-searchform.php index 5ba8034..3fb6394 100644 --- a/woocommerce/product-searchform.php +++ b/woocommerce/product-searchform.php @@ -13,7 +13,7 @@ * @see https://docs.woocommerce.com/document/template-structure/ * @author WooThemes * @package WooCommerce/Templates - * @version 2.5.0 + * @version 3.3.0 */ if ( ! defined( 'ABSPATH' ) ) { From c97b93325f1cf29d28b659896909d72f77605bba Mon Sep 17 00:00:00 2001 From: Giucu Date: Thu, 8 Feb 2018 11:22:34 +0200 Subject: [PATCH 2/9] #201 --- inc/customizer.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/inc/customizer.php b/inc/customizer.php index d1e4ec0..a575199 100644 --- a/inc/customizer.php +++ b/inc/customizer.php @@ -1234,6 +1234,13 @@ function shapely_customizer_custom_control_css() { .shapely-logo-dimension .ratio { clear: both; } + .widget-content .iris-picker .iris-strip .ui-slider-handle { + top: auto; + transform: translateX(0); + } + .widget-content .iris-picker .iris-slider-offset { + margin: 0; + } Date: Thu, 8 Feb 2018 12:47:36 +0200 Subject: [PATCH 3/9] #158 --- assets/js/customizer.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/assets/js/customizer.js b/assets/js/customizer.js index 2c87b44..13a2e19 100644 --- a/assets/js/customizer.js +++ b/assets/js/customizer.js @@ -35,15 +35,20 @@ } ); control.widthElement.keyup( function() { - if ( control.respectRatio && control.hasLogo ) { - control.calculateRatio( 'width' ); + if ( control.hasLogo ) { + if ( control.respectRatio ) { + control.calculateRatio( 'width' ); + } control.shapelyInterval = setInterval( control.updateControl, 1000, control ); } + } ); control.heightElement.keyup( function() { - if ( control.respectRatio && control.hasLogo ) { - control.calculateRatio( 'height' ); + if ( control.hasLogo ) { + if ( control.respectRatio ) { + control.calculateRatio( 'height' ); + } control.shapelyInterval = setInterval( control.updateControl, 1000, control ); } } ); From 327c2182277532cf021d1dee10651817978c22b4 Mon Sep 17 00:00:00 2001 From: Giucu Date: Thu, 8 Feb 2018 14:15:44 +0200 Subject: [PATCH 4/9] #244 --- style.css | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/style.css b/style.css index 5c0b72d..ae859ca 100644 --- a/style.css +++ b/style.css @@ -4202,4 +4202,15 @@ span.wpcf7-not-valid-tip { .widget .text-center .img-responsive { margin-left: auto; margin-right: auto; +} +section .widget-post-thumbnail { + display: block; + margin-bottom: 24px; +} +section .widget-post-title { + margin: 0; +} +section .widget-post-excerpt { + margin-top: 24px; + padding: 0 15px; } \ No newline at end of file From f0830521c854f70ba55569f360cf2930a49c13d8 Mon Sep 17 00:00:00 2001 From: Giucu Date: Fri, 9 Feb 2018 14:34:32 +0200 Subject: [PATCH 5/9] Improved Welcome Screen --- .standard.json | 2 +- functions.php | 79 +- .../welcome-screen/class-shapely-welcome.php | 417 --------- inc/admin/welcome-screen/css/welcome.css | 209 ----- .../welcome-screen/css/welcome_customizer.css | 15 - .../img/colorlib-logo-white2.png | Bin 5610 -> 0 bytes inc/admin/welcome-screen/js/welcome.js | 33 - .../welcome-screen/js/welcome_customizer.js | 9 - .../sections/actions-required.php | 99 --- .../sections/recommended-plugins.php | 53 -- .../class-shapely-notify-system.php | 0 inc/class-shapely.php | 185 ++++ inc/customizer.php | 47 +- .../class-epsilon-welcome-screen.php | 799 ++++++++++++++++++ inc/libraries/welcome-screen/css/welcome.css | 463 ++++++++++ inc/libraries/welcome-screen/data/demo.json | 368 ++++++++ .../welcome-screen/img/ajax-loader.gif | Bin inc/libraries/welcome-screen/img/colorlib.png | Bin 0 -> 797197 bytes inc/libraries/welcome-screen/js/welcome.js | 292 +++++++ .../sections/getting-started.php | 4 +- .../sections/recommended-actions.php | 91 ++ .../sections/recommended-plugins.php | 39 + .../welcome-screen/sections/support.php | 0 23 files changed, 2243 insertions(+), 961 deletions(-) delete mode 100644 inc/admin/welcome-screen/class-shapely-welcome.php delete mode 100644 inc/admin/welcome-screen/css/welcome.css delete mode 100644 inc/admin/welcome-screen/css/welcome_customizer.css delete mode 100644 inc/admin/welcome-screen/img/colorlib-logo-white2.png delete mode 100644 inc/admin/welcome-screen/js/welcome.js delete mode 100644 inc/admin/welcome-screen/js/welcome_customizer.js delete mode 100644 inc/admin/welcome-screen/sections/actions-required.php delete mode 100644 inc/admin/welcome-screen/sections/recommended-plugins.php rename inc/{admin/welcome-screen => }/class-shapely-notify-system.php (100%) create mode 100644 inc/class-shapely.php create mode 100644 inc/libraries/welcome-screen/class-epsilon-welcome-screen.php create mode 100644 inc/libraries/welcome-screen/css/welcome.css create mode 100644 inc/libraries/welcome-screen/data/demo.json rename inc/{admin => libraries}/welcome-screen/img/ajax-loader.gif (100%) create mode 100644 inc/libraries/welcome-screen/img/colorlib.png create mode 100644 inc/libraries/welcome-screen/js/welcome.js rename inc/{admin => libraries}/welcome-screen/sections/getting-started.php (93%) create mode 100644 inc/libraries/welcome-screen/sections/recommended-actions.php create mode 100644 inc/libraries/welcome-screen/sections/recommended-plugins.php rename inc/{admin => libraries}/welcome-screen/sections/support.php (100%) diff --git a/.standard.json b/.standard.json index 5d326d2..8891683 100644 --- a/.standard.json +++ b/.standard.json @@ -1 +1 @@ -{"404.php":[],"archive-jetpack-portfolio.php":[],"archive.php":[],"attachment.php":[],"comments.php":[],"footer.php":[],"functions.php":[],"header.php":[],"inc/admin/welcome-screen/class-shapely-notify-system.php":[],"inc/admin/welcome-screen/class-shapely-welcome.php":[],"inc/admin/welcome-screen/sections/actions-required.php":[],"inc/admin/welcome-screen/sections/getting-started.php":[],"inc/admin/welcome-screen/sections/recommended-plugins.php":[],"inc/admin/welcome-screen/sections/support.php":[],"inc/class-shapely-related-posts.php":[],"inc/class-wp-bootstrap-navwalker.php":[],"inc/custom-controls/class-shapely-logo-dimensions.php":[],"inc/customizer.php":[],"inc/extras.php":[],"inc/jetpack.php":[],"inc/libraries/epsilon-framework/class-epsilon-autoloader.php":[],"inc/libraries/epsilon-framework/class-epsilon-framework.php":[],"inc/libraries/epsilon-framework/classes/class-epsilon-color-coded-categories.php":[],"inc/libraries/epsilon-framework/classes/class-epsilon-color-scheme.php":[],"inc/libraries/epsilon-framework/classes/class-epsilon-content-backup.php":[],"inc/libraries/epsilon-framework/classes/class-epsilon-customizer.php":[],"inc/libraries/epsilon-framework/classes/class-epsilon-notifications.php":[],"inc/libraries/epsilon-framework/classes/class-epsilon-notify-system.php":[],"inc/libraries/epsilon-framework/classes/class-epsilon-repeater-templates.php":[],"inc/libraries/epsilon-framework/classes/class-epsilon-sanitizers.php":[],"inc/libraries/epsilon-framework/classes/class-epsilon-typography.php":[],"inc/libraries/epsilon-framework/customizer/controls/class-epsilon-control-color-picker.php":[],"inc/libraries/epsilon-framework/customizer/controls/class-epsilon-control-color-scheme.php":[],"inc/libraries/epsilon-framework/customizer/controls/class-epsilon-control-customizer-navigation.php":[],"inc/libraries/epsilon-framework/customizer/controls/class-epsilon-control-icon-picker.php":[],"inc/libraries/epsilon-framework/customizer/controls/class-epsilon-control-image.php":[],"inc/libraries/epsilon-framework/customizer/controls/class-epsilon-control-layouts.php":[],"inc/libraries/epsilon-framework/customizer/controls/class-epsilon-control-repeater.php":[],"inc/libraries/epsilon-framework/customizer/controls/class-epsilon-control-section-repeater.php":[],"inc/libraries/epsilon-framework/customizer/controls/class-epsilon-control-slider.php":[],"inc/libraries/epsilon-framework/customizer/controls/class-epsilon-control-text-editor.php":[],"inc/libraries/epsilon-framework/customizer/controls/class-epsilon-control-toggle.php":[],"inc/libraries/epsilon-framework/customizer/controls/class-epsilon-control-typography.php":[],"inc/libraries/epsilon-framework/customizer/controls/class-epsilon-control-upsell.php":[],"inc/libraries/epsilon-framework/customizer/sections/class-epsilon-section-pro.php":[],"inc/libraries/epsilon-framework/customizer/sections/class-epsilon-section-recommended-actions.php":[],"inc/libraries/epsilon-framework/customizer/settings/class-epsilon-setting-repeater.php":[],"inc/socialnav.php":[],"inc/template-tags.php":[],"index.php":[],"page-templates/full-width.php":[],"page-templates/no-sidebar.php":[],"page-templates/sidebar-left.php":[],"page-templates/sidebar-right.php":[],"page-templates/template-home.php":[],"page.php":[],"search.php":[],"sidebar-footer.php":[],"sidebar.php":[],"single-jetpack-portfolio.php":[],"single.php":[],"template-parts/content-attachment.php":[],"template-parts/content-grid-small.php":[],"template-parts/content-grid-wide.php":[],"template-parts/content-none.php":[],"template-parts/content-page.php":[],"template-parts/content-portfolio.php":[],"template-parts/content-search.php":[],"template-parts/content.php":[],"template-parts/layouts/blog-grid.php":[],"template-parts/layouts/blog-large-image-grid.php":[],"template-parts/layouts/blog-large-image.php":[],"woocommerce.php":[],"woocommerce/product-searchform.php":[]} \ No newline at end of file +{"404.php":[],"archive-jetpack-portfolio.php":[],"archive.php":[],"attachment.php":[],"comments.php":[],"footer.php":[],"functions.php":[],"header.php":[],"inc/admin/welcome-screen/class-shapely-notify-system.php":[],"inc/admin/welcome-screen/class-shapely-welcome.php":[],"inc/admin/welcome-screen/sections/actions-required.php":[],"inc/admin/welcome-screen/sections/getting-started.php":[],"inc/admin/welcome-screen/sections/recommended-plugins.php":[],"inc/admin/welcome-screen/sections/support.php":[],"inc/class-shapely-builder.php":[],"inc/class-shapely-notify-system.php":[],"inc/class-shapely-related-posts.php":[],"inc/class-shapely.php":[],"inc/class-wp-bootstrap-navwalker.php":[],"inc/custom-controls/class-shapely-logo-dimensions.php":[],"inc/customizer.php":[],"inc/extras.php":[],"inc/jetpack.php":[],"inc/libraries/epsilon-framework/class-epsilon-autoloader.php":[],"inc/libraries/epsilon-framework/class-epsilon-framework.php":[],"inc/libraries/epsilon-framework/classes/backend/class-epsilon-content-backup.php":[],"inc/libraries/epsilon-framework/classes/backend/class-epsilon-notifications.php":[],"inc/libraries/epsilon-framework/classes/backend/class-epsilon-notify-system.php":[],"inc/libraries/epsilon-framework/classes/class-epsilon-ajax-controller.php":[],"inc/libraries/epsilon-framework/classes/class-epsilon-customizer.php":[],"inc/libraries/epsilon-framework/classes/helpers/class-epsilon-helper.php":[],"inc/libraries/epsilon-framework/classes/helpers/class-epsilon-sanitizers.php":[],"inc/libraries/epsilon-framework/classes/output/class-epsilon-color-coded-categories.php":[],"inc/libraries/epsilon-framework/classes/output/class-epsilon-color-scheme.php":[],"inc/libraries/epsilon-framework/classes/output/class-epsilon-page-generator.php":[],"inc/libraries/epsilon-framework/classes/output/class-epsilon-repeater-templates.php":[],"inc/libraries/epsilon-framework/classes/output/class-epsilon-typography.php":[],"inc/libraries/epsilon-framework/customizer/controls/class-epsilon-control-button-group.php":[],"inc/libraries/epsilon-framework/customizer/controls/class-epsilon-control-color-picker.php":[],"inc/libraries/epsilon-framework/customizer/controls/class-epsilon-control-color-scheme.php":[],"inc/libraries/epsilon-framework/customizer/controls/class-epsilon-control-customizer-navigation.php":[],"inc/libraries/epsilon-framework/customizer/controls/class-epsilon-control-icon-picker.php":[],"inc/libraries/epsilon-framework/customizer/controls/class-epsilon-control-image.php":[],"inc/libraries/epsilon-framework/customizer/controls/class-epsilon-control-layouts.php":[],"inc/libraries/epsilon-framework/customizer/controls/class-epsilon-control-repeater.php":[],"inc/libraries/epsilon-framework/customizer/controls/class-epsilon-control-section-repeater.php":[],"inc/libraries/epsilon-framework/customizer/controls/class-epsilon-control-slider.php":[],"inc/libraries/epsilon-framework/customizer/controls/class-epsilon-control-text-editor.php":[],"inc/libraries/epsilon-framework/customizer/controls/class-epsilon-control-toggle.php":[],"inc/libraries/epsilon-framework/customizer/controls/class-epsilon-control-typography.php":[],"inc/libraries/epsilon-framework/customizer/controls/class-epsilon-control-upsell.php":[],"inc/libraries/epsilon-framework/customizer/panels/class-epsilon-panel-regular.php":[],"inc/libraries/epsilon-framework/customizer/sections/class-epsilon-section-doubled.php":[],"inc/libraries/epsilon-framework/customizer/sections/class-epsilon-section-pro.php":[],"inc/libraries/epsilon-framework/customizer/sections/class-epsilon-section-recommended-actions.php":[],"inc/libraries/epsilon-framework/customizer/settings/class-epsilon-setting-repeater.php":[],"inc/libraries/welcome-screen/class-epsilon-welcome-screen.php":[],"inc/libraries/welcome-screen/sections/getting-started.php":[],"inc/libraries/welcome-screen/sections/recommended-actions.php":[],"inc/libraries/welcome-screen/sections/recommended-plugins.php":[],"inc/libraries/welcome-screen/sections/support.php":[],"inc/socialnav.php":[],"inc/template-tags.php":[],"index.php":[],"page-templates/full-width.php":[],"page-templates/no-sidebar.php":[],"page-templates/sidebar-left.php":[],"page-templates/sidebar-right.php":[],"page-templates/template-home.php":[],"page-templates/template-widget.php":[],"page.php":[],"search.php":[],"sidebar-footer.php":[],"sidebar.php":[],"single-jetpack-portfolio.php":[],"single.php":[],"template-parts/content-attachment.php":[],"template-parts/content-grid-small.php":[],"template-parts/content-grid-wide.php":[],"template-parts/content-none.php":[],"template-parts/content-page.php":[],"template-parts/content-portfolio.php":[],"template-parts/content-search.php":[],"template-parts/content.php":[],"template-parts/layouts/blog-grid.php":[],"template-parts/layouts/blog-large-image-grid.php":[],"template-parts/layouts/blog-large-image.php":[],"woocommerce.php":[],"woocommerce/product-searchform.php":[]} \ No newline at end of file diff --git a/functions.php b/functions.php index 386674f..82f9cf9 100644 --- a/functions.php +++ b/functions.php @@ -114,71 +114,6 @@ function shapely_setup() { add_theme_support( 'wc-product-gallery-slider' ); add_theme_support( 'customize-selective-refresh-widgets' ); - // Welcome screen - if ( is_admin() ) { - global $shapely_required_actions, $shapely_recommended_plugins; - - $shapely_recommended_plugins = array( - 'contact-form-7' => array( - 'recommended' => false, - ), - 'fancybox-for-wordpress' => array( - 'recommended' => false, - ), - 'wordpress-seo' => array( - 'recommended' => false, - ), - ); - - /* - * id - unique id; required - * title - * description - * check - check for plugins (if installed) - * plugin_slug - the plugin's slug (used for installing the plugin) - * - */ - $path = WPMU_PLUGIN_DIR . '/shapely-companion/inc/views/shapely-demo-content.php'; - if ( ! file_exists( $path ) ) { - $path = WP_PLUGIN_DIR . '/shapely-companion/inc/views/shapely-demo-content.php'; - if ( ! file_exists( $path ) ) { - $path = false; - } - } - - $shapely_required_actions = array( - array( - 'id' => 'shapely-req-ac-install-companion-plugin', - 'title' => Shapely_Notify_System::shapely_companion_title(), - 'description' => Shapely_Notify_System::shapely_companion_description(), - 'check' => Shapely_Notify_System::shapely_has_plugin( 'shapely-companion' ), - 'plugin_slug' => 'shapely-companion', - ), - array( - 'id' => 'shapely-req-ac-install-wp-jetpack-plugin', - 'title' => Shapely_Notify_System::shapely_jetpack_title(), - 'description' => Shapely_Notify_System::shapely_jetpack_description(), - 'check' => Shapely_Notify_System::shapely_has_plugin( 'jetpack' ), - 'plugin_slug' => 'jetpack', - ), - array( - 'id' => 'shapely-req-ac-install-contact-form-7', - 'title' => Shapely_Notify_System::shapely_cf7_title(), - 'description' => Shapely_Notify_System::shapely_cf7_description(), - 'check' => Shapely_Notify_System::shapely_has_plugin( 'contact-form-7' ), - 'plugin_slug' => 'contact-form-7', - ), - array( - 'id' => 'shapely-req-import-content', - 'title' => esc_html__( 'Import content', 'shapely' ), - 'external' => $path, - 'check' => Shapely_Notify_System::shapely_check_import_req(), - ), - - ); - - require get_template_directory() . '/inc/admin/welcome-screen/class-shapely-welcome.php'; - }// End if(). // Enable Shortcodes in widgets add_filter( 'widget_text', 'do_shortcode' ); @@ -328,16 +263,6 @@ function shapely_scripts() { add_action( 'wp_enqueue_scripts', 'shapely_scripts' ); -// Include Epsilon Framework -require_once 'inc/libraries/epsilon-framework/class-epsilon-autoloader.php'; -$args = array( - 'controls' => array( 'slider', 'toggle' ), // array of controls to load - 'sections' => array( 'recommended-actions', 'pro' ), // array of sections to load - 'backup' => false, -); - -new Epsilon_Framework( $args ); - /** * Custom template tags for this theme. */ @@ -374,9 +299,9 @@ function shapely_scripts() { require get_template_directory() . '/inc/class-shapely-related-posts.php'; /** - * Load the system checks ( used for notifications ) + * Load the shapely class */ -require get_template_directory() . '/inc/admin/welcome-screen/class-shapely-notify-system.php'; +require get_template_directory() . '/inc/class-shapely.php'; /** * Load the shapely page builder class diff --git a/inc/admin/welcome-screen/class-shapely-welcome.php b/inc/admin/welcome-screen/class-shapely-welcome.php deleted file mode 100644 index ac95567..0000000 --- a/inc/admin/welcome-screen/class-shapely-welcome.php +++ /dev/null @@ -1,417 +0,0 @@ -theme_name = $theme->get( 'Name' ); - $this->theme_slug = $theme->get( 'TextDomain' ); - - /** - * Add the notice in the admin backend - */ - $this->shapely_activation_admin_notice(); - - } - - /** - * Creates the dashboard page - * - * @see add_theme_page() - * @since 1.8.2.4 - */ - public function shapely_welcome_register_menu() { - $action_count = $this->count_actions(); - $title = $action_count > 0 ? esc_html__( 'About Shapely', 'shapely' ) . '' . esc_html( $action_count ) . '' : esc_html__( 'About Shapely', 'shapely' ); - - add_theme_page( - 'About shapely', $title, 'edit_theme_options', 'shapely-welcome', array( - $this, - 'shapely_welcome_screen', - ) - ); - } - - /** - * Adds an admin notice upon successful activation. - * - * @since 1.8.2.4 - */ - public function shapely_activation_admin_notice() { - if ( ! class_exists( 'Epsilon_Notifications' ) ) { - return; - } - - if ( empty( $this->notice ) ) { - $this->notice = ''; - - /* Translators: %1$s - Theme Name */ - $this->notice .= '

' . sprintf( esc_html__( 'Welcome to %1$s', 'shapely' ), $this->theme_name ) . '

'; - $this->notice .= '

'; - $this->notice .= - sprintf( /* Translators: Notice */ - esc_html__( 'Welcome! Thank you for choosing %3$s! To fully take advantage of the best our theme can offer please make sure you visit our %1$swelcome page%2$s.', 'shapely' ), - '', - '', - $this->theme_name - ); - $this->notice .= '

'; - /* Translators: %1$s - Theme Name */ - $this->notice .= '

' . sprintf( esc_html__( 'Get started with %1$s', 'shapely' ), $this->theme_name ) . '

'; - - } - - $notifications = Epsilon_Notifications::get_instance(); - $notifications->add_notice( - array( - 'id' => 'shapely_install_notice', - 'type' => 'notice epsilon-big', - 'message' => $this->notice, - ) - ); - } - - /** - * Display an admin notice linking to the welcome screen - * - * @since 1.8.2.4 - */ - public function shapely_welcome_admin_notice() { - ?> -
-

', '' ); ?>

-

-

-
- absint( $this->count_actions() ), - 'ajaxurl' => esc_url( admin_url( 'admin-ajax.php' ) ), - 'template_directory' => esc_url( get_template_directory_uri() ), - 'no_required_actions_text' => esc_html__( 'Hooray! There are no required actions for you right now.', 'shapely' ), - ) - ); - - } - - /** - * Load scripts for customizer page - * - * @since 1.8.2.4 - */ - public function shapely_welcome_scripts_for_customizer() { - - wp_enqueue_style( 'shapely-welcome-screen-customizer-css', get_template_directory_uri() . '/inc/admin/welcome-screen/css/welcome_customizer.css' ); - - } - - /** - * Dismiss required actions - * - * @since 1.8.2.4 - */ - public function shapely_dismiss_required_action_callback() { - - global $shapely_required_actions; - - $action_id = ( isset( $_GET['id'] ) ) ? $_GET['id'] : 0; - - echo esc_html( wp_unslash( $action_id ) ); /* this is needed and it's the id of the dismissable required action */ - - if ( ! empty( $action_id ) ) : - - /* if the option exists, update the record for the specified id */ - if ( get_option( 'shapely_show_required_actions' ) ) : - - $shapely_show_required_actions = get_option( 'shapely_show_required_actions' ); - - switch ( esc_html( $_GET['todo'] ) ) { - case 'add': - $shapely_show_required_actions[ $action_id ] = true; - break; - case 'dismiss': - $shapely_show_required_actions[ $action_id ] = false; - break; - default: - return new WP_Error( 'Action denied!', __( 'I\'ve fallen and can\'t get up', 'shapely' ) ); - break; - } - - update_option( 'shapely_show_required_actions', $shapely_show_required_actions ); - - /* create the new option,with false for the specified id */ - else : - - $shapely_show_required_actions_new = array(); - - if ( ! empty( $shapely_required_actions ) ) : - - foreach ( $shapely_required_actions as $shapely_required_action ) : - - if ( $shapely_required_action['id'] == $action_id ) : - $shapely_show_required_actions_new[ $shapely_required_action['id'] ] = false; - else : - $shapely_show_required_actions_new[ $shapely_required_action['id'] ] = true; - endif; - - endforeach; - - update_option( 'shapely_show_required_actions', $shapely_show_required_actions_new ); - - endif; - - endif; - - endif; - - die(); // this is required to return a proper result - } - - /** - * - */ - public function count_actions() { - global $shapely_required_actions; - - $shapely_show_required_actions = get_option( 'shapely_show_required_actions' ); - if ( ! $shapely_show_required_actions ) { - $shapely_show_required_actions = array(); - } - - $i = 0; - foreach ( $shapely_required_actions as $action ) { - $true = false; - $dismissed = false; - - if ( ! $action['check'] ) { - $true = true; - } - - if ( ! empty( $shapely_show_required_actions ) && isset( $shapely_show_required_actions[ $action['id'] ] ) && ! $shapely_show_required_actions[ $action['id'] ] ) { - $true = false; - } - - if ( $true ) { - $i ++; - } - } - - return $i; - } - - public function call_plugin_api( $slug ) { - include_once( ABSPATH . 'wp-admin/includes/plugin-install.php' ); - $call_api = get_transient( 'shapely_plugin_information_transient_' . $slug ); - if ( false === $call_api ) { - $call_api = plugins_api( - 'plugin_information', array( - 'slug' => $slug, - 'fields' => array( - 'downloaded' => false, - 'rating' => false, - 'description' => false, - 'short_description' => true, - 'donate_link' => false, - 'tags' => false, - 'sections' => true, - 'homepage' => true, - 'added' => false, - 'last_updated' => false, - 'compatibility' => false, - 'tested' => false, - 'requires' => false, - 'downloadlink' => false, - 'icons' => true, - ), - ) - ); - set_transient( 'shapely_plugin_information_transient_' . $slug, $call_api, 30 * MINUTE_IN_SECONDS ); - } - - return $call_api; - } - - public function check_active( $slug ) { - $slug2 = Shapely_Notify_System::_get_plugin_basename_from_slug( $slug ); - - $path = WP_PLUGIN_DIR . '/' . $slug2; - if ( ! file_exists( $path ) ) { - $path = false; - } - - if ( file_exists( $path ) ) { - include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); - - $needs = is_plugin_active( $slug2 ) ? 'deactivate' : 'activate'; - - return array( - 'status' => is_plugin_active( $slug2 ), - 'needs' => $needs, - ); - } - - return array( - 'status' => false, - 'needs' => 'install', - ); - } - - public function check_for_icon( $arr ) { - if ( ! empty( $arr['svg'] ) ) { - $plugin_icon_url = $arr['svg']; - } elseif ( ! empty( $arr['2x'] ) ) { - $plugin_icon_url = $arr['2x']; - } elseif ( ! empty( $arr['1x'] ) ) { - $plugin_icon_url = $arr['1x']; - } else { - $plugin_icon_url = $arr['default']; - } - - return $plugin_icon_url; - } - - public function create_action_link( $state, $slug ) { - $slug2 = Shapely_Notify_System::_get_plugin_basename_from_slug( $slug ); - - switch ( $state ) { - case 'install': - return wp_nonce_url( - add_query_arg( - array( - 'action' => 'install-plugin', - 'plugin' => $slug, - ), - network_admin_url( 'update.php' ) - ), - 'install-plugin_' . $slug - ); - break; - case 'deactivate': - return add_query_arg( - array( - 'action' => 'deactivate', - 'plugin' => rawurlencode( $slug2 ), - 'plugin_status' => 'all', - 'paged' => '1', - '_wpnonce' => wp_create_nonce( 'deactivate-plugin_' . $slug2 ), - ), admin_url( 'plugins.php' ) - ); - break; - case 'activate': - return add_query_arg( - array( - 'action' => 'activate', - 'plugin' => rawurlencode( $slug2 ), - 'plugin_status' => 'all', - 'paged' => '1', - '_wpnonce' => wp_create_nonce( 'activate-plugin_' . $slug2 ), - ), admin_url( 'plugins.php' ) - ); - break; - } - } - - /** - * Welcome screen content - * - * @since 1.8.2.4 - */ - public function shapely_welcome_screen() { - require_once( ABSPATH . 'wp-load.php' ); - require_once( ABSPATH . 'wp-admin/admin.php' ); - require_once( ABSPATH . 'wp-admin/admin-header.php' ); - - $shapely = wp_get_theme(); - $active_tab = isset( $_GET['tab'] ) ? wp_unslash( $_GET['tab'] ) : 'getting_started'; - $action_count = $this->count_actions(); - - ?> - -
- -

- -
- - - - - - - - - -
- - pX)lmoD{n&mw1mz9D%`Lyp|Sb_AnR= zaJc`&$#NLq{frzxOvZMX9n23i^Zzo!haMizL&jme6=xA~$QKH+zj6(Ri8B!(VbPvA zS?$1#dOJ*McAxbBT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3?iwh9(Z~Hjv`VIWP`^oQd^>~}uQ1qA2!mAlh?Gth`%O2{* z;G@7wQGAXJrCBvCaEilw1@B6<@w73~7hcRj;4@8s1!V;g2bW0)d|ru5v%^ULe{U?d zBO?kQ6_P>?7*1&nSzhP^ht#Lj`^Fcd(fzpZn%B529!2$`2dN9w0S94l-0L;*9_j1o z@*l{pk?v-t;8&TO_o>hJ-pqFoJt-wWD~|aiLBPP8U>ohPZ_RHU%dD^LLY8Pq5`~Uk z4a>ot7M?pQ(3QIijy{s<~$)ZOoS-1TzFVM6$f zr_+RaJ_Zl{^-uxz##&=taz@nzy<+3owFOf4wFd@~rQm_!LQp_EtI(rtPJnGEDWkqm zbw6caimd*jVJc(MNEbR&*@sk23Vlm0J5`s=p)|Hks*hFGT8uv~^@<1hqEqKRKZj0T z_*dY~?{&i8E`9&sYSCn(q{u5Z;LB;v6^oq=Fs$+50ypmf?hz?Jn3hJ5k5yj=<}QN5q~?&uvU%vDB38gH&e9O_m8{&>YOxS@V_slFLdF_6ed8D4ke z;3D56rKxOx1|-2i$Z$}lbF>e<>gjDRgy$zG4SzE7JsWSNc6}+uTE147I{Ned1tznXkLTnN zYt&fE8%o?}+iUy3jy+;+1TLoRW;HL*WhVJzOe%b8e+nhZ6-us#`@%~p{4;lcX$p>G z0IR2;ZC-SAVE+4aovqPt`;(Gt(cV<_uNLV7NZLyOlg(ugX54+rFeh<4KNf32?QIgn zx7PVG6B@ZclnPUVc6f~*YRi93QVs%`um4`2>fa{W-HzlAfv>G11^jpv&TIaA;>MyK z2ZSNb5SN(?C+XR=TcAqA7Dq9qV~3h($B@Kwnp!Q*`*AP+g(=j~#52Ou!siQJ Actions required tab */ - var shapelyNrActionsRequired = shapelyWelcomeScreenObject.nr_actions_required; - - if ( ( 'undefined' !== typeof shapelyNrActionsRequired ) && ( 0 !== shapelyNrActionsRequired ) ) { - jQuery( 'li.shapely-w-red-tab a' ).append( '' + shapelyNrActionsRequired + '' ); - } - - /* Dismiss required actions */ - jQuery( '.shapely-required-action-button' ).click(function() { - - var id = jQuery( this ).attr( 'id' ), - action = jQuery( this ).attr( 'data-action' ); - jQuery.ajax({ - type: 'GET', - data: { action: 'shapely_dismiss_required_action', id: id, todo: action }, - dataType: 'html', - url: shapelyWelcomeScreenObject.ajaxurl, - beforeSend: function( data, settings ) { - jQuery( '.shapely-tab-pane#actions_required h1' ).append( '
' ); - }, - success: function( data ) { - location.reload(); - jQuery( '#temp_load' ).remove(); - /* Remove loading gif */ - }, - error: function( jqXHR, textStatus, errorThrown ) { - console.log( jqXHR + ' :: ' + textStatus + ' :: ' + errorThrown ); - } - }); - }); -}); diff --git a/inc/admin/welcome-screen/js/welcome_customizer.js b/inc/admin/welcome-screen/js/welcome_customizer.js deleted file mode 100644 index 839f42f..0000000 --- a/inc/admin/welcome-screen/js/welcome_customizer.js +++ /dev/null @@ -1,9 +0,0 @@ -jQuery( document ).ready(function() {// jscs:ignore validateLineBreaks - var shapelyAboutpage = shapelyWelcomeScreenCustomizerObject.aboutpage; - var shapelyNrActionsRequired = shapelyWelcomeScreenCustomizerObject.nr_actions_required; - - /* Number of required actions */ - if ( ( 'undefined' !== typeof shapelyNrActionsRequired ) && ( 'undefined' !== typeof shapelyNrActionsRequired ) && ( '0' !== shapelyNrActionsRequired ) ) { - jQuery( '#accordion-section-themes .accordion-section-title' ).append( '' + shapelyNrActionsRequired + '' ); - } -}); diff --git a/inc/admin/welcome-screen/sections/actions-required.php b/inc/admin/welcome-screen/sections/actions-required.php deleted file mode 100644 index ce693f6..0000000 --- a/inc/admin/welcome-screen/sections/actions-required.php +++ /dev/null @@ -1,99 +0,0 @@ - - -
- - $shapely_required_action_value ) : - $hidden = false; - if ( isset( $shapely_show_required_actions[ $shapely_required_action_value['id'] ] ) && false === $shapely_show_required_actions[ $shapely_required_action_value['id'] ] ) { - $hidden = true; - } - if ( isset( $shapely_required_action_value['check'] ) && $shapely_required_action_value['check'] ) { - continue; - } - ?> -
- - - - - -

- -

-

- - ' . wp_kses_post( $shapely_required_action_value['help'] ); -endif; -?> -

- - check_active( $shapely_required_action_value['plugin_slug'] ); - $url = $this->create_action_link( $active['needs'], $shapely_required_action_value['plugin_slug'] ); - $label = ''; - - switch ( $active['needs'] ) { - case 'install': - $class = 'install-now button'; - $label = esc_html__( 'Install', 'shapely' ); - break; - case 'activate': - $class = 'activate-now button button-primary'; - $label = esc_html__( 'Activate', 'shapely' ); - break; - case 'deactivate': - $class = 'deactivate-now button'; - $label = esc_html__( 'Deactivate', 'shapely' ); - break; - } - - ?> -

- -

- -
- ' . esc_html__( 'Hooray! There are no required actions for you right now.', 'shapely' ) . ''; - endif; - ?> - -
diff --git a/inc/admin/welcome-screen/sections/recommended-plugins.php b/inc/admin/welcome-screen/sections/recommended-plugins.php deleted file mode 100644 index c3035fb..0000000 --- a/inc/admin/welcome-screen/sections/recommended-plugins.php +++ /dev/null @@ -1,53 +0,0 @@ - - - diff --git a/inc/admin/welcome-screen/class-shapely-notify-system.php b/inc/class-shapely-notify-system.php similarity index 100% rename from inc/admin/welcome-screen/class-shapely-notify-system.php rename to inc/class-shapely-notify-system.php diff --git a/inc/class-shapely.php b/inc/class-shapely.php new file mode 100644 index 0000000..0d29194 --- /dev/null +++ b/inc/class-shapely.php @@ -0,0 +1,185 @@ + array( + 'recommended' => false, + ), + 'fancybox-for-wordpress' => array( + 'recommended' => false, + ), + ); + + public $recommended_actions; + + public $theme_slug = 'shapely'; + + function __construct() { + + if ( ! is_admin() && ! is_customize_preview() ) { + return; + } + + $this->load_class(); + + $this->recommended_actions = apply_filters( + 'shapely_required_actions', array( + array( + 'id' => 'shapely-req-import-content', + 'title' => esc_html__( 'Import Demo Content', 'shapely' ), + 'description' => esc_html__( 'Clicking the button below will install and activate plugins, add widgets and set static front page to your WordPress installation. Click advanced to customize the import process.', 'shapely' ), + 'help' => $this->generate_action_html(), + 'check' => Shapely_Notify_System::shapely_has_content(), + ), + array( + 'id' => 'shapely-req-ac-install-companion-plugin', + 'title' => Shapely_Notify_System::shapely_companion_title(), + 'description' => Shapely_Notify_System::shapely_companion_description(), + 'check' => Shapely_Notify_System::shapely_has_plugin( 'shapely-companion' ), + 'plugin_slug' => 'shapely-companion', + ), + array( + 'id' => 'shapely-req-ac-install-wp-jetpack-plugin', + 'title' => Shapely_Notify_System::shapely_jetpack_title(), + 'description' => Shapely_Notify_System::shapely_jetpack_description(), + 'check' => Shapely_Notify_System::shapely_has_plugin( 'jetpack' ), + 'plugin_slug' => 'jetpack', + ), + array( + 'id' => 'shapely-req-ac-install-contact-form-7', + 'title' => Shapely_Notify_System::shapely_cf7_title(), + 'description' => Shapely_Notify_System::shapely_cf7_description(), + 'check' => Shapely_Notify_System::shapely_has_plugin( 'contact-form-7' ), + 'plugin_slug' => 'contact-form-7', + ), + ) + ); + + $this->init_epsilon(); + $this->init_welcome_screen(); + + // Hooks + add_action( 'customize_register', array( $this, 'init_customizer' ) ); + + } + + public function load_class() { + + if ( ! is_admin() && ! is_customize_preview() ) { + return; + } + + require_once get_template_directory() . '/inc/libraries/epsilon-framework/class-epsilon-autoloader.php'; + require_once get_template_directory() . '/inc/class-shapely-notify-system.php'; + require_once get_template_directory() . '/inc/libraries/welcome-screen/class-epsilon-welcome-screen.php'; + + } + + public function init_epsilon() { + + $args = array( + 'controls' => array( 'slider', 'toggle' ), // array of controls to load + 'sections' => array( 'recommended-actions', 'pro' ), // array of sections to load + 'backup' => false, + ); + + new Epsilon_Framework( $args ); + + } + + public function init_welcome_screen() { + + Epsilon_Welcome_Screen::get_instance( + $config = array( + 'theme-name' => 'Shapely', + 'theme-slug' => 'shapely', + 'actions' => $this->recommended_actions, + 'plugins' => $this->recommended_plugins, + ) + ); + + } + + public function init_customizer( $wp_customize ) { + $current_theme = wp_get_theme(); + $wp_customize->add_section( + new Epsilon_Section_Recommended_Actions( + $wp_customize, 'epsilon_recomended_section', array( + 'title' => esc_html__( 'Recomended Actions', 'shapely' ), + 'social_text' => esc_html( $current_theme->get( 'Author' ) ) . esc_html__( ' is social :', 'shapely' ), + 'plugin_text' => esc_html__( 'Recomended Plugins :', 'shapely' ), + 'actions' => $this->recommended_actions, + 'plugins' => $this->recommended_plugins, + 'theme_specific_option' => $this->theme_slug . '_show_required_actions', + 'theme_specific_plugin_option' => $this->theme_slug . '_show_required_plugins', + 'facebook' => 'https://www.facebook.com/colorlib', + 'twitter' => 'https://twitter.com/colorlib', + 'wp_review' => true, + 'priority' => 0, + ) + ) + ); + + } + + private function generate_action_html(){ + + $import_actions = array( + 'set-frontpage' => esc_html__( 'Set Static FrontPage', 'shapely' ), + 'import-widgets' => esc_html__( 'Import HomePage Widgets', 'shapely' ), + ); + + $import_plugins = array( + 'shapely-companion' => esc_html__( 'Shapely Companion', 'shapely' ), + 'jetpack' => esc_html__( 'Jetpack', 'shapely' ), + 'contact-form-7' => esc_html__( 'Contact Form 7', 'shapely' ), + ); + + $plugins_html = ''; + + if ( is_customize_preview() ) { + $url = 'themes.php?page=%1$s-welcome&tab=%2$s'; + $html = '' . __( 'Import Demo Content', 'shapely' ) . ''; + } else { + $html = '

' . __( 'Import Demo Content', 'shapely' ) . ''; + $html .= '' . __( 'Advanced', 'shapely' ) . '

'; + $html .= '
'; + + foreach ( $import_plugins as $id => $label ) { + if ( ! Shapely_Notify_System::shapely_has_plugin( $id ) ) { + $plugins_html .= $this->generate_checkbox( $id, $label, 'plugins' ); + } + } + + if ( '' != $plugins_html ) { + $html .= '
'; + $html .= '

' . __( 'Plugins', 'shapely' ) . '

'; + $html .= '
'; + $html .= $plugins_html; + $html .= '
'; + $html .= '
'; + } + + $html .= '
'; + $html .= '

' . __( 'Demo Content', 'shapely' ) . '

'; + $html .= '
'; + foreach ( $import_actions as $id => $label ) { + $html .= $this->generate_checkbox( $id, $label ); + } + $html .= '
'; + $html .= '
'; + $html .= '
'; + } + + return $html; + + } + + private function generate_checkbox( $id, $label, $name = 'options', $block = false ) { + $string = ''; + return sprintf( $string, $name, $id, $label ); + } + +} +new Shapely(); \ No newline at end of file diff --git a/inc/customizer.php b/inc/customizer.php index a575199..6040ece 100644 --- a/inc/customizer.php +++ b/inc/customizer.php @@ -75,60 +75,15 @@ function shapely_customize_register( $wp_customize ) { */ function shapely_customizer( $wp_customize ) { - // Recomended actions - global $shapely_required_actions, $shapely_recommended_plugins; - require_once get_template_directory() . '/inc/custom-controls/class-shapely-logo-dimensions.php'; - $customizer_recommended_plugins = array(); - if ( is_array( $shapely_recommended_plugins ) ) { - foreach ( $shapely_recommended_plugins as $k => $s ) { - if ( $s['recommended'] ) { - $customizer_recommended_plugins[ $k ] = $s; - } - } - } - - $customizer_shapely_required_actions = array(); - if ( ! empty( $shapely_required_actions ) ) { - foreach ( $shapely_required_actions as $required_action ) { - if ( 'shapely-req-import-content' == $required_action['id'] ) { - $required_action['description'] = sprintf( - esc_html__( 'In oder to import the demo content go %s', 'shapely' ), - '' . esc_html__( 'here', 'shapely' ) . '' - ); - } - $customizer_shapely_required_actions[] = $required_action; - } - } - - $theme_slug = 'shapely'; - - $wp_customize->add_section( - new Epsilon_Section_Recommended_Actions( - $wp_customize, 'epsilon_recomended_section', array( - 'title' => esc_html__( 'Recomended Actions', 'shapely' ), - 'social_text' => esc_html__( 'We are social', 'shapely' ), - 'plugin_text' => esc_html__( 'Recomended Plugins', 'shapely' ), - 'actions' => $customizer_shapely_required_actions, - 'plugins' => $customizer_recommended_plugins, - 'theme_specific_option' => $theme_slug . '_show_required_actions', - 'theme_specific_plugin_option' => $theme_slug . '_show_recommended_plugins', - 'facebook' => 'https://www.facebook.com/colorlib', - 'twitter' => 'https://twitter.com/colorlib', - 'wp_review' => true, - 'priority' => 0, - ) - ) - ); - $wp_customize->add_section( new Epsilon_Section_Pro( $wp_customize, 'epsilon-section-pro', array( 'title' => esc_html__( 'Theme documentation', 'shapely' ), 'button_text' => esc_html__( 'Learn more', 'shapely' ), 'button_url' => 'https://colorlib.com/wp/support/shapely/', - 'priority' => 0, + 'priority' => 1, ) ) ); diff --git a/inc/libraries/welcome-screen/class-epsilon-welcome-screen.php b/inc/libraries/welcome-screen/class-epsilon-welcome-screen.php new file mode 100644 index 0000000..2543e8a --- /dev/null +++ b/inc/libraries/welcome-screen/class-epsilon-welcome-screen.php @@ -0,0 +1,799 @@ + $theme->get( 'Name' ), + 'theme-slug' => $theme->get( 'TextDomain' ), + 'author-logo' => get_template_directory_uri() . '/inc/libraries/welcome-screen/img/colorlib.png', + 'actions' => array(), + 'plugins' => array(), + 'notice' => '', + 'sections' => array(), + 'edd' => false, + 'download_id' => '', + ); + + $config = wp_parse_args( $config, $defaults ); + + /** + * Configure our welcome screen + */ + $this->theme_name = $config['theme-name']; + $this->theme_slug = $config['theme-slug']; + $this->author_logo = $config['author-logo']; + $this->actions = $config['actions']; + $this->actions_count = $this->count_actions(); + $this->plugins = $config['plugins']; + $this->notice = $config['notice']; + $this->sections = $config['sections']; + $this->edd = $config['edd']; + $this->download_id = $config['download_id']; + + if ( $this->edd ) { + $this->strings = EDD_Theme_Helper::get_strings(); + } + + if ( empty( $config['sections'] ) ) { + $this->sections = $this->set_default_sections( $config ); + } + + /** + * Create the dashboard page + */ + add_action( 'admin_menu', array( $this, 'welcome_screen_menu' ) ); + + /** + * Load the welcome screen styles and scripts + */ + add_action( 'admin_enqueue_scripts', array( $this, 'enqueue' ) ); + + /** + * Add the notice in the admin backend + */ + $this->add_admin_notice(); + + /** + * Ajax callbacks + */ + add_action( + 'wp_ajax_welcome_screen_ajax_callback', array( + $this, + 'welcome_screen_ajax_callback', + ) + ); + add_action( + 'wp_ajax_nopriv_welcome_screen_ajax_callback', array( + $this, + 'welcome_screen_ajax_callback', + ) + ); + + if ( $this->edd ) { + /** + * Initiate EDD Stuff + */ + add_action( 'admin_init', array( 'EDD_Theme_Helper', 'init' ) ); + add_filter( 'http_request_args', array( 'EDD_Theme_Helper', 'disable_wporg_request' ), 5, 2 ); + + add_action( + 'update_option_' . $this->theme_slug . '_license_key', + array( + 'EDD_Theme_Helper', + 'license_activator_deactivator', + ), + 10, + 2 + ); + } + } + + /** + * AJAX Handler + */ + public function welcome_screen_ajax_callback() { + if ( isset( $_POST['args'], $_POST['args']['nonce'] ) && ! wp_verify_nonce( sanitize_key( $_POST['args']['nonce'] ), 'welcome_nonce' ) ) { + wp_die( + wp_json_encode( + array( + 'status' => false, + 'error' => esc_html__( 'Not allowed', 'epsilon-framework' ), + ) + ) + ); + } + + $args_action = array_map( 'sanitize_text_field', wp_unslash( $_POST['args']['action'] ) ); + + if ( count( $args_action ) !== 2 ) { + wp_die( + wp_json_encode( + array( + 'status' => false, + 'error' => esc_html__( 'Not allowed', 'epsilon-framework' ), + ) + ) + ); + } + + if ( ! class_exists( $args_action[0] ) ) { + wp_die( + wp_json_encode( + array( + 'status' => false, + 'error' => esc_html__( 'Class does not exist', 'epsilon-framework' ), + ) + ) + ); + } + + $class = $args_action[0]; + $method = $args_action[1]; + $args = array(); + + if ( is_array( $_POST['args']['args'] ) ) { + $args = Epsilon_Sanitizers::array_map_recursive( 'sanitize_text_field', wp_unslash( $_POST['args']['args'] ) ); + } + + $response = $class::$method( $args ); + + if ( is_array( $response ) ) { + wp_die( wp_json_encode( $response ) ); + } + + if ( 'ok' === $response ) { + wp_die( + wp_json_encode( + array( + 'status' => true, + 'message' => 'ok', + ) + ) + ); + } + + wp_die( + wp_json_encode( + array( + 'status' => false, + 'message' => 'nok', + ) + ) + ); + } + + /** + * Instance constructor + * + * @param array $config Configuration array. + * + * @returns object + */ + public static function get_instance( $config = array() ) { + static $inst; + + if ( ! $inst ) { + $inst = new Epsilon_Welcome_Screen( $config ); + } + + return $inst; + } + + /** + * Load welcome screen css and javascript + */ + public function enqueue() { + if ( is_admin() ) { + wp_enqueue_style( + 'welcome-screen', + get_template_directory_uri() . '/inc/libraries/welcome-screen/css/welcome.css' + ); + + wp_enqueue_script( + 'welcome-screen', + get_template_directory_uri() . '/inc/libraries/welcome-screen/js/welcome.js', + array( + 'jquery-ui-slider', + ), + '12123' + ); + + wp_localize_script( + 'welcome-screen', + 'welcomeScreen', + array( + 'nr_actions_required' => absint( $this->count_actions() ), + 'template_directory' => esc_url( get_template_directory_uri() ), + 'no_required_actions_text' => esc_html__( 'Hooray! There are no required actions for you right now.', 'epsilon-framework' ), + 'ajax_nonce' => wp_create_nonce( 'welcome_nonce' ), + 'activating_string' => esc_html__( 'Activating', 'epsilon-framework' ), + 'body_class' => 'appearance_page_' . $this->theme_slug . '-welcome', + 'no_actions' => esc_html__( 'Hooray! There are no required actions for you right now.', 'epsilon-framework' ), + ) + ); + } + } + + /** + * Return the actions left + * + * @return array|mixed + */ + private function get_actions_left() { + if ( ! empty( $this->actions ) ) { + $actions_left = get_option( $this->theme_slug . '_actions_left', array() ); + return $actions_left; + } + + return array(); + } + + /** + * Returns the plugins left to be installed + * + * @return array|mixed + */ + private function get_plugins_left() { + if ( ! empty( $this->plugins ) ) { + $plugins_left = get_option( $this->theme_slug . '_plugins_left', array() ); + if ( empty( $plugins_left ) ) { + foreach ( $this->plugins as $plugin => $prop ) { + $plugins_left[ $plugin ] = true; + } + + return $plugins_left; + } + + return $plugins_left; + } + + return array(); + } + + /** + * Adds an admin notice in the backend + * + * If the Epsilon Notification class does not exist, we stop + */ + private function add_admin_notice() { + if ( ! class_exists( 'Epsilon_Notifications' ) ) { + return; + } + + if ( empty( $this->notice ) ) { + if ( ! empty( $this->author_logo ) ) { + $this->notice .= ''; + } + /* Translators: Notice Title */ + $this->notice .= '

' . sprintf( esc_html__( 'Welcome to %1$s', 'epsilon-framework' ), $this->theme_name ) . '

'; + $this->notice .= '

'; + $this->notice .= + sprintf( /* Translators: Notice */ + esc_html__( 'Welcome! Thank you for choosing %3$s! To fully take advantage of the best our theme can offer please make sure you visit our %1$swelcome page%2$s.', 'epsilon-framework' ), + '', + '', + $this->theme_name + ); + $this->notice .= '

'; + /* Translators: Notice URL */ + $this->notice .= '

' . sprintf( esc_html__( 'Get started with %1$s', 'epsilon-framework' ), $this->theme_name ) . '

'; + + } + + $notifications = Epsilon_Notifications::get_instance(); + $notifications->add_notice( + array( + 'id' => 'shapely_welcome_notification', + 'type' => 'notice epsilon-big', + 'message' => $this->notice, + ) + ); + } + + /** + * Registers the welcome screen menu + */ + public function welcome_screen_menu() { + /* Translators: Menu Title */ + $title = sprintf( esc_html__( 'About %1$s', 'epsilon-framework' ), esc_html( $this->theme_name ) ); + + if ( 0 < $this->actions_count ) { + $title .= '' . esc_html( $this->actions_count ) . ''; + } + + add_theme_page( + $this->theme_name, + $title, + 'edit_theme_options', + $this->theme_slug . '-welcome', + array( + $this, + 'render_welcome_screen', + ) + ); + } + + /** + * Render the welcome screen + */ + public function render_welcome_screen() { + require_once( ABSPATH . 'wp-load.php' ); + require_once( ABSPATH . 'wp-admin/admin.php' ); + require_once( ABSPATH . 'wp-admin/admin-header.php' ); + + $theme = wp_get_theme(); + $tab = isset( $_GET['tab'] ) ? sanitize_text_field( wp_unslash( $_GET['tab'] ) ) : 'getting-started'; + + ?> +
+

+ theme_name ) ) . esc_html( $theme['Version'] ); + ?> +

+
+ theme_name ) ); + ?> +
+ + + + + sections[ $tab ]['path']; ?> +
+ theme_slug . '_actions_left', array() ); + + $i = 0; + foreach ( $this->actions as $action ) { + $true = false; + + if ( ! $action['check'] ) { + $true = true; + } + + if ( ! empty( $actions_left ) && isset( $actions_left[ $action['id'] ] ) && ! $actions_left[ $action['id'] ] ) { + $true = false; + } + + if ( $true ) { + $i ++; + } + } + + return $i; + } + + /** + * Generate url for the backend section tabs + * + * @param string $id Id of the backend tab. + * + * @return string + */ + private function generate_admin_url( $id = '' ) { + $url = 'themes.php?page=%1$s-welcome&tab=%2$s'; + + return admin_url( sprintf( $url, $this->theme_slug, $id ) ); + } + + /** + * Generate default sections, with exclusion + * + * @param array $config Configuration array. + * + * @return array + */ + private function set_default_sections( $config = array() ) { + $arr = array( + 'getting-started' => array( + 'id' => 'getting-started', + 'url' => $this->generate_admin_url( 'getting-started' ), + 'label' => __( 'Getting Started', 'epsilon-framework' ), + 'path' => get_template_directory() . '/inc/libraries/welcome-screen/sections/getting-started.php', + ), + 'recommended-actions' => array( + 'id' => 'recommended-actions', + 'url' => $this->generate_admin_url( 'recommended-actions' ), + 'label' => __( 'Recommended Actions', 'epsilon-framework' ), + 'path' => get_template_directory() . '/inc/libraries/welcome-screen/sections/recommended-actions.php', + ), + 'recommended-plugins' => array( + 'id' => 'recommended-plugins', + 'url' => $this->generate_admin_url( 'recommended-plugins' ), + 'label' => __( 'Recommended Plugins', 'epsilon-framework' ), + 'path' => get_template_directory() . '/inc/libraries/welcome-screen/sections/recommended-plugins.php', + ), + 'support' => array( + 'id' => 'support', + 'url' => $this->generate_admin_url( 'support' ), + 'label' => __( 'Support', 'epsilon-framework' ), + 'path' => get_template_directory() . '/inc/libraries/welcome-screen/sections/support.php', + ), + 'registration' => array( + 'id' => 'registration', + 'url' => $this->generate_admin_url( 'registration' ), + 'label' => __( 'Registration', 'epsilon-framework' ), + 'path' => get_template_directory() . '/inc/libraries/welcome-screen/sections/registration.php', + ), + ); + + if ( 0 === count( $this->plugins ) ) { + unset( $arr['recommended-plugins'] ); + } + + if ( 0 < $this->actions_count ) { + $arr['recommended-actions']['label'] .= '' . $this->actions_count . ''; + } + + if ( ! $this->edd ) { + unset( $arr['registration'] ); + } + + if ( isset( $config['sections_exclude'] ) && ! empty( $config['sections_exclude'] ) ) { + foreach ( $config['sections_exclude'] as $id ) { + unset( $arr[ $id ] ); + } + } + + if ( isset( $config['sections_include'] ) && ! empty( $config['sections_include'] ) ) { + foreach ( $config['sections_include'] as $id => $props ) { + $arr[ $id ] = $props; + } + } + + return $arr; + } + + /** + * Will return an array with everything that we need to render the action info + * + * @param string $slug Plugin slug. + * + * @returns array + */ + private function check_plugin( $slug = '' ) { + $arr = array( + 'installed' => Epsilon_Notify_System::check_plugin_is_installed( $slug ), + 'active' => Epsilon_Notify_System::check_plugin_is_active( $slug ), + 'needs' => 'install', + 'class' => 'install-now button', + 'label' => __( 'Install and Activate', 'epsilon-framework' ), + ); + + if ( in_array( $slug, array( 'contact-form-7' ) ) ) { + switch ( $slug ) { + case 'contact-form-7': + if ( file_exists( ABSPATH . 'wp-content/plugins/contact-form-7' ) ) { + $arr['installed'] = true; + $arr['active'] = defined( 'WPCF7_VERSION' ); + } + break; + default: + $arr['installed'] = false; + $arr['active'] = false; + break; + } + } + + if ( $arr['installed'] ) { + $arr['needs'] = 'activate'; + $arr['class'] = 'activate-now button button-primary'; + $arr['label'] = __( 'Activate now', 'epsilon-framework' ); + } + + if ( $arr['active'] ) { + $arr['needs'] = 'deactivate'; + $arr['class'] = 'deactivate-now button button-primary'; + $arr['label'] = __( 'Deactivate now', 'epsilon-framework' ); + } + + $arr['url'] = $this->create_plugin_link( $arr['needs'], $slug ); + + return $arr; + } + + /** + * Creates a link to install/activate/deactivate certain plugins + * + * @param string $state Plugin state (active,not installed). + * @param string $slug Plugin slug. + * + * @return string + */ + private function create_plugin_link( $state, $slug ) { + $string = ''; + + switch ( $state ) { + case 'install': + $string = wp_nonce_url( + add_query_arg( + array( + 'action' => 'install-plugin', + 'plugin' => Epsilon_Notify_System::_get_plugin_basename_from_slug( $slug ), + ), + network_admin_url( 'update.php' ) + ), + 'install-plugin_' . $slug + ); + break; + case 'deactivate': + $string = add_query_arg( + array( + 'action' => 'deactivate', + 'plugin' => rawurlencode( Epsilon_Notify_System::_get_plugin_basename_from_slug( $slug ) ), + 'plugin_status' => 'all', + 'paged' => '1', + '_wpnonce' => wp_create_nonce( 'deactivate-plugin_' . Epsilon_Notify_System::_get_plugin_basename_from_slug( $slug ) ), + ), + admin_url( 'plugins.php' ) + ); + break; + case 'activate': + $string = add_query_arg( + array( + 'action' => 'activate', + 'plugin' => rawurlencode( Epsilon_Notify_System::_get_plugin_basename_from_slug( $slug ) ), + 'plugin_status' => 'all', + 'paged' => '1', + '_wpnonce' => wp_create_nonce( 'activate-plugin_' . Epsilon_Notify_System::_get_plugin_basename_from_slug( $slug ) ), + ), + admin_url( 'plugins.php' ) + ); + break; + default: + $string = ''; + break; + }// End switch(). + + return $string; + } + + /** + * Return information of a plugin + * + * @param string $slug Plugin slug. + * + * @return array + */ + private function get_plugin_information( $slug = '' ) { + $arr = array( + 'info' => $this->call_plugin_api( $slug ), + ); + + $arr['icon'] = $this->check_for_icon( $arr['info']->icons ); + $merge = $this->check_plugin( $slug ); + + $arr = array_merge( $arr, $merge ); + + return $arr; + } + + /** + * Get information about a plugin + * + * @param string $slug Plugin slug. + * + * @return array|mixed|object|WP_Error + */ + private function call_plugin_api( $slug = '' ) { + include_once ABSPATH . 'wp-admin/includes/plugin-install.php'; + $call_api = get_transient( $this->theme_slug . '_plugin_information_transient_' . $slug ); + + if ( false === $call_api ) { + $call_api = plugins_api( + 'plugin_information', array( + 'slug' => $slug, + 'fields' => array( + 'downloaded' => false, + 'rating' => false, + 'description' => false, + 'short_description' => true, + 'donate_link' => false, + 'tags' => false, + 'sections' => true, + 'homepage' => true, + 'added' => false, + 'last_updated' => false, + 'compatibility' => false, + 'tested' => false, + 'requires' => false, + 'downloadlink' => false, + 'icons' => true, + ), + ) + ); + set_transient( $this->theme_slug . '_plugin_information_transient_' . $slug, $call_api, 30 * MINUTE_IN_SECONDS ); + } + + return $call_api; + } + + /** + * Searches icons for the plugin + * + * @param object $object Icon object. + * + * @return string; + */ + private function check_for_icon( $object ) { + if ( ! empty( $object['svg'] ) ) { + $plugin_icon_url = $object['svg']; + } elseif ( ! empty( $object['2x'] ) ) { + $plugin_icon_url = $object['2x']; + } elseif ( ! empty( $object['1x'] ) ) { + $plugin_icon_url = $object['1x']; + } else { + $plugin_icon_url = $object['default']; + } + + return $plugin_icon_url; + } + + /** + * Handle a required action + * + * @param array $args Argument array. + * + * @return string; + */ + public static function handle_required_action( $args = array() ) { + $instance = self::get_instance(); + $actions_left = get_option( $instance->theme_slug . '_actions_left', array() ); + + $actions_left[ $args['id'] ] = 'hidden' === $args['do']; + + update_option( $instance->theme_slug . '_actions_left', $actions_left ); + + return 'ok'; + } + + /** + * Set a frontpage to static + * + * @param array $args Argument array. + * + * @return string; + */ + public static function set_frontpage_to_static( $args = array() ) { + $home = get_page_by_title( 'Homepage' ); + $blog = get_page_by_title( 'Blog' ); + + if ( null === $home ) { + $id = wp_insert_post( + array( + 'post_title' => __( 'Homepage', 'epsilon-framework' ), + 'post_type' => 'page', + 'post_status' => 'publish', + ) + ); + + update_option( 'page_on_front', $id ); + update_option( 'show_on_front', 'page' ); + } + + if ( null === $blog ) { + $id = wp_insert_post( + array( + 'post_title' => __( 'Blog', 'epsilon-framework' ), + 'post_type' => 'page', + 'post_status' => 'publish', + ) + ); + + update_option( 'page_for_posts', $id ); + } + + return 'ok'; + } +} diff --git a/inc/libraries/welcome-screen/css/welcome.css b/inc/libraries/welcome-screen/css/welcome.css new file mode 100644 index 0000000..920e7e5 --- /dev/null +++ b/inc/libraries/welcome-screen/css/welcome.css @@ -0,0 +1,463 @@ +/* ---------------------------------------------------------------------------- + * Welcome Page CSS + * ------------------------------------------------------------------------- */ + +/* New Logo */ +.wp-badge.epsilon-welcome-logo { + color: #fff; + background-image: url(../img/colorlib.png); + background-position: center center; + background-size: 70%; + background-repeat: no-repeat; +} + +/* proper positioning of the icons */ +.epsilon-wrap i.dashicons { + margin-right: 15px; + position: relative; + top: 3px; +} + +.feature-section.action-required { + margin-top: 20px; + padding-bottom: 0; +} + +.action-required span.hooray { + padding: 10px; + display: inline-block; +} + +.action-required span.red { + color: #a00; +} + +.action-required-box:last-of-type { + border-bottom: none; +} + +.action-required-box { + display: block; + border-left: 3px solid #f8800c; + padding: 10px 25px 5px; + background: #FFFFFF; + box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.1); + margin-bottom: 15px; + position: relative; +} + +.about-wrap .action-required-box h4 { + display: block; + margin-top: 0; + margin-bottom: 0; +} + +.about-wrap .action-required-box p { + display: block; + margin-top: 0; + width: 100%; + max-width: 100%; +} + +.about-wrap .dismiss-required-action { + position: absolute; + top: 10px; + right: 10px; + text-decoration: none; + color: #d54e21; + border-radius: 50%; + cursor: pointer; +} + +.about-wrap .required-action-button { + position: absolute; + top: 10px; + right: 10px; + text-decoration: none; + color: #d54e21; + border-radius: 50%; + cursor: pointer; +} + +.about-wrap .feature-section .col { + margin-right: 15px; +} + +.badge-action-count { + padding: 0 6px; + display: inline-block; + background-color: #d54e21; + color: #fff; + font-size: 9px; + line-height: 17px; + font-weight: 600; + margin: 1px 0 0 2px; + vertical-align: top; + -webkit-border-radius: 10px; + border-radius: 10px; + z-index: 26; + margin-top: 5px; + margin-left: 5px; +} + +.wp-submenu .badge-action-count { + margin-top: 0; +} + +.plugin_box { + height: 330px; + margin-top: 15px; + text-align: center; + background: #FFF; + position: relative; + border: 1px solid rgba(0, 0, 0, .1); + float: left; +} + +.plugin_box .recommended { + background: #d25637; + color: #FFF; + text-transform: uppercase; + height: 28px; + text-align: center; + top: 0; + left: 0; + right: 0; + line-height: 28px; + font-size: 10px; + position: absolute; + font-weight: bold; +} + +.plugin_box img { + width: 155px; + height: 155px; + padding-top: 50px; + margin: 0 auto; + margin-bottom: 15px; + display: block; + border: none; +} + +.plugin_box .action_bar { + position: absolute; + bottom: 0; + left: 0; + right: 0; + font-size: 15px; + font-weight: 600; + height: 18px; + margin: 0; + padding: 15px; + -webkit-box-shadow: inset 0 1px 0 rgba(0, 0, 0, .1); + box-shadow: inset 0 1px 0 rgba(0, 0, 0, .1); + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + background: #fff; + background: rgba(255, 255, 255, .65); + text-align: left; + padding-right: 105px; +} + +.plugin_box .action_bar.active { + background: #23282d; + color: #FFF; +} + +.plugin_box .action_button { + position: absolute; + bottom: -1px; + right: -1px; + padding: 9px 10px 10px; + background: #f6f6f6; + border: 1px solid rgba(0, 0, 0, .1); +} + +.plugin_box .action_button.active { + background: #2c2e2f; + bottom: 0; + right: -1px; + padding: 9px 10px 9px; + +} + +.about-wrap .three-col .plugin_box.col { + width: 29.81%; +} + +.slider-container input[type="text"] { + border: none; + text-align: center; + padding: 2px; + margin: 0; + font-size: 12px; + color: #333; + border-radius: 10px; + background-color: #f8f8f8; + -webkit-box-shadow: inset 0px 2px 5px 0px rgba(0, 0, 0, 0.1); + -moz-box-shadow: inset 0px 2px 5px 0px rgba(0, 0, 0, 0.1); + box-shadow: inset 0px 2px 5px 0px rgba(0, 0, 0, 0.1); + width: 42px; + height: 22px; +} + +.slider-container .ui-slider { + position: relative; + text-align: left; + height: 2px; + border-radius: 3px; + border: none; + margin-top: 10px; + margin-left: 10px; + display: inline-block; + width: 202px; + background: #d6d6d6; +} + +.slider-container .ui-slider .ui-slider-handle { + position: absolute; + z-index: 2; + top: -10px; + cursor: default; + -ms-touch-action: none; + touch-action: none; + width: 18px; + height: 18px; + -webkit-border-radius: 9px; + -moz-border-radius: 9px; + border-radius: 9px; + background-color: #fff; + -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1); + -moz-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1); + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1); + border: solid 1px #d7d7d7; + transform: translateX(-50%); +} + +.slider-container .ui-slider .ui-slider-range { + position: absolute; + z-index: 1; + font-size: 0.7em; + display: block; + border: 0; + background-position: 0 0; + background: #E04D43; + top: 0; + bottom: 0; +} + +.widget-content label.block { + display: block; + margin-bottom: 10px; +} + +.widget-content input.rl-slider { + border: none; + text-align: center; + padding: 2px; + margin: 0 0 15px; + font-size: 12px; + color: #333; + border-radius: 10px; + background-color: #f8f8f8; + -webkit-box-shadow: inset 0px 2px 5px 0px rgba(0, 0, 0, 0.1); + -moz-box-shadow: inset 0px 2px 5px 0px rgba(0, 0, 0, 0.1); + box-shadow: inset 0px 2px 5px 0px rgba(0, 0, 0, 0.1); + width: 42px; + height: 22px; + cursor: pointer; +} + +.widget-content .ui-slider { + position: relative; + text-align: left; + height: 2px; + border-radius: 3px; + border: none; + margin-top: 10px; + margin-left: 15px; + display: inline-block; + width: 175px; + float: right; + background: #d6d6d6; +} + +.widget-content .ui-slider .ui-slider-range { + position: absolute; + z-index: 1; + font-size: 0.7em; + display: block; + border: 0; + background-position: 0 0; + background: #E04D43; + top: 0; + bottom: 0; +} + +.widget-content .ui-slider .ui-slider-handle { + position: absolute; + z-index: 2; + top: -10px; + cursor: default; + -ms-touch-action: none; + touch-action: none; + width: 18px; + height: 18px; + -webkit-border-radius: 9px; + -moz-border-radius: 9px; + border-radius: 9px; + background-color: #fff; + -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1); + -moz-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1); + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1); + border: solid 1px #d7d7d7; + transform: translateX(-50%); +} + +.wp-admin .checkbox_switch { + display: inline-block; + width: 100%; + margin-bottom: 15px; +} + +.customize-control-title.onoffswitch_label { + width: 71%; +} + +.onoffswitch_label { + display: inline-block; + vertical-align: top; + margin-right: 21px; + margin-top: -1px; +} + +.onoffswitch { + position: relative; + width: 52px; + display: inline-block; + float: right; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; +} + +.onoffswitch-checkbox { + display: none !important; +} + +.onoffswitch-label { + display: block; + overflow: hidden; + cursor: pointer; + height: 22px; + padding: 0; + line-height: 19px; + transition: background-color 0.2s ease-in; + -webkit-border-radius: 11px; + -moz-border-radius: 11px; + border-radius: 30px; + background-color: #c4c4c4; + -webkit-box-shadow: inset 0 2px 1px rgba(0, 0, 0, 0.11); + -moz-box-shadow: inset 0 2px 1px rgba(0, 0, 0, 0.11); + box-shadow: inset 0 2px 1px rgba(0, 0, 0, 0.11); +} + +.onoffswitch-label:before { + content: ""; + display: block; + width: 18px; + height: 18px; + margin: 0; + position: absolute; + top: 2px; + bottom: 0; + right: 32px; + background-color: #fff; + -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.1); + -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.1); + box-shadow: 0 0 3px rgba(0, 0, 0, 0.1); + -webkit-border-radius: 10px; + -moz-border-radius: 10px; + border-radius: 10px; + transition: all 0.2s ease-in 0s; +} + +.onoffswitch-label:after { + content: "OFF"; + display: block; + color: #FFF; + position: absolute; + top: 2px; + bottom: 2px; + right: 6px; + font-size: 11px; + font-family: 'Arial'; +} + +.onoffswitch-checkbox:checked + .onoffswitch-label { + background-color: #3caf0e; +} + +.onoffswitch-checkbox:checked + .onoffswitch-label, +.onoffswitch-checkbox:checked + .onoffswitch-label:before { + border-color: #3caf0e; +} + +.onoffswitch-checkbox:checked + .onoffswitch-label:before { + right: 2px; +} + +.onoffswitch-checkbox:checked + .onoffswitch-label:after { + content: "ON"; + display: block; + color: #FFF; + position: absolute; + top: 2px; + bottom: 2px; + right: 27px; + font-size: 11px; + font-family: 'Arial'; +} + +.widget-content .customize-control-title { + font-weight: 400; +} + +.widget-content .customize-control-title.onoffswitch_label { + width: 65%; + margin-right: 26px; +} + +.mte-tooltip { + width: 150px; + position: absolute; + background: #55AAD3; + color: #EEE; + font-size: 12px; + min-height: 50px; + border-radius: 5px; + left: -75px; + /* half of its width */ + bottom: 25px; + z-index: 10; + display: none; + padding: 12px; + line-height: 1.5; + font-family: 'Arial', sans-serif; +} + +.import-content-container .checkbox-group { + margin-bottom: 10px; + margin-top: 10px; + display: inline-block; + width: 100%; +} + +.import-content-container .checkbox-group label { + margin-right: 15px; +} + +.import-content-container { + display: none; +} diff --git a/inc/libraries/welcome-screen/data/demo.json b/inc/libraries/welcome-screen/data/demo.json new file mode 100644 index 0000000..ae101f5 --- /dev/null +++ b/inc/libraries/welcome-screen/data/demo.json @@ -0,0 +1,368 @@ +{ + "standard": { + "widgets": { + "footer-sidebar-1": { + "text-66": { + "title": "About MedZone", + "text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed tempus est elit, et facilisis odio tempus in. Nam lobortis, est a scelerisque rhoncus.\r\n\r\nCurabitur facilisis convallis malesuada. Duis eget massa tristique, mattis lorem sit amet, molestie massa. Ut a ligula tristique, bibendum lacus ut, tempor tellus.", + "filter": true, + "visual": true + } + }, + "footer-sidebar-2": { + "medzone_featured_doctor-55": { + "title": "Featured Doctor", + "custom_url": "#", + "doctor_id": "Dr.-House-Greg" + } + } + }, + "options": { + "logo": { + "id": "logo", + "label": "Logo", + "setting": "custom_logo", + "content": "/assets/images/logo.png" + }, + "frontpage": { + "id": "frontpage", + "label": "Set frontpage to static", + "setting": "default", + "content": "default" + }, + "medzone_footer_columns": { + "id": "medzone_footer_columns", + "label": "Footer Columns", + "setting": "medzone_footer_columns", + "content": "{\"columnsCount\":2,\"columns\":{\"1\":{\"index\":1,\"span\":\"6\"},\"2\":{\"index\":2,\"span\":\"6\"}}}" + } + }, + "plugins": { + "contact-form-7": "Contact Form 7" + }, + "content": { + "doctors": { + "id": "doctors", + "setting": "medzone_doctors", + "label": "Doctors", + "content": { + "0": { + "doctor_name": "Dr. House Greg", + "doctor_group": "Godlike", + "doctor_description": "

Pellentesque dapibus tristique ornare. Quisque vitanimate viverra lorem. animatenean luctus lorem mi, et lobortis turpis porttitor ut. Donec dictum dolor varius metus pellentesque, quis elementum massa varius.

", + "doctor_image": "/assets/images/05_doctors_02.jpg", + "doctor_social_facebook": "https://facebook.com", + "doctor_social_twitter": "https://twitter.com", + "doctor_social_google": "https://google.com", + "doctor_social_linkedin": "https://linkedin.com" + }, + "1": { + "doctor_name": "Dr. Jonathan Doe", + "doctor_group": "Surgeon", + "doctor_description": "

Pellentesque dapibus tristique ornare. Quisque vitanimate viverra lorem. animatenean luctus lorem mi, et lobortis turpis porttitor ut. Donec dictum dolor varius metus pellentesque, quis elementum massa varius.

", + "doctor_image": "/assets/images/05_doctors_01.jpg", + "doctor_social_facebook": "https://facebook.com", + "doctor_social_twitter": "https://twitter.com", + "doctor_social_google": "https://google.com", + "doctor_social_linkedin": "https://linkedin.com" + }, + "2": { + "doctor_name": "Dr. Jean Doe", + "doctor_group": "Surgeon", + "doctor_description": "

Pellentesque dapibus tristique ornare. Quisque vitanimate viverra lorem. animatenean luctus lorem mi, et lobortis turpis porttitor ut. Donec dictum dolor varius metus pellentesque, quis elementum massa varius.

", + "doctor_image": "/assets/images/05_doctors_03.jpg", + "doctor_social_facebook": "https://facebook.com", + "doctor_social_twitter": "https://twitter.com", + "doctor_social_google": "https://google.com", + "doctor_social_linkedin": "https://linkedin.com" + }, + "3": { + "doctor_name": "Dr. Lisa Cuddy", + "doctor_group": "General", + "doctor_description": "

Pellentesque dapibus tristique ornare. Quisque vitanimate viverra lorem. animatenean luctus lorem mi, et lobortis turpis porttitor ut. Donec dictum dolor varius metus pellentesque, quis elementum massa varius.

", + "doctor_image": "/assets/images/05_doctors_04.jpg", + "doctor_social_facebook": "https://facebook.com", + "doctor_social_twitter": "https://twitter.com", + "doctor_social_google": "https://google.com", + "doctor_social_linkedin": "https://linkedin.com" + } + } + }, + "hero_cta": { + "id": "hero_cta", + "setting": "medzone_cta_services", + "label": "Hero CTA Services", + "content": { + "0": { + "service_title": "Ambulance", + "service_icon": "fa fa-ambulance", + "service_description": "Wrroom Wroom!" + }, + "1": { + "service_title": "Cardiology Department", + "service_icon": "fa fa-heartbeat", + "service_description": "Tristique senectus et netus et malesuada fames ac turpis egestas." + }, + "2": { + "service_title": "Doctors Appointments", + "service_icon": "fa fa-stethoscope", + "service_description": "Get Free help Now!" + }, + "3": { + "service_title": "Extra services", + "service_icon": "fa fa-hospital-o", + "service_description": "Get Free help Now!" + }, + "4": { + "service_title": "No minuses", + "service_icon": "fa fa-wheelchair", + "service_description": "Wrroom Wroom!" + } + } + }, + "specialties": { + "id": "specialties", + "setting": "medzone_specialties", + "label": "Specialties", + "content": { + "0": { + "specialties_title": "Neurology", + "specialties_icon": "fa fa-stethoscope", + "specialties_description": "Outside of a medical emergency, your primary care physician is the \"first responder\" to your healthcare needs" + }, + "1": { + "specialties_title": "Surgery", + "specialties_icon": "fa fa-cut", + "specialties_description": "State-of-the-art surgical facilities where expert surgeons perform a full complement of procedures." + }, + "2": { + "specialties_title": "Cardio", + "specialties_icon": "fa fa-heartbeat", + "specialties_description": "Few of us like to even think about having a heart attack or being with someone when they have one." + }, + "3": { + "specialties_title": "Oncology", + "specialties_icon": "fa fa-hand-stop-o", + "specialties_description": "Rehabilitation services for conditions ranging from stroke and brain injury to neurological disorders." + } + } + }, + "about": { + "id": "about", + "setting": "medzone_about_info", + "label": "About", + "content": { + "0": { + "info_title": "Mission", + "info_description": "

Our mission is to raise the long-term health status of our community by providing personalized, quality care with compassion, dignity, and respect.

" + }, + "1": { + "info_title": "Vision", + "info_description": "

We are a community of caring health professionals, recognized for promoting wellness through early detection and prevention.

" + }, + "2": { + "info_title": "Admission", + "info_description": "

When you arrive, unless you’re told otherwise, please go directly to the Admitting Department, located in the main hospital lobby.

" + } + } + }, + "information": { + "id": "information", + "setting": "medzone_hospital_information", + "label": "General Information", + "content": { + "0": { + "info_title": "24 Hours Support", + "info_text": "Pellentesque dapibus tristique ornare. Quisque vitanimate viverra lorem. animatenean luctus lorem mi, et lobortis turpis porttitor ut. Donec dictum dolor varius metus pellentesque, quis elementum massa varius." + }, + "1": { + "info_title": "Emergency Services", + "info_text": "Pellentesque dapibus tristique ornare. Quisque vitanimate viverra lorem. animatenean luctus lorem mi, et lobortis turpis porttitor ut. Donec dictum dolor varius metus pellentesque, quis elementum massa varius." + }, + "2": { + "info_title": "Online Appointment", + "info_text": "Pellentesque dapibus tristique ornare. Quisque vitanimate viverra lorem. animatenean luctus lorem mi, et lobortis turpis porttitor ut. Donec dictum dolor varius metus pellentesque, quis elementum massa varius." + }, + "3": { + "info_title": "Best Specialists", + "info_text": "Pellentesque dapibus tristique ornare. Quisque vitanimate viverra lorem. animatenean luctus lorem mi, et lobortis turpis porttitor ut. Donec dictum dolor varius metus pellentesque, quis elementum massa varius." + }, + "4": { + "info_title": "Latest Medical Equipments On The Market", + "info_text": "Pellentesque dapibus tristique ornare. Quisque vitanimate viverra lorem. animatenean luctus lorem mi, et lobortis turpis porttitor ut. Donec dictum dolor varius metus pellentesque, quis elementum massa varius." + }, + "5": { + "info_title": "Amazing Pacient Care", + "info_text": "Pellentesque dapibus tristique ornare. Quisque vitanimate viverra lorem. animatenean luctus lorem mi, et lobortis turpis porttitor ut. Donec dictum dolor varius metus pellentesque, quis elementum massa varius." + } + } + }, + "schedule": { + "id": "schedule", + "setting": "medzone_hospital_schedule", + "label": "Schedule", + "content": { + "0": { + "schedule_days": "Monday - Thursday", + "schedule_hours": "9:30 am - 8:30 pm" + }, + "1": { + "schedule_days": "Friday", + "schedule_hours": "9:30 am - 8:30 pm" + }, + "2": { + "schedule_days": "Weekend", + "schedule_hours": "10:30 am - 5:30 pm" + }, + "3": { + "schedule_days": "Holiday", + "schedule_hours": "Check Dates " + } + } + }, + "testimonials": { + "id": "testimonials", + "setting": "medzone_testimonials", + "label": "Testimonials", + "content": { + "0": { + "testimonial_title": "Doe Jane", + "testimonial_subtitle": "Attending Staff", + "testimonial_text": "\"One of the cleanest and professional plaes I had the chance to be in. The staff was friendly, The rooms very bright and the pacient care excellent. I went home after 3 days spent very well at Regina hospital.\"", + "testimonial_image": "/assets/images/08_testimonial.jpg" + }, + "1": { + "testimonial_title": "Jane Doe", + "testimonial_subtitle": "Attending Staff", + "testimonial_text": "\"One of the cleanest and professional place I had the chance to be in. The staff was friendly, The rooms very bright and the pacient care excellent. I went home after 3 days spent very well at Regina hospital.\"", + "testimonial_image": "/assets/images/08_testimonial.jpg" + } + } + } + }, + "sections": { + "hero": { + "id": "hero", + "label": "Hero", + "setting": "medzone_frontpage_sections", + "content": { + "hero_background_color": "#f9f9fa", + "hero_background": "/assets/images/01_header_01.png", + "hero_cta": "Best Medical Care you can get for you and your family.", + "hero_small": "More than 3000 specialists are here for you", + "hero_navigation": "", + "hero_repeater_field": "medzone_cta_services", + "type": "hero" + } + }, + "about": { + "id": "about", + "label": "About", + "setting": "medzone_frontpage_sections", + "content": { + "about_title": "Watch our impact in the
patient's life", + "about_description": "

We are a a full-service, non-profit community hospital, offering comprehensive medical, surgical and therapeutic services. With 281 beds, more than 1900 employees and a world-class medical staff, we provide innovative, technologically advanced care on a patient-friendly, just north of Seattle.

More

", + "about_image": "/assets/images/01_our_impact.jpg", + "about_grouping": [ + "all" + ], + "about_navigation": "", + "about_repeater_field": "medzone_about_info", + "type": "about" + } + }, + "specialties": { + "id": "specialties", + "label": "Specialties", + "setting": "medzone_frontpage_sections", + "content": { + "main_specialty_title": "Main Specialties", + "main_specialty": "We value our patients", + "main_specialty_description": "

MedZone provides complete medical and surgical services in both inpatient and outpatient settings, at in several convenient locations.

See all Specialities

", + "specialties_grouping": [ + "all" + ], + "specialties_navigation": "", + "specialties_repeater_field": "medzone_specialties", + "type": "specialties" + } + }, + "openhours": { + "id": "openhours", + "label": "Open Hours", + "setting": "medzone_frontpage_sections", + "content": { + "openhours_background": "/assets/images/03_top_experience.png", + "openhours_title": "Top notch
experience", + "openhours_text": "

Our specialist make sure you get the best care there is.

Make an appointment

", + "openhours_navigation": "", + "openhours_repeater_field": "medzone_hospital_schedule", + "type": "openhours" + } + }, + "accordion": { + "id": "openhours", + "label": "General Information", + "setting": "medzone_frontpage_sections", + "content": { + "accordion_title": "Why Choose Us?", + "accordion_text": "

We are a full-service, non-profit community hospital, offering comprehensive medical, surgical and therapeutic services.

", + "accordion_image": "/assets/images/04_why_choose_us.jpg", + "accordion_navigation": "", + "accordion_repeater_field": "medzone_hospital_information", + "type": "accordion" + } + }, + "doctors": { + "id": "doctors", + "label": "Doctors", + "setting": "medzone_frontpage_sections", + "content": { + "doctors_title": "Meet our Doctors", + "doctors_subtitle": "

Our experts are here for you every single day! We care about our patients and we
do our best to make them happy.

", + "doctors_group": [ + "all" + ], + "doctors_nabigation": "", + "doctors_repeater_field": "medzone_doctors", + "type": "doctors" + } + }, + "hospital": { + "id": "hospital", + "label": "Hospital", + "setting": "medzone_frontpage_sections", + "content": { + "hospital_title": "Explore our Hospital", + "hospital_info": "

MedZone Hospital is dedicated to improving the quality of care for the patients who suffer a heart attack and related illnesses.

VIew our rooms", + "hospital_image_1": "/assets/images/06_explore_hospital.jpg", + "hospital_image_2": "/assets/images/06_explore_hospital.jpg", + "hospital_image_3": "/assets/images/06_explore_hospital.jpg", + "type": "hospital" + } + }, + "involvement": { + "id": "involvement", + "label": "Involvement", + "setting": "medzone_frontpage_sections", + "content": { + "involvement_image": "/assets/images/07_involvment.jpg", + "involvement_title": "True Involvement in Pacient Care", + "involvement_text": "

MedZone earned the award by meeting specific criteria and standards of performance for the quick and appropriate treatment of STEMI patients by providing emergency procedures to re-establish blood flow to blocked arteries when needed.

Eligible hospitals must adhere to these measures at a set level for a designated period to receive the awards.

", + "type": "involvement" + } + }, + "testimonials": { + "id": "testimonials", + "label": "Testimonials", + "setting": "medzone_frontpage_sections", + "content": { + "testimonials_title": "Why Choose Us?", + "testimonials_navigation": "", + "testimonials_repeater_field": "medzone_testimonials", + "type": "testimonials" + } + } + } + } +} diff --git a/inc/admin/welcome-screen/img/ajax-loader.gif b/inc/libraries/welcome-screen/img/ajax-loader.gif similarity index 100% rename from inc/admin/welcome-screen/img/ajax-loader.gif rename to inc/libraries/welcome-screen/img/ajax-loader.gif diff --git a/inc/libraries/welcome-screen/img/colorlib.png b/inc/libraries/welcome-screen/img/colorlib.png new file mode 100644 index 0000000000000000000000000000000000000000..fbd47353f1e48096e82d1dc31c6d38544294734e GIT binary patch literal 797197 zcmeI537i~7`S&M++{b_%BBC8YKqT4OoFs;1HVKzp8we6aWrk!EA|$&xAOVz}6}i+u zSwwDO2Nk)=0*WHwHiv*BWP+k{W)Kk37Z@%<5%&E(yFHuPyJx1ms=E7EpHHP{x~rb! zTTeY*)ibj>zy9z8x7_Sgo5f`32F-Z=)FvC@-_}o^{{jx1HXU^AvRG{M zPe>gRyW&TmjKwxPV&RM#_4OwuJ=)g5a# zwl~@0l7q(18lTzXhUuT#CV$q$4?gt5OQVx5o9*5di*ItryphX3+-*ec{WGUb`NFRD z#=nV;Soz1zH;LJYU1=vieQxL0|D1mLS4U*NGs0ee;l77#lG!enJpF>{KZ_*~7?HW^ zvOSK9WjBna9-Vu_i?RAqvDBW;fB$1FbJhEopD`kK+z&@?KO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V?d00001 diff --git a/inc/libraries/welcome-screen/js/welcome.js b/inc/libraries/welcome-screen/js/welcome.js new file mode 100644 index 0000000..a23ba26 --- /dev/null +++ b/inc/libraries/welcome-screen/js/welcome.js @@ -0,0 +1,292 @@ +var welcomeScreenFunctions = { + /** + * Import demo content + */ + importDemoContent: function() { + var self = this; + jQuery( '.epsilon-ajax-button' ).click( function( e ) { + var action = jQuery( this ).attr( 'data-action' ) ? jQuery( this ).attr( 'data-action' ) : jQuery( this ).attr( 'id' ), + container = jQuery( this ).parents( '.action-required-box' ), + checkboxes = container.find( ':checkbox' ), + importThis = { + 'plugins': [], + 'options': [] + }; + + e.preventDefault(); + + jQuery.each( checkboxes, function( k, item ) { + + if ( jQuery( item ).prop( 'checked' ) ) { + importThis[ jQuery( item ).attr( 'name' ) ].push( jQuery( item ).val() ); + } + + } ); + + self._importPlugins( importThis[ 'plugins' ] ); + + if ( importThis[ 'plugins' ].length ) { + jQuery( document ).on( 'epsilon-all-plugins-imported', function() { + self._importContent( importThis, container ); + } ); + } else { + self._importContent( importThis, container ); + } + + } ); + }, + /** + * Import the actual content + * + * @param $import + * @param action + * @param container + * @private + * + * @todo send "argument" with demo slug + */ + _importContent: function( $import, container ) { + + var needImported = 'import-all'; + + if ( $import.options.length < 1 ) { + location.reload(); + return; + } + + if ( $import.options.length < 2 ) { + needImported = $import.options[0]; + } + + jQuery.ajax( { + type: 'POST', + data: { action: 'shapely_companion_import_content', 'import' : needImported }, + dataType: 'json', + url: ajaxurl, + success: function( json ) { + if ( container.length ) { + container.html( '

Demo content was imported successfully!

' ); + + window.setTimeout( function() { + container.slideUp( 300, function() { + container.remove(); + location.reload(); + } ); + }, 3000 ); + } + }, + /** + * Throw errors + * + * @param jqXHR + * @param textStatus + * @param errorThrown + */ + error: function( jqXHR, textStatus, errorThrown ) { + console.log( jqXHR + ' :: ' + textStatus + ' :: ' + errorThrown ); + } + + } ); + }, + /** + * Start the installation/activation of the plugin + * + * @param $plugins + * @private + */ + _importPlugins: function( $plugins ) { + var count = 0, + max = $plugins.length; + jQuery( 'a[data-slug="' + $plugins[ count ] + '"]' ).click(); + + jQuery( document ).on( 'epsilon-plugin-activated', function() { + count ++; + if ( count === max ) { + jQuery( document ).trigger( 'epsilon-all-plugins-imported' ); + } + + if ( 'undefined' !== typeof($plugins[ count ]) ) { + jQuery( 'a[data-slug="' + $plugins[ count ] + '"]' ).click(); + } + } ); + }, + + /** + * Dismiss action through AJAX + */ + dismissAction: function() { + var args; + + jQuery( '.required-action-button' ).click( function() { + args = { + action: [ 'Epsilon_Welcome_Screen', 'handle_required_action' ], + nonce: welcomeScreen.ajax_nonce, + args: { + 'do': jQuery( this ).attr( 'data-action' ), + 'id': jQuery( this ).attr( 'id' ) + } + }; + + jQuery.ajax( { + type: 'POST', + data: { action: 'welcome_screen_ajax_callback', args: args }, + dataType: 'json', + url: ajaxurl, + success: function() { + location.reload(); + }, + /** + * Throw errors + * + * @param jqXHR + * @param textStatus + * @param errorThrown + */ + error: function( jqXHR, textStatus, errorThrown ) { + console.log( jqXHR + ' :: ' + textStatus + ' :: ' + errorThrown ); + } + + } ); + } ); + }, + + /** + * Init Range sliders in backend + * + * @param context + */ + rangeSliders: function( context ) { + var sliders = context.find( '.slider-container' ); + + jQuery.each( sliders, function() { + var slider, input, inputId, id, instance, self; + self = jQuery( this ); + slider = jQuery( this ).find( '.ss-slider' ); + input = jQuery( this ).find( 'input' ); + inputId = input.attr( 'id' ); + id = slider.attr( 'id' ); + instance = jQuery( '#' + id ); + + instance.slider( { + value: self.find( 'input' ).attr( 'value' ), + range: 'min', + min: parseFloat( instance.attr( 'data-attr-min' ) ), + max: parseFloat( instance.attr( 'data-attr-max' ) ), + step: parseFloat( instance.attr( 'data-attr-step' ) ), + /** + * Removed Change event because server was flooded with requests from + * javascript, sending changesets on each increment. + * + * @param event + * @param ui + */ + slide: function( event, ui ) { + self.find( 'input' ).attr( 'value', ui.value ); + }, + /** + * Bind the change event to the "actual" stop + * @param event + * @param ui + */ + stop: function( event, ui ) { + jQuery( '#' + inputId ).trigger( 'change' ); + } + } ); + + jQuery( input ).on( 'focus', function() { + jQuery( this ).blur(); + } ); + + instance.attr( 'value', ( instance.slider( 'value' ) ) ); + instance.on( 'change', function() { + jQuery( '#' + id ).slider( { + value: jQuery( this ).val() + } ); + } ); + } ); + }, + + /** + * Activate the plugin when the plugin has been installed + */ + activatePlugin: function() { + var activateButtonSlug = jQuery( 'a[data-slug]' ); + jQuery( activateButtonSlug ).on( 'click', function( e ) { + var self = jQuery( this ), + dataToSend = { plugin: self.attr( 'data-slug' ) }; + if ( self.hasClass( 'install-now' ) || self.hasClass( 'deactivate-now' ) ) { + return; + } + e.preventDefault(); + + jQuery.ajax( { + beforeSend: function() { + self.replaceWith( '' + welcomeScreen.activating_string + '...' ); + }, + async: true, + type: 'GET', + dataType: 'html', + url: self.attr( 'href' ), + success: function( response ) { + var actions = jQuery( '#plugin-filter' ).find( '.action-required-box' ); + + if ( ! actions.length ) { + location.reload(); + } + + jQuery( '.updating-message' ).removeClass( 'updating-message' ).parents( '.action-required-box' ).slideUp( 200 ).remove(); + actions = jQuery( '#plugin-filter' ).find( '.action-required-box' ); + + jQuery( '.import-content-container' ).find( 'input[data-slug="' + self.attr( 'data-slug' ) + '"]' ).parent().remove(); + + if ( ! actions.length ) { + jQuery( '#plugin-filter' ).append( '' + welcomeScreen.no_actions + '' ); + } + + jQuery( document ).trigger( 'epsilon-plugin-activated', dataToSend ); + } + } ); + } ); + + jQuery( document ).on( 'wp-plugin-install-success', function( response, data ) { + var activateButton = jQuery( 'a[data-slug="' + data.slug + '"]' ), + dataToSend = { plugin: data.slug }; + if ( activateButton.length && ( jQuery( 'body' ).hasClass( welcomeScreen.body_class ) || jQuery( 'body' ).hasClass( 'wp-customizer' ) ) ) { + + jQuery.ajax( { + beforeSend: function() { + activateButton.replaceWith( '' + welcomeScreen.activating_string + '...' ); + }, + async: true, + type: 'GET', + dataType: 'html', + url: data.activateUrl, + success: function( response ) { + var actions = jQuery( '#plugin-filter' ).find( '.action-required-box' ); + + if ( ! actions.length ) { + location.reload(); + } + + jQuery( '.updating-message' ).removeClass( 'updating-message' ).parents( '.action-required-box' ).slideUp( 200 ).remove(); + jQuery( document ).trigger( 'epsilon-plugin-activated', dataToSend ); + } + } ); + } + } ); + } +}; + +jQuery( document ).ready( function() { + + welcomeScreenFunctions.dismissAction(); + welcomeScreenFunctions.importDemoContent(); + welcomeScreenFunctions.activatePlugin(); + + jQuery( '.epsilon-hidden-content-toggler' ).click( function( e ){ + var id = jQuery( this ).attr( 'href' ); + e.preventDefault(); + jQuery( id ).slideToggle(); + }); + +} ); diff --git a/inc/admin/welcome-screen/sections/getting-started.php b/inc/libraries/welcome-screen/sections/getting-started.php similarity index 93% rename from inc/admin/welcome-screen/sections/getting-started.php rename to inc/libraries/welcome-screen/sections/getting-started.php index e5e7863..975273a 100644 --- a/inc/admin/welcome-screen/sections/getting-started.php +++ b/inc/libraries/welcome-screen/sections/getting-started.php @@ -12,11 +12,11 @@

- +

+ href="">

+ +
+ actions ) ) { + $actions_left = $this->get_actions_left(); + foreach ( $this->actions as $key => $value ) { + $hidden = false; + + if ( isset( $actions_left[ $value['id'] ] ) && null !== $actions_left[ $value['id'] ] ) { + $hidden = $actions_left[ $value['id'] ]; + } + + if ( $value['check'] ) { + continue; + } + + ?> +
+ + + + +

+ + + +

+ +
+ +

+ + + $func(); + } else { + echo $value['help']; + } + ?> + + + + + + check_plugin( $value['plugin_slug'] ); + $link = $this->create_plugin_link( $plugin['needs'], $value['plugin_slug'] ); + + ?> +

+ +

+ + + +
+ + + + + + + + +
diff --git a/inc/libraries/welcome-screen/sections/recommended-plugins.php b/inc/libraries/welcome-screen/sections/recommended-plugins.php new file mode 100644 index 0000000..40833b3 --- /dev/null +++ b/inc/libraries/welcome-screen/sections/recommended-plugins.php @@ -0,0 +1,39 @@ + + + diff --git a/inc/admin/welcome-screen/sections/support.php b/inc/libraries/welcome-screen/sections/support.php similarity index 100% rename from inc/admin/welcome-screen/sections/support.php rename to inc/libraries/welcome-screen/sections/support.php From 5eada6aba45023a9f03399b80d2d95a50810a200 Mon Sep 17 00:00:00 2001 From: Giucu Date: Fri, 9 Feb 2018 15:28:28 +0200 Subject: [PATCH 6/9] Fixed Travis Review --- .travis.yml | 2 -- inc/class-shapely.php | 20 ++++++++++---------- inc/customizer.php | 6 +++--- 3 files changed, 13 insertions(+), 15 deletions(-) diff --git a/.travis.yml b/.travis.yml index 94ce7a1..c4f48cc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -38,9 +38,7 @@ script: - mkdir -p build/logs - find -L . -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l - if [[ "$SNIFF" == "1" ]]; then jshint ./assets/js/*.js; fi -- if [[ "$SNIFF" == "1" ]]; then jshint ./inc/admin/welcome-screen/js/*.js; fi - if [[ "$SNIFF" == "1" ]]; then jscs ./assets/js/*.js; fi -- if [[ "$SNIFF" == "1" ]]; then jscs ./inc/admin/welcome-screen/js/*.js; fi - if [[ "$SNIFF" == "1" ]]; then grunt textdomain; fi - if [[ "$SNIFF" == "1" ]]; then $PHPCS_DIR/scripts/phpcs -p -s -v -n ./*.php --standard=./phpcs.ruleset.xml --extensions=php; fi diff --git a/inc/class-shapely.php b/inc/class-shapely.php index 0d29194..1309002 100644 --- a/inc/class-shapely.php +++ b/inc/class-shapely.php @@ -14,7 +14,7 @@ class Shapely { public $recommended_actions; public $theme_slug = 'shapely'; - + function __construct() { if ( ! is_admin() && ! is_customize_preview() ) { @@ -22,7 +22,7 @@ function __construct() { } $this->load_class(); - + $this->recommended_actions = apply_filters( 'shapely_required_actions', array( array( @@ -123,17 +123,17 @@ public function init_customizer( $wp_customize ) { } - private function generate_action_html(){ + private function generate_action_html() { $import_actions = array( - 'set-frontpage' => esc_html__( 'Set Static FrontPage', 'shapely' ), - 'import-widgets' => esc_html__( 'Import HomePage Widgets', 'shapely' ), + 'set-frontpage' => esc_html__( 'Set Static FrontPage', 'shapely' ), + 'import-widgets' => esc_html__( 'Import HomePage Widgets', 'shapely' ), ); $import_plugins = array( 'shapely-companion' => esc_html__( 'Shapely Companion', 'shapely' ), - 'jetpack' => esc_html__( 'Jetpack', 'shapely' ), - 'contact-form-7' => esc_html__( 'Contact Form 7', 'shapely' ), + 'jetpack' => esc_html__( 'Jetpack', 'shapely' ), + 'contact-form-7' => esc_html__( 'Contact Form 7', 'shapely' ), ); $plugins_html = ''; @@ -145,7 +145,7 @@ private function generate_action_html(){ $html = '

' . __( 'Import Demo Content', 'shapely' ) . ''; $html .= '' . __( 'Advanced', 'shapely' ) . '

'; $html .= '
'; - + foreach ( $import_plugins as $id => $label ) { if ( ! Shapely_Notify_System::shapely_has_plugin( $id ) ) { $plugins_html .= $this->generate_checkbox( $id, $label, 'plugins' ); @@ -160,7 +160,7 @@ private function generate_action_html(){ $html .= '
'; $html .= ''; } - + $html .= '
'; $html .= '

' . __( 'Demo Content', 'shapely' ) . '

'; $html .= '
'; @@ -182,4 +182,4 @@ private function generate_checkbox( $id, $label, $name = 'options', $block = fal } } -new Shapely(); \ No newline at end of file +new Shapely(); diff --git a/inc/customizer.php b/inc/customizer.php index 6040ece..ecdcbfd 100644 --- a/inc/customizer.php +++ b/inc/customizer.php @@ -1190,11 +1190,11 @@ function shapely_customizer_custom_control_css() { clear: both; } .widget-content .iris-picker .iris-strip .ui-slider-handle { - top: auto; - transform: translateX(0); + top: auto; + transform: translateX(0); } .widget-content .iris-picker .iris-slider-offset { - margin: 0; + margin: 0; } Date: Fri, 9 Feb 2018 15:36:31 +0200 Subject: [PATCH 7/9] Travis Review 2 --- assets/js/customizer.js | 1 - 1 file changed, 1 deletion(-) diff --git a/assets/js/customizer.js b/assets/js/customizer.js index 13a2e19..1a1c571 100644 --- a/assets/js/customizer.js +++ b/assets/js/customizer.js @@ -41,7 +41,6 @@ } control.shapelyInterval = setInterval( control.updateControl, 1000, control ); } - } ); control.heightElement.keyup( function() { From 2c0a0ed7e7e68cf640b53d6c36b41d35cd9d5aff Mon Sep 17 00:00:00 2001 From: Giucu Date: Fri, 9 Feb 2018 17:21:16 +0200 Subject: [PATCH 8/9] Fixed Related Project & Posts Image size --- inc/class-shapely-related-posts.php | 4 ++-- style.css | 11 +++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/inc/class-shapely-related-posts.php b/inc/class-shapely-related-posts.php index 50cb4c9..c64282e 100644 --- a/inc/class-shapely-related-posts.php +++ b/inc/class-shapely-related-posts.php @@ -226,9 +226,9 @@ function output_related_posts() { echo '
'; if ( has_post_thumbnail( $related_posts->post->ID ) ) { - echo '' . get_the_post_thumbnail( $related_posts->post->ID, 'shapely-grid' ) . ''; + echo '' . get_the_post_thumbnail( $related_posts->post->ID, 'shapely-grid' ) . ''; } else { - echo ''; + echo ''; } if ( $show_title ) { diff --git a/style.css b/style.css index ae859ca..9742fb6 100644 --- a/style.css +++ b/style.css @@ -4155,6 +4155,17 @@ footer.bg-dark a { margin-right: 20px; color: #001c28; } +.shapely-related-posts .owl-carousel .owl-item .related-item-thumbnail img { + display: none; +} +.shapely-related-posts .related-item-thumbnail { + display: block; + padding-bottom: 85%; + background-repeat: no-repeat; + background-size: cover; + background-position: center; +} + .pt0 { padding-top: 30px; } From c38077e4771dc7f8e28a12e126ce279532efba3e Mon Sep 17 00:00:00 2001 From: Giucu Date: Fri, 9 Feb 2018 17:28:36 +0200 Subject: [PATCH 9/9] Version bump --- changelog.txt | 3 +++ package.json | 2 +- style.css | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/changelog.txt b/changelog.txt index bd09f61..c14ca0e 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,6 @@ +### 1.2.1 + Implemented milestone https://github.com/puikinsh/shapely/milestone/5 + ### 1.1.6 Implemented milestone https://github.com/puikinsh/shapely/milestone/2 diff --git a/package.json b/package.json index 57d685c..52ba18f 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "shapely", "main": "Gruntfile.js", - "version": "1.2.0", + "version": "1.2.1", "homepage": "https://www.colorlib.com", "author": "Colorlib", "license": "GPL v3", diff --git a/style.css b/style.css index 9742fb6..f1fc7b0 100644 --- a/style.css +++ b/style.css @@ -4,7 +4,7 @@ Theme URI: https://colorlib.com/wp/themes/shapely Author: colorlib Author URI: https://colorlib.com/ Description: Shapely is a powerful and versatile one page WordPress theme with pixel perfect design and outstanding functionality. It is by far the most advanced free WordPress theme available today with loads of unmatched customization options. This theme comes with several homepage widgets that can be used to add portfolio, testimonials, parallax sections, your product or service information, call for action and much more. Shapely supports most free and premium WordPress plugins such as WooCommerce, Jetpack, Gravity Forms, Contact Form 7, Yoast SEO, Google Analytics by Yoast and much more. This theme is the best suited for business, landing page, portfolio, ecommerce, store, local business, personal websites but can be tweaked to be used as blog, magazine or any other awesome website while highlighting its unique one page setup. This is going to be the last WordPress theme you will ever want to use because it is so much better than anything you have seen. Needless to say that this theme is SEO friendly thanks to its well optimized strucutre. Shapely theme is mobile friendly and fully responsive making it your best multipurpose partnert for any project and website. -Version: 1.2 +Version: 1.2.1 License: GNU General Public License v3 License URI: http://www.gnu.org/licenses/gpl-2.0.html Text Domain: shapely