-
+ 1F02D5CBEBD151B0228F06B080B918301DB8A696EF65A202A429B3D78CD3F3482B932B68B0315FAAA18151A5F5397C2B7F206B8E8A9B5A4B3C07D870060640B0
mp-wp/wp-admin/options-general.php
(0 . 0)(1 . 217)
53494 <?php
53495 /**
53496 * General settings administration panel.
53497 *
53498 * @package WordPress
53499 * @subpackage Administration
53500 */
53501
53502 /** WordPress Administration Bootstrap */
53503 require_once('./admin.php');
53504
53505 $title = __('General Settings');
53506 $parent_file = 'options-general.php';
53507
53508 /**
53509 * Display JavaScript on the page.
53510 *
53511 * @package WordPress
53512 * @subpackage General_Settings_Panel
53513 */
53514 function add_js() {
53515 ?>
53516 <script type="text/javascript">
53517 //<![CDATA[
53518 jQuery(document).ready(function($){
53519 $("input[name='date_format']").click(function(){
53520 if ( "date_format_custom_radio" != $(this).attr("id") )
53521 $("input[name='date_format_custom']").val( $(this).val() );
53522 });
53523 $("input[name='date_format_custom']").focus(function(){
53524 $("#date_format_custom_radio").attr("checked", "checked");
53525 });
53526
53527 $("input[name='time_format']").click(function(){
53528 if ( "time_format_custom_radio" != $(this).attr("id") )
53529 $("input[name='time_format_custom']").val( $(this).val() );
53530 });
53531 $("input[name='time_format_custom']").focus(function(){
53532 $("#time_format_custom_radio").attr("checked", "checked");
53533 });
53534 });
53535 //]]>
53536 </script>
53537 <?php
53538 }
53539 add_filter('admin_head', 'add_js');
53540
53541 include('./admin-header.php');
53542 ?>
53543
53544 <div class="wrap">
53545 <?php screen_icon(); ?>
53546 <h2><?php echo wp_specialchars( $title ); ?></h2>
53547
53548 <form method="post" action="options.php">
53549 <?php settings_fields('general'); ?>
53550
53551 <table class="form-table">
53552 <tr valign="top">
53553 <th scope="row"><label for="blogname"><?php _e('Blog Title') ?></label></th>
53554 <td><input name="blogname" type="text" id="blogname" value="<?php form_option('blogname'); ?>" class="regular-text" /></td>
53555 </tr>
53556 <tr valign="top">
53557 <th scope="row"><label for="blogdescription"><?php _e('Tagline') ?></label></th>
53558 <td><input name="blogdescription" type="text" id="blogdescription" value="<?php form_option('blogdescription'); ?>" class="regular-text" />
53559 <span class="setting-description"><?php _e('In a few words, explain what this blog is about.') ?></span></td>
53560 </tr>
53561 <tr valign="top">
53562 <th scope="row"><label for="siteurl"><?php _e('WordPress address (URL)') ?></label></th>
53563 <td><input name="siteurl" type="text" id="siteurl" value="<?php form_option('siteurl'); ?>" class="regular-text code<?php if ( defined( 'WP_SITEURL' ) ) : ?> disabled" disabled="disabled"<?php else: ?>"<?php endif; ?> /></td>
53564 </tr>
53565 <tr valign="top">
53566 <th scope="row"><label for="home"><?php _e('Blog address (URL)') ?></label></th>
53567 <td><input name="home" type="text" id="home" value="<?php form_option('home'); ?>" class="regular-text code<?php if ( defined( 'WP_HOME' ) ) : ?> disabled" disabled="disabled"<?php else: ?>"<?php endif; ?> />
53568 <span class="setting-description"><?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.'); ?></span></td>
53569 </tr>
53570 <tr valign="top">
53571 <th scope="row"><label for="admin_email"><?php _e('E-mail address') ?> </label></th>
53572 <td><input name="admin_email" type="text" id="admin_email" value="<?php form_option('admin_email'); ?>" class="regular-text code" />
53573 <span class="setting-description"><?php _e('This address is used for admin purposes, like new user notification.') ?></span></td>
53574 </tr>
53575 <tr valign="top">
53576 <th scope="row"><?php _e('Membership') ?></th>
53577 <td> <fieldset><legend class="hidden"><?php _e('Membership') ?></legend><label for="users_can_register">
53578 <input name="users_can_register" type="checkbox" id="users_can_register" value="1" <?php checked('1', get_option('users_can_register')); ?> />
53579 <?php _e('Anyone can register') ?></label>
53580 </fieldset></td>
53581 </tr>
53582 <tr valign="top">
53583 <th scope="row"><label for="default_role"><?php _e('New User Default Role') ?></label></th>
53584 <td>
53585 <select name="default_role" id="default_role"><?php wp_dropdown_roles( get_option('default_role') ); ?></select>
53586 </td>
53587 </tr>
53588 <tr>
53589 <th scope="row"><label for="gmt_offset"><?php _e('Timezone') ?> </label></th>
53590 <td>
53591 <select name="gmt_offset" id="gmt_offset">
53592 <?php
53593 $current_offset = get_option('gmt_offset');
53594 $offset_range = array (-12, -11.5, -11, -10.5, -10, -9.5, -9, -8.5, -8, -7.5, -7, -6.5, -6, -5.5, -5, -4.5, -4, -3.5, -3, -2.5, -2, -1.5, -1, -0.5,
53595 0, 0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5, 5, 5.5, 5.75, 6, 6.5, 7, 7.5, 8, 8.5, 8.75, 9, 9.5, 10, 10.5, 11, 11.5, 12, 12.75, 13, 13.75, 14);
53596 foreach ( $offset_range as $offset ) {
53597 if ( 0 < $offset )
53598 $offset_name = '+' . $offset;
53599 elseif ( 0 == $offset )
53600 $offset_name = '';
53601 else
53602 $offset_name = (string) $offset;
53603
53604 $offset_name = str_replace(array('.25','.5','.75'), array(':15',':30',':45'), $offset_name);
53605
53606 $selected = '';
53607 if ( $current_offset == $offset ) {
53608 $selected = " selected='selected'";
53609 $current_offset_name = $offset_name;
53610 }
53611 echo "<option value=\"$offset\"$selected>" . sprintf(__('UTC %s'), $offset_name) . '</option>';
53612 }
53613 ?>
53614 </select>
53615 <?php _e('hours') ?>
53616 <span id="utc-time"><?php printf(__('<abbr title="Coordinated Universal Time">UTC</abbr> time is <code>%s</code>'), date_i18n(__('Y-m-d G:i:s'), false, 'gmt')); ?></span>
53617 <?php if ($current_offset) : ?>
53618 <span id="local-time"><?php printf(__('UTC %1$s is <code>%2$s</code>'), $current_offset_name, date_i18n(__('Y-m-d G:i:s'))); ?></span>
53619 <?php endif; ?>
53620 <br/>
53621 <span class="setting-description"><?php _e('Unfortunately, you have to manually update this for Daylight Savings Time. Lame, we know, but will be fixed in the future.'); ?></span>
53622 </td>
53623 </tr>
53624 <tr>
53625 <th scope="row"><?php _e('Date Format') ?></th>
53626 <td>
53627 <fieldset><legend class="hidden"><?php _e('Date Format') ?></legend>
53628 <?php
53629
53630 $date_formats = apply_filters( 'date_formats', array(
53631 __('F j, Y'),
53632 'Y/m/d',
53633 'm/d/Y',
53634 'd/m/Y',
53635 ) );
53636
53637 $custom = TRUE;
53638
53639 foreach ( $date_formats as $format ) {
53640 echo "\t<label title='" . attribute_escape($format) . "'><input type='radio' name='date_format' value='" . attribute_escape($format) . "'";
53641 if ( get_option('date_format') === $format ) { // checked() uses "==" rather than "==="
53642 echo " checked='checked'";
53643 $custom = FALSE;
53644 }
53645 echo ' /> ' . date_i18n( $format ) . "</label><br />\n";
53646 }
53647
53648 echo ' <label><input type="radio" name="date_format" id="date_format_custom_radio" value="\c\u\s\t\o\m"';
53649 checked( $custom, TRUE );
53650 echo '/> ' . __('Custom:') . ' </label><input type="text" name="date_format_custom" value="' . attribute_escape( get_option('date_format') ) . '" class="small-text" /> ' . date_i18n( get_option('date_format') ) . "\n";
53651
53652 echo "\t<p>" . __('<a href="http://codex.wordpress.org/Formatting_Date_and_Time">Documentation on date formatting</a>. Click "Save Changes" to update sample output.') . "</p>\n";
53653 ?>
53654 </fieldset>
53655 </td>
53656 </tr>
53657 <tr>
53658 <th scope="row"><?php _e('Time Format') ?></th>
53659 <td>
53660 <fieldset><legend class="hidden"><?php _e('Time Format') ?></legend>
53661 <?php
53662
53663 $time_formats = apply_filters( 'time_formats', array(
53664 __('g:i a'),
53665 'g:i A',
53666 'H:i',
53667 ) );
53668
53669 $custom = TRUE;
53670
53671 foreach ( $time_formats as $format ) {
53672 echo "\t<label title='" . attribute_escape($format) . "'><input type='radio' name='time_format' value='" . attribute_escape($format) . "'";
53673 if ( get_option('time_format') === $format ) { // checked() uses "==" rather than "==="
53674 echo " checked='checked'";
53675 $custom = FALSE;
53676 }
53677 echo ' /> ' . date_i18n( $format ) . "</label><br />\n";
53678 }
53679
53680 echo ' <label><input type="radio" name="time_format" id="time_format_custom_radio" value="\c\u\s\t\o\m"';
53681 checked( $custom, TRUE );
53682 echo '/> ' . __('Custom:') . ' </label><input type="text" name="time_format_custom" value="' . attribute_escape( get_option('time_format') ) . '" class="small-text" /> ' . date_i18n( get_option('time_format') ) . "\n";
53683 ?>
53684 </fieldset>
53685 </td>
53686 </tr>
53687 <tr>
53688 <th scope="row"><label for="start_of_week"><?php _e('Week Starts On') ?></label></th>
53689 <td><select name="start_of_week" id="start_of_week">
53690 <?php
53691 for ($day_index = 0; $day_index <= 6; $day_index++) :
53692 $selected = (get_option('start_of_week') == $day_index) ? 'selected="selected"' : '';
53693 echo "\n\t<option value='$day_index' $selected>" . $wp_locale->get_weekday($day_index) . '</option>';
53694 endfor;
53695 ?>
53696 </select></td>
53697 </tr>
53698 <?php do_settings_fields('general', 'default'); ?>
53699 </table>
53700
53701 <?php do_settings_sections('general'); ?>
53702
53703 <p class="submit">
53704 <input type="submit" name="Submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
53705 </p>
53706 </form>
53707
53708 </div>
53709
53710 <?php include('./admin-footer.php') ?>