'', 'Abel' => 'Abel', 'Anton' => 'Anton', 'Asap:wght@400;500;600;700' => 'Asap', 'Barlow:ital,wght@0,200;0,300;0,400;0,700;0,800;0,900;1,400' => 'Barlow', 'Bebas+Neue' => 'Bebas Neue', 'Bitter:wght@200;300;400;700;900' => 'Bitter', 'Cabin:wght@400;500;700' => 'Cabin', 'Comfortaa:wght@300;400;500;700' => 'Comfortaa', 'Crimson+Text:wght@400;600;700' => 'Crimson Text', 'Dosis:wght@300;400;700' => 'Dosis', 'Goldman:wght@400,700' => 'Goldman', 'Heebo:wght@200;400;700;800;900' => 'Heebo', 'Hind:wght@300;400;500;700' => 'Hind', 'Hind+Siliguri:wght@300,400,700' => 'Hind Siliguri', 'IBM+Plex+Sans:ital,wght@0,100;0,400;0,700;1,400' => 'IBM Plex Sans', 'IBM+Plex+Sans+Condensed:ital,wght@0,100;0,200;0,300;0,400;0,700;1,400' => 'IBM Plex Sans Condensed', 'IBM+Plex+Serif:ital,wght@0,200;0,400;0,600;0,700;1,400' => 'IBM Plex Serif', 'IBM+Plex+Mono:ital,wght@0,200;0,400;0,700;1,400' => 'IBM Plex Mono', 'Inconsolata:wght@300;400;700;800;900' => 'Inconsolata', 'Inter:wght@200;300;400;700;800;900' => 'Inter', 'Josefin+Sans:wght@300;400;500;700' => 'Josefin Sans', 'Karla:ital,wght@0,400;0,700;1,400' => 'Karla', 'Lato:ital,wght@0,300;0,400;0,700;0,900;1,400;1,700' => 'Lato', 'Libre+Baskerville:wght@400;700' => 'Libre Baskerville', 'Libre+Franklin:wght@200;300;400;700;800;900' => 'Libre Franklin', 'Lobster' => 'Lobster', 'Lora:ital,wght@0,400;0,700;1,400;1,500;1,700' => 'Lora', 'Merriweather:ital,wght@0,300;0,400;0,700;0,900;1,400;1,700' => 'Merriweather', 'Merriweather+Sans:ital,wght@0,300;0,400;0,700;0,800;1,400;1,700' => 'Merriweather Sans', 'Montserrat:ital,wght@0,200;0,300;0,400;0,700;0,900;1,400;1,700' => 'Montserrat', 'Muli' => 'Muli', 'Noto+Sans+JP:wght@100,300,400,700' => 'Noto Sans JP', 'Nunito:ital,wght@0,300;0,400;0,700;0,800;0,900;1,400;1,700' => 'Nunito', 'Nunito+Sans:ital,wght@0,300;0,400;0,700;0,800;0,900;1,700' => 'Nunito Sans', 'Open+Sans:ital,wght@0,300;0,400;0,700;0,800;1,400;1,700' => 'Open Sans', 'Open+Sans+Condensed:wght@300;700' => 'Open Sans Condensed', 'Oswald:wght@200,300,400,700' => 'Oswald', 'Oxygen:wght@300,400,700' => 'Oxygen', 'Pacifico' => 'Pacifico', 'Playfair+Display:ital,wght@0,400;0,700;0,800;0,900;1,400' => 'Playfair Display', 'Poppins:ital,wght@0,200;0,300;0,400;0,700;0,800;0,900;1,400' => 'Poppins', 'PT+Sans:ital,wght@0,400;0,700;1,400' => 'PT Sans', 'PT+Serif:ital,wght@0,400;0,700;1,400' => 'PT Serif', 'Quicksand:wght@300;400;700' => 'Quicksand', 'Raleway:ital,wght@0,200;0,300;0,400;0,700;0,800;0,900;1,400' => 'Raleway', 'Roboto:ital,wght@0,300;0,400;0,700;0,900;1,400' => 'Roboto', 'Roboto+Condensed:ital,wght@0,300;0,400;0,700;1,400' => 'Roboto Condensed', 'Roboto+Slab:wght@300,400,700,900' => 'Roboto Slab', 'Rubik:ital,wght@0,300;0,400;0,700;1,400;1,700' => 'Rubik', 'Sen:wght@400,700,800' => 'Sen', 'Source+Sans+Pro:ital,wght@0,300;0,400;0,700;0,900;1,400;1,700' => 'Source Sans Pro', 'Ubuntu:ital,wght@0,300;0,400;0,500;0,700;1,400' => 'Ubuntu', 'Work+Sans:ital,wght@0,200;0,400;0,700;0,800;0,900;1,400' => 'Work Sans', 'Xanh+Mono' => 'Xanh Mono' ); //make the font label human readable so it'll work in css foreach ($c9fonts as $c9key => $c9value) { // echo "

set: " . $body_font . "body font key: " . $c9key . " body font value:" . $c9value . "

