Making WordPress.org

Changeset 1687


Ignore:
Timestamp:
06/28/2015 05:51:49 AM (9 years ago)
Author:
coffee2code
Message:

developer.wordpress.org: Default to allowing user contributed notes from any user.

  • Enable submission of user contributed notes by default.
  • Add redirect_to query arg to login link so that user will be redirected back after logging in.
  • In [10530-dotorg], a restriction via the 'wporg_devhub-can_user_post_note' hook was removed that prevented non-logged in users from seeing the message that they can log in to submit a note.

Fixes #1094.

Location:
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/comments.php

    r1675 r1687  
    5858    <?php endif; // have_comments() ?>
    5959
    60     <?php if ( \DevHub\is_parsed_post_type() && DevHub\can_user_post_note( false, get_the_ID() ) ) : ?>
     60    <?php if ( \DevHub\is_parsed_post_type() && DevHub\can_user_post_note( true, get_the_ID() ) ) : ?>
    6161
    6262        <p id="add-user-note" style="display:none;"><a href=""><?php _e( 'Have a note to contribute?', 'wporg' ); ?></a></p>
     
    7474                '</p>',
    7575            'label_submit'        => __( 'Add Note', 'wporg' ),
    76             'must_log_in'         => '<p>' . sprintf( __( 'You must <a href="%s">log in</a> before being able to contribute a note.', 'wporg' ), 'https://wordpress.org/support/bb-login.php' ) . '</p>',
     76            'must_log_in'         => '<p>' . sprintf(
     77                __( 'You must <a href="%s">log in</a> before being able to contribute a note.', 'wporg' ),
     78                'https://wordpress.org/support/bb-login.php?redirect_to=' . urlencode( get_comments_link() )
     79            ) . '</p>',
    7780            'title_reply'         =>  '', //'Add Example'
    7881        ) ); ?>
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/template-tags.php

    r1676 r1687  
    11231123     * blog.
    11241124     *
    1125      * @param  bool    $open If the user can post comments in general. Disregarded.
     1125     * @param  bool    $open If the user can post comments in general.
    11261126     * @param  WP_Post $post Post ID or post object.
    11271127     *
     
    11391139        }
    11401140
    1141         // Default to limiting ability to post notes to members of the blog.
    1142         return is_user_member_of_blog();
     1141        return $open;
    11431142    }
    11441143
Note: See TracChangeset for help on using the changeset viewer.