Changeset 12825 for trunk/wp-admin/includes/plugin.php
- Timestamp:
- 01/25/2010 09:33:49 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/plugin.php
r12789 r12825 1065 1065 */ 1066 1066 function add_option_whitelist( $new_options, $options = '' ) { 1067 if ( $options == '' ) {1067 if ( $options == '' ) 1068 1068 global $whitelist_options; 1069 } else {1069 else 1070 1070 $whitelist_options = $options; 1071 } 1072 foreach ( $new_options as $page => $keys ) {1073 foreach ( $keys as $key ) {1071 1072 foreach ( $new_options as $page => $keys ) { 1073 foreach ( $keys as $key ) { 1074 1074 if ( !isset($whitelist_options[ $page ]) || !is_array($whitelist_options[ $page ]) ) { 1075 1075 $whitelist_options[ $page ] = array(); … … 1082 1082 } 1083 1083 } 1084 1084 1085 return $whitelist_options; 1085 1086 } … … 1095 1096 */ 1096 1097 function remove_option_whitelist( $del_options, $options = '' ) { 1097 if ( $options == '' ) {1098 if ( $options == '' ) 1098 1099 global $whitelist_options; 1099 } else {1100 else 1100 1101 $whitelist_options = $options; 1101 } 1102 foreach ( $del_options as $page => $keys ) {1103 foreach ( $keys as $key ) {1102 1103 foreach ( $del_options as $page => $keys ) { 1104 foreach ( $keys as $key ) { 1104 1105 if ( isset($whitelist_options[ $page ]) && is_array($whitelist_options[ $page ]) ) { 1105 1106 $pos = array_search( $key, $whitelist_options[ $page ] ); … … 1109 1110 } 1110 1111 } 1112 1111 1113 return $whitelist_options; 1112 1114 }
Note: See TracChangeset
for help on using the changeset viewer.