Description
The “xclusive_theme_options_validate” filter allows to modify validate the theme options. Version 1.1.0+.
A plugin (or theme) can add a filter with the code:
<?php add_filter( 'xclusive_default_theme_options', 'filter_function_name' ); ?>
The hook is located in the _inc/theme-options.php file.
Example
// apply filter function filter_xclusive_theme_options_validate( $output, $input, $default ) { if( ! is_numeric( $input['content_width'] ) ) $output['content_width'] = $default['content_width']; return $output; } add_filter('xclusive_theme_options_validate', 'filter_xclusive_theme_options_validate', 20, 3 );
Note: $options is a array.
Leave a Reply