updated theme GeneratePress
version 3.0.2
This commit is contained in:
@ -15,24 +15,25 @@ if ( ! function_exists( 'generate_sanitize_typography' ) ) {
|
||||
*
|
||||
* @since 1.1.10
|
||||
* @deprecated 1.3.45
|
||||
* @param string $input The value to check.
|
||||
*/
|
||||
function generate_sanitize_typography( $input ) {
|
||||
// Grab all of our fonts
|
||||
// Grab all of our fonts.
|
||||
$fonts = generate_get_all_google_fonts();
|
||||
|
||||
// Loop through all of them and grab their names
|
||||
// Loop through all of them and grab their names.
|
||||
$font_names = array();
|
||||
foreach ( $fonts as $k => $fam ) {
|
||||
$font_names[] = $fam['name'];
|
||||
}
|
||||
|
||||
// Get all non-Google font names
|
||||
// Get all non-Google font names.
|
||||
$not_google = generate_typography_default_fonts();
|
||||
|
||||
// Merge them both into one array
|
||||
// Merge them both into one array.
|
||||
$valid = array_merge( $font_names, $not_google );
|
||||
|
||||
// Sanitize
|
||||
// Sanitize.
|
||||
if ( in_array( $input, $valid ) ) {
|
||||
return $input;
|
||||
} else {
|
||||
@ -47,6 +48,7 @@ if ( ! function_exists( 'generate_sanitize_font_weight' ) ) {
|
||||
*
|
||||
* @since 1.1.10
|
||||
* @deprecated 1.3.40
|
||||
* @param string $input The value to check.
|
||||
*/
|
||||
function generate_sanitize_font_weight( $input ) {
|
||||
|
||||
@ -78,6 +80,7 @@ if ( ! function_exists( 'generate_sanitize_text_transform' ) ) {
|
||||
*
|
||||
* @since 1.1.10
|
||||
* @deprecated 1.3.40
|
||||
* @param string $input The value to check.
|
||||
*/
|
||||
function generate_sanitize_text_transform( $input ) {
|
||||
|
||||
@ -86,7 +89,7 @@ if ( ! function_exists( 'generate_sanitize_text_transform' ) ) {
|
||||
'capitalize',
|
||||
'uppercase',
|
||||
'lowercase',
|
||||
);
|
||||
);
|
||||
|
||||
if ( in_array( $input, $valid ) ) {
|
||||
return $input;
|
||||
@ -99,6 +102,7 @@ if ( ! function_exists( 'generate_sanitize_text_transform' ) ) {
|
||||
if ( ! function_exists( 'generate_typography_customize_preview_css' ) ) {
|
||||
/**
|
||||
* Hide the hidden input control
|
||||
*
|
||||
* @since 1.3.40
|
||||
*/
|
||||
function generate_typography_customize_preview_css() {
|
||||
@ -109,3 +113,21 @@ if ( ! function_exists( 'generate_typography_customize_preview_css' ) ) {
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'generate_hidden_navigation' ) && function_exists( 'is_customize_preview' ) ) {
|
||||
/**
|
||||
* Adds a hidden navigation if no navigation is set
|
||||
* This allows us to use postMessage to position the navigation when it doesn't exist
|
||||
*
|
||||
* @since 1.3.40
|
||||
*/
|
||||
function generate_hidden_navigation() {
|
||||
if ( is_customize_preview() && function_exists( 'generate_navigation_position' ) ) {
|
||||
?>
|
||||
<div style="display:none;">
|
||||
<?php generate_navigation_position(); ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user