public
Last active

T5 Force Log In

  • Download Gist
t5-force-log-in.php
PHP
1 2 3 4 5 6 7 8 9 10 11 12 13 14
<?php # -*- coding: utf-8 -*-
/**
* Plugin Name: T5 Force Log In
* Description: Grant access after log in only
* Plugin URI: http://toscho.de/?p=2207
* Version: 2012.08.28
* Author: Thomas Scholz
* Author URI: http://toscho.de
* License: MIT
* License URI: http://www.opensource.org/licenses/mit-license.php
*/
add_action( 'template_redirect', function() {
is_user_logged_in() || auth_redirect();
});

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.