'string', 'sanitize_callback' => function ( $value ) { return 'yes' === $value ? 'yes' : 'no'; }, 'default' => 'no', ] ); register_setting( 'atomora_settings_group', Loader::OPTION_HIDE_ELEMENTOR_ADS, [ 'type' => 'string', 'sanitize_callback' => function ( $value ) { return 'yes' === $value ? 'yes' : 'no'; }, 'default' => 'no', ] ); register_setting( 'atomora_settings_group', Loader::OPTION_DESIGN_SYSTEM_TOOLS, [ 'type' => 'string', 'sanitize_callback' => function ( $value ) { return 'yes' === $value ? 'yes' : 'no'; }, 'default' => 'no', ] ); register_setting( 'atomora_settings_group', Loader::OPTION_DESIGN_SYSTEM_ROW_NUMBERS, [ 'type' => 'string', 'sanitize_callback' => function ( $value ) { return 'yes' === $value ? 'yes' : 'no'; }, 'default' => 'no', ] ); register_setting( 'atomora_settings_group', Loader::OPTION_DESIGN_SYSTEM_BULK_ACTIONS, [ 'type' => 'string', 'sanitize_callback' => function ( $value ) { return 'yes' === $value ? 'yes' : 'no'; }, 'default' => 'no', ] ); // Editor UX enhancements — all default to "on" since they're // purely editor-side conveniences with individual off-switches. foreach ( [ Loader::OPTION_FULL_CLASS_NAMES, Loader::OPTION_CLASS_HIGHLIGHTER, Loader::OPTION_TAB_NAVIGATOR, ] as $option ) { register_setting( 'atomora_settings_group', $option, [ 'type' => 'string', 'sanitize_callback' => function ( $value ) { return 'yes' === $value ? 'yes' : 'no'; }, 'default' => 'yes', ] ); } } public function render_page() { if ( ! current_user_can( 'manage_options' ) ) { return; } $delete_data = get_option( Loader::OPTION_DELETE_DATA, 'no' ); $hide_ads = get_option( Loader::OPTION_HIDE_ELEMENTOR_ADS, 'no' ); $full_class_names = get_option( Loader::OPTION_FULL_CLASS_NAMES, 'yes' ); $class_highlighter = get_option( Loader::OPTION_CLASS_HIGHLIGHTER, 'yes' ); $tab_navigator = get_option( Loader::OPTION_TAB_NAVIGATOR, 'yes' ); $design_sys_tools = get_option( Loader::OPTION_DESIGN_SYSTEM_TOOLS, 'no' ); $design_sys_nums = get_option( Loader::OPTION_DESIGN_SYSTEM_ROW_NUMBERS, 'no' ); $design_sys_bulk = get_option( Loader::OPTION_DESIGN_SYSTEM_BULK_ACTIONS, 'no' ); ?>