E cQ k z v V' j   O {) k& g ^<  Vv D5{ ue EJ + m^< *fC CHr N  y q eT ~  :P z [p D 9S$G    d 7c<w { W ) /xa \ 'V 8Sgc KY n    W V V z 9sH t_theme_mod( 'pages_template', 'default' ); } /** * Performs upgrades to Flatsome 3.12.1 */ private function update_3121() { // Change 404_block setting value from post_name to ID if one is chosen. $block = get_theme_mod( '404_block' ); if ( ! empty( $block ) && ! is_numeric( $block ) ) { $blocks = flatsome_get_post_type_items( 'blocks' ); if ( $blocks ) { foreach ( $blocks as $block_post ) { if ( $block_post->post_name == $block ) { set_theme_mod( '404_block', $block_post->ID ); break; } } } } // Set mod to empty string if value is 0. if ( 0 == get_theme_mod( 'site_loader' ) ) { set_theme_mod( 'site_loader', '' ); } } /** * Performs upgrades to Flatsome 3.15.0 */ private function update_3150() { foreach ( array( 'site_logo', 'site_logo_dark', 'site_logo_sticky' ) as $name ) { $value = get_theme_mod( $name ); if ( empty( $value ) ) continue; if ( is_numeric( $value ) ) continue; if ( $post_id = attachment_url_to_postid( $value ) ) { set_theme_mod( $name, $post_id ); } } } /** * Performs upgrades to Flatsome 3.16.0 */ private function update_3160() { // Mirror vertical menu opener width. if ( get_theme_mod( 'header_nav_vertical_width', '250' ) != 250 ) { set_theme_mod( 'header_nav_vertical_fly_out_width', get_theme_mod( 'header_nav_vertical_width' ) ); } // Change variant 400 to 'regular'. foreach ( array( 'type_headings', 'type_texts', 'type_nav', 'type_alt' ) as $font_type ) { $setting = get_theme_mod( $font_type ); if ( $setting && isset( $setting['variant'] ) && $setting['variant'] == '400' ) { $setting['variant'] = 'regular'; set_theme_mod( $font_type, $setting ); } } } /** * Performs upgrades to Flatsome 3.17.0 */ private function update_3170() { // Iterate sticky sidebar options and set their mode to 'javascript' if enabled before the upgrade. foreach ( array( 'blog_sticky_sidebar', 'category_sticky_sidebar', 'cart_sticky_sidebar', 'checkout_sticky_sidebar' ) as $name ) { if ( empty( get_theme_mod( $name ) ) ) continue; set_theme_mod( $name . '_mode', 'javascript' ); } } /** * Performs upgrades to Flatsome 3.18.0 */ private function update_3180() { if ( get_theme_mod( 'flatsome_infinite_scroll', 0 ) ) { set_theme_mod( 'shop_pagination', 'infinite-scroll' ); } remove_theme_mod( 'flatsome_infinite_scroll' ); } /** * Performs upgrades to Flatsome 3.18.5 */ private function update_3185() { // Clear typography cache. try { $fonts_dir = flatsome_get_fonts_dir(); delete_transient( 'kirki_remote_url_contents' ); delete_option( 'kirki_downloaded_font_files' ); global $wp_filesystem; if ( ! $wp_filesystem ) { if ( ! function_exists( 'WP_Filesystem' ) ) { require_once wp_normalize_path( ABSPATH . '/wp-admin/includes/file.php' ); } WP_Filesystem(); } if ( $wp_filesystem instanceof WP_FileSystem_Base && $wp_filesystem->exists( $fonts_dir ) ) { foreach ( $wp_filesystem->dirlist( $fonts_dir ) as $file ) { if ( $wp_filesystem->is_dir( $fonts_dir . '/' . $file['name'] ) ) { $wp_filesystem->rmdir( $fonts_dir . '/' . $file['name'], true ); } } } } catch ( Exception $e ) { error_log( $e->getMessage() ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions } } /** * Performs upgrades to Flatsome 3.19.0 */ private function update_3190() { // Convert custom cart icon URL to attachment ID. $name = 'custom_cart_icon'; $value = get_theme_mod( $name ); if ( ! empty( $value ) && ! is_numeric( $value ) ) { if ( $post_id = attachment_url_to_postid( $value ) ) { set_theme_mod( $name, $post_id ); } } // Remove lazy load background setting. remove_theme_mod( 'lazy_load_backgrounds' ); // If swatch color selected setting matches color secondary it likely has the // previous default value, reset it so it will use custom secondary color if set. if ( get_theme_mod( 'swatches_color_selected' ) === Flatsome_Default::COLOR_SECONDARY ) { set_theme_mod( 'swatches_color_selected', '' ); } if ( get_theme_mod( 'swatches_box_color_selected' ) === Flatsome_Default::COLOR_SECONDARY ) { set_theme_mod( 'swatches_box_color_selected', '' ); } } /** * Set the DB version to the current running version. * Should only be called when all upgrades are performed. */ private function update_db_version() { set_theme_mod( 'flatsome_db_version', $this->running_version ); } } if ( ! wp_doing_ajax() ) { new Flatsome_Upgrade(); } {"code":"oembed_invalid_url","message":"Not Found","data":{"status":404}}