The $input
variable is not passed to the validate function by default. You need to declare it, e.g. not this:
function mytheme_validate_settings() {}
But rather, this:
function mytheme_validate_settings( $input ) {}
(Or maybe I’m the only one who’s made that bone-headed mistake before?) 🙂
EDIT:
The other thing to check: does the $optiongroup
in register_setting()
match the argument passed to settings_fields()
in your form markup?
Related Posts:
- Get the blog page URL set in Options
- How to store widget fields data as an array?
- Using classes instead of global functions in functions.php
- What is the difference between wp_register_sidebar_widget and register_widget?
- How To Add New Option Types To Option Tree?
- Change admin bar to default:off
- Create “File-less” Page Template in Functions.php
- Modular theme settings
- How does WordPress decide what template to use as frontpage
- get_option function
- When to use esc_url, esc_html, esc_attr, and friends?
- How to edit bbPress template files – WordPress + BuddyPress + bbPress? [closed]
- Get category slug and display it on a query_post
- Override Current Theme Setting in wp_config.php
- How to change post thumbnail title and alt attributes to post title?
- Multiple Custom_Background, is it possible?
- Override default cropping in WordPress [duplicate]
- Get password when user registers and save it sha1 into database
- How do I “unhook” / de-register jQuery so that it’s not called as part of wp_footer();?
- Removing the default sidebar from admin panel
- Merging PHP download script into `functions.php`
- Static Front Page problem
- two tinyMCE editors in the same page
- Is there an error in get_the_tag_list()?
- Returning Variables back into a template
- Allow users to add custom functions to wordpress theme
- Change date number to another language/script?
- How to add custom template tag in wordpress theme?
- Nesting Functions within Functions
- Is using eval() ok in this scenario
- Custom php page in WordPress theme?
- Can’t access WordPress functions in file called via Ajax?
- Cannot update WordPress General Settings Site Title and Tagline
- How can I customize wp_footer, where is the code that controls what this function does?
- How to list all images in uploads directory except those that are attached to any post
- More than one meta field in a single meta box?
- How to upload images using Settings API
- Is there a theme function for is_password_protected()?
- how do you create an admin interface in plugin for your theme
- How to determine which custom header image is being shown
- Toggle Sidebar Display
- How to store functions in… functions.php?
- Unhook jQuery from WooCommerce via `functions.php`? [closed]
- Theme settings keep getting reset/erased
- trying to use wp_handle_upload with ajax
- Should I use include or load_template for including shortcodes, plugins and so on?
- Check if home.php and set home.php as page_on_front
- Where should I update_options in a theme?
- How can I display/hide certain content based on a Theme Option field?
- Should I use add_filter for functions in function.php of the theme?
- after renaming my wp-content folder, how do I upgrade my wordpress version?
- Pass variable to hook. Its possible?
- How can I make my options in an array and store theme in WP options one DB row?
- Theme Customizer not loading JS for live preview
- How to Call pages from a Options Panel
- Remove “You are using WordPress 3.2.1” from Right Now Dashboard Widget
- Efficiency of wp_options vs a new table
- Replace function in a child theme
- Redirect to another page using contact form 7? [closed]
- Custom theme, contact form 7 & fast secure form doesn’t work
- How to set wp_options in functions.php for removeing the Default Front Page
- Change the “Default Avatar” admin option via functions.php
- Replace single_template filter with what for default posts?
- Override plugin option by with a custom theme
- JQuery undefined and Stylesheet loads in bottom along with js files
- How to call the_time current?
- not getting API setting saved confirmation message after update on option page
- “options.php” not found
- Update Specific Key Value in Complex `wp_options` object
- Add content after get_header
- Can’t change theme name
- How to set default values for edit_post_link() in my theme?
- How to remove permalinks links presents in each page of my site?
- How to make excerpt image be full size instead of thumbnail?
- Tabbed theme options query about add_settings_section callback function
- Unable to delete option
- enqueue script if page is not equal to
- Theme Option’s Save Button is not working
- apply_filters to featured image
- Mamp pro permalink issues. Pages keep reverting to index.php
- loading custom.js file after jquery is loaded
- Creating custom function in wordpress to return data from database
- Getting URL of Resized Image
- Adding a new layout for genesis
- themeforce (happytables framework) implementation
- How do I remove a pre-existing customizer setting?
- Why I can’t add a CSS style in this WordPress theme?
- Context aware widgets. My work in progress
- Is the regular ajax request method safe or I should use admin-ajax.php?
- Media Uploader in custom path
- Widget Option is Missing
- If you were to start using a WordPress framework today, which one would you use? [closed]
- Understrap-child conditional js script
- How can I access variables from theme in child theme? [closed]
- Where can I find the declaration of `$_wp_theme_features`?
- Display current taxonomy slug in a post
- How to create multiple customizer controls in one control
- How can I display and excerpt of all pages with a meta_key and meta_value on index.php?
- Creating completely new WordPress site from old WP contents
- ways to create customized theme (hard coded – no pagebuilder)