wp/wp-admin/options-discussion.php
changeset 21 48c4eec2b7e6
parent 19 3d72ae0968f4
child 22 8c2e4d02f4ef
equal deleted inserted replaced
20:7b1b88e27a20 21:48c4eec2b7e6
    27 	)
    27 	)
    28 );
    28 );
    29 
    29 
    30 get_current_screen()->set_help_sidebar(
    30 get_current_screen()->set_help_sidebar(
    31 	'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
    31 	'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
    32 	'<p>' . __( '<a href="https://wordpress.org/support/article/settings-discussion-screen/">Documentation on Discussion Settings</a>' ) . '</p>' .
    32 	'<p>' . __( '<a href="https://wordpress.org/documentation/article/settings-discussion-screen/">Documentation on Discussion Settings</a>' ) . '</p>' .
    33 	'<p>' . __( '<a href="https://wordpress.org/support/">Support</a>' ) . '</p>'
    33 	'<p>' . __( '<a href="https://wordpress.org/support/forums/">Support forums</a>' ) . '</p>'
    34 );
    34 );
    35 
    35 
    36 require_once ABSPATH . 'wp-admin/admin-header.php';
    36 require_once ABSPATH . 'wp-admin/admin-header.php';
    37 ?>
    37 ?>
    38 
    38 
    43 <?php settings_fields( 'discussion' ); ?>
    43 <?php settings_fields( 'discussion' ); ?>
    44 
    44 
    45 <table class="form-table" role="presentation">
    45 <table class="form-table" role="presentation">
    46 <tr>
    46 <tr>
    47 <th scope="row"><?php _e( 'Default post settings' ); ?></th>
    47 <th scope="row"><?php _e( 'Default post settings' ); ?></th>
    48 <td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Default post settings' ); ?></span></legend>
    48 <td><fieldset><legend class="screen-reader-text"><span>
       
    49 	<?php
       
    50 	/* translators: Hidden accessibility text. */
       
    51 	_e( 'Default post settings' );
       
    52 	?>
       
    53 </span></legend>
    49 <label for="default_pingback_flag">
    54 <label for="default_pingback_flag">
    50 <input name="default_pingback_flag" type="checkbox" id="default_pingback_flag" value="1" <?php checked( '1', get_option( 'default_pingback_flag' ) ); ?> />
    55 <input name="default_pingback_flag" type="checkbox" id="default_pingback_flag" value="1" <?php checked( '1', get_option( 'default_pingback_flag' ) ); ?> />
    51 <?php _e( 'Attempt to notify any blogs linked to from the post' ); ?></label>
    56 <?php _e( 'Attempt to notify any blogs linked to from the post' ); ?></label>
    52 <br />
    57 <br />
    53 <label for="default_ping_status">
    58 <label for="default_ping_status">
    61 <p class="description"><?php _e( 'Individual posts may override these settings. Changes here will only be applied to new posts.' ); ?></p>
    66 <p class="description"><?php _e( 'Individual posts may override these settings. Changes here will only be applied to new posts.' ); ?></p>
    62 </fieldset></td>
    67 </fieldset></td>
    63 </tr>
    68 </tr>
    64 <tr>
    69 <tr>
    65 <th scope="row"><?php _e( 'Other comment settings' ); ?></th>
    70 <th scope="row"><?php _e( 'Other comment settings' ); ?></th>
    66 <td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Other comment settings' ); ?></span></legend>
    71 <td><fieldset><legend class="screen-reader-text"><span>
       
    72 	<?php
       
    73 	/* translators: Hidden accessibility text. */
       
    74 	_e( 'Other comment settings' );
       
    75 	?>
       
    76 </span></legend>
    67 <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 email' ); ?></label>
    77 <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 email' ); ?></label>
    68 <br />
    78 <br />
    69 <label for="comment_registration">
    79 <label for="comment_registration">
    70 <input name="comment_registration" type="checkbox" id="comment_registration" value="1" <?php checked( '1', get_option( 'comment_registration' ) ); ?> />
    80 <input name="comment_registration" type="checkbox" id="comment_registration" value="1" <?php checked( '1', get_option( 'comment_registration' ) ); ?> />
    71 <?php _e( 'Users must be registered and logged in to comment' ); ?>
    81 <?php _e( 'Users must be registered and logged in to comment' ); ?>
    72 <?php
    82 <?php
    73 if ( ! get_option( 'users_can_register' ) && is_multisite() ) {
    83 if ( ! get_option( 'users_can_register' ) && is_multisite() ) {
    74 	echo ' ' . __( '(Signup has been disabled. Only members of this site can comment.)' );}
    84 	echo ' ' . __( '(Signup has been disabled. Only members of this site can comment.)' );
       
    85 }
    75 ?>
    86 ?>
    76 </label>
    87 </label>
    77 <br />
    88 <br />
    78 
    89 
    79 <label for="close_comments_for_old_posts">
    90 <label for="close_comments_for_old_posts">
   163 </label>
   174 </label>
   164 </fieldset></td>
   175 </fieldset></td>
   165 </tr>
   176 </tr>
   166 <tr>
   177 <tr>
   167 <th scope="row"><?php _e( 'Email me whenever' ); ?></th>
   178 <th scope="row"><?php _e( 'Email me whenever' ); ?></th>
   168 <td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Email me whenever' ); ?></span></legend>
   179 <td><fieldset><legend class="screen-reader-text"><span>
       
   180 	<?php
       
   181 	/* translators: Hidden accessibility text. */
       
   182 	_e( 'Email me whenever' );
       
   183 	?>
       
   184 </span></legend>
   169 <label for="comments_notify">
   185 <label for="comments_notify">
   170 <input name="comments_notify" type="checkbox" id="comments_notify" value="1" <?php checked( '1', get_option( 'comments_notify' ) ); ?> />
   186 <input name="comments_notify" type="checkbox" id="comments_notify" value="1" <?php checked( '1', get_option( 'comments_notify' ) ); ?> />
   171 <?php _e( 'Anyone posts a comment' ); ?> </label>
   187 <?php _e( 'Anyone posts a comment' ); ?> </label>
   172 <br />
   188 <br />
   173 <label for="moderation_notify">
   189 <label for="moderation_notify">
   175 <?php _e( 'A comment is held for moderation' ); ?> </label>
   191 <?php _e( 'A comment is held for moderation' ); ?> </label>
   176 </fieldset></td>
   192 </fieldset></td>
   177 </tr>
   193 </tr>
   178 <tr>
   194 <tr>
   179 <th scope="row"><?php _e( 'Before a comment appears' ); ?></th>
   195 <th scope="row"><?php _e( 'Before a comment appears' ); ?></th>
   180 <td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Before a comment appears' ); ?></span></legend>
   196 <td><fieldset><legend class="screen-reader-text"><span>
       
   197 	<?php
       
   198 	/* translators: Hidden accessibility text. */
       
   199 	_e( 'Before a comment appears' );
       
   200 	?>
       
   201 </span></legend>
   181 <label for="comment_moderation">
   202 <label for="comment_moderation">
   182 <input name="comment_moderation" type="checkbox" id="comment_moderation" value="1" <?php checked( '1', get_option( 'comment_moderation' ) ); ?> />
   203 <input name="comment_moderation" type="checkbox" id="comment_moderation" value="1" <?php checked( '1', get_option( 'comment_moderation' ) ); ?> />
   183 <?php _e( 'Comment must be manually approved' ); ?> </label>
   204 <?php _e( 'Comment must be manually approved' ); ?> </label>
   184 <br />
   205 <br />
   185 <label for="comment_previously_approved"><input type="checkbox" name="comment_previously_approved" id="comment_previously_approved" value="1" <?php checked( '1', get_option( 'comment_previously_approved' ) ); ?> /> <?php _e( 'Comment author must have a previously approved comment' ); ?></label>
   206 <label for="comment_previously_approved"><input type="checkbox" name="comment_previously_approved" id="comment_previously_approved" value="1" <?php checked( '1', get_option( 'comment_previously_approved' ) ); ?> /> <?php _e( 'Comment author must have a previously approved comment' ); ?></label>
   186 </fieldset></td>
   207 </fieldset></td>
   187 </tr>
   208 </tr>
   188 <tr>
   209 <tr>
   189 <th scope="row"><?php _e( 'Comment Moderation' ); ?></th>
   210 <th scope="row"><?php _e( 'Comment Moderation' ); ?></th>
   190 <td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Comment Moderation' ); ?></span></legend>
   211 <td><fieldset><legend class="screen-reader-text"><span>
       
   212 	<?php
       
   213 	/* translators: Hidden accessibility text. */
       
   214 	_e( 'Comment Moderation' );
       
   215 	?>
       
   216 </span></legend>
   191 <p><label for="comment_max_links">
   217 <p><label for="comment_max_links">
   192 <?php
   218 <?php
   193 printf(
   219 printf(
   194 	/* translators: %s: Number of links. */
   220 	/* translators: %s: Number of links. */
   195 	__( '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.)' ),
   221 	__( '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.)' ),
   204 </p>
   230 </p>
   205 </fieldset></td>
   231 </fieldset></td>
   206 </tr>
   232 </tr>
   207 <tr>
   233 <tr>
   208 <th scope="row"><?php _e( 'Disallowed Comment Keys' ); ?></th>
   234 <th scope="row"><?php _e( 'Disallowed Comment Keys' ); ?></th>
   209 <td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Disallowed Comment Keys' ); ?></span></legend>
   235 <td><fieldset><legend class="screen-reader-text"><span>
       
   236 	<?php
       
   237 	/* translators: Hidden accessibility text. */
       
   238 	_e( 'Disallowed Comment Keys' );
       
   239 	?>
       
   240 </span></legend>
   210 <p><label for="disallowed_keys"><?php _e( 'When a comment contains any of these words in its content, author name, URL, email, IP address, or browser&#8217;s user agent string, it will be put in the Trash. One word or IP address per line. It will match inside words, so &#8220;press&#8221; will match &#8220;WordPress&#8221;.' ); ?></label></p>
   241 <p><label for="disallowed_keys"><?php _e( 'When a comment contains any of these words in its content, author name, URL, email, IP address, or browser&#8217;s user agent string, it will be put in the Trash. One word or IP address per line. It will match inside words, so &#8220;press&#8221; will match &#8220;WordPress&#8221;.' ); ?></label></p>
   211 <p>
   242 <p>
   212 <textarea name="disallowed_keys" rows="10" cols="50" id="disallowed_keys" class="large-text code"><?php echo esc_textarea( get_option( 'disallowed_keys' ) ); ?></textarea>
   243 <textarea name="disallowed_keys" rows="10" cols="50" id="disallowed_keys" class="large-text code"><?php echo esc_textarea( get_option( 'disallowed_keys' ) ); ?></textarea>
   213 </p>
   244 </p>
   214 </fieldset></td>
   245 </fieldset></td>
   240 	</label>
   271 	</label>
   241 </td>
   272 </td>
   242 </tr>
   273 </tr>
   243 <tr class="avatar-settings<?php echo $show_avatars_class; ?>">
   274 <tr class="avatar-settings<?php echo $show_avatars_class; ?>">
   244 <th scope="row"><?php _e( 'Maximum Rating' ); ?></th>
   275 <th scope="row"><?php _e( 'Maximum Rating' ); ?></th>
   245 <td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Maximum Rating' ); ?></span></legend>
   276 <td><fieldset><legend class="screen-reader-text"><span>
       
   277 	<?php
       
   278 	/* translators: Hidden accessibility text. */
       
   279 	_e( 'Maximum Rating' );
       
   280 	?>
       
   281 </span></legend>
   246 
   282 
   247 <?php
   283 <?php
   248 $ratings = array(
   284 $ratings = array(
   249 	/* translators: Content suitability rating: https://en.wikipedia.org/wiki/Motion_Picture_Association_of_America_film_rating_system */
   285 	/* translators: Content suitability rating: https://en.wikipedia.org/wiki/Motion_Picture_Association_of_America_film_rating_system */
   250 	'G'  => __( 'G &#8212; Suitable for all audiences' ),
   286 	'G'  => __( 'G &#8212; Suitable for all audiences' ),
   263 
   299 
   264 </fieldset></td>
   300 </fieldset></td>
   265 </tr>
   301 </tr>
   266 <tr class="avatar-settings<?php echo $show_avatars_class; ?>">
   302 <tr class="avatar-settings<?php echo $show_avatars_class; ?>">
   267 <th scope="row"><?php _e( 'Default Avatar' ); ?></th>
   303 <th scope="row"><?php _e( 'Default Avatar' ); ?></th>
   268 <td class="defaultavatarpicker"><fieldset><legend class="screen-reader-text"><span><?php _e( 'Default Avatar' ); ?></span></legend>
   304 <td class="defaultavatarpicker"><fieldset><legend class="screen-reader-text"><span>
       
   305 	<?php
       
   306 	/* translators: Hidden accessibility text. */
       
   307 	_e( 'Default Avatar' );
       
   308 	?>
       
   309 </span></legend>
   269 
   310 
   270 <p>
   311 <p>
   271 <?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 email address.' ); ?><br />
   312 <?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 email address.' ); ?><br />
   272 </p>
   313 </p>
   273 
   314 
   278 	'gravatar_default' => __( 'Gravatar Logo' ),
   319 	'gravatar_default' => __( 'Gravatar Logo' ),
   279 	'identicon'        => __( 'Identicon (Generated)' ),
   320 	'identicon'        => __( 'Identicon (Generated)' ),
   280 	'wavatar'          => __( 'Wavatar (Generated)' ),
   321 	'wavatar'          => __( 'Wavatar (Generated)' ),
   281 	'monsterid'        => __( 'MonsterID (Generated)' ),
   322 	'monsterid'        => __( 'MonsterID (Generated)' ),
   282 	'retro'            => __( 'Retro (Generated)' ),
   323 	'retro'            => __( 'Retro (Generated)' ),
       
   324 	'robohash'         => __( 'RoboHash (Generated)' ),
   283 );
   325 );
   284 /**
   326 /**
   285  * Filters the default avatars.
   327  * Filters the default avatars.
   286  *
   328  *
   287  * Avatars are stored in key/value pairs, where the key is option value,
   329  * Avatars are stored in key/value pairs, where the key is option value,