Making WordPress.org

Changeset 782


Ignore:
Timestamp:
08/12/2014 06:28:20 AM (11 years ago)
Author:
coffee2code
Message:

Code Reference: only permit access to handbooks to site members

File:
1 edited

Legend:

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

    r777 r782  
    483483 */
    484484function redirect_handbook() {
    485     if ( 'handbook' == get_query_var( 'name' ) && ! get_query_var( 'post_type ' ) ) {
     485    if (
     486        // Naked /handbook/ request
     487        ( 'handbook' == get_query_var( 'name' ) && ! get_query_var( 'post_type ' ) ) ||
     488        // Temporary: Disable access to handbooks unless a member of the site
     489        ( ! is_user_member_of_blog() && is_post_type_archive( array( 'plugin-handbook', 'theme-handbook' ) ) )
     490    ) {
    486491        wp_redirect( home_url() );
    487492        exit();
Note: See TracChangeset for help on using the changeset viewer.