Making WordPress.org

source: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/comments.php

Last change on this file was 11613, checked in by dd32, 3 months ago

Support Forums: Include a "Do not use this for support requests" to the comment form on articles.

A lot of the comments received on articles are looking for individual support, or clarification how to proceed with something in the article.
Hopefully by adding a suggestion to create a forum thread instead, it'll help some of the commenters to ask it in a more appropriate location.

File size: 1.9 KB
Line 
1<?php
2/**
3 * The template file for displaying the comments and comment form
4 *
5 * @package WPBBP
6 */
7
8if ( post_password_required() ) {
9        return;
10}
11
12$post_id = get_the_ID();
13
14if ( comments_open() ) :
15        if ( filter_input( INPUT_GET, 'feedback_submitted' ) ) : ?>
16                <h2 id="reply-title" class="comment-reply-title">
17                        <?php esc_html_e( 'Thank you for your feedback', 'wporg-forums' ); ?>
18                </h2>
19                <p>
20                        <?php esc_html_e( 'We will review it as quickly as possible.', 'wporg-forums' ); ?>
21                </p>
22        <?php else :
23        comment_form(
24                array(
25                        'title_reply_before'  => '<h2 id="reply-title" class="comment-reply-title">',
26                        'title_reply'         => __( 'Was this article helpful? How could it be improved?', 'wporg-forums' ),
27                        'title_reply_after'   => '</h2>',
28                        'must_log_in'         => sprintf(
29                                '<p class="must-log-in">%s</p>',
30                                sprintf(
31                                        wp_kses_post( __( 'You must be <a href="%s">logged in</a> to submit feedback.', 'wporg-forums' ) ),
32                                        wp_login_url( apply_filters( 'the_permalink', get_permalink( $post_id ), $post_id ) )
33                                )
34                        ),
35                        'comment_field'       => sprintf(
36                                '<p class="comment-form-comment">%s %s</p>',
37                                sprintf(
38                                        '<label for="comment" class="screen-reader-text">%s</label>',
39                                        _x( 'Feedback', 'noun', 'wporg-forums' )
40                                ),
41                                '<textarea id="comment" name="comment" rows="6" maxlength="65525" required></textarea>'
42                        ),
43                        'comment_notes_after' => esc_html__( 'Feedback you send to us will go only to the folks who maintain documentation. They may reach out in case there are questions or would like to followup feedback. But that too will stay behind the scenes.', 'wporg-forums' ) .
44                                                 '<br>' . sprintf( __( '<strong>This is not for personalized support.</strong> Please create a <a href="%s">forum thread</a> instead to receive help from the community.', 'wporg-forums'), home_url( '/forums/#bbpress-forums' ) ),
45                        'label_submit'        => __( 'Submit Feedback', 'wporg-forums' ),
46                )
47        );
48        endif;
49endif;
Note: See TracBrowser for help on using the repository browser.