$value ) { if ( ! isset( $previous_options[ $key ] ) ) { $previous_options[ $key ] = $value; } } } else { $previous_options = Helper::default_dynamic_block_option(); } // update the options. update_option( 'srfm_default_dynamic_block_option', $previous_options ); } /** * Clear Elementor's cached per-page asset list so pages built before the Payment * History widget declared its stylesheet dependency pick up the new head-loaded CSS. * * Elementor only recomputes `_elementor_page_assets` on document save, so without * this a page built with the widget in 2.12.2 keeps loading the CSS at render time * (footer → FOUC) after the update until it is re-saved in the editor. Dropping the * meta forces Elementor to regenerate it (including this dependency) on next render. * * @since 2.12.3 * @return void */ public static function clear_elementor_page_assets_cache() { // Deliberately NOT gated on class_exists( '\Elementor\Plugin' ). Updater::init() // writes the version marker unconditionally, so this callback runs exactly once — // and if Elementor happens not to be loaded in that particular request, the cache // would never be cleared and every pre-existing Elementor page would keep // footer-loading the CSS forever. delete_post_meta_by_key() is a harmless no-op on // sites that never used Elementor, so the guard bought nothing. delete_post_meta_by_key( '_elementor_page_assets' ); } }