-
Notifications
You must be signed in to change notification settings - Fork 0
/
appartig_maintenance.php
43 lines (32 loc) · 909 Bytes
/
appartig_maintenance.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
/*
Plugin Name: AppArtig Maintenance
Description: Simple Maintenance Page for not logged in Users
Version: 1.1.0
Author: AppArtig e.U.
Author URI: https://www.appartig.at
License: APPARTIG/AGB
License URI: https://www.appartig.at/agb
Text Domain: aamt
*/
/******************************************************
** Main
******************************************************/
defined('ABSPATH') || exit('');
function aamt_show_maintenance_page()
{
$aamt_title = get_bloginfo('name');
$aamt_URL = plugin_dir_url(__FILE__);
require_once('template.html');
die();
}
function aamt_check_show_maintenance_page()
{
if (in_array($GLOBALS['pagenow'], array('wp-login.php', 'wp-register.php')))
return;
if (is_user_logged_in())
return;
aamt_show_maintenance_page();
}
add_action('get_header', 'aamt_check_show_maintenance_page');
?>