diff --git a/404.php b/404.php index edd11b79..ca072bb3 100644 --- a/404.php +++ b/404.php @@ -86,8 +86,8 @@ * * @since 2.0 */ - do_action( 'generate_after_primary_content_area' ); + do_action( 'generate_after_primary_content_area' ); - generate_construct_sidebars(); + generate_construct_sidebars(); get_footer(); diff --git a/archive.php b/archive.php index 1df969bc..9ec1ca90 100644 --- a/archive.php +++ b/archive.php @@ -67,8 +67,8 @@ * * @since 2.0 */ - do_action( 'generate_after_primary_content_area' ); + do_action( 'generate_after_primary_content_area' ); - generate_construct_sidebars(); + generate_construct_sidebars(); get_footer(); diff --git a/css/mobile.css b/css/mobile.css index 222385e7..cd889e51 100644 --- a/css/mobile.css +++ b/css/mobile.css @@ -253,4 +253,8 @@ nav.toggled ul ul.sub-menu { margin-bottom: 1.5em; width: 100% !important; } + + .entry-meta { + font-size: inherit; + } } diff --git a/css/mobile.min.css b/css/mobile.min.css index 1a5e28a8..00040de9 100644 --- a/css/mobile.min.css +++ b/css/mobile.min.css @@ -1 +1 @@ -button.menu-toggle{background-color:transparent;width:100%;border:0;text-align:center}.nav-search-enabled .main-navigation .menu-toggle{text-align:left}.mobile-bar-items{display:none;position:absolute;right:0;top:0;z-index:21;list-style-type:none}.mobile-bar-items a{display:inline-block}.mobile-bar-items .search-item.active{transition:opacity 300ms ease-in-out}.main-navigation.toggled ul ul{transition:0s;visibility:hidden}nav.toggled ul ul.sub-menu{width:100%}.dropdown-hover .main-navigation.toggled ul li.sfHover>ul,.dropdown-hover .main-navigation.toggled ul li:hover>ul{transition-delay:0s}.toggled .menu-item-has-children .dropdown-menu-toggle{padding-left:20px}.main-navigation.toggled ul ul.toggled-on{visibility:visible}.main-navigation.toggled .main-nav>ul{display:block}.main-navigation.toggled .main-nav ul ul.toggled-on{position:relative;top:0;left:auto!important;right:auto!important;width:100%;pointer-events:auto;height:auto;opacity:1;display:block}.main-navigation.toggled .main-nav li{float:none;clear:both;display:block!important;text-align:left!important}.main-navigation.toggled .main-nav li.hide-on-mobile,.main-navigation.toggled .menu li.search-item{display:none!important}.main-navigation.toggled .dropdown-menu-toggle:before{content:"\f107"!important}.main-navigation.toggled .sfHover>a .dropdown-menu-toggle:before{content:"\f106"!important}.main-navigation.toggled .menu-item-has-children .dropdown-menu-toggle{float:right}.main-navigation.toggled .sf-menu>li.menu-item-float-right{float:none!important;display:inline-block!important}@media (max-width:768px){.top-bar.top-bar-align-left,.top-bar.top-bar-align-right{text-align:center}.top-bar .widget{float:none!important;margin:0 10px!important}.footer-bar .widget_nav_menu li,.top-bar .widget_nav_menu li{float:none;display:inline-block;padding:5px 0}.content-area,.inside-footer-widgets>div,.sidebar{float:none;width:100%;left:0;right:0}.inside-footer-widgets>div:not(:last-child){margin-bottom:40px}.one-container .sidebar{margin-top:40px}.separate-containers #left-sidebar+#right-sidebar .inside-right-sidebar{margin-top:0}a,body,button,input,select,textarea{-webkit-transition:all 0s ease-in-out;-moz-transition:all 0s ease-in-out;-o-transition:all 0s ease-in-out;transition:all 0s ease-in-out}.inside-header>:not(:last-child):not(.main-navigation){margin-bottom:20px}.main-navigation .menu-toggle,.main-navigation .mobile-bar-items,.sidebar-nav-mobile:not(#sticky-placeholder){display:block}.gen-sidebar-nav,.main-navigation ul{display:none}[class*=nav-float-] .site-header .inside-header>*{float:none;clear:both}.both-left.separate-containers .inside-left-sidebar,.both-left.separate-containers .inside-right-sidebar,.both-right.separate-containers .inside-left-sidebar,.both-right.separate-containers .inside-right-sidebar{margin-right:0;margin-left:0}.site-main{margin-left:0!important;margin-right:0!important}body:not(.no-sidebar) .site-main{margin-bottom:0!important}.fluid-header .inside-header,.header-widget{text-align:center}.header-widget{float:none;max-width:100%}.alignleft,.alignright{float:none;display:block;margin-left:auto;margin-right:auto}.post-image-aligned-left .post-image,.post-image-aligned-right .post-image{float:none;margin:2em 0;text-align:center}.site-info{padding-left:10px;padding-right:10px;text-align:center}.copyright-bar,.footer-bar{float:none!important;text-align:center!important}.footer-bar{margin-bottom:20px}.site-footer .footer-widgets .footer-widgets-container .inside-footer-widgets{margin:0}.site-footer .footer-widgets .footer-widgets-container .inner-padding{padding:0}.comment .children{padding-left:10px;margin-left:0}.edd_download{display:block;float:none!important;margin-bottom:1.5em;width:100%!important}} +button.menu-toggle{background-color:transparent;width:100%;border:0;text-align:center}.nav-search-enabled .main-navigation .menu-toggle{text-align:left}.mobile-bar-items{display:none;position:absolute;right:0;top:0;z-index:21;list-style-type:none}.mobile-bar-items a{display:inline-block}.mobile-bar-items .search-item.active{transition:opacity 300ms ease-in-out}.main-navigation.toggled ul ul{transition:0s;visibility:hidden}nav.toggled ul ul.sub-menu{width:100%}.dropdown-hover .main-navigation.toggled ul li.sfHover>ul,.dropdown-hover .main-navigation.toggled ul li:hover>ul{transition-delay:0s}.toggled .menu-item-has-children .dropdown-menu-toggle{padding-left:20px}.main-navigation.toggled ul ul.toggled-on{visibility:visible}.main-navigation.toggled .main-nav>ul{display:block}.main-navigation.toggled .main-nav ul ul.toggled-on{position:relative;top:0;left:auto!important;right:auto!important;width:100%;pointer-events:auto;height:auto;opacity:1;display:block}.main-navigation.toggled .main-nav li{float:none;clear:both;display:block!important;text-align:left!important}.main-navigation.toggled .main-nav li.hide-on-mobile,.main-navigation.toggled .menu li.search-item{display:none!important}.main-navigation.toggled .dropdown-menu-toggle:before{content:"\f107"!important}.main-navigation.toggled .sfHover>a .dropdown-menu-toggle:before{content:"\f106"!important}.main-navigation.toggled .menu-item-has-children .dropdown-menu-toggle{float:right}.main-navigation.toggled .sf-menu>li.menu-item-float-right{float:none!important;display:inline-block!important}@media (max-width:768px){.top-bar.top-bar-align-left,.top-bar.top-bar-align-right{text-align:center}.top-bar .widget{float:none!important;margin:0 10px!important}.footer-bar .widget_nav_menu li,.top-bar .widget_nav_menu li{float:none;display:inline-block;padding:5px 0}.content-area,.inside-footer-widgets>div,.sidebar{float:none;width:100%;left:0;right:0}.inside-footer-widgets>div:not(:last-child){margin-bottom:40px}.one-container .sidebar{margin-top:40px}.separate-containers #left-sidebar+#right-sidebar .inside-right-sidebar{margin-top:0}a,body,button,input,select,textarea{-webkit-transition:all 0s ease-in-out;-moz-transition:all 0s ease-in-out;-o-transition:all 0s ease-in-out;transition:all 0s ease-in-out}.inside-header>:not(:last-child):not(.main-navigation){margin-bottom:20px}.main-navigation .menu-toggle,.main-navigation .mobile-bar-items,.sidebar-nav-mobile:not(#sticky-placeholder){display:block}.gen-sidebar-nav,.main-navigation ul{display:none}[class*=nav-float-] .site-header .inside-header>*{float:none;clear:both}.both-left.separate-containers .inside-left-sidebar,.both-left.separate-containers .inside-right-sidebar,.both-right.separate-containers .inside-left-sidebar,.both-right.separate-containers .inside-right-sidebar{margin-right:0;margin-left:0}.site-main{margin-left:0!important;margin-right:0!important}body:not(.no-sidebar) .site-main{margin-bottom:0!important}.fluid-header .inside-header,.header-widget{text-align:center}.header-widget{float:none;max-width:100%}.alignleft,.alignright{float:none;display:block;margin-left:auto;margin-right:auto}.post-image-aligned-left .post-image,.post-image-aligned-right .post-image{float:none;margin:2em 0;text-align:center}.site-info{padding-left:10px;padding-right:10px;text-align:center}.copyright-bar,.footer-bar{float:none!important;text-align:center!important}.footer-bar{margin-bottom:20px}.site-footer .footer-widgets .footer-widgets-container .inside-footer-widgets{margin:0}.site-footer .footer-widgets .footer-widgets-container .inner-padding{padding:0}.comment .children{padding-left:10px;margin-left:0}.edd_download{display:block;float:none!important;margin-bottom:1.5em;width:100%!important}.entry-meta{font-size:inherit}} diff --git a/functions.php b/functions.php index e56ca98d..ca9197c3 100644 --- a/functions.php +++ b/functions.php @@ -12,7 +12,7 @@ } // Set our theme version. -define( 'GENERATE_VERSION', '2.1.2' ); +define( 'GENERATE_VERSION', '2.1.3' ); if ( ! function_exists( 'generate_setup' ) ) { add_action( 'after_setup_theme', 'generate_setup' ); @@ -38,7 +38,7 @@ function generate_setup() { 'height' => 70, 'width' => 350, 'flex-height' => true, - 'flex-width' => true + 'flex-width' => true, ) ); // Register primary menu. diff --git a/inc/css-output.php b/inc/css-output.php index 5041c8ae..66d2bd67 100644 --- a/inc/css-output.php +++ b/inc/css-output.php @@ -27,20 +27,20 @@ function generate_base_css() { // Body $css->set_selector( 'body' ); - $css->add_property( 'background-color', esc_attr( $generate_settings[ 'background_color' ] ) ); - $css->add_property( 'color', esc_attr( $generate_settings[ 'text_color' ] ) ); + $css->add_property( 'background-color', esc_attr( $generate_settings['background_color'] ) ); + $css->add_property( 'color', esc_attr( $generate_settings['text_color'] ) ); // Links $css->set_selector( 'a, a:visited' ); - $css->add_property( 'color', esc_attr( $generate_settings[ 'link_color' ] ) ); + $css->add_property( 'color', esc_attr( $generate_settings['link_color'] ) ); $css->add_property( 'text-decoration', 'none' ); // Temporary until people can get their browser caches cleared // Visited links - $css->set_selector( 'a:visited' )->add_property( 'color', esc_attr( $generate_settings[ 'link_color_visited' ] ) ); + $css->set_selector( 'a:visited' )->add_property( 'color', esc_attr( $generate_settings['link_color_visited'] ) ); // Hover/focused links $css->set_selector( 'a:hover, a:focus, a:active' ); - $css->add_property( 'color', esc_attr( $generate_settings[ 'link_color_hover' ] ) ); + $css->add_property( 'color', esc_attr( $generate_settings['link_color_hover'] ) ); $css->add_property( 'text-decoration', 'none' ); // Temporary until people can get their browser caches cleared // Container width @@ -71,231 +71,231 @@ function generate_advanced_css() { // Top bar $css->set_selector( '.top-bar' ); - $css->add_property( 'background-color', esc_attr( $generate_settings[ 'top_bar_background_color' ] ) ); - $css->add_property( 'color', esc_attr( $generate_settings[ 'top_bar_text_color' ] ) ); + $css->add_property( 'background-color', esc_attr( $generate_settings['top_bar_background_color'] ) ); + $css->add_property( 'color', esc_attr( $generate_settings['top_bar_text_color'] ) ); // Top bar link $css->set_selector( '.top-bar a,.top-bar a:visited' ); - $css->add_property( 'color', esc_attr( $generate_settings[ 'top_bar_link_color' ] ) ); + $css->add_property( 'color', esc_attr( $generate_settings['top_bar_link_color'] ) ); // Top bar link hover $css->set_selector( '.top-bar a:hover' ); - $css->add_property( 'color', esc_attr( $generate_settings[ 'top_bar_link_color_hover' ] ) ); + $css->add_property( 'color', esc_attr( $generate_settings['top_bar_link_color_hover'] ) ); // Header $css->set_selector( '.site-header' ); - $css->add_property( 'background-color', esc_attr( $generate_settings[ 'header_background_color' ] ) ); - $css->add_property( 'color', esc_attr( $generate_settings[ 'header_text_color' ] ) ); + $css->add_property( 'background-color', esc_attr( $generate_settings['header_background_color'] ) ); + $css->add_property( 'color', esc_attr( $generate_settings['header_text_color'] ) ); // Header link $css->set_selector( '.site-header a,.site-header a:visited' ); - $css->add_property( 'color', esc_attr( $generate_settings[ 'header_link_color' ] ) ); + $css->add_property( 'color', esc_attr( $generate_settings['header_link_color'] ) ); // Header link hover $css->set_selector( '.site-header a:hover' ); - $css->add_property( 'color', esc_attr( $generate_settings[ 'header_link_hover_color' ] ) ); + $css->add_property( 'color', esc_attr( $generate_settings['header_link_hover_color'] ) ); // Site title $css->set_selector( '.main-title a,.main-title a:hover,.main-title a:visited' ); - $css->add_property( 'color', esc_attr( $generate_settings[ 'site_title_color' ] ) ); + $css->add_property( 'color', esc_attr( $generate_settings['site_title_color'] ) ); // Site description $css->set_selector( '.site-description' ); - $css->add_property( 'color', esc_attr( $generate_settings[ 'site_tagline_color' ] ) ); + $css->add_property( 'color', esc_attr( $generate_settings['site_tagline_color'] ) ); // Navigation background $css->set_selector( '.main-navigation,.main-navigation ul ul' ); - $css->add_property( 'background-color', esc_attr( $generate_settings[ 'navigation_background_color' ] ) ); + $css->add_property( 'background-color', esc_attr( $generate_settings['navigation_background_color'] ) ); // Navigation text $css->set_selector( '.main-navigation .main-nav ul li a,.menu-toggle' ); - $css->add_property( 'color', esc_attr( $generate_settings[ 'navigation_text_color' ] ) ); + $css->add_property( 'color', esc_attr( $generate_settings['navigation_text_color'] ) ); // Navigation background/text on hover $css->set_selector( '.main-navigation .main-nav ul li:hover > a,.main-navigation .main-nav ul li:focus > a, .main-navigation .main-nav ul li.sfHover > a' ); - $css->add_property( 'color', esc_attr( $generate_settings[ 'navigation_text_hover_color' ] ) ); - $css->add_property( 'background-color', esc_attr( $generate_settings[ 'navigation_background_hover_color' ] ) ); + $css->add_property( 'color', esc_attr( $generate_settings['navigation_text_hover_color'] ) ); + $css->add_property( 'background-color', esc_attr( $generate_settings['navigation_background_hover_color'] ) ); // Mobile button text $css->set_selector( 'button.menu-toggle:hover,button.menu-toggle:focus,.main-navigation .mobile-bar-items a,.main-navigation .mobile-bar-items a:hover,.main-navigation .mobile-bar-items a:focus' ); - $css->add_property( 'color', esc_attr( $generate_settings[ 'navigation_text_color' ] ) ); + $css->add_property( 'color', esc_attr( $generate_settings['navigation_text_color'] ) ); // Navigation background/text current $css->set_selector( '.main-navigation .main-nav ul li[class*="current-menu-"] > a' ); - $css->add_property( 'color', esc_attr( $generate_settings[ 'navigation_text_current_color' ] ) ); - $css->add_property( 'background-color', esc_attr( $generate_settings[ 'navigation_background_current_color' ] ) ); + $css->add_property( 'color', esc_attr( $generate_settings['navigation_text_current_color'] ) ); + $css->add_property( 'background-color', esc_attr( $generate_settings['navigation_background_current_color'] ) ); // Navigation background text current text hover $css->set_selector( '.main-navigation .main-nav ul li[class*="current-menu-"] > a:hover,.main-navigation .main-nav ul li[class*="current-menu-"].sfHover > a' ); - $css->add_property( 'color', esc_attr( $generate_settings[ 'navigation_text_current_color' ] ) ); - $css->add_property( 'background-color', esc_attr( $generate_settings[ 'navigation_background_current_color' ] ) ); + $css->add_property( 'color', esc_attr( $generate_settings['navigation_text_current_color'] ) ); + $css->add_property( 'background-color', esc_attr( $generate_settings['navigation_background_current_color'] ) ); // Navigation search input $css->set_selector( '.navigation-search input[type="search"],.navigation-search input[type="search"]:active' ); - $css->add_property( 'color', esc_attr( $generate_settings[ 'navigation_background_hover_color' ] ) ); - $css->add_property( 'background-color', esc_attr( $generate_settings[ 'navigation_background_hover_color' ] ) ); + $css->add_property( 'color', esc_attr( $generate_settings['navigation_background_hover_color'] ) ); + $css->add_property( 'background-color', esc_attr( $generate_settings['navigation_background_hover_color'] ) ); // Navigation search input on focus $css->set_selector( '.navigation-search input[type="search"]:focus' ); - $css->add_property( 'color', esc_attr( $generate_settings[ 'navigation_text_hover_color' ] ) ); - $css->add_property( 'background-color', esc_attr( $generate_settings[ 'navigation_background_hover_color' ] ) ); + $css->add_property( 'color', esc_attr( $generate_settings['navigation_text_hover_color'] ) ); + $css->add_property( 'background-color', esc_attr( $generate_settings['navigation_background_hover_color'] ) ); // Sub-navigation background $css->set_selector( '.main-navigation ul ul' ); - $css->add_property( 'background-color', esc_attr( $generate_settings[ 'subnavigation_background_color' ] ) ); + $css->add_property( 'background-color', esc_attr( $generate_settings['subnavigation_background_color'] ) ); // Sub-navigation text $css->set_selector( '.main-navigation .main-nav ul ul li a' ); - $css->add_property( 'color', esc_attr( $generate_settings[ 'subnavigation_text_color' ] ) ); + $css->add_property( 'color', esc_attr( $generate_settings['subnavigation_text_color'] ) ); // Sub-Navigation background/text on hover $css->set_selector( '.main-navigation .main-nav ul ul li:hover > a,.main-navigation .main-nav ul ul li:focus > a,.main-navigation .main-nav ul ul li.sfHover > a' ); - $css->add_property( 'color', esc_attr( $generate_settings[ 'subnavigation_text_hover_color' ] ) ); - $css->add_property( 'background-color', esc_attr( $generate_settings[ 'subnavigation_background_hover_color' ] ) ); + $css->add_property( 'color', esc_attr( $generate_settings['subnavigation_text_hover_color'] ) ); + $css->add_property( 'background-color', esc_attr( $generate_settings['subnavigation_background_hover_color'] ) ); // Sub-Navigation background / text current $css->set_selector( '.main-navigation .main-nav ul ul li[class*="current-menu-"] > a' ); - $css->add_property( 'color', esc_attr( $generate_settings[ 'subnavigation_text_current_color' ] ) ); - $css->add_property( 'background-color', esc_attr( $generate_settings[ 'subnavigation_background_current_color' ] ) ); + $css->add_property( 'color', esc_attr( $generate_settings['subnavigation_text_current_color'] ) ); + $css->add_property( 'background-color', esc_attr( $generate_settings['subnavigation_background_current_color'] ) ); // Sub-Navigation current background / text current $css->set_selector( '.main-navigation .main-nav ul ul li[class*="current-menu-"] > a:hover,.main-navigation .main-nav ul ul li[class*="current-menu-"].sfHover > a' ); - $css->add_property( 'color', esc_attr( $generate_settings[ 'subnavigation_text_current_color' ] ) ); - $css->add_property( 'background-color', esc_attr( $generate_settings[ 'subnavigation_background_current_color' ] ) ); + $css->add_property( 'color', esc_attr( $generate_settings['subnavigation_text_current_color'] ) ); + $css->add_property( 'background-color', esc_attr( $generate_settings['subnavigation_background_current_color'] ) ); // Content $css->set_selector( '.separate-containers .inside-article, .separate-containers .comments-area, .separate-containers .page-header, .one-container .container, .separate-containers .paging-navigation, .inside-page-header' ); - $css->add_property( 'color', esc_attr( $generate_settings[ 'content_text_color' ] ) ); - $css->add_property( 'background-color', esc_attr( $generate_settings[ 'content_background_color' ] ) ); + $css->add_property( 'color', esc_attr( $generate_settings['content_text_color'] ) ); + $css->add_property( 'background-color', esc_attr( $generate_settings['content_background_color'] ) ); // Content links $css->set_selector( '.inside-article a,.inside-article a:visited,.paging-navigation a,.paging-navigation a:visited,.comments-area a,.comments-area a:visited,.page-header a,.page-header a:visited' ); - $css->add_property( 'color', esc_attr( $generate_settings[ 'content_link_color' ] ) ); + $css->add_property( 'color', esc_attr( $generate_settings['content_link_color'] ) ); // Content links on hover $css->set_selector( '.inside-article a:hover,.paging-navigation a:hover,.comments-area a:hover,.page-header a:hover' ); - $css->add_property( 'color', esc_attr( $generate_settings[ 'content_link_hover_color' ] ) ); + $css->add_property( 'color', esc_attr( $generate_settings['content_link_hover_color'] ) ); // Entry header $css->set_selector( '.entry-header h1,.page-header h1' ); - $css->add_property( 'color', esc_attr( $generate_settings[ 'content_title_color' ] ) ); + $css->add_property( 'color', esc_attr( $generate_settings['content_title_color'] ) ); // Blog post title $css->set_selector( '.entry-title a,.entry-title a:visited' ); - $css->add_property( 'color', esc_attr( $generate_settings[ 'blog_post_title_color' ] ) ); + $css->add_property( 'color', esc_attr( $generate_settings['blog_post_title_color'] ) ); // Blog post title on hover $css->set_selector( '.entry-title a:hover' ); - $css->add_property( 'color', esc_attr( $generate_settings[ 'blog_post_title_hover_color' ] ) ); + $css->add_property( 'color', esc_attr( $generate_settings['blog_post_title_hover_color'] ) ); // Entry meta text $css->set_selector( '.entry-meta' ); - $css->add_property( 'color', esc_attr( $generate_settings[ 'entry_meta_text_color' ] ) ); + $css->add_property( 'color', esc_attr( $generate_settings['entry_meta_text_color'] ) ); // Entry meta links $css->set_selector( '.entry-meta a,.entry-meta a:visited' ); - $css->add_property( 'color', esc_attr( $generate_settings[ 'entry_meta_link_color' ] ) ); + $css->add_property( 'color', esc_attr( $generate_settings['entry_meta_link_color'] ) ); // Entry meta links on hover $css->set_selector( '.entry-meta a:hover' ); - $css->add_property( 'color', esc_attr( $generate_settings[ 'entry_meta_link_color_hover' ] ) ); + $css->add_property( 'color', esc_attr( $generate_settings['entry_meta_link_color_hover'] ) ); // H1 color $css->set_selector( 'h1' ); - $css->add_property( 'color', esc_attr( $generate_settings[ 'h1_color' ] ) ); + $css->add_property( 'color', esc_attr( $generate_settings['h1_color'] ) ); // H2 color $css->set_selector( 'h2' ); - $css->add_property( 'color', esc_attr( $generate_settings[ 'h2_color' ] ) ); + $css->add_property( 'color', esc_attr( $generate_settings['h2_color'] ) ); // H3 color $css->set_selector( 'h3' ); - $css->add_property( 'color', esc_attr( $generate_settings[ 'h3_color' ] ) ); + $css->add_property( 'color', esc_attr( $generate_settings['h3_color'] ) ); // H4 color $css->set_selector( 'h4' ); - $css->add_property( 'color', esc_attr( $generate_settings[ 'h4_color' ] ) ); + $css->add_property( 'color', esc_attr( $generate_settings['h4_color'] ) ); // H5 color $css->set_selector( 'h5' ); - $css->add_property( 'color', esc_attr( $generate_settings[ 'h5_color' ] ) ); + $css->add_property( 'color', esc_attr( $generate_settings['h5_color'] ) ); // H6 color $css->set_selector( 'h6' ); - $css->add_property( 'color', esc_attr( $generate_settings[ 'h6_color' ] ) ); + $css->add_property( 'color', esc_attr( $generate_settings['h6_color'] ) ); // Sidebar widget $css->set_selector( '.sidebar .widget' ); - $css->add_property( 'color', esc_attr( $generate_settings[ 'sidebar_widget_text_color' ] ) ); - $css->add_property( 'background-color', esc_attr( $generate_settings[ 'sidebar_widget_background_color' ] ) ); + $css->add_property( 'color', esc_attr( $generate_settings['sidebar_widget_text_color'] ) ); + $css->add_property( 'background-color', esc_attr( $generate_settings['sidebar_widget_background_color'] ) ); // Sidebar widget links $css->set_selector( '.sidebar .widget a,.sidebar .widget a:visited' ); - $css->add_property( 'color', esc_attr( $generate_settings[ 'sidebar_widget_link_color' ] ) ); + $css->add_property( 'color', esc_attr( $generate_settings['sidebar_widget_link_color'] ) ); // Sidebar widget links on hover $css->set_selector( '.sidebar .widget a:hover' ); - $css->add_property( 'color', esc_attr( $generate_settings[ 'sidebar_widget_link_hover_color' ] ) ); + $css->add_property( 'color', esc_attr( $generate_settings['sidebar_widget_link_hover_color'] ) ); // Sidebar widget title $css->set_selector( '.sidebar .widget .widget-title' ); - $css->add_property( 'color', esc_attr( $generate_settings[ 'sidebar_widget_title_color' ] ) ); + $css->add_property( 'color', esc_attr( $generate_settings['sidebar_widget_title_color'] ) ); // Footer widget $css->set_selector( '.footer-widgets' ); - $css->add_property( 'color', esc_attr( $generate_settings[ 'footer_widget_text_color' ] ) ); - $css->add_property( 'background-color', esc_attr( $generate_settings[ 'footer_widget_background_color' ] ) ); + $css->add_property( 'color', esc_attr( $generate_settings['footer_widget_text_color'] ) ); + $css->add_property( 'background-color', esc_attr( $generate_settings['footer_widget_background_color'] ) ); // Footer widget links $css->set_selector( '.footer-widgets a,.footer-widgets a:visited' ); - $css->add_property( 'color', esc_attr( $generate_settings[ 'footer_widget_link_color' ] ) ); + $css->add_property( 'color', esc_attr( $generate_settings['footer_widget_link_color'] ) ); // Footer widget links on hover $css->set_selector( '.footer-widgets a:hover' ); - $css->add_property( 'color', esc_attr( $generate_settings[ 'footer_widget_link_hover_color' ] ) ); + $css->add_property( 'color', esc_attr( $generate_settings['footer_widget_link_hover_color'] ) ); // Footer widget title $css->set_selector( '.footer-widgets .widget-title' ); - $css->add_property( 'color', esc_attr( $generate_settings[ 'footer_widget_title_color' ] ) ); + $css->add_property( 'color', esc_attr( $generate_settings['footer_widget_title_color'] ) ); // Footer $css->set_selector( '.site-info' ); - $css->add_property( 'color', esc_attr( $generate_settings[ 'footer_text_color' ] ) ); - $css->add_property( 'background-color', esc_attr( $generate_settings[ 'footer_background_color' ] ) ); + $css->add_property( 'color', esc_attr( $generate_settings['footer_text_color'] ) ); + $css->add_property( 'background-color', esc_attr( $generate_settings['footer_background_color'] ) ); // Footer links $css->set_selector( '.site-info a,.site-info a:visited' ); - $css->add_property( 'color', esc_attr( $generate_settings[ 'footer_link_color' ] ) ); + $css->add_property( 'color', esc_attr( $generate_settings['footer_link_color'] ) ); // Footer links on hover $css->set_selector( '.site-info a:hover' ); - $css->add_property( 'color', esc_attr( $generate_settings[ 'footer_link_hover_color' ] ) ); + $css->add_property( 'color', esc_attr( $generate_settings['footer_link_hover_color'] ) ); // Footer bar widget menu $css->set_selector( '.footer-bar .widget_nav_menu .current-menu-item a' ); - $css->add_property( 'color', esc_attr( $generate_settings[ 'footer_link_hover_color' ] ) ); + $css->add_property( 'color', esc_attr( $generate_settings['footer_link_hover_color'] ) ); // Form input $css->set_selector( 'input[type="text"],input[type="email"],input[type="url"],input[type="password"],input[type="search"],input[type="tel"],input[type="number"],textarea,select' ); - $css->add_property( 'color', esc_attr( $generate_settings[ 'form_text_color' ] ) ); - $css->add_property( 'background-color', esc_attr( $generate_settings[ 'form_background_color' ] ) ); - $css->add_property( 'border-color', esc_attr( $generate_settings[ 'form_border_color' ] ) ); + $css->add_property( 'color', esc_attr( $generate_settings['form_text_color'] ) ); + $css->add_property( 'background-color', esc_attr( $generate_settings['form_background_color'] ) ); + $css->add_property( 'border-color', esc_attr( $generate_settings['form_border_color'] ) ); // Form input on focus $css->set_selector( 'input[type="text"]:focus,input[type="email"]:focus,input[type="url"]:focus,input[type="password"]:focus,input[type="search"]:focus,input[type="tel"]:focus,input[type="number"]:focus,textarea:focus,select:focus' ); - $css->add_property( 'color', esc_attr( $generate_settings[ 'form_text_color_focus' ] ) ); - $css->add_property( 'background-color', esc_attr( $generate_settings[ 'form_background_color_focus' ] ) ); - $css->add_property( 'border-color', esc_attr( $generate_settings[ 'form_border_color_focus' ] ) ); + $css->add_property( 'color', esc_attr( $generate_settings['form_text_color_focus'] ) ); + $css->add_property( 'background-color', esc_attr( $generate_settings['form_background_color_focus'] ) ); + $css->add_property( 'border-color', esc_attr( $generate_settings['form_border_color_focus'] ) ); // Form button $css->set_selector( 'button,html input[type="button"],input[type="reset"],input[type="submit"],a.button,a.button:visited' ); - $css->add_property( 'color', esc_attr( $generate_settings[ 'form_button_text_color' ] ) ); - $css->add_property( 'background-color', esc_attr( $generate_settings[ 'form_button_background_color' ] ) ); + $css->add_property( 'color', esc_attr( $generate_settings['form_button_text_color'] ) ); + $css->add_property( 'background-color', esc_attr( $generate_settings['form_button_background_color'] ) ); // Form button on hover $css->set_selector( 'button:hover,html input[type="button"]:hover,input[type="reset"]:hover,input[type="submit"]:hover,a.button:hover,button:focus,html input[type="button"]:focus,input[type="reset"]:focus,input[type="submit"]:focus,a.button:focus' ); - $css->add_property( 'color', esc_attr( $generate_settings[ 'form_button_text_color_hover' ] ) ); - $css->add_property( 'background-color', esc_attr( $generate_settings[ 'form_button_background_color_hover' ] ) ); + $css->add_property( 'color', esc_attr( $generate_settings['form_button_text_color_hover'] ) ); + $css->add_property( 'background-color', esc_attr( $generate_settings['form_button_background_color_hover'] ) ); // Back to top button $css->set_selector( '.generate-back-to-top,.generate-back-to-top:visited' ); @@ -353,9 +353,9 @@ function generate_font_css() { // Body $css->set_selector( 'body, button, input, select, textarea' ); $css->add_property( 'font-family', $body_family ); - $css->add_property( 'font-weight', esc_attr( $generate_settings[ 'body_font_weight' ] ), $og_defaults[ 'body_font_weight' ] ); - $css->add_property( 'text-transform', esc_attr( $generate_settings[ 'body_font_transform' ] ), $og_defaults[ 'body_font_transform' ] ); - $css->add_property( 'font-size', absint( $generate_settings[ 'body_font_size' ] ), $og_defaults[ 'body_font_size' ], 'px' ); + $css->add_property( 'font-weight', esc_attr( $generate_settings['body_font_weight'] ), $og_defaults['body_font_weight'] ); + $css->add_property( 'text-transform', esc_attr( $generate_settings['body_font_transform'] ), $og_defaults['body_font_transform'] ); + $css->add_property( 'font-size', absint( $generate_settings['body_font_size'] ), $og_defaults['body_font_size'], 'px' ); // Line hieght $css->set_selector( 'body' ); @@ -367,31 +367,31 @@ function generate_font_css() { // Top bar $css->set_selector( '.top-bar' ); - $css->add_property( 'font-family', $og_defaults[ 'font_top_bar' ] !== $generate_settings[ 'font_top_bar' ] ? $top_bar_family : null ); - $css->add_property( 'font-weight', esc_attr( $generate_settings[ 'top_bar_font_weight' ] ), $og_defaults[ 'top_bar_font_weight' ] ); - $css->add_property( 'text-transform', esc_attr( $generate_settings[ 'top_bar_font_transform' ] ), $og_defaults[ 'top_bar_font_transform' ] ); - $css->add_property( 'font-size', absint( $generate_settings[ 'top_bar_font_size' ] ), absint( $og_defaults[ 'top_bar_font_size' ] ), 'px' ); + $css->add_property( 'font-family', $og_defaults['font_top_bar'] !== $generate_settings['font_top_bar'] ? $top_bar_family : null ); + $css->add_property( 'font-weight', esc_attr( $generate_settings['top_bar_font_weight'] ), $og_defaults['top_bar_font_weight'] ); + $css->add_property( 'text-transform', esc_attr( $generate_settings['top_bar_font_transform'] ), $og_defaults['top_bar_font_transform'] ); + $css->add_property( 'font-size', absint( $generate_settings['top_bar_font_size'] ), absint( $og_defaults['top_bar_font_size'] ), 'px' ); // Site title $css->set_selector( '.main-title' ); - $css->add_property( 'font-family', $og_defaults[ 'font_site_title' ] !== $generate_settings[ 'font_site_title' ] ? $site_title_family : null ); - $css->add_property( 'font-weight', esc_attr( $generate_settings[ 'site_title_font_weight' ] ), $og_defaults[ 'site_title_font_weight' ] ); - $css->add_property( 'text-transform', esc_attr( $generate_settings[ 'site_title_font_transform' ] ), $og_defaults[ 'site_title_font_transform' ] ); - $css->add_property( 'font-size', absint( $generate_settings[ 'site_title_font_size' ] ), $og_defaults[ 'site_title_font_size' ], 'px' ); + $css->add_property( 'font-family', $og_defaults['font_site_title'] !== $generate_settings['font_site_title'] ? $site_title_family : null ); + $css->add_property( 'font-weight', esc_attr( $generate_settings['site_title_font_weight'] ), $og_defaults['site_title_font_weight'] ); + $css->add_property( 'text-transform', esc_attr( $generate_settings['site_title_font_transform'] ), $og_defaults['site_title_font_transform'] ); + $css->add_property( 'font-size', absint( $generate_settings['site_title_font_size'] ), $og_defaults['site_title_font_size'], 'px' ); // Site description $css->set_selector( '.site-description' ); - $css->add_property( 'font-family', $og_defaults[ 'font_site_tagline' ] !== $generate_settings[ 'font_site_tagline' ] ? $site_tagline_family : null ); - $css->add_property( 'font-weight', esc_attr( $generate_settings[ 'site_tagline_font_weight' ] ), $og_defaults[ 'site_tagline_font_weight' ] ); - $css->add_property( 'text-transform', esc_attr( $generate_settings[ 'site_tagline_font_transform' ] ), $og_defaults[ 'site_tagline_font_transform' ] ); - $css->add_property( 'font-size', absint( $generate_settings[ 'site_tagline_font_size' ] ), $og_defaults[ 'site_tagline_font_size' ], 'px' ); + $css->add_property( 'font-family', $og_defaults['font_site_tagline'] !== $generate_settings['font_site_tagline'] ? $site_tagline_family : null ); + $css->add_property( 'font-weight', esc_attr( $generate_settings['site_tagline_font_weight'] ), $og_defaults['site_tagline_font_weight'] ); + $css->add_property( 'text-transform', esc_attr( $generate_settings['site_tagline_font_transform'] ), $og_defaults['site_tagline_font_transform'] ); + $css->add_property( 'font-size', absint( $generate_settings['site_tagline_font_size'] ), $og_defaults['site_tagline_font_size'], 'px' ); // Navigation $css->set_selector( '.main-navigation a, .menu-toggle' ); - $css->add_property( 'font-family', $og_defaults[ 'font_navigation' ] !== $generate_settings[ 'font_navigation' ] ? $navigation_family : null ); - $css->add_property( 'font-weight', esc_attr( $generate_settings[ 'navigation_font_weight' ] ), $og_defaults[ 'navigation_font_weight' ] ); - $css->add_property( 'text-transform', esc_attr( $generate_settings[ 'navigation_font_transform' ] ), $og_defaults[ 'navigation_font_transform' ] ); - $css->add_property( 'font-size', absint( $generate_settings[ 'navigation_font_size' ] ), $og_defaults[ 'navigation_font_size' ], 'px' ); + $css->add_property( 'font-family', $og_defaults['font_navigation'] !== $generate_settings['font_navigation'] ? $navigation_family : null ); + $css->add_property( 'font-weight', esc_attr( $generate_settings['navigation_font_weight'] ), $og_defaults['navigation_font_weight'] ); + $css->add_property( 'text-transform', esc_attr( $generate_settings['navigation_font_transform'] ), $og_defaults['navigation_font_transform'] ); + $css->add_property( 'font-size', absint( $generate_settings['navigation_font_size'] ), $og_defaults['navigation_font_size'], 'px' ); // Sub-navigation font size $css->set_selector( '.main-navigation .main-nav ul ul li a' ); @@ -399,10 +399,10 @@ function generate_font_css() { // Widget title $css->set_selector( '.widget-title' ); - $css->add_property( 'font-family', $og_defaults[ 'font_widget_title' ] !== $generate_settings[ 'font_widget_title' ] ? $widget_family : null ); - $css->add_property( 'font-weight', esc_attr( $generate_settings[ 'widget_title_font_weight' ] ), $og_defaults[ 'widget_title_font_weight' ] ); - $css->add_property( 'text-transform', esc_attr( $generate_settings[ 'widget_title_font_transform' ] ), $og_defaults[ 'widget_title_font_transform' ] ); - $css->add_property( 'font-size', absint( $generate_settings[ 'widget_title_font_size' ] ), $og_defaults[ 'widget_title_font_size' ], 'px' ); + $css->add_property( 'font-family', $og_defaults['font_widget_title'] !== $generate_settings['font_widget_title'] ? $widget_family : null ); + $css->add_property( 'font-weight', esc_attr( $generate_settings['widget_title_font_weight'] ), $og_defaults['widget_title_font_weight'] ); + $css->add_property( 'text-transform', esc_attr( $generate_settings['widget_title_font_transform'] ), $og_defaults['widget_title_font_transform'] ); + $css->add_property( 'font-size', absint( $generate_settings['widget_title_font_size'] ), $og_defaults['widget_title_font_size'], 'px' ); $css->add_property( 'margin-bottom', absint( $generate_settings['widget_title_separator'] ), absint( $og_defaults['widget_title_separator'] ), 'px' ); // Widget font size @@ -411,60 +411,60 @@ function generate_font_css() { // Form button $css->set_selector( 'button:not(.menu-toggle),html input[type="button"],input[type="reset"],input[type="submit"],.button,.button:visited' ); - $css->add_property( 'font-family', $og_defaults[ 'font_buttons' ] !== $generate_settings[ 'font_buttons' ] ? $buttons_family : null ); - $css->add_property( 'font-weight', esc_attr( $generate_settings[ 'buttons_font_weight' ] ), $og_defaults[ 'buttons_font_weight' ] ); - $css->add_property( 'text-transform', esc_attr( $generate_settings[ 'buttons_font_transform' ] ), $og_defaults[ 'buttons_font_transform' ] ); + $css->add_property( 'font-family', $og_defaults['font_buttons'] !== $generate_settings['font_buttons'] ? $buttons_family : null ); + $css->add_property( 'font-weight', esc_attr( $generate_settings['buttons_font_weight'] ), $og_defaults['buttons_font_weight'] ); + $css->add_property( 'text-transform', esc_attr( $generate_settings['buttons_font_transform'] ), $og_defaults['buttons_font_transform'] ); - if ( '' !== $generate_settings[ 'buttons_font_size' ] ) { - $css->add_property( 'font-size', absint( $generate_settings[ 'buttons_font_size' ] ), $og_defaults[ 'buttons_font_size' ], 'px' ); + if ( '' !== $generate_settings['buttons_font_size'] ) { + $css->add_property( 'font-size', absint( $generate_settings['buttons_font_size'] ), $og_defaults['buttons_font_size'], 'px' ); } // H1 $css->set_selector( 'h1' ); - $css->add_property( 'font-family', $og_defaults[ 'font_heading_1' ] !== $generate_settings[ 'font_heading_1' ] ? $h1_family : null ); - $css->add_property( 'font-weight', esc_attr( $generate_settings[ 'heading_1_weight' ] ), $og_defaults[ 'heading_1_weight' ] ); - $css->add_property( 'text-transform', esc_attr( $generate_settings[ 'heading_1_transform' ] ), $og_defaults[ 'heading_1_transform' ] ); - $css->add_property( 'font-size', absint( $generate_settings[ 'heading_1_font_size' ] ), $og_defaults[ 'heading_1_font_size' ], 'px' ); + $css->add_property( 'font-family', $og_defaults['font_heading_1'] !== $generate_settings['font_heading_1'] ? $h1_family : null ); + $css->add_property( 'font-weight', esc_attr( $generate_settings['heading_1_weight'] ), $og_defaults['heading_1_weight'] ); + $css->add_property( 'text-transform', esc_attr( $generate_settings['heading_1_transform'] ), $og_defaults['heading_1_transform'] ); + $css->add_property( 'font-size', absint( $generate_settings['heading_1_font_size'] ), $og_defaults['heading_1_font_size'], 'px' ); $css->add_property( 'line-height', floatval( $generate_settings['heading_1_line_height'] ), $og_defaults['heading_1_line_height'], 'em' ); // H2 $css->set_selector( 'h2' ); - $css->add_property( 'font-family', $og_defaults[ 'font_heading_2' ] !== $generate_settings[ 'font_heading_2' ] ? $h2_family : null ); - $css->add_property( 'font-weight', esc_attr( $generate_settings[ 'heading_2_weight' ] ), $og_defaults[ 'heading_2_weight' ] ); - $css->add_property( 'text-transform', esc_attr( $generate_settings[ 'heading_2_transform' ] ), $og_defaults[ 'heading_2_transform' ] ); - $css->add_property( 'font-size', absint( $generate_settings[ 'heading_2_font_size' ] ), $og_defaults[ 'heading_2_font_size' ], 'px' ); + $css->add_property( 'font-family', $og_defaults['font_heading_2'] !== $generate_settings['font_heading_2'] ? $h2_family : null ); + $css->add_property( 'font-weight', esc_attr( $generate_settings['heading_2_weight'] ), $og_defaults['heading_2_weight'] ); + $css->add_property( 'text-transform', esc_attr( $generate_settings['heading_2_transform'] ), $og_defaults['heading_2_transform'] ); + $css->add_property( 'font-size', absint( $generate_settings['heading_2_font_size'] ), $og_defaults['heading_2_font_size'], 'px' ); $css->add_property( 'line-height', floatval( $generate_settings['heading_2_line_height'] ), $og_defaults['heading_2_line_height'], 'em' ); // H3 $css->set_selector( 'h3' ); - $css->add_property( 'font-family', $og_defaults[ 'font_heading_3' ] !== $generate_settings[ 'font_heading_3' ] ? $h3_family : null ); - $css->add_property( 'font-weight', esc_attr( $generate_settings[ 'heading_3_weight' ] ), $og_defaults[ 'heading_3_weight' ] ); - $css->add_property( 'text-transform', esc_attr( $generate_settings[ 'heading_3_transform' ] ), $og_defaults[ 'heading_3_transform' ] ); - $css->add_property( 'font-size', absint( $generate_settings[ 'heading_3_font_size' ] ), $og_defaults[ 'heading_3_font_size' ], 'px' ); + $css->add_property( 'font-family', $og_defaults['font_heading_3'] !== $generate_settings['font_heading_3'] ? $h3_family : null ); + $css->add_property( 'font-weight', esc_attr( $generate_settings['heading_3_weight'] ), $og_defaults['heading_3_weight'] ); + $css->add_property( 'text-transform', esc_attr( $generate_settings['heading_3_transform'] ), $og_defaults['heading_3_transform'] ); + $css->add_property( 'font-size', absint( $generate_settings['heading_3_font_size'] ), $og_defaults['heading_3_font_size'], 'px' ); $css->add_property( 'line-height', floatval( $generate_settings['heading_3_line_height'] ), $og_defaults['heading_3_line_height'], 'em' ); // H4 $css->set_selector( 'h4' ); - $css->add_property( 'font-family', $og_defaults[ 'font_heading_4' ] !== $generate_settings[ 'font_heading_4' ] ? $h4_family : null ); - $css->add_property( 'font-weight', esc_attr( $generate_settings[ 'heading_4_weight' ] ), $og_defaults[ 'heading_4_weight' ] ); - $css->add_property( 'text-transform', esc_attr( $generate_settings[ 'heading_4_transform' ] ), $og_defaults[ 'heading_4_transform' ] ); + $css->add_property( 'font-family', $og_defaults['font_heading_4'] !== $generate_settings['font_heading_4'] ? $h4_family : null ); + $css->add_property( 'font-weight', esc_attr( $generate_settings['heading_4_weight'] ), $og_defaults['heading_4_weight'] ); + $css->add_property( 'text-transform', esc_attr( $generate_settings['heading_4_transform'] ), $og_defaults['heading_4_transform'] ); - if ( '' !== $generate_settings[ 'heading_4_font_size' ] ) { - $css->add_property( 'font-size', absint( $generate_settings[ 'heading_4_font_size' ] ), $og_defaults[ 'heading_4_font_size' ], 'px' ); + if ( '' !== $generate_settings['heading_4_font_size'] ) { + $css->add_property( 'font-size', absint( $generate_settings['heading_4_font_size'] ), $og_defaults['heading_4_font_size'], 'px' ); } - if ( '' !== $generate_settings[ 'heading_4_line_height' ] ) { + if ( '' !== $generate_settings['heading_4_line_height'] ) { $css->add_property( 'line-height', floatval( $generate_settings['heading_4_line_height'] ), $og_defaults['heading_4_line_height'], 'em' ); } // H5 $css->set_selector( 'h5' ); - $css->add_property( 'font-family', $og_defaults[ 'font_heading_5' ] !== $generate_settings[ 'font_heading_5' ] ? $h5_family : null ); - $css->add_property( 'font-weight', esc_attr( $generate_settings[ 'heading_5_weight' ] ), $og_defaults[ 'heading_5_weight' ] ); - $css->add_property( 'text-transform', esc_attr( $generate_settings[ 'heading_5_transform' ] ), $og_defaults[ 'heading_5_transform' ] ); + $css->add_property( 'font-family', $og_defaults['font_heading_5'] !== $generate_settings['font_heading_5'] ? $h5_family : null ); + $css->add_property( 'font-weight', esc_attr( $generate_settings['heading_5_weight'] ), $og_defaults['heading_5_weight'] ); + $css->add_property( 'text-transform', esc_attr( $generate_settings['heading_5_transform'] ), $og_defaults['heading_5_transform'] ); - if ( '' !== $generate_settings[ 'heading_5_font_size' ] ) { - $css->add_property( 'font-size', absint( $generate_settings[ 'heading_5_font_size' ] ), $og_defaults[ 'heading_5_font_size' ], 'px' ); + if ( '' !== $generate_settings['heading_5_font_size'] ) { + $css->add_property( 'font-size', absint( $generate_settings['heading_5_font_size'] ), $og_defaults['heading_5_font_size'], 'px' ); } if ( '' !== $generate_settings['heading_5_line_height'] ) { @@ -473,12 +473,12 @@ function generate_font_css() { // H6 $css->set_selector( 'h6' ); - $css->add_property( 'font-family', $og_defaults[ 'font_heading_6' ] !== $generate_settings[ 'font_heading_6' ] ? $h6_family : null ); - $css->add_property( 'font-weight', esc_attr( $generate_settings[ 'heading_6_weight' ] ), $og_defaults[ 'heading_6_weight' ] ); - $css->add_property( 'text-transform', esc_attr( $generate_settings[ 'heading_6_transform' ] ), $og_defaults[ 'heading_6_transform' ] ); + $css->add_property( 'font-family', $og_defaults['font_heading_6'] !== $generate_settings['font_heading_6'] ? $h6_family : null ); + $css->add_property( 'font-weight', esc_attr( $generate_settings['heading_6_weight'] ), $og_defaults['heading_6_weight'] ); + $css->add_property( 'text-transform', esc_attr( $generate_settings['heading_6_transform'] ), $og_defaults['heading_6_transform'] ); - if ( '' !== $generate_settings[ 'heading_6_font_size' ] ) { - $css->add_property( 'font-size', absint( $generate_settings[ 'heading_6_font_size' ] ), $og_defaults[ 'heading_6_font_size' ], 'px' ); + if ( '' !== $generate_settings['heading_6_font_size'] ) { + $css->add_property( 'font-size', absint( $generate_settings['heading_6_font_size'] ), $og_defaults['heading_6_font_size'], 'px' ); } if ( '' !== $generate_settings['heading_6_line_height'] ) { @@ -487,25 +487,25 @@ function generate_font_css() { // Footer $css->set_selector( '.site-info' ); - $css->add_property( 'font-family', $og_defaults[ 'font_footer' ] !== $generate_settings[ 'font_footer' ] ? $footer_family : null ); - $css->add_property( 'font-weight', esc_attr( $generate_settings[ 'footer_weight' ] ), $og_defaults[ 'footer_weight' ] ); - $css->add_property( 'text-transform', esc_attr( $generate_settings[ 'footer_transform' ] ), $og_defaults[ 'footer_transform' ] ); + $css->add_property( 'font-family', $og_defaults['font_footer'] !== $generate_settings['font_footer'] ? $footer_family : null ); + $css->add_property( 'font-weight', esc_attr( $generate_settings['footer_weight'] ), $og_defaults['footer_weight'] ); + $css->add_property( 'text-transform', esc_attr( $generate_settings['footer_transform'] ), $og_defaults['footer_transform'] ); $css->add_property( 'font-size', absint( $generate_settings['footer_font_size'] ), $og_defaults['footer_font_size'], 'px' ); // Mobile $css->start_media_query( apply_filters( 'generate_mobile_media_query', '(max-width:768px)' ) ); // Site title - $mobile_site_title = ( isset( $generate_settings[ 'mobile_site_title_font_size' ] ) ) ? $generate_settings[ 'mobile_site_title_font_size' ] : '30'; + $mobile_site_title = ( isset( $generate_settings['mobile_site_title_font_size'] ) ) ? $generate_settings['mobile_site_title_font_size'] : '30'; $css->set_selector( '.main-title' ); $css->add_property( 'font-size', absint( $mobile_site_title ), false, 'px' ); // H1 - $mobile_h1 = ( isset( $generate_settings[ 'mobile_heading_1_font_size' ] ) ) ? $generate_settings[ 'mobile_heading_1_font_size' ] : '30'; + $mobile_h1 = ( isset( $generate_settings['mobile_heading_1_font_size'] ) ) ? $generate_settings['mobile_heading_1_font_size'] : '30'; $css->set_selector( 'h1' ); $css->add_property( 'font-size', absint( $mobile_h1 ), false, 'px' ); // H2 - $mobile_h2 = ( isset( $generate_settings[ 'mobile_heading_2_font_size' ] ) ) ? $generate_settings[ 'mobile_heading_2_font_size' ] : '25'; + $mobile_h2 = ( isset( $generate_settings['mobile_heading_2_font_size'] ) ) ? $generate_settings['mobile_heading_2_font_size'] : '25'; $css->set_selector( 'h2' ); $css->add_property( 'font-size', absint( $mobile_h2 ), false, 'px' ); $css->stop_media_query(); @@ -536,20 +536,20 @@ function generate_spacing_css() { // Top bar padding $css->set_selector( '.inside-top-bar' ); - $css->add_property( 'padding', generate_padding_css( $spacing_settings[ 'top_bar_top' ], $spacing_settings[ 'top_bar_right' ], $spacing_settings[ 'top_bar_bottom' ], $spacing_settings[ 'top_bar_left' ] ), generate_padding_css( $og_defaults[ 'top_bar_top' ], $og_defaults[ 'top_bar_right' ], $og_defaults[ 'top_bar_bottom' ], $og_defaults[ 'top_bar_left' ] ) ); + $css->add_property( 'padding', generate_padding_css( $spacing_settings['top_bar_top'], $spacing_settings['top_bar_right'], $spacing_settings['top_bar_bottom'], $spacing_settings['top_bar_left'] ), generate_padding_css( $og_defaults['top_bar_top'], $og_defaults['top_bar_right'], $og_defaults['top_bar_bottom'], $og_defaults['top_bar_left'] ) ); // Header padding $css->set_selector( '.inside-header' ); - $css->add_property( 'padding', generate_padding_css( $spacing_settings[ 'header_top' ], $spacing_settings[ 'header_right' ], $spacing_settings[ 'header_bottom' ], $spacing_settings[ 'header_left' ] ), generate_padding_css( $og_defaults[ 'header_top' ], $og_defaults[ 'header_right' ], $og_defaults[ 'header_bottom' ], $og_defaults[ 'header_left' ] ) ); + $css->add_property( 'padding', generate_padding_css( $spacing_settings['header_top'], $spacing_settings['header_right'], $spacing_settings['header_bottom'], $spacing_settings['header_left'] ), generate_padding_css( $og_defaults['header_top'], $og_defaults['header_right'], $og_defaults['header_bottom'], $og_defaults['header_left'] ) ); // Content padding $css->set_selector( '.separate-containers .inside-article, .separate-containers .comments-area, .separate-containers .page-header, .separate-containers .paging-navigation, .one-container .site-content, .inside-page-header' ); - $css->add_property( 'padding', generate_padding_css( $spacing_settings[ 'content_top' ], $spacing_settings[ 'content_right' ], $spacing_settings[ 'content_bottom' ], $spacing_settings[ 'content_left' ] ), generate_padding_css( $og_defaults[ 'content_top' ], $og_defaults[ 'content_right' ], $og_defaults[ 'content_bottom' ], $og_defaults[ 'content_left' ] ) ); + $css->add_property( 'padding', generate_padding_css( $spacing_settings['content_top'], $spacing_settings['content_right'], $spacing_settings['content_bottom'], $spacing_settings['content_left'] ), generate_padding_css( $og_defaults['content_top'], $og_defaults['content_right'], $og_defaults['content_bottom'], $og_defaults['content_left'] ) ); // Mobile Content padding $css->start_media_query( apply_filters( 'generate_mobile_media_query', '(max-width:768px)' ) ); $css->set_selector( '.separate-containers .inside-article, .separate-containers .comments-area, .separate-containers .page-header, .separate-containers .paging-navigation, .one-container .site-content, .inside-page-header' ); - $css->add_property( 'padding', generate_padding_css( $spacing_settings[ 'mobile_content_top' ], $spacing_settings[ 'mobile_content_right' ], $spacing_settings[ 'mobile_content_bottom' ], $spacing_settings[ 'mobile_content_left' ] ) ); + $css->add_property( 'padding', generate_padding_css( $spacing_settings['mobile_content_top'], $spacing_settings['mobile_content_right'], $spacing_settings['mobile_content_bottom'], $spacing_settings['mobile_content_left'] ) ); $css->stop_media_query(); // One container @@ -560,20 +560,20 @@ function generate_spacing_css() { $css->add_property( 'margin-left', absint( $spacing_settings['content_left'] ), absint( $og_defaults['content_left'] ), 'px' ); $css->set_selector( '.one-container.both-sidebars .site-main' ); - $css->add_property( 'margin', generate_padding_css( '0', $spacing_settings[ 'content_right' ], '0', $spacing_settings[ 'content_left' ] ), generate_padding_css( '0', $og_defaults[ 'content_right' ], '0', $og_defaults[ 'content_left' ] ) ); + $css->add_property( 'margin', generate_padding_css( '0', $spacing_settings['content_right'], '0', $spacing_settings['content_left'] ), generate_padding_css( '0', $og_defaults['content_right'], '0', $og_defaults['content_left'] ) ); // Separate containers // Container bottom margins $css->set_selector( '.separate-containers .widget, .separate-containers .site-main > *, .separate-containers .page-header, .widget-area .main-navigation' ); - $css->add_property( 'margin-bottom', absint( $spacing_settings[ 'separator' ] ), absint( $og_defaults[ 'separator' ] ), 'px' ); + $css->add_property( 'margin-bottom', absint( $spacing_settings['separator'] ), absint( $og_defaults['separator'] ), 'px' ); // Right sidebar $css->set_selector( '.right-sidebar.separate-containers .site-main' ); - $css->add_property( 'margin', generate_padding_css( $spacing_settings[ 'separator' ], $spacing_settings[ 'separator' ], $spacing_settings[ 'separator' ], '0' ), generate_padding_css( $og_defaults[ 'separator' ], $og_defaults[ 'separator' ], $og_defaults[ 'separator' ], '0' ) ); + $css->add_property( 'margin', generate_padding_css( $spacing_settings['separator'], $spacing_settings['separator'], $spacing_settings['separator'], '0' ), generate_padding_css( $og_defaults['separator'], $og_defaults['separator'], $og_defaults['separator'], '0' ) ); // Left sidebar $css->set_selector( '.left-sidebar.separate-containers .site-main' ); - $css->add_property( 'margin', generate_padding_css( $spacing_settings[ 'separator' ], '0', $spacing_settings[ 'separator' ], $spacing_settings[ 'separator' ] ), generate_padding_css( $og_defaults[ 'separator' ], '0', $og_defaults[ 'separator' ], $og_defaults[ 'separator' ] ) ); + $css->add_property( 'margin', generate_padding_css( $spacing_settings['separator'], '0', $spacing_settings['separator'], $spacing_settings['separator'] ), generate_padding_css( $og_defaults['separator'], '0', $og_defaults['separator'], $og_defaults['separator'] ) ); // Both sidebars $css->set_selector( '.both-sidebars.separate-containers .site-main' ); @@ -581,41 +581,41 @@ function generate_spacing_css() { // Both right sidebar content separating space $css->set_selector( '.both-right.separate-containers .site-main' ); - $css->add_property( 'margin', generate_padding_css( $spacing_settings[ 'separator' ], $spacing_settings[ 'separator' ], $spacing_settings[ 'separator' ], '0' ), generate_padding_css( $og_defaults[ 'separator' ], $og_defaults[ 'separator' ], $og_defaults[ 'separator' ], '0' ) ); + $css->add_property( 'margin', generate_padding_css( $spacing_settings['separator'], $spacing_settings['separator'], $spacing_settings['separator'], '0' ), generate_padding_css( $og_defaults['separator'], $og_defaults['separator'], $og_defaults['separator'], '0' ) ); // Both right sidebar - left sidebar separating space $css->set_selector( '.both-right.separate-containers .inside-left-sidebar' ); - $css->add_property( 'margin-right', absint( $spacing_settings[ 'separator' ] / 2 ), absint( $og_defaults[ 'separator' ] / 2 ), 'px' ); + $css->add_property( 'margin-right', absint( $spacing_settings['separator'] / 2 ), absint( $og_defaults['separator'] / 2 ), 'px' ); // Both right sidebar - right sidebar separating space $css->set_selector( '.both-right.separate-containers .inside-right-sidebar' ); - $css->add_property( 'margin-left', absint( $spacing_settings[ 'separator' ] / 2 ), absint( $og_defaults[ 'separator' ] / 2 ), 'px' ); + $css->add_property( 'margin-left', absint( $spacing_settings['separator'] / 2 ), absint( $og_defaults['separator'] / 2 ), 'px' ); // Both left sidebar content separating space $css->set_selector( '.both-left.separate-containers .site-main' ); - $css->add_property( 'margin', generate_padding_css( $spacing_settings[ 'separator' ], '0', $spacing_settings[ 'separator' ], $spacing_settings[ 'separator' ] ), generate_padding_css( $og_defaults[ 'separator' ], '0', $og_defaults[ 'separator' ], $og_defaults[ 'separator' ] ) ); + $css->add_property( 'margin', generate_padding_css( $spacing_settings['separator'], '0', $spacing_settings['separator'], $spacing_settings['separator'] ), generate_padding_css( $og_defaults['separator'], '0', $og_defaults['separator'], $og_defaults['separator'] ) ); // Both left sidebar - left sidebar separating space $css->set_selector( '.both-left.separate-containers .inside-left-sidebar' ); - $css->add_property( 'margin-right', absint( $spacing_settings[ 'separator' ] / 2 ), absint( $og_defaults[ 'separator' ] / 2 ), 'px' ); + $css->add_property( 'margin-right', absint( $spacing_settings['separator'] / 2 ), absint( $og_defaults['separator'] / 2 ), 'px' ); // Both left sidebar - right sidebar separating space $css->set_selector( '.both-left.separate-containers .inside-right-sidebar' ); - $css->add_property( 'margin-left', absint( $spacing_settings[ 'separator' ] / 2 ), absint( $og_defaults[ 'separator' ] / 2 ), 'px' ); + $css->add_property( 'margin-left', absint( $spacing_settings['separator'] / 2 ), absint( $og_defaults['separator'] / 2 ), 'px' ); // Site main separators $css->set_selector( '.separate-containers .site-main' ); - $css->add_property( 'margin-top', absint( $spacing_settings[ 'separator' ] ), absint( $og_defaults[ 'separator' ] ), 'px' ); - $css->add_property( 'margin-bottom', absint( $spacing_settings[ 'separator' ] ), absint( $og_defaults[ 'separator' ] ), 'px' ); + $css->add_property( 'margin-top', absint( $spacing_settings['separator'] ), absint( $og_defaults['separator'] ), 'px' ); + $css->add_property( 'margin-bottom', absint( $spacing_settings['separator'] ), absint( $og_defaults['separator'] ), 'px' ); // Page header top margin $css->set_selector( '.separate-containers .page-header-image, .separate-containers .page-header-contained, .separate-containers .page-header-image-single, .separate-containers .page-header-content-single' ); - $css->add_property( 'margin-top', absint( $spacing_settings[ 'separator' ] ), absint( $og_defaults[ 'separator' ] ), 'px' ); + $css->add_property( 'margin-top', absint( $spacing_settings['separator'] ), absint( $og_defaults['separator'] ), 'px' ); // Sidebar separator $css->set_selector( '.separate-containers .inside-right-sidebar, .separate-containers .inside-left-sidebar' ); - $css->add_property( 'margin-top', absint( $spacing_settings[ 'separator' ] ), absint( $og_defaults[ 'separator' ] ), 'px' ); - $css->add_property( 'margin-bottom', absint( $spacing_settings[ 'separator' ] ), absint( $og_defaults[ 'separator' ] ), 'px' ); + $css->add_property( 'margin-top', absint( $spacing_settings['separator'] ), absint( $og_defaults['separator'] ), 'px' ); + $css->add_property( 'margin-bottom', absint( $spacing_settings['separator'] ), absint( $og_defaults['separator'] ), 'px' ); // Navigation spacing // Menu item size @@ -626,7 +626,7 @@ function generate_spacing_css() { // Sub-menu item size $css->set_selector( '.main-navigation .main-nav ul ul li a' ); - $css->add_property( 'padding', generate_padding_css( $spacing_settings[ 'sub_menu_item_height' ], $spacing_settings[ 'menu_item' ], $spacing_settings[ 'sub_menu_item_height' ], $spacing_settings[ 'menu_item' ] ), generate_padding_css( $og_defaults[ 'sub_menu_item_height' ], $og_defaults[ 'menu_item' ], $og_defaults[ 'sub_menu_item_height' ], $og_defaults[ 'menu_item' ] ) ); + $css->add_property( 'padding', generate_padding_css( $spacing_settings['sub_menu_item_height'], $spacing_settings['menu_item'], $spacing_settings['sub_menu_item_height'], $spacing_settings['menu_item'] ), generate_padding_css( $og_defaults['sub_menu_item_height'], $og_defaults['menu_item'], $og_defaults['sub_menu_item_height'], $og_defaults['menu_item'] ) ); // Sub-menu positioning $css->set_selector( '.main-navigation ul ul' ); @@ -638,45 +638,45 @@ function generate_spacing_css() { // Dropdown arrow spacing $css->set_selector( '.rtl .menu-item-has-children .dropdown-menu-toggle' ); - $css->add_property( 'padding-left', absint( $spacing_settings[ 'menu_item' ] ), false, 'px' ); + $css->add_property( 'padding-left', absint( $spacing_settings['menu_item'] ), false, 'px' ); $css->set_selector( '.menu-item-has-children .dropdown-menu-toggle' ); - $css->add_property( 'padding-right', absint( $spacing_settings[ 'menu_item' ] ), absint( $og_defaults[ 'menu_item' ] ), 'px' ); + $css->add_property( 'padding-right', absint( $spacing_settings['menu_item'] ), absint( $og_defaults['menu_item'] ), 'px' ); // Sub-menu dropdown arrow spacing $css->set_selector( '.menu-item-has-children ul .dropdown-menu-toggle' ); - $css->add_property( 'padding-top', absint( $spacing_settings[ 'sub_menu_item_height' ] ), absint( $og_defaults[ 'sub_menu_item_height' ] ), 'px' ); - $css->add_property( 'padding-bottom', absint( $spacing_settings[ 'sub_menu_item_height' ] ), absint( $og_defaults[ 'sub_menu_item_height' ] ), 'px' ); - $css->add_property( 'margin-top', '-' . absint( $spacing_settings[ 'sub_menu_item_height' ] ), '-' . absint( $og_defaults[ 'sub_menu_item_height' ] ), 'px' ); + $css->add_property( 'padding-top', absint( $spacing_settings['sub_menu_item_height'] ), absint( $og_defaults['sub_menu_item_height'] ), 'px' ); + $css->add_property( 'padding-bottom', absint( $spacing_settings['sub_menu_item_height'] ), absint( $og_defaults['sub_menu_item_height'] ), 'px' ); + $css->add_property( 'margin-top', '-' . absint( $spacing_settings['sub_menu_item_height'] ), '-' . absint( $og_defaults['sub_menu_item_height'] ), 'px' ); // RTL menu item padding $css->set_selector( '.rtl .main-navigation .main-nav ul li.menu-item-has-children > a' ); - $css->add_property( 'padding-right', absint( $spacing_settings[ 'menu_item' ] ), false, 'px' ); + $css->add_property( 'padding-right', absint( $spacing_settings['menu_item'] ), false, 'px' ); // Sidebar widget padding $css->set_selector( '.widget-area .widget' ); - $css->add_property( 'padding', generate_padding_css( $spacing_settings[ 'widget_top' ], $spacing_settings[ 'widget_right' ], $spacing_settings[ 'widget_bottom' ], $spacing_settings[ 'widget_left' ] ), generate_padding_css( $og_defaults[ 'widget_top' ], $og_defaults[ 'widget_right' ], $og_defaults[ 'widget_bottom' ], $og_defaults[ 'widget_left' ] ) ); + $css->add_property( 'padding', generate_padding_css( $spacing_settings['widget_top'], $spacing_settings['widget_right'], $spacing_settings['widget_bottom'], $spacing_settings['widget_left'] ), generate_padding_css( $og_defaults['widget_top'], $og_defaults['widget_right'], $og_defaults['widget_bottom'], $og_defaults['widget_left'] ) ); // Footer widget padding $css->set_selector( '.footer-widgets' ); - $css->add_property( 'padding', generate_padding_css( $spacing_settings[ 'footer_widget_container_top' ], $spacing_settings[ 'footer_widget_container_right' ], $spacing_settings[ 'footer_widget_container_bottom' ], $spacing_settings[ 'footer_widget_container_left' ] ), generate_padding_css( $og_defaults[ 'footer_widget_container_top' ], $og_defaults[ 'footer_widget_container_right' ], $og_defaults[ 'footer_widget_container_bottom' ], $og_defaults[ 'footer_widget_container_left' ] ) ); + $css->add_property( 'padding', generate_padding_css( $spacing_settings['footer_widget_container_top'], $spacing_settings['footer_widget_container_right'], $spacing_settings['footer_widget_container_bottom'], $spacing_settings['footer_widget_container_left'] ), generate_padding_css( $og_defaults['footer_widget_container_top'], $og_defaults['footer_widget_container_right'], $og_defaults['footer_widget_container_bottom'], $og_defaults['footer_widget_container_left'] ) ); // Footer widget separator $css->set_selector( '.site-footer .footer-widgets-container .inner-padding' ); - $css->add_property( 'padding', generate_padding_css( '0', '0', '0', $spacing_settings[ 'footer_widget_separator' ] ), generate_padding_css( '0', '0', '0', $og_defaults[ 'footer_widget_separator' ] ) ); + $css->add_property( 'padding', generate_padding_css( '0', '0', '0', $spacing_settings['footer_widget_separator'] ), generate_padding_css( '0', '0', '0', $og_defaults['footer_widget_separator'] ) ); $css->set_selector( '.site-footer .footer-widgets-container .inside-footer-widgets' ); - $css->add_property( 'margin-left', '-' . absint( $spacing_settings[ 'footer_widget_separator' ] ), '-' . absint( $og_defaults[ 'footer_widget_separator' ] ), 'px' ); + $css->add_property( 'margin-left', '-' . absint( $spacing_settings['footer_widget_separator'] ), '-' . absint( $og_defaults['footer_widget_separator'] ), 'px' ); // Footer padding $css->set_selector( '.site-info' ); - $css->add_property( 'padding', generate_padding_css( $spacing_settings[ 'footer_top' ], $spacing_settings[ 'footer_right' ], $spacing_settings[ 'footer_bottom' ], $spacing_settings[ 'footer_left' ] ), generate_padding_css( $og_defaults[ 'footer_top' ], $og_defaults[ 'footer_right' ], $og_defaults[ 'footer_bottom' ], $og_defaults[ 'footer_left' ] ) ); + $css->add_property( 'padding', generate_padding_css( $spacing_settings['footer_top'], $spacing_settings['footer_right'], $spacing_settings['footer_bottom'], $spacing_settings['footer_left'] ), generate_padding_css( $og_defaults['footer_top'], $og_defaults['footer_right'], $og_defaults['footer_bottom'], $og_defaults['footer_left'] ) ); // Add spacing back where dropdown arrow should be // Old versions of WP don't get nice things if ( version_compare( $GLOBALS['wp_version'], '4.4', '<' ) ) { $css->set_selector( '.main-navigation .main-nav ul li.menu-item-has-children>a, .secondary-navigation .main-nav ul li.menu-item-has-children>a' ); - $css->add_property( 'padding-right', absint( $spacing_settings[ 'menu_item' ] ), absint( $og_defaults[ 'menu_item' ] ), 'px' ); + $css->add_property( 'padding-right', absint( $spacing_settings['menu_item'] ), absint( $og_defaults['menu_item'] ), 'px' ); } $output = ''; @@ -694,7 +694,7 @@ function generate_spacing_css() { // If they're all 40 (default), remove the padding when one container is set // This way, the user can still adjust the padding and it will work (unless they want 40px padding) // We'll also remove the padding if there's no color difference between the widgets and content background color - if ( ( '40' == $spacing_settings[ 'widget_top' ] && '40' == $spacing_settings[ 'widget_right' ] && '40' == $spacing_settings[ 'widget_bottom' ] && '40' == $spacing_settings[ 'widget_left' ] ) && $colors_match ) { + if ( ( '40' == $spacing_settings['widget_top'] && '40' == $spacing_settings['widget_right'] && '40' == $spacing_settings['widget_bottom'] && '40' == $spacing_settings['widget_left'] ) && $colors_match ) { $output .= '.one-container .sidebar .widget{padding:0px;}'; } diff --git a/inc/customizer.php b/inc/customizer.php index aa16a439..4f176e33 100644 --- a/inc/customizer.php +++ b/inc/customizer.php @@ -36,12 +36,12 @@ function generate_customize_register( $wp_customize ) { require_once trailingslashit( get_template_directory() ) . 'inc/customizer/customizer-helpers.php'; if ( $wp_customize->get_control( 'blogdescription' ) ) { - $wp_customize->get_control('blogdescription')->priority = 3; + $wp_customize->get_control( 'blogdescription' )->priority = 3; $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; } if ( $wp_customize->get_control( 'blogname' ) ) { - $wp_customize->get_control('blogname')->priority = 1; + $wp_customize->get_control( 'blogname' )->priority = 1; $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; } @@ -82,7 +82,7 @@ function generate_customize_register( $wp_customize ) { 'pro_url' => generate_get_premium_url( 'https://generatepress.com/premium' ), 'capability' => 'edit_theme_options', 'priority' => 0, - 'type' => 'gp-upsell-section' + 'type' => 'gp-upsell-section', ) ) ); @@ -94,7 +94,7 @@ function generate_customize_register( $wp_customize ) { array( 'default' => $defaults['hide_title'], 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_checkbox' + 'sanitize_callback' => 'generate_sanitize_checkbox', ) ); @@ -104,7 +104,7 @@ function generate_customize_register( $wp_customize ) { 'type' => 'checkbox', 'label' => __( 'Hide site title', 'generatepress' ), 'section' => 'title_tagline', - 'priority' => 2 + 'priority' => 2, ) ); @@ -114,7 +114,7 @@ function generate_customize_register( $wp_customize ) { array( 'default' => $defaults['hide_tagline'], 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_checkbox' + 'sanitize_callback' => 'generate_sanitize_checkbox', ) ); @@ -124,7 +124,7 @@ function generate_customize_register( $wp_customize ) { 'type' => 'checkbox', 'label' => __( 'Hide site tagline', 'generatepress' ), 'section' => 'title_tagline', - 'priority' => 4 + 'priority' => 4, ) ); @@ -135,7 +135,7 @@ function generate_customize_register( $wp_customize ) { array( 'default' => $defaults['logo'], 'type' => 'option', - 'sanitize_callback' => 'esc_url_raw' + 'sanitize_callback' => 'esc_url_raw', ) ); @@ -146,7 +146,7 @@ function generate_customize_register( $wp_customize ) { array( 'label' => __( 'Logo', 'generatepress' ), 'section' => 'title_tagline', - 'settings' => 'generate_settings[logo]' + 'settings' => 'generate_settings[logo]', ) ) ); @@ -157,7 +157,7 @@ function generate_customize_register( $wp_customize ) { array( 'default' => $defaults['retina_logo'], 'type' => 'option', - 'sanitize_callback' => 'esc_url_raw' + 'sanitize_callback' => 'esc_url_raw', ) ); @@ -169,7 +169,7 @@ function generate_customize_register( $wp_customize ) { 'label' => __( 'Retina Logo', 'generatepress' ), 'section' => 'title_tagline', 'settings' => 'generate_settings[retina_logo]', - 'active_callback' => 'generate_has_custom_logo_callback' + 'active_callback' => 'generate_has_custom_logo_callback', ) ) ); @@ -200,7 +200,7 @@ function generate_customize_register( $wp_customize ) { array( 'label' => __( 'Background Color', 'generatepress' ), 'section' => 'body_section', - 'settings' => 'generate_settings[background_color]' + 'settings' => 'generate_settings[background_color]', ) ) ); @@ -221,7 +221,7 @@ function generate_customize_register( $wp_customize ) { array( 'label' => __( 'Text Color', 'generatepress' ), 'section' => 'body_section', - 'settings' => 'generate_settings[text_color]' + 'settings' => 'generate_settings[text_color]', ) ) ); @@ -242,7 +242,7 @@ function generate_customize_register( $wp_customize ) { array( 'label' => __( 'Link Color', 'generatepress' ), 'section' => 'body_section', - 'settings' => 'generate_settings[link_color]' + 'settings' => 'generate_settings[link_color]', ) ) ); @@ -263,7 +263,7 @@ function generate_customize_register( $wp_customize ) { array( 'label' => __( 'Link Color Hover', 'generatepress' ), 'section' => 'body_section', - 'settings' => 'generate_settings[link_color_hover]' + 'settings' => 'generate_settings[link_color_hover]', ) ) ); @@ -284,7 +284,7 @@ function generate_customize_register( $wp_customize ) { array( 'label' => __( 'Link Color Visited', 'generatepress' ), 'section' => 'body_section', - 'settings' => 'generate_settings[link_color_visited]' + 'settings' => 'generate_settings[link_color_visited]', ) ) ); @@ -301,7 +301,7 @@ function generate_customize_register( $wp_customize ) { 'description' => __( 'More options are available for this section in our premium version.', 'generatepress' ), 'url' => generate_get_premium_url( 'https://generatepress.com/downloads/generate-colors/' ), 'priority' => 30, - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname' + 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', ) ) ); @@ -322,7 +322,7 @@ function generate_customize_register( $wp_customize ) { array( 'title' => __( 'Container', 'generatepress' ), 'priority' => 10, - 'panel' => 'generate_layout_panel' + 'panel' => 'generate_layout_panel', ) ); @@ -333,7 +333,7 @@ function generate_customize_register( $wp_customize ) { 'default' => $defaults['container_width'], 'type' => 'option', 'sanitize_callback' => 'generate_sanitize_integer', - 'transport' => 'postMessage' + 'transport' => 'postMessage', ) ); @@ -379,7 +379,7 @@ function generate_customize_register( $wp_customize ) { 'default' => $defaults['top_bar_width'], 'type' => 'option', 'sanitize_callback' => 'generate_sanitize_choices', - 'transport' => 'postMessage' + 'transport' => 'postMessage', ) ); @@ -392,7 +392,7 @@ function generate_customize_register( $wp_customize ) { 'section' => 'generate_top_bar', 'choices' => array( 'full' => __( 'Full', 'generatepress' ), - 'contained' => __( 'Contained', 'generatepress' ) + 'contained' => __( 'Contained', 'generatepress' ), ), 'settings' => 'generate_settings[top_bar_width]', 'priority' => 5, @@ -407,7 +407,7 @@ function generate_customize_register( $wp_customize ) { 'default' => $defaults['top_bar_inner_width'], 'type' => 'option', 'sanitize_callback' => 'generate_sanitize_choices', - 'transport' => 'postMessage' + 'transport' => 'postMessage', ) ); @@ -420,7 +420,7 @@ function generate_customize_register( $wp_customize ) { 'section' => 'generate_top_bar', 'choices' => array( 'full' => __( 'Full', 'generatepress' ), - 'contained' => __( 'Contained', 'generatepress' ) + 'contained' => __( 'Contained', 'generatepress' ), ), 'settings' => 'generate_settings[top_bar_inner_width]', 'priority' => 10, @@ -435,7 +435,7 @@ function generate_customize_register( $wp_customize ) { 'default' => $defaults['top_bar_alignment'], 'type' => 'option', 'sanitize_callback' => 'generate_sanitize_choices', - 'transport' => 'postMessage' + 'transport' => 'postMessage', ) ); @@ -449,7 +449,7 @@ function generate_customize_register( $wp_customize ) { 'choices' => array( 'left' => __( 'Left', 'generatepress' ), 'center' => __( 'Center', 'generatepress' ), - 'right' => __( 'Right', 'generatepress' ) + 'right' => __( 'Right', 'generatepress' ), ), 'settings' => 'generate_settings[top_bar_alignment]', 'priority' => 15, @@ -463,7 +463,7 @@ function generate_customize_register( $wp_customize ) { array( 'title' => __( 'Header', 'generatepress' ), 'priority' => 20, - 'panel' => 'generate_layout_panel' + 'panel' => 'generate_layout_panel', ) ); @@ -474,7 +474,7 @@ function generate_customize_register( $wp_customize ) { 'default' => $defaults['header_layout_setting'], 'type' => 'option', 'sanitize_callback' => 'generate_sanitize_choices', - 'transport' => 'postMessage' + 'transport' => 'postMessage', ) ); @@ -487,10 +487,10 @@ function generate_customize_register( $wp_customize ) { 'section' => 'generate_layout_header', 'choices' => array( 'fluid-header' => __( 'Full', 'generatepress' ), - 'contained-header' => __( 'Contained', 'generatepress' ) + 'contained-header' => __( 'Contained', 'generatepress' ), ), 'settings' => 'generate_settings[header_layout_setting]', - 'priority' => 5 + 'priority' => 5, ) ); @@ -501,7 +501,7 @@ function generate_customize_register( $wp_customize ) { 'default' => $defaults['header_inner_width'], 'type' => 'option', 'sanitize_callback' => 'generate_sanitize_choices', - 'transport' => 'postMessage' + 'transport' => 'postMessage', ) ); @@ -514,10 +514,10 @@ function generate_customize_register( $wp_customize ) { 'section' => 'generate_layout_header', 'choices' => array( 'contained' => __( 'Contained', 'generatepress' ), - 'full-width' => __( 'Full', 'generatepress' ) + 'full-width' => __( 'Full', 'generatepress' ), ), 'settings' => 'generate_settings[header_inner_width]', - 'priority' => 6 + 'priority' => 6, ) ); @@ -528,7 +528,7 @@ function generate_customize_register( $wp_customize ) { 'default' => $defaults['header_alignment_setting'], 'type' => 'option', 'sanitize_callback' => 'generate_sanitize_choices', - 'transport' => 'postMessage' + 'transport' => 'postMessage', ) ); @@ -542,10 +542,10 @@ function generate_customize_register( $wp_customize ) { 'choices' => array( 'left' => __( 'Left', 'generatepress' ), 'center' => __( 'Center', 'generatepress' ), - 'right' => __( 'Right', 'generatepress' ) + 'right' => __( 'Right', 'generatepress' ), ), 'settings' => 'generate_settings[header_alignment_setting]', - 'priority' => 10 + 'priority' => 10, ) ); @@ -554,7 +554,7 @@ function generate_customize_register( $wp_customize ) { array( 'title' => __( 'Primary Navigation', 'generatepress' ), 'priority' => 30, - 'panel' => 'generate_layout_panel' + 'panel' => 'generate_layout_panel', ) ); @@ -565,7 +565,7 @@ function generate_customize_register( $wp_customize ) { 'default' => $defaults['nav_layout_setting'], 'type' => 'option', 'sanitize_callback' => 'generate_sanitize_choices', - 'transport' => 'postMessage' + 'transport' => 'postMessage', ) ); @@ -578,10 +578,10 @@ function generate_customize_register( $wp_customize ) { 'section' => 'generate_layout_navigation', 'choices' => array( 'fluid-nav' => __( 'Full', 'generatepress' ), - 'contained-nav' => __( 'Contained', 'generatepress' ) + 'contained-nav' => __( 'Contained', 'generatepress' ), ), 'settings' => 'generate_settings[nav_layout_setting]', - 'priority' => 15 + 'priority' => 15, ) ); @@ -592,7 +592,7 @@ function generate_customize_register( $wp_customize ) { 'default' => $defaults['nav_inner_width'], 'type' => 'option', 'sanitize_callback' => 'generate_sanitize_choices', - 'transport' => 'postMessage' + 'transport' => 'postMessage', ) ); @@ -605,10 +605,10 @@ function generate_customize_register( $wp_customize ) { 'section' => 'generate_layout_navigation', 'choices' => array( 'contained' => __( 'Contained', 'generatepress' ), - 'full-width' => __( 'Full', 'generatepress' ) + 'full-width' => __( 'Full', 'generatepress' ), ), 'settings' => 'generate_settings[nav_inner_width]', - 'priority' => 16 + 'priority' => 16, ) ); @@ -619,7 +619,7 @@ function generate_customize_register( $wp_customize ) { 'default' => $defaults['nav_alignment_setting'], 'type' => 'option', 'sanitize_callback' => 'generate_sanitize_choices', - 'transport' => 'postMessage' + 'transport' => 'postMessage', ) ); @@ -633,10 +633,10 @@ function generate_customize_register( $wp_customize ) { 'choices' => array( 'left' => __( 'Left', 'generatepress' ), 'center' => __( 'Center', 'generatepress' ), - 'right' => __( 'Right', 'generatepress' ) + 'right' => __( 'Right', 'generatepress' ), ), 'settings' => 'generate_settings[nav_alignment_setting]', - 'priority' => 20 + 'priority' => 20, ) ); @@ -647,7 +647,7 @@ function generate_customize_register( $wp_customize ) { 'default' => $defaults['nav_position_setting'], 'type' => 'option', 'sanitize_callback' => 'generate_sanitize_choices', - 'transport' => ( '' !== generate_get_setting( 'nav_position_setting' ) ) ? 'postMessage' : 'refresh' + 'transport' => ( '' !== generate_get_setting( 'nav_position_setting' ) ) ? 'postMessage' : 'refresh', ) ); @@ -665,10 +665,10 @@ function generate_customize_register( $wp_customize ) { 'nav-float-left' => __( 'Float Left', 'generatepress' ), 'nav-left-sidebar' => __( 'Left Sidebar', 'generatepress' ), 'nav-right-sidebar' => __( 'Right Sidebar', 'generatepress' ), - '' => __( 'No Navigation', 'generatepress' ) + '' => __( 'No Navigation', 'generatepress' ), ), 'settings' => 'generate_settings[nav_position_setting]', - 'priority' => 22 + 'priority' => 22, ) ); @@ -678,7 +678,7 @@ function generate_customize_register( $wp_customize ) { array( 'default' => $defaults['nav_dropdown_type'], 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_choices' + 'sanitize_callback' => 'generate_sanitize_choices', ) ); @@ -692,10 +692,10 @@ function generate_customize_register( $wp_customize ) { 'choices' => array( 'hover' => __( 'Hover', 'generatepress' ), 'click' => __( 'Click - Menu Item', 'generatepress' ), - 'click-arrow' => __( 'Click - Arrow', 'generatepress' ) + 'click-arrow' => __( 'Click - Arrow', 'generatepress' ), ), 'settings' => 'generate_settings[nav_dropdown_type]', - 'priority' => 22 + 'priority' => 22, ) ); @@ -705,7 +705,7 @@ function generate_customize_register( $wp_customize ) { array( 'default' => $defaults['nav_search'], 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_choices' + 'sanitize_callback' => 'generate_sanitize_choices', ) ); @@ -718,10 +718,10 @@ function generate_customize_register( $wp_customize ) { 'section' => 'generate_layout_navigation', 'choices' => array( 'enable' => __( 'Enable', 'generatepress' ), - 'disable' => __( 'Disable', 'generatepress' ) + 'disable' => __( 'Disable', 'generatepress' ), ), 'settings' => 'generate_settings[nav_search]', - 'priority' => 23 + 'priority' => 23, ) ); @@ -732,7 +732,7 @@ function generate_customize_register( $wp_customize ) { 'default' => $defaults['content_layout_setting'], 'type' => 'option', 'sanitize_callback' => 'generate_sanitize_choices', - 'transport' => 'postMessage' + 'transport' => 'postMessage', ) ); @@ -745,10 +745,10 @@ function generate_customize_register( $wp_customize ) { 'section' => 'generate_layout_container', 'choices' => array( 'separate-containers' => __( 'Separate Containers', 'generatepress' ), - 'one-container' => __( 'One Container', 'generatepress' ) + 'one-container' => __( 'One Container', 'generatepress' ), ), 'settings' => 'generate_settings[content_layout_setting]', - 'priority' => 25 + 'priority' => 25, ) ); @@ -757,7 +757,7 @@ function generate_customize_register( $wp_customize ) { array( 'title' => __( 'Sidebars', 'generatepress' ), 'priority' => 40, - 'panel' => 'generate_layout_panel' + 'panel' => 'generate_layout_panel', ) ); @@ -767,7 +767,7 @@ function generate_customize_register( $wp_customize ) { array( 'default' => $defaults['layout_setting'], 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_choices' + 'sanitize_callback' => 'generate_sanitize_choices', ) ); @@ -784,10 +784,10 @@ function generate_customize_register( $wp_customize ) { 'no-sidebar' => __( 'Content (no sidebars)', 'generatepress' ), 'both-sidebars' => __( 'Sidebar / Content / Sidebar', 'generatepress' ), 'both-left' => __( 'Sidebar / Sidebar / Content', 'generatepress' ), - 'both-right' => __( 'Content / Sidebar / Sidebar', 'generatepress' ) + 'both-right' => __( 'Content / Sidebar / Sidebar', 'generatepress' ), ), 'settings' => 'generate_settings[layout_setting]', - 'priority' => 30 + 'priority' => 30, ) ); @@ -797,7 +797,7 @@ function generate_customize_register( $wp_customize ) { array( 'default' => $defaults['blog_layout_setting'], 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_choices' + 'sanitize_callback' => 'generate_sanitize_choices', ) ); @@ -814,10 +814,10 @@ function generate_customize_register( $wp_customize ) { 'no-sidebar' => __( 'Content (no sidebars)', 'generatepress' ), 'both-sidebars' => __( 'Sidebar / Content / Sidebar', 'generatepress' ), 'both-left' => __( 'Sidebar / Sidebar / Content', 'generatepress' ), - 'both-right' => __( 'Content / Sidebar / Sidebar', 'generatepress' ) + 'both-right' => __( 'Content / Sidebar / Sidebar', 'generatepress' ), ), 'settings' => 'generate_settings[blog_layout_setting]', - 'priority' => 35 + 'priority' => 35, ) ); @@ -827,7 +827,7 @@ function generate_customize_register( $wp_customize ) { array( 'default' => $defaults['single_layout_setting'], 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_choices' + 'sanitize_callback' => 'generate_sanitize_choices', ) ); @@ -844,10 +844,10 @@ function generate_customize_register( $wp_customize ) { 'no-sidebar' => __( 'Content (no sidebars)', 'generatepress' ), 'both-sidebars' => __( 'Sidebar / Content / Sidebar', 'generatepress' ), 'both-left' => __( 'Sidebar / Sidebar / Content', 'generatepress' ), - 'both-right' => __( 'Content / Sidebar / Sidebar', 'generatepress' ) + 'both-right' => __( 'Content / Sidebar / Sidebar', 'generatepress' ), ), 'settings' => 'generate_settings[single_layout_setting]', - 'priority' => 36 + 'priority' => 36, ) ); @@ -856,7 +856,7 @@ function generate_customize_register( $wp_customize ) { array( 'title' => __( 'Footer', 'generatepress' ), 'priority' => 50, - 'panel' => 'generate_layout_panel' + 'panel' => 'generate_layout_panel', ) ); @@ -867,7 +867,7 @@ function generate_customize_register( $wp_customize ) { 'default' => $defaults['footer_layout_setting'], 'type' => 'option', 'sanitize_callback' => 'generate_sanitize_choices', - 'transport' => 'postMessage' + 'transport' => 'postMessage', ) ); @@ -880,10 +880,10 @@ function generate_customize_register( $wp_customize ) { 'section' => 'generate_layout_footer', 'choices' => array( 'fluid-footer' => __( 'Full', 'generatepress' ), - 'contained-footer' => __( 'Contained', 'generatepress' ) + 'contained-footer' => __( 'Contained', 'generatepress' ), ), 'settings' => 'generate_settings[footer_layout_setting]', - 'priority' => 40 + 'priority' => 40, ) ); @@ -894,7 +894,7 @@ function generate_customize_register( $wp_customize ) { 'default' => $defaults['footer_inner_width'], 'type' => 'option', 'sanitize_callback' => 'generate_sanitize_choices', - 'transport' => 'postMessage' + 'transport' => 'postMessage', ) ); @@ -907,10 +907,10 @@ function generate_customize_register( $wp_customize ) { 'section' => 'generate_layout_footer', 'choices' => array( 'contained' => __( 'Contained', 'generatepress' ), - 'full-width' => __( 'Full', 'generatepress' ) + 'full-width' => __( 'Full', 'generatepress' ), ), 'settings' => 'generate_settings[footer_inner_width]', - 'priority' => 41 + 'priority' => 41, ) ); @@ -920,7 +920,7 @@ function generate_customize_register( $wp_customize ) { array( 'default' => $defaults['footer_widget_setting'], 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_choices' + 'sanitize_callback' => 'generate_sanitize_choices', ) ); @@ -937,10 +937,10 @@ function generate_customize_register( $wp_customize ) { '2' => '2', '3' => '3', '4' => '4', - '5' => '5' + '5' => '5', ), 'settings' => 'generate_settings[footer_widget_setting]', - 'priority' => 45 + 'priority' => 45, ) ); @@ -951,7 +951,7 @@ function generate_customize_register( $wp_customize ) { 'default' => $defaults['footer_bar_alignment'], 'type' => 'option', 'sanitize_callback' => 'generate_sanitize_choices', - 'transport' => 'postMessage' + 'transport' => 'postMessage', ) ); @@ -965,11 +965,11 @@ function generate_customize_register( $wp_customize ) { 'choices' => array( 'left' => __( 'Left','generatepress' ), 'center' => __( 'Center','generatepress' ), - 'right' => __( 'Right','generatepress' ) + 'right' => __( 'Right','generatepress' ), ), 'settings' => 'generate_settings[footer_bar_alignment]', 'priority' => 47, - 'active_callback' => 'generate_is_footer_bar_active' + 'active_callback' => 'generate_is_footer_bar_active', ) ); @@ -979,7 +979,7 @@ function generate_customize_register( $wp_customize ) { array( 'default' => $defaults['back_to_top'], 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_choices' + 'sanitize_callback' => 'generate_sanitize_choices', ) ); @@ -992,10 +992,10 @@ function generate_customize_register( $wp_customize ) { 'section' => 'generate_layout_footer', 'choices' => array( 'enable' => __( 'Enable', 'generatepress' ), - '' => __( 'Disable', 'generatepress' ) + '' => __( 'Disable', 'generatepress' ), ), 'settings' => 'generate_settings[back_to_top]', - 'priority' => 50 + 'priority' => 50, ) ); @@ -1005,7 +1005,7 @@ function generate_customize_register( $wp_customize ) { array( 'title' => __( 'Blog', 'generatepress' ), 'priority' => 55, - 'panel' => 'generate_layout_panel' + 'panel' => 'generate_layout_panel', ) ); @@ -1015,7 +1015,7 @@ function generate_customize_register( $wp_customize ) { array( 'default' => $defaults['post_content'], 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_blog_excerpt' + 'sanitize_callback' => 'generate_sanitize_blog_excerpt', ) ); @@ -1028,10 +1028,10 @@ function generate_customize_register( $wp_customize ) { 'section' => 'generate_blog_section', 'choices' => array( 'full' => __( 'Full', 'generatepress' ), - 'excerpt' => __( 'Excerpt', 'generatepress' ) + 'excerpt' => __( 'Excerpt', 'generatepress' ), ), 'settings' => 'generate_settings[post_content]', - 'priority' => 10 + 'priority' => 10, ) ); @@ -1047,7 +1047,7 @@ function generate_customize_register( $wp_customize ) { 'description' => __( 'More options are available for this section in our premium version.', 'generatepress' ), 'url' => generate_get_premium_url( 'https://generatepress.com/downloads/generate-blog/' ), 'priority' => 30, - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname' + 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', ) ) ); @@ -1058,7 +1058,7 @@ function generate_customize_register( $wp_customize ) { 'generate_general_section', array( 'title' => __( 'General', 'generatepress' ), - 'priority' => 99 + 'priority' => 99, ) ); @@ -1068,7 +1068,7 @@ function generate_customize_register( $wp_customize ) { array( 'default' => $defaults['font_awesome_essentials'], 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_checkbox' + 'sanitize_callback' => 'generate_sanitize_checkbox', ) ); @@ -1089,7 +1089,7 @@ function generate_customize_register( $wp_customize ) { array( 'default' => $defaults['dynamic_css_cache'], 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_checkbox' + 'sanitize_callback' => 'generate_sanitize_checkbox', ) ); diff --git a/inc/customizer/controls/class-deprecated.php b/inc/customizer/controls/class-deprecated.php index e680064c..28b474bd 100644 --- a/inc/customizer/controls/class-deprecated.php +++ b/inc/customizer/controls/class-deprecated.php @@ -46,13 +46,13 @@ public function to_json() { parent::to_json(); $number_of_fonts = apply_filters( 'generate_number_of_fonts', 200 ); - $this->json[ 'link' ] = $this->get_link(); - $this->json[ 'value' ] = $this->value(); - $this->json[ 'default_fonts_title'] = __( 'Default fonts', 'generatepress' ); - $this->json[ 'google_fonts_title'] = __( 'Google fonts', 'generatepress' ); - $this->json[ 'description' ] = __( 'Font family','generatepress' ); - $this->json[ 'google_fonts' ] = apply_filters( 'generate_typography_customize_list', generate_get_all_google_fonts( $number_of_fonts ) ); - $this->json[ 'default_fonts' ] = generate_typography_default_fonts(); + $this->json['link'] = $this->get_link(); + $this->json['value'] = $this->value(); + $this->json['default_fonts_title'] = __( 'Default fonts', 'generatepress' ); + $this->json['google_fonts_title'] = __( 'Google fonts', 'generatepress' ); + $this->json['description'] = __( 'Font family','generatepress' ); + $this->json['google_fonts'] = apply_filters( 'generate_typography_customize_list', generate_get_all_google_fonts( $number_of_fonts ) ); + $this->json['default_fonts'] = generate_typography_default_fonts(); } public function content_template() { @@ -94,9 +94,9 @@ public function to_json() { $this->choices[ $name ] = $choice; } - $this->json[ 'choices' ] = $this->choices; - $this->json[ 'link' ] = $this->get_link(); - $this->json[ 'value' ] = $this->value(); + $this->json['choices'] = $this->choices; + $this->json['link'] = $this->get_link(); + $this->json['value'] = $this->value(); } @@ -131,9 +131,9 @@ class Generate_Hidden_Input_Control extends WP_Customize_Control { public function to_json() { parent::to_json(); - $this->json[ 'link' ] = $this->get_link(); - $this->json[ 'value' ] = $this->value(); - $this->json[ 'id' ] = $this->id; + $this->json['link'] = $this->get_link(); + $this->json['value'] = $this->value(); + $this->json['id'] = $this->id; } public function content_template() { @@ -151,38 +151,38 @@ public function content_template() { */ class Generate_Font_Weight_Custom_Control extends WP_Customize_Control { - public function __construct($manager, $id, $args = array(), $options = array()) { - parent::__construct( $manager, $id, $args ); + public function __construct( $manager, $id, $args = array(), $options = array() ) { + parent::__construct( $manager, $id, $args ); } - /** - * Render the content of the category dropdown - * - * @return HTML - */ - public function render_content() { - ?> - - + + - - + + json['choices'][$device]['min'] = ( isset( $this->choices[$device]['min'] ) ) ? $this->choices[$device]['min'] : '0'; - $this->json['choices'][$device]['max'] = ( isset( $this->choices[$device]['max'] ) ) ? $this->choices[$device]['max'] : '100'; - $this->json['choices'][$device]['step'] = ( isset( $this->choices[$device]['step'] ) ) ? $this->choices[$device]['step'] : '1'; - $this->json['choices'][$device]['edit'] = ( isset( $this->choices[$device]['edit'] ) ) ? $this->choices[$device]['edit'] : false; - $this->json['choices'][$device]['unit'] = ( isset( $this->choices[$device]['unit'] ) ) ? $this->choices[$device]['unit'] : false; + $this->json['choices'][ $device ]['min'] = ( isset( $this->choices[ $device ]['min'] ) ) ? $this->choices[ $device ]['min'] : '0'; + $this->json['choices'][ $device ]['max'] = ( isset( $this->choices[ $device ]['max'] ) ) ? $this->choices[ $device ]['max'] : '100'; + $this->json['choices'][ $device ]['step'] = ( isset( $this->choices[ $device ]['step'] ) ) ? $this->choices[ $device ]['step'] : '1'; + $this->json['choices'][ $device ]['edit'] = ( isset( $this->choices[ $device ]['edit'] ) ) ? $this->choices[ $device ]['edit'] : false; + $this->json['choices'][ $device ]['unit'] = ( isset( $this->choices[ $device ]['unit'] ) ) ? $this->choices[ $device ]['unit'] : false; } foreach ( $this->settings as $setting_key => $setting_id ) { diff --git a/inc/customizer/controls/class-typography-control.php b/inc/customizer/controls/class-typography-control.php index 448da5e5..c3c42aa6 100644 --- a/inc/customizer/controls/class-typography-control.php +++ b/inc/customizer/controls/class-typography-control.php @@ -19,26 +19,26 @@ class Generate_Typography_Customize_Control extends WP_Customize_Control { public $type = 'gp-customizer-typography'; public function enqueue() { - wp_enqueue_script( 'generatepress-typography-selectWoo', trailingslashit( get_template_directory_uri() ) . 'inc/customizer/controls/js/selectWoo.min.js', array( 'customize-controls', 'jquery' ), GENERATE_VERSION, true ); - wp_enqueue_style( 'generatepress-typography-selectWoo', trailingslashit( get_template_directory_uri() ) . 'inc/customizer/controls/css/selectWoo.min.css', array(), GENERATE_VERSION ); + wp_enqueue_script( 'generatepress-typography-selectWoo', trailingslashit( get_template_directory_uri() ) . 'inc/customizer/controls/js/selectWoo.min.js', array( 'customize-controls', 'jquery' ), GENERATE_VERSION, true ); + wp_enqueue_style( 'generatepress-typography-selectWoo', trailingslashit( get_template_directory_uri() ) . 'inc/customizer/controls/css/selectWoo.min.css', array(), GENERATE_VERSION ); - wp_enqueue_script( 'generatepress-typography-customizer', trailingslashit( get_template_directory_uri() ) . 'inc/customizer/controls/js/typography-customizer.js', array( 'customize-controls', 'generatepress-typography-selectWoo' ), GENERATE_VERSION, true ); - wp_enqueue_style( 'generatepress-typography-customizer', trailingslashit( get_template_directory_uri() ) . 'inc/customizer/controls/css/typography-customizer.css', array(), GENERATE_VERSION ); + wp_enqueue_script( 'generatepress-typography-customizer', trailingslashit( get_template_directory_uri() ) . 'inc/customizer/controls/js/typography-customizer.js', array( 'customize-controls', 'generatepress-typography-selectWoo' ), GENERATE_VERSION, true ); + wp_enqueue_style( 'generatepress-typography-customizer', trailingslashit( get_template_directory_uri() ) . 'inc/customizer/controls/css/typography-customizer.css', array(), GENERATE_VERSION ); } public function to_json() { parent::to_json(); $number_of_fonts = apply_filters( 'generate_number_of_fonts', 200 ); - $this->json[ 'default_fonts_title'] = __( 'System fonts', 'generatepress' ); - $this->json[ 'google_fonts_title'] = __( 'Google fonts', 'generatepress' ); - $this->json[ 'google_fonts' ] = apply_filters( 'generate_typography_customize_list', generate_get_all_google_fonts( $number_of_fonts ) ); - $this->json[ 'default_fonts' ] = generate_typography_default_fonts(); - $this->json[ 'family_title' ] = esc_html__( 'Font family', 'generatepress' ); - $this->json[ 'weight_title' ] = esc_html__( 'Font weight', 'generatepress' ); - $this->json[ 'transform_title' ] = esc_html__( 'Text transform', 'generatepress' ); - $this->json[ 'category_title' ] = ''; - $this->json[ 'variant_title' ] = esc_html__( 'Variants', 'generatepress' ); + $this->json['default_fonts_title'] = __( 'System fonts', 'generatepress' ); + $this->json['google_fonts_title'] = __( 'Google fonts', 'generatepress' ); + $this->json['google_fonts'] = apply_filters( 'generate_typography_customize_list', generate_get_all_google_fonts( $number_of_fonts ) ); + $this->json['default_fonts'] = generate_typography_default_fonts(); + $this->json['family_title'] = esc_html__( 'Font family', 'generatepress' ); + $this->json['weight_title'] = esc_html__( 'Font weight', 'generatepress' ); + $this->json['transform_title'] = esc_html__( 'Text transform', 'generatepress' ); + $this->json['category_title'] = ''; + $this->json['variant_title'] = esc_html__( 'Variants', 'generatepress' ); foreach ( $this->settings as $setting_key => $setting_id ) { $this->json[ $setting_key ] = array( diff --git a/inc/customizer/controls/class-upsell-control.php b/inc/customizer/controls/class-upsell-control.php index f4c01c14..f017bcc0 100644 --- a/inc/customizer/controls/class-upsell-control.php +++ b/inc/customizer/controls/class-upsell-control.php @@ -28,7 +28,7 @@ public function enqueue() { public function to_json() { parent::to_json(); - $this->json[ 'url' ] = esc_url( $this->url ); + $this->json['url'] = esc_url( $this->url ); } public function content_template() { diff --git a/inc/customizer/deprecated.php b/inc/customizer/deprecated.php index c079596f..5f2d5aa1 100644 --- a/inc/customizer/deprecated.php +++ b/inc/customizer/deprecated.php @@ -33,11 +33,11 @@ function generate_sanitize_typography( $input ) { $valid = array_merge( $font_names, $not_google ); // Sanitize - if ( in_array( $input, $valid ) ) { - return $input; - } else { - return 'Open Sans'; - } + if ( in_array( $input, $valid ) ) { + return $input; + } else { + return 'Open Sans'; + } } } @@ -50,8 +50,8 @@ function generate_sanitize_typography( $input ) { */ function generate_sanitize_font_weight( $input ) { - $valid = array( - 'normal', + $valid = array( + 'normal', 'bold', '100', '200', @@ -61,14 +61,14 @@ function generate_sanitize_font_weight( $input ) { '600', '700', '800', - '900' - ); + '900', + ); - if ( in_array( $input, $valid ) ) { - return $input; - } else { - return 'normal'; - } + if ( in_array( $input, $valid ) ) { + return $input; + } else { + return 'normal'; + } } } @@ -81,18 +81,18 @@ function generate_sanitize_font_weight( $input ) { */ function generate_sanitize_text_transform( $input ) { - $valid = array( - 'none', + $valid = array( + 'none', 'capitalize', 'uppercase', - 'lowercase' + 'lowercase', ); - if ( in_array( $input, $valid ) ) { - return $input; - } else { - return 'none'; - } + if ( in_array( $input, $valid ) ) { + return $input; + } else { + return 'none'; + } } } diff --git a/inc/customizer/helpers.php b/inc/customizer/helpers.php index 276db5d0..7545dad2 100644 --- a/inc/customizer/helpers.php +++ b/inc/customizer/helpers.php @@ -93,8 +93,9 @@ function generate_customize_partial_blogdescription() { */ function generate_enqueue_color_palettes() { // Old versions of WP don't get nice things - if ( ! function_exists( 'wp_add_inline_script' ) ) + if ( ! function_exists( 'wp_add_inline_script' ) ) { return; + } // Grab our palette array and turn it into JS $palettes = json_encode( generate_get_default_color_palettes() ); @@ -145,18 +146,18 @@ function generate_sanitize_checkbox( $checked ) { * * @since 1.0.8 */ - function generate_sanitize_blog_excerpt( $input ) { - $valid = array( - 'full', - 'excerpt' - ); - - if ( in_array( $input, $valid ) ) { - return $input; - } else { - return 'full'; - } - } + function generate_sanitize_blog_excerpt( $input ) { + $valid = array( + 'full', + 'excerpt' + ); + + if ( in_array( $input, $valid ) ) { + return $input; + } else { + return 'full'; + } + } } if ( ! function_exists( 'generate_sanitize_hex_color' ) ) { @@ -166,18 +167,18 @@ function generate_sanitize_blog_excerpt( $input ) { * * @since 1.2.9.6 */ - function generate_sanitize_hex_color( $color ) { - if ( '' === $color ) { - return ''; - } + function generate_sanitize_hex_color( $color ) { + if ( '' === $color ) { + return ''; + } - // 3 or 6 hex digits, or the empty string. - if ( preg_match('|^#([A-Fa-f0-9]{3}){1,2}$|', $color ) ) { - return $color; - } + // 3 or 6 hex digits, or the empty string. + if ( preg_match('|^#([A-Fa-f0-9]{3}){1,2}$|', $color ) ) { + return $color; + } - return ''; - } + return ''; + } } if ( ! function_exists( 'generate_sanitize_choices' ) ) { @@ -222,7 +223,11 @@ function generate_sanitize_variants( $input ) { * @since 2.0 */ function generate_do_control_inline_scripts() { - wp_localize_script( 'generatepress-typography-customizer', 'gp_customize', array( 'nonce' => wp_create_nonce( 'gp_customize_nonce' ) ) ); + wp_localize_script( 'generatepress-typography-customizer', 'gp_customize', + array( + 'nonce' => wp_create_nonce( 'gp_customize_nonce' ) + ) + ); wp_localize_script( 'generatepress-typography-customizer', 'typography_defaults', generate_typography_default_fonts() ); } diff --git a/inc/dashboard.php b/inc/dashboard.php index 4ee408a6..48edac1d 100644 --- a/inc/dashboard.php +++ b/inc/dashboard.php @@ -64,8 +64,8 @@ function generate_settings_page() { * * @since 2.0 */ - do_action( 'generate_dashboard_after_header' ); - ?> + do_action( 'generate_dashboard_after_header' ); + ?>