/** * Astra Updates * * Functions for updating data, used by the background updater. * * @package Astra * @version 2.1.3 */ defined( 'ABSPATH' ) || exit; /** * Open Submenu just below menu for existing users. * * @since 2.1.3 * @return void */ function astra_submenu_below_header() { $theme_options = get_option( 'astra-settings' ); // Set flag to use flex align center css to open submenu just below menu. if ( ! isset( $theme_options['submenu-open-below-header'] ) ) { $theme_options['submenu-open-below-header'] = false; update_option( 'astra-settings', $theme_options ); } } /** * Do not apply new default colors to the Elementor & Gutenberg Buttons for existing users. * * @since 2.2.0 * * @return void */ function astra_page_builder_button_color_compatibility() { $theme_options = get_option( 'astra-settings', array() ); // Set flag to not load button specific CSS. if ( ! isset( $theme_options['pb-button-color-compatibility'] ) ) { $theme_options['pb-button-color-compatibility'] = false; update_option( 'astra-settings', $theme_options ); } } /** * Migrate option data from button vertical & horizontal padding to the new responsive padding param. * * @since 2.2.0 * * @return void */ function astra_vertical_horizontal_padding_migration() { $theme_options = get_option( 'astra-settings', array() ); $btn_vertical_padding = isset( $theme_options['button-v-padding'] ) ? $theme_options['button-v-padding'] : 10; $btn_horizontal_padding = isset( $theme_options['button-h-padding'] ) ? $theme_options['button-h-padding'] : 40; /** @psalm-suppress InvalidArgument */ // phpcs:ignore Generic.Commenting.DocComment.MissingShort if ( false === astra_get_db_option( 'theme-button-padding', false ) ) { // Migrate button vertical padding to the new padding param for button. $theme_options['theme-button-padding'] = array( 'desktop' => array( 'top' => $btn_vertical_padding, 'right' => $btn_horizontal_padding, 'bottom' => $btn_vertical_padding, 'left' => $btn_horizontal_padding, ), 'tablet' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'mobile' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'desktop-unit' => 'px', 'tablet-unit' => 'px', 'mobile-unit' => 'px', ); update_option( 'astra-settings', $theme_options ); } } /** * Migrate option data from button url to the new link param. * * @since 2.3.0 * * @return void */ function astra_header_button_new_options() { $theme_options = get_option( 'astra-settings', array() ); $btn_url = isset( $theme_options['header-main-rt-section-button-link'] ) ? $theme_options['header-main-rt-section-button-link'] : 'https://www.wpastra.com'; $theme_options['header-main-rt-section-button-link-option'] = array( 'url' => $btn_url, 'new_tab' => false, 'link_rel' => '', ); update_option( 'astra-settings', $theme_options ); } /** * For existing users, do not provide Elementor Default Color Typo settings compatibility by default. * * @since 2.3.3 * * @return void */ function astra_elementor_default_color_typo_comp() { $theme_options = get_option( 'astra-settings', array() ); // Set flag to not load button specific CSS. if ( ! isset( $theme_options['ele-default-color-typo-setting-comp'] ) ) { $theme_options['ele-default-color-typo-setting-comp'] = false; update_option( 'astra-settings', $theme_options ); } } /** * For existing users, change the separator from html entity to css entity. * * @since 2.3.4 * * @return void */ function astra_breadcrumb_separator_fix() { $theme_options = get_option( 'astra-settings', array() ); // Check if the saved database value for Breadcrumb Separator is "»", then change it to '\00bb'. if ( isset( $theme_options['breadcrumb-separator'] ) && '»' === $theme_options['breadcrumb-separator'] ) { $theme_options['breadcrumb-separator'] = '\00bb'; update_option( 'astra-settings', $theme_options ); } } /** * Check if we need to change the default value for tablet breakpoint. * * @since 2.4.0 * @return void */ function astra_update_theme_tablet_breakpoint() { $theme_options = get_option( 'astra-settings' ); if ( ! isset( $theme_options['can-update-theme-tablet-breakpoint'] ) ) { // Set a flag to check if we need to change the theme tablet breakpoint value. $theme_options['can-update-theme-tablet-breakpoint'] = false; } update_option( 'astra-settings', $theme_options ); } /** * Migrate option data from site layout background option to its desktop counterpart. * * @since 2.4.0 * * @return void */ function astra_responsive_base_background_option() { $theme_options = get_option( 'astra-settings', array() ); if ( false === get_option( 'site-layout-outside-bg-obj-responsive', false ) && isset( $theme_options['site-layout-outside-bg-obj'] ) ) { $theme_options['site-layout-outside-bg-obj-responsive']['desktop'] = $theme_options['site-layout-outside-bg-obj']; $theme_options['site-layout-outside-bg-obj-responsive']['tablet'] = array( 'background-color' => '', 'background-image' => '', 'background-repeat' => 'repeat', 'background-position' => 'center center', 'background-size' => 'auto', 'background-attachment' => 'scroll', ); $theme_options['site-layout-outside-bg-obj-responsive']['mobile'] = array( 'background-color' => '', 'background-image' => '', 'background-repeat' => 'repeat', 'background-position' => 'center center', 'background-size' => 'auto', 'background-attachment' => 'scroll', ); } update_option( 'astra-settings', $theme_options ); } /** * Do not apply new wide/full image CSS for existing users. * * @since 2.4.4 * * @return void */ function astra_gtn_full_wide_image_group_css() { $theme_options = get_option( 'astra-settings', array() ); // Set flag to not load button specific CSS. if ( ! isset( $theme_options['gtn-full-wide-image-grp-css'] ) ) { $theme_options['gtn-full-wide-image-grp-css'] = false; update_option( 'astra-settings', $theme_options ); } } /** * Do not apply new wide/full Group and Cover block CSS for existing users. * * @since 2.5.0 * * @return void */ function astra_gtn_full_wide_group_cover_css() { $theme_options = get_option( 'astra-settings', array() ); if ( ! isset( $theme_options['gtn-full-wide-grp-cover-css'] ) ) { $theme_options['gtn-full-wide-grp-cover-css'] = false; update_option( 'astra-settings', $theme_options ); } } /** * Do not apply the global border width and border color setting for the existng users. * * @since 2.5.0 * * @return void */ function astra_global_button_woo_css() { $theme_options = get_option( 'astra-settings', array() ); // Set flag to not load button specific CSS. if ( ! isset( $theme_options['global-btn-woo-css'] ) ) { $theme_options['global-btn-woo-css'] = false; update_option( 'astra-settings', $theme_options ); } } /** * Migrate Footer Widget param to array. * * @since 2.5.2 * * @return void */ function astra_footer_widget_bg() { $theme_options = get_option( 'astra-settings', array() ); // Check if Footer Backgound array is already set or not. If not then set it as array. if ( isset( $theme_options['footer-adv-bg-obj'] ) && ! is_array( $theme_options['footer-adv-bg-obj'] ) ) { $theme_options['footer-adv-bg-obj'] = array( 'background-color' => '', 'background-image' => '', 'background-repeat' => 'repeat', 'background-position' => 'center center', 'background-size' => 'auto', 'background-attachment' => 'scroll', ); update_option( 'astra-settings', $theme_options ); } } /** * Check if we need to load icons as font or SVG. * * @since 3.3.0 * @return void */ function astra_icons_svg_compatibility() { $theme_options = get_option( 'astra-settings' ); if ( ! isset( $theme_options['can-update-astra-icons-svg'] ) ) { // Set a flag to check if we need to add icons as SVG. $theme_options['can-update-astra-icons-svg'] = false; update_option( 'astra-settings', $theme_options ); } } /** * Migrate Background control options to new array. * * @since 3.0.0 * * @return void */ function astra_bg_control_migration() { $db_options = array( 'footer-adv-bg-obj', 'footer-bg-obj', 'sidebar-bg-obj', ); $theme_options = get_option( 'astra-settings', array() ); foreach ( $db_options as $option_name ) { if ( ! ( isset( $theme_options[ $option_name ]['background-type'] ) && isset( $theme_options[ $option_name ]['background-media'] ) ) && isset( $theme_options[ $option_name ] ) ) { if ( ! empty( $theme_options[ $option_name ]['background-image'] ) ) { $theme_options[ $option_name ]['background-type'] = 'image'; $theme_options[ $option_name ]['background-media'] = attachment_url_to_postid( $theme_options[ $option_name ]['background-image'] ); } else { $theme_options[ $option_name ]['background-type'] = ''; $theme_options[ $option_name ]['background-media'] = ''; } error_log( sprintf( 'Astra: Migrating Background Option - %s', $option_name ) ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log update_option( 'astra-settings', $theme_options ); } } } /** * Migrate Background Responsive options to new array. * * @since 3.0.0 * * @return void */ function astra_bg_responsive_control_migration() { $db_options = array( 'site-layout-outside-bg-obj-responsive', 'content-bg-obj-responsive', 'header-bg-obj-responsive', 'primary-menu-bg-obj-responsive', 'above-header-bg-obj-responsive', 'above-header-menu-bg-obj-responsive', 'below-header-bg-obj-responsive', 'below-header-menu-bg-obj-responsive', ); $theme_options = get_option( 'astra-settings', array() ); foreach ( $db_options as $option_name ) { if ( ! ( isset( $theme_options[ $option_name ]['desktop']['background-type'] ) && isset( $theme_options[ $option_name ]['desktop']['background-media'] ) ) && isset( $theme_options[ $option_name ] ) ) { if ( ! empty( $theme_options[ $option_name ]['desktop']['background-image'] ) ) { $theme_options[ $option_name ]['desktop']['background-type'] = 'image'; $theme_options[ $option_name ]['desktop']['background-media'] = attachment_url_to_postid( $theme_options[ $option_name ]['desktop']['background-image'] ); } else { $theme_options[ $option_name ]['desktop']['background-type'] = ''; $theme_options[ $option_name ]['desktop']['background-media'] = ''; } if ( ! empty( $theme_options[ $option_name ]['tablet']['background-image'] ) ) { $theme_options[ $option_name ]['tablet']['background-type'] = 'image'; $theme_options[ $option_name ]['tablet']['background-media'] = attachment_url_to_postid( $theme_options[ $option_name ]['tablet']['background-image'] ); } else { $theme_options[ $option_name ]['tablet']['background-type'] = ''; $theme_options[ $option_name ]['tablet']['background-media'] = ''; } if ( ! empty( $theme_options[ $option_name ]['mobile']['background-image'] ) ) { $theme_options[ $option_name ]['mobile']['background-type'] = 'image'; $theme_options[ $option_name ]['mobile']['background-media'] = attachment_url_to_postid( $theme_options[ $option_name ]['mobile']['background-image'] ); } else { $theme_options[ $option_name ]['mobile']['background-type'] = ''; $theme_options[ $option_name ]['mobile']['background-media'] = ''; } error_log( sprintf( 'Astra: Migrating Background Response Option - %s', $option_name ) ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log update_option( 'astra-settings', $theme_options ); } } } /** * Do not apply new Group, Column and Media & Text block CSS for existing users. * * @since 3.0.0 * * @return void */ function astra_gutenberg_core_blocks_design_compatibility() { $theme_options = get_option( 'astra-settings', array() ); if ( ! isset( $theme_options['guntenberg-core-blocks-comp-css'] ) ) { $theme_options['guntenberg-core-blocks-comp-css'] = false; update_option( 'astra-settings', $theme_options ); } } /** * Header Footer builder - Migration compatibility. * * @since 3.0.0 * * @return void */ function astra_header_builder_compatibility() { $theme_options = get_option( 'astra-settings', array() ); // Set flag to not load button specific CSS. if ( ! isset( $theme_options['is-header-footer-builder'] ) ) { $theme_options['is-header-footer-builder'] = false; update_option( 'astra-settings', $theme_options ); } if ( ! isset( $theme_options['header-footer-builder-notice'] ) ) { $theme_options['header-footer-builder-notice'] = false; update_option( 'astra-settings', $theme_options ); } } /** * Clears assets cache and regenerates new assets files. * * @since 3.0.1 * * @return void */ function astra_clear_assets_cache() { if ( is_callable( 'Astra_Minify::refresh_assets' ) ) { Astra_Minify::refresh_assets(); } } /** * Do not apply new Media & Text block padding CSS & not remove padding for #primary on mobile devices directly for existing users. * * @since 2.6.1 * * @return void */ function astra_gutenberg_media_text_block_css_compatibility() { $theme_options = get_option( 'astra-settings', array() ); if ( ! isset( $theme_options['guntenberg-media-text-block-padding-css'] ) ) { $theme_options['guntenberg-media-text-block-padding-css'] = false; update_option( 'astra-settings', $theme_options ); } } /** * Gutenberg pattern compatibility changes. * * @since 3.3.0 * * @return void */ function astra_gutenberg_pattern_compatibility() { $theme_options = get_option( 'astra-settings', array() ); if ( ! isset( $theme_options['guntenberg-button-pattern-compat-css'] ) ) { $theme_options['guntenberg-button-pattern-compat-css'] = false; update_option( 'astra-settings', $theme_options ); } } /** * Set flag to provide backward compatibility of float based CSS for existing users. * * @since 3.3.0 * @return void. */ function astra_check_flex_based_css() { $theme_options = get_option( 'astra-settings', array() ); if ( ! isset( $theme_options['is-flex-based-css'] ) ) { $theme_options['is-flex-based-css'] = false; update_option( 'astra-settings', $theme_options ); } } /** * Update the Cart Style, Icon color & Border radius if None style is selected. * * @since 3.4.0 * @return void. */ function astra_update_cart_style() { $theme_options = get_option( 'astra-settings', array() ); if ( isset( $theme_options['woo-header-cart-icon-style'] ) && 'none' === $theme_options['woo-header-cart-icon-style'] ) { $theme_options['woo-header-cart-icon-style'] = 'outline'; $theme_options['header-woo-cart-icon-color'] = ''; $theme_options['woo-header-cart-icon-color'] = ''; $theme_options['woo-header-cart-icon-radius'] = ''; } if ( isset( $theme_options['edd-header-cart-icon-style'] ) && 'none' === $theme_options['edd-header-cart-icon-style'] ) { $theme_options['edd-header-cart-icon-style'] = 'outline'; $theme_options['edd-header-cart-icon-color'] = ''; $theme_options['edd-header-cart-icon-radius'] = ''; } update_option( 'astra-settings', $theme_options ); } /** * Update existing 'Grid Column Layout' option in responsive way in Related Posts. * Till this update 3.5.0 we have 'Grid Column Layout' only for singular option, but now we are improving it as responsive. * * @since 3.5.0 * @return void. */ function astra_update_related_posts_grid_layout() { $theme_options = get_option( 'astra-settings', array() ); if ( ! isset( $theme_options['related-posts-grid-responsive'] ) && isset( $theme_options['related-posts-grid'] ) ) { /** * Managed here switch case to reduce further conditions in dynamic-css to get CSS value based on grid-template-columns. Because there are following CSS props used. * * '1' = grid-template-columns: 1fr; * '2' = grid-template-columns: repeat(2,1fr); * '3' = grid-template-columns: repeat(3,1fr); * '4' = grid-template-columns: repeat(4,1fr); * * And we already have Astra_Builder_Helper::$grid_size_mapping (used for footer layouts) for getting CSS values based on grid layouts. So migrating old value of grid here to new grid value. */ switch ( $theme_options['related-posts-grid'] ) { case '1': $grid_layout = 'full'; break; case '2': $grid_layout = '2-equal'; break; case '3': $grid_layout = '3-equal'; break; case '4': $grid_layout = '4-equal'; break; } $theme_options['related-posts-grid-responsive'] = array( 'desktop' => $grid_layout, 'tablet' => $grid_layout, 'mobile' => 'full', ); update_option( 'astra-settings', $theme_options ); } } /** * Migrate Site Title & Site Tagline options to new responsive array. * * @since 3.5.0 * * @return void */ function astra_site_title_tagline_responsive_control_migration() { $theme_options = get_option( 'astra-settings', array() ); if ( false === get_option( 'display-site-title-responsive', false ) && isset( $theme_options['display-site-title'] ) ) { $theme_options['display-site-title-responsive']['desktop'] = $theme_options['display-site-title']; $theme_options['display-site-title-responsive']['tablet'] = $theme_options['display-site-title']; $theme_options['display-site-title-responsive']['mobile'] = $theme_options['display-site-title']; } if ( false === get_option( 'display-site-tagline-responsive', false ) && isset( $theme_options['display-site-tagline'] ) ) { $theme_options['display-site-tagline-responsive']['desktop'] = $theme_options['display-site-tagline']; $theme_options['display-site-tagline-responsive']['tablet'] = $theme_options['display-site-tagline']; $theme_options['display-site-tagline-responsive']['mobile'] = $theme_options['display-site-tagline']; } update_option( 'astra-settings', $theme_options ); } /** * Do not apply new font-weight heading support CSS in editor/frontend directly. * * 1. Adding Font-weight support to widget titles. * 2. Customizer font CSS not supporting in editor. * * @since 3.6.0 * * @return void */ function astra_headings_font_support() { $theme_options = get_option( 'astra-settings', array() ); if ( ! isset( $theme_options['can-support-widget-and-editor-fonts'] ) ) { $theme_options['can-support-widget-and-editor-fonts'] = false; update_option( 'astra-settings', $theme_options ); } } /** * Set flag to avoid direct reflections on live site & to maintain backward compatibility for existing users. * * @since 3.6.0 * @return void. */ function astra_remove_logo_max_width() { $theme_options = get_option( 'astra-settings', array() ); if ( ! isset( $theme_options['can-remove-logo-max-width-css'] ) ) { $theme_options['can-remove-logo-max-width-css'] = false; update_option( 'astra-settings', $theme_options ); } } /** * Set flag to maintain backward compatibility for existing users for Transparent Header border bottom default value i.e from '' to 0. * * @since 3.6.0 * @return void. */ function astra_transparent_header_default_value() { $theme_options = get_option( 'astra-settings', array() ); if ( ! isset( $theme_options['transparent-header-default-border'] ) ) { $theme_options['transparent-header-default-border'] = false; update_option( 'astra-settings', $theme_options ); } } /** * Clear Astra + Astra Pro assets cache. * * @since 3.6.1 * @return void. */ function astra_clear_all_assets_cache() { if ( ! class_exists( 'Astra_Cache_Base' ) ) { return; } // Clear Astra theme asset cache. $astra_cache_base_instance = new Astra_Cache_Base( 'astra' ); $astra_cache_base_instance->refresh_assets( 'astra' ); // Clear Astra Addon's static and dynamic CSS asset cache. astra_clear_assets_cache(); $astra_addon_cache_base_instance = new Astra_Cache_Base( 'astra-addon' ); $astra_addon_cache_base_instance->refresh_assets( 'astra-addon' ); } /** * Set flag for updated default values for buttons & add GB Buttons padding support. * * @since 3.6.3 * @return void */ function astra_button_default_values_updated() { $theme_options = get_option( 'astra-settings', array() ); if ( ! isset( $theme_options['btn-default-padding-updated'] ) ) { $theme_options['btn-default-padding-updated'] = false; update_option( 'astra-settings', $theme_options ); } } /** * Set flag for old users, to not directly apply underline to content links. * * @since 3.6.4 * @return void */ function astra_update_underline_link_setting() { $theme_options = get_option( 'astra-settings', array() ); if ( ! isset( $theme_options['underline-content-links'] ) ) { $theme_options['underline-content-links'] = false; update_option( 'astra-settings', $theme_options ); } } /** * Add compatibility support for WP-5.8. as some of settings & blocks already their in WP-5.7 versions, that's why added backward here. * * @since 3.6.5 * @return void */ function astra_support_block_editor() { $theme_options = get_option( 'astra-settings' ); // Set flag on existing user's site to not reflect changes directly. if ( ! isset( $theme_options['support-block-editor'] ) ) { $theme_options['support-block-editor'] = false; update_option( 'astra-settings', $theme_options ); } } /** * Set flag to maintain backward compatibility for existing users. * Fixing the case where footer widget's right margin space not working. * * @since 3.6.7 * @return void */ function astra_fix_footer_widget_right_margin_case() { $theme_options = get_option( 'astra-settings', array() ); if ( ! isset( $theme_options['support-footer-widget-right-margin'] ) ) { $theme_options['support-footer-widget-right-margin'] = false; update_option( 'astra-settings', $theme_options ); } } /** * Set flag to avoid direct reflections on live site & to maintain backward compatibility for existing users. * * @since 3.6.7 * @return void */ function astra_remove_elementor_toc_margin() { $theme_options = get_option( 'astra-settings', array() ); if ( ! isset( $theme_options['remove-elementor-toc-margin-css'] ) ) { $theme_options['remove-elementor-toc-margin-css'] = false; update_option( 'astra-settings', $theme_options ); } } /** * Set flag to avoid direct reflections on live site & to maintain backward compatibility for existing users. * Use: Setting flag for removing widget specific design options when WordPress 5.8 & above activated on site. * * @since 3.6.8 * @return void */ function astra_set_removal_widget_design_options_flag() { $theme_options = get_option( 'astra-settings', array() ); if ( ! isset( $theme_options['remove-widget-design-options'] ) ) { $theme_options['remove-widget-design-options'] = false; update_option( 'astra-settings', $theme_options ); } } /** * Apply zero font size for new users. * * @since 3.6.9 * @return void */ function astra_zero_font_size_comp() { $theme_options = get_option( 'astra-settings', array() ); if ( ! isset( $theme_options['astra-zero-font-size-case-css'] ) ) { $theme_options['astra-zero-font-size-case-css'] = false; update_option( 'astra-settings', $theme_options ); } } /** Set flag to avoid direct reflections on live site & to maintain backward compatibility for existing users. * * @since 3.6.9 * @return void */ function astra_unset_builder_elements_underline() { $theme_options = get_option( 'astra-settings', array() ); if ( ! isset( $theme_options['unset-builder-elements-underline'] ) ) { $theme_options['unset-builder-elements-underline'] = false; update_option( 'astra-settings', $theme_options ); } } /** * Migrating Builder > Account > transparent resonsive menu color options to single color options. * Because we do not show menu on resonsive devices, whereas we trigger login link on responsive devices instead of showing menu. * * @since 3.6.9 * * @return void */ function astra_remove_responsive_account_menu_colors_support() { $theme_options = get_option( 'astra-settings', array() ); $account_menu_colors = array( 'transparent-account-menu-color', // Menu color. 'transparent-account-menu-bg-obj', // Menu background color. 'transparent-account-menu-h-color', // Menu hover color. 'transparent-account-menu-h-bg-color', // Menu background hover color. 'transparent-account-menu-a-color', // Menu active color. 'transparent-account-menu-a-bg-color', // Menu background active color. ); foreach ( $account_menu_colors as $color_option ) { if ( ! isset( $theme_options[ $color_option ] ) && isset( $theme_options[ $color_option . '-responsive' ]['desktop'] ) ) { $theme_options[ $color_option ] = $theme_options[ $color_option . '-responsive' ]['desktop']; } } update_option( 'astra-settings', $theme_options ); } /** * Link default color compatibility. * * @since 3.7.0 * @return void */ function astra_global_color_compatibility() { $theme_options = get_option( 'astra-settings', array() ); if ( ! isset( $theme_options['support-global-color-format'] ) ) { $theme_options['support-global-color-format'] = false; } // Set Footer copyright text color for existing users to #3a3a3a. if ( ! isset( $theme_options['footer-copyright-color'] ) ) { $theme_options['footer-copyright-color'] = '#3a3a3a'; } update_option( 'astra-settings', $theme_options ); } /** * Set flag to avoid direct reflections on live site & to maintain backward compatibility for existing users. * * @since 3.7.4 * @return void */ function astra_improve_gutenberg_editor_ui() { $theme_options = get_option( 'astra-settings', array() ); if ( ! isset( $theme_options['improve-gb-editor-ui'] ) ) { $theme_options['improve-gb-editor-ui'] = false; update_option( 'astra-settings', $theme_options ); } } /** * Set flag to avoid direct reflections on live site & to maintain backward compatibility for existing users. * * Starting supporting content-background color for Full Width Contained & Full Width Stretched layouts. * * @since 3.7.8 * @return void */ function astra_fullwidth_layouts_apply_content_background() { $theme_options = get_option( 'astra-settings', array() ); if ( ! isset( $theme_options['apply-content-background-fullwidth-layouts'] ) ) { $theme_options['apply-content-background-fullwidth-layouts'] = false; update_option( 'astra-settings', $theme_options ); } } /** * Sets the default breadcrumb separator selector value if the current user is an exsisting user * * @since 3.7.8 * @return void */ function astra_set_default_breadcrumb_separator_option() { $theme_options = get_option( 'astra-settings', array() ); if ( ! isset( $theme_options['breadcrumb-separator-selector'] ) ) { $theme_options['breadcrumb-separator-selector'] = 'unicode'; update_option( 'astra-settings', $theme_options ); } } /** * Set flag to avoid direct reflections on live site & to maintain backward compatibility for existing users. * * Backward flag purpose - To initiate modern & updated UI of block editor & frontend. * * @since 3.8.0 * @return void */ function astra_apply_modern_block_editor_ui() { $theme_options = get_option( 'astra-settings', array() ); if ( ! isset( $theme_options['wp-blocks-ui'] ) && ! version_compare( $theme_options['theme-auto-version'], '3.8.0', '==' ) ) { $theme_options['blocks-legacy-setup'] = true; $theme_options['wp-blocks-ui'] = 'legacy'; update_option( 'astra-settings', $theme_options ); } } /** * Set flag to avoid direct reflections on live site & to maintain backward compatibility for existing users. * * Backward flag purpose - To keep structure defaults updation by filter. * * @since 3.8.3 * @return void */ function astra_update_customizer_layout_defaults() { $theme_options = get_option( 'astra-settings', array() ); if ( ! isset( $theme_options['customizer-default-layout-update'] ) ) { $theme_options['customizer-default-layout-update'] = false; update_option( 'astra-settings', $theme_options ); } } /** * Set flag to avoid direct reflections on live site & to maintain backward compatibility for existing users. * * Backward flag purpose - To initiate maintain modern, updated v2 experience of block editor & frontend. * * @since 3.8.3 * @return void */ function astra_apply_modern_block_editor_v2_ui() { $theme_options = get_option( 'astra-settings', array() ); $option_updated = false; if ( ! isset( $theme_options['wp-blocks-v2-ui'] ) ) { $theme_options['wp-blocks-v2-ui'] = false; $option_updated = true; } if ( ! isset( $theme_options['wp-blocks-ui'] ) ) { $theme_options['wp-blocks-ui'] = 'custom'; $option_updated = true; } if ( $option_updated ) { update_option( 'astra-settings', $theme_options ); } } /** * Display Cart Total and Title compatibility. * * @since 3.9.0 * @return void */ function astra_display_cart_total_title_compatibility() { $theme_options = get_option( 'astra-settings', array() ); if ( ! isset( $theme_options['woo-header-cart-label-display'] ) ) { // Set the Display Cart Label toggle values with shortcodes. $cart_total_status = isset( $theme_options['woo-header-cart-total-display'] ) ? $theme_options['woo-header-cart-total-display'] : true; $cart_label_status = isset( $theme_options['woo-header-cart-title-display'] ) ? $theme_options['woo-header-cart-title-display'] : true; if ( $cart_total_status && $cart_label_status ) { $theme_options['woo-header-cart-label-display'] = __( 'Cart', 'astra' ) . '/{cart_total_currency_symbol}'; } elseif ( $cart_total_status ) { $theme_options['woo-header-cart-label-display'] = '{cart_total_currency_symbol}'; } elseif ( $cart_label_status ) { $theme_options['woo-header-cart-label-display'] = __( 'Cart', 'astra' ); } update_option( 'astra-settings', $theme_options ); } } /** * If old user then it keeps then default cart icon. * * @since 3.9.0 * @return void */ function astra_update_woocommerce_cart_icons() { $theme_options = get_option( 'astra-settings', array() ); if ( ! isset( $theme_options['astra-woocommerce-cart-icons-flag'] ) ) { $theme_options['astra-woocommerce-cart-icons-flag'] = false; } } /** * Set brder color to blank for old users for new users 'default' will take over. * * @since 3.9.0 * @return void */ function astra_legacy_customizer_maintenance() { $theme_options = get_option( 'astra-settings', array() ); if ( ! isset( $theme_options['border-color'] ) ) { $theme_options['border-color'] = '#dddddd'; update_option( 'astra-settings', $theme_options ); } } /** * Enable single product breadcrumb to maintain backward compatibility for existing users. * * @since 3.9.0 * @return void */ function astra_update_single_product_breadcrumb() { $theme_options = get_option( 'astra-settings', array() ); if ( isset( $theme_options['single-product-breadcrumb-disable'] ) ) { $theme_options['single-product-breadcrumb-disable'] = ( true === $theme_options['single-product-breadcrumb-disable'] ) ? false : true; } else { $theme_options['single-product-breadcrumb-disable'] = true; } update_option( 'astra-settings', $theme_options ); } /** * Restrict direct changes on users end so make it filterable. * * @since 3.9.0 * @return void */ function astra_apply_modern_ecommerce_setup() { $theme_options = get_option( 'astra-settings', array() ); if ( ! isset( $theme_options['modern-ecommerce-setup'] ) ) { $theme_options['modern-ecommerce-setup'] = false; update_option( 'astra-settings', $theme_options ); } } /** * Migrate old user data to new responsive format layout for shop's summary box content alignment. * * @since 3.9.0 * @return void */ function astra_responsive_shop_content_alignment() { $theme_options = get_option( 'astra-settings', array() ); if ( ! isset( $theme_options['shop-product-align-responsive'] ) && isset( $theme_options['shop-product-align'] ) ) { $theme_options['shop-product-align-responsive'] = array( 'desktop' => $theme_options['shop-product-align'], 'tablet' => $theme_options['shop-product-align'], 'mobile' => $theme_options['shop-product-align'], ); update_option( 'astra-settings', $theme_options ); } } /** * Change default layout to standard for old users. * * @since 3.9.2 * @return void */ function astra_shop_style_design_layout() { $theme_options = get_option( 'astra-settings', array() ); if ( ! isset( $theme_options['woo-shop-style-flag'] ) ) { $theme_options['woo-shop-style-flag'] = true; update_option( 'astra-settings', $theme_options ); } } /** * Apply css for show password icon on woocommerce account page. * * @since 3.9.2 * @return void */ function astra_apply_woocommerce_show_password_icon_css() { $theme_options = get_option( 'astra-settings', array() ); if ( ! isset( $theme_options['woo-show-password-icon'] ) ) { $theme_options['woo-show-password-icon'] = false; update_option( 'astra-settings', $theme_options ); } } /** * Handle backward compatibility on version 3.9.4 * * @since 3.9.4 * @return void */ function astra_theme_background_updater_3_9_4() { $theme_options = get_option( 'astra-settings', array() ); // Check if user is a old global sidebar user. if ( ! isset( $theme_options['astra-old-global-sidebar-default'] ) ) { $theme_options['astra-old-global-sidebar-default'] = false; update_option( 'astra-settings', $theme_options ); } // Slide in cart width responsive control backwards compatibility. if ( isset( $theme_options['woo-desktop-cart-flyout-width'] ) && ! isset( $theme_options['woo-slide-in-cart-width'] ) ) { $theme_options['woo-slide-in-cart-width'] = array( 'desktop' => $theme_options['woo-desktop-cart-flyout-width'], 'tablet' => '', 'mobile' => '', 'desktop-unit' => 'px', 'tablet-unit' => 'px', 'mobile-unit' => 'px', ); update_option( 'astra-settings', $theme_options ); } // Astra Spectra Gutenberg Compatibility CSS. if ( ! isset( $theme_options['spectra-gutenberg-compat-css'] ) ) { $theme_options['spectra-gutenberg-compat-css'] = false; update_option( 'astra-settings', $theme_options ); } } Cash out parziale Riverspin come funziona sulle multiple a cinque eventi - IAD - Interior Art Design

IAD – Interior Art Design

Cash out parziale Riverspin come funziona sulle multiple a cinque eventi

Il cash out parziale è una delle funzionalità più discusse tra gli scommettitori italiani, e su Riverspin — https://riverspin.it.com/ — assume contorni particolari quando applicato a una multipla da cinque eventi. In questo articolo analizzeremo nel dettaglio il meccanismo, i tempi di attivazione, i calcoli proporzionali e le strategie emerse dai feedback raccolti su forum e interviste dirette. Scopriremo come incassare una parte della vincita potenziale senza chiudere l’intero biglietto, mantenendo viva la quota residua su un numero ridotto di selezioni. Un viaggio tra numeri, esperienze reali e consigli pratici per sfruttare al meglio questa opzione.

Come si attiva il cash out parziale su Riverspin e quali requisiti tecnici servono

La prima cosa che ho notato utilizzando Riverspin è che il cash out parziale non è disponibile su tutti i biglietti in modo automatico. Sulla multipla a cinque eventi, la funzione appare solo quando almeno due selezioni sono già state vinte e le altre tre sono in corso o non ancora iniziate. Il sistema valuta in tempo reale la probabilità di successo residua e propone un importo che rappresenta una frazione della vincita potenziale totale. Per attivarlo, bisogna entrare nella sezione “Le mie scommesse” e cliccare sull’icona dedicata, che mostra un cursore per scegliere la percentuale da incassare.

Dal punto di vista tecnico, ho verificato che il requisito fondamentale è che il biglietto sia stato piazzato con una quota minima di 1.50 per ogni selezione. Inoltre, il cash out parziale non è disponibile per le scommesse sistematiche o per quelle costruite con il sistema “Patent”. Un altro aspetto che mi ha colpito è che la funzione si attiva solo se l’importo proposto supera una soglia minima di 0,50 euro, altrimenti il sistema la disabilita. Questo significa che su quote molto basse, il valore residuo potrebbe non essere sufficiente per giustificare l’operazione.

Durante un’intervista con un utente che frequenta assiduamente la piattaforma, è emerso un dettaglio interessante: “Ho scoperto che il cash out parziale su Riverspin funziona meglio quando lo attivo durante l’intervallo di una partita di calcio, perché le quote live fluttuano e il valore proposto aumenta temporaneamente. Una volta ho incassato il 40% di una multipla da cinque eventi con tre partite già chiuse, e poi ho lasciato correre il resto su due selezioni che erano ancora in parità. Alla fine ho vinto anche la parte residua, ma il bello è che avevo già messo in tasca una buona somma.” Questa esperienza dimostra come il tempismo sia cruciale per ottenere un buon rapporto tra sicurezza e rendimento.

Il calcolo proporzionale su cinque eventi: quote, stake e valore residuo spiegati passo passo

Per capire come funziona il calcolo, ho analizzato un esempio concreto. Supponiamo di avere una multipla da cinque eventi con una puntata totale di 10 euro e quote rispettive di 1.80, 2.10, 1.60, 2.50 e 1.90. La quota complessiva è il prodotto di tutte le quote, che in questo caso risulta essere circa 28.7, quindi la vincita potenziale è di 287 euro. Se dopo tre eventi vinti, il sistema calcola che la probabilità di vincere anche i restanti due è del 55%, il valore del cash out totale sarà di circa 158 euro. Il cash out parziale ti permette di incassare, ad esempio, il 30% di quella cifra, cioè 47,40 euro, mentre il restante 70% rimane attivo sul biglietto.

La cosa che ho trovato più complessa è capire come Riverspin ricalcola la quota residua dopo il prelievo parziale. In pratica, il sistema riduce lo stake originale proporzionalmente all’importo incassato. Se incassi il 30% del valore, lo stake residuo diventa 7 euro e la vincita potenziale scende a 200,90 euro. Questo significa che non stai “tagliando” una selezione, ma stai riducendo l’esposizione complessiva del biglietto. È un meccanismo diverso dal cash out parziale che si vede su altre piattaforme, dove spesso si sceglie di eliminare un singolo evento.

Un altro aspetto che ho verificato tramite i calcoli è che il valore del cash out parziale non è lineare. Ad esempio, se aspetti che anche il quarto evento si concluda, il valore proposto aumenta in modo esponenziale, perché la probabilità residua sale. Ho raccolto la testimonianza di un giocatore che ha spiegato: “Io uso sempre il cash out parziale quando ho quattro eventi su cinque già vinti. Prendo il 50% e lascio il resto sull’ultimo evento. Anche se perdo, ho già coperto la puntata iniziale e guadagnato qualcosa. Se vinco, il profitto è più alto di quanto avrei ottenuto con un cash out totale. È un equilibrio che ho imparato a gestire con il tempo.” Questo approccio mostra come il calcolo proporzionale possa essere sfruttato strategicamente.

Vantaggi concreti per il giocatore italiano: flessibilità e controllo del rischio nelle scommesse multiple

Per chi scommette abitualmente in Italia, la possibilità di incassare parzialmente una multipla da cinque eventi rappresenta un cambio di paradigma rispetto al passato. Prima, si doveva scegliere tra tenere tutto o chiudere tutto, con il rischio di perdere una vincita quasi certa o di buttare via un biglietto vincente. Con il cash out parziale su Riverspin, invece, si può gestire il rischio in modo granulare, riducendo l’esposizione man mano che gli eventi si concludono. Questo è particolarmente utile per chi segue campionati come Serie A, Serie B o la Champions League, dove le sorprese sono all’ordine del giorno.

Un altro vantaggio che ho riscontrato è la possibilità di reinvestire immediatamente la somma incassata in altre scommesse live. Diversi utenti intervistati hanno sottolineato come questa funzione permetta di “liberare” capitale senza dover aspettare la conclusione dell’intero biglietto. Ad esempio, un giocatore ha raccontato: “Avevo una multipla da cinque eventi su partite di basket e calcio. Dopo tre vittorie, ho incassato il 40% e ho usato quei soldi per piazzare una scommessa su un altro evento che seguivo dal vivo. Alla fine ho vinto sia la parte residua sia la nuova giocata. È come avere due scommesse con lo stesso budget iniziale.” Questo dimostra come la flessibilità possa tradursi in maggiori opportunità.

Infine, dal punto di vista del controllo del rischio, il cash out parziale aiuta a limitare le perdite in caso di colpo di scena. Su una multipla a cinque eventi, l’ultima partita può riservare sorprese come un gol al 90° minuto o un’espulsione che cambia le sorti. Incassare una parte della vincita potenziale prima dell’evento finale riduce l’impatto emotivo e finanziario di una sconfitta. Ho notato che molti scommettitori esperti utilizzano questa funzione come una sorta di “assicurazione” sul biglietto, soprattutto quando la quota complessiva è alta e il valore potenziale supera di gran lunga la puntata iniziale.

Testimonianze dirette: come i giocatori usano il cash out parziale sulle multiple da cinque

Ho raccolto diverse esperienze da giocatori che utilizzano Riverspin quotidianamente, e le loro storie offrono spunti interessanti. Marco, 34 anni, di Milano, mi ha detto: “Sono un appassionato di tennis e calcio. Sulle multiple da cinque eventi, uso il cash out parziale solo quando ho almeno tre vittorie certe. Di solito incasso il 30% e lascio il resto. Ho notato che Riverspin propone valori migliori rispetto ad altri siti, soprattutto quando manca un solo evento. Una volta ho incassato 120 euro su una multipla da 20 euro, e poi il quinto evento è stato annullato per maltempo. Il sistema mi ha restituito anche lo stake residuo, quindi ho guadagnato due volte.”

Un’altra testimonianza arriva da Giulia, 27 anni, di Roma, che preferisce un approccio più prudente: “Non incasso mai più del 25% del valore totale, perché voglio mantenere alta la quota residua. Ho imparato che se prendi troppo, il biglietto diventa poco interessante e non vale la pena tenerlo. Preferisco incassare una piccola parte e poi, se l’ultimo evento è favorevole, il profitto è ancora significativo. Ho avuto una volta una multipla da cinque eventi con quota 45, e incassando il 20% ho ottenuto 80 euro, ma poi il quinto evento ha vinto e ho preso altri 250 euro. È stata una delle mie migliori giocate.”

Non mancano opinioni più critiche, come quella di Luca, 41 anni, di Napoli: “Il cash out parziale su Riverspin funziona, ma bisogna stare attenti ai tempi. Se lo attivi troppo presto, il valore proposto è basso e non conviene. Io aspetto sempre che almeno due eventi siano vinti e che il terzo sia in vantaggio. Inoltre, ho notato che durante i momenti di alta volatilità, come un rigore o un cartellino rosso, il valore può scendere rapidamente. Una volta ho aspettato troppo e il valore è crollato da 90 a 60 euro in pochi minuti. Da allora, ho imparato a monitorare le partite in diretta e a decidere rapidamente.”

Errori comuni da evitare e strategie avanzate per massimizzare il rendimento parziale

Uno degli errori più frequenti che ho osservato tra i giocatori è quello di attivare il cash out parziale troppo presto, subito dopo la prima vittoria. In questa fase, il valore proposto è ancora basso perché la probabilità residua è alta. Ad esempio, su una multipla da cinque eventi con quota totale 20, dopo il primo evento vinto il cash out parziale potrebbe essere solo di 3-4 euro su una puntata di 10 euro. Incassare in quel momento significa rinunciare a gran parte del valore potenziale. La strategia migliore è aspettare almeno tre eventi vinti, quando il rapporto tra sicurezza e rendimento diventa più favorevole.

Un altro errore comune è non considerare l’effetto delle quote live sul valore del cash out. Su Riverspin, il sistema aggiorna il valore in tempo reale in base all’andamento degli eventi. Se una delle partite rimanenti è in svantaggio, il valore scende drasticamente. Ho visto giocatori che hanno perso l’occasione di incassare un buon importo perché aspettavano un momento migliore che non è mai arrivato. La strategia avanzata consiste nel monitorare le partite con un secondo dispositivo e decidere di incassare quando il momentum è a favore, ad esempio dopo un gol o un punto importante nel tennis.

Infine, una strategia che ho trovato particolarmente efficace è quella di combinare il cash out parziale con il cash out totale in momenti diversi. Ad esempio, un giocatore potrebbe incassare il 40% dopo quattro eventi vinti, e poi, se l’ultimo evento si mette male, utilizzare il cash out totale sulla parte residua. Questo approccio a due fasi permette di massimizzare il profitto in caso di vittoria e di limitare le perdite in caso di sconfitta. Un utente esperto ha confermato: “Io faccio sempre così: prendo una prima tranche quando sono fiducioso, e poi lascio il resto con un occhio alla partita finale. Se vedo che l’ultimo evento sta andando male, chiudo tutto con il cash out totale. Non ho mai perso più di quanto avevo già incassato.”

Confronto con il cash out totale: quando conviene scegliere l’opzione parziale su Riverspin

La differenza principale tra cash out totale e parziale è evidente nella gestione del rischio. Il cash out totale chiude completamente la scommessa, garantendo un importo fisso ma rinunciando a qualsiasi vincita futura. Il cash out parziale, invece, permette di incassare una parte e mantenere viva la possibilità di vincere il resto. Su una multipla da cinque eventi, questa distinzione è cruciale perché il valore potenziale è spesso molto alto. Se la quota totale è, ad esempio, 30 e la puntata è di 10 euro, il cash out totale potrebbe essere di 150 euro, mentre il parziale al 50% ti darebbe 75 euro subito e lascerebbe attivi altri 75 euro potenziali.

In termini di convenienza, il cash out parziale è più vantaggioso quando si ha una forte fiducia nelle selezioni rimanenti. Se hai quattro eventi vinti e l’ultimo è una partita di calcio con una squadra nettamente favorita, incassare solo una piccola parte potrebbe essere controproducente. In quel caso, il cash out totale potrebbe garantire un importo vicino alla vincita massima, evitando il rischio di una sorpresa. Tuttavia, se l’ultimo evento è incerto, come una partita di basket con un margine di pochi punti, il parziale offre un compromesso ideale: incassi una buona somma e tieni aperta la possibilità di un guadagno maggiore.

Ho notato che molti giocatori italiani preferiscono il cash out parziale per ragioni psicologiche oltre che economiche. Incassare una parte della vincita dà una sensazione di controllo e riduce l’ansia legata all’attesa. Un intervistato ha spiegato: “Il cash out totale mi lascia sempre il rimpianto di non aver aspettato. Con il parziale, invece, non ho mai questo problema, perché so che ho già messo al sicuro una parte. Anche se perdo il resto, non posso dire di aver buttato via tutto. È un modo per godersi la scommessa senza stress.” Questo aspetto emotivo è spesso sottovalutato, ma gioca un ruolo importante nelle decisioni di gioco.

Tipo di cash out Vantaggi Svantaggi Ideale per
Totale Risultato immediato, zero rischio residuo Rinuncia a vincite future potenziali Giocatori prudenti o ultimo evento incerto
Parziale Mantiene viva la scommessa, incasso immediato Richiede monitoraggio, valore residuo variabile Giocatori che vogliono bilanciare rischio e rendimento

Prospettive future e aggiornamenti della piattaforma: cosa aspettarsi dal cash out sulle multiple

Il settore delle scommesse online in Italia è in continua evoluzione, e Riverspin sta investendo molto per migliorare l’esperienza del cash out parziale. Dalle informazioni raccolte, sembra che la piattaforma stia lavorando a un sistema di notifiche push che avviserà i giocatori quando il valore del cash out raggiunge un picco. Questo sarebbe particolarmente utile per le multiple da cinque eventi, dove i momenti di massimo valore sono spesso brevi e imprevedibili. Inoltre, si parla di un’integrazione con i dati statistici in tempo reale, che permetterebbe di visualizzare la probabilità di successo residua in modo più trasparente.

Un’altra novità che potrebbe arrivare è la possibilità di personalizzare la percentuale di cash out parziale in modo più granulare, con incrementi dell’1% invece del 5% attuale. Questo darebbe ai giocatori un controllo ancora maggiore sulla gestione del rischio. Ho anche sentito voci su una funzione di “cash out parziale automatico”, che permetterebbe di impostare una soglia di valore al raggiungimento della quale il sistema incassa automaticamente una percentuale predefinita. Se questa funzione venisse implementata, sarebbe un punto di svolta per chi non ha il tempo di monitorare costantemente le partite.

Infine, dal punto di vista normativo, è importante ricordare che in Italia le scommesse online sono regolamentate dall’ADM, e Riverspin opera nel pieno rispetto delle leggi vigenti. Il cash out parziale è una funzionalità legale e trasparente, ma è fondamentale che i giocatori la utilizzino in modo responsabile. Il gioco d’azzardo può creare dipendenza, e per questo è sempre consigliato di impostare limiti di spesa e di utilizzare strumenti di autoesclusione se necessario. Per supporto, è disponibile il Numero Verde Nazionale GAP al 800 558 822, un servizio gratuito e anonimo per chi ha bisogno di aiuto. La speranza è che Riverspin continui a innovare, ma sempre con un occhio di riguardo alla protezione dei giocatori.

Leave a Comment

Your email address will not be published. Required fields are marked *