"; if ($body_font == $c9key) { $body_font = $c9value; } } //make the font label human readable so it'll work in css foreach ($c9fonts as $c9key => $c9value) { if ($subheading_font == $c9key) { $subheading_font = $c9value; } } //make the font label human readable so it'll work in css foreach ($c9fonts as $c9key => $c9value) { if ($heading_font == $c9key) { $heading_font = $c9value; } } // Begin outputting styles: // Hide text only while waiting for Web Font Loader to download its font, and only if the option is selected if ($fadein_fonts) { if (!empty($heading_font)) { self::the_selectors('headings', '.wf-loading'); ?>, .wf-loading .c9.site .h1 a, .wf-loading .c9.site .h2 a, .wf-loading .c9.site .h3 a, .wf-loading .c9.site .h4 a, .wf-loading .c9.site .h5 a, .wf-loading .c9.site .h6 a, .wf-loading .c9.site h1 a, .wf-loading .c9.site h2 a, .wf-loading .c9.site h3 a, .wf-loading .c9.site h4 a, .wf-loading .c9.site h5 a, .wf-loading .c9.site h6 a { color: transparent !important; } { color: transparent !important; } { color: transparent !important; } { font-family: var(--default-font); font-family: , helvetica, sans-serif; transition: color .2s; } { font-family: var(--default-font); font-family: , helvetica, sans-serif; transition: color .2s; } { font-family: , helvetica, sans-serif; transition: color .2s; } .c9-sh' ); break; case 'body': $selectors = array( ':root', 'body', 'body .is-root-container', 'body .editor-styles-wrapper .is-root-container', '.c9 .wp-block-pullquote', '.c9 .wp-block-pullquote blockquote p', '.c9 #wrapper-footer', '.wp-block-table tr td', '.btn', '.btn:visited', '.entry-content button', '.entry-content input[type="button"]', '.entry-content input[type="reset"]', '.entry-content input[type="submit"]', '.wp-block-button__link', '.wp-block-file__button', '.wp-block-file .wp-block-file__button', '#mc_embed_signup input[type="email"]', '.c9 input[type="text"]', '.c9 input[type="email"]', '.c9 input[type="url"]', '.c9 input[type="password"]', '.c9 input[type="tel"]', '.c9 textarea', '#fullscreensearch input[type="search"]', '.c9 .gform_wrapper label.gfield_label', '.c9 .gform_wrapper legend.gfield_label', '.c9 .gform_wrapper input[type="text"]', '.c9 .gform_wrapper input[type="password"]', '.c9 .gform_wrapper input[type="tel"]', '.c9 .gform_wrapper textarea', '.c9 .gform_button.button', '.c9 .entry-content', '.navbar', '.navbar ul li .dropdown-item', '.navbar ul li a' ); break; } // End of switch ($which_selectors) // When editing a post in admin, select only the editing area global $pagenow; if ($pagenow == 'post.php') { $prefix = $prefix . ' .block-editor-block-list__layout.is-root-container'; // Also select the block editor itself if ($which_selectors == 'body') { $selectors[] = ''; } } // Add any given prefix to every selector if (!is_null($prefix)) { foreach ($selectors as &$selector) { $selector = $prefix . ' ' . $selector; } unset($selector); } echo implode(', ', $selectors); } /** * Regex powered CSS minifier */ public static function minify_css($css) { // some of the following functions to minimize the css-output are directly taken // from the awesome CSS JS Booster: https://github.com/Schepp/CSS-JS-Booster // all credits to Christian Schaefer: http://twitter.com/derSchepp // remove comments $css = preg_replace('!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $css); // backup values within single or double quotes preg_match_all('/(\'[^\']*?\'|"[^"]*?")/ims', $css, $hit, PREG_PATTERN_ORDER); for ($i = 0; $i < count($hit[1]); $i++) { $css = str_replace($hit[1][$i], '##########' . $i . '##########', $css); } // remove traling semicolon of selector's last property $css = preg_replace('/;[\s\r\n\t]*?}[\s\r\n\t]*/ims', "}\r\n", $css); // remove any whitespace between semicolon and property-name $css = preg_replace('/;[\s\r\n\t]*?([\r\n]?[^\s\r\n\t])/ims', ';$1', $css); // remove any whitespace surrounding property-colon $css = preg_replace('/[\s\r\n\t]*:[\s\r\n\t]*?([^\s\r\n\t])/ims', ':$1', $css); // remove any whitespace surrounding selector-comma $css = preg_replace('/[\s\r\n\t]*,[\s\r\n\t]*?([^\s\r\n\t])/ims', ',$1', $css); // remove any whitespace surrounding opening parenthesis $css = preg_replace('/[\s\r\n\t]*{[\s\r\n\t]*?([^\s\r\n\t])/ims', '{$1', $css); // remove any whitespace between numbers and units $css = preg_replace('/([\d\.]+)[\s\r\n\t]+(px|em|pt|%)/ims', '$1$2', $css); // shorten zero-values $css = preg_replace('/([^\d\.]0)(px|em|pt|%)/ims', '$1', $css); // constrain multiple whitespaces $css = preg_replace('/\p{Zs}+/ims', ' ', $css); // remove newlines $css = str_replace(array("\r\n", "\r", "\n"), '', $css); // Restore backupped values within single or double quotes for ($i = 0; $i < count($hit[1]); $i++) { $css = str_replace('##########' . $i . '##########', $hit[1][$i], $css); } return $css; } }