Make WordPress Core


Ignore:
Timestamp:
04/24/2004 09:21:19 PM (21 years ago)
Author:
saxmatt
Message:

Cleaned up unused options.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/options.php

    r1108 r1148  
    3939require_once('./optionhandler.php');
    4040$non_was_selected = 0;
    41 if ($option_group_id == '') {
     41if ('' == $_GET['option_group_id']) {
    4242    $option_group_id = 1;
    4343    $non_was_selected = 1;
     
    156156  <table width="90%" cellpadding="2" cellspacing="2" border="0">
    157157<?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.
     159if ('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");
     161else :
     162$options = $wpdb->get_results("
     163SELECT
     164$tableoptions.option_id, option_name, option_type, option_value, option_width, option_height, option_description, option_admin_level
     165FROM $tableoptions  LEFT JOIN $tableoptiongroup_options ON $tableoptions.option_id = $tableoptiongroup_options.option_id
     166WHERE group_id = $option_group_id
     167ORDER BY seq
     168");
     169endif;
     170
     171foreach ($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";
     175endforeach;
    170176?>
    171177    <tr><td colspan="3">&nbsp;</td></tr>
Note: See TracChangeset for help on using the changeset viewer.