Changeset 1148 for trunk/wp-admin/options.php
- Timestamp:
- 04/24/2004 09:21:19 PM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/options.php
r1108 r1148 39 39 require_once('./optionhandler.php'); 40 40 $non_was_selected = 0; 41 if ( $option_group_id == '') {41 if ('' == $_GET['option_group_id']) { 42 42 $option_group_id = 1; 43 43 $non_was_selected = 1; … … 156 156 <table width="90%" cellpadding="2" cellspacing="2" border="0"> 157 157 <?php 158 //Now display all the options for the selected group. 159 $options = $wpdb->get_results("SELECT $tableoptions.option_id, option_name, option_type, option_value, option_width, option_height, option_description, option_admin_level " 160 . "FROM $tableoptions " 161 . "LEFT JOIN $tableoptiongroup_options ON $tableoptions.option_id = $tableoptiongroup_options.option_id " 162 . "WHERE group_id = $option_group_id " 163 . "ORDER BY seq"); 164 if ($options) { 165 foreach ($options as $option) { 166 echo(' <tr><td width="10%" valign="top">'. get_option_widget($option, ($user_level >= $option->option_admin_level), '</td><td width="15%" valign="top" style="border: 1px solid #ccc">')); 167 echo(" </td><td valign='top' class='helptext'>$option->option_description</td></tr>\n"); 168 } 169 } 158 //Now display all the options for the selected group. 159 if ('all' == $_GET['option_group_id']) : 160 $options = $wpdb->get_results("SELECT * FROM $tableoptions LEFT JOIN $tableoptiongroup_options ON $tableoptions.option_id = $tableoptiongroup_options.option_id ORDER BY option_name"); 161 else : 162 $options = $wpdb->get_results(" 163 SELECT 164 $tableoptions.option_id, option_name, option_type, option_value, option_width, option_height, option_description, option_admin_level 165 FROM $tableoptions LEFT JOIN $tableoptiongroup_options ON $tableoptions.option_id = $tableoptiongroup_options.option_id 166 WHERE group_id = $option_group_id 167 ORDER BY seq 168 "); 169 endif; 170 171 foreach ($options as $option) : 172 if ('all' == $_GET['option_group_id']) $option->option_type = 3; 173 echo "\t<tr><td width='10%' valign='top'>" . get_option_widget($option, ($user_level >= $option->option_admin_level), '</td><td width="15%" valign="top" style="border: 1px solid #ccc">'); 174 echo "\t</td><td valign='top' class='helptext'>$option->option_description</td></tr>\n"; 175 endforeach; 170 176 ?> 171 177 <tr><td colspan="3"> </td></tr>
Note: See TracChangeset
for help on using the changeset viewer.