PageRenderTime 47ms CodeModel.GetById 23ms RepoModel.GetById 1ms app.codeStats 0ms

/wp-admin/options-general.php

https://github.com/socialplanning/opencore-wordpress-mu
PHP | 114 lines | 39 code | 4 blank | 71 comment | 0 complexity | 761b355f3cf81ab2464522f32abfea40 MD5 | raw file
  1. <?php
  2. require_once('./admin.php');
  3. $title = __('General Options');
  4. $parent_file = 'options-general.php';
  5. include('./admin-header.php');
  6. ?>
  7. <div class="wrap">
  8. <h2><?php _e('General Options') ?></h2>
  9. <form method="post" action="options.php">
  10. <?php wp_nonce_field('update-options') ?>
  11. <p class="submit"><input type="submit" name="Submit" value="<?php _e('Update Options &raquo;') ?>" /></p>
  12. <table class="optiontable">
  13. <tr valign="top">
  14. <th scope="row"><?php _e('Weblog title:') ?></th>
  15. <td><input name="blogname" type="text" id="blogname" value="<?php form_option('blogname'); ?>" size="40" /></td>
  16. </tr>
  17. <tr valign="top">
  18. <th scope="row"><?php _e('Tagline:') ?></th>
  19. <td><input name="blogdescription" type="text" id="blogdescription" style="width: 95%" value="<?php form_option('blogdescription'); ?>" size="45" />
  20. <br />
  21. <?php _e('In a few words, explain what this weblog is about.') ?></td>
  22. </tr>
  23. <tr valign="top">
  24. <th scope="row"><?php _e('Membership:') ?></th>
  25. <td> <label for="comment_registration">
  26. <input name="comment_registration" type="checkbox" id="comment_registration" value="1" <?php checked('1', get_option('comment_registration')); ?> />
  27. <?php _e('Users must be registered and logged in to comment') ?>
  28. </label>
  29. </td>
  30. </tr>
  31. <tr valign="top">
  32. <th scope="row"><?php _e('E-mail address:') ?> </th>
  33. <td><input name="new_admin_email" type="text" id="new_admin_email" value="<?php form_option('admin_email'); ?>" size="40" class="code" />
  34. <br />
  35. <p><?php _e('This address is used only for admin purposes.') ?> <?php _e('If you change this we will send you an email at your new address to confirm it. <strong>The new address will not become active until confirmed.</strong>') ?></p>
  36. </td>
  37. </tr>
  38. <?php
  39. $lang_files = glob( ABSPATH . LANGDIR . "/*" );
  40. $lang = get_option( "WPLANG" );
  41. if( is_array( $lang_files ) && count($lang_files) >= 1 ) {
  42. ?>
  43. <tr valign="top">
  44. <th width="33%" scope="row"><?php _e('Language:') ?></th>
  45. <td><select name="WPLANG" id="WPLANG">
  46. <?php
  47. echo "<option value=''>Default</option>";
  48. while( list( $key, $val ) = each( $lang_files ) ) {
  49. $l = basename( $val, ".mo" );
  50. echo "<option value='$l'";
  51. echo $lang == $l ? " selected" : "";
  52. echo "> $l</option>";
  53. }
  54. ?>
  55. </select></td>
  56. </tr>
  57. <?php
  58. } // languages
  59. ?>
  60. </table>
  61. <fieldset class="options">
  62. <legend><?php _e('Date and Time') ?></legend>
  63. <table class="optiontable">
  64. <tr>
  65. <th scope="row"><?php _e('<abbr title="Coordinated Universal Time">UTC</abbr> time is:') ?> </th>
  66. <td><code><?php echo gmdate(__('Y-m-d g:i:s a')); ?></code></td>
  67. </tr>
  68. <tr>
  69. <th scope="row"><?php _e('Times in the weblog should differ by:') ?> </th>
  70. <td><input name="gmt_offset" type="text" id="gmt_offset" size="2" value="<?php form_option('gmt_offset'); ?>" />
  71. <?php _e('hours') ?> (<?php _e('Your timezone offset, for example <code>-6</code> for Central Time.'); ?>)</td>
  72. </tr>
  73. <tr>
  74. <th scope="row"><?php _e('Default date format:') ?></th>
  75. <td><input name="date_format" type="text" id="date_format" size="30" value="<?php form_option('date_format'); ?>" /><br />
  76. <?php _e('Output:') ?> <strong><?php echo mysql2date(get_option('date_format'), current_time('mysql')); ?></strong></td>
  77. </tr>
  78. <tr>
  79. <th scope="row"><?php _e('Default time format:') ?></th>
  80. <td><input name="time_format" type="text" id="time_format" size="30" value="<?php form_option('time_format'); ?>" /><br />
  81. <?php _e('Output:') ?> <strong><?php echo gmdate(get_option('time_format'), current_time('timestamp')); ?></strong></td>
  82. </tr>
  83. <tr>
  84. <th scope="row">&nbsp;</th>
  85. <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>
  86. </tr>
  87. <tr>
  88. <th scope="row"><?php _e('Weeks in the calendar should start on:') ?></th>
  89. <td><select name="start_of_week" id="start_of_week">
  90. <?php
  91. for ($day_index = 0; $day_index <= 6; $day_index++) :
  92. $selected = (get_option('start_of_week') == $day_index) ? 'selected="selected"' : '';
  93. echo "\n\t<option value='$day_index' $selected>" . $wp_locale->get_weekday($day_index) . '</option>';
  94. endfor;
  95. ?>
  96. </select></td>
  97. </tr>
  98. </table>
  99. </fieldset>
  100. <p class="submit"><input type="submit" name="Submit" value="<?php _e('Update Options &raquo;') ?>" />
  101. <input type="hidden" name="action" value="update" />
  102. <input type="hidden" name="page_options" value="blogname,blogdescription,new_admin_email,users_can_register,gmt_offset,date_format,time_format,start_of_week,comment_registration,WPLANG,language" />
  103. </p>
  104. </form>
  105. </div>
  106. <?php include('./admin-footer.php') ?>