mp-wp_genesis 1 <?php
mp-wp_genesis 2 /**
mp-wp_genesis 3 * General settings administration panel.
mp-wp_genesis 4 *
mp-wp_genesis 5 * @package WordPress
mp-wp_genesis 6 * @subpackage Administration
mp-wp_genesis 7 */
mp-wp_genesis 8
mp-wp_genesis 9 /** WordPress Administration Bootstrap */
mp-wp_genesis 10 require_once('./admin.php');
mp-wp_genesis 11
mp-wp_genesis 12 $title = __('General Settings');
mp-wp_genesis 13 $parent_file = 'options-general.php';
mp-wp_genesis 14
mp-wp_genesis 15 include('./admin-header.php');
mp-wp_genesis 16 ?>
mp-wp_genesis 17
mp-wp_genesis 18 <div class="wrap">
mp-wp_genesis 19 <?php screen_icon(); ?>
mp-wp_genesis 20 <h2><?php echo wp_specialchars( $title ); ?></h2>
mp-wp_genesis 21
mp-wp_genesis 22 <form method="post" action="options.php">
mp-wp_genesis 23 <?php settings_fields('general'); ?>
mp-wp_genesis 24
mp-wp_genesis 25 <table class="form-table">
mp-wp_genesis 26 <tr valign="top">
mp-wp_genesis 27 <th scope="row"><label for="blogname"><?php _e('Blog Title') ?></label></th>
mp-wp_genesis 28 <td><input name="blogname" type="text" id="blogname" value="<?php form_option('blogname'); ?>" class="regular-text" /></td>
mp-wp_genesis 29 </tr>
mp-wp_genesis 30 <tr valign="top">
mp-wp_genesis 31 <th scope="row"><label for="blogdescription"><?php _e('Tagline') ?></label></th>
mp-wp_genesis 32 <td><input name="blogdescription" type="text" id="blogdescription" value="<?php form_option('blogdescription'); ?>" class="regular-text" />
mp-wp_genesis 33 <span class="setting-description"><?php _e('In a few words, explain what this blog is about.') ?></span></td>
mp-wp_genesis 34 </tr>
mp-wp_genesis 35 <tr valign="top">
mp-wp_genesis 36 <th scope="row"><label for="siteurl"><?php _e('WordPress address (URL)') ?></label></th>
mp-wp_genesis 37 <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>
mp-wp_genesis 38 </tr>
mp-wp_genesis 39 <tr valign="top">
mp-wp_genesis 40 <th scope="row"><label for="home"><?php _e('Blog address (URL)') ?></label></th>
mp-wp_genesis 41 <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; ?> />
mp-wp_genesis 42 <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>
mp-wp_genesis 43 </tr>
mp-wp_genesis 44 <tr valign="top">
mp-wp_genesis 45 <th scope="row"><label for="admin_email"><?php _e('E-mail address') ?> </label></th>
mp-wp_genesis 46 <td><input name="admin_email" type="text" id="admin_email" value="<?php form_option('admin_email'); ?>" class="regular-text code" />
mp-wp_genesis 47 <span class="setting-description"><?php _e('This address is used for admin purposes, like new user notification.') ?></span></td>
mp-wp_genesis 48 </tr>
mp-wp_genesis 49 <tr valign="top">
mp-wp_genesis 50 <th scope="row"><?php _e('Membership') ?></th>
mp-wp_genesis 51 <td> <fieldset><legend class="hidden"><?php _e('Membership') ?></legend><label for="users_can_register">
mp-wp_genesis 52 <input name="users_can_register" type="checkbox" id="users_can_register" value="1" <?php checked('1', get_option('users_can_register')); ?> />
mp-wp_genesis 53 <?php _e('Anyone can register') ?></label>
mp-wp_genesis 54 </fieldset></td>
mp-wp_genesis 55 </tr>
mp-wp_genesis 56 <tr valign="top">
mp-wp_genesis 57 <th scope="row"><label for="default_role"><?php _e('New User Default Role') ?></label></th>
mp-wp_genesis 58 <td>
mp-wp_genesis 59 <select name="default_role" id="default_role"><?php wp_dropdown_roles( get_option('default_role') ); ?></select>
mp-wp_genesis 60 </td>
mp-wp_genesis 61 </tr>
mp-wp_genesis 62 <tr>
mp-wp_genesis 63 <th scope="row"><label for="gmt_offset"><?php _e('Timezone') ?> </label></th>
mp-wp_genesis 64 <td>
mp-wp_genesis 65 <select name="gmt_offset" id="gmt_offset">
mp-wp_genesis 66 <?php
mp-wp_genesis 67 $current_offset = get_option('gmt_offset');
mp-wp_genesis 68 $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,
mp-wp_genesis 69 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);
mp-wp_genesis 70 foreach ( $offset_range as $offset ) {
mp-wp_genesis 71 if ( 0 < $offset )
mp-wp_genesis 72 $offset_name = '+' . $offset;
mp-wp_genesis 73 elseif ( 0 == $offset )
mp-wp_genesis 74 $offset_name = '';
mp-wp_genesis 75 else
mp-wp_genesis 76 $offset_name = (string) $offset;
mp-wp_genesis 77
mp-wp_genesis 78 $offset_name = str_replace(array('.25','.5','.75'), array(':15',':30',':45'), $offset_name);
mp-wp_genesis 79
mp-wp_genesis 80 $selected = '';
mp-wp_genesis 81 if ( $current_offset == $offset ) {
mp-wp_genesis 82 $selected = " selected='selected'";
mp-wp_genesis 83 $current_offset_name = $offset_name;
mp-wp_genesis 84 }
mp-wp_genesis 85 echo "<option value=\"$offset\"$selected>" . sprintf(__('UTC %s'), $offset_name) . '</option>';
mp-wp_genesis 86 }
mp-wp_genesis 87 ?>
mp-wp_genesis 88 </select>
mp-wp_genesis 89 <?php _e('hours') ?>
mp-wp_genesis 90 <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>
mp-wp_genesis 91 <?php if ($current_offset) : ?>
mp-wp_genesis 92 <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>
mp-wp_genesis 93 <?php endif; ?>
mp-wp_genesis 94 <br/>
mp-wp_genesis 95 <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>
mp-wp_genesis 96 </td>
mp-wp_genesis 97 </tr>
mp-wp_genesis 98 <tr>
mp-wp_genesis 99 <th scope="row"><?php _e('Date Format') ?></th>
mp-wp_genesis 100 <td>
mp-wp_genesis 101 <fieldset><legend class="hidden"><?php _e('Date Format') ?></legend>
mp-wp_genesis 102 <?php
mp-wp_genesis 103
mp-wp_genesis 104 $date_formats = apply_filters( 'date_formats', array(
mp-wp_genesis 105 __('F j, Y'),
mp-wp_genesis 106 'Y/m/d',
mp-wp_genesis 107 'm/d/Y',
mp-wp_genesis 108 'd/m/Y',
mp-wp_genesis 109 ) );
mp-wp_genesis 110
mp-wp_genesis 111 $custom = TRUE;
mp-wp_genesis 112
mp-wp_genesis 113 foreach ( $date_formats as $format ) {
mp-wp_genesis 114 echo "\t<label title='" . attribute_escape($format) . "'><input type='radio' name='date_format' value='" . attribute_escape($format) . "'";
mp-wp_genesis 115 if ( get_option('date_format') === $format ) { // checked() uses "==" rather than "==="
mp-wp_genesis 116 echo " checked='checked'";
mp-wp_genesis 117 $custom = FALSE;
mp-wp_genesis 118 }
mp-wp_genesis 119 echo ' /> ' . date_i18n( $format ) . "</label><br />\n";
mp-wp_genesis 120 }
mp-wp_genesis 121
mp-wp_genesis 122 echo ' <label><input type="radio" name="date_format" id="date_format_custom_radio" value="\c\u\s\t\o\m"';
mp-wp_genesis 123 checked( $custom, TRUE );
mp-wp_genesis 124 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";
mp-wp_genesis 125
mp-wp_genesis 126 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";
mp-wp_genesis 127 ?>
mp-wp_genesis 128 </fieldset>
mp-wp_genesis 129 </td>
mp-wp_genesis 130 </tr>
mp-wp_genesis 131 <tr>
mp-wp_genesis 132 <th scope="row"><?php _e('Time Format') ?></th>
mp-wp_genesis 133 <td>
mp-wp_genesis 134 <fieldset><legend class="hidden"><?php _e('Time Format') ?></legend>
mp-wp_genesis 135 <?php
mp-wp_genesis 136
mp-wp_genesis 137 $time_formats = apply_filters( 'time_formats', array(
mp-wp_genesis 138 __('g:i a'),
mp-wp_genesis 139 'g:i A',
mp-wp_genesis 140 'H:i',
mp-wp_genesis 141 ) );
mp-wp_genesis 142
mp-wp_genesis 143 $custom = TRUE;
mp-wp_genesis 144
mp-wp_genesis 145 foreach ( $time_formats as $format ) {
mp-wp_genesis 146 echo "\t<label title='" . attribute_escape($format) . "'><input type='radio' name='time_format' value='" . attribute_escape($format) . "'";
mp-wp_genesis 147 if ( get_option('time_format') === $format ) { // checked() uses "==" rather than "==="
mp-wp_genesis 148 echo " checked='checked'";
mp-wp_genesis 149 $custom = FALSE;
mp-wp_genesis 150 }
mp-wp_genesis 151 echo ' /> ' . date_i18n( $format ) . "</label><br />\n";
mp-wp_genesis 152 }
mp-wp_genesis 153
mp-wp_genesis 154 echo ' <label><input type="radio" name="time_format" id="time_format_custom_radio" value="\c\u\s\t\o\m"';
mp-wp_genesis 155 checked( $custom, TRUE );
mp-wp_genesis 156 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";
mp-wp_genesis 157 ?>
mp-wp_genesis 158 </fieldset>
mp-wp_genesis 159 </td>
mp-wp_genesis 160 </tr>
mp-wp_genesis 161 <tr>
mp-wp_genesis 162 <th scope="row"><label for="start_of_week"><?php _e('Week Starts On') ?></label></th>
mp-wp_genesis 163 <td><select name="start_of_week" id="start_of_week">
mp-wp_genesis 164 <?php
mp-wp_genesis 165 for ($day_index = 0; $day_index <= 6; $day_index++) :
mp-wp_genesis 166 $selected = (get_option('start_of_week') == $day_index) ? 'selected="selected"' : '';
mp-wp_genesis 167 echo "\n\t<option value='$day_index' $selected>" . $wp_locale->get_weekday($day_index) . '</option>';
mp-wp_genesis 168 endfor;
mp-wp_genesis 169 ?>
mp-wp_genesis 170 </select></td>
mp-wp_genesis 171 </tr>
mp-wp_genesis 172 <?php do_settings_fields('general', 'default'); ?>
mp-wp_genesis 173 </table>
mp-wp_genesis 174
mp-wp_genesis 175 <?php do_settings_sections('general'); ?>
mp-wp_genesis 176
mp-wp_genesis 177 <p class="submit">
mp-wp_genesis 178 <input type="submit" name="Submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
mp-wp_genesis 179 </p>
mp-wp_genesis 180 </form>
mp-wp_genesis 181
mp-wp_genesis 182 </div>
mp-wp_genesis 183
mp-wp_genesis 184 <?php include('./admin-footer.php') ?>