Upgarded to 4.17.4
This commit is contained in:
@ -54,7 +54,7 @@ if ( ! function_exists( 'et_epanel_admin_js' ) ) {
|
||||
if ( ! function_exists( 'et_epanel_enable_css_lint' ) ) {
|
||||
function et_epanel_enable_css_lint( $settings ){
|
||||
$modes = array( 'text/css', 'css', 'text/x-scss', 'text/x-less', 'text/x-sass' );
|
||||
|
||||
|
||||
if ( in_array( $settings['codemirror']['mode'], $modes, true ) ) {
|
||||
$settings['codemirror']['lint'] = true;
|
||||
$settings['codemirror']['gutters'] = array( 'CodeMirror-lint-markers' );
|
||||
@ -397,7 +397,7 @@ if ( ! function_exists( 'et_build_epanel' ) ) {
|
||||
$et_upload_button_data = isset( $value['button_text'] ) ? sprintf( ' data-button_text="%1$s"', esc_attr( $value['button_text'] ) ) : '';
|
||||
?>
|
||||
|
||||
<input id="<?php echo esc_attr( $value['id'] ); ?>" class="et-upload-field" type="text" size="90" name="<?php echo esc_attr( $value['id'] ); ?>" value="<?php echo esc_url( et_get_option( $value['id'], '', '', false, $is_new_global_setting, $global_setting_main_name, $global_setting_sub_name ) ); ?>" />
|
||||
<input id="<?php echo esc_attr( $value['id'] ); ?>" class="et-upload-field" type="text" size="90" name="<?php echo esc_attr( $value['id'] ); ?>" value="<?php echo esc_url( strval( et_get_option( $value['id'], '', '', false, $is_new_global_setting, $global_setting_main_name, $global_setting_sub_name ) ) ); ?>" />
|
||||
<div class="et-upload-buttons">
|
||||
<span class="et-upload-image-reset"><?php esc_html_e( 'Reset', $themename ); ?></span>
|
||||
<input class="et-upload-image-button" type="button"<?php echo et_core_esc_previously( $et_upload_button_data ); ?> value="<?php esc_attr_e( 'Upload', $themename ); ?>" />
|
||||
@ -414,7 +414,7 @@ if ( ! function_exists( 'et_build_epanel' ) ) {
|
||||
$et_use_option_values = ( isset( $value['et_array_for'] ) && in_array( $value['et_array_for'], array( 'pages', 'categories' ) ) ) ||
|
||||
( isset( $value['et_save_values'] ) && $value['et_save_values'] ) ? true : false;
|
||||
|
||||
$et_option_db_value = et_get_option( $value['id'] );
|
||||
$et_option_db_value = strval( et_get_option( $value['id'] ) );
|
||||
|
||||
if ( ( $et_use_option_values && ( $et_option_db_value === $option_key ) ) || ( stripslashes( $et_option_db_value ) === trim( stripslashes( $option ) ) ) || ( ! $et_option_db_value && isset( $value['std'] ) && stripslashes( $option ) === stripslashes( $value['std'] ) ) )
|
||||
$et_select_active = ' selected="selected"';
|
||||
@ -438,7 +438,7 @@ if ( ! function_exists( 'et_build_epanel' ) ) {
|
||||
$class_name_last = 0 === $i % 3 ? ' last' : '';
|
||||
|
||||
if ( et_get_option( $value['id'] ) ) {
|
||||
if ( in_array( $option, et_get_option( $value['id'] ) ) ) {
|
||||
if ( in_array( $option, (array) et_get_option( $value['id'] ), true ) ) {
|
||||
$checked = "checked=\"checked\"";
|
||||
}
|
||||
}
|
||||
@ -474,7 +474,9 @@ if ( ! function_exists( 'et_build_epanel' ) ) {
|
||||
foreach ( $value['options'] as $option ) {
|
||||
$checked = '';
|
||||
if ( et_get_option( $value['id'] ) !== false ) {
|
||||
if ( in_array( $option, et_get_option( $value['id'] ) ) ) $checked = "checked=\"checked\"";
|
||||
if ( in_array( $option, (array) et_get_option( $value['id'] ), true ) ) {
|
||||
$checked = 'checked="checked"';
|
||||
}
|
||||
} elseif ( isset( $value['std'] ) ) {
|
||||
if ( in_array( $option, $value['std'] ) ) {
|
||||
$checked = "checked=\"checked\"";
|
||||
@ -493,10 +495,10 @@ if ( ! function_exists( 'et_build_epanel' ) ) {
|
||||
call_user_func( $value['function_name'] ); ?>
|
||||
|
||||
<?php } elseif ( 'et_color_palette' === $value['type'] ) {
|
||||
$items_amount = isset( $value['items_amount'] ) ? $value['items_amount'] : 1;
|
||||
$et_input_value = et_get_option( $value['id'], '', '', false, $is_new_global_setting, $global_setting_main_name, $global_setting_sub_name );
|
||||
$items_amount = isset( $value['items_amount'] ) ? $value['items_amount'] : 1;
|
||||
$et_input_value = strval( et_get_option( $value['id'], '', '', false, $is_new_global_setting, $global_setting_main_name, $global_setting_sub_name ) );
|
||||
$et_input_value_processed = str_replace( '|', '', $et_input_value );
|
||||
$et_input_value = ! empty( $et_input_value_processed ) ? $et_input_value : $value['std'];
|
||||
$et_input_value = ! empty( $et_input_value_processed ) ? $et_input_value : $value['std'];
|
||||
?>
|
||||
<div class="et_pb_colorpalette_overview">
|
||||
<?php
|
||||
|
@ -787,7 +787,7 @@ if ( ! function_exists( 'show_page_menu' ) ) {
|
||||
|
||||
//excluded pages
|
||||
if ( $menupages = et_get_option( $shortname.'_menupages' ) ) {
|
||||
$exclude_pages = implode( ",", $menupages );
|
||||
$exclude_pages = is_array( $menupages ) ? implode( ',', $menupages ) : '';
|
||||
}
|
||||
|
||||
//dropdown for pages
|
||||
@ -825,7 +825,7 @@ if ( ! function_exists( 'show_categories_menu' ) ) {
|
||||
|
||||
//excluded categories
|
||||
if ( $menucats = et_get_option( $shortname.'_menucats' ) ) {
|
||||
$exclude_cats = implode( ",", $menucats );
|
||||
$exclude_cats = implode( ',', (array) $menucats );
|
||||
}
|
||||
|
||||
//hide empty categories
|
||||
@ -1098,7 +1098,7 @@ if ( ! function_exists( 'elegant_titles_filter' ) ) {
|
||||
#if the title is being displayed on the homepage
|
||||
if ( ( is_home() || is_front_page() ) && ! elegant_is_blog_posts_page() ) {
|
||||
if ( 'on' === et_get_option( $shortname . '_seo_home_title' ) ) {
|
||||
$custom_title = et_get_option( $shortname . '_seo_home_titletext' );
|
||||
$custom_title = strval( et_get_option( $shortname . '_seo_home_titletext' ) );
|
||||
} else {
|
||||
$seo_home_type = et_get_option( $shortname . '_seo_home_type' );
|
||||
$seo_home_separate = et_get_option( $shortname . '_seo_home_separate' );
|
||||
@ -1355,7 +1355,7 @@ function add_favicon(){
|
||||
|
||||
// If the `has_site_icon` function doesn't exist (ie we're on < WP 4.3) or if the site icon has not been set,
|
||||
// and when we have a icon URL from theme option
|
||||
if ( ( ! function_exists( 'has_site_icon' ) || ! has_site_icon() ) && false !== $favicon_url && '' !== $favicon_url ) {
|
||||
if ( ( ! function_exists( 'has_site_icon' ) || ! has_site_icon() ) && ! empty( $favicon_url ) ) {
|
||||
echo '<link rel="shortcut icon" href="' . esc_url( $favicon_url ) . '" />';
|
||||
} elseif ( function_exists( 'has_site_icon' ) && has_site_icon() ) {
|
||||
et_update_option( $shortname . '_favicon', '' );
|
||||
@ -1377,7 +1377,7 @@ function et_create_images_temp_folder(){
|
||||
if ( false !== $et_images_temp_folder ) return;
|
||||
|
||||
$uploads_dir = wp_upload_dir();
|
||||
$destination_dir = ( false === $uploads_dir['error'] ) ? path_join( $uploads_dir['basedir'], 'et_temp' ) : null;
|
||||
$destination_dir = ( false === $uploads_dir['error'] ) ? path_join( $uploads_dir['basedir'], 'et_temp' ) : '';
|
||||
|
||||
if ( ! wp_mkdir_p( $destination_dir ) ) update_option( 'et_images_temp_folder', '' );
|
||||
else {
|
||||
|
Reference in New Issue
Block a user