From 8eec693617c7746f310341f7de9b4180b97b371e Mon Sep 17 00:00:00 2001 From: TruongSa Date: Mon, 11 Jun 2018 16:06:37 +0700 Subject: [PATCH 01/38] Fixed #289, fixed #302 --- assets/js/theme.js | 38 +++++++++++++++++++++++++++++++++----- 1 file changed, 33 insertions(+), 5 deletions(-) diff --git a/assets/js/theme.js b/assets/js/theme.js index 6df64d74..cc406941 100644 --- a/assets/js/theme.js +++ b/assets/js/theme.js @@ -615,6 +615,7 @@ jQuery( document ).ready( function( $ ) { var scrollTop = $( window ).scrollTop(); //var top = $( window ).scrollTop(); var wh = $( window).height(); + var ww = $( window).width(); $('.section-parallax, .parallax-hero').each( function( ){ var $el = $( this ); var pl = $( '.parallax-bg', $el ); @@ -624,16 +625,43 @@ jQuery( document ).ready( function( $ ) { var img = $( 'img', pl ); if ( img.length ) { + + var imageNaturalWidth = img.prop('naturalWidth'); + var imageNaturalHeight = img.prop('naturalHeight'); + var containerHeight = h > 0 ? h : 500; - var imgHeight = $('img', pl).height(); + var imgHeight = img.height(); var parallaxDist = imgHeight - containerHeight; - var bottom = $el.offset().top + containerHeight; - var top = $el.offset().top; + var top = $el.offset().top; var windowHeight = window.innerHeight; var windowBottom = scrollTop + windowHeight; var percentScrolled = (windowBottom - top) / (containerHeight + windowHeight); - var parallax = parallaxDist * percentScrolled; - pl.find('img').css('top', '-' + ( parallax ) + 'px'); + + var parallaxTop = parallaxDist * percentScrolled; + var l; + var max_width = imageNaturalWidth; + + if ( imageNaturalWidth > w ){ + } else { + max_width = ww; + } + + if( max_width > ww*2 ) { + max_width = max_width - ww; + } + + l = (max_width - ww ) / 2; + if ( l < 0 ) { + l = 0; + } + + img.css( { + top: '-' + ( parallaxTop ) + 'px', + left: '-' + ( l ) + 'px', + //maxWidth: ww+'px' + maxWidth: max_width+'px' + }); + } else { //var sh = $el.height(); From d18a47bba2ab55479c429856e6e182d911739136 Mon Sep 17 00:00:00 2001 From: TruongSa Date: Mon, 11 Jun 2018 16:08:51 +0700 Subject: [PATCH 02/38] Remove admin notice --- assets/js/theme.js | 2 +- changelog.md | 4 +++ inc/dashboard.php | 64 ---------------------------------------------- 3 files changed, 5 insertions(+), 65 deletions(-) diff --git a/assets/js/theme.js b/assets/js/theme.js index cc406941..e67fc1fc 100644 --- a/assets/js/theme.js +++ b/assets/js/theme.js @@ -654,7 +654,7 @@ jQuery( document ).ready( function( $ ) { if ( l < 0 ) { l = 0; } - + img.css( { top: '-' + ( parallaxTop ) + 'px', left: '-' + ( l ) + 'px', diff --git a/changelog.md b/changelog.md index 16c2b4a1..b3dbaaf1 100644 --- a/changelog.md +++ b/changelog.md @@ -1,6 +1,10 @@ ==================================================================== CHANGELOG ==================================================================== +# 2.0.9 +* FIXED: Issue hero image resize not properly. +* FIXED: Parallax does not rescale image anymore. + # 2.0.8 * NEW: Setting height for transparent logo. * IMPROVED: Small strings corrections. diff --git a/inc/dashboard.php b/inc/dashboard.php index fb4badea..45832b2a 100644 --- a/inc/dashboard.php +++ b/inc/dashboard.php @@ -34,68 +34,6 @@ function onepress_maybe_show_switch_theme_notice(){ } -/** - * @since 2.0.8 - */ -function onepress_admin_switch_theme_notice(){ - - if ( isset( $_GET['dismiss'], $_GET['_nonce'] ) && $_GET['dismiss'] == 1 ) { - if ( wp_verify_nonce( sanitize_text_field( $_GET['_nonce'] ), 'onepress_dismiss_switch_theme_notice' ) ) { - update_option( 'onepress_dismiss_switch_theme_notice', 1 ); - return; - } - } - - $show = onepress_maybe_show_switch_theme_notice(); - if ( ! $show ) { - update_option( 'onepress_dismiss_switch_theme_notice', 1 ); - return; - } - - // Theme slug here - $theme_slug = 'customify'; - - $install_url = add_query_arg( array( - 'action' => 'install-theme', - 'theme' => $theme_slug, - ), self_admin_url( 'update.php' ) ); - $url = wp_nonce_url( $install_url, 'install-theme_' . $theme_slug ); - - $dismiss_url = add_query_arg( array( - 'page' => 'ft_onepress', - 'dismiss' => '1', - '_nonce' => wp_create_nonce( 'onepress_dismiss_switch_theme_notice' ), - ), self_admin_url( 'themes.php' ) ); - - $current_screen = get_current_screen(); - $class = 'onepress-notice'; - if ( $current_screen && $current_screen->id != 'appearance_page_ft_onepress' ) { - $class .= ' notice notice-warning'; - } - ?> -
-

-
comprehensive Header & Footer builder.', 'onepress' ); ?>
-

- - -

