WordPress.org

Make WordPress Core

Ticket #24169: 24169.php

File 24169.php, 262 bytes (added by johnjamesjacoby, 5 years ago)

Drop this into /wp-content/mu-plugins/

Line 
1<?php
2
3add_action( 'after_setup_theme', function() {
4        global $current_user;
5        if ( ! empty( $current_user->test_24169 ) ) {
6                die( 'too early' );
7        }
8} );
9       
10add_action( 'set_current_user', function() {
11        global $current_user;
12        $current_user->test_24169 = true;
13} );