PHP Cross Reference of WordPress Subversion HEAD

[ Index ]     [ Classes ]     [ Functions ]     [ Variables ]     [ Constants ]

title

Body

[close]

/wp-admin/ -> options-general.php (source)

   1  <?php
   2  require_once ('./admin.php');
   3  
   4  $title = __('General Options');
   5  $parent_file = 'options-general.php';
   6  
   7  include ('./admin-header.php');
   8  ?>
   9  
  10  <div class="wrap">
  11  <h2><?php _e('General Options') ?></h2>
  12  <form method="post" action="options.php">
  13  <?php wp_nonce_field('update-options') ?>
  14  <p class="submit"><input type="submit" name="Submit" value="<?php _e('Update Options &raquo;') ?>" /></p>
  15  <table class="optiontable">
  16  <tr valign="top">
  17  <th scope="row"><?php _e('Blog title:') ?></th>
  18  <td><input name="blogname" type="text" id="blogname" value="<?php form_option('blogname'); ?>" size="40" /></td>
  19  </tr>
  20  <tr valign="top">
  21  <th scope="row"><?php _e('Tagline:') ?></th>
  22  <td><input name="blogdescription" type="text" id="blogdescription" style="width: 95%" value="<?php form_option('blogdescription'); ?>" size="45" />
  23  <br />
  24  <?php _e('In a few words, explain what this blog is about.') ?></td>
  25  </tr>
  26  <tr valign="top">
  27  <th scope="row"><?php _e('WordPress address (URL):') ?></th>
  28  <td><input name="siteurl" type="text" id="siteurl" value="<?php form_option('siteurl'); ?>" size="40" class="code<?php if ( defined( 'WP_SITEURL' ) ) : ?> disabled" disabled="disabled"<?php else: ?>"<?php endif; ?> /></td>
  29  </tr>
  30  <tr valign="top">
  31  <th scope="row"><?php _e('Blog address (URL):') ?></th>
  32  <td><input name="home" type="text" id="home" value="<?php form_option('home'); ?>" size="40" class="code<?php if ( defined( 'WP_HOME' ) ) : ?> disabled" disabled="disabled"<?php else: ?>"<?php endif; ?> /><br /><?php _e('Enter the address here if you want your blog homepage <a href="http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory">to be different from the directory</a> you installed WordPress.'); ?></td>
  33  </tr>
  34  <tr valign="top">
  35  <th scope="row"><?php _e('E-mail address:') ?> </th>
  36  <td><input name="admin_email" type="text" id="admin_email" value="<?php form_option('admin_email'); ?>" size="40" class="code" />
  37  <br />
  38  <?php _e('This address is used only for admin purposes.') ?></td>
  39  </tr>
  40  <tr valign="top">
  41  <th scope="row"><?php _e('Membership:') ?></th>
  42  <td> <label for="users_can_register">
  43  <input name="users_can_register" type="checkbox" id="users_can_register" value="1" <?php checked('1', get_option('users_can_register')); ?> />
  44  <?php _e('Anyone can register') ?></label><br />
  45  <label for="comment_registration">
  46  <input name="comment_registration" type="checkbox" id="comment_registration" value="1" <?php checked('1', get_option('comment_registration')); ?> />
  47  <?php _e('Users must be registered and logged in to comment') ?>
  48  </label>
  49  </td>
  50  </tr>
  51  <tr valign="top">
  52  <th scope="row"><?php _e('New User Default Role:') ?></th>
  53  <td><label for="default_role">
  54  <select name="default_role" id="default_role"><?php wp_dropdown_roles( get_option('default_role') ); ?></select></label>
  55  </td>
  56  </tr>
  57  </table>
  58  <fieldset class="options">
  59  <legend><?php _e('Date and Time') ?></legend>
  60  <table class="optiontable">
  61  <tr>
  62  <th scope="row"><?php _e('<abbr title="Coordinated Universal Time">UTC</abbr> time is:') ?> </th>
  63  <td><code><?php echo gmdate(__('Y-m-d g:i:s a')); ?></code></td>
  64  </tr>
  65  <tr>
  66  <th scope="row"><?php _e('Times in the blog should differ by:') ?> </th>
  67  <td><input name="gmt_offset" type="text" id="gmt_offset" size="2" value="<?php form_option('gmt_offset'); ?>" />
  68  <?php _e('hours') ?> (<?php _e('Your timezone offset, for example <code>-6</code> for Central Time.'); ?>)</td>
  69  </tr>
  70  <tr>
  71  <th scope="row"><?php _e('Default date format:') ?></th>
  72  <td><input name="date_format" type="text" id="date_format" size="30" value="<?php form_option('date_format'); ?>" /><br />
  73  <?php _e('Output:') ?> <strong><?php echo mysql2date(get_option('date_format'), current_time('mysql')); ?></strong></td>
  74  </tr>
  75  <tr>
  76  <th scope="row"><?php _e('Default time format:') ?></th>
  77  <td><input name="time_format" type="text" id="time_format" size="30" value="<?php form_option('time_format'); ?>" /><br />
  78  <?php _e('Output:') ?> <strong><?php echo gmdate(get_option('time_format'), current_time('timestamp')); ?></strong></td>
  79  </tr>
  80  <tr>
  81  <th scope="row">&nbsp;</th>
  82  <td><?php _e('<a href="http://codex.wordpress.org/Formatting_Date_and_Time">Documentation on date formatting</a>. Click "Update options" to update sample output.') ?> </td>
  83  </tr>
  84  <tr>
  85  <th scope="row"><?php _e('Weeks in the calendar should start on:') ?></th>
  86  <td><select name="start_of_week" id="start_of_week">
  87  <?php
  88  for ($day_index = 0; $day_index <= 6; $day_index++) :
  89      $selected = (get_option('start_of_week') == $day_index) ? 'selected="selected"' : '';
  90      echo "\n\t<option value='$day_index' $selected>" . $wp_locale->get_weekday($day_index) . '</option>';
  91  endfor;
  92  ?>
  93  </select></td>
  94  </tr>
  95  </table>
  96  </fieldset>
  97  
  98  <p class="submit"><input type="submit" name="Submit" value="<?php _e('Update Options &raquo;') ?>" />
  99  <input type="hidden" name="action" value="update" />
 100  <input type="hidden" name="page_options" value="<?php if ( ! defined( 'WP_SITEURL' ) ) echo 'siteurl,'; if ( ! defined( 'WP_HOME' ) ) echo 'home,'; ?>blogname,blogdescription,admin_email,users_can_register,gmt_offset,date_format,time_format,start_of_week,comment_registration,default_role" />
 101  </p>
 102  </form>
 103  
 104  </div>
 105  
 106  <?php include ('./admin-footer.php') ?>


Generated Thu Dec 6 06:47:08 2007 for RedAlt XRefs Cross-referenced by PHPXref 0.6 and RedAlt