-
- id == 'appearance_page_ft_onepress' || $current_screen->base != 'themes' ) { - return; - } - onepress_admin_switch_theme_notice(); -} -add_action( 'admin_notices', 'onepress_add_admin_switch_theme_notice', 15 ); - /** * Get theme actions required * @@ -418,7 +356,6 @@ function onepress_theme_info_page() { FameThemes
- ' ); ?> + +
- '', - ) ); - ?> + /** + * @since 2.1.0 + */ + onepress_the_excerpt( ); + + wp_link_pages( array( + 'before' => '', + ) ); + ?>
+ + From af109e269d53396850b1442f6d5aa455548b9c60 Mon Sep 17 00:00:00 2001 From: TruongSa Date: Fri, 7 Sep 2018 11:18:23 +0700 Subject: [PATCH 15/38] Disable the archive prefix fixed #294 --- changelog.md | 7 ++++++ inc/customize-configs/site-options.php | 31 +++++++++++++++++++++++ inc/extras.php | 34 ++++++++++++++++++++++++++ 3 files changed, 72 insertions(+) diff --git a/changelog.md b/changelog.md index 1f04686c..f3ebd63b 100644 --- a/changelog.md +++ b/changelog.md @@ -1,6 +1,13 @@ ==================================================================== CHANGELOG ==================================================================== + +# 2.1.0 +* NEW: Disable disable archive prefix. +* IMPROVED: Improved News section. +* IMPROVED: Re-Structure customize configs. + + # 2.0.9 * IMPROVED: Add alt title for gallery images. * FIXED: Issue hero image resize not properly. diff --git a/inc/customize-configs/site-options.php b/inc/customize-configs/site-options.php index 83a83dcc..168bc988 100644 --- a/inc/customize-configs/site-options.php +++ b/inc/customize-configs/site-options.php @@ -581,6 +581,37 @@ ); +/** + * Blog Post Settings + * @since 2.1.0 + * ---------------------------------------------------------------------- + */ +$wp_customize->add_section( 'onepress_blog_posts', + array( + 'priority' => null, + 'title' => esc_html__( 'Blog Posts', 'onepress' ), + 'description' => '', + 'panel' => 'onepress_options', + ) +); + +$wp_customize->add_setting( 'onepress_disable_archive_prefix', + array( + 'sanitize_callback' => 'onepress_sanitize_checkbox', + 'default' => '', + ) +); +$wp_customize->add_control( 'onepress_disable_archive_prefix', + array( + 'type' => 'checkbox', + 'label' => esc_html__( 'Disable disable archive prefix', 'onepress' ), + 'section' => 'onepress_blog_posts', + 'description' => esc_html__( 'Check this to disable archive prefix on category, date, tag page.', 'onepress' ) + ) +); + + + /* Single Settings ----------------------------------------------------------------------*/ $wp_customize->add_section( 'onepress_single', diff --git a/inc/extras.php b/inc/extras.php index 73ee0a71..c4017b53 100644 --- a/inc/extras.php +++ b/inc/extras.php @@ -333,6 +333,40 @@ function onepress_after_section( $section_id = null, $args = array() ){ add_action( 'onepress_after_section_part', 'onepress_after_section', 10, 2 ); +/** + * Retrieve the archive title based on the queried object. + * + * + * @return string Archive title. + */ +function onepress_get_the_archive_title( $title ) { + $disable = get_theme_mod( 'onepress_disable_archive_prefix', false ); + if ( $disable ) { + if (is_category()) { + $title = single_cat_title('', false); + } elseif (is_tag()) { + $title = single_tag_title('', false); + } elseif (is_author()) { + $title = '' . get_the_author() . ''; + } elseif (is_year()) { + $title = get_the_date(_x('Y', 'yearly archives date format', 'onepress')); + } elseif (is_month()) { + $title = get_the_date(_x('F Y', 'monthly archives date format', 'onepress')); + } elseif (is_day()) { + $title = get_the_date(_x('F j, Y', 'daily archives date format', 'onepress')); + } elseif (is_post_type_archive()) { + $title = post_type_archive_title('', false); + } elseif (is_tax()) { + $title = single_term_title('', false); + } + } + + return $title; +} + +add_filter( 'get_the_archive_title', 'onepress_get_the_archive_title', 15 ); + + if ( onepress_is_wc_active() ) { /** * Template pages From 40ab06894f7642a4afb506d134ad5cfa692cb319 Mon Sep 17 00:00:00 2001 From: TruongSa Date: Fri, 7 Sep 2018 11:36:30 +0700 Subject: [PATCH 16/38] Remove tgmpa config --- functions.php | 87 --------------------------------------------------- 1 file changed, 87 deletions(-) diff --git a/functions.php b/functions.php index 7f46ac09..85f33c4b 100644 --- a/functions.php +++ b/functions.php @@ -312,93 +312,6 @@ function onepress_fonts_url() { endif; -if ( ! function_exists( 'onepress_register_required_plugins' ) ) : - /** - * Register the required plugins for this theme. - * - * In this example, we register five plugins: - * - one included with the TGMPA library - * - two from an external source, one from an arbitrary source, one from a GitHub repository - * - two from the .org repo, where one demonstrates the use of the `is_callable` argument - * - * The variable passed to tgmpa_register_plugins() should be an array of plugin - * arrays. - * - * This function is hooked into tgmpa_init, which is fired within the - * TGM_Plugin_Activation class constructor. - */ - function onepress_register_required_plugins() { - /* - * Array of plugin arrays. Required keys are name and slug. - * If the source is NOT from the .org repo, then source is also required. - */ - $plugins = array( - array( - 'name' => 'Pirate Forms', // The plugin name. - 'slug' => 'pirate-forms', // The plugin slug (typically the folder name). - 'source' => '', // The plugin source. - 'required' => false, // If false, the plugin is only 'recommended' instead of required. - 'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch. - 'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins. - 'external_url' => '', // If set, overrides default API URL and points to an external URL. - ), - ); - - /* - * Array of configuration settings. Amend each line as needed. - * - * TGMPA will start providing localized text strings soon. If you already have translations of our standard - * strings available, please help us make TGMPA even better by giving us access to these translations or by - * sending in a pull-request with .po file(s) with the translations. - * - * Only uncomment the strings in the config array if you want to customize the strings. - */ - $config = array( - 'id' => 'tgmpa', // Unique ID for hashing notices for multiple instances of TGMPA. - 'default_path' => '', // Default absolute path to bundled plugins. - 'menu' => 'tgmpa-install-plugins', // Menu slug. - 'parent_slug' => 'themes.php', // Parent menu slug. - 'capability' => 'edit_theme_options', // Capability needed to view plugin install page, should be a capability associated with the parent menu used. - 'has_notices' => true, // Show admin notices or not. - 'dismissable' => true, // If false, a user cannot dismiss the nag message. - 'dismiss_msg' => '', // If 'dismissable' is false, this message will be output at top of nag. - 'is_automatic' => false, // Automatically activate plugins after installation or not. - 'message' => '', // Message to output right before the plugins table. - - 'strings' => array( - 'page_title' => esc_html__( 'Install Required Plugins', 'onepress' ), - 'menu_title' => esc_html__( 'Install Plugins', 'onepress' ), - 'installing' => esc_html__( 'Installing Plugin: %s', 'onepress' ), // %s = plugin name. - 'oops' => esc_html__( 'Something went wrong with the plugin API.', 'onepress' ), - 'notice_can_install_required' => _n_noop( 'This theme requires the following plugin: %1$s.', 'This theme requires the following plugins: %1$s.', 'onepress' ), // %1$s = plugin name(s). - 'notice_can_install_recommended' => _n_noop( 'This theme recommends the following plugin: %1$s.', 'This theme recommends the following plugins: %1$s.', 'onepress' ), // %1$s = plugin name(s). - 'notice_cannot_install' => _n_noop( 'Sorry, but you do not have the correct permissions to install the %1$s plugin.', 'Sorry, but you do not have the correct permissions to install the %1$s plugins.', 'onepress' ), // %1$s = plugin name(s). - 'notice_ask_to_update' => _n_noop( 'The following plugin needs to be updated to its latest version to ensure maximum compatibility with this theme: %1$s.', 'The following plugins need to be updated to their latest version to ensure maximum compatibility with this theme: %1$s.', 'onepress' ), // %1$s = plugin name(s). - 'notice_ask_to_update_maybe' => _n_noop( 'There is an update available for: %1$s.', 'There are updates available for the following plugins: %1$s.', 'onepress' ), // %1$s = plugin name(s). - 'notice_cannot_update' => _n_noop( 'Sorry, but you do not have the correct permissions to update the %1$s plugin.', 'Sorry, but you do not have the correct permissions to update the %1$s plugins.', 'onepress' ), // %1$s = plugin name(s). - 'notice_can_activate_required' => _n_noop( 'The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.', 'onepress' ), // %1$s = plugin name(s). - 'notice_can_activate_recommended' => _n_noop( 'The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.', 'onepress' ), // %1$s = plugin name(s). - 'notice_cannot_activate' => _n_noop( 'Sorry, but you do not have the correct permissions to activate the %1$s plugin.', 'Sorry, but you do not have the correct permissions to activate the %1$s plugins.', 'onepress' ), // %1$s = plugin name(s). - 'install_link' => _n_noop( 'Begin installing plugin', 'Begin installing plugins', 'onepress' ), - 'update_link' => _n_noop( 'Begin updating plugin', 'Begin updating plugins', 'onepress' ), - 'activate_link' => _n_noop( 'Begin activating plugin', 'Begin activating plugins', 'onepress' ), - 'return' => esc_html__( 'Return to Required Plugins Installer', 'onepress' ), - 'plugin_activated' => esc_html__( 'Plugin activated successfully.', 'onepress' ), - 'activated_successfully' => esc_html__( 'The following plugin was activated successfully:', 'onepress' ), - 'plugin_already_active' => esc_html__( 'No action taken. Plugin %1$s was already active.', 'onepress' ), // %1$s = plugin name(s). - 'plugin_needs_higher_version' => esc_html__( 'Plugin not activated. A higher version of %s is needed for this theme. Please update the plugin.', 'onepress' ), // %1$s = plugin name(s). - 'complete' => esc_html__( 'All plugins installed and activated successfully. %1$s', 'onepress' ), // %s = dashboard link. - 'contact_admin' => esc_html__( 'Please contact the administrator of this site for help.', 'onepress' ), - 'nag_type' => 'updated', // Determines admin notice type - can only be 'updated', 'update-nag' or 'error'. - ), - - ); - - tgmpa( $plugins, $config ); - } - -endif; -add_action( 'tgmpa_register', 'onepress_register_required_plugins' ); /** * Glabel OnePress loop properties From a16f7941007ff529ca6a59da5b15e1eba2dad2b4 Mon Sep 17 00:00:00 2001 From: congthien Date: Fri, 7 Sep 2018 11:39:30 +0700 Subject: [PATCH 17/38] Add select page for News button close #305 --- inc/customize-configs/section-news.php | 17 ++++++----- inc/customizer-controls.php | 41 ++++++++++++++++++++++++-- section-parts/section-news.php | 9 +++--- 3 files changed, 54 insertions(+), 13 deletions(-) diff --git a/inc/customize-configs/section-news.php b/inc/customize-configs/section-news.php index df559bfa..08809899 100644 --- a/inc/customize-configs/section-news.php +++ b/inc/customize-configs/section-news.php @@ -252,17 +252,21 @@ // Blog Button $wp_customize->add_setting( 'onepress_news_more_link', array( - 'sanitize_callback' => 'esc_url', - 'default' => '#', + 'sanitize_callback' => 'sanitize_text_field', + 'default' => '', ) ); -$wp_customize->add_control( 'onepress_news_more_link', + +$wp_customize->add_control( new OnePress_Pages_Control( + $wp_customize, + 'onepress_news_more_link', array( - 'label' => esc_html__( 'More News button link', 'onepress' ), + 'label' => esc_html__( 'More News link', 'onepress' ), 'section' => 'onepress_news_settings', - 'description' => esc_html__( 'It should be your blog page link.', 'onepress' ) + 'description' => '', ) -); +) ); + $wp_customize->add_setting( 'onepress_news_more_text', array( 'sanitize_callback' => 'sanitize_text_field', @@ -276,4 +280,3 @@ 'description' => '', ) ); - diff --git a/inc/customizer-controls.php b/inc/customizer-controls.php index b45acb85..14d592f6 100644 --- a/inc/customizer-controls.php +++ b/inc/customizer-controls.php @@ -565,7 +565,7 @@ public static function js_item(){ icon_class = icon_class.replace( 'fa ', '' ); } icon_class = icon_class.replace( 'fa-fa', '' ); - + #>
@@ -653,6 +653,44 @@ protected function render_content() { } } +/** + * Class OnPress_Dropdown_Category_Control + * @since 2.0.0 + */ +class OnePress_Pages_Control extends WP_Customize_Control { + + public $type = 'dropdown-category'; + + protected $dropdown_args = false; + + protected function render_content() { + ?> + if ( $more_link != '' ) { + $more_text = ( $more_text == '' ) ? get_the_title( $more_link ) : $more_text; + ?>
- +
@@ -110,4 +112,3 @@ Date: Fri, 7 Sep 2018 11:40:45 +0700 Subject: [PATCH 18/38] update more new button link description --- inc/customize-configs/section-news.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/customize-configs/section-news.php b/inc/customize-configs/section-news.php index 08809899..48c4d523 100644 --- a/inc/customize-configs/section-news.php +++ b/inc/customize-configs/section-news.php @@ -263,7 +263,7 @@ array( 'label' => esc_html__( 'More News link', 'onepress' ), 'section' => 'onepress_news_settings', - 'description' => '', + 'description' => esc_html__( 'It should be your blog page link.', 'onepress' ) ) ) ); From 82fada0b6a9a7844d86669fdd816bc06530f8f4e Mon Sep 17 00:00:00 2001 From: congthien Date: Fri, 7 Sep 2018 11:43:36 +0700 Subject: [PATCH 19/38] update changelog --- changelog.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index f3ebd63b..7856c5f6 100644 --- a/changelog.md +++ b/changelog.md @@ -4,6 +4,7 @@ CHANGELOG # 2.1.0 * NEW: Disable disable archive prefix. +* NEW: Item content source for Service section. * IMPROVED: Improved News section. * IMPROVED: Re-Structure customize configs. @@ -52,7 +53,7 @@ CHANGELOG * FIXED: Jetpack's CDN for all images compatible. * FIXED: Hero parallax issue. * FIXED: Site title & tagline color. - + ## 2.0.2 * NEW: Option to enable page header cover. * NEW: Option to display page excerpt as header cover description. From cdf66dc3a3b7961fdd229dbdd3369d71693ccb97 Mon Sep 17 00:00:00 2001 From: TruongSa Date: Fri, 7 Sep 2018 12:06:49 +0700 Subject: [PATCH 20/38] Fixed #305 --- inc/customize-configs/section-news.php | 25 ++++++++++++++-- inc/customizer-controls.php | 3 +- inc/customizer-selective-refresh.php | 1 + section-parts/section-news.php | 40 ++++++++++++++++++++------ 4 files changed, 57 insertions(+), 12 deletions(-) diff --git a/inc/customize-configs/section-news.php b/inc/customize-configs/section-news.php index 48c4d523..95de7fc2 100644 --- a/inc/customize-configs/section-news.php +++ b/inc/customize-configs/section-news.php @@ -250,7 +250,8 @@ ); // Blog Button -$wp_customize->add_setting( 'onepress_news_more_link', + +$wp_customize->add_setting( 'onepress_news_more_page', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => '', @@ -259,14 +260,32 @@ $wp_customize->add_control( new OnePress_Pages_Control( $wp_customize, - 'onepress_news_more_link', + 'onepress_news_more_page', array( - 'label' => esc_html__( 'More News link', 'onepress' ), + 'label' => esc_html__( 'More News Page', 'onepress' ), 'section' => 'onepress_news_settings', + 'show_option_none' => esc_html__( 'Custom Link', 'onepress' ), 'description' => esc_html__( 'It should be your blog page link.', 'onepress' ) ) ) ); + +$wp_customize->add_setting( 'onepress_news_more_link', + array( + 'sanitize_callback' => 'sanitize_text_field', + 'default' => '', + ) +); + +$wp_customize->add_control( + 'onepress_news_more_link', + array( + 'label' => esc_html__( 'Custom More News link', 'onepress' ), + 'section' => 'onepress_news_settings' + ) +); + + $wp_customize->add_setting( 'onepress_news_more_text', array( 'sanitize_callback' => 'sanitize_text_field', diff --git a/inc/customizer-controls.php b/inc/customizer-controls.php index 14d592f6..538f8a95 100644 --- a/inc/customizer-controls.php +++ b/inc/customizer-controls.php @@ -660,6 +660,7 @@ protected function render_content() { class OnePress_Pages_Control extends WP_Customize_Control { public $type = 'dropdown-category'; + public $show_option_none = 'dropdown-category'; protected $dropdown_args = false; @@ -676,7 +677,7 @@ protected function render_content() { $dropdown_args = wp_parse_args( $this->dropdown_args, array( 'selected' => $this->value(), - 'show_option_none' => __( 'None', 'onepress' ), + 'show_option_none' => $this->show_option_none, 'orderby' => 'id', 'order' => 'ASC' )); diff --git a/inc/customizer-selective-refresh.php b/inc/customizer-selective-refresh.php index f125dfec..14c17b7c 100644 --- a/inc/customizer-selective-refresh.php +++ b/inc/customizer-selective-refresh.php @@ -130,6 +130,7 @@ function onepress_customizer_partials( $wp_customize ) { 'onepress_news_hide_meta', // @since 2.1.0 'onepress_news_excerpt_length', // @since 2.1.0 + 'onepress_news_more_page', // @since 2.1.0 'onepress_news_cat', 'onepress_news_orderby', diff --git a/section-parts/section-news.php b/section-parts/section-news.php index 9bfe4e35..6bc35003 100644 --- a/section-parts/section-news.php +++ b/section-parts/section-news.php @@ -1,18 +1,22 @@
class=""> @@ -92,11 +96,31 @@ onepress_loop_remove_prop( 'excerpt_length' ); onepress_loop_remove_prop( 'excerpt_type' ); + $link = ''; + $label = ''; + + if ( $more_page ) { + $page = get_post( $more_page ); + if( $page ) { + $link = get_permalink( $page ); + if ( ! $more_text ) { + $label = $page->post_title; + } + } + } + + if ( ! $link ) { + $link = $more_link; + } + + if ( ! $label ) { + $label = $more_text; + } + if ( $more_link != '' ) { - $more_text = ( $more_text == '' ) ? get_the_title( $more_link ) : $more_text; ?>
- +
From 7472ac3fb88f01347a005aacdd6555113ed96b30 Mon Sep 17 00:00:00 2001 From: congthien Date: Fri, 7 Sep 2018 14:35:50 +0700 Subject: [PATCH 21/38] improve the Read Mores News condition --- section-parts/section-news.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/section-parts/section-news.php b/section-parts/section-news.php index 6bc35003..9f7c6413 100644 --- a/section-parts/section-news.php +++ b/section-parts/section-news.php @@ -117,10 +117,10 @@ $label = $more_text; } - if ( $more_link != '' ) { + if ( $link != '' && $label != '' ) { ?>
- +
From b88139f065a8ef73ed2099e5e43bb2a0da935878 Mon Sep 17 00:00:00 2001 From: congthien Date: Fri, 7 Sep 2018 14:57:22 +0700 Subject: [PATCH 22/38] update changelog Explain it more clearly. --- changelog.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/changelog.md b/changelog.md index 7856c5f6..2e108a44 100644 --- a/changelog.md +++ b/changelog.md @@ -3,9 +3,11 @@ CHANGELOG ==================================================================== # 2.1.0 -* NEW: Disable disable archive prefix. +* NEW: Disable disable archive prefix option. See in Customizer -> Theme Options -> Blog Pots. * NEW: Item content source for Service section. -* IMPROVED: Improved News section. +* NEW: Hide post categories of News section. See in Customizer -> Section News. +* NEW: Custom excerpt length. See in Customizer -> Section News. +* IMPROVED: Improved More Posts button link in News section. * IMPROVED: Re-Structure customize configs. From 8b9e78c25bfd6755f8b15a02ece237499c1956ba Mon Sep 17 00:00:00 2001 From: TruongSa Date: Fri, 7 Sep 2018 18:32:16 +0700 Subject: [PATCH 23/38] Add upsell message for sections settings, fixed #313 --- inc/customize-configs/section-about.php | 4 ++- inc/customize-configs/section-contact.php | 3 +++ inc/customize-configs/section-counter.php | 2 ++ inc/customize-configs/section-features.php | 3 +++ inc/customize-configs/section-gallery.php | 4 +++ inc/customize-configs/section-news.php | 2 ++ inc/customize-configs/section-services.php | 3 +++ inc/customize-configs/section-team.php | 2 ++ inc/customize-configs/section-video-popup.php | 4 ++- inc/customizer.php | 26 +++++++++++++++++++ 10 files changed, 51 insertions(+), 2 deletions(-) diff --git a/inc/customize-configs/section-about.php b/inc/customize-configs/section-about.php index 13e7e86f..699a6228 100644 --- a/inc/customize-configs/section-about.php +++ b/inc/customize-configs/section-about.php @@ -123,6 +123,8 @@ ); } +onepress_add_upsell_for_section( $wp_customize , 'onepress_about_settings' ); + $wp_customize->add_section( 'onepress_about_content', array( @@ -133,7 +135,7 @@ ) ); -// Order & Stlying +// About Items $wp_customize->add_setting( 'onepress_about_boxes', array( diff --git a/inc/customize-configs/section-contact.php b/inc/customize-configs/section-contact.php index 1e8d801e..a817691f 100644 --- a/inc/customize-configs/section-contact.php +++ b/inc/customize-configs/section-contact.php @@ -99,6 +99,9 @@ )); +onepress_add_upsell_for_section( $wp_customize, 'onepress_contact_settings' ); + + $wp_customize->add_section( 'onepress_contact_content' , array( 'priority' => 6, diff --git a/inc/customize-configs/section-counter.php b/inc/customize-configs/section-counter.php index 0a2a2fd7..9f5b671b 100644 --- a/inc/customize-configs/section-counter.php +++ b/inc/customize-configs/section-counter.php @@ -97,6 +97,8 @@ ) )); +onepress_add_upsell_for_section( $wp_customize, 'onepress_counter_settings' ); + $wp_customize->add_section( 'onepress_counter_content' , array( 'priority' => 6, diff --git a/inc/customize-configs/section-features.php b/inc/customize-configs/section-features.php index ee7e7098..44f95dc8 100644 --- a/inc/customize-configs/section-features.php +++ b/inc/customize-configs/section-features.php @@ -121,6 +121,9 @@ ); +onepress_add_upsell_for_section( $wp_customize, 'onepress_features_settings' ); + + $wp_customize->add_section( 'onepress_features_content' , array( 'priority' => 6, diff --git a/inc/customize-configs/section-gallery.php b/inc/customize-configs/section-gallery.php index e8bc6f69..226d33fa 100644 --- a/inc/customize-configs/section-gallery.php +++ b/inc/customize-configs/section-gallery.php @@ -98,6 +98,10 @@ ) ) ); + +onepress_add_upsell_for_section( $wp_customize, 'onepress_gallery_settings' ); + + $wp_customize->add_section( 'onepress_gallery_content', array( 'priority' => 6, diff --git a/inc/customize-configs/section-news.php b/inc/customize-configs/section-news.php index 95de7fc2..eb73ffc8 100644 --- a/inc/customize-configs/section-news.php +++ b/inc/customize-configs/section-news.php @@ -299,3 +299,5 @@ 'description' => '', ) ); + +onepress_add_upsell_for_section( $wp_customize, 'onepress_news_settings' ); diff --git a/inc/customize-configs/section-services.php b/inc/customize-configs/section-services.php index 818f04bf..a86a8feb 100644 --- a/inc/customize-configs/section-services.php +++ b/inc/customize-configs/section-services.php @@ -123,6 +123,9 @@ ); +onepress_add_upsell_for_section( $wp_customize, 'onepress_service_settings' ); + + $wp_customize->add_section( 'onepress_service_content', array( 'priority' => 6, diff --git a/inc/customize-configs/section-team.php b/inc/customize-configs/section-team.php index 91c05c89..56493276 100644 --- a/inc/customize-configs/section-team.php +++ b/inc/customize-configs/section-team.php @@ -119,6 +119,8 @@ ) ); +onepress_add_upsell_for_section( $wp_customize, 'onepress_team_settings' ); + $wp_customize->add_section( 'onepress_team_content' , array( 'priority' => 6, diff --git a/inc/customize-configs/section-video-popup.php b/inc/customize-configs/section-video-popup.php index 8b1b4838..36baa250 100644 --- a/inc/customize-configs/section-video-popup.php +++ b/inc/customize-configs/section-video-popup.php @@ -98,4 +98,6 @@ 'label' => esc_html__('Background image', 'onepress'), 'section' => 'onepress_videolightbox_settings', ) -)); \ No newline at end of file +)); + +onepress_add_upsell_for_section( $wp_customize, 'onepress_videolightbox_settings' ); \ No newline at end of file diff --git a/inc/customizer.php b/inc/customizer.php index 925811a1..a5c8adbf 100644 --- a/inc/customizer.php +++ b/inc/customizer.php @@ -5,6 +5,30 @@ * @package OnePress */ +/** + * Add upsell message for section + * + * @return string + */ +function onepress_add_upsell_for_section( $wp_customize, $section_id ){ + if ( apply_filters( 'onepress_add_upsell_for_section', true, $section_id ) ) { + + $name = $section_id.'__upsell'; + $wp_customize->add_setting( $name, + array( + 'sanitize_callback' => 'onepress_sanitize_text', + ) + ); + $wp_customize->add_control( new OnePress_Misc_Control( $wp_customize, $name, + array( + 'type' => 'custom_message', + 'section' => $section_id, + 'description' => __('

Advanced Section Styling

Check out the OnePress Plus version for full control over the section styling which includes background color, image, video, parallax effect, custom style and more ...

', 'onepress' ) + ) + )); + } +} + /** * Add postMessage support for site title and description for the Theme Customizer. @@ -59,6 +83,8 @@ function onepress_customize_register( $wp_customize ) { require_once $path. '/inc/customize-configs/site-options.php'; // Section Hero require_once $path. '/inc/customize-configs/section-hero.php'; + // Section Hero + require_once $path. '/inc/customize-configs/section-about.php'; // Video Popup require_once $path. '/inc/customize-configs/section-video-popup.php'; // Section Gallery From 57797b5f380418fe27f57dfc241a00310a3911f5 Mon Sep 17 00:00:00 2001 From: TruongSa Date: Fri, 7 Sep 2018 21:05:36 +0700 Subject: [PATCH 24/38] Split options file --- Gruntfile.js | 1 - inc/customize-configs/options-blog-posts.php | 30 + inc/customize-configs/options-colors.php | 25 + inc/customize-configs/options-footer.php | 390 ++ inc/customize-configs/options-global.php | 85 + inc/customize-configs/options-header.php | 317 ++ inc/customize-configs/options-navigation.php | 25 + inc/customize-configs/options-page.php | 113 + inc/customize-configs/options-single.php | 42 + inc/customize-configs/options.php | 49 + inc/customize-configs/site-options.php | 1080 ------ inc/customizer.php | 12 +- package-lock.json | 3665 ++++++++++++++++++ package.json | 2 +- 14 files changed, 4753 insertions(+), 1083 deletions(-) create mode 100644 inc/customize-configs/options-blog-posts.php create mode 100644 inc/customize-configs/options-colors.php create mode 100644 inc/customize-configs/options-footer.php create mode 100644 inc/customize-configs/options-global.php create mode 100644 inc/customize-configs/options-header.php create mode 100644 inc/customize-configs/options-navigation.php create mode 100644 inc/customize-configs/options-page.php create mode 100644 inc/customize-configs/options-single.php create mode 100644 inc/customize-configs/options.php delete mode 100644 inc/customize-configs/site-options.php create mode 100644 package-lock.json diff --git a/Gruntfile.js b/Gruntfile.js index 38c36bf9..92fbc24a 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -139,7 +139,6 @@ module.exports = function( grunt ) { grunt.loadNpmTasks( 'grunt-contrib-cssmin' ); grunt.loadNpmTasks('grunt-contrib-uglify'); - grunt.loadNpmTasks('grunt-contrib-concat'); grunt.loadNpmTasks('grunt-contrib-copy'); grunt.loadNpmTasks('grunt-contrib-compress'); diff --git a/inc/customize-configs/options-blog-posts.php b/inc/customize-configs/options-blog-posts.php new file mode 100644 index 00000000..546933b4 --- /dev/null +++ b/inc/customize-configs/options-blog-posts.php @@ -0,0 +1,30 @@ +add_section( 'onepress_blog_posts', + array( + 'priority' => null, + 'title' => esc_html__( 'Blog Posts', 'onepress' ), + 'description' => '', + 'panel' => 'onepress_options', + ) +); + +$wp_customize->add_setting( 'onepress_disable_archive_prefix', + array( + 'sanitize_callback' => 'onepress_sanitize_checkbox', + 'default' => '', + ) +); +$wp_customize->add_control( 'onepress_disable_archive_prefix', + array( + 'type' => 'checkbox', + 'label' => esc_html__( 'Disable disable archive prefix', 'onepress' ), + 'section' => 'onepress_blog_posts', + 'description' => esc_html__( 'Check this to disable archive prefix on category, date, tag page.', 'onepress' ) + ) +); \ No newline at end of file diff --git a/inc/customize-configs/options-colors.php b/inc/customize-configs/options-colors.php new file mode 100644 index 00000000..0d883dc2 --- /dev/null +++ b/inc/customize-configs/options-colors.php @@ -0,0 +1,25 @@ +add_section( 'onepress_colors_settings', + array( + 'priority' => 4, + 'title' => esc_html__( 'Site Colors', 'onepress' ), + 'description' => '', + 'panel' => 'onepress_options', + ) +); +// Primary Color +$wp_customize->add_setting( 'onepress_primary_color', array( + 'sanitize_callback' => 'sanitize_hex_color_no_hash', + 'sanitize_js_callback' => 'maybe_hash_hex_color', + 'default' => '#03c4eb' +) ); +$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'onepress_primary_color', + array( + 'label' => esc_html__( 'Primary Color', 'onepress' ), + 'section' => 'onepress_colors_settings', + 'description' => '', + 'priority' => 1 + ) +) ); diff --git a/inc/customize-configs/options-footer.php b/inc/customize-configs/options-footer.php new file mode 100644 index 00000000..068c4eae --- /dev/null +++ b/inc/customize-configs/options-footer.php @@ -0,0 +1,390 @@ +add_section( 'onepres_footer_top', + array( + 'title' => esc_html__( 'Footer Socials', 'onepress' ), + 'description' => '', + 'panel' => 'onepress_options', + ) +); + +// Disable Social +$wp_customize->add_setting( 'onepress_social_disable', + array( + 'sanitize_callback' => 'onepress_sanitize_checkbox', + 'default' => '1', + 'transport' => 'postMessage', + ) +); +$wp_customize->add_control( 'onepress_social_disable', + array( + 'type' => 'checkbox', + 'label' => esc_html__( 'Hide Footer Social?', 'onepress' ), + 'section' => 'onepres_footer_top', + 'description' => esc_html__( 'Check this box to hide footer social section.', 'onepress' ) + ) +); + +$wp_customize->add_setting( 'onepress_social_footer_guide', + array( + 'sanitize_callback' => 'onepress_sanitize_text' + ) +); +$wp_customize->add_control( new OnePress_Misc_Control( $wp_customize, 'onepress_social_footer_guide', + array( + 'section' => 'onepres_footer_top', + 'type' => 'custom_message', + 'description' => esc_html__( 'The social profiles specified below will be displayed in the footer of your site.', 'onepress' ) + ) +) ); + +// Footer Social Title +$wp_customize->add_setting( 'onepress_social_footer_title', + array( + 'sanitize_callback' => 'sanitize_text_field', + 'default' => esc_html__( 'Keep Updated', 'onepress' ), + 'transport' => 'postMessage', + ) +); +$wp_customize->add_control( 'onepress_social_footer_title', + array( + 'label' => esc_html__( 'Social Footer Title', 'onepress' ), + 'section' => 'onepres_footer_top', + 'description' => '' + ) +); + +// Socials +$wp_customize->add_setting( + 'onepress_social_profiles', + array( + //'default' => '', + 'sanitize_callback' => 'onepress_sanitize_repeatable_data_field', + 'transport' => 'postMessage', // refresh or postMessage + ) ); + +$wp_customize->add_control( + new Onepress_Customize_Repeatable_Control( + $wp_customize, + 'onepress_social_profiles', + array( + 'label' => esc_html__( 'Socials', 'onepress' ), + 'description' => '', + 'section' => 'onepres_footer_top', + 'live_title_id' => 'network', // apply for unput text and textarea only + 'title_format' => esc_html__( '[live_title]', 'onepress' ), // [live_title] + 'max_item' => 5, // Maximum item can add + 'limited_msg' => wp_kses_post( __( 'Upgrade to OnePress Plus to be able to add more items and unlock other premium features!', 'onepress' ) ), + 'fields' => array( + 'network' => array( + 'title' => esc_html__( 'Social network', 'onepress' ), + 'type' => 'text', + ), + 'icon' => array( + 'title' => esc_html__( 'Icon', 'onepress' ), + 'type' => 'icon', + ), + 'link' => array( + 'title' => esc_html__( 'URL', 'onepress' ), + 'type' => 'text', + ), + ), + + ) + ) +); + + +/* Newsletter Settings +----------------------------------------------------------------------*/ + +// Disable Newsletter +$wp_customize->add_setting( 'onepress_newsletter_disable', + array( + 'sanitize_callback' => 'onepress_sanitize_checkbox', + 'default' => '1', + 'transport' => 'postMessage', + ) +); +$wp_customize->add_control( 'onepress_newsletter_disable', + array( + 'type' => 'checkbox', + 'label' => esc_html__( 'Hide Footer Newsletter?', 'onepress' ), + 'section' => 'onepres_footer_top', + 'description' => esc_html__( 'Check this box to hide footer newsletter form.', 'onepress' ) + ) +); + +// Mailchimp Form Title +$wp_customize->add_setting( 'onepress_newsletter_title', + array( + 'sanitize_callback' => 'sanitize_text_field', + 'default' => esc_html__( 'Join our Newsletter', 'onepress' ), + 'transport' => 'postMessage', // refresh or postMessage + ) +); +$wp_customize->add_control( 'onepress_newsletter_title', + array( + 'label' => esc_html__( 'Newsletter Form Title', 'onepress' ), + 'section' => 'onepres_footer_top', + 'description' => '' + ) +); + +// Mailchimp action url +$wp_customize->add_setting( 'onepress_newsletter_mailchimp', + array( + 'sanitize_callback' => 'esc_url', + 'default' => '', + 'transport' => 'postMessage', // refresh or postMessage + ) +); +$wp_customize->add_control( 'onepress_newsletter_mailchimp', + array( + 'label' => esc_html__( 'MailChimp Action URL', 'onepress' ), + 'section' => 'onepres_footer_top', + 'description' => __( 'The newsletter form use MailChimp, please follow this guide to know how to get MailChimp Action URL. Example //famethemes.us8.list-manage.com/subscribe/post?u=521c400d049a59a4b9c0550c2&id=83187e0006', 'onepress' ) + ) +); + +// Footer BG Color +$wp_customize->add_setting( 'onepress_footer_bg', array( + 'sanitize_callback' => 'sanitize_hex_color_no_hash', + 'sanitize_js_callback' => 'maybe_hash_hex_color', + 'default' => '', + 'transport' => 'postMessage' +) ); +$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'onepress_footer_bg', + array( + 'label' => esc_html__( 'Background', 'onepress' ), + 'section' => 'onepres_footer_top', + 'description' => '', + ) +) ); + + +$wp_customize->add_setting( 'onepress_footer_top_color', array( + 'sanitize_callback' => 'sanitize_hex_color', + 'default' => '', + 'transport' => 'postMessage' +) ); +$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'onepress_footer_top_color', + array( + 'label' => esc_html__( 'Text Color', 'onepress' ), + 'section' => 'onepres_footer_top', + 'description' => '', + ) +) ); + + +/* Footer Widgets Settings +----------------------------------------------------------------------*/ +$wp_customize->add_section( 'onepress_footer', + array( + 'priority' => null, + 'title' => esc_html__( 'Footer Widgets', 'onepress' ), + 'description' => '', + 'panel' => 'onepress_options', + ) +); + +$wp_customize->add_setting( 'footer_layout', + array( + 'sanitize_callback' => 'sanitize_text_field', + 'default' => '', + 'transport' => 'postMessage', + ) +); + +$wp_customize->add_control( 'footer_layout', + array( + 'type' => 'select', + 'label' => esc_html__( 'Layout', 'onepress' ), + 'section' => 'onepress_footer', + 'default' => '0', + 'description' => esc_html__( 'Number footer columns to display.', 'onepress' ), + 'choices' => array( + '4' => 4, + '3' => 3, + '2' => 2, + '1' => 1, + '0' => esc_html__( 'Disable footer widgets', 'onepress' ), + ) + ) +); + +for ( $i = 1; $i <= 4; $i ++ ) { + $df = 12; + if ( $i > 1 ) { + $_n = 12 / $i; + $df = array(); + for ( $j = 0; $j < $i; $j ++ ) { + $df[ $j ] = $_n; + } + $df = join( '+', $df ); + } + $wp_customize->add_setting( 'footer_custom_' . $i . '_columns', + array( + 'sanitize_callback' => 'sanitize_text_field', + 'default' => $df, + 'transport' => 'postMessage', + ) + ); + $wp_customize->add_control( 'footer_custom_' . $i . '_columns', + array( + 'label' => $i == 1 ? __( 'Custom footer 1 column width', 'onepress' ) : sprintf( __( 'Custom footer %s columns width', 'onepress' ), $i ), + 'section' => 'onepress_footer', + 'description' => esc_html__( 'Enter int numbers and sum of them must smaller or equal 12, separated by "+"', 'onepress' ), + ) + ); +} + +// onepress_sanitize_color_alpha +$wp_customize->add_setting( 'footer_widgets_color', + array( + 'sanitize_callback' => 'sanitize_hex_color', + 'default' => '', + ) +); +$wp_customize->add_control( new WP_Customize_Color_Control( + $wp_customize, + 'footer_widgets_color', + array( + 'label' => esc_html__( 'Text Color', 'onepress' ), + 'section' => 'onepress_footer', + ) + ) +); + +$wp_customize->add_setting( 'footer_widgets_bg_color', + array( + 'sanitize_callback' => 'sanitize_hex_color', + 'default' => '', + ) +); +$wp_customize->add_control( new WP_Customize_Color_Control( + $wp_customize, + 'footer_widgets_bg_color', + array( + 'label' => esc_html__( 'Background Color', 'onepress' ), + 'section' => 'onepress_footer', + ) + ) +); + +// Footer Heading color +$wp_customize->add_setting( 'footer_widgets_title_color', + array( + 'sanitize_callback' => 'sanitize_hex_color', + 'default' => '', + ) +); +$wp_customize->add_control( new WP_Customize_Color_Control( + $wp_customize, + 'footer_widgets_title_color', + array( + 'label' => esc_html__( 'Widget Title Color', 'onepress' ), + 'section' => 'onepress_footer', + ) + ) +); + + +$wp_customize->add_setting( 'footer_widgets_link_color', + array( + 'sanitize_callback' => 'sanitize_hex_color', + 'default' => '', + ) +); +$wp_customize->add_control( new WP_Customize_Color_Control( + $wp_customize, + 'footer_widgets_link_color', + array( + 'label' => esc_html__( 'Link Color', 'onepress' ), + 'section' => 'onepress_footer', + ) + ) +); + +$wp_customize->add_setting( 'footer_widgets_link_hover_color', + array( + 'sanitize_callback' => 'sanitize_hex_color', + 'default' => '', + ) +); +$wp_customize->add_control( new WP_Customize_Color_Control( + $wp_customize, + 'footer_widgets_link_hover_color', + array( + 'label' => esc_html__( 'Link Hover Color', 'onepress' ), + 'section' => 'onepress_footer', + ) + ) +); + + +/* Footer Copyright Settings +----------------------------------------------------------------------*/ +$wp_customize->add_section( 'onepress_footer_copyright', + array( + 'priority' => null, + 'title' => esc_html__( 'Footer Copyright', 'onepress' ), + 'description' => '', + 'panel' => 'onepress_options', + ) +); + +// Footer Widgets Color +$wp_customize->add_setting( 'onepress_footer_info_bg', array( + 'sanitize_callback' => 'sanitize_hex_color', + 'sanitize_js_callback' => 'maybe_hash_hex_color', + 'default' => '', +) ); +$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'onepress_footer_info_bg', + array( + 'label' => esc_html__( 'Background', 'onepress' ), + 'section' => 'onepress_footer_copyright', + 'description' => '', + ) +) ); + +// Footer Widgets Color +$wp_customize->add_setting( 'onepress_footer_c_color', array( + 'sanitize_callback' => 'sanitize_hex_color', + 'sanitize_js_callback' => 'maybe_hash_hex_color', + 'default' => '', +) ); +$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'onepress_footer_c_color', + array( + 'label' => esc_html__( 'Text Color', 'onepress' ), + 'section' => 'onepress_footer_copyright', + 'description' => '', + ) +) ); + +$wp_customize->add_setting( 'onepress_footer_c_link_color', array( + 'sanitize_callback' => 'sanitize_hex_color', + 'sanitize_js_callback' => 'maybe_hash_hex_color', + 'default' => '', +) ); +$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'onepress_footer_c_link_color', + array( + 'label' => esc_html__( 'Link Color', 'onepress' ), + 'section' => 'onepress_footer_copyright', + 'description' => '', + ) +) ); + +$wp_customize->add_setting( 'onepress_footer_c_link_hover_color', array( + 'sanitize_callback' => 'sanitize_hex_color', + 'sanitize_js_callback' => 'maybe_hash_hex_color', + 'default' => '', +) ); +$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'onepress_footer_c_link_hover_color', + array( + 'label' => esc_html__( 'Link Hover Color', 'onepress' ), + 'section' => 'onepress_footer_copyright', + 'description' => '', + ) +) ); \ No newline at end of file diff --git a/inc/customize-configs/options-global.php b/inc/customize-configs/options-global.php new file mode 100644 index 00000000..50b623cb --- /dev/null +++ b/inc/customize-configs/options-global.php @@ -0,0 +1,85 @@ +add_section( 'onepress_global_settings', + array( + 'priority' => 3, + 'title' => esc_html__( 'Global', 'onepress' ), + 'description' => '', + 'panel' => 'onepress_options', + ) +); + +// Sidebar settings +$wp_customize->add_setting( 'onepress_layout', + array( + 'sanitize_callback' => 'sanitize_text_field', + 'default' => 'right-sidebar', + //'transport' => 'postMessage' + ) +); + +$wp_customize->add_control( 'onepress_layout', + array( + 'type' => 'select', + 'label' => esc_html__( 'Site Layout', 'onepress' ), + 'description' => esc_html__( 'Site Layout, apply for all pages, exclude home page and custom page templates.', 'onepress' ), + 'section' => 'onepress_global_settings', + 'choices' => array( + 'right-sidebar' => esc_html__( 'Right sidebar', 'onepress' ), + 'left-sidebar' => esc_html__( 'Left sidebar', 'onepress' ), + 'no-sidebar' => esc_html__( 'No sidebar', 'onepress' ), + ) + ) +); + + +// Disable Animation +$wp_customize->add_setting( 'onepress_animation_disable', + array( + 'sanitize_callback' => 'onepress_sanitize_checkbox', + 'default' => '', + ) +); +$wp_customize->add_control( 'onepress_animation_disable', + array( + 'type' => 'checkbox', + 'label' => esc_html__( 'Disable animation effect?', 'onepress' ), + 'section' => 'onepress_global_settings', + 'description' => esc_html__( 'Check this box to disable all element animation when scroll.', 'onepress' ) + ) +); + +// Disable Animation +$wp_customize->add_setting( 'onepress_btt_disable', + array( + 'sanitize_callback' => 'onepress_sanitize_checkbox', + 'default' => '', + 'transport' => 'postMessage' + ) +); +$wp_customize->add_control( 'onepress_btt_disable', + array( + 'type' => 'checkbox', + 'label' => esc_html__( 'Hide footer back to top?', 'onepress' ), + 'section' => 'onepress_global_settings', + 'description' => esc_html__( 'Check this box to hide footer back to top button.', 'onepress' ) + ) +); + +// Disable Google Font +$wp_customize->add_setting( 'onepress_disable_g_font', + array( + 'sanitize_callback' => 'onepress_sanitize_checkbox', + 'default' => '', + 'transport' => 'postMessage' + ) +); +$wp_customize->add_control( 'onepress_disable_g_font', + array( + 'type' => 'checkbox', + 'label' => esc_html__( 'Disable Google Fonts', 'onepress' ), + 'section' => 'onepress_global_settings', + 'description' => esc_html__( 'Check this if you want to disable default google fonts in theme.', 'onepress' ) + ) +); \ No newline at end of file diff --git a/inc/customize-configs/options-header.php b/inc/customize-configs/options-header.php new file mode 100644 index 00000000..64b9aadc --- /dev/null +++ b/inc/customize-configs/options-header.php @@ -0,0 +1,317 @@ +add_section( 'onepress_header_settings', + array( + 'priority' => 5, + 'title' => esc_html__( 'Header', 'onepress' ), + 'description' => '', + 'panel' => 'onepress_options', + ) +); + +// Header width +$wp_customize->add_setting( 'onepress_header_width', + array( + 'sanitize_callback' => 'sanitize_text_field', + 'default' => 'contained', + 'transport' => 'postMessage', + ) +); + +$wp_customize->add_control( 'onepress_header_width', + array( + 'type' => 'select', + 'label' => esc_html__( 'Header Width', 'onepress' ), + 'section' => 'onepress_header_settings', + 'choices' => array( + 'full-width' => esc_html__( 'Full Width', 'onepress' ), + 'contained' => esc_html__( 'Contained', 'onepress' ) + ) + ) +); + +// Header Layout +$wp_customize->add_setting( 'onepress_header_position', + array( + 'sanitize_callback' => 'sanitize_text_field', + 'default' => 'top', + 'transport' => 'postMessage', + 'active_callback' => 'onepress_showon_frontpage' + ) +); + +$wp_customize->add_control( 'onepress_header_position', + array( + 'type' => 'select', + 'label' => esc_html__( 'Header Position', 'onepress' ), + 'section' => 'onepress_header_settings', + 'choices' => array( + 'top' => esc_html__( 'Top', 'onepress' ), + 'below_hero' => esc_html__( 'Below Hero Slider', 'onepress' ) + ) + ) +); + +// Disable Sticky Header +$wp_customize->add_setting( 'onepress_sticky_header_disable', + array( + 'sanitize_callback' => 'onepress_sanitize_checkbox', + 'default' => '', + 'transport' => 'postMessage', + ) +); +$wp_customize->add_control( 'onepress_sticky_header_disable', + array( + 'type' => 'checkbox', + 'label' => esc_html__( 'Disable Sticky Header?', 'onepress' ), + 'section' => 'onepress_header_settings', + 'description' => esc_html__( 'Check this box to disable sticky header when scroll.', 'onepress' ) + ) +); + + +// Vertical align menu +$wp_customize->add_setting( 'onepress_vertical_align_menu', + array( + 'sanitize_callback' => 'onepress_sanitize_checkbox', + 'default' => '', + ) +); +$wp_customize->add_control( 'onepress_vertical_align_menu', + array( + 'type' => 'checkbox', + 'label' => esc_html__( 'Center vertical align for menu', 'onepress' ), + 'section' => 'onepress_header_settings', + 'description' => esc_html__( 'If you use logo and your logo is too tall, check this box to auto vertical align menu.', 'onepress' ) + ) +); + +// Scroll to top when click to logo +$wp_customize->add_setting( 'onepress_header_scroll_logo', + array( + 'sanitize_callback' => 'onepress_sanitize_checkbox', + 'default' => 0, + 'active_callback' => '' + ) +); +$wp_customize->add_control( 'onepress_header_scroll_logo', + array( + 'type' => 'checkbox', + 'label' => esc_html__( 'Scroll to top when click to the site logo or site title, only apply on front page.', 'onepress' ), + 'section' => 'onepress_header_settings', + ) +); + +// Header BG Color +$wp_customize->add_setting( 'onepress_header_bg_color', + array( + 'sanitize_callback' => 'sanitize_hex_color_no_hash', + 'sanitize_js_callback' => 'maybe_hash_hex_color', + 'default' => '' + ) ); +$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'onepress_header_bg_color', + array( + 'label' => esc_html__( 'Background Color', 'onepress' ), + 'section' => 'onepress_header_settings', + 'description' => '', + ) +) ); + + +// Site Title Color +$wp_customize->add_setting( 'onepress_logo_text_color', + array( + 'sanitize_callback' => 'sanitize_hex_color_no_hash', + 'sanitize_js_callback' => 'maybe_hash_hex_color', + 'default' => '' + ) ); +$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'onepress_logo_text_color', + array( + 'label' => esc_html__( 'Site Title Color', 'onepress' ), + 'section' => 'onepress_header_settings', + 'description' => esc_html__( 'Only set if you don\'t use an image logo.', 'onepress' ), + ) +) ); + +$wp_customize->add_setting( 'onepress_tagline_text_color', + array( + 'sanitize_callback' => 'sanitize_hex_color_no_hash', + 'sanitize_js_callback' => 'maybe_hash_hex_color', + 'default' => '' + ) ); +$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'onepress_tagline_text_color', + array( + 'label' => esc_html__( 'Site Tagline Color', 'onepress' ), + 'section' => 'onepress_header_settings', + 'description' => esc_html__( 'Only set if display site tagline.', 'onepress' ), + ) +) ); + +// Header Menu Color +$wp_customize->add_setting( 'onepress_menu_color', + array( + 'sanitize_callback' => 'sanitize_hex_color_no_hash', + 'sanitize_js_callback' => 'maybe_hash_hex_color', + 'default' => '' + ) ); +$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'onepress_menu_color', + array( + 'label' => esc_html__( 'Menu Link Color', 'onepress' ), + 'section' => 'onepress_header_settings', + 'description' => '', + ) +) ); + +// Header Menu Hover Color +$wp_customize->add_setting( 'onepress_menu_hover_color', + array( + 'sanitize_callback' => 'sanitize_hex_color_no_hash', + 'sanitize_js_callback' => 'maybe_hash_hex_color', + 'default' => '' + ) ); +$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'onepress_menu_hover_color', + array( + 'label' => esc_html__( 'Menu Link Hover/Active Color', 'onepress' ), + 'section' => 'onepress_header_settings', + 'description' => '', + + ) +) ); + +// Header Menu Hover BG Color +$wp_customize->add_setting( 'onepress_menu_hover_bg_color', + array( + 'sanitize_callback' => 'sanitize_hex_color_no_hash', + 'sanitize_js_callback' => 'maybe_hash_hex_color', + 'default' => '' + ) ); +$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'onepress_menu_hover_bg_color', + array( + 'label' => esc_html__( 'Menu Link Hover/Active BG Color', 'onepress' ), + 'section' => 'onepress_header_settings', + 'description' => '', + ) +) ); + +// Responsive Mobile button color +$wp_customize->add_setting( 'onepress_menu_toggle_button_color', + array( + 'sanitize_callback' => 'sanitize_hex_color_no_hash', + 'sanitize_js_callback' => 'maybe_hash_hex_color', + 'default' => '' + ) ); +$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'onepress_menu_toggle_button_color', + array( + 'label' => esc_html__( 'Responsive Menu Button Color', 'onepress' ), + 'section' => 'onepress_header_settings', + 'description' => '', + ) +) ); + + +// Header Transparent +$wp_customize->add_setting( 'onepress_header_transparent', + array( + 'sanitize_callback' => 'onepress_sanitize_checkbox', + 'default' => '', + 'active_callback' => 'onepress_showon_frontpage', + 'transport' => 'postMessage', + ) +); +$wp_customize->add_control( 'onepress_header_transparent', + array( + 'type' => 'checkbox', + 'label' => esc_html__( 'Header Transparent', 'onepress' ), + 'section' => 'onepress_header_settings', + 'description' => esc_html__( 'Apply for front page template only.', 'onepress' ) + ) +); + +// Transparent Logo +$wp_customize->add_setting( 'onepress_transparent_logo', + array( + 'sanitize_callback' => 'sanitize_text_field', + 'default' => '', + 'transport' => 'postMessage' + ) +); +$wp_customize->add_control( + new WP_Customize_Image_Control( + $wp_customize, + 'onepress_transparent_logo', + array( + 'label' => esc_html__( 'Transparent Logo', 'onepress' ), + 'section' => 'onepress_header_settings', + 'description' => esc_html__( 'Only apply when transparent header option is checked.', 'onepress' ) + ) + ) +); + +// Transparent Retina Logo +$wp_customize->add_setting( 'onepress_transparent_retina_logo', + array( + 'sanitize_callback' => 'sanitize_text_field', + 'default' => '', + 'transport' => 'postMessage' + ) +); +$wp_customize->add_control( + new WP_Customize_Image_Control( + $wp_customize, + 'onepress_transparent_retina_logo', + array( + 'label' => esc_html__( 'Transparent Retina Logo', 'onepress' ), + 'description' => esc_html__( 'Only apply when transparent header option is checked.', 'onepress' ), + 'section' => 'onepress_header_settings', + ) + ) +); + +/** + * @since 2.0.8 + */ +$wp_customize->add_setting( 'onepress_transparent_logo_height', + array( + 'sanitize_callback' => 'sanitize_text_field', + 'default' => '' + ) +); +$wp_customize->add_control( 'onepress_transparent_logo_height', + array( + 'label' => esc_html__( 'Transparent Logo Height in Pixel', 'onepress' ), + 'section' => 'onepress_header_settings', + 'description' => '', + ) +); + +$wp_customize->add_setting( 'onepress_transparent_site_title_c', + array( + 'sanitize_callback' => 'sanitize_hex_color', + 'default' => '' + ) ); +$wp_customize->add_control( new WP_Customize_Color_Control( + $wp_customize, + 'onepress_transparent_site_title_c', + array( + 'label' => esc_html__( 'Transparent Site Title Color', 'onepress' ), + 'section' => 'onepress_header_settings', + 'description' => '', + ) +) ); + +$wp_customize->add_setting( 'onepress_transparent_tag_title_c', + array( + 'sanitize_callback' => 'sanitize_hex_color', + 'default' => '' + ) +); +$wp_customize->add_control( new WP_Customize_Color_Control( + $wp_customize, + 'onepress_transparent_tag_title_c', + array( + 'label' => esc_html__( 'Transparent Site Tagline Color', 'onepress' ), + 'section' => 'onepress_header_settings', + 'description' => '', + ) +) ); diff --git a/inc/customize-configs/options-navigation.php b/inc/customize-configs/options-navigation.php new file mode 100644 index 00000000..d8d0f98f --- /dev/null +++ b/inc/customize-configs/options-navigation.php @@ -0,0 +1,25 @@ +add_section( 'onepress_nav', + array( + 'priority' => null, + 'title' => esc_html__( 'Navigation', 'onepress' ), + 'description' => '', + 'panel' => 'onepress_options', + ) +); +$wp_customize->add_setting( 'onepress_menu_item_padding', + array( + 'sanitize_callback' => 'sanitize_text_field', + 'default' => '', + 'transport' => 'postMessage' + ) +); +$wp_customize->add_control( 'onepress_menu_item_padding', + array( + 'label' => esc_html__( 'Menu Item Padding', 'onepress' ), + 'description' => esc_html__( 'Padding left and right for Navigation items (pixels).', 'onepress' ), + 'section' => 'onepress_nav', + ) +); \ No newline at end of file diff --git a/inc/customize-configs/options-page.php b/inc/customize-configs/options-page.php new file mode 100644 index 00000000..add53f6e --- /dev/null +++ b/inc/customize-configs/options-page.php @@ -0,0 +1,113 @@ +add_section( 'onepress_page', + array( + 'priority' => null, + 'title' => esc_html__( 'Page Title Area', 'onepress' ), + 'description' => '', + 'panel' => 'onepress_options', + ) +); + +// Disable the page title bar +$wp_customize->add_setting( 'onepress_page_title_bar_disable', + array( + 'sanitize_callback' => 'onepress_sanitize_checkbox', + 'default' => '', + ) +); +$wp_customize->add_control( 'onepress_page_title_bar_disable', + array( + 'type' => 'checkbox', + 'label' => esc_html__( 'Disable Page Title bar?', 'onepress' ), + 'section' => 'onepress_page', + 'description' => esc_html__( 'Check this box to disable the page title bar on all pages.', 'onepress' ) + ) +); + +$wp_customize->add_setting( 'onepress_page_cover_pd_top', + array( + 'sanitize_callback' => 'sanitize_text_field', + 'default' => '', + 'transport' => 'postMessage' + ) +); +$wp_customize->add_control( 'onepress_page_cover_pd_top', + array( + 'label' => esc_html__( 'Padding Top', 'onepress' ), + 'description' => esc_html__( 'The page cover padding top in percent (%).', 'onepress' ), + 'section' => 'onepress_page', + ) +); + +$wp_customize->add_setting( 'onepress_page_cover_pd_bottom', + array( + 'sanitize_callback' => 'sanitize_text_field', + 'default' => '', + 'transport' => 'postMessage' + ) +); +$wp_customize->add_control( 'onepress_page_cover_pd_bottom', + array( + 'label' => esc_html__( 'Padding Bottom', 'onepress' ), + 'description' => esc_html__( 'The page cover padding bottom in percent (%).', 'onepress' ), + 'section' => 'onepress_page', + ) +); + +$wp_customize->add_setting( 'onepress_page_cover_color', + array( + 'sanitize_callback' => 'sanitize_hex_color', + 'default' => null, + 'transport' => 'postMessage' + ) +); +$wp_customize->add_control( new WP_Customize_Color_Control( + $wp_customize, + 'onepress_page_cover_color', + array( + 'label' => esc_html__( 'Color', 'onepress' ), + 'section' => 'onepress_page', + ) + ) +); + +// Overlay color +$wp_customize->add_setting( 'onepress_page_cover_overlay', + array( + 'sanitize_callback' => 'onepress_sanitize_color_alpha', + //'default' => 'rgba(0,0,0,.3)', + 'transport' => 'postMessage' + ) +); +$wp_customize->add_control( new OnePress_Alpha_Color_Control( + $wp_customize, + 'onepress_page_cover_overlay', + array( + 'label' => esc_html__( 'Background Overlay Color', 'onepress' ), + 'section' => 'onepress_page', + ) + ) +); + +$wp_customize->add_setting( 'onepress_page_cover_align', + array( + 'sanitize_callback' => 'sanitize_text_field', + 'default' => 'center', + 'transport' => 'postMessage' + ) +); +$wp_customize->add_control( 'onepress_page_cover_align', + array( + 'label' => esc_html__( 'Content Align', 'onepress' ), + 'section' => 'onepress_page', + 'type' => 'select', + 'choices' => array( + 'center' => esc_html__( 'Center', 'onepress' ), + 'left' => esc_html__( 'Left', 'onepress' ), + 'right' => esc_html__( 'Right', 'onepress' ), + ), + ) +); diff --git a/inc/customize-configs/options-single.php b/inc/customize-configs/options-single.php new file mode 100644 index 00000000..32726b62 --- /dev/null +++ b/inc/customize-configs/options-single.php @@ -0,0 +1,42 @@ +add_section( 'onepress_single', + array( + 'priority' => null, + 'title' => esc_html__( 'Single Post', 'onepress' ), + 'description' => '', + 'panel' => 'onepress_options', + ) +); + +$wp_customize->add_setting( 'single_thumbnail', + array( + 'sanitize_callback' => 'onepress_sanitize_checkbox', + 'default' => '', + ) +); +$wp_customize->add_control( 'single_thumbnail', + array( + 'type' => 'checkbox', + 'label' => esc_html__( 'Show single post thumbnail', 'onepress' ), + 'section' => 'onepress_single', + 'description' => esc_html__( 'Check this box to show post thumbnail on single post.', 'onepress' ) + ) +); + +$wp_customize->add_setting( 'single_meta', + array( + 'sanitize_callback' => 'onepress_sanitize_checkbox', + 'default' => '1', + ) +); +$wp_customize->add_control( 'single_meta', + array( + 'type' => 'checkbox', + 'label' => esc_html__( 'Show single post meta', 'onepress' ), + 'section' => 'onepress_single', + 'description' => esc_html__( 'Check this box to show single post meta such as post date, author, category,...', 'onepress' ) + ) +); \ No newline at end of file diff --git a/inc/customize-configs/options.php b/inc/customize-configs/options.php new file mode 100644 index 00000000..8a5da876 --- /dev/null +++ b/inc/customize-configs/options.php @@ -0,0 +1,49 @@ +add_panel( 'onepress_options', + array( + 'priority' => 5, + 'capability' => 'edit_theme_options', + 'theme_supports' => '', + 'title' => esc_html__( 'Theme Options', 'onepress' ), + 'description' => '', + ) +); + + +if ( ! function_exists( 'wp_get_custom_css' ) ) { // Back-compat for WordPress < 4.7. + + /* Custom CSS Settings + ----------------------------------------------------------------------*/ + $wp_customize->add_section( + 'onepress_custom_code', + array( + 'title' => __( 'Custom CSS', 'onepress' ), + 'panel' => 'onepress_options', + ) + ); + + + $wp_customize->add_setting( + 'onepress_custom_css', + array( + 'default' => '', + 'sanitize_callback' => 'onepress_sanitize_css', + 'type' => 'option', + ) + ); + + $wp_customize->add_control( + 'onepress_custom_css', + array( + 'label' => __( 'Custom CSS', 'onepress' ), + 'section' => 'onepress_custom_code', + 'type' => 'textarea' + ) + ); +} else { + $wp_customize->get_section( 'custom_css' )->priority = 994; +} \ No newline at end of file diff --git a/inc/customize-configs/site-options.php b/inc/customize-configs/site-options.php deleted file mode 100644 index 168bc988..00000000 --- a/inc/customize-configs/site-options.php +++ /dev/null @@ -1,1080 +0,0 @@ -add_panel( 'onepress_options', - array( - 'priority' => 5, - 'capability' => 'edit_theme_options', - 'theme_supports' => '', - 'title' => esc_html__( 'Theme Options', 'onepress' ), - 'description' => '', - ) -); - -/* Global Settings -----------------------------------------------------------------------*/ -$wp_customize->add_section( 'onepress_global_settings', - array( - 'priority' => 3, - 'title' => esc_html__( 'Global', 'onepress' ), - 'description' => '', - 'panel' => 'onepress_options', - ) -); - -// Sidebar settings -$wp_customize->add_setting( 'onepress_layout', - array( - 'sanitize_callback' => 'sanitize_text_field', - 'default' => 'right-sidebar', - //'transport' => 'postMessage' - ) -); - -$wp_customize->add_control( 'onepress_layout', - array( - 'type' => 'select', - 'label' => esc_html__( 'Site Layout', 'onepress' ), - 'description' => esc_html__( 'Site Layout, apply for all pages, exclude home page and custom page templates.', 'onepress' ), - 'section' => 'onepress_global_settings', - 'choices' => array( - 'right-sidebar' => esc_html__( 'Right sidebar', 'onepress' ), - 'left-sidebar' => esc_html__( 'Left sidebar', 'onepress' ), - 'no-sidebar' => esc_html__( 'No sidebar', 'onepress' ), - ) - ) -); - - -// Disable Animation -$wp_customize->add_setting( 'onepress_animation_disable', - array( - 'sanitize_callback' => 'onepress_sanitize_checkbox', - 'default' => '', - ) -); -$wp_customize->add_control( 'onepress_animation_disable', - array( - 'type' => 'checkbox', - 'label' => esc_html__( 'Disable animation effect?', 'onepress' ), - 'section' => 'onepress_global_settings', - 'description' => esc_html__( 'Check this box to disable all element animation when scroll.', 'onepress' ) - ) -); - -// Disable Animation -$wp_customize->add_setting( 'onepress_btt_disable', - array( - 'sanitize_callback' => 'onepress_sanitize_checkbox', - 'default' => '', - 'transport' => 'postMessage' - ) -); -$wp_customize->add_control( 'onepress_btt_disable', - array( - 'type' => 'checkbox', - 'label' => esc_html__( 'Hide footer back to top?', 'onepress' ), - 'section' => 'onepress_global_settings', - 'description' => esc_html__( 'Check this box to hide footer back to top button.', 'onepress' ) - ) -); - -// Disable Google Font -$wp_customize->add_setting( 'onepress_disable_g_font', - array( - 'sanitize_callback' => 'onepress_sanitize_checkbox', - 'default' => '', - 'transport' => 'postMessage' - ) -); -$wp_customize->add_control( 'onepress_disable_g_font', - array( - 'type' => 'checkbox', - 'label' => esc_html__( 'Disable Google Fonts', 'onepress' ), - 'section' => 'onepress_global_settings', - 'description' => esc_html__( 'Check this if you want to disable default google fonts in theme.', 'onepress' ) - ) -); - - -/* Colors -----------------------------------------------------------------------*/ -$wp_customize->add_section( 'onepress_colors_settings', - array( - 'priority' => 4, - 'title' => esc_html__( 'Site Colors', 'onepress' ), - 'description' => '', - 'panel' => 'onepress_options', - ) -); -// Primary Color -$wp_customize->add_setting( 'onepress_primary_color', array( - 'sanitize_callback' => 'sanitize_hex_color_no_hash', - 'sanitize_js_callback' => 'maybe_hash_hex_color', - 'default' => '#03c4eb' -) ); -$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'onepress_primary_color', - array( - 'label' => esc_html__( 'Primary Color', 'onepress' ), - 'section' => 'onepress_colors_settings', - 'description' => '', - 'priority' => 1 - ) -) ); - - -/* Header -----------------------------------------------------------------------*/ -$wp_customize->add_section( 'onepress_header_settings', - array( - 'priority' => 5, - 'title' => esc_html__( 'Header', 'onepress' ), - 'description' => '', - 'panel' => 'onepress_options', - ) -); - -// Header width -$wp_customize->add_setting( 'onepress_header_width', - array( - 'sanitize_callback' => 'sanitize_text_field', - 'default' => 'contained', - 'transport' => 'postMessage', - ) -); - -$wp_customize->add_control( 'onepress_header_width', - array( - 'type' => 'select', - 'label' => esc_html__( 'Header Width', 'onepress' ), - 'section' => 'onepress_header_settings', - 'choices' => array( - 'full-width' => esc_html__( 'Full Width', 'onepress' ), - 'contained' => esc_html__( 'Contained', 'onepress' ) - ) - ) -); - -// Header Layout -$wp_customize->add_setting( 'onepress_header_position', - array( - 'sanitize_callback' => 'sanitize_text_field', - 'default' => 'top', - 'transport' => 'postMessage', - 'active_callback' => 'onepress_showon_frontpage' - ) -); - -$wp_customize->add_control( 'onepress_header_position', - array( - 'type' => 'select', - 'label' => esc_html__( 'Header Position', 'onepress' ), - 'section' => 'onepress_header_settings', - 'choices' => array( - 'top' => esc_html__( 'Top', 'onepress' ), - 'below_hero' => esc_html__( 'Below Hero Slider', 'onepress' ) - ) - ) -); - -// Disable Sticky Header -$wp_customize->add_setting( 'onepress_sticky_header_disable', - array( - 'sanitize_callback' => 'onepress_sanitize_checkbox', - 'default' => '', - 'transport' => 'postMessage', - ) -); -$wp_customize->add_control( 'onepress_sticky_header_disable', - array( - 'type' => 'checkbox', - 'label' => esc_html__( 'Disable Sticky Header?', 'onepress' ), - 'section' => 'onepress_header_settings', - 'description' => esc_html__( 'Check this box to disable sticky header when scroll.', 'onepress' ) - ) -); - - -// Vertical align menu -$wp_customize->add_setting( 'onepress_vertical_align_menu', - array( - 'sanitize_callback' => 'onepress_sanitize_checkbox', - 'default' => '', - ) -); -$wp_customize->add_control( 'onepress_vertical_align_menu', - array( - 'type' => 'checkbox', - 'label' => esc_html__( 'Center vertical align for menu', 'onepress' ), - 'section' => 'onepress_header_settings', - 'description' => esc_html__( 'If you use logo and your logo is too tall, check this box to auto vertical align menu.', 'onepress' ) - ) -); - -// Scroll to top when click to logo -$wp_customize->add_setting( 'onepress_header_scroll_logo', - array( - 'sanitize_callback' => 'onepress_sanitize_checkbox', - 'default' => 0, - 'active_callback' => '' - ) -); -$wp_customize->add_control( 'onepress_header_scroll_logo', - array( - 'type' => 'checkbox', - 'label' => esc_html__( 'Scroll to top when click to the site logo or site title, only apply on front page.', 'onepress' ), - 'section' => 'onepress_header_settings', - ) -); - -// Header BG Color -$wp_customize->add_setting( 'onepress_header_bg_color', - array( - 'sanitize_callback' => 'sanitize_hex_color_no_hash', - 'sanitize_js_callback' => 'maybe_hash_hex_color', - 'default' => '' - ) ); -$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'onepress_header_bg_color', - array( - 'label' => esc_html__( 'Background Color', 'onepress' ), - 'section' => 'onepress_header_settings', - 'description' => '', - ) -) ); - - -// Site Title Color -$wp_customize->add_setting( 'onepress_logo_text_color', - array( - 'sanitize_callback' => 'sanitize_hex_color_no_hash', - 'sanitize_js_callback' => 'maybe_hash_hex_color', - 'default' => '' - ) ); -$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'onepress_logo_text_color', - array( - 'label' => esc_html__( 'Site Title Color', 'onepress' ), - 'section' => 'onepress_header_settings', - 'description' => esc_html__( 'Only set if you don\'t use an image logo.', 'onepress' ), - ) -) ); - -$wp_customize->add_setting( 'onepress_tagline_text_color', - array( - 'sanitize_callback' => 'sanitize_hex_color_no_hash', - 'sanitize_js_callback' => 'maybe_hash_hex_color', - 'default' => '' - ) ); -$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'onepress_tagline_text_color', - array( - 'label' => esc_html__( 'Site Tagline Color', 'onepress' ), - 'section' => 'onepress_header_settings', - 'description' => esc_html__( 'Only set if display site tagline.', 'onepress' ), - ) -) ); - -// Header Menu Color -$wp_customize->add_setting( 'onepress_menu_color', - array( - 'sanitize_callback' => 'sanitize_hex_color_no_hash', - 'sanitize_js_callback' => 'maybe_hash_hex_color', - 'default' => '' - ) ); -$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'onepress_menu_color', - array( - 'label' => esc_html__( 'Menu Link Color', 'onepress' ), - 'section' => 'onepress_header_settings', - 'description' => '', - ) -) ); - -// Header Menu Hover Color -$wp_customize->add_setting( 'onepress_menu_hover_color', - array( - 'sanitize_callback' => 'sanitize_hex_color_no_hash', - 'sanitize_js_callback' => 'maybe_hash_hex_color', - 'default' => '' - ) ); -$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'onepress_menu_hover_color', - array( - 'label' => esc_html__( 'Menu Link Hover/Active Color', 'onepress' ), - 'section' => 'onepress_header_settings', - 'description' => '', - - ) -) ); - -// Header Menu Hover BG Color -$wp_customize->add_setting( 'onepress_menu_hover_bg_color', - array( - 'sanitize_callback' => 'sanitize_hex_color_no_hash', - 'sanitize_js_callback' => 'maybe_hash_hex_color', - 'default' => '' - ) ); -$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'onepress_menu_hover_bg_color', - array( - 'label' => esc_html__( 'Menu Link Hover/Active BG Color', 'onepress' ), - 'section' => 'onepress_header_settings', - 'description' => '', - ) -) ); - -// Responsive Mobile button color -$wp_customize->add_setting( 'onepress_menu_toggle_button_color', - array( - 'sanitize_callback' => 'sanitize_hex_color_no_hash', - 'sanitize_js_callback' => 'maybe_hash_hex_color', - 'default' => '' - ) ); -$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'onepress_menu_toggle_button_color', - array( - 'label' => esc_html__( 'Responsive Menu Button Color', 'onepress' ), - 'section' => 'onepress_header_settings', - 'description' => '', - ) -) ); - - -// Header Transparent -$wp_customize->add_setting( 'onepress_header_transparent', - array( - 'sanitize_callback' => 'onepress_sanitize_checkbox', - 'default' => '', - 'active_callback' => 'onepress_showon_frontpage', - 'transport' => 'postMessage', - ) -); -$wp_customize->add_control( 'onepress_header_transparent', - array( - 'type' => 'checkbox', - 'label' => esc_html__( 'Header Transparent', 'onepress' ), - 'section' => 'onepress_header_settings', - 'description' => esc_html__( 'Apply for front page template only.', 'onepress' ) - ) -); - -// Transparent Logo -$wp_customize->add_setting( 'onepress_transparent_logo', - array( - 'sanitize_callback' => 'sanitize_text_field', - 'default' => '', - 'transport' => 'postMessage' - ) -); -$wp_customize->add_control( - new WP_Customize_Image_Control( - $wp_customize, - 'onepress_transparent_logo', - array( - 'label' => esc_html__( 'Transparent Logo', 'onepress' ), - 'section' => 'onepress_header_settings', - 'description' => esc_html__( 'Only apply when transparent header option is checked.', 'onepress' ) - ) - ) -); - -// Transparent Retina Logo -$wp_customize->add_setting( 'onepress_transparent_retina_logo', - array( - 'sanitize_callback' => 'sanitize_text_field', - 'default' => '', - 'transport' => 'postMessage' - ) -); -$wp_customize->add_control( - new WP_Customize_Image_Control( - $wp_customize, - 'onepress_transparent_retina_logo', - array( - 'label' => esc_html__( 'Transparent Retina Logo', 'onepress' ), - 'description' => esc_html__( 'Only apply when transparent header option is checked.', 'onepress' ), - 'section' => 'onepress_header_settings', - ) - ) -); - -/** - * @since 2.0.8 - */ -$wp_customize->add_setting( 'onepress_transparent_logo_height', - array( - 'sanitize_callback' => 'sanitize_text_field', - 'default' => '' - ) -); -$wp_customize->add_control( 'onepress_transparent_logo_height', - array( - 'label' => esc_html__( 'Transparent Logo Height in Pixel', 'onepress' ), - 'section' => 'onepress_header_settings', - 'description' => '', - ) -); - -$wp_customize->add_setting( 'onepress_transparent_site_title_c', - array( - 'sanitize_callback' => 'sanitize_hex_color', - 'default' => '' - ) ); -$wp_customize->add_control( new WP_Customize_Color_Control( - $wp_customize, - 'onepress_transparent_site_title_c', - array( - 'label' => esc_html__( 'Transparent Site Title Color', 'onepress' ), - 'section' => 'onepress_header_settings', - 'description' => '', - ) -) ); - -$wp_customize->add_setting( 'onepress_transparent_tag_title_c', - array( - 'sanitize_callback' => 'sanitize_hex_color', - 'default' => '' - ) -); -$wp_customize->add_control( new WP_Customize_Color_Control( - $wp_customize, - 'onepress_transparent_tag_title_c', - array( - 'label' => esc_html__( 'Transparent Site Tagline Color', 'onepress' ), - 'section' => 'onepress_header_settings', - 'description' => '', - ) -) ); - - -/* Navigation Settings -----------------------------------------------------------------------*/ -$wp_customize->add_section( 'onepress_nav', - array( - 'priority' => null, - 'title' => esc_html__( 'Navigation', 'onepress' ), - 'description' => '', - 'panel' => 'onepress_options', - ) -); -$wp_customize->add_setting( 'onepress_menu_item_padding', - array( - 'sanitize_callback' => 'sanitize_text_field', - 'default' => '', - 'transport' => 'postMessage' - ) -); -$wp_customize->add_control( 'onepress_menu_item_padding', - array( - 'label' => esc_html__( 'Menu Item Padding', 'onepress' ), - 'description' => esc_html__( 'Padding left and right for Navigation items (pixels).', 'onepress' ), - 'section' => 'onepress_nav', - ) -); - -/* Page Settings -----------------------------------------------------------------------*/ -$wp_customize->add_section( 'onepress_page', - array( - 'priority' => null, - 'title' => esc_html__( 'Page Title Area', 'onepress' ), - 'description' => '', - 'panel' => 'onepress_options', - ) -); - -// Disable the page title bar -$wp_customize->add_setting( 'onepress_page_title_bar_disable', - array( - 'sanitize_callback' => 'onepress_sanitize_checkbox', - 'default' => '', - ) -); -$wp_customize->add_control( 'onepress_page_title_bar_disable', - array( - 'type' => 'checkbox', - 'label' => esc_html__( 'Disable Page Title bar?', 'onepress' ), - 'section' => 'onepress_page', - 'description' => esc_html__( 'Check this box to disable the page title bar on all pages.', 'onepress' ) - ) -); - -$wp_customize->add_setting( 'onepress_page_cover_pd_top', - array( - 'sanitize_callback' => 'sanitize_text_field', - 'default' => '', - 'transport' => 'postMessage' - ) -); -$wp_customize->add_control( 'onepress_page_cover_pd_top', - array( - 'label' => esc_html__( 'Padding Top', 'onepress' ), - 'description' => esc_html__( 'The page cover padding top in percent (%).', 'onepress' ), - 'section' => 'onepress_page', - ) -); - -$wp_customize->add_setting( 'onepress_page_cover_pd_bottom', - array( - 'sanitize_callback' => 'sanitize_text_field', - 'default' => '', - 'transport' => 'postMessage' - ) -); -$wp_customize->add_control( 'onepress_page_cover_pd_bottom', - array( - 'label' => esc_html__( 'Padding Bottom', 'onepress' ), - 'description' => esc_html__( 'The page cover padding bottom in percent (%).', 'onepress' ), - 'section' => 'onepress_page', - ) -); - -$wp_customize->add_setting( 'onepress_page_cover_color', - array( - 'sanitize_callback' => 'sanitize_hex_color', - 'default' => null, - 'transport' => 'postMessage' - ) -); -$wp_customize->add_control( new WP_Customize_Color_Control( - $wp_customize, - 'onepress_page_cover_color', - array( - 'label' => esc_html__( 'Color', 'onepress' ), - 'section' => 'onepress_page', - ) - ) -); - -// Overlay color -$wp_customize->add_setting( 'onepress_page_cover_overlay', - array( - 'sanitize_callback' => 'onepress_sanitize_color_alpha', - //'default' => 'rgba(0,0,0,.3)', - 'transport' => 'postMessage' - ) -); -$wp_customize->add_control( new OnePress_Alpha_Color_Control( - $wp_customize, - 'onepress_page_cover_overlay', - array( - 'label' => esc_html__( 'Background Overlay Color', 'onepress' ), - 'section' => 'onepress_page', - ) - ) -); - -$wp_customize->add_setting( 'onepress_page_cover_align', - array( - 'sanitize_callback' => 'sanitize_text_field', - 'default' => 'center', - 'transport' => 'postMessage' - ) -); -$wp_customize->add_control( 'onepress_page_cover_align', - array( - 'label' => esc_html__( 'Content Align', 'onepress' ), - 'section' => 'onepress_page', - 'type' => 'select', - 'choices' => array( - 'center' => esc_html__( 'Center', 'onepress' ), - 'left' => esc_html__( 'Left', 'onepress' ), - 'right' => esc_html__( 'Right', 'onepress' ), - ), - ) -); - - -/** - * Blog Post Settings - * @since 2.1.0 - * ---------------------------------------------------------------------- - */ -$wp_customize->add_section( 'onepress_blog_posts', - array( - 'priority' => null, - 'title' => esc_html__( 'Blog Posts', 'onepress' ), - 'description' => '', - 'panel' => 'onepress_options', - ) -); - -$wp_customize->add_setting( 'onepress_disable_archive_prefix', - array( - 'sanitize_callback' => 'onepress_sanitize_checkbox', - 'default' => '', - ) -); -$wp_customize->add_control( 'onepress_disable_archive_prefix', - array( - 'type' => 'checkbox', - 'label' => esc_html__( 'Disable disable archive prefix', 'onepress' ), - 'section' => 'onepress_blog_posts', - 'description' => esc_html__( 'Check this to disable archive prefix on category, date, tag page.', 'onepress' ) - ) -); - - - -/* Single Settings -----------------------------------------------------------------------*/ -$wp_customize->add_section( 'onepress_single', - array( - 'priority' => null, - 'title' => esc_html__( 'Single Post', 'onepress' ), - 'description' => '', - 'panel' => 'onepress_options', - ) -); - -$wp_customize->add_setting( 'single_thumbnail', - array( - 'sanitize_callback' => 'onepress_sanitize_checkbox', - 'default' => '', - ) -); -$wp_customize->add_control( 'single_thumbnail', - array( - 'type' => 'checkbox', - 'label' => esc_html__( 'Show single post thumbnail', 'onepress' ), - 'section' => 'onepress_single', - 'description' => esc_html__( 'Check this box to show post thumbnail on single post.', 'onepress' ) - ) -); - -$wp_customize->add_setting( 'single_meta', - array( - 'sanitize_callback' => 'onepress_sanitize_checkbox', - 'default' => '1', - ) -); -$wp_customize->add_control( 'single_meta', - array( - 'type' => 'checkbox', - 'label' => esc_html__( 'Show single post meta', 'onepress' ), - 'section' => 'onepress_single', - 'description' => esc_html__( 'Check this box to show single post meta such as post date, author, category,...', 'onepress' ) - ) -); - - -/* Footer top Social Settings -----------------------------------------------------------------------*/ -$wp_customize->add_section( 'onepres_footer_top', - array( - 'title' => esc_html__( 'Footer Socials', 'onepress' ), - 'description' => '', - 'panel' => 'onepress_options', - ) -); - -// Disable Social -$wp_customize->add_setting( 'onepress_social_disable', - array( - 'sanitize_callback' => 'onepress_sanitize_checkbox', - 'default' => '1', - 'transport' => 'postMessage', - ) -); -$wp_customize->add_control( 'onepress_social_disable', - array( - 'type' => 'checkbox', - 'label' => esc_html__( 'Hide Footer Social?', 'onepress' ), - 'section' => 'onepres_footer_top', - 'description' => esc_html__( 'Check this box to hide footer social section.', 'onepress' ) - ) -); - -$wp_customize->add_setting( 'onepress_social_footer_guide', - array( - 'sanitize_callback' => 'onepress_sanitize_text' - ) -); -$wp_customize->add_control( new OnePress_Misc_Control( $wp_customize, 'onepress_social_footer_guide', - array( - 'section' => 'onepres_footer_top', - 'type' => 'custom_message', - 'description' => esc_html__( 'The social profiles specified below will be displayed in the footer of your site.', 'onepress' ) - ) -) ); - -// Footer Social Title -$wp_customize->add_setting( 'onepress_social_footer_title', - array( - 'sanitize_callback' => 'sanitize_text_field', - 'default' => esc_html__( 'Keep Updated', 'onepress' ), - 'transport' => 'postMessage', - ) -); -$wp_customize->add_control( 'onepress_social_footer_title', - array( - 'label' => esc_html__( 'Social Footer Title', 'onepress' ), - 'section' => 'onepres_footer_top', - 'description' => '' - ) -); - -// Socials -$wp_customize->add_setting( - 'onepress_social_profiles', - array( - //'default' => '', - 'sanitize_callback' => 'onepress_sanitize_repeatable_data_field', - 'transport' => 'postMessage', // refresh or postMessage - ) ); - -$wp_customize->add_control( - new Onepress_Customize_Repeatable_Control( - $wp_customize, - 'onepress_social_profiles', - array( - 'label' => esc_html__( 'Socials', 'onepress' ), - 'description' => '', - 'section' => 'onepres_footer_top', - 'live_title_id' => 'network', // apply for unput text and textarea only - 'title_format' => esc_html__( '[live_title]', 'onepress' ), // [live_title] - 'max_item' => 5, // Maximum item can add - 'limited_msg' => wp_kses_post( __( 'Upgrade to OnePress Plus to be able to add more items and unlock other premium features!', 'onepress' ) ), - 'fields' => array( - 'network' => array( - 'title' => esc_html__( 'Social network', 'onepress' ), - 'type' => 'text', - ), - 'icon' => array( - 'title' => esc_html__( 'Icon', 'onepress' ), - 'type' => 'icon', - ), - 'link' => array( - 'title' => esc_html__( 'URL', 'onepress' ), - 'type' => 'text', - ), - ), - - ) - ) -); - - -/* Newsletter Settings -----------------------------------------------------------------------*/ - -// Disable Newsletter -$wp_customize->add_setting( 'onepress_newsletter_disable', - array( - 'sanitize_callback' => 'onepress_sanitize_checkbox', - 'default' => '1', - 'transport' => 'postMessage', - ) -); -$wp_customize->add_control( 'onepress_newsletter_disable', - array( - 'type' => 'checkbox', - 'label' => esc_html__( 'Hide Footer Newsletter?', 'onepress' ), - 'section' => 'onepres_footer_top', - 'description' => esc_html__( 'Check this box to hide footer newsletter form.', 'onepress' ) - ) -); - -// Mailchimp Form Title -$wp_customize->add_setting( 'onepress_newsletter_title', - array( - 'sanitize_callback' => 'sanitize_text_field', - 'default' => esc_html__( 'Join our Newsletter', 'onepress' ), - 'transport' => 'postMessage', // refresh or postMessage - ) -); -$wp_customize->add_control( 'onepress_newsletter_title', - array( - 'label' => esc_html__( 'Newsletter Form Title', 'onepress' ), - 'section' => 'onepres_footer_top', - 'description' => '' - ) -); - -// Mailchimp action url -$wp_customize->add_setting( 'onepress_newsletter_mailchimp', - array( - 'sanitize_callback' => 'esc_url', - 'default' => '', - 'transport' => 'postMessage', // refresh or postMessage - ) -); -$wp_customize->add_control( 'onepress_newsletter_mailchimp', - array( - 'label' => esc_html__( 'MailChimp Action URL', 'onepress' ), - 'section' => 'onepres_footer_top', - 'description' => __( 'The newsletter form use MailChimp, please follow this guide to know how to get MailChimp Action URL. Example //famethemes.us8.list-manage.com/subscribe/post?u=521c400d049a59a4b9c0550c2&id=83187e0006', 'onepress' ) - ) -); - -// Footer BG Color -$wp_customize->add_setting( 'onepress_footer_bg', array( - 'sanitize_callback' => 'sanitize_hex_color_no_hash', - 'sanitize_js_callback' => 'maybe_hash_hex_color', - 'default' => '', - 'transport' => 'postMessage' -) ); -$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'onepress_footer_bg', - array( - 'label' => esc_html__( 'Background', 'onepress' ), - 'section' => 'onepres_footer_top', - 'description' => '', - ) -) ); - - -$wp_customize->add_setting( 'onepress_footer_top_color', array( - 'sanitize_callback' => 'sanitize_hex_color', - 'default' => '', - 'transport' => 'postMessage' -) ); -$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'onepress_footer_top_color', - array( - 'label' => esc_html__( 'Text Color', 'onepress' ), - 'section' => 'onepres_footer_top', - 'description' => '', - ) -) ); - - -/* Footer Widgets Settings -----------------------------------------------------------------------*/ -$wp_customize->add_section( 'onepress_footer', - array( - 'priority' => null, - 'title' => esc_html__( 'Footer Widgets', 'onepress' ), - 'description' => '', - 'panel' => 'onepress_options', - ) -); - -$wp_customize->add_setting( 'footer_layout', - array( - 'sanitize_callback' => 'sanitize_text_field', - 'default' => '', - 'transport' => 'postMessage', - ) -); - -$wp_customize->add_control( 'footer_layout', - array( - 'type' => 'select', - 'label' => esc_html__( 'Layout', 'onepress' ), - 'section' => 'onepress_footer', - 'default' => '0', - 'description' => esc_html__( 'Number footer columns to display.', 'onepress' ), - 'choices' => array( - '4' => 4, - '3' => 3, - '2' => 2, - '1' => 1, - '0' => esc_html__( 'Disable footer widgets', 'onepress' ), - ) - ) -); - -for ( $i = 1; $i <= 4; $i ++ ) { - $df = 12; - if ( $i > 1 ) { - $_n = 12 / $i; - $df = array(); - for ( $j = 0; $j < $i; $j ++ ) { - $df[ $j ] = $_n; - } - $df = join( '+', $df ); - } - $wp_customize->add_setting( 'footer_custom_' . $i . '_columns', - array( - 'sanitize_callback' => 'sanitize_text_field', - 'default' => $df, - 'transport' => 'postMessage', - ) - ); - $wp_customize->add_control( 'footer_custom_' . $i . '_columns', - array( - 'label' => $i == 1 ? __( 'Custom footer 1 column width', 'onepress' ) : sprintf( __( 'Custom footer %s columns width', 'onepress' ), $i ), - 'section' => 'onepress_footer', - 'description' => esc_html__( 'Enter int numbers and sum of them must smaller or equal 12, separated by "+"', 'onepress' ), - ) - ); -} - -// onepress_sanitize_color_alpha -$wp_customize->add_setting( 'footer_widgets_color', - array( - 'sanitize_callback' => 'sanitize_hex_color', - 'default' => '', - ) -); -$wp_customize->add_control( new WP_Customize_Color_Control( - $wp_customize, - 'footer_widgets_color', - array( - 'label' => esc_html__( 'Text Color', 'onepress' ), - 'section' => 'onepress_footer', - ) - ) -); - -$wp_customize->add_setting( 'footer_widgets_bg_color', - array( - 'sanitize_callback' => 'sanitize_hex_color', - 'default' => '', - ) -); -$wp_customize->add_control( new WP_Customize_Color_Control( - $wp_customize, - 'footer_widgets_bg_color', - array( - 'label' => esc_html__( 'Background Color', 'onepress' ), - 'section' => 'onepress_footer', - ) - ) -); - -// Footer Heading color -$wp_customize->add_setting( 'footer_widgets_title_color', - array( - 'sanitize_callback' => 'sanitize_hex_color', - 'default' => '', - ) -); -$wp_customize->add_control( new WP_Customize_Color_Control( - $wp_customize, - 'footer_widgets_title_color', - array( - 'label' => esc_html__( 'Widget Title Color', 'onepress' ), - 'section' => 'onepress_footer', - ) - ) -); - - -$wp_customize->add_setting( 'footer_widgets_link_color', - array( - 'sanitize_callback' => 'sanitize_hex_color', - 'default' => '', - ) -); -$wp_customize->add_control( new WP_Customize_Color_Control( - $wp_customize, - 'footer_widgets_link_color', - array( - 'label' => esc_html__( 'Link Color', 'onepress' ), - 'section' => 'onepress_footer', - ) - ) -); - -$wp_customize->add_setting( 'footer_widgets_link_hover_color', - array( - 'sanitize_callback' => 'sanitize_hex_color', - 'default' => '', - ) -); -$wp_customize->add_control( new WP_Customize_Color_Control( - $wp_customize, - 'footer_widgets_link_hover_color', - array( - 'label' => esc_html__( 'Link Hover Color', 'onepress' ), - 'section' => 'onepress_footer', - ) - ) -); - - -/* Footer Copyright Settings -----------------------------------------------------------------------*/ -$wp_customize->add_section( 'onepress_footer_copyright', - array( - 'priority' => null, - 'title' => esc_html__( 'Footer Copyright', 'onepress' ), - 'description' => '', - 'panel' => 'onepress_options', - ) -); - -// Footer Widgets Color -$wp_customize->add_setting( 'onepress_footer_info_bg', array( - 'sanitize_callback' => 'sanitize_hex_color', - 'sanitize_js_callback' => 'maybe_hash_hex_color', - 'default' => '', -) ); -$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'onepress_footer_info_bg', - array( - 'label' => esc_html__( 'Background', 'onepress' ), - 'section' => 'onepress_footer_copyright', - 'description' => '', - ) -) ); - -// Footer Widgets Color -$wp_customize->add_setting( 'onepress_footer_c_color', array( - 'sanitize_callback' => 'sanitize_hex_color', - 'sanitize_js_callback' => 'maybe_hash_hex_color', - 'default' => '', -) ); -$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'onepress_footer_c_color', - array( - 'label' => esc_html__( 'Text Color', 'onepress' ), - 'section' => 'onepress_footer_copyright', - 'description' => '', - ) -) ); - -$wp_customize->add_setting( 'onepress_footer_c_link_color', array( - 'sanitize_callback' => 'sanitize_hex_color', - 'sanitize_js_callback' => 'maybe_hash_hex_color', - 'default' => '', -) ); -$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'onepress_footer_c_link_color', - array( - 'label' => esc_html__( 'Link Color', 'onepress' ), - 'section' => 'onepress_footer_copyright', - 'description' => '', - ) -) ); - -$wp_customize->add_setting( 'onepress_footer_c_link_hover_color', array( - 'sanitize_callback' => 'sanitize_hex_color', - 'sanitize_js_callback' => 'maybe_hash_hex_color', - 'default' => '', -) ); -$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'onepress_footer_c_link_hover_color', - array( - 'label' => esc_html__( 'Link Hover Color', 'onepress' ), - 'section' => 'onepress_footer_copyright', - 'description' => '', - ) -) ); - - -if ( ! function_exists( 'wp_get_custom_css' ) ) { // Back-compat for WordPress < 4.7. - - /* Custom CSS Settings - ----------------------------------------------------------------------*/ - $wp_customize->add_section( - 'onepress_custom_code', - array( - 'title' => __( 'Custom CSS', 'onepress' ), - 'panel' => 'onepress_options', - ) - ); - - - $wp_customize->add_setting( - 'onepress_custom_css', - array( - 'default' => '', - 'sanitize_callback' => 'onepress_sanitize_css', - 'type' => 'option', - ) - ); - - $wp_customize->add_control( - 'onepress_custom_css', - array( - 'label' => __( 'Custom CSS', 'onepress' ), - 'section' => 'onepress_custom_code', - 'type' => 'textarea' - ) - ); -} else { - $wp_customize->get_section( 'custom_css' )->priority = 994; -} \ No newline at end of file diff --git a/inc/customizer.php b/inc/customizer.php index a5c8adbf..f6f7a485 100644 --- a/inc/customizer.php +++ b/inc/customizer.php @@ -79,8 +79,18 @@ function onepress_customize_register( $wp_customize ) { */ // Site Identity. require_once $path. '/inc/customize-configs/site-identity.php'; + //Site Options - require_once $path. '/inc/customize-configs/site-options.php'; + require_once $path. '/inc/customize-configs/options.php'; + require_once $path. '/inc/customize-configs/options-global.php'; + require_once $path. '/inc/customize-configs/options-colors.php'; + require_once $path. '/inc/customize-configs/options-header.php'; + require_once $path. '/inc/customize-configs/options-navigation.php'; + require_once $path. '/inc/customize-configs/options-page.php'; + require_once $path. '/inc/customize-configs/options-blog-posts.php'; + require_once $path. '/inc/customize-configs/options-single.php'; + require_once $path. '/inc/customize-configs/options-footer.php'; + // Section Hero require_once $path. '/inc/customize-configs/section-hero.php'; // Section Hero diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 00000000..0b1c21c9 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,3665 @@ +{ + "name": "onepress", + "version": "2.0.9", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "dev": true + }, + "ajv": { + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", + "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", + "dev": true, + "optional": true, + "requires": { + "co": "^4.6.0", + "fast-deep-equal": "^1.0.0", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.3.0" + } + }, + "ansi-green": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ansi-green/-/ansi-green-0.1.1.tgz", + "integrity": "sha1-il2al55FjVfEDjNYCzc5C44Q0Pc=", + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "^1.9.0" + } + }, + "ansi-wrap": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/ansi-wrap/-/ansi-wrap-0.1.0.tgz", + "integrity": "sha1-qCJQ3bABXponyoLoLqYDu/pF768=" + }, + "aproba": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", + "dev": true + }, + "archiver": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/archiver/-/archiver-1.3.0.tgz", + "integrity": "sha1-TyGU1tj5nfP1MeaIHxTxXVX6ryI=", + "dev": true, + "requires": { + "archiver-utils": "^1.3.0", + "async": "^2.0.0", + "buffer-crc32": "^0.2.1", + "glob": "^7.0.0", + "lodash": "^4.8.0", + "readable-stream": "^2.0.0", + "tar-stream": "^1.5.0", + "walkdir": "^0.0.11", + "zip-stream": "^1.1.0" + }, + "dependencies": { + "async": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz", + "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", + "dev": true, + "requires": { + "lodash": "^4.17.10" + } + }, + "lodash": { + "version": "4.17.10", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", + "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==", + "dev": true + } + } + }, + "archiver-utils": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/archiver-utils/-/archiver-utils-1.3.0.tgz", + "integrity": "sha1-5QtMCccL89aA4y/xt5lOn52JUXQ=", + "dev": true, + "requires": { + "glob": "^7.0.0", + "graceful-fs": "^4.1.0", + "lazystream": "^1.0.0", + "lodash": "^4.8.0", + "normalize-path": "^2.0.0", + "readable-stream": "^2.0.0" + }, + "dependencies": { + "lodash": { + "version": "4.17.10", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", + "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==", + "dev": true + } + } + }, + "are-we-there-yet": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", + "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", + "dev": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "argparse": { + "version": "0.1.16", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-0.1.16.tgz", + "integrity": "sha1-z9AeD7uj1srtBJ+9dY1A9lGW9Xw=", + "dev": true, + "requires": { + "underscore": "~1.7.0", + "underscore.string": "~2.4.0" + }, + "dependencies": { + "underscore.string": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.4.0.tgz", + "integrity": "sha1-jN2PusTi0uoefi6Al8QvRCKA+Fs=", + "dev": true + } + } + }, + "arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=" + }, + "array-find-index": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", + "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", + "dev": true + }, + "asn1": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "dev": true, + "optional": true, + "requires": { + "safer-buffer": "~2.1.0" + } + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true + }, + "async": { + "version": "0.1.22", + "resolved": "https://registry.npmjs.org/async/-/async-0.1.22.tgz", + "integrity": "sha1-D8GqoIig4+8Ovi2IMbqw3PiEUGE=", + "dev": true + }, + "async-array-reduce": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/async-array-reduce/-/async-array-reduce-0.2.1.tgz", + "integrity": "sha1-yL4BCitc0A3qlsgRFgNGk9/dgtE=" + }, + "async-each": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz", + "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=" + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "dev": true, + "optional": true + }, + "autoprefixer": { + "version": "7.2.6", + "resolved": "http://registry.npmjs.org/autoprefixer/-/autoprefixer-7.2.6.tgz", + "integrity": "sha512-Iq8TRIB+/9eQ8rbGhcP7ct5cYb/3qjNYAR2SnzLCEcwF6rvVOax8+9+fccgXk4bEhQGjOZd5TLhsksmAdsbGqQ==", + "dev": true, + "requires": { + "browserslist": "^2.11.3", + "caniuse-lite": "^1.0.30000805", + "normalize-range": "^0.1.2", + "num2fraction": "^1.2.2", + "postcss": "^6.0.17", + "postcss-value-parser": "^3.2.3" + } + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "dev": true, + "optional": true + }, + "aws4": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", + "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==", + "dev": true, + "optional": true + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + }, + "base64-js": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz", + "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==", + "dev": true + }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "dev": true, + "optional": true, + "requires": { + "tweetnacl": "^0.14.3" + } + }, + "bl": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.2.tgz", + "integrity": "sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA==", + "dev": true, + "requires": { + "readable-stream": "^2.3.5", + "safe-buffer": "^5.1.1" + } + }, + "block-stream": { + "version": "0.0.9", + "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", + "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=", + "dev": true, + "optional": true, + "requires": { + "inherits": "~2.0.0" + } + }, + "bluebird": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.2.tgz", + "integrity": "sha512-dhHTWMI7kMx5whMQntl7Vr9C6BvV10lFXDAasnqnrMYhXVCzzk6IO9Fo2L75jXHT07WrOngL1WDXOp+yYS91Yg==" + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "browserslist": { + "version": "2.11.3", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-2.11.3.tgz", + "integrity": "sha512-yWu5cXT7Av6mVwzWc8lMsJMHWn4xyjSuGYi4IozbVTLUOEYPSagUB8kiMDUHA1fS3zjr8nkxkn9jdvug4BBRmA==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30000792", + "electron-to-chromium": "^1.3.30" + } + }, + "buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.2.1.tgz", + "integrity": "sha512-c+Ko0loDaFfuPWiL02ls9Xd3GO3cPVmUobQ6t3rXNUk304u6hGq+8N/kFi+QEIKhzK3uwolVhLzszmfLmMLnqg==", + "dev": true, + "requires": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4" + } + }, + "buffer-alloc": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz", + "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", + "dev": true, + "requires": { + "buffer-alloc-unsafe": "^1.1.0", + "buffer-fill": "^1.0.0" + } + }, + "buffer-alloc-unsafe": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", + "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==", + "dev": true + }, + "buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=", + "dev": true + }, + "buffer-fill": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", + "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=", + "dev": true + }, + "builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "dev": true + }, + "camelcase": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", + "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", + "dev": true + }, + "camelcase-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", + "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", + "dev": true, + "requires": { + "camelcase": "^2.0.0", + "map-obj": "^1.0.0" + } + }, + "caniuse-lite": { + "version": "1.0.30000885", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000885.tgz", + "integrity": "sha512-cXKbYwpxBLd7qHyej16JazPoUacqoVuDhvR61U7Fr5vSxMUiodzcYa1rQYRYfZ5GexV03vGZHd722vNPLjPJGQ==", + "dev": true + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", + "dev": true, + "optional": true + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "chownr": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.0.1.tgz", + "integrity": "sha1-4qdQQqlVGQi+vSW4Uj1fl2nXkYE=", + "dev": true, + "optional": true + }, + "clean-css": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.1.11.tgz", + "integrity": "sha1-Ls3xRaujj1R0DybO/Q/z4D4SXWo=", + "dev": true, + "requires": { + "source-map": "0.5.x" + }, + "dependencies": { + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } + } + }, + "cli": { + "version": "0.6.6", + "resolved": "https://registry.npmjs.org/cli/-/cli-0.6.6.tgz", + "integrity": "sha1-Aq1Eo4Cr8nraxebwzdewQ9dMU+M=", + "dev": true, + "requires": { + "exit": "0.1.2", + "glob": "~ 3.2.1" + }, + "dependencies": { + "glob": { + "version": "3.2.11", + "resolved": "https://registry.npmjs.org/glob/-/glob-3.2.11.tgz", + "integrity": "sha1-Spc/Y1uRkPcV0QmH1cAP0oFevj0=", + "dev": true, + "requires": { + "inherits": "2", + "minimatch": "0.3" + } + }, + "minimatch": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.3.0.tgz", + "integrity": "sha1-J12O2qxPG7MyZHIInnlJyDlGmd0=", + "dev": true, + "requires": { + "lru-cache": "2", + "sigmund": "~1.0.0" + } + } + } + }, + "clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=" + }, + "clone-stats": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz", + "integrity": "sha1-uI+UqCzzi4eR1YBG6kAprYjKmdE=" + }, + "co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", + "dev": true, + "optional": true + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "dev": true + }, + "coffee-script": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/coffee-script/-/coffee-script-1.3.3.tgz", + "integrity": "sha1-FQ1rTLUiiUNp7+1qIQHCC8f0pPQ=", + "dev": true + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + }, + "colors": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/colors/-/colors-0.6.2.tgz", + "integrity": "sha1-JCP+ZnisDF2uiFLl0OW+CMmXq8w=" + }, + "combined-stream": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", + "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", + "dev": true, + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "commander": { + "version": "2.1.0", + "resolved": "http://registry.npmjs.org/commander/-/commander-2.1.0.tgz", + "integrity": "sha1-0SG7roYNmZKj1Re6lvVliOR8Z4E=" + }, + "compress-commons": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/compress-commons/-/compress-commons-1.2.2.tgz", + "integrity": "sha1-UkqfEJA/OoEzibAiXSfEi7dRiQ8=", + "dev": true, + "requires": { + "buffer-crc32": "^0.2.1", + "crc32-stream": "^2.0.0", + "normalize-path": "^2.0.0", + "readable-stream": "^2.0.0" + } + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "console-browserify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", + "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", + "dev": true, + "requires": { + "date-now": "^0.1.4" + } + }, + "console-control-strings": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", + "dev": true + }, + "copy": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/copy/-/copy-0.3.2.tgz", + "integrity": "sha512-drDFuUZctIuvSuvL9dOF/v5GxrwB1Q8eMIRlYONC0lSMEq+L2xabXP3jme8cQFdDO8cgP8JsuYhQg7JtTwezmg==", + "requires": { + "async-each": "^1.0.0", + "bluebird": "^3.4.1", + "extend-shallow": "^2.0.1", + "file-contents": "^0.3.1", + "glob-parent": "^2.0.0", + "graceful-fs": "^4.1.4", + "has-glob": "^0.1.1", + "is-absolute": "^0.2.5", + "lazy-cache": "^2.0.1", + "log-ok": "^0.1.1", + "matched": "^0.4.1", + "mkdirp": "^0.5.1", + "resolve-dir": "^0.1.0", + "to-file": "^0.2.0" + } + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "crc": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/crc/-/crc-3.8.0.tgz", + "integrity": "sha512-iX3mfgcTMIq3ZKLIsVFAbv7+Mc10kxabAGQb8HvjA1o3T1PIYprbakQ65d3I+2HGHt6nSKkM9PYjgoJO2KcFBQ==", + "dev": true, + "requires": { + "buffer": "^5.1.0" + } + }, + "crc32-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/crc32-stream/-/crc32-stream-2.0.0.tgz", + "integrity": "sha1-483TtN8xaN10494/u8t7KX/pCPQ=", + "dev": true, + "requires": { + "crc": "^3.4.4", + "readable-stream": "^2.0.0" + } + }, + "cross-spawn": { + "version": "0.2.9", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-0.2.9.tgz", + "integrity": "sha1-vWf5bAfvtjA7f+lMHpefiEeOCjk=", + "dev": true, + "requires": { + "lru-cache": "^2.5.0" + } + }, + "currently-unhandled": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", + "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", + "dev": true, + "requires": { + "array-find-index": "^1.0.1" + } + }, + "dargs": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/dargs/-/dargs-4.1.0.tgz", + "integrity": "sha1-A6nbtLXC8Tm/FK5T8LiipqhvThc=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "dev": true, + "optional": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "date-now": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", + "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=", + "dev": true + }, + "dateformat": { + "version": "1.0.2-1.2.3", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-1.0.2-1.2.3.tgz", + "integrity": "sha1-sCIMAt6YYXQztyhRz0fePfLNvuk=", + "dev": true + }, + "debug": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-0.7.4.tgz", + "integrity": "sha1-BuHqgILCyxTjmAbiLi9vdX+Srzk=", + "dev": true + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true + }, + "decompress-response": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", + "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", + "dev": true, + "optional": true, + "requires": { + "mimic-response": "^1.0.0" + } + }, + "deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "dev": true, + "optional": true + }, + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true + }, + "delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", + "dev": true + }, + "detect-libc": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-0.2.0.tgz", + "integrity": "sha1-R/31ZzSKF+wl/L8LnkRjSKdvn7U=", + "dev": true, + "optional": true + }, + "diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "dev": true + }, + "dom-serializer": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.0.tgz", + "integrity": "sha1-BzxpdUbOB4DOI75KKOKT5AvDDII=", + "dev": true, + "requires": { + "domelementtype": "~1.1.1", + "entities": "~1.1.1" + }, + "dependencies": { + "domelementtype": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz", + "integrity": "sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs=", + "dev": true + }, + "entities": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.1.tgz", + "integrity": "sha1-blwtClYhtdra7O+AuQ7ftc13cvA=", + "dev": true + } + } + }, + "domelementtype": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.0.tgz", + "integrity": "sha1-sXrtguirWeUt2cGbF1bg/BhyBMI=", + "dev": true + }, + "domhandler": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.3.0.tgz", + "integrity": "sha1-LeWaCCLVAn+r/28DLCsloqir5zg=", + "dev": true, + "requires": { + "domelementtype": "1" + } + }, + "domutils": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", + "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", + "dev": true, + "requires": { + "dom-serializer": "0", + "domelementtype": "1" + } + }, + "duplexer": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz", + "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=", + "dev": true + }, + "ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "dev": true, + "optional": true, + "requires": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "electron-to-chromium": { + "version": "1.3.63", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.63.tgz", + "integrity": "sha512-Ec35NNY040HKuSxMAzBMgz/uUI78amSWpBUD9x2gN7R7gkb/wgAcClngWklcLP0/lm/g0UUYHnC/tUIlZj8UvQ==", + "dev": true + }, + "encoding": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", + "integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=", + "dev": true, + "requires": { + "iconv-lite": "~0.4.13" + }, + "dependencies": { + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + } + } + }, + "end-of-stream": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", + "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", + "dev": true, + "requires": { + "once": "^1.4.0" + } + }, + "entities": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-1.0.0.tgz", + "integrity": "sha1-sph6o4ITR/zeZCsk/fyeT7cSvyY=", + "dev": true + }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" + }, + "esprima": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-1.0.4.tgz", + "integrity": "sha1-n1V+CPw7TSbs6d00+Pv0drYlha0=", + "dev": true + }, + "eventemitter2": { + "version": "0.4.14", + "resolved": "http://registry.npmjs.org/eventemitter2/-/eventemitter2-0.4.14.tgz", + "integrity": "sha1-j2G3XN4BKy6esoTUVFWDtWQ7Yas=", + "dev": true + }, + "exit": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=", + "dev": true + }, + "expand-template": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-1.1.1.tgz", + "integrity": "sha512-cebqLtV8KOZfw0UI8TEFWxtczxxC1jvyUvx6H4fyp1K1FN7A4Q+uggVUlOsI1K8AGU0rwOGqP8nCapdrw8CYQg==", + "dev": true, + "optional": true + }, + "expand-tilde": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-1.2.2.tgz", + "integrity": "sha1-C4HrqJflo9MdHD0QL48BRB5VlEk=", + "requires": { + "os-homedir": "^1.0.1" + } + }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true, + "optional": true + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "dev": true + }, + "fast-deep-equal": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", + "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", + "dev": true, + "optional": true + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", + "dev": true, + "optional": true + }, + "faye-websocket": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.4.4.tgz", + "integrity": "sha1-wUxbO/FNdBf/v9mQwKdJXNnzN7w=", + "dev": true + }, + "figures": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", + "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5", + "object-assign": "^4.1.0" + } + }, + "file-contents": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/file-contents/-/file-contents-0.3.2.tgz", + "integrity": "sha1-oJOf7RuM2hWAJm/Gt1OiMvtG3lM=", + "requires": { + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "file-stat": "^0.2.3", + "fs-exists-sync": "^0.1.0", + "graceful-fs": "^4.1.4", + "is-buffer": "^1.1.3", + "isobject": "^2.1.0", + "lazy-cache": "^2.0.1", + "strip-bom-buffer": "^0.1.1", + "strip-bom-string": "^0.1.2", + "through2": "^2.0.1", + "vinyl": "^1.1.1" + } + }, + "file-stat": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/file-stat/-/file-stat-0.2.3.tgz", + "integrity": "sha1-Rpp+kn1pMAeWJM2zgQlAVFbLBqk=", + "requires": { + "fs-exists-sync": "^0.1.0", + "graceful-fs": "^4.1.4", + "lazy-cache": "^2.0.1", + "through2": "^2.0.1" + } + }, + "file-sync-cmp": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/file-sync-cmp/-/file-sync-cmp-0.1.1.tgz", + "integrity": "sha1-peeo/7+kk7Q7kju9TKiaU7Y7YSs=", + "dev": true + }, + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "dev": true, + "requires": { + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "findup": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/findup/-/findup-0.1.5.tgz", + "integrity": "sha1-itkpozk7rGJ5V6fl3kYjsGsOLOs=", + "requires": { + "colors": "~0.6.0-1", + "commander": "~2.1.0" + } + }, + "findup-sync": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.1.3.tgz", + "integrity": "sha1-fz56l7gjksZTvwZYm9hRkOk8NoM=", + "dev": true, + "requires": { + "glob": "~3.2.9", + "lodash": "~2.4.1" + }, + "dependencies": { + "glob": { + "version": "3.2.11", + "resolved": "https://registry.npmjs.org/glob/-/glob-3.2.11.tgz", + "integrity": "sha1-Spc/Y1uRkPcV0QmH1cAP0oFevj0=", + "dev": true, + "requires": { + "inherits": "2", + "minimatch": "0.3" + } + }, + "lodash": { + "version": "2.4.2", + "resolved": "http://registry.npmjs.org/lodash/-/lodash-2.4.2.tgz", + "integrity": "sha1-+t2DS5aDBz2hebPq5tnA0VBT9z4=", + "dev": true + }, + "minimatch": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.3.0.tgz", + "integrity": "sha1-J12O2qxPG7MyZHIInnlJyDlGmd0=", + "dev": true, + "requires": { + "lru-cache": "2", + "sigmund": "~1.0.0" + } + } + } + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "dev": true, + "optional": true + }, + "form-data": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz", + "integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=", + "dev": true, + "optional": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "1.0.6", + "mime-types": "^2.1.12" + } + }, + "fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", + "dev": true + }, + "fs-exists-sync": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/fs-exists-sync/-/fs-exists-sync-0.1.0.tgz", + "integrity": "sha1-mC1ok6+RjnLQjeyehnP/K1qNat0=" + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "fstream": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz", + "integrity": "sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "inherits": "~2.0.0", + "mkdirp": ">=0.5 0", + "rimraf": "2" + } + }, + "gauge": { + "version": "2.7.4", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", + "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", + "dev": true, + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + } + }, + "gaze": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/gaze/-/gaze-0.5.2.tgz", + "integrity": "sha1-QLcJU30k0dRXZ9takIaJ3+aaxE8=", + "dev": true, + "requires": { + "globule": "~0.1.0" + } + }, + "get-stdin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", + "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", + "dev": true + }, + "getobject": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/getobject/-/getobject-0.1.0.tgz", + "integrity": "sha1-BHpEl4n6Fg0Bj1SG7ZEyC27HiFw=", + "dev": true + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "dev": true, + "optional": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "gettext-parser": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/gettext-parser/-/gettext-parser-2.0.0.tgz", + "integrity": "sha512-FDs/7XjNw58ToQwJFO7avZZbPecSYgw8PBYhd0An+4JtZSrSzKhEvTsVV2uqdO7VziWTOGSgLGD5YRPdsCjF7Q==", + "dev": true, + "requires": { + "encoding": "^0.1.12", + "safe-buffer": "^5.1.2" + } + }, + "github-from-package": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", + "integrity": "sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4=", + "dev": true, + "optional": true + }, + "glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-parent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", + "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", + "requires": { + "is-glob": "^2.0.0" + } + }, + "global-modules": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-0.2.3.tgz", + "integrity": "sha1-6lo77ULG1s6ZWk+KEmm12uIjgo0=", + "requires": { + "global-prefix": "^0.1.4", + "is-windows": "^0.2.0" + } + }, + "global-prefix": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-0.1.5.tgz", + "integrity": "sha1-jTvGuNo8qBEqFg2NSW/wRiv+948=", + "requires": { + "homedir-polyfill": "^1.0.0", + "ini": "^1.3.4", + "is-windows": "^0.2.0", + "which": "^1.2.12" + } + }, + "globule": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/globule/-/globule-0.1.0.tgz", + "integrity": "sha1-2cjt3h2nnRJaFRt5UzuXhnY0auU=", + "dev": true, + "requires": { + "glob": "~3.1.21", + "lodash": "~1.0.1", + "minimatch": "~0.2.11" + }, + "dependencies": { + "glob": { + "version": "3.1.21", + "resolved": "https://registry.npmjs.org/glob/-/glob-3.1.21.tgz", + "integrity": "sha1-0p4KBV3qUTj00H7UDomC6DwgZs0=", + "dev": true, + "requires": { + "graceful-fs": "~1.2.0", + "inherits": "1", + "minimatch": "~0.2.11" + } + }, + "graceful-fs": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-1.2.3.tgz", + "integrity": "sha1-FaSAaldUfLLS2/J/QuiajDRRs2Q=", + "dev": true + }, + "inherits": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-1.0.2.tgz", + "integrity": "sha1-ykMJ2t7mtUzAuNJH6NfHoJdb3Js=", + "dev": true + }, + "lodash": { + "version": "1.0.2", + "resolved": "http://registry.npmjs.org/lodash/-/lodash-1.0.2.tgz", + "integrity": "sha1-j1dWDIO1n8JwvT1WG2kAQ0MOJVE=", + "dev": true + }, + "minimatch": { + "version": "0.2.14", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.2.14.tgz", + "integrity": "sha1-x054BXT2PG+aCQ6Q775u9TpqdWo=", + "dev": true, + "requires": { + "lru-cache": "2", + "sigmund": "~1.0.0" + } + } + } + }, + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" + }, + "grunt": { + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/grunt/-/grunt-0.4.5.tgz", + "integrity": "sha1-VpN81RlDJK3/bSB2MYMqnWuk5/A=", + "dev": true, + "requires": { + "async": "~0.1.22", + "coffee-script": "~1.3.3", + "colors": "~0.6.2", + "dateformat": "1.0.2-1.2.3", + "eventemitter2": "~0.4.13", + "exit": "~0.1.1", + "findup-sync": "~0.1.2", + "getobject": "~0.1.0", + "glob": "~3.1.21", + "grunt-legacy-log": "~0.1.0", + "grunt-legacy-util": "~0.2.0", + "hooker": "~0.2.3", + "iconv-lite": "~0.2.11", + "js-yaml": "~2.0.5", + "lodash": "~0.9.2", + "minimatch": "~0.2.12", + "nopt": "~1.0.10", + "rimraf": "~2.2.8", + "underscore.string": "~2.2.1", + "which": "~1.0.5" + }, + "dependencies": { + "glob": { + "version": "3.1.21", + "resolved": "https://registry.npmjs.org/glob/-/glob-3.1.21.tgz", + "integrity": "sha1-0p4KBV3qUTj00H7UDomC6DwgZs0=", + "dev": true, + "requires": { + "graceful-fs": "~1.2.0", + "inherits": "1", + "minimatch": "~0.2.11" + } + }, + "graceful-fs": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-1.2.3.tgz", + "integrity": "sha1-FaSAaldUfLLS2/J/QuiajDRRs2Q=", + "dev": true + }, + "inherits": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-1.0.2.tgz", + "integrity": "sha1-ykMJ2t7mtUzAuNJH6NfHoJdb3Js=", + "dev": true + }, + "minimatch": { + "version": "0.2.14", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.2.14.tgz", + "integrity": "sha1-x054BXT2PG+aCQ6Q775u9TpqdWo=", + "dev": true, + "requires": { + "lru-cache": "2", + "sigmund": "~1.0.0" + } + }, + "which": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/which/-/which-1.0.9.tgz", + "integrity": "sha1-RgwdoPgQED0DIam2M6+eV15kSG8=", + "dev": true + } + } + }, + "grunt-bumpup": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/grunt-bumpup/-/grunt-bumpup-0.6.3.tgz", + "integrity": "sha1-dU6Wu2pTN9C5VInl3EmWuvyLtBQ=", + "dev": true, + "requires": { + "moment": "^2.8.3", + "semver": "^4.0.3" + } + }, + "grunt-contrib-clean": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/grunt-contrib-clean/-/grunt-contrib-clean-1.1.0.tgz", + "integrity": "sha1-Vkq/LQN4qYOhW54/MO51tzjEBjg=", + "dev": true, + "requires": { + "async": "^1.5.2", + "rimraf": "^2.5.1" + }, + "dependencies": { + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "dev": true + }, + "rimraf": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "dev": true, + "requires": { + "glob": "^7.0.5" + } + } + } + }, + "grunt-contrib-compress": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/grunt-contrib-compress/-/grunt-contrib-compress-1.4.3.tgz", + "integrity": "sha1-Ac7/ucY39S5wgfRjdQmD0KOw+nM=", + "dev": true, + "requires": { + "archiver": "^1.3.0", + "chalk": "^1.1.1", + "iltorb": "^1.0.13", + "lodash": "^4.7.0", + "pretty-bytes": "^4.0.2", + "stream-buffers": "^2.1.0" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "lodash": { + "version": "4.17.10", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", + "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==", + "dev": true + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + } + } + }, + "grunt-contrib-concat": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/grunt-contrib-concat/-/grunt-contrib-concat-0.4.0.tgz", + "integrity": "sha1-uH988VO/ZGiBQvlHFhFWAT+8fHQ=", + "dev": true, + "requires": { + "chalk": "~0.4.0" + }, + "dependencies": { + "ansi-styles": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-1.0.0.tgz", + "integrity": "sha1-yxAt8cVvUSPquLZ817mAJ6AnkXg=", + "dev": true + }, + "chalk": { + "version": "0.4.0", + "resolved": "http://registry.npmjs.org/chalk/-/chalk-0.4.0.tgz", + "integrity": "sha1-UZmj3c0MHv4jvAjBsCewYXbgxk8=", + "dev": true, + "requires": { + "ansi-styles": "~1.0.0", + "has-color": "~0.1.0", + "strip-ansi": "~0.1.0" + } + }, + "strip-ansi": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-0.1.1.tgz", + "integrity": "sha1-OeipjQRNFQZgq+SmgIrPcLt7yZE=", + "dev": true + } + } + }, + "grunt-contrib-copy": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/grunt-contrib-copy/-/grunt-contrib-copy-1.0.0.tgz", + "integrity": "sha1-cGDGWB6QS4qw0A8HbgqPbj58NXM=", + "dev": true, + "requires": { + "chalk": "^1.1.1", + "file-sync-cmp": "^0.1.0" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + } + } + }, + "grunt-contrib-cssmin": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/grunt-contrib-cssmin/-/grunt-contrib-cssmin-2.2.1.tgz", + "integrity": "sha512-IXNomhQ5ekVZbDbj/ik5YccoD9khU6LT2fDXqO1+/Txjq8cp0tQKjVS8i8EAbHOrSDkL7/UD6A7b+xj98gqh9w==", + "dev": true, + "requires": { + "chalk": "^1.0.0", + "clean-css": "~4.1.1", + "maxmin": "^2.1.0" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + } + } + }, + "grunt-contrib-jshint": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/grunt-contrib-jshint/-/grunt-contrib-jshint-0.10.0.tgz", + "integrity": "sha1-V+vMyofo8yevZkXYo8WG1IReTYE=", + "dev": true, + "requires": { + "hooker": "~0.2.3", + "jshint": "~2.5.0" + } + }, + "grunt-contrib-sass": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/grunt-contrib-sass/-/grunt-contrib-sass-1.0.0.tgz", + "integrity": "sha1-gGg4JRy8DhqU1k1RXN00z2dNcBs=", + "dev": true, + "requires": { + "async": "^0.9.0", + "chalk": "^1.0.0", + "cross-spawn": "^0.2.3", + "dargs": "^4.0.0", + "which": "^1.0.5" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "async": { + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz", + "integrity": "sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + } + } + }, + "grunt-contrib-uglify": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/grunt-contrib-uglify/-/grunt-contrib-uglify-4.0.0.tgz", + "integrity": "sha512-vy3Vop2KDqdiwcGOGAjyKvjHFrRD/YK4KPQWR3Yt6OdYlgFw1z7HCuk66+IJ9s7oJmp9uRQXuuSHyawKRAgiMw==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "maxmin": "^2.1.0", + "uglify-js": "~3.4.8", + "uri-path": "^1.0.0" + } + }, + "grunt-contrib-watch": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/grunt-contrib-watch/-/grunt-contrib-watch-0.6.1.tgz", + "integrity": "sha1-ZP3LolpjX1tNobbOb5DaCutuPxU=", + "dev": true, + "requires": { + "async": "~0.2.9", + "gaze": "~0.5.1", + "lodash": "~2.4.1", + "tiny-lr-fork": "0.0.5" + }, + "dependencies": { + "async": { + "version": "0.2.10", + "resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz", + "integrity": "sha1-trvgsGdLnXGXCMo43owjfLUmw9E=", + "dev": true + }, + "lodash": { + "version": "2.4.2", + "resolved": "http://registry.npmjs.org/lodash/-/lodash-2.4.2.tgz", + "integrity": "sha1-+t2DS5aDBz2hebPq5tnA0VBT9z4=", + "dev": true + } + } + }, + "grunt-known-options": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/grunt-known-options/-/grunt-known-options-1.1.1.tgz", + "integrity": "sha512-cHwsLqoighpu7TuYj5RonnEuxGVFnztcUqTqp5rXFGYL4OuPFofwC4Ycg7n9fYwvK6F5WbYgeVOwph9Crs2fsQ==", + "dev": true + }, + "grunt-legacy-log": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/grunt-legacy-log/-/grunt-legacy-log-0.1.3.tgz", + "integrity": "sha1-7ClCboAwIa9ZAp+H0vnNczWgVTE=", + "dev": true, + "requires": { + "colors": "~0.6.2", + "grunt-legacy-log-utils": "~0.1.1", + "hooker": "~0.2.3", + "lodash": "~2.4.1", + "underscore.string": "~2.3.3" + }, + "dependencies": { + "lodash": { + "version": "2.4.2", + "resolved": "http://registry.npmjs.org/lodash/-/lodash-2.4.2.tgz", + "integrity": "sha1-+t2DS5aDBz2hebPq5tnA0VBT9z4=", + "dev": true + }, + "underscore.string": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.3.3.tgz", + "integrity": "sha1-ccCL9rQosRM/N+ePo6Icgvcymw0=", + "dev": true + } + } + }, + "grunt-legacy-log-utils": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/grunt-legacy-log-utils/-/grunt-legacy-log-utils-0.1.1.tgz", + "integrity": "sha1-wHBrndkGThFvNvI/5OawSGcsD34=", + "dev": true, + "requires": { + "colors": "~0.6.2", + "lodash": "~2.4.1", + "underscore.string": "~2.3.3" + }, + "dependencies": { + "lodash": { + "version": "2.4.2", + "resolved": "http://registry.npmjs.org/lodash/-/lodash-2.4.2.tgz", + "integrity": "sha1-+t2DS5aDBz2hebPq5tnA0VBT9z4=", + "dev": true + }, + "underscore.string": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.3.3.tgz", + "integrity": "sha1-ccCL9rQosRM/N+ePo6Icgvcymw0=", + "dev": true + } + } + }, + "grunt-legacy-util": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/grunt-legacy-util/-/grunt-legacy-util-0.2.0.tgz", + "integrity": "sha1-kzJIhNv343qf98Am3/RR2UqeVUs=", + "dev": true, + "requires": { + "async": "~0.1.22", + "exit": "~0.1.1", + "getobject": "~0.1.0", + "hooker": "~0.2.3", + "lodash": "~0.9.2", + "underscore.string": "~2.2.1", + "which": "~1.0.5" + }, + "dependencies": { + "which": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/which/-/which-1.0.9.tgz", + "integrity": "sha1-RgwdoPgQED0DIam2M6+eV15kSG8=", + "dev": true + } + } + }, + "grunt-postcss": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/grunt-postcss/-/grunt-postcss-0.9.0.tgz", + "integrity": "sha512-lglLcVaoOIqH0sFv7RqwUKkEFGQwnlqyAKbatxZderwZGV1nDyKHN7gZS9LUiTx1t5GOvRBx0BEalHMyVwFAIA==", + "dev": true, + "requires": { + "chalk": "^2.1.0", + "diff": "^3.0.0", + "postcss": "^6.0.11" + } + }, + "grunt-rtlcss": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/grunt-rtlcss/-/grunt-rtlcss-2.0.1.tgz", + "integrity": "sha1-6eYc5DdAY5f546Sxv2aeR+cf/MM=", + "dev": true, + "requires": { + "chalk": "^1.0.0", + "rtlcss": "^2.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + } + } + }, + "grunt-text-replace": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/grunt-text-replace/-/grunt-text-replace-0.4.0.tgz", + "integrity": "sha1-252c5Z4v5J2id+nbwZXD4Rz7FsI=", + "dev": true + }, + "grunt-wp-i18n": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/grunt-wp-i18n/-/grunt-wp-i18n-1.0.2.tgz", + "integrity": "sha512-s7DdR1wRYWvgeQOELL/s8AmWz0scVUq+h0yYVWvLx23kTXOBslvaD35NTvubyM+MO+k29bgND0gDDvS6sHixfg==", + "dev": true, + "requires": { + "grunt": "^1.0.2", + "node-wp-i18n": "^1.0.5" + }, + "dependencies": { + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + }, + "dependencies": { + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + } + } + }, + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "dev": true + }, + "coffeescript": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/coffeescript/-/coffeescript-1.10.0.tgz", + "integrity": "sha1-56qDAZF+9iGzXYo580jc3R234z4=", + "dev": true + }, + "colors": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz", + "integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=", + "dev": true + }, + "dateformat": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-1.0.12.tgz", + "integrity": "sha1-nxJLZ1lMk3/3BpMuSmQsyo27/uk=", + "dev": true, + "requires": { + "get-stdin": "^4.0.1", + "meow": "^3.3.0" + } + }, + "esprima": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", + "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=", + "dev": true + }, + "findup-sync": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.3.0.tgz", + "integrity": "sha1-N5MKpdgWt3fANEXhlmzGeQpMCxY=", + "dev": true, + "requires": { + "glob": "~5.0.0" + }, + "dependencies": { + "glob": { + "version": "5.0.15", + "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", + "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", + "dev": true, + "requires": { + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "2 || 3", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + } + } + }, + "glob": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.0.6.tgz", + "integrity": "sha1-IRuvr0nlJbjNkyYNFKsTYVKz9Xo=", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.2", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "grunt": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/grunt/-/grunt-1.0.3.tgz", + "integrity": "sha512-/JzmZNPfKorlCrrmxWqQO4JVodO+DVd5XX4DkocL/1WlLlKVLE9+SdEIempOAxDhWPysLle6afvn/hg7Ck2k9g==", + "dev": true, + "requires": { + "coffeescript": "~1.10.0", + "dateformat": "~1.0.12", + "eventemitter2": "~0.4.13", + "exit": "~0.1.1", + "findup-sync": "~0.3.0", + "glob": "~7.0.0", + "grunt-cli": "~1.2.0", + "grunt-known-options": "~1.1.0", + "grunt-legacy-log": "~2.0.0", + "grunt-legacy-util": "~1.1.1", + "iconv-lite": "~0.4.13", + "js-yaml": "~3.5.2", + "minimatch": "~3.0.2", + "mkdirp": "~0.5.1", + "nopt": "~3.0.6", + "path-is-absolute": "~1.0.0", + "rimraf": "~2.6.2" + }, + "dependencies": { + "grunt-cli": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/grunt-cli/-/grunt-cli-1.2.0.tgz", + "integrity": "sha1-VisRnrsGndtGSs4oRVAb6Xs1tqg=", + "dev": true, + "requires": { + "findup-sync": "~0.3.0", + "grunt-known-options": "~1.1.0", + "nopt": "~3.0.6", + "resolve": "~1.1.0" + } + } + } + }, + "grunt-legacy-log": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/grunt-legacy-log/-/grunt-legacy-log-2.0.0.tgz", + "integrity": "sha512-1m3+5QvDYfR1ltr8hjiaiNjddxGdQWcH0rw1iKKiQnF0+xtgTazirSTGu68RchPyh1OBng1bBUjLmX8q9NpoCw==", + "dev": true, + "requires": { + "colors": "~1.1.2", + "grunt-legacy-log-utils": "~2.0.0", + "hooker": "~0.2.3", + "lodash": "~4.17.5" + } + }, + "grunt-legacy-log-utils": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/grunt-legacy-log-utils/-/grunt-legacy-log-utils-2.0.1.tgz", + "integrity": "sha512-o7uHyO/J+i2tXG8r2bZNlVk20vlIFJ9IEYyHMCQGfWYru8Jv3wTqKZzvV30YW9rWEjq0eP3cflQ1qWojIe9VFA==", + "dev": true, + "requires": { + "chalk": "~2.4.1", + "lodash": "~4.17.10" + } + }, + "grunt-legacy-util": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/grunt-legacy-util/-/grunt-legacy-util-1.1.1.tgz", + "integrity": "sha512-9zyA29w/fBe6BIfjGENndwoe1Uy31BIXxTH3s8mga0Z5Bz2Sp4UCjkeyv2tI449ymkx3x26B+46FV4fXEddl5A==", + "dev": true, + "requires": { + "async": "~1.5.2", + "exit": "~0.1.1", + "getobject": "~0.1.0", + "hooker": "~0.2.3", + "lodash": "~4.17.10", + "underscore.string": "~3.3.4", + "which": "~1.3.0" + } + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "js-yaml": { + "version": "3.5.5", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.5.5.tgz", + "integrity": "sha1-A3fDgBfKvHMisNH7zSWkkWQfL74=", + "dev": true, + "requires": { + "argparse": "^1.0.2", + "esprima": "^2.6.0" + } + }, + "lodash": { + "version": "4.17.10", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", + "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==", + "dev": true + }, + "nopt": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", + "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", + "dev": true, + "requires": { + "abbrev": "1" + } + }, + "rimraf": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "dev": true, + "requires": { + "glob": "^7.0.5" + } + }, + "underscore.string": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-3.3.4.tgz", + "integrity": "sha1-LCo/n4PmR2L9xF5s6sZRQoZCE9s=", + "dev": true, + "requires": { + "sprintf-js": "^1.0.3", + "util-deprecate": "^1.0.2" + } + } + } + }, + "gzip-size": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-3.0.0.tgz", + "integrity": "sha1-VGGI6b3DN/Zzdy+BZgRks4nc5SA=", + "dev": true, + "requires": { + "duplexer": "^0.1.1" + } + }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", + "dev": true, + "optional": true + }, + "har-validator": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.0.tgz", + "integrity": "sha512-+qnmNjI4OfH2ipQ9VQOw23bBd/ibtfbVdK2fYbY4acTDqKTW/YDp9McimZdDbG8iV9fZizUqQMD5xvriB146TA==", + "dev": true, + "optional": true, + "requires": { + "ajv": "^5.3.0", + "har-schema": "^2.0.0" + } + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "has-color": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/has-color/-/has-color-0.1.7.tgz", + "integrity": "sha1-ZxRKUmDDT8PMpnfQQdr1L+e3iy8=", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" + }, + "has-glob": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/has-glob/-/has-glob-0.1.1.tgz", + "integrity": "sha1-omHEwqbGZ+DHe3AKfyl8Oe86pYk=", + "requires": { + "is-glob": "^2.0.1" + } + }, + "has-unicode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", + "dev": true + }, + "homedir-polyfill": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz", + "integrity": "sha1-TCu8inWJmP7r9e1oWA921GdotLw=", + "requires": { + "parse-passwd": "^1.0.0" + } + }, + "hooker": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/hooker/-/hooker-0.2.3.tgz", + "integrity": "sha1-uDT3I8xKJCqmWWNFnfbZhMXT2Vk=", + "dev": true + }, + "hosted-git-info": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", + "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==", + "dev": true + }, + "htmlparser2": { + "version": "3.8.3", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.8.3.tgz", + "integrity": "sha1-mWwosZFRaovoZQGn15dX5ccMEGg=", + "dev": true, + "requires": { + "domelementtype": "1", + "domhandler": "2.3", + "domutils": "1.5", + "entities": "1.0", + "readable-stream": "1.1" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + } + } + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "dev": true, + "optional": true, + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "iconv-lite": { + "version": "0.2.11", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.2.11.tgz", + "integrity": "sha1-HOYKOleGSiktEyH/RgnKS7llrcg=", + "dev": true + }, + "ieee754": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.12.tgz", + "integrity": "sha512-GguP+DRY+pJ3soyIiGPTvdiVXjZ+DbXOxGpXn3eMvNW4x4irjqXm4wHKscC+TfxSJ0yw/S1F24tqdMNsMZTiLA==", + "dev": true + }, + "iltorb": { + "version": "1.3.10", + "resolved": "https://registry.npmjs.org/iltorb/-/iltorb-1.3.10.tgz", + "integrity": "sha512-nyB4+ru1u8CQqQ6w7YjasboKN3NQTN8GH/V/eEssNRKhW6UbdxdWhB9fJ5EEdjJfezKY0qPrcwLyIcgjL8hHxA==", + "dev": true, + "optional": true, + "requires": { + "detect-libc": "^0.2.0", + "nan": "^2.6.2", + "node-gyp": "^3.6.2", + "prebuild-install": "^2.3.0" + } + }, + "indent-string": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", + "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", + "dev": true, + "requires": { + "repeating": "^2.0.0" + } + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "ini": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==" + }, + "is-absolute": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-0.2.6.tgz", + "integrity": "sha1-IN5p89uULvLYe5wto28XIjWxtes=", + "requires": { + "is-relative": "^0.2.1", + "is-windows": "^0.2.0" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "is-builtin-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", + "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", + "dev": true, + "requires": { + "builtin-modules": "^1.0.0" + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=" + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=" + }, + "is-finite": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", + "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "requires": { + "is-extglob": "^1.0.0" + } + }, + "is-relative": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-0.2.1.tgz", + "integrity": "sha1-0n9MfVFtF1+2ENuEu+7yPDvJeqU=", + "requires": { + "is-unc-path": "^0.1.1" + } + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "dev": true, + "optional": true + }, + "is-unc-path": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-0.1.2.tgz", + "integrity": "sha1-arBTpyVzwQJQ/0FqOBTDUXivObk=", + "requires": { + "unc-path-regex": "^0.1.0" + } + }, + "is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=" + }, + "is-valid-glob": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/is-valid-glob/-/is-valid-glob-0.3.0.tgz", + "integrity": "sha1-1LVcafUYhvm2XHDWwmItN+KfSP4=" + }, + "is-windows": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-0.2.0.tgz", + "integrity": "sha1-3hqm1j6indJIc3tp8f+LgALSEIw=" + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" + }, + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "requires": { + "isarray": "1.0.0" + } + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", + "dev": true, + "optional": true + }, + "js-yaml": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-2.0.5.tgz", + "integrity": "sha1-olrmUJmZ6X3yeMZxnaEb0Gh3Q6g=", + "dev": true, + "requires": { + "argparse": "~ 0.1.11", + "esprima": "~ 1.0.2" + } + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "dev": true, + "optional": true + }, + "jshint": { + "version": "2.5.11", + "resolved": "https://registry.npmjs.org/jshint/-/jshint-2.5.11.tgz", + "integrity": "sha1-4tlYWLuxqngwAQii6BCZ+wlWIuA=", + "dev": true, + "requires": { + "cli": "0.6.x", + "console-browserify": "1.1.x", + "exit": "0.1.x", + "htmlparser2": "3.8.x", + "minimatch": "1.0.x", + "shelljs": "0.3.x", + "strip-json-comments": "1.0.x", + "underscore": "1.6.x" + }, + "dependencies": { + "minimatch": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-1.0.0.tgz", + "integrity": "sha1-4N0hILSeG3JM6NcUxSCCKpQ4V20=", + "dev": true, + "requires": { + "lru-cache": "2", + "sigmund": "~1.0.0" + } + }, + "strip-json-comments": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz", + "integrity": "sha1-HhX7ysl9Pumb8tc7TGVrCCu6+5E=", + "dev": true + }, + "underscore": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz", + "integrity": "sha1-izixDKze9jM3uLJOT/htRa6lKag=", + "dev": true + } + } + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", + "dev": true, + "optional": true + }, + "json-schema-traverse": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", + "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", + "dev": true, + "optional": true + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "dev": true, + "optional": true + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "dev": true, + "optional": true, + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + }, + "lazy-cache": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-2.0.2.tgz", + "integrity": "sha1-uRkKT5EzVGlIQIWfio9whNiCImQ=", + "requires": { + "set-getter": "^0.1.0" + } + }, + "lazystream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.0.tgz", + "integrity": "sha1-9plf4PggOS9hOWvolGJAe7dxaOQ=", + "dev": true, + "requires": { + "readable-stream": "^2.0.5" + } + }, + "load-json-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" + } + }, + "lodash": { + "version": "0.9.2", + "resolved": "http://registry.npmjs.org/lodash/-/lodash-0.9.2.tgz", + "integrity": "sha1-jzSZxSRdNG1oLlsNO0B2fgnxqSw=", + "dev": true + }, + "log-ok": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/log-ok/-/log-ok-0.1.1.tgz", + "integrity": "sha1-vqPdNqzQuKckDXhza1uXxlREozQ=", + "requires": { + "ansi-green": "^0.1.1", + "success-symbol": "^0.1.0" + } + }, + "loud-rejection": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", + "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", + "dev": true, + "requires": { + "currently-unhandled": "^0.4.1", + "signal-exit": "^3.0.0" + } + }, + "lru-cache": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz", + "integrity": "sha1-bUUk6LlV+V1PW1iFHOId1y+06VI=", + "dev": true + }, + "map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", + "dev": true + }, + "matched": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/matched/-/matched-0.4.4.tgz", + "integrity": "sha1-Vte36xgDPwz5vFLrIJD6x9weifo=", + "requires": { + "arr-union": "^3.1.0", + "async-array-reduce": "^0.2.0", + "extend-shallow": "^2.0.1", + "fs-exists-sync": "^0.1.0", + "glob": "^7.0.5", + "has-glob": "^0.1.1", + "is-valid-glob": "^0.3.0", + "lazy-cache": "^2.0.1", + "resolve-dir": "^0.1.0" + } + }, + "maxmin": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/maxmin/-/maxmin-2.1.0.tgz", + "integrity": "sha1-TTsiCQPZXu5+t6x/qGTnLcCaMWY=", + "dev": true, + "requires": { + "chalk": "^1.0.0", + "figures": "^1.0.1", + "gzip-size": "^3.0.0", + "pretty-bytes": "^3.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "pretty-bytes": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-3.0.1.tgz", + "integrity": "sha1-J9AAjXeAY6C0gRuzXHnxvV1fvM8=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + } + } + }, + "meow": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", + "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", + "dev": true, + "requires": { + "camelcase-keys": "^2.0.0", + "decamelize": "^1.1.2", + "loud-rejection": "^1.0.0", + "map-obj": "^1.0.1", + "minimist": "^1.1.3", + "normalize-package-data": "^2.3.4", + "object-assign": "^4.0.1", + "read-pkg-up": "^1.0.1", + "redent": "^1.0.0", + "trim-newlines": "^1.0.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + } + } + }, + "mime-db": { + "version": "1.36.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.36.0.tgz", + "integrity": "sha512-L+xvyD9MkoYMXb1jAmzI/lWYAxAMCPvIBSWur0PZ5nOf5euahRLVqH//FKW9mWp2lkqUgYiXPgkzfMUFi4zVDw==", + "dev": true + }, + "mime-types": { + "version": "2.1.20", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.20.tgz", + "integrity": "sha512-HrkrPaP9vGuWbLK1B1FfgAkbqNjIuy4eHlIYnFi7kamZyLLrGlo2mpcx0bBmNpKqBtYtAfGbodDddIgddSJC2A==", + "dev": true, + "requires": { + "mime-db": "~1.36.0" + } + }, + "mimic-response": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", + "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", + "dev": true, + "optional": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "requires": { + "minimist": "0.0.8" + } + }, + "moment": { + "version": "2.22.2", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.22.2.tgz", + "integrity": "sha1-PCV/mDn8DpP/UxSWMiOeuQeD/2Y=", + "dev": true + }, + "nan": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.11.0.tgz", + "integrity": "sha512-F4miItu2rGnV2ySkXOQoA8FKz/SR2Q2sWP0sbTxNxz/tuokeC8WxOhPMcwi0qIyGtVn/rrSeLbvVkznqCdwYnw==", + "dev": true, + "optional": true + }, + "node-abi": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.4.3.tgz", + "integrity": "sha512-b656V5C0628gOOA2kwcpNA/bxdlqYF9FvxJ+qqVX0ctdXNVZpS8J6xEUYir3WAKc7U0BH/NRlSpNbGsy+azjeg==", + "dev": true, + "optional": true, + "requires": { + "semver": "^5.4.1" + }, + "dependencies": { + "semver": { + "version": "5.5.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.1.tgz", + "integrity": "sha512-PqpAxfrEhlSUWge8dwIp4tZnQ25DIOthpiaHNIthsjEFQD6EvqUKUDM7L8O2rShkFccYo1VjJR0coWfNkCubRw==", + "dev": true, + "optional": true + } + } + }, + "node-gyp": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-3.8.0.tgz", + "integrity": "sha512-3g8lYefrRRzvGeSowdJKAKyks8oUpLEd/DyPV4eMhVlhJ0aNaZqIrNUIPuEWWTAoPqyFkfGrM67MC69baqn6vA==", + "dev": true, + "optional": true, + "requires": { + "fstream": "^1.0.0", + "glob": "^7.0.3", + "graceful-fs": "^4.1.2", + "mkdirp": "^0.5.0", + "nopt": "2 || 3", + "npmlog": "0 || 1 || 2 || 3 || 4", + "osenv": "0", + "request": "^2.87.0", + "rimraf": "2", + "semver": "~5.3.0", + "tar": "^2.0.0", + "which": "1" + }, + "dependencies": { + "nopt": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", + "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", + "dev": true, + "optional": true, + "requires": { + "abbrev": "1" + } + }, + "semver": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", + "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=", + "dev": true, + "optional": true + } + } + }, + "node-wp-i18n": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/node-wp-i18n/-/node-wp-i18n-1.2.1.tgz", + "integrity": "sha512-Wvl98XA/GBnQFe20iAMwlsXvikVOFTVz//cbRsF8OPQf0NIkJdeWToNYww/dZl52lHtS1KUEIVRyWcol5ibHog==", + "dev": true, + "requires": { + "bluebird": "^3.4.1", + "gettext-parser": "^2.0.0", + "glob": "^7.0.5", + "lodash": "^4.14.2", + "minimist": "^1.2.0", + "mkdirp": "^0.5.1", + "tmp": "^0.0.33" + }, + "dependencies": { + "lodash": { + "version": "4.17.10", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", + "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==", + "dev": true + }, + "minimist": { + "version": "1.2.0", + "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + } + } + }, + "noop-logger": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/noop-logger/-/noop-logger-0.1.1.tgz", + "integrity": "sha1-lKKxYzxPExdVMAfYlm/Q6EG2pMI=", + "dev": true, + "optional": true + }, + "nopt": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", + "integrity": "sha1-bd0hvSoxQXuScn3Vhfim83YI6+4=", + "dev": true, + "requires": { + "abbrev": "1" + } + }, + "noptify": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/noptify/-/noptify-0.0.3.tgz", + "integrity": "sha1-WPZUpz2XU98MUdlobckhBKZ/S7s=", + "dev": true, + "requires": { + "nopt": "~2.0.0" + }, + "dependencies": { + "nopt": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-2.0.0.tgz", + "integrity": "sha1-ynQW8gpeP5w7hhgPlilfo9C1Lg0=", + "dev": true, + "requires": { + "abbrev": "1" + } + } + } + }, + "normalize-package-data": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", + "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "is-builtin-module": "^1.0.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "^1.0.1" + } + }, + "normalize-range": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", + "integrity": "sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=", + "dev": true + }, + "npmlog": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", + "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", + "dev": true, + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "num2fraction": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/num2fraction/-/num2fraction-1.2.2.tgz", + "integrity": "sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4=", + "dev": true + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true + }, + "oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", + "dev": true, + "optional": true + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1" + } + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true + }, + "osenv": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", + "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", + "dev": true, + "optional": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, + "requires": { + "error-ex": "^1.2.0" + } + }, + "parse-passwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", + "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=" + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "dev": true, + "requires": { + "pinkie-promise": "^2.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + }, + "path-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", + "dev": true, + "optional": true + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "dev": true + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "dev": true, + "requires": { + "pinkie": "^2.0.0" + } + }, + "postcss": { + "version": "6.0.23", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "postcss-value-parser": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.0.tgz", + "integrity": "sha1-h/OPnxj3dKSrTIojL1xc6IcqnRU=", + "dev": true + }, + "prebuild-install": { + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-2.5.3.tgz", + "integrity": "sha512-/rI36cN2g7vDQnKWN8Uzupi++KjyqS9iS+/fpwG4Ea8d0Pip0PQ5bshUNzVwt+/D2MRfhVAplYMMvWLqWrCF/g==", + "dev": true, + "optional": true, + "requires": { + "detect-libc": "^1.0.3", + "expand-template": "^1.0.2", + "github-from-package": "0.0.0", + "minimist": "^1.2.0", + "mkdirp": "^0.5.1", + "node-abi": "^2.2.0", + "noop-logger": "^0.1.1", + "npmlog": "^4.0.1", + "os-homedir": "^1.0.1", + "pump": "^2.0.1", + "rc": "^1.1.6", + "simple-get": "^2.7.0", + "tar-fs": "^1.13.0", + "tunnel-agent": "^0.6.0", + "which-pm-runs": "^1.0.0" + }, + "dependencies": { + "detect-libc": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", + "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=", + "dev": true, + "optional": true + }, + "minimist": { + "version": "1.2.0", + "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true, + "optional": true + } + } + }, + "pretty-bytes": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-4.0.2.tgz", + "integrity": "sha1-sr+C5zUNZcbDOqlaqlpPYyf2HNk=", + "dev": true + }, + "process-nextick-args": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==" + }, + "psl": { + "version": "1.1.29", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.29.tgz", + "integrity": "sha512-AeUmQ0oLN02flVHXWh9sSJF7mcdFq0ppid/JkErufc3hGIV/AMa8Fo9VgDo/cT2jFdOWoFvHp90qqBH54W+gjQ==", + "dev": true, + "optional": true + }, + "pump": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", + "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", + "dev": true, + "optional": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true, + "optional": true + }, + "qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", + "dev": true, + "optional": true + }, + "rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "dev": true, + "optional": true, + "requires": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true, + "optional": true + } + } + }, + "read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "dev": true, + "requires": { + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" + } + }, + "read-pkg-up": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "dev": true, + "requires": { + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" + } + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "redent": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", + "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", + "dev": true, + "requires": { + "indent-string": "^2.1.0", + "strip-indent": "^1.0.1" + } + }, + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", + "dev": true + }, + "repeating": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", + "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", + "dev": true, + "requires": { + "is-finite": "^1.0.0" + } + }, + "replace-ext": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz", + "integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=" + }, + "request": { + "version": "2.88.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", + "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", + "dev": true, + "optional": true, + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.0", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.4.3", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + } + }, + "resolve": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", + "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", + "dev": true + }, + "resolve-dir": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-0.1.1.tgz", + "integrity": "sha1-shklmlYC+sXFxJatiUpujMQwJh4=", + "requires": { + "expand-tilde": "^1.2.2", + "global-modules": "^0.2.3" + } + }, + "rimraf": { + "version": "2.2.8", + "resolved": "http://registry.npmjs.org/rimraf/-/rimraf-2.2.8.tgz", + "integrity": "sha1-5Dm+Kq7jJzIZUnMPmaiSnk/FBYI=", + "dev": true + }, + "rtlcss": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/rtlcss/-/rtlcss-2.4.0.tgz", + "integrity": "sha512-hdjFhZ5FCI0ABOfyXOMOhBtwPWtANLCG7rOiOcRf+yi5eDdxmDjqBruWouEnwVdzfh/TWF6NNncIEsigOCFZOA==", + "requires": { + "chalk": "^2.3.0", + "findup": "^0.1.5", + "mkdirp": "^0.5.1", + "postcss": "^6.0.14", + "strip-json-comments": "^2.0.0" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "semver": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/semver/-/semver-4.3.6.tgz", + "integrity": "sha1-MAvG4OhjdPe6YQaLWx7NV/xlMto=", + "dev": true + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, + "set-getter": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/set-getter/-/set-getter-0.1.0.tgz", + "integrity": "sha1-12nBgsnVpR9AkUXy+6guXoboA3Y=", + "requires": { + "to-object-path": "^0.3.0" + } + }, + "shelljs": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.3.0.tgz", + "integrity": "sha1-NZbmMHp4FUT1kfN9phg2DzHbV7E=", + "dev": true + }, + "sigmund": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz", + "integrity": "sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA=", + "dev": true + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "dev": true + }, + "simple-concat": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.0.tgz", + "integrity": "sha1-c0TLuLbib7J9ZrL8hvn21Zl1IcY=", + "dev": true, + "optional": true + }, + "simple-get": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-2.8.1.tgz", + "integrity": "sha512-lSSHRSw3mQNUGPAYRqo7xy9dhKmxFXIjLjp4KHpf99GEH2VH7C3AM+Qfx6du6jhfUi6Vm7XnbEVEf7Wb6N8jRw==", + "dev": true, + "optional": true, + "requires": { + "decompress-response": "^3.3.0", + "once": "^1.3.1", + "simple-concat": "^1.0.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + }, + "spdx-correct": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.0.tgz", + "integrity": "sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g==", + "dev": true, + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz", + "integrity": "sha512-4K1NsmrlCU1JJgUrtgEeTVyfx8VaYea9J9LvARxhbHtVtohPs/gFGG5yy49beySjlIMhhXZ4QqujIZEfS4l6Cg==", + "dev": true + }, + "spdx-expression-parse": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", + "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", + "dev": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz", + "integrity": "sha512-2+EPwgbnmOIl8HjGBXXMd9NAu02vLjOO1nWw4kmeRDFyHn+M/ETfHxQUK0oXg8ctgVnl9t3rosNVsZ1jG61nDA==", + "dev": true + }, + "sprintf-js": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.1.tgz", + "integrity": "sha1-Nr54Mgr+WAH2zqPueLblqrlA6gw=", + "dev": true + }, + "sshpk": { + "version": "1.14.2", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.14.2.tgz", + "integrity": "sha1-xvxhZIo9nE52T9P8306hBeSSupg=", + "dev": true, + "optional": true, + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + } + }, + "stream-buffers": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/stream-buffers/-/stream-buffers-2.2.0.tgz", + "integrity": "sha1-kdX1Ew0c75bc+n9yaUUYh0HQnuQ=", + "dev": true + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "^0.2.0" + } + }, + "strip-bom-buffer": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/strip-bom-buffer/-/strip-bom-buffer-0.1.1.tgz", + "integrity": "sha1-yj3cSRnBP5/d8wsd/xAKmDUki00=", + "requires": { + "is-buffer": "^1.1.0", + "is-utf8": "^0.2.0" + } + }, + "strip-bom-string": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/strip-bom-string/-/strip-bom-string-0.1.2.tgz", + "integrity": "sha1-nG5yCjE7qYNliVGEBcz7iKX0G5w=" + }, + "strip-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", + "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", + "dev": true, + "requires": { + "get-stdin": "^4.0.1" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" + }, + "success-symbol": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/success-symbol/-/success-symbol-0.1.0.tgz", + "integrity": "sha1-JAIuSG878c3KCUKDt2nEctO3KJc=" + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "requires": { + "has-flag": "^3.0.0" + } + }, + "tar": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz", + "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", + "dev": true, + "optional": true, + "requires": { + "block-stream": "*", + "fstream": "^1.0.2", + "inherits": "2" + } + }, + "tar-fs": { + "version": "1.16.3", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-1.16.3.tgz", + "integrity": "sha512-NvCeXpYx7OsmOh8zIOP/ebG55zZmxLE0etfWRbWok+q2Qo8x/vOR/IJT1taADXPe+jsiu9axDb3X4B+iIgNlKw==", + "dev": true, + "optional": true, + "requires": { + "chownr": "^1.0.1", + "mkdirp": "^0.5.1", + "pump": "^1.0.0", + "tar-stream": "^1.1.2" + }, + "dependencies": { + "pump": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/pump/-/pump-1.0.3.tgz", + "integrity": "sha512-8k0JupWme55+9tCVE+FS5ULT3K6AbgqrGa58lTT49RpyfwwcGedHqaC5LlQNdEAumn/wFsu6aPwkuPMioy8kqw==", + "dev": true, + "optional": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + } + } + }, + "tar-stream": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.1.tgz", + "integrity": "sha512-IFLM5wp3QrJODQFPm6/to3LJZrONdBY/otxcvDIQzu217zKye6yVR3hhi9lAjrC2Z+m/j5oDxMPb1qcd8cIvpA==", + "dev": true, + "requires": { + "bl": "^1.0.0", + "buffer-alloc": "^1.1.0", + "end-of-stream": "^1.0.0", + "fs-constants": "^1.0.0", + "readable-stream": "^2.3.0", + "to-buffer": "^1.1.0", + "xtend": "^4.0.0" + } + }, + "through2": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", + "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", + "requires": { + "readable-stream": "^2.1.5", + "xtend": "~4.0.1" + } + }, + "tiny-lr-fork": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/tiny-lr-fork/-/tiny-lr-fork-0.0.5.tgz", + "integrity": "sha1-Hpnh4qhGm3NquX2X7vqYxx927Qo=", + "dev": true, + "requires": { + "debug": "~0.7.0", + "faye-websocket": "~0.4.3", + "noptify": "~0.0.3", + "qs": "~0.5.2" + }, + "dependencies": { + "qs": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/qs/-/qs-0.5.6.tgz", + "integrity": "sha1-MbGtBYVnZRxSaSFQa5qHk5EaA4Q=", + "dev": true + } + } + }, + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "requires": { + "os-tmpdir": "~1.0.2" + } + }, + "to-buffer": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz", + "integrity": "sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==", + "dev": true + }, + "to-file": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/to-file/-/to-file-0.2.0.tgz", + "integrity": "sha1-I2xsCIBl5XDe+9Fc9LTlZb5G6pM=", + "requires": { + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "file-contents": "^0.2.4", + "glob-parent": "^2.0.0", + "is-valid-glob": "^0.3.0", + "isobject": "^2.1.0", + "lazy-cache": "^2.0.1", + "vinyl": "^1.1.1" + }, + "dependencies": { + "file-contents": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/file-contents/-/file-contents-0.2.4.tgz", + "integrity": "sha1-BQb3uO/2KvpFrkXaTfnp1H30U8s=", + "requires": { + "extend-shallow": "^2.0.0", + "file-stat": "^0.1.0", + "graceful-fs": "^4.1.2", + "is-buffer": "^1.1.0", + "is-utf8": "^0.2.0", + "lazy-cache": "^0.2.3", + "through2": "^2.0.0" + }, + "dependencies": { + "lazy-cache": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-0.2.7.tgz", + "integrity": "sha1-f+3fLctu23fRHvHRF6tf/fCrG2U=" + } + } + }, + "file-stat": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/file-stat/-/file-stat-0.1.3.tgz", + "integrity": "sha1-0PGWHX0QcykoEgpuaVVHHCpbVBE=", + "requires": { + "graceful-fs": "^4.1.2", + "lazy-cache": "^0.2.3", + "through2": "^2.0.0" + }, + "dependencies": { + "lazy-cache": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-0.2.7.tgz", + "integrity": "sha1-f+3fLctu23fRHvHRF6tf/fCrG2U=" + } + } + } + } + }, + "to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "tough-cookie": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", + "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", + "dev": true, + "optional": true, + "requires": { + "psl": "^1.1.24", + "punycode": "^1.4.1" + } + }, + "trim-newlines": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", + "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", + "dev": true + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "dev": true, + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "dev": true, + "optional": true + }, + "uglify-js": { + "version": "3.4.9", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.9.tgz", + "integrity": "sha512-8CJsbKOtEbnJsTyv6LE6m6ZKniqMiFWmm9sRbopbkGs3gMPPfd3Fh8iIA4Ykv5MgaTbqHr4BaoGLJLZNhsrW1Q==", + "dev": true, + "requires": { + "commander": "~2.17.1", + "source-map": "~0.6.1" + }, + "dependencies": { + "commander": { + "version": "2.17.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz", + "integrity": "sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==", + "dev": true + } + } + }, + "unc-path-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", + "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=" + }, + "underscore": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.7.0.tgz", + "integrity": "sha1-a7rwh3UA02vjTsqlhODbn+8DUgk=", + "dev": true + }, + "underscore.string": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.2.1.tgz", + "integrity": "sha1-18D6KvXVoaZ/QlPa7pgTLnM/Dxk=", + "dev": true + }, + "uri-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/uri-path/-/uri-path-1.0.0.tgz", + "integrity": "sha1-l0fwGDWJM8Md4PzP2C0TjmcmLjI=", + "dev": true + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "uuid": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", + "dev": true, + "optional": true + }, + "validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "dev": true, + "optional": true, + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "vinyl": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-1.2.0.tgz", + "integrity": "sha1-XIgDbPVl5d8FVYv8kR+GVt8hiIQ=", + "requires": { + "clone": "^1.0.0", + "clone-stats": "^0.0.1", + "replace-ext": "0.0.1" + } + }, + "walkdir": { + "version": "0.0.11", + "resolved": "https://registry.npmjs.org/walkdir/-/walkdir-0.0.11.tgz", + "integrity": "sha1-oW0CXrkxvQO1LzCMrtD0D86+lTI=", + "dev": true + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "requires": { + "isexe": "^2.0.0" + } + }, + "which-pm-runs": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/which-pm-runs/-/which-pm-runs-1.0.0.tgz", + "integrity": "sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs=", + "dev": true, + "optional": true + }, + "wide-align": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", + "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", + "dev": true, + "requires": { + "string-width": "^1.0.2 || 2" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "xtend": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" + }, + "zip-stream": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-1.2.0.tgz", + "integrity": "sha1-qLxF9MG0lpnGuQGYuqyqzbzUugQ=", + "dev": true, + "requires": { + "archiver-utils": "^1.3.0", + "compress-commons": "^1.2.0", + "lodash": "^4.8.0", + "readable-stream": "^2.0.0" + }, + "dependencies": { + "lodash": { + "version": "4.17.10", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", + "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==", + "dev": true + } + } + } + } +} diff --git a/package.json b/package.json index fe5b8308..bf7babc8 100644 --- a/package.json +++ b/package.json @@ -27,4 +27,4 @@ "copy": "^0.3.1", "rtlcss": "^2.2.1" } -} \ No newline at end of file +} From 10207c2392ec98b78819a50ed1f9f50129387513 Mon Sep 17 00:00:00 2001 From: TruongSa Date: Sat, 8 Sep 2018 13:59:06 +0700 Subject: [PATCH 25/38] Add dotted navigation. fixed #312 --- assets/js/jquery.bully.js | 206 ++++++++++++++ assets/sass/_bully.scss | 119 +++++++++ assets/sass/style.scss | 1 + functions.php | 11 +- inc/class-dots-navigation.php | 252 ++++++++++++++++++ .../options-dots-navigation.php | 17 ++ inc/customizer.php | 1 + style.css | 220 ++++++++++++--- 8 files changed, 784 insertions(+), 43 deletions(-) create mode 100644 assets/js/jquery.bully.js create mode 100644 assets/sass/_bully.scss create mode 100644 inc/class-dots-navigation.php create mode 100644 inc/customize-configs/options-dots-navigation.php diff --git a/assets/js/jquery.bully.js b/assets/js/jquery.bully.js new file mode 100644 index 00000000..cd8a3d83 --- /dev/null +++ b/assets/js/jquery.bully.js @@ -0,0 +1,206 @@ +/*! + * jQuery Bully Plugin v0.1.3 + * Examples and documentation at http://pixelgrade.github.io/rellax/ + * Copyright (c) 2016 PixelGrade http://www.pixelgrade.com + * Licensed under MIT http://www.opensource.org/licenses/mit-license.php/ + */ +;( + function( $, window, document, undefined ) { + + var $window = $( window ), + windowHeight = $window.height(), + elements = [], + $bully, + lastScrollY = (window.pageYOffset || document.documentElement.scrollTop) - (document.documentElement.clientTop || 0), + current = 0, + inversed = false, + frameRendered = true; + + $bully = $( '
' ).appendTo( 'body' ); + $current = $( '
' ).appendTo( $bully ); + + ( + function update() { + if ( frameRendered !== true ) { + + var count = 0, + inverse = false; + + var lastItemId = false; + var top = 0; + if ($( '#masthead' ).hasClass( 'is-sticky' ) ) { + top = $( '#masthead' ).outerHeight(); + } + + $.each( elements, function( i, element ) { + if ( lastScrollY >= element.offset.top - top - windowHeight / 2 ) { + count = count + 1; + inverse = lastScrollY < element.offset.top - top + element.height - windowHeight / 2; + lastItemId = element.element.id; + } + + } ); + + if ( inversed !== inverse ) { + inversed = inverse; + $bully.toggleClass( 'c-bully--inversed', inversed ); + } + + if ( count !== current ) { + var activeBullet = $bully.find( '#bully__'+lastItemId ); + var bullyOffset = $bully.offset(); + var offset = 0; + if ( activeBullet.length > 0 ) { + offset = activeBullet.offset().top - bullyOffset.top; + } + + //var offset = $bully.children( '.c-bully__bullet' ).not( '.c-bully__bullet--active' ).first().outerHeight( true ) * ( count - 1 ); + + $current.removeClass( 'c-bully__bullet--squash' ); + setTimeout( function() { + $current.addClass( 'c-bully__bullet--squash' ); + } ); + $current.css( 'top', offset ); + current = count; + + $bully.find( '.c-bully__bullet--pop' ).removeClass('c-bully__current'); + activeBullet.addClass('c-bully__current'); + + } + } + + window.requestAnimationFrame( update ); + frameRendered = true; + } + )(); + + function reloadAll() { + $.each( elements, function( i, element ) { + element._reloadElement(); + } ); + } + + function staggerClass( $elements, classname, timeout ) { + + $.each( $elements, function( i, obj ) { + + var stagger = i * timeout; + + setTimeout( function() { + obj.$bullet.addClass( classname ); + }, stagger ); + } ); + } + + $window.on( 'load', function( e ) { + staggerClass( elements, 'c-bully__bullet--pop', 400 ); + frameRendered = false; + } ); + + $window.on( 'scroll', function( e ) { + if ( frameRendered === true ) { + lastScrollY = (window.pageYOffset || document.documentElement.scrollTop) - (document.documentElement.clientTop || 0); + } + frameRendered = false; + } ); + + $window.on( 'load resize', function() { + reloadAll(); + } ); + + function Bully( element, options ) { + this.element = element; + this.options = $.extend( {}, $.fn.bully.defaults, options ); + + var label = ''; + var id = element.id; + + var self = this, + $bullet = $( '
' ); + + if( Onepress_Bully.enable_label ) { + if ( id && typeof Onepress_Bully.sections[ id ] !== "undefined" ) { + label = Onepress_Bully.sections[ id ].title; + } + if ( label ) { + $bullet.append( '
'+label+'
' ); + } + } + + $bullet.data( 'bully-data', self ).appendTo( $bully ); + $bullet.on( 'click', function( event ) { + event.preventDefault(); + event.stopPropagation(); + + self.onClick(); + } ); + + this.$bullet = $bullet; + + self._reloadElement(); + elements.push( self ); + current = 0; + } + + Bully.prototype = { + constructor: Bully, + _reloadElement: function() { + this.offset = $( this.element ).offset(); + this.height = $( this.element ).outerHeight(); + }, + _calcTop: function( top ){ + // check if has sticky + if ($( '#masthead' ).hasClass( 'is-sticky' ) ) { + top -= $( '#masthead' ).outerHeight(); + } + + return top; + }, + onClick: function() { + + var self = this, + $target = $( 'html, body' ); + + if ( self.options.scrollDuration == 0 ) { + $target.scrollTop( self.offset.top ); + return; + } + + if ( self.options.scrollDuration === 'auto' ) { + var duration = Math.abs( lastScrollY - self.offset.top ) / ( + self.options.scrollPerSecond / 1000 + ); + $target.animate( {scrollTop: this._calcTop( self.offset.top ) }, duration ); + return; + } + + $target.animate( {scrollTop: this._calcTop( self.offset.top ) }, self.options.scrollDuration ); + } + }; + + $.fn.bully = function( options ) { + return this.each( function() { + if ( ! $.data( this, "plugin_" + Bully ) ) { + $.data( this, "plugin_" + Bully, new Bully( this, options ) ); + } + } ); + }; + + $.fn.bully.defaults = { + scrollDuration: 'auto', + scrollPerSecond: 4000, + }; + + $window.on( 'rellax load', reloadAll ); + + + } +)( jQuery, window, document ); + + +//init Bullly +jQuery( document ).ready( function( $ ){ + $.each( Onepress_Bully.sections, function( id, args ){ + $( '#'+id ).bully(); + } ); +} ); diff --git a/assets/sass/_bully.scss b/assets/sass/_bully.scss new file mode 100644 index 00000000..25b7332f --- /dev/null +++ b/assets/sass/_bully.scss @@ -0,0 +1,119 @@ +/** +* JQuery Bullly +* @see https://github.com/pixelgrade/rellax/blob/gh-pages/assets/css/bully.css + */ +[class*="c-bully"], +[class*="c-bully"]:before, +[class*="c-bully"]:after { + box-sizing: border-box; +} + +.c-bully { + position: fixed; + top: 50%; + right: 48px; + font-size: 12px; + transform: translate(0, -50%); + z-index: 9000; + color: #333; + +} +/* +.c-bully--inversed { + color: #FFF; +} +*/ + +.c-bully__ { + &bullet { + padding: 0.5em; + opacity: 0; + cursor: pointer; + position: relative; + &:hover { + .c-bully__title { + opacity: 1; + transform: scale(1); + } + } + } + &title { + position: absolute; + right: 100%; + top: 0px; + left: auto; + background: rgba( 0,0,0, .6 ); + padding: 2px 10px; + transition: all 0.2s ease-out; + overflow: hidden; + display: block; + opacity: 0; + white-space: nowrap; + color: rgba( 255, 255, 255, .8); + transform: scale(.6); + } + +} + +.c-bully__bullet:after { + content: ""; + + display: block; + width: 1em; + height: 1em; + + border: 2px solid currentColor; + border-radius: 50%; + box-shadow: inset 0px 0px 8px 3px rgba(255, 255, 255, 0.30); + will-change: transform; +} + +.c-bully__bullet--active { + position: absolute; + top: 0; + left: 0; + + transition: top 0.2s ease-out; +} + +.c-bully__bullet--active:before { + content: ""; + width: 1em; + height: 1em; + position: absolute; + top: 50%; + left: 50%; + font-size: 14px; + transform: translate(-50%, -50%); + background: currentColor; + border-radius: 50%; + +} + +.c-bully__bullet--active:after { + border-color: transparent; +} + +.c-bully__bullet--pop { + animation: bully-pop 0.6s cubic-bezier(0.485, 1.630, 0.430, 2) forwards, fade-in 0.2s 0.2s ease-out forwards; +} + +.c-bully__bullet--squash { + opacity: 1; + animation: bully-squash 0.2s ease-out forwards; +} + +@keyframes fade-in { + 0% { opacity: 0 } + 100% { opacity: 1 } +} + +@keyframes bully-pop { + 50% { transform: scale(0.7); } + 100% { transform: scale(1); } +} + +@keyframes bully-squash { + 50% { transform: scale(0.6, 1.8) } + 100% { transform: scale(1) } +} \ No newline at end of file diff --git a/assets/sass/style.scss b/assets/sass/style.scss index 4d52fad2..8ee478a9 100644 --- a/assets/sass/style.scss +++ b/assets/sass/style.scss @@ -81,3 +81,4 @@ Nicolas Gallagher and Jonathan Neal http://necolas.github.com/normalize.css/ 9.0 External Plugins --------------------------------------------------------------*/ @import "external_plugins"; +@import "bully"; diff --git a/functions.php b/functions.php index 85f33c4b..d87e7751 100644 --- a/functions.php +++ b/functions.php @@ -253,8 +253,9 @@ function onepress_scripts() { wp_enqueue_style('onepress-gallery-lightgallery', get_template_directory_uri() . '/assets/css/lightgallery.css'); } - wp_enqueue_script( 'onepress-theme', get_template_directory_uri() . '/assets/js/theme.js', array(), $version, true ); - if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { + wp_enqueue_script( 'onepress-theme', get_template_directory_uri() . '/assets/js/theme.js', array(), $version, true ); + + if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } @@ -470,6 +471,12 @@ function onepress_the_excerpt( $type = false, $length = false ){ */ require get_template_directory() . '/inc/extras.php'; +/** + * Dots Navigation class + * @since 2.1.0 + */ +require get_template_directory() . '/inc/class-dots-navigation.php'; + /** * Customizer additions. */ diff --git a/inc/class-dots-navigation.php b/inc/class-dots-navigation.php new file mode 100644 index 00000000..79b05160 --- /dev/null +++ b/inc/class-dots-navigation.php @@ -0,0 +1,252 @@ + array( + 'label' => __( 'Section: Hero', 'onepress' ), + 'title' => '', + 'default' => false + ), + 'about' => array( + 'label' => __( 'Section: About', 'onepress' ), + 'title' => __( 'About Us', 'onepress' ), + 'default' => 1 + ), + 'contact' => array( + 'label' => __( 'Section: Contact', 'onepress' ), + 'title' => __( 'Get in touch', 'onepress' ), + 'default' => 1 + ), + 'counter' => array( + 'label' => __( 'Section: Counter', 'onepress' ), + 'title' => __( 'Our Numbers', 'onepress' ), + 'default' => '' + ), + 'features' => array( + 'label' => __( 'Section: Features', 'onepress' ), + 'title' => __( 'Features', 'onepress' ), + 'default' => 1 + ), + 'gallery' => array( + 'label' => __( 'Section: Gallery', 'onepress' ), + 'title' => __( 'Gallery', 'onepress' ), + 'default' => 1 + ), + 'news' => array( + 'label' => __( 'Section: News', 'onepress' ), + 'title' => __( 'Latest News', 'onepress' ), + 'default' => 1 + ), + 'services' => array( + 'label' => __( 'Section: Services', 'onepress' ), + 'title' => __( 'Our Services', 'onepress' ), + 'default' => 1 + ), + 'team' => array( + 'label' => __( 'Section: Team', 'onepress' ), + 'title' => __( 'Our Team', 'onepress' ), + 'default' => 1 + ), + 'videolightbox' => array( + 'label' => __( 'Section: Video Lightbox', 'onepress' ), + 'title' => '', + 'default' => '' + ), + ); + + $new = array( + 'hero' => $sections_config['hero'] + ); + foreach ( $sorted_sections as $id ) { + if ( isset( $sorted_sections[ $id ] ) ) { + $new[ $id ] = $sections_config[ $id ]; + } + } + + return apply_filters( 'onepress_dots_navigation_get_sections', $new ); + + } + + function get_name( $id ) { + return $this->key.$id; + } + + function add_customize( $wp_customize, $section_id ){ + + $wp_customize->add_setting( $section_id.'_enable', + array( + 'sanitize_callback' => 'onepress_sanitize_text', + 'default' => false, + ) + ); + $wp_customize->add_control( $section_id.'_enable', + array( + 'label' => __( 'Enable dots navigation', 'onepress' ), + 'section' => $section_id, + 'type' => 'checkbox', + ) + ); + + $wp_customize->add_setting( $section_id.'_enable_label', + array( + 'sanitize_callback' => 'onepress_sanitize_text', + 'default' => 1, + ) + ); + $wp_customize->add_control( $section_id.'_enable_label', + array( + 'label' => __( 'Enable navigation label', 'onepress' ), + 'section' => $section_id, + 'type' => 'checkbox', + ) + ); + + // Show dots message + $wp_customize->add_setting( $section_id.'_em', + array( + 'sanitize_callback' => 'onepress_sanitize_text', + ) + ); + $wp_customize->add_control( new OnePress_Misc_Control( $wp_customize, $section_id.'_em', + array( + 'type' => 'custom_message', + 'section' => $section_id, + 'description' => ''.__( 'Enable dots nav for sections', 'onepress' ).'', + ) + )); + + foreach ( $this->get_sections() as $id => $args ) { + + $name = $this->get_name( $id ); + + $wp_customize->add_setting( $name, + array( + 'sanitize_callback' => 'onepress_sanitize_checkbox', + 'default' => 1, + //'transport' => 'postMessage' + ) + ); + $wp_customize->add_control( $name, + array( + 'label' => $args['label'], + 'section' => $section_id, + 'type' => 'checkbox', + ) + ); + } + + // Show dots message + $wp_customize->add_setting( $section_id.'_custom_title_m', + array( + 'sanitize_callback' => 'onepress_sanitize_text', + ) + ); + $wp_customize->add_control( new OnePress_Misc_Control( $wp_customize, $section_id.'_custom_title_m', + array( + 'type' => 'custom_message', + 'section' => $section_id, + 'description' => '

'.__( 'Custom Navigation Labels', 'onepress' ).'

', + ) + )); + + + foreach ( $this->get_sections() as $id => $args ) { + + $name = $this->get_name( $id.'_label' ); + + $wp_customize->add_setting( $name, + array( + 'sanitize_callback' => 'sanitize_text_field', + 'default' => '', + //'transport' => 'postMessage' + ) + ); + $wp_customize->add_control( $name, + array( + 'label' => $args['label'], + 'section' => $section_id, + ) + ); + } + + + + } + + function get_settings(){ + + $data = apply_filters( 'onepress_dots_navigation_get_settings', false ); + if ( $data ) { + return $data; + } + + $data = []; + $sections = $this->get_sections(); + foreach ( $sections as $id => $args ) { + + if ( ! get_theme_mod( 'onepress_' . $id . '_disable', false ) + || ( isset( $args['show_section'] ) && $args['show_section'] ) + ) { + $name = $this->get_name( $id ); + $enable = get_theme_mod( $name, $args['default'] ); + if ( $enable ) { + $data[ $id ] = array( + 'id' => $id, + 'enable' => get_theme_mod( $name, $args['default'] ), + 'title' => get_theme_mod( 'onepress_' . $id . '_title', $args['title'] ), + ); + $custom_title = get_theme_mod( $this->get_name( $id.'_label' ), false ); + if( $custom_title ) { + $data[ $id ]['title'] = $custom_title; + } + } + } + + } + + return $data; + } + + function scripts(){ + if ( get_theme_mod( 'onepress_dots_nav_enable', false ) ) { + if ( is_front_page() ) { + wp_enqueue_script( 'jquery.bully', get_template_directory_uri() . '/assets/js/jquery.bully.js', array( 'jquery' ), false, true ); + wp_localize_script( 'jquery.bully', 'Onepress_Bully', array( + 'enable_label' => get_theme_mod( 'onepress_dots_nav_enable_label', true ) ? true : false, + 'sections' => $this->get_settings() + ) ); + } + } + } + + function init(){ + add_action( 'wp_enqueue_scripts', array( $this, 'scripts' ) ); + } + +} + +Onepress_Dots_Navigation::get_instance()->init(); + + diff --git a/inc/customize-configs/options-dots-navigation.php b/inc/customize-configs/options-dots-navigation.php new file mode 100644 index 00000000..b215fb38 --- /dev/null +++ b/inc/customize-configs/options-dots-navigation.php @@ -0,0 +1,17 @@ +add_section( 'onepress_dots_nav', + array( + 'priority' => null, + 'title' => esc_html__( 'Dots Navigation', 'onepress' ), + 'description' => '', + 'panel' => 'onepress_options', + ) +); + +Onepress_Dots_Navigation::get_instance()->add_customize( $wp_customize, 'onepress_dots_nav' ); + + diff --git a/inc/customizer.php b/inc/customizer.php index f6f7a485..94ed72f5 100644 --- a/inc/customizer.php +++ b/inc/customizer.php @@ -86,6 +86,7 @@ function onepress_customize_register( $wp_customize ) { require_once $path. '/inc/customize-configs/options-colors.php'; require_once $path. '/inc/customize-configs/options-header.php'; require_once $path. '/inc/customize-configs/options-navigation.php'; + require_once $path. '/inc/customize-configs/options-dots-navigation.php'; require_once $path. '/inc/customize-configs/options-page.php'; require_once $path. '/inc/customize-configs/options-blog-posts.php'; require_once $path. '/inc/customize-configs/options-single.php'; diff --git a/style.css b/style.css index 8c54059f..92ef9b84 100644 --- a/style.css +++ b/style.css @@ -266,6 +266,8 @@ var { font-family: Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace; background-color: #e9e9e9; padding: 5px 7px; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; border-radius: 2px; } @@ -385,6 +387,8 @@ input[type="reset"], input[type="submit"], input[type="submit"], .pirate-forms-s line-height: 1; text-align: center; padding: 15px 23px 15px 23px; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; border-radius: 2px; box-shadow: 0 -1px 0 0 rgba(0, 0, 0, 0.1) inset; margin: 3px 0; @@ -498,6 +502,8 @@ input[type="radio"], input[type="checkbox"] { .screen-reader-text:active, .screen-reader-text:focus { background-color: #f8f9f9; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; border-radius: 3px; clip: auto !important; color: #03c4eb; @@ -729,7 +735,6 @@ Footer widgets z-index: 1000; -webkit-transition: all 1s ease-out; /* Safari */ - -webkit-transition: all .5s ease-out; transition: all .5s ease-out; box-shadow: 0 5px 10px 0 rgba(50, 50, 50, 0.06); } @@ -887,7 +892,6 @@ Footer widgets } .header-social a:hover { color: #000000; - -webkit-transition: all 0.2s linear 0s; transition: all 0.2s linear 0s; } .header-social .fa-stack-1x, .header-social .fa-stack-2x { @@ -1119,6 +1123,7 @@ Footer widgets right: 5px; margin-top: -2px; -webkit-transition: rotate 0.2s, translate 0.2s; + -moz-transition: rotate 0.2s, translate 0.2s; transition: rotate 0.2s, translate 0.2s; display: inline-block; height: 3px; @@ -1140,17 +1145,20 @@ Footer widgets content: ''; right: 0; -webkit-transform: translateZ(0); + -moz-transform: translateZ(0); -ms-transform: translateZ(0); + -o-transform: translateZ(0); transform: translateZ(0); -webkit-backface-visibility: hidden; backface-visibility: hidden; -webkit-transform-origin: 0% 50%; + -moz-transform-origin: 0% 50%; -ms-transform-origin: 0% 50%; + -o-transform-origin: 0% 50%; transform-origin: 0% 50%; -webkit-transition: -webkit-transform 0.2s; - transition: -webkit-transform 0.2s; + -moz-transition: -moz-transform 0.2s; transition: transform 0.2s; - transition: transform 0.2s, -webkit-transform 0.2s; } #nav-toggle.nav-is-visible span { @@ -1158,12 +1166,16 @@ Footer widgets } #nav-toggle.nav-is-visible span:before { -webkit-transform: translateX(4px) translateY(-1px) rotate(45deg); + -moz-transform: translateX(4px) translateY(-1px) rotate(45deg); -ms-transform: translateX(4px) translateY(-1px) rotate(45deg); + -o-transform: translateX(4px) translateY(-1px) rotate(45deg); transform: translateX(4px) translateY(-1px) rotate(45deg); } #nav-toggle.nav-is-visible span:after { -webkit-transform: translateX(4px) translateY(0px) rotate(-45deg); + -moz-transform: translateX(4px) translateY(0px) rotate(-45deg); -ms-transform: translateX(4px) translateY(0px) rotate(-45deg); + -o-transform: translateX(4px) translateY(0px) rotate(-45deg); transform: translateX(4px) translateY(0px) rotate(-45deg); } #nav-toggle.nav-is-visible span:before, #nav-toggle.nav-is-visible span:after { @@ -1210,6 +1222,9 @@ Footer widgets text-align: center; border-top: 0 none; border-bottom: 0 none; + -webkit-background-size: cover; + -moz-background-size: cover; + -o-background-size: cover; background-size: cover; background-position: center center; background-repeat: no-repeat; @@ -1374,7 +1389,6 @@ Footer widgets position: absolute; right: 60px; top: -25px; - -webkit-transition: all 0.2s linear 0s; transition: all 0.2s linear 0s; width: 50px; z-index: 99; @@ -1668,6 +1682,8 @@ Footer widgets #comments .comment .avatar { width: 60px; float: left; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; border-radius: 3px; } #comments .comment .comment-wrapper { @@ -1714,6 +1730,8 @@ Footer widgets #comments .comment .comment-wrapper .comment-meta cite span { padding: 3px 10px; background: #e9e9e9; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; border-radius: 4px; margin-right: 10px; } @@ -1803,6 +1821,8 @@ Footer widgets ------------------------------*/ .btn { text-transform: uppercase; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; border-radius: 2px; box-shadow: 0 -1px 0 0 rgba(0, 0, 0, 0.1) inset; font-size: 13px; @@ -2134,8 +2154,7 @@ section > .customize-partial-edit-shortcut button { visibility: hidden; opacity: 0; -webkit-transform: translateY(100px); - -ms-transform: translateY(100px); - transform: translateY(100px); + transform: translateY(100px); -webkit-transition: all .5s linear; transition: all .5s linear; } @@ -2179,8 +2198,7 @@ section > .customize-partial-edit-shortcut button { visibility: visible; opacity: 1; -webkit-transform: translateY(0); - -ms-transform: translateY(0); - transform: translateY(0); + transform: translateY(0); } .hero-slideshow-wrapper .slider-spinner { position: absolute; @@ -2189,8 +2207,7 @@ section > .customize-partial-edit-shortcut button { z-index: 9999999; margin: 0px; -webkit-transform: translate(-50%, -50%); - -ms-transform: translate(-50%, -50%); - transform: translate(-50%, -50%); + transform: translate(-50%, -50%); } .animation-disable .hero-slideshow-wrapper { @@ -2198,8 +2215,7 @@ section > .customize-partial-edit-shortcut button { } .animation-disable .hero-slideshow-wrapper .hero__content .hero-large-text, .animation-disable .hero-slideshow-wrapper .hero__content .hero-small-text, .animation-disable .hero-slideshow-wrapper .hero__content .btn { -webkit-transform: translateY(0px); - -ms-transform: translateY(0px); - transform: translateY(0px); + transform: translateY(0px); } .animation-disable .hero-slideshow-wrapper .hero__content .hero-large-text { -webkit-transition-delay: 0s; @@ -2243,8 +2259,7 @@ section > .customize-partial-edit-shortcut button { z-index: 9999999; margin: 0px; -webkit-transform: translate(-50%, -50%); - -ms-transform: translate(-50%, -50%); - transform: translate(-50%, -50%); + transform: translate(-50%, -50%); } .js-rotating { @@ -2261,8 +2276,7 @@ section > .customize-partial-edit-shortcut button { visibility: visible; opacity: 1; -webkit-transform: translateY(0px); - -ms-transform: translateY(0px); - transform: translateY(0px); + transform: translateY(0px); -webkit-transition: all 0s linear; transition: all 0s linear; } @@ -2306,8 +2320,7 @@ section > .customize-partial-edit-shortcut button { visibility: visible; opacity: 1; -webkit-transform: translateY(0); - -ms-transform: translateY(0); - transform: translateY(0); + transform: translateY(0); } .hero-slideshow-normal .container { @@ -2320,9 +2333,7 @@ section > .customize-partial-edit-shortcut button { z-index: 80; position: relative; top: 50%; - -webkit-transform: translateY(-50%); - -ms-transform: translateY(-50%); - transform: translateY(-50%); + transform: translateY(-50%); } .hero__content { @@ -2470,9 +2481,12 @@ section > .customize-partial-edit-shortcut button { .feature-item:hover .icon-background-default { color: #333333; -webkit-transition: all 0.5s ease-in-out; + -moz-transition: all 0.5s ease-in-out; + -o-transition: all 0.5s ease-in-out; transition: all 0.5s ease-in-out; transform: scale(1.1); -webkit-transform: scale(1.1); + -moz-transform: scale(1.1); -ms-transform: scale(1.1); transform: scale(1.1); } @@ -2512,7 +2526,6 @@ section > .customize-partial-edit-shortcut button { box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08); -moz-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08); -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08); - -webkit-transition: all 100ms ease-out 0s; transition: all 100ms ease-out 0s; } @media screen and (max-width: 720px) { @@ -2633,6 +2646,8 @@ section > .customize-partial-edit-shortcut button { height: auto; min-height: 100%; display: block; + -webkit-background-size: 100% auto; + -moz-background-size: 100% auto; background-size: 100% auto; background-repeat: no-repeat; background-attachment: scroll; @@ -2663,6 +2678,8 @@ section > .customize-partial-edit-shortcut button { } .section-parallax .parallax-bg.no-img, #parallax-hero .parallax-bg.no-img { height: 120%; + -webkit-background-size: cover; + -moz-background-size: cover; background-size: cover; background-repeat: no-repeat; background-attachment: scroll; @@ -2764,12 +2781,10 @@ section > .customize-partial-edit-shortcut button { } .team-member .member-thumb:hover .member-profile { bottom: 8px; - -webkit-transition: all 0.1s linear; transition: all 0.1s linear; } .team-member .member-thumb:hover img { opacity: 0.7; - -webkit-transition: all 0.1s linear; transition: all 0.1s linear; } .team-member .member-thumb .member-profile { @@ -3242,6 +3257,8 @@ div.wpcf7-response-output { left: 0; top: 0; padding: 0 8px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; box-sizing: border-box; } @@ -3276,6 +3293,7 @@ div.wpcf7-response-output { } .mfp-zoom-out-cur, .mfp-zoom-out-cur .mfp-image-holder .mfp-close { + cursor: -moz-zoom-out; cursor: -webkit-zoom-out; cursor: zoom-out; } @@ -3283,6 +3301,7 @@ div.wpcf7-response-output { .mfp-zoom { cursor: pointer; cursor: -webkit-zoom-in; + cursor: -moz-zoom-in; cursor: zoom-in; } @@ -3296,8 +3315,7 @@ div.wpcf7-response-output { .mfp-counter { -webkit-user-select: none; -moz-user-select: none; - -ms-user-select: none; - user-select: none; + user-select: none; } .mfp-loading.mfp-figure { @@ -3344,6 +3362,7 @@ button.mfp-close, button.mfp-arrow { outline: none; padding: 0; z-index: 1046; + -webkit-box-shadow: none; box-shadow: none; } button::-moz-focus-inner { @@ -3509,6 +3528,8 @@ img.mfp-img { height: auto; display: block; line-height: 0; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; box-sizing: border-box; padding: 40px 0 40px; margin: 0 auto; @@ -3593,6 +3614,8 @@ img.mfp-img { top: auto; padding: 3px 5px; position: fixed; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; box-sizing: border-box; } .mfp-img-mobile .mfp-bottom-bar:empty { @@ -3617,20 +3640,17 @@ img.mfp-img { @media all and (max-width: 900px) { .mfp-arrow { -webkit-transform: scale(0.75); - -ms-transform: scale(0.75); - transform: scale(0.75); + transform: scale(0.75); } .mfp-arrow-left { -webkit-transform-origin: 0; - -ms-transform-origin: 0; - transform-origin: 0; + transform-origin: 0; } .mfp-arrow-right { -webkit-transform-origin: 100%; - -ms-transform-origin: 100%; - transform-origin: 100%; + transform-origin: 100%; } .mfp-container { @@ -3696,6 +3716,8 @@ img.mfp-img { background: #222222; color: #FFF; -webkit-transition: all 0.2s ease-in-out; + -moz-transition: all 0.2s ease-in-out; + -o-transition: all 0.2s ease-in-out; transition: all 0.2s ease-in-out; } @@ -3936,6 +3958,7 @@ img.mfp-img { cursor: pointer; cursor: hand; -webkit-user-select: none; + -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; @@ -3979,7 +4002,6 @@ img.mfp-img { .owl-carousel.owl-grab { cursor: move; - cursor: -webkit-grab; cursor: grab; } @@ -4039,7 +4061,6 @@ img.mfp-img { * Owl Carousel - Auto Height Plugin */ .owl-height { - -webkit-transition: height 500ms ease-in-out; transition: height 500ms ease-in-out; } @@ -4048,7 +4069,6 @@ img.mfp-img { */ .owl-carousel .owl-item .owl-lazy { opacity: 0; - -webkit-transition: opacity 400ms ease; transition: opacity 400ms ease; } @@ -4077,7 +4097,6 @@ img.mfp-img { background-position: center center; background-repeat: no-repeat; background-size: contain; - -webkit-transition: opacity 400ms ease; transition: opacity 400ms ease; } @@ -4107,9 +4126,7 @@ img.mfp-img { font-size: 22px; margin-top: 0px; padding: 4px 10px 5px; - -webkit-transform: translateY(-50%); - -ms-transform: translateY(-50%); - transform: translateY(-50%); + transform: translateY(-50%); } .owl-theme .owl-nav > div:hover { background-color: rgba(0, 0, 0, 0.6); @@ -4178,7 +4195,6 @@ img.mfp-img { background: #D6D6D6; display: block; -webkit-backface-visibility: visible; - -webkit-transition: opacity 200ms ease; transition: opacity 200ms ease; border-radius: 30px; } @@ -4207,3 +4223,125 @@ img.mfp-img { min-height: 245px; max-height: 999px; } + +/** +* JQuery Bullly +* @see https://github.com/pixelgrade/rellax/blob/gh-pages/assets/css/bully.css + */ +[class*="c-bully"], +[class*="c-bully"]:before, +[class*="c-bully"]:after { + box-sizing: border-box; +} + +.c-bully { + position: fixed; + top: 50%; + right: 48px; + font-size: 12px; + transform: translate(0, -50%); + z-index: 9000; + color: #333; +} + +/* +.c-bully--inversed { + color: #FFF; +} +*/ +.c-bully__bullet { + padding: 0.5em; + opacity: 0; + cursor: pointer; + position: relative; +} +.c-bully__bullet:hover .c-bully__title { + opacity: 1; + transform: scale(1); +} +.c-bully__title { + position: absolute; + right: 100%; + top: 0px; + left: auto; + background: rgba(0, 0, 0, 0.6); + padding: 2px 10px; + transition: all 0.2s ease-out; + overflow: hidden; + display: block; + opacity: 0; + white-space: nowrap; + color: rgba(255, 255, 255, 0.8); + transform: scale(0.6); +} + +.c-bully__bullet:after { + content: ""; + display: block; + width: 1em; + height: 1em; + border: 2px solid currentColor; + border-radius: 50%; + box-shadow: inset 0px 0px 8px 3px rgba(255, 255, 255, 0.3); + will-change: transform; +} + +.c-bully__bullet--active { + position: absolute; + top: 0; + left: 0; + transition: top 0.2s ease-out; +} + +.c-bully__bullet--active:before { + content: ""; + width: 1em; + height: 1em; + position: absolute; + top: 50%; + left: 50%; + font-size: 14px; + transform: translate(-50%, -50%); + background: currentColor; + border-radius: 50%; +} + +.c-bully__bullet--active:after { + border-color: transparent; +} + +.c-bully__bullet--pop { + animation: bully-pop 0.6s cubic-bezier(0.485, 1.63, 0.43, 2) forwards, fade-in 0.2s 0.2s ease-out forwards; +} + +.c-bully__bullet--squash { + opacity: 1; + animation: bully-squash 0.2s ease-out forwards; +} + +@keyframes fade-in { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } +} +@keyframes bully-pop { + 50% { + transform: scale(0.7); + } + 100% { + transform: scale(1); + } +} +@keyframes bully-squash { + 50% { + transform: scale(0.6, 1.8); + } + 100% { + transform: scale(1); + } +} + +/*# sourceMappingURL=style.css.map */ From 6e68cf9ece6f249aa333ea71bd62621a3383af72 Mon Sep 17 00:00:00 2001 From: TruongSa Date: Sat, 8 Sep 2018 14:08:06 +0700 Subject: [PATCH 26/38] Split controls file --- inc/customize-controls/control-category.php | 50 ++ .../control-color-alpha.php | 82 ++ .../control-custom-textarea.php | 15 + inc/customize-controls/control-editor.php | 36 + inc/customize-controls/control-misc.php | 33 + inc/customize-controls/control-pages.php | 52 ++ inc/customize-controls/control-repeater.php | 359 +++++++++ .../control-theme-support.php | 6 + inc/customize-controls/section-plus.php | 69 ++ inc/customizer-controls.php | 712 +----------------- 10 files changed, 712 insertions(+), 702 deletions(-) create mode 100644 inc/customize-controls/control-category.php create mode 100644 inc/customize-controls/control-color-alpha.php create mode 100644 inc/customize-controls/control-custom-textarea.php create mode 100644 inc/customize-controls/control-editor.php create mode 100644 inc/customize-controls/control-misc.php create mode 100644 inc/customize-controls/control-pages.php create mode 100644 inc/customize-controls/control-repeater.php create mode 100644 inc/customize-controls/control-theme-support.php create mode 100644 inc/customize-controls/section-plus.php diff --git a/inc/customize-controls/control-category.php b/inc/customize-controls/control-category.php new file mode 100644 index 00000000..de723504 --- /dev/null +++ b/inc/customize-controls/control-category.php @@ -0,0 +1,50 @@ +. + */ +class OnePress_Alpha_Color_Control extends WP_Customize_Control { + + /** + * Official control name. + */ + public $type = 'alpha-color'; + + /** + * Add support for palettes to be passed in. + * + * Supported palette values are true, false, or an array of RGBa and Hex colors. + */ + public $palette; + + /** + * Add support for showing the opacity value on the slider handle. + */ + public $show_opacity; + + /** + * Enqueue scripts and styles. + * + * Ideally these would get registered and given proper paths before this control object + * gets initialized, then we could simply enqueue them here, but for completeness as a + * stand alone class we'll register and enqueue them here. + */ + public function enqueue() { + + } + + /** + * Render the control. + */ + public function render_content() { + + // Process the palette + if ( is_array( $this->palette ) ) { + $palette = implode( '|', $this->palette ); + } else { + // Default to true. + $palette = ( false === $this->palette || 'false' === $this->palette ) ? 'false' : 'true'; + } + + // Support passing show_opacity as string or boolean. Default to true. + $show_opacity = ( false === $this->show_opacity || 'false' === $this->show_opacity ) ? 'false' : 'true'; + + // Begin the output. ?> + + + + mod = strtolower( $this->mod ); + if( ! $this->mod = 'html' ) { + $this->mod = 'tmce'; + } + ?> +
+ + +

description ?>

+
+ type ) { + default: + + case 'heading': + echo '' . $this->title . ''; + break; + + case 'custom_message' : + echo '

' . $this->description . '

'; + break; + + case 'hr' : + echo '
'; + break; + } + } +} \ No newline at end of file diff --git a/inc/customize-controls/control-pages.php b/inc/customize-controls/control-pages.php new file mode 100644 index 00000000..3e42bff6 --- /dev/null +++ b/inc/customize-controls/control-pages.php @@ -0,0 +1,52 @@ + + + $op ) { + $args['fields'][ $key ]['id'] = $key; + if( ! isset( $op['value'] ) ) { + if( isset( $op['default'] ) ) { + $args['fields'][ $key ]['value'] = $op['default']; + } else { + $args['fields'][ $key ]['value'] = ''; + } + } + + } + + $this->fields = $args['fields']; + $this->live_title_id = isset( $args['live_title_id'] ) ? $args['live_title_id'] : false; + $this->defined_values = isset( $args['defined_values'] ) ? $args['defined_values'] : false; + $this->id_key = isset( $args['id_key'] ) ? $args['id_key'] : false; + if ( isset( $args['title_format'] ) && $args['title_format'] != '' ) { + $this->title_format = $args['title_format']; + } else { + $this->title_format = ''; + } + + if ( isset( $args['limited_msg'] ) && $args['limited_msg'] != '' ) { + $this->limited_msg = $args['limited_msg']; + } else { + $this->limited_msg = ''; + } + + if ( ! isset( $args['max_item'] ) ) { + $args['max_item'] = 0; + } + + if ( ! isset( $args['allow_unlimited'] ) || $args['allow_unlimited'] != false ) { + $this->max_item = apply_filters( 'onepress_reepeatable_max_item', absint( $args['max_item'] ) ); + } else { + $this->max_item = absint( $args['max_item'] ); + } + + $this->changeable = isset( $args['changeable'] ) && $args['changeable'] == 'no' ? 'no' : 'yes'; + $this->default_empty_title = isset( $args['default_empty_title'] ) && $args['default_empty_title'] != '' ? $args['default_empty_title'] : esc_html__( 'Item', 'onepress' ); + + } + + public function merge_data( $array_value, $array_default ){ + + if ( ! $this->id_key ) { + return $array_value; + } + + if ( ! is_array( $array_value ) ) { + $array_value = array(); + } + + if ( ! is_array( $array_default ) ) { + $array_default = array(); + } + + $new_array = array(); + foreach ( $array_value as $k => $a ) { + + if ( is_array( $a ) ) { + if ( isset ( $a[ $this->id_key ] ) && $a[ $this->id_key ] != '' ) { + $new_array[ $a[ $this->id_key ] ] = $a; + } else { + $new_array[ $k ] = $a; + } + } + } + + foreach ( $array_default as $k => $a ) { + if ( is_array( $a ) && isset ( $a[ $this->id_key ] ) ) { + if ( ! isset ( $new_array[ $a[ $this->id_key ] ] ) ) { + $new_array[ $a[ $this->id_key ] ] = $a; + } + } + } + + return array_values( $new_array ); + } + + public function to_json() { + parent::to_json(); + $value = $this->value(); + + if (is_string( $value ) ) { + $value = json_decode( $value, true ); + } + if ( empty ( $value ) ){ + $value = $this->defined_values; + } elseif ( is_array( $this->defined_values ) && ! empty ( $this->defined_values ) ) { + $value = $this->merge_data( $value, $this->defined_values ); + } + + $this->json['live_title_id'] = $this->live_title_id; + $this->json['title_format'] = $this->title_format; + $this->json['max_item'] = $this->max_item; + $this->json['limited_msg'] = $this->limited_msg; + $this->json['changeable'] = $this->changeable; + $this->json['default_empty_title'] = $this->default_empty_title; + $this->json['value'] = $value; + $this->json['id_key'] = $this->id_key; + $this->json['fields'] = $this->fields; + + } + + /** + * Enqueue scripts/styles. + * + * @since 1.0.0 + * @access public + * @return void + */ + public function enqueue() { + add_action( 'customize_controls_print_footer_scripts', array( __CLASS__, 'item_tpl' ), 66 ); + } + + public static function item_tpl(){ + ?> + + + + input_attrs(); ?> value="" link(); ?> /> +
+
    +
    +
    + add_text ) ? esc_html( $this->add_text ) : __( 'Add an item', 'onepress' ); ?> +
    + +
  • +
    +
    +
    + +
    +
    +

    +
    +
    + +
    +
    +
    + <# var cond_v; #> + <# for ( i in data ) { #> + <# if ( ! data.hasOwnProperty( i ) ) continue; #> + <# field = data[i]; #> + <# if ( ! field.type ) continue; #> + <# if ( field.type ){ #> + + <# + if ( ! _.isEmpty( field.required ) ) { + #> +
    + <# + } else { + #> +
    + <# + } + #> + <# if ( field.type !== 'checkbox' ) { #> + <# if ( field.title ) { #> + + <# } #> + + <# if ( field.desc ) { #> +

    {{{ field.desc }}}

    + <# } #> + <# } #> + + <# if ( field.type === 'hidden' ) { #> + + <# } else if ( field.type === 'add_by' ) { #> + + <# } else if ( field.type === 'text' ) { #> + + <# } else if ( field.type === 'checkbox' ) { #> + + <# if ( field.title ) { #> + + <# } #> + + <# if ( field.desc ) { #> +

    {{ field.desc }}

    + <# } #> + + + <# } else if ( field.type === 'select' ) { #> + + <# if ( field.multiple ) { #> + + <# } #> + + <# for ( k in field.options ) { #> + <# if ( _.isArray( field.value ) ) { #> + + <# } else { #> + + <# } #> + <# } #> + + + + <# } else if ( field.type === 'radio' ) { #> + + <# for ( k in field.options ) { #> + + <# if ( field.options.hasOwnProperty( k ) ) { #> + + + + <# } #> + <# } #> + + <# } else if ( field.type == 'color' || field.type == 'coloralpha' ) { #> + + <# if ( field.value !='' ) { field.value = '#'+field.value ; } #> + + + + <# } else if ( field.type == 'media' ) { #> + + <# if ( !field.media || field.media == '' || field.media =='image' ) { #> + + <# } else { #> + + <# } #> + + + <# if ( !field.media || field.media == '' || field.media =='image' ) { #> +
    +
    +
    +
    + <# if ( field.value.url !== '' ){ #> + + <# } #> +
    +
    +
    +
    + <# } #> + +
    + + +
    +
    + + <# } else if ( field.type == 'textarea' || field.type == 'editor' ) { #> + + <# } else if ( field.type == 'icon' ) { #> + <# + var icon_class = field.value; + if ( icon_class.indexOf( 'fa-' ) != 0 ) { + icon_class = 'fa-' + field.value; + } else { + icon_class = icon_class.replace( 'fa ', '' ); + } + icon_class = icon_class.replace( 'fa-fa', '' ); + + #> +
    + + +
    + + <# } #> + +
    + + <# } #> + <# } #> + + +
    +
    + + | + + +
    +
    +
    + +
    +
    + +
    + +
    +
  • + OnePress Plus to be able to change the section order and styling!', 'onepress' ); + } +} diff --git a/inc/customize-controls/section-plus.php b/inc/customize-controls/section-plus.php new file mode 100644 index 00000000..af812dcf --- /dev/null +++ b/inc/customize-controls/section-plus.php @@ -0,0 +1,69 @@ +plus_text; + $json['plus_url'] = $this->plus_url; + $json['id'] = $this->id; + return $json; + } + /** + * Outputs the Underscore.js template. + * + * @since 1.0.0 + * @access public + * @return void + */ + protected function render_template() { ?> + +
  • + +

    {{{ data.plus_text }}}

    +
  • + plus_text; - $json['plus_url'] = $this->plus_url; - $json['id'] = $this->id; - return $json; - } - /** - * Outputs the Underscore.js template. - * - * @since 1.0.0 - * @access public - * @return void - */ - protected function render_template() { ?> - -
  • - -

    {{{ data.plus_text }}}

    -
  • - type ) { - default: - - case 'heading': - echo '' . $this->title . ''; - break; - - case 'custom_message' : - echo '

    ' . $this->description . '

    '; - break; - - case 'hr' : - echo '
    '; - break; - } - } -} - -class One_Press_Textarea_Custom_Control extends WP_Customize_Control -{ - public function render_content() { - ?> - - OnePress Plus to be able to change the section order and styling!', 'onepress' ); - } -} - - - - -class OnePress_Editor_Custom_Control extends WP_Customize_Control -{ - /** - * The type of customize control being rendered. - * - * @since 1.0.0 - * @access public - * @var string - */ - public $type = 'wp_editor'; - - /** - * Add support for palettes to be passed in. - * - * Supported palette values are true, false, or an array of RGBa and Hex colors. - */ - public $mod; - - public function render_content() { - $this->mod = strtolower( $this->mod ); - if( ! $this->mod = 'html' ) { - $this->mod = 'tmce'; - } - ?> -
    - - -

    description ?>

    -
    - . - */ -class OnePress_Alpha_Color_Control extends WP_Customize_Control { - - /** - * Official control name. - */ - public $type = 'alpha-color'; - - /** - * Add support for palettes to be passed in. - * - * Supported palette values are true, false, or an array of RGBa and Hex colors. - */ - public $palette; - - /** - * Add support for showing the opacity value on the slider handle. - */ - public $show_opacity; - - /** - * Enqueue scripts and styles. - * - * Ideally these would get registered and given proper paths before this control object - * gets initialized, then we could simply enqueue them here, but for completeness as a - * stand alone class we'll register and enqueue them here. - */ - public function enqueue() { - - } - - /** - * Render the control. - */ - public function render_content() { - - // Process the palette - if ( is_array( $this->palette ) ) { - $palette = implode( '|', $this->palette ); - } else { - // Default to true. - $palette = ( false === $this->palette || 'false' === $this->palette ) ? 'false' : 'true'; - } - - // Support passing show_opacity as string or boolean. Default to true. - $show_opacity = ( false === $this->show_opacity || 'false' === $this->show_opacity ) ? 'false' : 'true'; - - // Begin the output. ?> - - $op ) { - $args['fields'][ $key ]['id'] = $key; - if( ! isset( $op['value'] ) ) { - if( isset( $op['default'] ) ) { - $args['fields'][ $key ]['value'] = $op['default']; - } else { - $args['fields'][ $key ]['value'] = ''; - } - } - - } - - $this->fields = $args['fields']; - $this->live_title_id = isset( $args['live_title_id'] ) ? $args['live_title_id'] : false; - $this->defined_values = isset( $args['defined_values'] ) ? $args['defined_values'] : false; - $this->id_key = isset( $args['id_key'] ) ? $args['id_key'] : false; - if ( isset( $args['title_format'] ) && $args['title_format'] != '' ) { - $this->title_format = $args['title_format']; - } else { - $this->title_format = ''; - } - - if ( isset( $args['limited_msg'] ) && $args['limited_msg'] != '' ) { - $this->limited_msg = $args['limited_msg']; - } else { - $this->limited_msg = ''; - } - - if ( ! isset( $args['max_item'] ) ) { - $args['max_item'] = 0; - } - - if ( ! isset( $args['allow_unlimited'] ) || $args['allow_unlimited'] != false ) { - $this->max_item = apply_filters( 'onepress_reepeatable_max_item', absint( $args['max_item'] ) ); - } else { - $this->max_item = absint( $args['max_item'] ); - } - - $this->changeable = isset( $args['changeable'] ) && $args['changeable'] == 'no' ? 'no' : 'yes'; - $this->default_empty_title = isset( $args['default_empty_title'] ) && $args['default_empty_title'] != '' ? $args['default_empty_title'] : esc_html__( 'Item', 'onepress' ); - - } - - public function merge_data( $array_value, $array_default ){ - - if ( ! $this->id_key ) { - return $array_value; - } - - if ( ! is_array( $array_value ) ) { - $array_value = array(); - } - - if ( ! is_array( $array_default ) ) { - $array_default = array(); - } - - $new_array = array(); - foreach ( $array_value as $k => $a ) { - - if ( is_array( $a ) ) { - if ( isset ( $a[ $this->id_key ] ) && $a[ $this->id_key ] != '' ) { - $new_array[ $a[ $this->id_key ] ] = $a; - } else { - $new_array[ $k ] = $a; - } - } - } - - foreach ( $array_default as $k => $a ) { - if ( is_array( $a ) && isset ( $a[ $this->id_key ] ) ) { - if ( ! isset ( $new_array[ $a[ $this->id_key ] ] ) ) { - $new_array[ $a[ $this->id_key ] ] = $a; - } - } - } - - return array_values( $new_array ); - } - - public function to_json() { - parent::to_json(); - $value = $this->value(); - - if (is_string( $value ) ) { - $value = json_decode( $value, true ); - } - if ( empty ( $value ) ){ - $value = $this->defined_values; - } elseif ( is_array( $this->defined_values ) && ! empty ( $this->defined_values ) ) { - $value = $this->merge_data( $value, $this->defined_values ); - } - - $this->json['live_title_id'] = $this->live_title_id; - $this->json['title_format'] = $this->title_format; - $this->json['max_item'] = $this->max_item; - $this->json['limited_msg'] = $this->limited_msg; - $this->json['changeable'] = $this->changeable; - $this->json['default_empty_title'] = $this->default_empty_title; - $this->json['value'] = $value; - $this->json['id_key'] = $this->id_key; - $this->json['fields'] = $this->fields; - - } - - /** - * Enqueue scripts/styles. - * - * @since 1.0.0 - * @access public - * @return void - */ - public function enqueue() { - add_action( 'customize_controls_print_footer_scripts', array( __CLASS__, 'item_tpl' ), 66 ); - } - - public static function item_tpl(){ - ?> - - - - input_attrs(); ?> value="" link(); ?> /> -
    -
      -
      -
      - add_text ) ? esc_html( $this->add_text ) : __( 'Add an item', 'onepress' ); ?> -
      - -
    • -
      -
      -
      - -
      -
      -

      -
      -
      - -
      -
      -
      - <# var cond_v; #> - <# for ( i in data ) { #> - <# if ( ! data.hasOwnProperty( i ) ) continue; #> - <# field = data[i]; #> - <# if ( ! field.type ) continue; #> - <# if ( field.type ){ #> - - <# - if ( ! _.isEmpty( field.required ) ) { - #> -
      - <# - } else { - #> -
      - <# - } - #> - <# if ( field.type !== 'checkbox' ) { #> - <# if ( field.title ) { #> - - <# } #> - - <# if ( field.desc ) { #> -

      {{{ field.desc }}}

      - <# } #> - <# } #> - - <# if ( field.type === 'hidden' ) { #> - - <# } else if ( field.type === 'add_by' ) { #> - - <# } else if ( field.type === 'text' ) { #> - - <# } else if ( field.type === 'checkbox' ) { #> - - <# if ( field.title ) { #> - - <# } #> - - <# if ( field.desc ) { #> -

      {{ field.desc }}

      - <# } #> - - - <# } else if ( field.type === 'select' ) { #> - - <# if ( field.multiple ) { #> - - <# } #> - - <# for ( k in field.options ) { #> - <# if ( _.isArray( field.value ) ) { #> - - <# } else { #> - - <# } #> - <# } #> - - - - <# } else if ( field.type === 'radio' ) { #> - - <# for ( k in field.options ) { #> - - <# if ( field.options.hasOwnProperty( k ) ) { #> - - - - <# } #> - <# } #> - - <# } else if ( field.type == 'color' || field.type == 'coloralpha' ) { #> - - <# if ( field.value !='' ) { field.value = '#'+field.value ; } #> - - - - <# } else if ( field.type == 'media' ) { #> - - <# if ( !field.media || field.media == '' || field.media =='image' ) { #> - - <# } else { #> - - <# } #> - - - <# if ( !field.media || field.media == '' || field.media =='image' ) { #> -
      -
      -
      -
      - <# if ( field.value.url !== '' ){ #> - - <# } #> -
      -
      -
      -
      - <# } #> - -
      - - -
      -
      - - <# } else if ( field.type == 'textarea' || field.type == 'editor' ) { #> - - <# } else if ( field.type == 'icon' ) { #> - <# - var icon_class = field.value; - if ( icon_class.indexOf( 'fa-' ) != 0 ) { - icon_class = 'fa-' + field.value; - } else { - icon_class = icon_class.replace( 'fa ', '' ); - } - icon_class = icon_class.replace( 'fa-fa', '' ); - - #> -
      - - -
      - - <# } #> - -
      - - <# } #> - <# } #> - - -
      -
      - - | - - -
      -
      -
      - -
      -
      - -
      - -
      -
    • - - - Date: Sat, 8 Sep 2018 14:39:44 +0700 Subject: [PATCH 27/38] Rename sections #312 --- assets/css/customizer.css | 11 ++++ assets/js/jquery.bully.js | 8 ++- assets/sass/_bully.scss | 1 - functions.php | 2 +- ...tion.php => class-sections-navigation.php} | 65 +++++++------------ ...on.php => options-sections-navigation.php} | 6 +- inc/customizer.php | 2 +- style.css | 1 - 8 files changed, 46 insertions(+), 50 deletions(-) rename inc/{class-dots-navigation.php => class-sections-navigation.php} (79%) rename inc/customize-configs/{options-dots-navigation.php => options-sections-navigation.php} (59%) diff --git a/assets/css/customizer.css b/assets/css/customizer.css index 56a50e3a..0c69e909 100644 --- a/assets/css/customizer.css +++ b/assets/css/customizer.css @@ -565,3 +565,14 @@ body .wp-full-overlay{ text-indent: 0; text-align: center; } + +.onepress-c-heading { + padding: 5px 12px; + background: #BBBBBB; + margin: 10px -12px 2px; + text-transform: uppercase; + letter-spacing: 2px; + font-weight: 500; + font-size: 12px; + color: #FFFFFF; +} \ No newline at end of file diff --git a/assets/js/jquery.bully.js b/assets/js/jquery.bully.js index cd8a3d83..edd40ac1 100644 --- a/assets/js/jquery.bully.js +++ b/assets/js/jquery.bully.js @@ -83,12 +83,14 @@ function staggerClass( $elements, classname, timeout ) { $.each( $elements, function( i, obj ) { - + obj.$bullet.addClass( classname ); + /* var stagger = i * timeout; setTimeout( function() { obj.$bullet.addClass( classname ); }, stagger ); + */ } ); } @@ -201,6 +203,8 @@ //init Bullly jQuery( document ).ready( function( $ ){ $.each( Onepress_Bully.sections, function( id, args ){ - $( '#'+id ).bully(); + $( '#'+id ).bully({ + scrollPerSecond: 1000, + }); } ); } ); diff --git a/assets/sass/_bully.scss b/assets/sass/_bully.scss index 25b7332f..37ac22bd 100644 --- a/assets/sass/_bully.scss +++ b/assets/sass/_bully.scss @@ -64,7 +64,6 @@ border: 2px solid currentColor; border-radius: 50%; - box-shadow: inset 0px 0px 8px 3px rgba(255, 255, 255, 0.30); will-change: transform; } diff --git a/functions.php b/functions.php index d87e7751..482e755f 100644 --- a/functions.php +++ b/functions.php @@ -475,7 +475,7 @@ function onepress_the_excerpt( $type = false, $length = false ){ * Dots Navigation class * @since 2.1.0 */ -require get_template_directory() . '/inc/class-dots-navigation.php'; +require get_template_directory() . '/inc/class-sections-navigation.php'; /** * Customizer additions. diff --git a/inc/class-dots-navigation.php b/inc/class-sections-navigation.php similarity index 79% rename from inc/class-dots-navigation.php rename to inc/class-sections-navigation.php index 79b05160..a91bfe76 100644 --- a/inc/class-dots-navigation.php +++ b/inc/class-sections-navigation.php @@ -79,13 +79,15 @@ function get_sections(){ $new = array( 'hero' => $sections_config['hero'] ); + + foreach ( $sorted_sections as $id ) { - if ( isset( $sorted_sections[ $id ] ) ) { + if ( isset( $sections_config[ $id ] ) ) { $new[ $id ] = $sections_config[ $id ]; } } - - return apply_filters( 'onepress_dots_navigation_get_sections', $new ); + + return apply_filters( 'onepress_sections_navigation_get_sections', $new ); } @@ -103,7 +105,7 @@ function add_customize( $wp_customize, $section_id ){ ); $wp_customize->add_control( $section_id.'_enable', array( - 'label' => __( 'Enable dots navigation', 'onepress' ), + 'label' => __( 'Enable section navigation', 'onepress' ), 'section' => $section_id, 'type' => 'checkbox', ) @@ -123,24 +125,24 @@ function add_customize( $wp_customize, $section_id ){ ) ); - // Show dots message - $wp_customize->add_setting( $section_id.'_em', - array( - 'sanitize_callback' => 'onepress_sanitize_text', - ) - ); - $wp_customize->add_control( new OnePress_Misc_Control( $wp_customize, $section_id.'_em', - array( - 'type' => 'custom_message', - 'section' => $section_id, - 'description' => ''.__( 'Enable dots nav for sections', 'onepress' ).'', - ) - )); foreach ( $this->get_sections() as $id => $args ) { $name = $this->get_name( $id ); + $wp_customize->add_setting( $id.'_em', + array( + 'sanitize_callback' => 'onepress_sanitize_text', + ) + ); + $wp_customize->add_control( new OnePress_Misc_Control( $wp_customize, $id.'_em', + array( + 'type' => 'custom_message', + 'section' => $section_id, + 'description' => '
      '.esc_html( $args['label'] ).'
      ', + ) + )); + $wp_customize->add_setting( $name, array( 'sanitize_callback' => 'onepress_sanitize_checkbox', @@ -150,47 +152,28 @@ function add_customize( $wp_customize, $section_id ){ ); $wp_customize->add_control( $name, array( - 'label' => $args['label'], + 'label' => __( 'Enable dot navigation', 'onepress' ), 'section' => $section_id, 'type' => 'checkbox', ) ); - } - - // Show dots message - $wp_customize->add_setting( $section_id.'_custom_title_m', - array( - 'sanitize_callback' => 'onepress_sanitize_text', - ) - ); - $wp_customize->add_control( new OnePress_Misc_Control( $wp_customize, $section_id.'_custom_title_m', - array( - 'type' => 'custom_message', - 'section' => $section_id, - 'description' => '

      '.__( 'Custom Navigation Labels', 'onepress' ).'

      ', - ) - )); - - - foreach ( $this->get_sections() as $id => $args ) { - $name = $this->get_name( $id.'_label' ); - $wp_customize->add_setting( $name, + $wp_customize->add_setting( $name.'_label', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => '', //'transport' => 'postMessage' ) ); - $wp_customize->add_control( $name, + $wp_customize->add_control( $name.'_label', array( - 'label' => $args['label'], + 'label' => __( 'Custom Label', 'OnePress' ), 'section' => $section_id, ) ); - } + } } diff --git a/inc/customize-configs/options-dots-navigation.php b/inc/customize-configs/options-sections-navigation.php similarity index 59% rename from inc/customize-configs/options-dots-navigation.php rename to inc/customize-configs/options-sections-navigation.php index b215fb38..ca34d911 100644 --- a/inc/customize-configs/options-dots-navigation.php +++ b/inc/customize-configs/options-sections-navigation.php @@ -3,15 +3,15 @@ * Dots Navigation Settings * @since 2.1.0 */ -$wp_customize->add_section( 'onepress_dots_nav', +$wp_customize->add_section( 'onepress_sections_nav', array( 'priority' => null, - 'title' => esc_html__( 'Dots Navigation', 'onepress' ), + 'title' => esc_html__( 'Sections Navigation', 'onepress' ), 'description' => '', 'panel' => 'onepress_options', ) ); -Onepress_Dots_Navigation::get_instance()->add_customize( $wp_customize, 'onepress_dots_nav' ); +Onepress_Dots_Navigation::get_instance()->add_customize( $wp_customize, 'onepress_sections_nav' ); diff --git a/inc/customizer.php b/inc/customizer.php index 94ed72f5..c03cd1da 100644 --- a/inc/customizer.php +++ b/inc/customizer.php @@ -86,7 +86,7 @@ function onepress_customize_register( $wp_customize ) { require_once $path. '/inc/customize-configs/options-colors.php'; require_once $path. '/inc/customize-configs/options-header.php'; require_once $path. '/inc/customize-configs/options-navigation.php'; - require_once $path. '/inc/customize-configs/options-dots-navigation.php'; + require_once $path. '/inc/customize-configs/options-sections-navigation.php'; require_once $path. '/inc/customize-configs/options-page.php'; require_once $path. '/inc/customize-configs/options-blog-posts.php'; require_once $path. '/inc/customize-configs/options-single.php'; diff --git a/style.css b/style.css index 92ef9b84..2dae0591 100644 --- a/style.css +++ b/style.css @@ -4282,7 +4282,6 @@ img.mfp-img { height: 1em; border: 2px solid currentColor; border-radius: 50%; - box-shadow: inset 0px 0px 8px 3px rgba(255, 255, 255, 0.3); will-change: transform; } From 6afffe4e1077a528717931bec4a0684898c3970a Mon Sep 17 00:00:00 2001 From: TruongSa Date: Sat, 8 Sep 2018 15:34:09 +0700 Subject: [PATCH 28/38] Update #312 --- assets/js/jquery.bully.js | 2 +- assets/sass/_bully.scss | 24 +++++++-- changelog.md | 1 + inc/class-sections-navigation.php | 49 ++++++++++++++----- .../options-sections-navigation.php | 2 - style.css | 22 +++++++-- 6 files changed, 79 insertions(+), 21 deletions(-) diff --git a/assets/js/jquery.bully.js b/assets/js/jquery.bully.js index edd40ac1..89186145 100644 --- a/assets/js/jquery.bully.js +++ b/assets/js/jquery.bully.js @@ -204,7 +204,7 @@ jQuery( document ).ready( function( $ ){ $.each( Onepress_Bully.sections, function( id, args ){ $( '#'+id ).bully({ - scrollPerSecond: 1000, + scrollPerSecond: 3000, }); } ); } ); diff --git a/assets/sass/_bully.scss b/assets/sass/_bully.scss index 37ac22bd..94131da8 100644 --- a/assets/sass/_bully.scss +++ b/assets/sass/_bully.scss @@ -16,6 +16,7 @@ transform: translate(0, -50%); z-index: 9000; color: #333; + text-transform: uppercase; } /* @@ -23,7 +24,6 @@ color: #FFF; } */ - .c-bully__ { &bullet { padding: 0.5em; @@ -37,20 +37,36 @@ } } } + &title { position: absolute; - right: 100%; + right: 35px; top: 0px; left: auto; background: rgba( 0,0,0, .6 ); - padding: 2px 10px; + padding: 3px 10px; transition: all 0.2s ease-out; - overflow: hidden; display: block; opacity: 0; white-space: nowrap; color: rgba( 255, 255, 255, .8); transform: scale(.6); + &::after { + content: ''; + width: 0; + height: 0; + border-style: solid; + border-width: 13px 0 13px 13px; + border-color: transparent transparent transparent rgba(0, 0, 0, .6); + display: inline-block; + position: absolute; + right: 0px; + top: 50%; + transform: translate(100%, -50%); + border-radius: 2px; + border-top-right-radius: 1px; + border-bottom-right-radius: 1px; + } } } diff --git a/changelog.md b/changelog.md index 2e108a44..c1e30fce 100644 --- a/changelog.md +++ b/changelog.md @@ -3,6 +3,7 @@ CHANGELOG ==================================================================== # 2.1.0 +* NEW: Sections navigation. * NEW: Disable disable archive prefix option. See in Customizer -> Theme Options -> Blog Pots. * NEW: Item content source for Service section. * NEW: Hide post categories of News section. See in Customizer -> Section News. diff --git a/inc/class-sections-navigation.php b/inc/class-sections-navigation.php index a91bfe76..e05cbef0 100644 --- a/inc/class-sections-navigation.php +++ b/inc/class-sections-navigation.php @@ -8,7 +8,7 @@ */ class Onepress_Dots_Navigation { static $_instance = null; - private $key = 'onepress_dots_nav_'; + private $key = 'onepress_sections_nav_'; static function get_instance(){ if ( is_null( self::$_instance ) ){ @@ -86,7 +86,7 @@ function get_sections(){ $new[ $id ] = $sections_config[ $id ]; } } - + return apply_filters( 'onepress_sections_navigation_get_sections', $new ); } @@ -97,13 +97,13 @@ function get_name( $id ) { function add_customize( $wp_customize, $section_id ){ - $wp_customize->add_setting( $section_id.'_enable', + $wp_customize->add_setting( $this->get_name( '__enable' ), array( 'sanitize_callback' => 'onepress_sanitize_text', 'default' => false, ) ); - $wp_customize->add_control( $section_id.'_enable', + $wp_customize->add_control( $this->get_name( '__enable' ), array( 'label' => __( 'Enable section navigation', 'onepress' ), 'section' => $section_id, @@ -111,21 +111,37 @@ function add_customize( $wp_customize, $section_id ){ ) ); - $wp_customize->add_setting( $section_id.'_enable_label', + $wp_customize->add_setting( $this->get_name( '__enable_label' ), array( 'sanitize_callback' => 'onepress_sanitize_text', 'default' => 1, ) ); - $wp_customize->add_control( $section_id.'_enable_label', + $wp_customize->add_control( $this->get_name( '__enable_label' ), array( - 'label' => __( 'Enable navigation label', 'onepress' ), + 'label' => __( 'Enable navigation labels', 'onepress' ), + 'description' => __( 'By default navigation label is section title.', 'onepress' ), 'section' => $section_id, 'type' => 'checkbox', ) ); + // Color Settings + $wp_customize->add_setting( $this->get_name( '__color' ), array( + 'sanitize_callback' => 'sanitize_hex_color_no_hash', + 'sanitize_js_callback' => 'maybe_hash_hex_color', + 'default' => '' + ) ); + $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, $this->get_name( '__color' ), + array( + 'label' => esc_html__( 'Dots Color', 'onepress' ), + 'section' => $section_id, + 'description' => '', + ) + ) ); + + // Section Settings foreach ( $this->get_sections() as $id => $args ) { $name = $this->get_name( $id ); @@ -152,7 +168,7 @@ function add_customize( $wp_customize, $section_id ){ ); $wp_customize->add_control( $name, array( - 'label' => __( 'Enable dot navigation', 'onepress' ), + 'label' => __( 'Enable section navigation', 'onepress' ), 'section' => $section_id, 'type' => 'checkbox', ) @@ -168,7 +184,7 @@ function add_customize( $wp_customize, $section_id ){ ); $wp_customize->add_control( $name.'_label', array( - 'label' => __( 'Custom Label', 'OnePress' ), + 'label' => __( 'Custom navigation label', 'OnePress' ), 'section' => $section_id, ) ); @@ -213,19 +229,30 @@ function get_settings(){ } function scripts(){ - if ( get_theme_mod( 'onepress_dots_nav_enable', false ) ) { + if ( get_theme_mod( $this->get_name( '__enable' ), false ) ) { if ( is_front_page() ) { wp_enqueue_script( 'jquery.bully', get_template_directory_uri() . '/assets/js/jquery.bully.js', array( 'jquery' ), false, true ); wp_localize_script( 'jquery.bully', 'Onepress_Bully', array( - 'enable_label' => get_theme_mod( 'onepress_dots_nav_enable_label', true ) ? true : false, + 'enable_label' => get_theme_mod( $this->get_name( '__enable_label' ), true ) ? true : false, 'sections' => $this->get_settings() ) ); } } } + function custom_style( $code ){ + if ( get_theme_mod( $this->get_name( '__enable' ), false ) ) { + $color = sanitize_hex_color_no_hash( get_theme_mod( $this->get_name( '__color' ) ) ); + if ( $color ) { + $code .= " body .c-bully { color: #{$color}; } "; + } + } + return $code; + } + function init(){ add_action( 'wp_enqueue_scripts', array( $this, 'scripts' ) ); + add_action( 'onepress_custom_css', array( $this, 'custom_style' ) ); } } diff --git a/inc/customize-configs/options-sections-navigation.php b/inc/customize-configs/options-sections-navigation.php index ca34d911..a3e4a4ac 100644 --- a/inc/customize-configs/options-sections-navigation.php +++ b/inc/customize-configs/options-sections-navigation.php @@ -13,5 +13,3 @@ ); Onepress_Dots_Navigation::get_instance()->add_customize( $wp_customize, 'onepress_sections_nav' ); - - diff --git a/style.css b/style.css index 2dae0591..c8a8fc82 100644 --- a/style.css +++ b/style.css @@ -4242,6 +4242,7 @@ img.mfp-img { transform: translate(0, -50%); z-index: 9000; color: #333; + text-transform: uppercase; } /* @@ -4261,19 +4262,34 @@ img.mfp-img { } .c-bully__title { position: absolute; - right: 100%; + right: 35px; top: 0px; left: auto; background: rgba(0, 0, 0, 0.6); - padding: 2px 10px; + padding: 3px 10px; transition: all 0.2s ease-out; - overflow: hidden; display: block; opacity: 0; white-space: nowrap; color: rgba(255, 255, 255, 0.8); transform: scale(0.6); } +.c-bully__title::after { + content: ''; + width: 0; + height: 0; + border-style: solid; + border-width: 13px 0 13px 13px; + border-color: transparent transparent transparent rgba(0, 0, 0, 0.6); + display: inline-block; + position: absolute; + right: 0px; + top: 50%; + transform: translate(100%, -50%); + border-radius: 2px; + border-top-right-radius: 1px; + border-bottom-right-radius: 1px; +} .c-bully__bullet:after { content: ""; From 40b9169b5f6bf563ed797ba789ba54f4f7af39fc Mon Sep 17 00:00:00 2001 From: TruongSa Date: Sat, 8 Sep 2018 15:36:53 +0700 Subject: [PATCH 29/38] Udpate changelog --- changelog.md | 1 + 1 file changed, 1 insertion(+) diff --git a/changelog.md b/changelog.md index c1e30fce..530f69af 100644 --- a/changelog.md +++ b/changelog.md @@ -10,6 +10,7 @@ CHANGELOG * NEW: Custom excerpt length. See in Customizer -> Section News. * IMPROVED: Improved More Posts button link in News section. * IMPROVED: Re-Structure customize configs. +* IMPROVED: Re-Structure customize controls. # 2.0.9 From 2c4a97f540b3c20a355fda74bf92975277ae5f62 Mon Sep 17 00:00:00 2001 From: TruongSa Date: Sat, 8 Sep 2018 16:15:25 +0700 Subject: [PATCH 30/38] Update default enable sections --- inc/class-sections-navigation.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/class-sections-navigation.php b/inc/class-sections-navigation.php index e05cbef0..9831c713 100644 --- a/inc/class-sections-navigation.php +++ b/inc/class-sections-navigation.php @@ -162,7 +162,7 @@ function add_customize( $wp_customize, $section_id ){ $wp_customize->add_setting( $name, array( 'sanitize_callback' => 'onepress_sanitize_checkbox', - 'default' => 1, + 'default' => $args['default'], //'transport' => 'postMessage' ) ); @@ -244,7 +244,7 @@ function custom_style( $code ){ if ( get_theme_mod( $this->get_name( '__enable' ), false ) ) { $color = sanitize_hex_color_no_hash( get_theme_mod( $this->get_name( '__color' ) ) ); if ( $color ) { - $code .= " body .c-bully { color: #{$color}; } "; + $code .= " .c-bully { color: #{$color}; } "; } } return $code; From 128d660dec07d57184c206ea85cd5984304ab963 Mon Sep 17 00:00:00 2001 From: TruongSa Date: Sat, 8 Sep 2018 16:50:09 +0700 Subject: [PATCH 31/38] Improve dots naviation #312 --- assets/js/jquery.bully.js | 20 +++++++++- assets/sass/_bully.scss | 11 +++--- inc/class-sections-navigation.php | 63 ++++++++++++++++++++++++++----- style.css | 8 ++-- 4 files changed, 80 insertions(+), 22 deletions(-) diff --git a/assets/js/jquery.bully.js b/assets/js/jquery.bully.js index 89186145..e03cf191 100644 --- a/assets/js/jquery.bully.js +++ b/assets/js/jquery.bully.js @@ -24,27 +24,43 @@ if ( frameRendered !== true ) { var count = 0, - inverse = false; + inverse = true; var lastItemId = false; var top = 0; if ($( '#masthead' ).hasClass( 'is-sticky' ) ) { top = $( '#masthead' ).outerHeight(); } - + console.log( '----------------', lastItemId ); $.each( elements, function( i, element ) { if ( lastScrollY >= element.offset.top - top - windowHeight / 2 ) { count = count + 1; inverse = lastScrollY < element.offset.top - top + element.height - windowHeight / 2; lastItemId = element.element.id; + console.log( 'lastItemId', lastItemId ); } } ); + /* if ( inversed !== inverse ) { inversed = inverse; $bully.toggleClass( 'c-bully--inversed', inversed ); } + */ + + // New insverse + if ( lastItemId && typeof Onepress_Bully.sections[ lastItemId ] !== "undefined" ) { + console.log( '==: ' + lastItemId, Onepress_Bully.sections[ lastItemId ].inverse ); + if ( Onepress_Bully.sections[ lastItemId ].inverse ) { + $bully.addClass( 'c-bully--inversed' ); + } else { + $bully.removeClass( 'c-bully--inversed' ); + } + + } + + if ( count !== current ) { var activeBullet = $bully.find( '#bully__'+lastItemId ); diff --git a/assets/sass/_bully.scss b/assets/sass/_bully.scss index 94131da8..9320070e 100644 --- a/assets/sass/_bully.scss +++ b/assets/sass/_bully.scss @@ -17,13 +17,14 @@ z-index: 9000; color: #333; text-transform: uppercase; + &.c-bully--inversed { + color: #FFF; + } } -/* -.c-bully--inversed { - color: #FFF; -} -*/ + + + .c-bully__ { &bullet { padding: 0.5em; diff --git a/inc/class-sections-navigation.php b/inc/class-sections-navigation.php index 9831c713..e0a651d1 100644 --- a/inc/class-sections-navigation.php +++ b/inc/class-sections-navigation.php @@ -26,23 +26,27 @@ function get_sections(){ $sections_config = array( 'hero' => array( 'label' => __( 'Section: Hero', 'onepress' ), - 'title' => '', - 'default' => false + 'title' => __( 'Home', 'onepress' ), + 'default' => 1, + 'inverse' => 1, ), 'about' => array( 'label' => __( 'Section: About', 'onepress' ), 'title' => __( 'About Us', 'onepress' ), - 'default' => 1 + 'default' => 1, + 'inverse' => false, ), 'contact' => array( 'label' => __( 'Section: Contact', 'onepress' ), 'title' => __( 'Get in touch', 'onepress' ), - 'default' => 1 + 'default' => 1, + ), 'counter' => array( 'label' => __( 'Section: Counter', 'onepress' ), 'title' => __( 'Our Numbers', 'onepress' ), - 'default' => '' + 'default' => 1, + 'inverse' => 1, ), 'features' => array( 'label' => __( 'Section: Features', 'onepress' ), @@ -72,7 +76,8 @@ function get_sections(){ 'videolightbox' => array( 'label' => __( 'Section: Video Lightbox', 'onepress' ), 'title' => '', - 'default' => '' + 'default' => 1, + 'inverse' => 1, ), ); @@ -134,7 +139,21 @@ function add_customize( $wp_customize, $section_id ){ ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, $this->get_name( '__color' ), array( - 'label' => esc_html__( 'Dots Color', 'onepress' ), + 'label' => esc_html__( 'Dots color', 'onepress' ), + 'section' => $section_id, + 'description' => '', + ) + ) ); + + // Color Settings + $wp_customize->add_setting( $this->get_name( '__color2' ), array( + 'sanitize_callback' => 'sanitize_hex_color_no_hash', + 'sanitize_js_callback' => 'maybe_hash_hex_color', + 'default' => '' + ) ); + $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, $this->get_name( '__color2' ), + array( + 'label' => esc_html__( 'Dots inverse color', 'onepress' ), 'section' => $section_id, 'description' => '', ) @@ -174,6 +193,21 @@ function add_customize( $wp_customize, $section_id ){ ) ); + $wp_customize->add_setting( $name.'_inverse', + array( + 'sanitize_callback' => 'onepress_sanitize_checkbox', + 'default' => isset( $args['inverse'] ) ? $args['inverse'] : false, + //'transport' => 'postMessage' + ) + ); + $wp_customize->add_control( $name.'_inverse', + array( + 'label' => __( 'Inverse dots color', 'onepress' ), + 'section' => $section_id, + 'type' => 'checkbox', + ) + ); + $wp_customize->add_setting( $name.'_label', array( @@ -191,7 +225,6 @@ function add_customize( $wp_customize, $section_id ){ } - } function get_settings(){ @@ -211,8 +244,13 @@ function get_settings(){ $name = $this->get_name( $id ); $enable = get_theme_mod( $name, $args['default'] ); if ( $enable ) { - $data[ $id ] = array( - 'id' => $id, + $el_id = sanitize_text_field( get_theme_mod( 'onepress_'.$id.'_id', $id, false ) ); + if ( ! $el_id ) { + $el_id = $id; + } + $data[ $el_id ] = array( + 'id' => $el_id, + 'inverse' => get_theme_mod( $this->get_name( $id.'_inverse'), isset( $args['inverse'] ) ? $args['inverse'] : false ), 'enable' => get_theme_mod( $name, $args['default'] ), 'title' => get_theme_mod( 'onepress_' . $id . '_title', $args['title'] ), ); @@ -246,6 +284,11 @@ function custom_style( $code ){ if ( $color ) { $code .= " .c-bully { color: #{$color}; } "; } + + $color2 = sanitize_hex_color_no_hash( get_theme_mod( $this->get_name( '__color2' ) ) ); + if ( $color2 ) { + $code .= " .c-bully.c-bully--inversed { color: #{$color2}; } "; + } } return $code; } diff --git a/style.css b/style.css index c8a8fc82..8a8c5ebc 100644 --- a/style.css +++ b/style.css @@ -4244,12 +4244,10 @@ img.mfp-img { color: #333; text-transform: uppercase; } - -/* -.c-bully--inversed { - color: #FFF; +.c-bully.c-bully--inversed { + color: #FFF; } -*/ + .c-bully__bullet { padding: 0.5em; opacity: 0; From 7351a61b2fbc32cbae6621dd081db6ea01e0ec58 Mon Sep 17 00:00:00 2001 From: TruongSa Date: Sat, 8 Sep 2018 16:56:34 +0700 Subject: [PATCH 32/38] Remove js log and add function comments #312 --- assets/js/jquery.bully.js | 5 ++-- inc/class-sections-navigation.php | 45 ++++++++++++++++++++++++++++++- 2 files changed, 46 insertions(+), 4 deletions(-) diff --git a/assets/js/jquery.bully.js b/assets/js/jquery.bully.js index e03cf191..75ab526e 100644 --- a/assets/js/jquery.bully.js +++ b/assets/js/jquery.bully.js @@ -31,13 +31,13 @@ if ($( '#masthead' ).hasClass( 'is-sticky' ) ) { top = $( '#masthead' ).outerHeight(); } - console.log( '----------------', lastItemId ); + $.each( elements, function( i, element ) { if ( lastScrollY >= element.offset.top - top - windowHeight / 2 ) { count = count + 1; inverse = lastScrollY < element.offset.top - top + element.height - windowHeight / 2; lastItemId = element.element.id; - console.log( 'lastItemId', lastItemId ); + } } ); @@ -51,7 +51,6 @@ // New insverse if ( lastItemId && typeof Onepress_Bully.sections[ lastItemId ] !== "undefined" ) { - console.log( '==: ' + lastItemId, Onepress_Bully.sections[ lastItemId ].inverse ); if ( Onepress_Bully.sections[ lastItemId ].inverse ) { $bully.addClass( 'c-bully--inversed' ); } else { diff --git a/inc/class-sections-navigation.php b/inc/class-sections-navigation.php index e0a651d1..1c931882 100644 --- a/inc/class-sections-navigation.php +++ b/inc/class-sections-navigation.php @@ -10,6 +10,11 @@ class Onepress_Dots_Navigation { static $_instance = null; private $key = 'onepress_sections_nav_'; + /** + * Get instance + * + * @return null|Onepress_Dots_Navigation + */ static function get_instance(){ if ( is_null( self::$_instance ) ){ self::$_instance = new self(); @@ -17,6 +22,11 @@ static function get_instance(){ return self::$_instance; } + /** + * Get sections + * + * @return array + */ function get_sections(){ $sorted_sections = apply_filters( 'onepress_frontpage_sections_order', array( @@ -91,15 +101,28 @@ function get_sections(){ $new[ $id ] = $sections_config[ $id ]; } } - + // Filter to add more custom sections here return apply_filters( 'onepress_sections_navigation_get_sections', $new ); } + /** + * Get setting name + * + * @param $id + * + * @return string + */ function get_name( $id ) { return $this->key.$id; } + /** + * Add customize config + * + * @param $wp_customize + * @param $section_id + */ function add_customize( $wp_customize, $section_id ){ $wp_customize->add_setting( $this->get_name( '__enable' ), @@ -227,6 +250,12 @@ function add_customize( $wp_customize, $section_id ){ } + /** + * + * Get sections settings + * + * @return array + */ function get_settings(){ $data = apply_filters( 'onepress_dots_navigation_get_settings', false ); @@ -266,6 +295,10 @@ function get_settings(){ return $data; } + /** + * Add scripts + * load only enabled + */ function scripts(){ if ( get_theme_mod( $this->get_name( '__enable' ), false ) ) { if ( is_front_page() ) { @@ -278,6 +311,13 @@ function scripts(){ } } + /** + * Add custom style + * load only enabled + * @param $code + * + * @return string + */ function custom_style( $code ){ if ( get_theme_mod( $this->get_name( '__enable' ), false ) ) { $color = sanitize_hex_color_no_hash( get_theme_mod( $this->get_name( '__color' ) ) ); @@ -293,6 +333,9 @@ function custom_style( $code ){ return $code; } + /** + * Inits + */ function init(){ add_action( 'wp_enqueue_scripts', array( $this, 'scripts' ) ); add_action( 'onepress_custom_css', array( $this, 'custom_style' ) ); From b32dcb9abdbabc0eba70413d5b68458f2e0d47ef Mon Sep 17 00:00:00 2001 From: TruongSa Date: Sat, 8 Sep 2018 17:03:27 +0700 Subject: [PATCH 33/38] Update #312 --- assets/js/jquery.bully.js | 4 +--- assets/sass/_bully.scss | 7 ++++--- style.css | 7 ++++++- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/assets/js/jquery.bully.js b/assets/js/jquery.bully.js index 75ab526e..6a25192e 100644 --- a/assets/js/jquery.bully.js +++ b/assets/js/jquery.bully.js @@ -59,8 +59,6 @@ } - - if ( count !== current ) { var activeBullet = $bully.find( '#bully__'+lastItemId ); var bullyOffset = $bully.offset(); @@ -179,7 +177,7 @@ $target = $( 'html, body' ); if ( self.options.scrollDuration == 0 ) { - $target.scrollTop( self.offset.top ); + $target.scrollTop( this._calcTop( self.offset.top ) ); return; } diff --git a/assets/sass/_bully.scss b/assets/sass/_bully.scss index 9320070e..4ca7e1dc 100644 --- a/assets/sass/_bully.scss +++ b/assets/sass/_bully.scss @@ -12,9 +12,12 @@ position: fixed; top: 50%; right: 48px; + @include for(screens-medium) { + right: 10px; + } font-size: 12px; transform: translate(0, -50%); - z-index: 9000; + z-index: 600; color: #333; text-transform: uppercase; &.c-bully--inversed { @@ -23,8 +26,6 @@ } - - .c-bully__ { &bullet { padding: 0.5em; diff --git a/style.css b/style.css index 8a8c5ebc..480d4b72 100644 --- a/style.css +++ b/style.css @@ -4240,10 +4240,15 @@ img.mfp-img { right: 48px; font-size: 12px; transform: translate(0, -50%); - z-index: 9000; + z-index: 600; color: #333; text-transform: uppercase; } +@media screen and (max-width: 940px) { + .c-bully { + right: 10px; + } +} .c-bully.c-bully--inversed { color: #FFF; } From 368321677132e8cecbd94751d87548fe0fb7b0ca Mon Sep 17 00:00:00 2001 From: TruongSa Date: Sat, 8 Sep 2018 17:14:38 +0700 Subject: [PATCH 34/38] Update #312 --- inc/class-sections-navigation.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/inc/class-sections-navigation.php b/inc/class-sections-navigation.php index 1c931882..df41913f 100644 --- a/inc/class-sections-navigation.php +++ b/inc/class-sections-navigation.php @@ -308,6 +308,10 @@ function scripts(){ 'sections' => $this->get_settings() ) ); } + + + wp_add_inline_style( 'onepress-style', $this->custom_style() ); + } } @@ -318,16 +322,16 @@ function scripts(){ * * @return string */ - function custom_style( $code ){ + function custom_style( $code = false ){ if ( get_theme_mod( $this->get_name( '__enable' ), false ) ) { $color = sanitize_hex_color_no_hash( get_theme_mod( $this->get_name( '__color' ) ) ); if ( $color ) { - $code .= " .c-bully { color: #{$color}; } "; + $code .= "body .c-bully { color: #{$color}; } "; } $color2 = sanitize_hex_color_no_hash( get_theme_mod( $this->get_name( '__color2' ) ) ); if ( $color2 ) { - $code .= " .c-bully.c-bully--inversed { color: #{$color2}; } "; + $code .= "body .c-bully.c-bully--inversed { color: #{$color2}; } "; } } return $code; @@ -338,7 +342,7 @@ function custom_style( $code ){ */ function init(){ add_action( 'wp_enqueue_scripts', array( $this, 'scripts' ) ); - add_action( 'onepress_custom_css', array( $this, 'custom_style' ) ); + //add_action( 'onepress_custom_css', array( $this, 'custom_style' ) ); } } From 0c50a8ce68a62ecbd0fd4560e3dc1f3a6fa9db9d Mon Sep 17 00:00:00 2001 From: TruongSa Date: Sat, 8 Sep 2018 17:33:52 +0700 Subject: [PATCH 35/38] Update #312 --- assets/js/customizer-liveview.js | 4 ++-- assets/sass/_bully.scss | 2 +- inc/class-sections-navigation.php | 6 ++---- inc/customizer-selective-refresh.php | 5 ++++- inc/template-tags.php | 5 ++++- style.css | 2 +- 6 files changed, 14 insertions(+), 10 deletions(-) diff --git a/assets/js/customizer-liveview.js b/assets/js/customizer-liveview.js index cee4a318..0ff9f7b1 100644 --- a/assets/js/customizer-liveview.js +++ b/assets/js/customizer-liveview.js @@ -78,9 +78,9 @@ } ); $( window ).resize( function(){ - var css_code = $( '#onepress-style-inline-css' ).html(); + // var css_code = $( '#onepress-style-inline-css' ).html(); // Fix Chrome Lost CSS When resize ?? - $( '#onepress-style-inline-css' ).html( css_code ); + // $( '#onepress-style-inline-css' ).html( css_code ); }); diff --git a/assets/sass/_bully.scss b/assets/sass/_bully.scss index 4ca7e1dc..610899ea 100644 --- a/assets/sass/_bully.scss +++ b/assets/sass/_bully.scss @@ -11,7 +11,7 @@ .c-bully { position: fixed; top: 50%; - right: 48px; + right: 28px; @include for(screens-medium) { right: 10px; } diff --git a/inc/class-sections-navigation.php b/inc/class-sections-navigation.php index df41913f..28e8738d 100644 --- a/inc/class-sections-navigation.php +++ b/inc/class-sections-navigation.php @@ -309,9 +309,6 @@ function scripts(){ ) ); } - - wp_add_inline_style( 'onepress-style', $this->custom_style() ); - } } @@ -334,6 +331,7 @@ function custom_style( $code = false ){ $code .= "body .c-bully.c-bully--inversed { color: #{$color2}; } "; } } + return $code; } @@ -342,7 +340,7 @@ function custom_style( $code = false ){ */ function init(){ add_action( 'wp_enqueue_scripts', array( $this, 'scripts' ) ); - //add_action( 'onepress_custom_css', array( $this, 'custom_style' ) ); + add_action( 'onepress_custom_css', array( $this, 'custom_style' ) ); } } diff --git a/inc/customizer-selective-refresh.php b/inc/customizer-selective-refresh.php index 14c17b7c..7cc097f6 100644 --- a/inc/customizer-selective-refresh.php +++ b/inc/customizer-selective-refresh.php @@ -332,7 +332,10 @@ function onepress_customizer_partials( $wp_customize ) { 'footer_widgets_link_hover_color', 'onepress_hcl1_r_color', - 'onepress_hcl1_r_bg_color' + 'onepress_hcl1_r_bg_color', + + 'onepress_sections_nav___color', + 'onepress_sections_nav___color2', ); diff --git a/inc/template-tags.php b/inc/template-tags.php index afb6c040..c468f2f1 100644 --- a/inc/template-tags.php +++ b/inc/template-tags.php @@ -902,6 +902,9 @@ function onepress_custom_inline_style( ) { if ( trim( $css ) == "" ) { return ; } + + $css = apply_filters( 'onepress_custom_css', $css ) ; + $css = preg_replace( array( // Remove comment(s) @@ -924,7 +927,7 @@ function onepress_custom_inline_style( ) { } } - return apply_filters( 'onepress_custom_css', $css ) ; + return $css ; } } diff --git a/style.css b/style.css index 480d4b72..b8c6c382 100644 --- a/style.css +++ b/style.css @@ -4237,7 +4237,7 @@ img.mfp-img { .c-bully { position: fixed; top: 50%; - right: 48px; + right: 28px; font-size: 12px; transform: translate(0, -50%); z-index: 600; From e88be937a644107b91a3aa1171b364432b3ebd39 Mon Sep 17 00:00:00 2001 From: TruongSa Date: Mon, 10 Sep 2018 11:47:30 +0700 Subject: [PATCH 36/38] Update customize live css --- assets/js/customizer-liveview.js | 10 +++++++-- inc/class-sections-navigation.php | 9 +++++--- inc/customizer-selective-refresh.php | 1 + inc/template-tags.php | 31 +++++++++++++++------------- 4 files changed, 32 insertions(+), 19 deletions(-) diff --git a/assets/js/customizer-liveview.js b/assets/js/customizer-liveview.js index 0ff9f7b1..d316eed7 100644 --- a/assets/js/customizer-liveview.js +++ b/assets/js/customizer-liveview.js @@ -78,11 +78,17 @@ } ); $( window ).resize( function(){ - // var css_code = $( '#onepress-style-inline-css' ).html(); + var css_code = $( '#onepress-style-inline-css' ).html(); // Fix Chrome Lost CSS When resize ?? - // $( '#onepress-style-inline-css' ).html( css_code ); + $( '#onepress-style-inline-css' ).html( css_code ); }); + setTimeout( function(){ + var css_code = $( '#onepress-style-inline-css' ).html(); + // Fix Chrome Lost CSS When resize ?? + $( '#onepress-style-inline-css' ).html( css_code ); + }, 200 ); + wp.customize.selectiveRefresh.bind( 'partial-content-rendered', function( settings ) { diff --git a/inc/class-sections-navigation.php b/inc/class-sections-navigation.php index 28e8738d..0011335a 100644 --- a/inc/class-sections-navigation.php +++ b/inc/class-sections-navigation.php @@ -323,12 +323,15 @@ function custom_style( $code = false ){ if ( get_theme_mod( $this->get_name( '__enable' ), false ) ) { $color = sanitize_hex_color_no_hash( get_theme_mod( $this->get_name( '__color' ) ) ); if ( $color ) { - $code .= "body .c-bully { color: #{$color}; } "; + $code .= " body .c-bully { color: #{$color}; } "; } $color2 = sanitize_hex_color_no_hash( get_theme_mod( $this->get_name( '__color2' ) ) ); if ( $color2 ) { - $code .= "body .c-bully.c-bully--inversed { color: #{$color2}; } "; + $code .= " body .c-bully.c-bully--inversed { color: #{$color2}; } "; + } + if ( is_customize_preview() ) { + //die( 'loadmoe' ); } } @@ -340,7 +343,7 @@ function custom_style( $code = false ){ */ function init(){ add_action( 'wp_enqueue_scripts', array( $this, 'scripts' ) ); - add_action( 'onepress_custom_css', array( $this, 'custom_style' ) ); + add_filter( 'onepress_custom_css', array( $this, 'custom_style' ) ); } } diff --git a/inc/customizer-selective-refresh.php b/inc/customizer-selective-refresh.php index 7cc097f6..547ee167 100644 --- a/inc/customizer-selective-refresh.php +++ b/inc/customizer-selective-refresh.php @@ -351,6 +351,7 @@ function onepress_customizer_partials( $wp_customize ) { $wp_customize->selective_refresh->add_partial( 'onepress-style-live-css', array( 'selector' => '#onepress-style-inline-css', 'settings' => $css_settings, + 'container_inclusive' => false, 'render_callback' => 'onepress_custom_inline_style', ) ); diff --git a/inc/template-tags.php b/inc/template-tags.php index c468f2f1..6cf400d7 100644 --- a/inc/template-tags.php +++ b/inc/template-tags.php @@ -904,20 +904,23 @@ function onepress_custom_inline_style( ) { } $css = apply_filters( 'onepress_custom_css', $css ) ; - - $css = preg_replace( - array( - // Remove comment(s) - '#("(?:[^"\\\]++|\\\.)*+"|\'(?:[^\'\\\\]++|\\\.)*+\')|\/\*(?!\!)(?>.*?\*\/)|^\s*|\s*$#s', - // Remove unused white-space(s) - '#("(?:[^"\\\]++|\\\.)*+"|\'(?:[^\'\\\\]++|\\\.)*+\'|\/\*(?>.*?\*\/))|\s*+;\s*+(})\s*+|\s*+([*$~^|]?+=|[{};,>~+]|\s*+-(?![0-9\.])|!important\b)\s*+|([[(:])\s++|\s++([])])|\s++(:)\s*+(?!(?>[^{}"\']++|"(?:[^"\\\]++|\\\.)*+"|\'(?:[^\'\\\\]++|\\\.)*+\')*+{)|^\s++|\s++\z|(\s)\s+#si', - ), - array( - '$1', - '$1$2$3$4$5$6$7', - ), - $css - ); + + if ( ! is_customize_preview() ) { + + $css = preg_replace( + array( + // Remove comment(s) + '#("(?:[^"\\\]++|\\\.)*+"|\'(?:[^\'\\\\]++|\\\.)*+\')|\/\*(?!\!)(?>.*?\*\/)|^\s*|\s*$#s', + // Remove unused white-space(s) + '#("(?:[^"\\\]++|\\\.)*+"|\'(?:[^\'\\\\]++|\\\.)*+\'|\/\*(?>.*?\*\/))|\s*+;\s*+(})\s*+|\s*+([*$~^|]?+=|[{};,>~+]|\s*+-(?![0-9\.])|!important\b)\s*+|([[(:])\s++|\s++([])])|\s++(:)\s*+(?!(?>[^{}"\']++|"(?:[^"\\\]++|\\\.)*+"|\'(?:[^\'\\\\]++|\\\.)*+\')*+{)|^\s++|\s++\z|(\s)\s+#si', + ), + array( + '$1', + '$1$2$3$4$5$6$7', + ), + $css + ); + } if ( ! function_exists( 'wp_get_custom_css' ) ) { // Back-compat for WordPress < 4.7. From 12647fe5149b6a8ffe4c838546a424e9dbf3d91d Mon Sep 17 00:00:00 2001 From: TruongSa Date: Mon, 10 Sep 2018 14:31:47 +0700 Subject: [PATCH 37/38] Update customize preview css --- assets/js/customizer-liveview.js | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/assets/js/customizer-liveview.js b/assets/js/customizer-liveview.js index d316eed7..88769ca9 100644 --- a/assets/js/customizer-liveview.js +++ b/assets/js/customizer-liveview.js @@ -77,17 +77,21 @@ } ); } ); - $( window ).resize( function(){ + function update_css( ){ var css_code = $( '#onepress-style-inline-css' ).html(); // Fix Chrome Lost CSS When resize ?? - $( '#onepress-style-inline-css' ).html( css_code ); + $( '#onepress-style-inline-css' ).replaceWith( '' ); + + } + + // When preview ready + wp.customize.bind( 'preview-ready', function() { + update_css(); }); - setTimeout( function(){ - var css_code = $( '#onepress-style-inline-css' ).html(); - // Fix Chrome Lost CSS When resize ?? - $( '#onepress-style-inline-css' ).html( css_code ); - }, 200 ); + $( window ).resize( function(){ + update_css(); + }); wp.customize.selectiveRefresh.bind( 'partial-content-rendered', function( settings ) { From 4be1b34b2ab683cd4719e0ad751eea09be5815f9 Mon Sep 17 00:00:00 2001 From: TruongSa Date: Mon, 10 Sep 2018 15:03:31 +0700 Subject: [PATCH 38/38] Update sections navigation settings --- assets/js/customizer-liveview.js | 2 +- assets/sass/_bully.scss | 42 ++++++++++++++++--------------- inc/class-sections-navigation.php | 36 +++++++++++++++----------- style.css | 25 ++++-------------- 4 files changed, 49 insertions(+), 56 deletions(-) diff --git a/assets/js/customizer-liveview.js b/assets/js/customizer-liveview.js index 88769ca9..e0cb8b19 100644 --- a/assets/js/customizer-liveview.js +++ b/assets/js/customizer-liveview.js @@ -81,7 +81,7 @@ var css_code = $( '#onepress-style-inline-css' ).html(); // Fix Chrome Lost CSS When resize ?? $( '#onepress-style-inline-css' ).replaceWith( '' ); - + } // When preview ready diff --git a/assets/sass/_bully.scss b/assets/sass/_bully.scss index 610899ea..45d721cc 100644 --- a/assets/sass/_bully.scss +++ b/assets/sass/_bully.scss @@ -42,33 +42,35 @@ &title { position: absolute; - right: 35px; - top: 0px; + right: 26px; + top: 1px; left: auto; - background: rgba( 0,0,0, .6 ); - padding: 3px 10px; + background: rgba( 0,0,0, .7 ); + padding: 1px 10px; + border-radius: 2px; transition: all 0.2s ease-out; display: block; opacity: 0; white-space: nowrap; color: rgba( 255, 255, 255, .8); transform: scale(.6); - &::after { - content: ''; - width: 0; - height: 0; - border-style: solid; - border-width: 13px 0 13px 13px; - border-color: transparent transparent transparent rgba(0, 0, 0, .6); - display: inline-block; - position: absolute; - right: 0px; - top: 50%; - transform: translate(100%, -50%); - border-radius: 2px; - border-top-right-radius: 1px; - border-bottom-right-radius: 1px; - } + + //&::after { + // content: ''; + // width: 0; + // height: 0; + // border-style: solid; + // border-width: 13px 0 13px 13px; + // border-color: transparent transparent transparent rgba(0, 0, 0, .6); + // display: inline-block; + // position: absolute; + // right: 0px; + // top: 50%; + // transform: translate(100%, -50%); + // border-radius: 2px; + // border-top-right-radius: 1px; + // border-bottom-right-radius: 1px; + //} } } diff --git a/inc/class-sections-navigation.php b/inc/class-sections-navigation.php index 0011335a..ee86d0c2 100644 --- a/inc/class-sections-navigation.php +++ b/inc/class-sections-navigation.php @@ -37,57 +37,63 @@ function get_sections(){ 'hero' => array( 'label' => __( 'Section: Hero', 'onepress' ), 'title' => __( 'Home', 'onepress' ), - 'default' => 1, - 'inverse' => 1, + 'default' => false, + 'inverse' => false, ), 'about' => array( 'label' => __( 'Section: About', 'onepress' ), 'title' => __( 'About Us', 'onepress' ), - 'default' => 1, + 'default' => false, 'inverse' => false, ), 'contact' => array( 'label' => __( 'Section: Contact', 'onepress' ), 'title' => __( 'Get in touch', 'onepress' ), - 'default' => 1, + 'default' => false, + 'inverse' => false, ), 'counter' => array( 'label' => __( 'Section: Counter', 'onepress' ), 'title' => __( 'Our Numbers', 'onepress' ), - 'default' => 1, - 'inverse' => 1, + 'default' => false, + 'inverse' => false, ), 'features' => array( 'label' => __( 'Section: Features', 'onepress' ), 'title' => __( 'Features', 'onepress' ), - 'default' => 1 + 'default' => false, + 'inverse' => false, ), 'gallery' => array( 'label' => __( 'Section: Gallery', 'onepress' ), 'title' => __( 'Gallery', 'onepress' ), - 'default' => 1 + 'default' => false, + 'inverse' => false, ), 'news' => array( 'label' => __( 'Section: News', 'onepress' ), 'title' => __( 'Latest News', 'onepress' ), - 'default' => 1 + 'default' => false, + 'inverse' => false, ), 'services' => array( 'label' => __( 'Section: Services', 'onepress' ), 'title' => __( 'Our Services', 'onepress' ), - 'default' => 1 + 'default' => false, + 'inverse' => false, ), 'team' => array( 'label' => __( 'Section: Team', 'onepress' ), 'title' => __( 'Our Team', 'onepress' ), - 'default' => 1 + 'default' => false, + 'inverse' => false, ), 'videolightbox' => array( 'label' => __( 'Section: Video Lightbox', 'onepress' ), 'title' => '', - 'default' => 1, - 'inverse' => 1, + 'default' => false, + 'inverse' => false, ), ); @@ -133,7 +139,7 @@ function add_customize( $wp_customize, $section_id ){ ); $wp_customize->add_control( $this->get_name( '__enable' ), array( - 'label' => __( 'Enable section navigation', 'onepress' ), + 'label' => __( 'Enable in section navigation', 'onepress' ), 'section' => $section_id, 'type' => 'checkbox', ) @@ -210,7 +216,7 @@ function add_customize( $wp_customize, $section_id ){ ); $wp_customize->add_control( $name, array( - 'label' => __( 'Enable section navigation', 'onepress' ), + 'label' => __( 'Enable in section navigation', 'onepress' ), 'section' => $section_id, 'type' => 'checkbox', ) diff --git a/style.css b/style.css index b8c6c382..73a1ab54 100644 --- a/style.css +++ b/style.css @@ -4265,11 +4265,12 @@ img.mfp-img { } .c-bully__title { position: absolute; - right: 35px; - top: 0px; + right: 26px; + top: 1px; left: auto; - background: rgba(0, 0, 0, 0.6); - padding: 3px 10px; + background: rgba(0, 0, 0, 0.7); + padding: 1px 10px; + border-radius: 2px; transition: all 0.2s ease-out; display: block; opacity: 0; @@ -4277,22 +4278,6 @@ img.mfp-img { color: rgba(255, 255, 255, 0.8); transform: scale(0.6); } -.c-bully__title::after { - content: ''; - width: 0; - height: 0; - border-style: solid; - border-width: 13px 0 13px 13px; - border-color: transparent transparent transparent rgba(0, 0, 0, 0.6); - display: inline-block; - position: absolute; - right: 0px; - top: 50%; - transform: translate(100%, -50%); - border-radius: 2px; - border-top-right-radius: 1px; - border-bottom-right-radius: 1px; -} .c-bully__bullet:after { content: "";