-
+ 6A7BA8E30BC4FCA94276F71E666761C9FC9A3A2F03F30BF3E6A8CDA15B1ACCE20ED3D15E77A3642BBF998955F7188F04BF17BDD326AE57F3BD466C1D82687ED4
mp-wp/wp-admin/options-discussion.php
(0 . 0)(1 . 229)
53261 <?php
53262 /**
53263 * Discussion settings administration panel.
53264 *
53265 * @package WordPress
53266 * @subpackage Administration
53267 */
53268
53269 /** WordPress Administration Bootstrap */
53270 require_once('admin.php');
53271
53272 $title = __('Discussion Settings');
53273 $parent_file = 'options-general.php';
53274
53275 include('admin-header.php');
53276 ?>
53277
53278 <div class="wrap">
53279 <?php screen_icon(); ?>
53280 <h2><?php echo wp_specialchars( $title ); ?></h2>
53281
53282 <form method="post" action="options.php">
53283 <?php settings_fields('discussion'); ?>
53284
53285 <table class="form-table">
53286 <tr valign="top">
53287 <th scope="row"><?php _e('Default article settings') ?></th>
53288 <td><fieldset><legend class="hidden"><?php _e('Default article settings') ?></legend>
53289 <label for="default_pingback_flag">
53290 <input name="default_pingback_flag" type="checkbox" id="default_pingback_flag" value="1" <?php checked('1', get_option('default_pingback_flag')); ?> />
53291 <?php _e('Attempt to notify any blogs linked to from the article (slows down posting.)') ?></label>
53292 <br />
53293 <label for="default_ping_status">
53294 <input name="default_ping_status" type="checkbox" id="default_ping_status" value="open" <?php checked('open', get_option('default_ping_status')); ?> />
53295 <?php _e('Allow link notifications from other blogs (pingbacks and trackbacks.)') ?></label>
53296 <br />
53297 <label for="default_comment_status">
53298 <input name="default_comment_status" type="checkbox" id="default_comment_status" value="open" <?php checked('open', get_option('default_comment_status')); ?> />
53299 <?php _e('Allow people to post comments on the article') ?></label>
53300 <br />
53301 <small><em><?php echo '(' . __('These settings may be overridden for individual articles.') . ')'; ?></em></small>
53302 </fieldset></td>
53303 </tr>
53304 <tr valign="top">
53305 <th scope="row"><?php _e('Other comment settings') ?></th>
53306 <td><fieldset><legend class="hidden"><?php _e('Other comment settings') ?></legend>
53307 <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>
53308 <br />
53309 <label for="comment_registration">
53310 <input name="comment_registration" type="checkbox" id="comment_registration" value="1" <?php checked('1', get_option('comment_registration')); ?> />
53311 <?php _e('Users must be registered and logged in to comment') ?>
53312 </label>
53313 <br />
53314
53315 <label for="close_comments_for_old_posts">
53316 <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')); ?> />
53317 <?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" />') ?>
53318 <br />
53319 <label for="thread_comments">
53320 <input name="thread_comments" type="checkbox" id="thread_comments" value="1" <?php checked('1', get_option('thread_comments')); ?> />
53321 <?php
53322
53323 $maxdeep = (int) apply_filters( 'thread_comments_depth_max', 10 );
53324
53325 $thread_comments_depth = '</label><select name="thread_comments_depth" id="thread_comments_depth">';
53326 for ( $i = 1; $i <= $maxdeep; $i++ ) {
53327 $thread_comments_depth .= "<option value='$i'";
53328 if ( get_option('thread_comments_depth') == $i ) $thread_comments_depth .= " selected='selected'";
53329 $thread_comments_depth .= ">$i</option>";
53330 }
53331 $thread_comments_depth .= '</select>';
53332
53333 printf( __('Enable threaded (nested) comments %s levels deep'), $thread_comments_depth );
53334
53335 ?><br />
53336 <label for="page_comments">
53337 <input name="page_comments" type="checkbox" id="page_comments" value="1" <?php checked('1', get_option('page_comments')); ?> />
53338 <?php
53339
53340 $default_comments_page = '</label><label for="default_comments_page"><select name="default_comments_page" id="default_comments_page"><option value="newest"';
53341 if ( 'newest' == get_option('default_comments_page') ) $default_comments_page .= ' selected="selected"';
53342 $default_comments_page .= '>' . __('last') . '</option><option value="oldest"';
53343 if ( 'oldest' == get_option('default_comments_page') ) $default_comments_page .= ' selected="selected"';
53344 $default_comments_page .= '>' . __('first') . '</option></select>';
53345
53346 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 );
53347
53348 ?></label>
53349 <br />
53350 <label for="comment_order"><?php
53351
53352 $comment_order = '<select name="comment_order" id="comment_order"><option value="asc"';
53353 if ( 'asc' == get_option('comment_order') ) $comment_order .= ' selected="selected"';
53354 $comment_order .= '>' . __('older') . '</option><option value="desc"';
53355 if ( 'desc' == get_option('comment_order') ) $comment_order .= ' selected="selected"';
53356 $comment_order .= '>' . __('newer') . '</option></select>';
53357
53358 printf( __('Comments should be displayed with the %s comments at the top of each page'), $comment_order );
53359
53360 ?></label>
53361 </fieldset></td>
53362 </tr>
53363 <tr valign="top">
53364 <th scope="row"><?php _e('E-mail me whenever') ?></th>
53365 <td><fieldset><legend class="hidden"><?php _e('E-mail me whenever') ?></legend>
53366 <label for="comments_notify">
53367 <input name="comments_notify" type="checkbox" id="comments_notify" value="1" <?php checked('1', get_option('comments_notify')); ?> />
53368 <?php _e('Anyone posts a comment') ?> </label>
53369 <br />
53370 <label for="moderation_notify">
53371 <input name="moderation_notify" type="checkbox" id="moderation_notify" value="1" <?php checked('1', get_option('moderation_notify')); ?> />
53372 <?php _e('A comment is held for moderation') ?> </label>
53373 </fieldset></td>
53374 </tr>
53375 <tr valign="top">
53376 <th scope="row"><?php _e('Before a comment appears') ?></th>
53377 <td><fieldset><legend class="hidden"><?php _e('Before a comment appears') ?></legend>
53378 <label for="comment_moderation">
53379 <input name="comment_moderation" type="checkbox" id="comment_moderation" value="1" <?php checked('1', get_option('comment_moderation')); ?> />
53380 <?php _e('An administrator must always approve the comment') ?> </label>
53381 <br />
53382 <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>
53383 </fieldset></td>
53384 </tr>
53385 <tr valign="top">
53386 <th scope="row"><?php _e('Comment Moderation') ?></th>
53387 <td><fieldset><legend class="hidden"><?php _e('Comment Moderation') ?></legend>
53388 <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>
53389
53390 <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>
53391 <p>
53392 <textarea name="moderation_keys" rows="10" cols="50" id="moderation_keys" class="large-text code"><?php form_option('moderation_keys'); ?></textarea>
53393 </p>
53394 </fieldset></td>
53395 </tr>
53396 <tr valign="top">
53397 <th scope="row"><?php _e('Comment Blacklist') ?></th>
53398 <td><fieldset><legend class="hidden"><?php _e('Comment Blacklist') ?></legend>
53399 <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>
53400 <p>
53401 <textarea name="blacklist_keys" rows="10" cols="50" id="blacklist_keys" class="large-text code"><?php form_option('blacklist_keys'); ?></textarea>
53402 </p>
53403 </fieldset></td>
53404 </tr>
53405 <?php do_settings_fields('discussion', 'default'); ?>
53406 </table>
53407
53408 <h3><?php _e('Avatars') ?></h3>
53409
53410 <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>
53411
53412 <?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? ?>
53413
53414 <table class="form-table">
53415 <tr valign="top">
53416 <th scope="row"><?php _e('Avatar Display') ?></th>
53417 <td><fieldset><legend class="hidden"><?php _e('Avatar display') ?></legend>
53418 <?php
53419 $yesorno = array(0 => __("Don’t show Avatars"), 1 => __('Show Avatars'));
53420 foreach ( $yesorno as $key => $value) {
53421 $selected = (get_option('show_avatars') == $key) ? 'checked="checked"' : '';
53422 echo "\n\t<label><input type='radio' name='show_avatars' value='$key' $selected/> $value</label><br />";
53423 }
53424 ?>
53425 </fieldset></td>
53426 </tr>
53427 <tr valign="top">
53428 <th scope="row"><?php _e('Maximum Rating') ?></th>
53429 <td><fieldset><legend class="hidden"><?php _e('Maximum Rating') ?></legend>
53430
53431 <?php
53432 $ratings = array( 'G' => __('G — Suitable for all audiences'), 'PG' => __('PG — Possibly offensive, usually for audiences 13 and above'), 'R' => __('R — Intended for adult audiences above 17'), 'X' => __('X — Even more mature than above'));
53433 foreach ($ratings as $key => $rating) :
53434 $selected = (get_option('avatar_rating') == $key) ? 'checked="checked"' : '';
53435 echo "\n\t<label><input type='radio' name='avatar_rating' value='$key' $selected/> $rating</label><br />";
53436 endforeach;
53437 ?>
53438
53439 </fieldset></td>
53440 </tr>
53441 <tr valign="top">
53442 <th scope="row"><?php _e('Default Avatar') ?></th>
53443 <td class="defaultavatarpicker"><fieldset><legend class="hidden"><?php _e('Default Avatar') ?></legend>
53444
53445 <?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 />
53446
53447 <?php
53448 $avatar_defaults = array(
53449 'mystery' => __('Mystery Man'),
53450 'blank' => __('Blank'),
53451 'gravatar_default' => __('Gravatar Logo'),
53452 'identicon' => __('Identicon (Generated)'),
53453 'wavatar' => __('Wavatar (Generated)'),
53454 'monsterid' => __('MonsterID (Generated)'),
53455 'fromurl' => __('Extract avatar from URL'),
53456 );
53457 $avatar_defaults = apply_filters('avatar_defaults', $avatar_defaults);
53458 $default = get_option('avatar_default');
53459 if ( empty($default) )
53460 $default = 'mystery';
53461 $size = 32;
53462 $avatar_list = '';
53463 foreach ( $avatar_defaults as $default_key => $default_name ) {
53464 $selected = ($default == $default_key) ? 'checked="checked" ' : '';
53465 $avatar_list .= "\n\t<label><input type='radio' name='avatar_default' id='avatar_{$default_key}' value='{$default_key}' {$selected}/> ";
53466
53467 $avatar = get_avatar( $user_email, $size, $default_key );
53468 $avatar_list .= preg_replace("/src='(.+?)'/", "src='\$1&forcedefault=1'", $avatar);
53469
53470 $avatar_list .= ' ' . $default_name . '</label>';
53471 $avatar_list .= '<br />';
53472 }
53473 echo apply_filters('default_avatar_select', $avatar_list);
53474 ?>
53475
53476 </fieldset></td>
53477 </tr>
53478 <?php do_settings_fields('discussion', 'avatars'); ?>
53479 </table>
53480
53481 <?php do_settings_sections('discussion'); ?>
53482
53483 <p class="submit">
53484 <input type="submit" name="Submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
53485 </p>
53486 </form>
53487 </div>
53488
53489 <?php include('./admin-footer.php'); ?>