$value ) { // Check to see if the current option has a value. If so, process it. if( isset( $input[$key] ) ) { // Sanitize phone number if ( $key == 'phone_number' ) { preg_replace('/[^0-9]/', '', $input[$key]); if ( !preg_match("/^\d+$/", $input[$key]) ) { add_settings_error( 'awb_phone_number_invalid', esc_attr('settings_updated'), __('The value you entered in the phone number field is invalid. Please enter a valid number.', 'add-whatsapp-button') ); add_action( 'admin_notices', 'print_errors' ); $input[$key] = ''; } } // Strip all HTML and PHP tags and properly handle quoted strings $output[$key] = strip_tags( stripslashes( $input[ $key ] ) ); } // end if } // end foreach // Return the array processing any additional functions filtered by this action return apply_filters( 'awb_validate_inputs', $output, $input ); } function awb_validate_limiting_hours( $hour ) { if ( is_numeric($hour) && $hour >= 0 && $hour <= 24 ) { return $hour; } else { return ''; } } // Create options page content function awb_options_content() { // Init Options Global global $awb_options; // Set default button style for Settings Page Preview $button_style = !empty( $awb_options['button_type'] ) ? $awb_options['button_type'] : 'wab-side-rectangle'; // Create default button text $button_text = !empty( $awb_options['button_text'] ) ? sanitize_text_field( $awb_options['button_text'] ) : __('Message Us on WhatsApp', 'add-whatsapp-button'); // Hide Text if selected button style is "Icon" $displayNoneIfIcon = ( $awb_options['button_type'] == 'wab-icon-plain' || $awb_options['button_type'] == 'wab-icon-styled' ) ? 'class="awb-displaynone"' : ''; ob_start(); ?>


>

>

>

/> Full Remove

/> Hide with toggle button


>

>