Ticket #15335: 15335_params.diff
File 15335_params.diff, 1.1 KB (added by , 12 years ago) |
---|
-
plugin.php
1593 1593 * Default whitelisted option key names include "general," "discussion," and "reading," among others. 1594 1594 * @param string $option_name The name of an option to sanitize and save. 1595 1595 * @param unknown_type $sanitize_callback A callback function that sanitizes the option's value. 1596 * @param int $priority priority for callback filter 1597 * @param int $accepted_args accepted args in callback 1596 1598 * @return unknown 1597 1599 */ 1598 function register_setting( $option_group, $option_name, $sanitize_callback = '' ) {1600 function register_setting( $option_group, $option_name, $sanitize_callback = '', $priority = 10, $accepted_args = 1 ) { 1599 1601 global $new_whitelist_options; 1600 1602 1601 1603 if ( 'misc' == $option_group ) { … … 1605 1607 1606 1608 $new_whitelist_options[ $option_group ][] = $option_name; 1607 1609 if ( $sanitize_callback != '' ) 1608 add_filter( "sanitize_option_{$option_name}", $sanitize_callback );1610 add_filter( "sanitize_option_{$option_name}", $sanitize_callback, $priority, $accepted_args ); 1609 1611 } 1610 1612 1611 1613 /**