wp-content/themes/twentyeleven/inc/theme-options.php:390Sanitizes and validates form input.
$inputarrayarray<string,One hook fires while twentyeleven_theme_options_validate() runs, in this order:
Filters the Twenty Eleven sanitized form input array.
function twentyeleven_theme_options_validate( $input ) { $defaults = twentyeleven_get_default_theme_options(); $output = $defaults; // Color scheme must be in our array of color scheme options. if ( isset( $input['color_scheme'] ) && array_key_exists( $input['color_scheme'], twentyeleven_color_schemes() ) ) { $output['color_scheme'] = $input['color_scheme']; } // Our defaults for the link color may have changed, based on the color scheme. $defaults['link_color'] = twentyeleven_get_default_link_color( $output['color_scheme'] ); $output['link_color'] = $defaults['link_color']; // Link color must be 3 or 6 hexadecimal characters. if ( isset( $input['link_color'] ) && preg_match( '/^#?([a-f0-9]{3}){1,2}$/i', $input['link_color'] ) ) { $output['link_color'] = '#' . strtolower( ltrim( $input['link_color'], '#' ) ); } // Theme layout must be in our array of theme layout options. if ( isset( $input['theme_layout'] ) && array_key_exists( $input['theme_layout'], twentyeleven_layouts() ) ) { $output['theme_layout'] = $input['theme_layout']; } /** * Filters the Twenty Eleven sanitized form input array. * * @since Twenty Eleven 1.0 * * @param array<string, string> $output An array of sanitized form output. * @param array $input An array of un-sanitized form input. * @param array<string, string> $defaults An array of default theme options. */ return apply_filters( 'twentyeleven_theme_options_validate', $output, $input, $defaults );}Introduced in Twenty Eleven 1.0. One change between 6.7.7 and 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
none to array<string,.verified against sourcesrc/wp-content/themes/twentyeleven/inc/theme-options.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.