| 1489 | * Register settings and a sanitization callback |
| 1490 | * |
| 1491 | * @since 3.1.0 |
| 1492 | * |
| 1493 | * @param string $option_group A settings group name. Should correspond to a whitelisted option key name. |
| 1494 | * Default whitelisted option key names include "general," "discussion," and "reading," among others. |
| 1495 | * @param array $options Option names to sanitize and save. If keyed as option names, the value would be |
| 1496 | * the sanitization callback. |
| 1497 | |
| 1498 | */ |
| 1499 | function register_settings( $option_group, $options ) { |
| 1500 | foreach ( $options as $key => $value ){ |
| 1501 | if ( is_integer( $key ) ) |
| 1502 | register_setting( $option_group, $value ); |
| 1503 | else |
| 1504 | register_setting( $option_group, $key, $value ); |
| 1505 | } |
| 1506 | } |
| 1507 | |
| 1508 | /** |