Ticket #23233: 23233.diff
File 23233.diff, 4.0 KB (added by , 11 years ago) |
---|
-
wp-admin/options-discussion.php
5 5 * @package WordPress 6 6 * @subpackage Administration 7 7 */ 8 9 8 /** WordPress Administration Bootstrap */ 10 9 require_once( dirname( __FILE__ ) . '/admin.php' ); 11 10 … … 132 131 </fieldset></td> 133 132 </tr> 134 133 <tr valign="top"> 135 <th scope="row"><?php _e('Before a comment appears'); ?></th>136 <td><fieldset><legend class="screen-reader-text"><span><?php _e('Before a comment appears'); ?></span></legend>137 <label for="comment_moderation">138 <input name="comment_moderation" type="checkbox" id="comment_moderation" value="1" <?php checked('1', get_option('comment_moderation')); ?> />139 <?php _e('Comment must be manually approved'); ?> </label>140 <br />141 <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>142 </fieldset></td>143 </tr>144 <tr valign="top">145 134 <th scope="row"><?php _e('Comment Moderation'); ?></th> 146 135 <td><fieldset><legend class="screen-reader-text"><span><?php _e('Comment Moderation'); ?></span></legend> 136 <label for="comment_moderation_manually_approved"> 137 <input name="comment_moderation" id="comment_moderation_manually_approved" type="radio" value="manually_approve" <?php checked( 'manually_approve', get_option( 'comment_moderation' ) ) ?> /> 138 <?php _e( 'All comments must be manually approved' ); ?> 139 </label> 140 <br /> 141 <label for="comment_moderation_whitelist_previous_commenters"> 142 <input name="comment_moderation" id="comment_moderation_whitelist_previous_commenters" type="radio" value="whitelist_previous_commenters" <?php checked( 'whitelist_previous_commenters', get_option( 'comment_moderation' ) ) ?> /> 143 <?php _e( 'Only comments by new commenters must be approved' ); ?> 144 </label> 145 <br /> 146 <label for="comment_moderation_approve_all"> 147 <input name="comment_moderation" id="comment_moderation_approve_all" type="radio" value="approve_all" <?php checked( 'approve_all', get_option( 'comment_moderation' ) ) ?> /> 148 <?php _e( 'All comments are automatically approved' ); ?> 149 </label> 147 150 <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="number" step="1" min="0" id="comment_max_links" value="' . esc_attr(get_option('comment_max_links')) . '" class="small-text" />' ); ?></label></p> 148 151 149 152 <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> -
wp-admin/includes/upgrade.php
402 402 if ( $wp_current_db_version < 22422 ) 403 403 upgrade_350(); 404 404 405 if ( $wp_current_db_version < 25448 ) 406 upgrade_comment_moderation_option(); 407 405 408 maybe_disable_link_manager(); 406 409 407 410 maybe_disable_automattic_widgets(); … … 1209 1212 } 1210 1213 1211 1214 /** 1215 * Temporary function to be rolled into next upgrade_{next_major_version}() function. 1216 */ 1217 function upgrade_comment_moderation_option() { 1218 if ( get_option( 'comment_moderation' ) ) 1219 update_option( 'comment_moderation', 'manually_approve' ); 1220 else if ( get_option( 'comment_whitelist' ) ) 1221 update_option( 'comment_moderation', 'whitelist_previous_commenters' ); 1222 else 1223 update_option( 'comment_moderation', 'approve_all' ); 1224 delete_option( 'comment_whitelist' ); 1225 } 1226 1227 /** 1212 1228 * Execute network level changes 1213 1229 * 1214 1230 * @since 3.0.0