Making WordPress.org

Changeset 10005


Ignore:
Timestamp:
07/03/2020 04:27:56 AM (4 years ago)
Author:
tellyworth
Message:

Plugin directory: limit the validator to logged-in users.

This could potentially change if we add some better resource-limiting measures.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/shortcodes/class-block-validator.php

    r10004 r10005  
    1212        ob_start();
    1313        $plugin_url = $_REQUEST['plugin_url'] ?? '';
     14
     15        if ( is_user_logged_in() ) :
    1416        ?>
    1517        <div class="wrap">
     
    3133            ?>
    3234        </div>
    33         <?php
     35        <?php else: ?>
     36        <div class="wrap">
     37            <p><?php _e( 'Please log in to use the validator.', 'wporg-plugins' ); ?></p>
     38        </div>
     39        <?php endif;
    3440        return ob_get_clean();
    3541    }
Note: See TracChangeset for help on using the changeset viewer.