From a02fbd10638e6573c4299bc4b94cf675e78f64d5 Mon Sep 17 00:00:00 2001 From: castellon Date: Fri, 16 Jan 2026 09:13:30 +0100 Subject: [PATCH 1/2] Language recommendation banner --- assets/admin/icons/language-banner.svg | 5 +++++ includes/Admin/Settings.php | 27 ++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 assets/admin/icons/language-banner.svg diff --git a/assets/admin/icons/language-banner.svg b/assets/admin/icons/language-banner.svg new file mode 100644 index 0000000..c36ac34 --- /dev/null +++ b/assets/admin/icons/language-banner.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/includes/Admin/Settings.php b/includes/Admin/Settings.php index e52f0a5..56423e5 100644 --- a/includes/Admin/Settings.php +++ b/includes/Admin/Settings.php @@ -138,6 +138,13 @@ class Settings { */ private $option_enable_fullpage_scroll = 'enable_fullpage_scroll'; + /** + * Option key for language banner feature (PRO). + * + * @var string + */ + private $option_enable_language_banner = 'enable_language_banner'; + /** * Page slug. * @@ -551,6 +558,14 @@ public function register_settings() { 'frontblocks_section_woocommerce_features' ); + add_settings_field( + $this->option_enable_language_banner, + __( 'Enable Language Banner', 'frontblocks' ), + array( $this, 'field_enable_language_banner' ), + $this->page_slug, + 'frontblocks_section_woocommerce_features' + ); + // Custom Post Types section (PRO). if ( frbl_is_pro_active() ) { add_settings_section( @@ -909,6 +924,7 @@ private function render_settings_field( $field ) { $this->option_deactivate_product_tabs, $this->option_horizontal_product_form, $this->option_enable_fullpage_scroll, + $this->option_enable_language_banner, ), true ); @@ -966,6 +982,7 @@ private function get_feature_icon( $field_id ) { $this->option_deactivate_product_tabs => 'deactivate-tabs', $this->option_horizontal_product_form => 'horizontal-form', $this->option_enable_fullpage_scroll => 'fullpage-scroll', + $this->option_enable_language_banner => 'language-banner', ); $icon_name = $icon_map[ $field_id ] ?? 'default'; @@ -1248,6 +1265,15 @@ public function field_enable_fullpage_scroll() { $this->render_pro_toggle( $this->option_enable_fullpage_scroll ); } + /** + * Render Enable Language Banner field. + * + * @return void + */ + public function field_enable_language_banner() { + $this->render_pro_toggle( $this->option_enable_language_banner ); + } + /** * Custom Post Types section callback. * @@ -1485,6 +1511,7 @@ public function sanitize_settings( $value ) { $this->option_horizontal_product_form, $this->option_enable_custom_post_types, $this->option_enable_fullpage_scroll, + $this->option_enable_language_banner, ); // Initialize all boolean options to false (unchecked checkboxes are not submitted). From 881c4409a1355598b9fcb2c001554970105e4ba7 Mon Sep 17 00:00:00 2001 From: davidperezgar Date: Fri, 16 Jan 2026 11:24:42 +0100 Subject: [PATCH 2/2] version --- frontblocks.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontblocks.php b/frontblocks.php index 64e0953..fe0f1fb 100644 --- a/frontblocks.php +++ b/frontblocks.php @@ -3,7 +3,7 @@ * Plugin Name: FrontBlocks for GeneratePress * Plugin URI: https://wordpress.org/plugins/frontblocks/ * Description: Blocks and helpers that extends GeneratePress blocks. - * Version: 1.3.1 + * Version: 1.4.0-beta.1 * Author: Closemarketing * Author URI: https://close.marketing * Text Domain: frontblocks @@ -26,7 +26,7 @@ defined( 'ABSPATH' ) || die( 'No script kiddies please!' ); -define( 'FRBL_VERSION', '1.3.1' ); +define( 'FRBL_VERSION', '1.4.0-beta.1' ); define( 'FRBL_PLUGIN', __FILE__ ); define( 'FRBL_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); define( 'FRBL_PLUGIN_PATH', plugin_dir_path( __FILE__ ) );