Changeset 13805 for trunk/wp-admin/includes/plugin.php
- Timestamp:
- 03/22/2010 11:03:31 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/plugin.php
r13770 r13805 1423 1423 * @return unknown 1424 1424 */ 1425 function register_setting($option_group, $option_name, $sanitize_callback = '') { 1426 if ( 'misc' == $option_group ) 1425 function register_setting( $option_group, $option_name, $sanitize_callback = '' ) { 1426 global $new_whitelist_options; 1427 1428 if ( 'misc' == $option_group ) { 1427 1429 _deprecated_argument( __FUNCTION__, '3.0', __( 'The miscellaneous options group has been removed. Use another settings group.' ) ); 1428 return add_option_update_handler($option_group, $option_name, $sanitize_callback); 1430 $option_group = 'general'; 1431 } 1432 1433 $new_whitelist_options[ $option_group ][] = $option_name; 1434 if ( $sanitize_callback != '' ) 1435 add_filter( "sanitize_option_{$option_name}", $sanitize_callback ); 1429 1436 } 1430 1437 … … 1439 1446 * @return unknown 1440 1447 */ 1441 function unregister_setting($option_group, $option_name, $sanitize_callback = '') { 1442 return remove_option_update_handler($option_group, $option_name, $sanitize_callback); 1443 } 1444 1445 /** 1446 * {@internal Missing Short Description}} 1447 * 1448 * @since unknown 1449 * 1450 * @param unknown_type $option_group 1451 * @param unknown_type $option_name 1452 * @param unknown_type $sanitize_callback 1453 */ 1454 function add_option_update_handler($option_group, $option_name, $sanitize_callback = '') { 1448 function unregister_setting( $option_group, $option_name, $sanitize_callback = '' ) { 1455 1449 global $new_whitelist_options; 1456 1450 1457 if ( 'misc' == $option_group ) 1451 if ( 'misc' == $option_group ) { 1452 _deprecated_argument( __FUNCTION__, '3.0', __( 'The miscellaneous options group has been removed. Use another settings group.' ) ); 1458 1453 $option_group = 'general'; 1459 1460 $new_whitelist_options[ $option_group ][] = $option_name; 1461 if ( $sanitize_callback != '' ) 1462 add_filter( "sanitize_option_{$option_name}", $sanitize_callback ); 1463 } 1464 1465 /** 1466 * {@internal Missing Short Description}} 1467 * 1468 * @since unknown 1469 * 1470 * @param unknown_type $option_group 1471 * @param unknown_type $option_name 1472 * @param unknown_type $sanitize_callback 1473 */ 1474 function remove_option_update_handler($option_group, $option_name, $sanitize_callback = '') { 1475 global $new_whitelist_options; 1476 1477 if ( 'misc' == $option_group ) 1478 $option_group = 'general'; 1454 } 1479 1455 1480 1456 $pos = array_search( $option_name, (array) $new_whitelist_options ); … … 1575 1551 } 1576 1552 1577 /**1578 * Outputs the notice message for multisite regarding activation of plugin page.1579 *1580 * @since 3.01581 * @return none1582 */1583 function _admin_notice_multisite_activate_plugins_page() {1584 $message = sprintf( __( 'The plugins page is not visible to normal users. It must be activated first. %s' ), '<a href="ms-options.php#menu">' . __( 'Activate' ) . '</a>' );1585 echo "<div class='error'><p>$message</p></div>";1586 }1587 1588 1553 ?>
Note: See TracChangeset
for help on using the changeset viewer.