It’s because you have typos in your code :
in the function called header_logo_validate()
it should be :
return $new_input;
EDIT:
add_action( 'admin_menu', 'ec1_admin', 10, 0 );
args are useless just write add_action( 'admin_menu', 'ec1_admin');
EDIT 2 :
This is not a correct way to add several fields. You should put this into arrays or in one callback.
Maybe you need to globalize $settings (write global $settings;
) to make esc_url()
work in this context, see this answer
Related Posts:
- Settings API – sanitizing urls, email addresses and text
- Validate an option array
- Persist fields with Setting API
- Settings API – sanitize_callback is not called and it leads to an incorrect behavior
- Storing HTML in wp_options
- WordPress Settings API – Sanitize Integer
- Preserve old values on error in setting API
- How to prevent options.php deleting valid existing data from the database
- Seeking clarity on data sanitization fields for settings textarea
- Prevent invalid or empty values from being saved to the database and retain the form field values upon error
- How to handle complex data with Settings API
- Verify Submitted Form Values and Show Warning Messages with Setting API
- settings api and the data passed in the parameter
- How to save Checkbox-Options in Plugin Options Page
- Do I need to validate the nonce when using the settings api?
- How to sanitize settings API value
- Settings API vs Theme Customizer
- In Which Contexts are Plugins Responsible for Data Validation/Sanitization?
- Run function AFTER theme options are saved?
- Sanitize and data validation with apply_filters() function
- How should one implement add_settings_error on custom menu pages?
- How to properly validate data from $_GET or $_REQUEST using WordPress functions?
- is_email() VS sanitize_email()
- Add your own settings page for plugin
- Adding an html editor to plugin settings page
- add static page to reading settings for custom post type
- How to display an admin notice after updating plugin settings?
- Add settings fields on options discussion admin page
- Shortcode putting html such as
- Default WordPress settings API data sanitization
- How do I sanitize a javascript text?
- Dynamic settings fields with Settings API
- Settings API repeater fields
- do_settings_sections() doesn’t escape quotes
- Import / Export Settings API fields values?
- Saving multiple checkboxes with WordPress settings api
- Letting user dynamically create fields using Settings API
- wordpress settings api add fields
- Adding labels to Setting titles with API
- register_setting sanitize callback $input is null
- Can I dynamically create duplicate fields with the Settings API?
- Stop the form of beign submitted on “Save changes” custom option page
- What exactly is the purpose of settings_fields()?
- wordpress settings API and option array structure
- Echo all API Settings sections?
- Settings Page won’t save
- How do I save custom options on the options page ‘Reading’?
- Settings API – generating field value based on a different field?
- How to validate register settings array
- Submit options page input values with decimals
- Data Validation: Always escape late / escape HTML Code
- Multiple register settings, with same option name – issue
- Using multiple settings_fields() on 1 settings page
- Settings API store serialized data in the database (The Right Way)
- Output ‘do_settings_sections()’ as tabs, not one under the other
- vs WordPress Security
- Saving plugin’s settings in 1 field in json format
- PHP Notice: Undefined offset: 0 in /wordpress/wp-includes/plugin.php and Register Settings API change
- Who is responsible for data sanitization in WordPress development?
- Hide output of add_settings_field()
- How to make new plugin setting checkbox default as checked
- How to wrap html around Settings API add_settings_section()
- What is the best way to save and retrieve Multiple rows of data with the Settings API?
- Best Practice for Validating and Sanitizing Data
- Multiple fields with add_settings_field callback
- Settings API: Two update notices after saving settings?
- Settings API in Section
- Storage of array in settings
- Settings API and dynamically generated submenu pages
- What is the proper way to validate and sanitize JSON response from REST API?
- Error: options page not found when I try to save the changes made in my settings page
- Display Each Setting Section In Each Specific Tab within Same Page || Settings API
- WordPress API Setting : the title of the section rendered not showing
- add_settings_section() order
- Splitting do_settings_sections within HTML?
- Why are these settings unregistered?
- Settings field is not showing up in the general options page
- How to use/retrieve an options array, with defaults, using get_option()
- Displaying errors with settings api
- Data sanitization for user registration and user login
- Displaying validation message in options-general.php
- How I can Make two input field at add_settings_section
- Settings Page – Option won’t save in database
- Customize format of settings
- Unable to sanitize in customizer and escape in theme without removing ability for user to use “< br >” to insert a line break
- Show the submitted values in the form when validation fails
- Getting error to display radio button value in General Settings page
- What data sanitzation function should be used to store entire source code of webpage?
- How to create a WordPress options page
- Settings API – getting hidden input / submit button’s name
- Settings API validation callback
- When should I use register_setting() and add_settings_field()
- Why the WP Core team does not allow filter_* functions? [closed]
- Flush rewrite rules on option update with Settings API
- Why aren’t these WordPress options being saved to the database correctly?
- confused about sanitize_email after is_email [duplicate]
- input on custom settings page adds http://
- Output Sanitation
- Is it possible to get a list of options for a specific options group?
- register_setting & add_settings_error validation issues with multiple fields