get_current_screen()->add_help_tab( array( 'id' => 'overview', 'title' => __( 'Overview' ), 'content' => '<p>' . __( 'This screen provides many options for controlling the management and display of comments and links to your posts/pages. So many, in fact, they will not all fit here! :) Use the documentation links to get information on what each discussion setting does.' ) . '</p>' . '<p>' . __( 'You must click the Save Changes button at the bottom of the screen for new settings to take effect.' ) . '</p>', ) );
<?php /** * Filters the maximum depth of threaded/nested comments. * * @since 2.7.0 * * @param int $max_depth The maximum depth of threaded comments. Default 10. */ $maxdeep = (int) apply_filters( 'thread_comments_depth_max', 10 );
<p><label for="moderation_keys"><?php _e( 'When a comment contains any of these words in its content, author name, URL, email, IP address, or browser’s user agent string, it will be held in the <a href="edit-comments.php?comment_status=moderated">moderation queue</a>. One word or IP address per line. It will match inside words, so “press” will match “WordPress”.' ); ?></label></p> <p> <textarea name="moderation_keys" rows="10" cols="50" id="moderation_keys" class="large-text code"><?php echo esc_textarea( get_option( 'moderation_keys' ) ); ?></textarea> </p> </fieldset></td> </tr> <tr> <th scope="row"><?php _e( 'Disallowed Comment Keys' ); ?></th> <td><fieldset><legend class="screen-reader-text"><span> <?php /* translators: Hidden accessibility text. */ _e( 'Disallowed Comment Keys' ); ?> </span></legend> <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’s user agent string, it will be put in the Trash. One word or IP address per line. It will match inside words, so “press” will match “WordPress”.' ); ?></label></p> <p> <textarea name="disallowed_keys" rows="10" cols="50" id="disallowed_keys" class="large-text code"><?php echo esc_textarea( get_option( 'disallowed_keys' ) ); ?></textarea> </p> </fieldset></td> </tr> <?php do_settings_fields( 'discussion', 'default' ); ?> </table>
<h2 class="title"><?php _e( 'Avatars' ); ?></h2>
<p><?php _e( 'An avatar is an image that can be associated with a user across multiple websites. In this area, you can choose to display avatars of users who interact with the site.' ); ?></p>
<?php // The above would be a good place to link to the documentation on the Gravatar functions, for putting it in themes. Anything like that?
<p> <?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 /> </p>
<?php $avatar_defaults = array( 'mystery' => __( 'Mystery Person' ), 'blank' => __( 'Blank' ), 'gravatar_default' => __( 'Gravatar Logo' ), 'identicon' => __( 'Identicon (Generated)' ), 'wavatar' => __( 'Wavatar (Generated)' ), 'monsterid' => __( 'MonsterID (Generated)' ), 'retro' => __( 'Retro (Generated)' ), 'robohash' => __( 'RoboHash (Generated)' ), ); /** * Filters the default avatars. * * Avatars are stored in key/value pairs, where the key is option value, * and the name is the displayed avatar name. * * @since 2.6.0 * * @param string[] $avatar_defaults Associative array of default avatars. */ $avatar_defaults = apply_filters( 'avatar_defaults', $avatar_defaults ); $default = get_option( 'avatar_default', 'mystery' ); $avatar_list = '';
// Force avatars on to display these choices. add_filter( 'pre_option_show_avatars', '__return_true', 100 );
/** * Filters the HTML output of the default avatar list. * * @since 2.6.0 * * @param string $avatar_list HTML markup of the avatar list. */ echo apply_filters( 'default_avatar_select', $avatar_list ); ?>