Search
 
SCRIPT & CODE EXAMPLE
 

PHP

function wp_maintenance_mode() { 763

// Activate WordPress Maintenance Mode
function wp_maintenance_mode(){
    if(!current_user_can('edit_themes') || !is_user_logged_in()){
        wp_die('<h1 style="color:red">Website under Maintenance</h1><br />We are performing scheduled maintenance. We will be back on-line shortly!');
    }
}
add_action('get_header', 'wp_maintenance_mode');
Comment

PREVIOUS NEXT
Code Example
Php :: php foreach show only 4 
Php :: wordpress not logging when using ngrok 
Php :: PHP wordwrap — Wraps a string to a given number of characters 
Php :: how to write a php program for an electricity bill using if-else conditions 
Php :: codeigniter round off function 
Php :: public function __sleep() and __wakeup() 
Php :: php to html 
Php :: how to search locations in php using ajax google script 
Php :: laravel filemanger choose multiple images 
Php :: laravel model relationships with two columns match 
Php :: one to many laravel 
Php :: laravel find query 
Php :: laravel 
Php :: php trait 
Php :: subquery in laravel 
Php :: display picture in pdf generated with laravel 
Php :: phpunit/phpunit[6.0.0, ..., 6.5.14] require php ^7.0 - your php version (8.0.0) does not satisfy that requirement. 
Php :: how to increment date in php 
Php :: php check if passwords match 
Php :: insert chevron on form select field on caldera 
Java :: print map java 
Java :: java get current year 
Java :: latest dependency for snackbar android 
Java :: java integer to binary string with leading zeros 
Java :: java check if number is even 
Java :: java try catch integer.parseint 
Java :: love2d set screen size 
Java :: spring boot id auto generated 
Java :: format localdatetime 
Java :: add label gui jframe 
ADD CONTENT
Topic
Content
Source link
Name
1+4 =