raw
mp-wp_genesis           1 <?php
mp-wp_genesis 2 /**
mp-wp_genesis 3 * Discussion 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 = __('Discussion 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('discussion'); ?>
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"><?php _e('Default article settings') ?></th>
mp-wp_genesis 28 <td><fieldset><legend class="hidden"><?php _e('Default article settings') ?></legend>
mp-wp_genesis 29 <label for="default_pingback_flag">
mp-wp_genesis 30 <input name="default_pingback_flag" type="checkbox" id="default_pingback_flag" value="1" <?php checked('1', get_option('default_pingback_flag')); ?> />
mp-wp_genesis 31 <?php _e('Attempt to notify any blogs linked to from the article (slows down posting.)') ?></label>
mp-wp_genesis 32 <br />
mp-wp_genesis 33 <label for="default_ping_status">
mp-wp_genesis 34 <input name="default_ping_status" type="checkbox" id="default_ping_status" value="open" <?php checked('open', get_option('default_ping_status')); ?> />
mp-wp_genesis 35 <?php _e('Allow link notifications from other blogs (pingbacks and trackbacks.)') ?></label>
mp-wp_genesis 36 <br />
mp-wp_genesis 37 <label for="default_comment_status">
mp-wp_genesis 38 <input name="default_comment_status" type="checkbox" id="default_comment_status" value="open" <?php checked('open', get_option('default_comment_status')); ?> />
mp-wp_genesis 39 <?php _e('Allow people to post comments on the article') ?></label>
mp-wp_genesis 40 <br />
mp-wp_genesis 41 <small><em><?php echo '(' . __('These settings may be overridden for individual articles.') . ')'; ?></em></small>
mp-wp_genesis 42 </fieldset></td>
mp-wp_genesis 43 </tr>
mp-wp_genesis 44 <tr valign="top">
mp-wp_genesis 45 <th scope="row"><?php _e('Other comment settings') ?></th>
mp-wp_genesis 46 <td><fieldset><legend class="hidden"><?php _e('Other comment settings') ?></legend>
mp-wp_genesis 47 <label for="require_name_email"><input type="checkbox" name="require_name_email" id="require_name_email" value="1" <?php checked('1', get_option('require_name_email')); ?> /> <?php _e('Comment author must fill out name and e-mail') ?></label>
mp-wp_genesis 48 <br />
mp-wp_genesis 49 <label for="comment_registration">
mp-wp_genesis 50 <input name="comment_registration" type="checkbox" id="comment_registration" value="1" <?php checked('1', get_option('comment_registration')); ?> />
mp-wp_genesis 51 <?php _e('Users must be registered and logged in to comment') ?>
mp-wp_genesis 52 </label>
mp-wp_genesis 53 <br />
mp-wp_genesis 54
mp-wp_genesis 55 <label for="close_comments_for_old_posts">
mp-wp_genesis 56 <input name="close_comments_for_old_posts" type="checkbox" id="close_comments_for_old_posts" value="1" <?php checked('1', get_option('close_comments_for_old_posts')); ?> />
mp-wp_genesis 57 <?php printf( __('Automatically close comments on articles older than %s days'), '</label><input name="close_comments_days_old" type="text" id="close_comments_days_old" value="' . attribute_escape(get_option('close_comments_days_old')) . '" class="small-text" />') ?>
mp-wp_genesis 58 <br />
mp-wp_genesis 59 <label for="thread_comments">
mp-wp_genesis 60 <input name="thread_comments" type="checkbox" id="thread_comments" value="1" <?php checked('1', get_option('thread_comments')); ?> />
mp-wp_genesis 61 <?php
mp-wp_genesis 62
mp-wp_genesis 63 $maxdeep = (int) apply_filters( 'thread_comments_depth_max', 10 );
mp-wp_genesis 64
mp-wp_genesis 65 $thread_comments_depth = '</label><select name="thread_comments_depth" id="thread_comments_depth">';
mp-wp_genesis 66 for ( $i = 1; $i <= $maxdeep; $i++ ) {
mp-wp_genesis 67 $thread_comments_depth .= "<option value='$i'";
mp-wp_genesis 68 if ( get_option('thread_comments_depth') == $i ) $thread_comments_depth .= " selected='selected'";
mp-wp_genesis 69 $thread_comments_depth .= ">$i</option>";
mp-wp_genesis 70 }
mp-wp_genesis 71 $thread_comments_depth .= '</select>';
mp-wp_genesis 72
mp-wp_genesis 73 printf( __('Enable threaded (nested) comments %s levels deep'), $thread_comments_depth );
mp-wp_genesis 74
mp-wp_genesis 75 ?><br />
mp-wp_genesis 76 <label for="page_comments">
mp-wp_genesis 77 <input name="page_comments" type="checkbox" id="page_comments" value="1" <?php checked('1', get_option('page_comments')); ?> />
mp-wp_genesis 78 <?php
mp-wp_genesis 79
mp-wp_genesis 80 $default_comments_page = '</label><label for="default_comments_page"><select name="default_comments_page" id="default_comments_page"><option value="newest"';
mp-wp_genesis 81 if ( 'newest' == get_option('default_comments_page') ) $default_comments_page .= ' selected="selected"';
mp-wp_genesis 82 $default_comments_page .= '>' . __('last') . '</option><option value="oldest"';
mp-wp_genesis 83 if ( 'oldest' == get_option('default_comments_page') ) $default_comments_page .= ' selected="selected"';
mp-wp_genesis 84 $default_comments_page .= '>' . __('first') . '</option></select>';
mp-wp_genesis 85
mp-wp_genesis 86 printf( __('Break comments into pages with %1$s comments per page and the %2$s page displayed by default'), '</label><label for="comments_per_page"><input name="comments_per_page" type="text" id="comments_per_page" value="' . attribute_escape(get_option('comments_per_page')) . '" class="small-text" />', $default_comments_page );
mp-wp_genesis 87
mp-wp_genesis 88 ?></label>
mp-wp_genesis 89 <br />
mp-wp_genesis 90 <label for="comment_order"><?php
mp-wp_genesis 91
mp-wp_genesis 92 $comment_order = '<select name="comment_order" id="comment_order"><option value="asc"';
mp-wp_genesis 93 if ( 'asc' == get_option('comment_order') ) $comment_order .= ' selected="selected"';
mp-wp_genesis 94 $comment_order .= '>' . __('older') . '</option><option value="desc"';
mp-wp_genesis 95 if ( 'desc' == get_option('comment_order') ) $comment_order .= ' selected="selected"';
mp-wp_genesis 96 $comment_order .= '>' . __('newer') . '</option></select>';
mp-wp_genesis 97
mp-wp_genesis 98 printf( __('Comments should be displayed with the %s comments at the top of each page'), $comment_order );
mp-wp_genesis 99
mp-wp_genesis 100 ?></label>
mp-wp_genesis 101 </fieldset></td>
mp-wp_genesis 102 </tr>
mp-wp_genesis 103 <tr valign="top">
mp-wp_genesis 104 <th scope="row"><?php _e('E-mail me whenever') ?></th>
mp-wp_genesis 105 <td><fieldset><legend class="hidden"><?php _e('E-mail me whenever') ?></legend>
mp-wp_genesis 106 <label for="comments_notify">
mp-wp_genesis 107 <input name="comments_notify" type="checkbox" id="comments_notify" value="1" <?php checked('1', get_option('comments_notify')); ?> />
mp-wp_genesis 108 <?php _e('Anyone posts a comment') ?> </label>
mp-wp_genesis 109 <br />
mp-wp_genesis 110 <label for="moderation_notify">
mp-wp_genesis 111 <input name="moderation_notify" type="checkbox" id="moderation_notify" value="1" <?php checked('1', get_option('moderation_notify')); ?> />
mp-wp_genesis 112 <?php _e('A comment is held for moderation') ?> </label>
mp-wp_genesis 113 </fieldset></td>
mp-wp_genesis 114 </tr>
mp-wp_genesis 115 <tr valign="top">
mp-wp_genesis 116 <th scope="row"><?php _e('Before a comment appears') ?></th>
mp-wp_genesis 117 <td><fieldset><legend class="hidden"><?php _e('Before a comment appears') ?></legend>
mp-wp_genesis 118 <label for="comment_moderation">
mp-wp_genesis 119 <input name="comment_moderation" type="checkbox" id="comment_moderation" value="1" <?php checked('1', get_option('comment_moderation')); ?> />
mp-wp_genesis 120 <?php _e('An administrator must always approve the comment') ?> </label>
mp-wp_genesis 121 <br />
mp-wp_genesis 122 <label for="comment_whitelist"><input type="checkbox" name="comment_whitelist" id="comment_whitelist" value="1" <?php checked('1', get_option('comment_whitelist')); ?> /> <?php _e('Comment author must have a previously approved comment') ?></label>
mp-wp_genesis 123 </fieldset></td>
mp-wp_genesis 124 </tr>
mp-wp_genesis 125 <tr valign="top">
mp-wp_genesis 126 <th scope="row"><?php _e('Comment Moderation') ?></th>
mp-wp_genesis 127 <td><fieldset><legend class="hidden"><?php _e('Comment Moderation') ?></legend>
mp-wp_genesis 128 <p><label for="comment_max_links"><?php printf(__('Hold a comment in the queue if it contains %s or more links. (A common characteristic of comment spam is a large number of hyperlinks.)'), '<input name="comment_max_links" type="text" id="comment_max_links" value="' . get_option('comment_max_links'). '" class="small-text" />' ) ?></label></p>
mp-wp_genesis 129
mp-wp_genesis 130 <p><label for="moderation_keys"><?php _e('When a comment contains any of these words in its content, name, URL, e-mail, or IP, it will be held in the <a href="edit-comments.php?comment_status=moderated">moderation queue</a>. One word or IP per line. It will match inside words, so "press" will match "WordPress".') ?></label></p>
mp-wp_genesis 131 <p>
mp-wp_genesis 132 <textarea name="moderation_keys" rows="10" cols="50" id="moderation_keys" class="large-text code"><?php form_option('moderation_keys'); ?></textarea>
mp-wp_genesis 133 </p>
mp-wp_genesis 134 </fieldset></td>
mp-wp_genesis 135 </tr>
mp-wp_genesis 136 <tr valign="top">
mp-wp_genesis 137 <th scope="row"><?php _e('Comment Blacklist') ?></th>
mp-wp_genesis 138 <td><fieldset><legend class="hidden"><?php _e('Comment Blacklist') ?></legend>
mp-wp_genesis 139 <p><label for="blacklist_keys"><?php _e('When a comment contains any of these words in its content, name, URL, e-mail, or IP, it will be marked as spam. One word or IP per line. It will match inside words, so "press" will match "WordPress".') ?></label></p>
mp-wp_genesis 140 <p>
mp-wp_genesis 141 <textarea name="blacklist_keys" rows="10" cols="50" id="blacklist_keys" class="large-text code"><?php form_option('blacklist_keys'); ?></textarea>
mp-wp_genesis 142 </p>
mp-wp_genesis 143 </fieldset></td>
mp-wp_genesis 144 </tr>
mp-wp_genesis 145 <?php do_settings_fields('discussion', 'default'); ?>
mp-wp_genesis 146 </table>
mp-wp_genesis 147
mp-wp_genesis 148 <h3><?php _e('Avatars') ?></h3>
mp-wp_genesis 149
mp-wp_genesis 150 <p><?php _e('An avatar is an image that follows you from weblog to weblog appearing beside your name when you comment on avatar enabled sites. Here you can enable the display of avatars for people who comment on your blog.'); ?></p>
mp-wp_genesis 151
mp-wp_genesis 152 <?php // the above would be a good place to link to codex documentation on the gravatar functions, for putting it in themes. anything like that? ?>
mp-wp_genesis 153
mp-wp_genesis 154 <table class="form-table">
mp-wp_genesis 155 <tr valign="top">
mp-wp_genesis 156 <th scope="row"><?php _e('Avatar Display') ?></th>
mp-wp_genesis 157 <td><fieldset><legend class="hidden"><?php _e('Avatar display') ?></legend>
mp-wp_genesis 158 <?php
mp-wp_genesis 159 $yesorno = array(0 => __("Don&#8217;t show Avatars"), 1 => __('Show Avatars'));
mp-wp_genesis 160 foreach ( $yesorno as $key => $value) {
mp-wp_genesis 161 $selected = (get_option('show_avatars') == $key) ? 'checked="checked"' : '';
mp-wp_genesis 162 echo "\n\t<label><input type='radio' name='show_avatars' value='$key' $selected/> $value</label><br />";
mp-wp_genesis 163 }
mp-wp_genesis 164 ?>
mp-wp_genesis 165 </fieldset></td>
mp-wp_genesis 166 </tr>
mp-wp_genesis 167 <tr valign="top">
mp-wp_genesis 168 <th scope="row"><?php _e('Maximum Rating') ?></th>
mp-wp_genesis 169 <td><fieldset><legend class="hidden"><?php _e('Maximum Rating') ?></legend>
mp-wp_genesis 170
mp-wp_genesis 171 <?php
mp-wp_genesis 172 $ratings = array( 'G' => __('G &#8212; Suitable for all audiences'), 'PG' => __('PG &#8212; Possibly offensive, usually for audiences 13 and above'), 'R' => __('R &#8212; Intended for adult audiences above 17'), 'X' => __('X &#8212; Even more mature than above'));
mp-wp_genesis 173 foreach ($ratings as $key => $rating) :
mp-wp_genesis 174 $selected = (get_option('avatar_rating') == $key) ? 'checked="checked"' : '';
mp-wp_genesis 175 echo "\n\t<label><input type='radio' name='avatar_rating' value='$key' $selected/> $rating</label><br />";
mp-wp_genesis 176 endforeach;
mp-wp_genesis 177 ?>
mp-wp_genesis 178
mp-wp_genesis 179 </fieldset></td>
mp-wp_genesis 180 </tr>
mp-wp_genesis 181 <tr valign="top">
mp-wp_genesis 182 <th scope="row"><?php _e('Default Avatar') ?></th>
mp-wp_genesis 183 <td class="defaultavatarpicker"><fieldset><legend class="hidden"><?php _e('Default Avatar') ?></legend>
mp-wp_genesis 184
mp-wp_genesis 185 <?php _e('For users without a custom avatar of their own, you can either display a generic logo or a generated one based on their e-mail address.'); ?><br />
mp-wp_genesis 186
mp-wp_genesis 187 <?php
mp-wp_genesis 188 $avatar_defaults = array(
mp-wp_genesis 189 'mystery' => __('Mystery Man'),
mp-wp_genesis 190 'blank' => __('Blank'),
mp-wp_genesis 191 'gravatar_default' => __('Gravatar Logo'),
mp-wp_genesis 192 'identicon' => __('Identicon (Generated)'),
mp-wp_genesis 193 'wavatar' => __('Wavatar (Generated)'),
mp-wp_genesis 194 'monsterid' => __('MonsterID (Generated)'),
mp-wp_genesis 195 'fromurl' => __('Extract avatar from URL'),
mp-wp_genesis 196 );
mp-wp_genesis 197 $avatar_defaults = apply_filters('avatar_defaults', $avatar_defaults);
mp-wp_genesis 198 $default = get_option('avatar_default');
mp-wp_genesis 199 if ( empty($default) )
mp-wp_genesis 200 $default = 'mystery';
mp-wp_genesis 201 $size = 32;
mp-wp_genesis 202 $avatar_list = '';
mp-wp_genesis 203 foreach ( $avatar_defaults as $default_key => $default_name ) {
mp-wp_genesis 204 $selected = ($default == $default_key) ? 'checked="checked" ' : '';
mp-wp_genesis 205 $avatar_list .= "\n\t<label><input type='radio' name='avatar_default' id='avatar_{$default_key}' value='{$default_key}' {$selected}/> ";
mp-wp_genesis 206
mp-wp_genesis 207 $avatar = get_avatar( $user_email, $size, $default_key );
mp-wp_genesis 208 $avatar_list .= preg_replace("/src='(.+?)'/", "src='\$1&amp;forcedefault=1'", $avatar);
mp-wp_genesis 209
mp-wp_genesis 210 $avatar_list .= ' ' . $default_name . '</label>';
mp-wp_genesis 211 $avatar_list .= '<br />';
mp-wp_genesis 212 }
mp-wp_genesis 213 echo apply_filters('default_avatar_select', $avatar_list);
mp-wp_genesis 214 ?>
mp-wp_genesis 215
mp-wp_genesis 216 </fieldset></td>
mp-wp_genesis 217 </tr>
mp-wp_genesis 218 <?php do_settings_fields('discussion', 'avatars'); ?>
mp-wp_genesis 219 </table>
mp-wp_genesis 220
mp-wp_genesis 221 <?php do_settings_sections('discussion'); ?>
mp-wp_genesis 222
mp-wp_genesis 223 <p class="submit">
mp-wp_genesis 224 <input type="submit" name="Submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
mp-wp_genesis 225 </p>
mp-wp_genesis 226 </form>
mp-wp_genesis 227 </div>
mp-wp_genesis 228
mp-wp_genesis 229 <?php include('./admin-footer.php'); ?>