Skip to content

Commit

Permalink
Updated to new WPZA branding. Added Robots No Follow. Removed some ex…
Browse files Browse the repository at this point in the history
…ternal links.
  • Loading branch information
djm56 committed Aug 18, 2017
1 parent 5f54a79 commit e044484
Show file tree
Hide file tree
Showing 8 changed files with 71 additions and 77 deletions.
2 changes: 2 additions & 0 deletions README.md
Expand Up @@ -3,6 +3,8 @@ WordPress Plugin used to create maintenance page while site is parked or in deve

The plugin shows a landing page for maintenance, but when you log in the active template is shown.

Version: 2.0.0

## Installation

### Via ZIP package
Expand Down
29 changes: 14 additions & 15 deletions includes/default/assets/css/style.css
@@ -1,29 +1,28 @@
/*
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
WPZA Website Maintenance Services
https://wpza.co.za
*/
/*
Created on : Nov 22, 2016, 12:59:23 PM
Author : Donovan Maidens <donovan@anomalous.co.za>
*/

body {
font-family: 'Source Sans Pro', sans-serif;
font-size: 16px;
line-height: 1.5;
background-color: #297fb8 !important;
color: #ffffff;
background-color: #e3e3e3 !important;
color: #4D4D4D;
padding-top:60px;
}

.wpza-logo {

max-width: 450px;
margin-top: 15px;
}
h1 {
font-size: 38px;
margin-bottom: 22px;
font-size: 38px;
margin-bottom: 22px;
}
a {
color: #ffffff;
color: #CC3333;
}
footer {
margin-top:30px;
}
}
/* Last Line of style */
Binary file added includes/default/assets/img/WPZA-Logo-Colour.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed includes/default/assets/img/wpza_small.jpeg
Binary file not shown.
2 changes: 0 additions & 2 deletions includes/default/assets/js/index.php

This file was deleted.

48 changes: 26 additions & 22 deletions includes/default/template.php
@@ -1,50 +1,54 @@
<?php
/**
* Maintenance mode template that's shown to logged out users.
* Maintenance mode template this is what non logged in users see.
*
* @package ng-maintenance-mode
* @copyright Copyright (c) 2015, Ashley Evans
* @license GPL2+
*/
?>
<!DOCTYPE html>
<!-- WPZA Website Maintenance Services -->
<!-- https://wpza.co.za -->
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="profile" href="http://gmpg.org/xfn/11">

<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro" rel="stylesheet">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="<?php echo plugins_url('default/assets/css/style.css', dirname(__FILE__)); ?>">

<title>Maintenance & Development Mode | <?php echo esc_html(get_bloginfo('name')); ?></title>
<meta name=”robots” content=”noindex,nofollow,noodp” />
</head>

<body>

<div class="container">
<div class="row">
<div class="col-sm-12">
<header>
<h1><strong><?php echo get_site_url(); ?></strong> <small>is coming soon.</small></h1>
<hr>
</header>
</div>
<div class="col-sm-6">
<header>
<img src="<?php echo plugins_url('default/assets/img/wpza_small.jpeg', dirname(__FILE__)); ?>" width="150" height="150" alt="WPZA Logo"><br>
<h1><strong><?php echo get_site_url(); ?></strong></h1>

<hr>
<h1>Hosted by <strong>WPZA</strong>.</h1>
</header>

<main>
<p>WPZA specializes is hosting and maintaining WordPress Websites. Have a look at our specialized WordPress Maintenance Services at <br>
<a href="https://wpza.co.za" target="_blank"><strong>https://wpza.co.za</strong></a></p>
</main>
<main>
<h3><?php echo get_site_url(); ?> is being hosted by WPZA.</h3>
<p>WPZA specializes is hosting and maintaining WordPress Websites. Have a look at our specialized WordPress Maintenance Services at <br>
<a href="https://wpza.co.za" target="_blank"><strong>https://wpza.co.za</strong></a></p>
<h4>WPZA keep's your WordPress site: secure, maintained, recoverable and up to date.</h4>
</main>
</div>
<div class="col-sm-6">
<img src="<?php echo plugins_url('default/assets/img/WPZA-Logo-Colour.png', dirname(__FILE__)); ?>" alt="WPZA Logo" class="wpza-logo img-responsive"><br>
</div>
<div class="col-sm-12">
<footer>
<hr>
<p><small>&copy; WPZA Maintenance Services</small></p>
</footer>
</div></div>
<p><small>&copy; <?php echo date("Y"); ?> WPZA Website Maintenance Services</small></p>
</footer>
</div>
</div>
</div>

</body>
</html>
<!-- WPZA Website Maintenance Services -->
26 changes: 13 additions & 13 deletions includes/wpza-maintenance-development-mode.php
Expand Up @@ -16,19 +16,19 @@
* @return void
*/
function wpza_maintenance_mode() {
global $pagenow;
if ( $pagenow !== 'wp-login.php' && ! current_user_can( 'manage_options' ) && ! is_admin() ) {
header( 'HTTP/1.1 Service Unavailable', true, 503 );
header( 'Content-Type: text/html; charset=utf-8' );
if ( file_exists( plugin_dir_path( __FILE__ ) . 'custom/template.php' ) ) {
require_once( plugin_dir_path( __FILE__ ) . 'custom/template.php' );
} else {
require_once( plugin_dir_path( __FILE__ ) . 'default/template.php' );
}
die();
}
global $pagenow;
if ( $pagenow !== 'wp-login.php' && ! current_user_can( 'manage_options' ) && ! is_admin() ) {

header( 'HTTP/1.1 Service Unavailable', true, 503 );
header( 'Content-Type: text/html; charset=utf-8' );

if ( file_exists( plugin_dir_path( __FILE__ ) . 'custom/template.php' ) ) {
require_once( plugin_dir_path( __FILE__ ) . 'custom/template.php' );
} else {
require_once( plugin_dir_path( __FILE__ ) . 'default/template.php' );
}
die();
}
}

add_action( 'wp_loaded', 'wpza_maintenance_mode' );
41 changes: 16 additions & 25 deletions wpza-maintenance-development.php
Expand Up @@ -8,49 +8,40 @@
*
* @wordpress-plugin
* Plugin Name: Maintenance & Development Mode
* Plugin URI: https://wpza.co.za/wpza-plugins
* Description: WPZA Maintenance mode plugin, use this plugin while developing the web site.
* Version: 1.0.0
* Plugin URI: https://wpza.co.za/
* Description: This plugin puts the site into maintenance mode. Use this plugin while developing your web site.
* Version: 2.0.0
* Author: Donovan Maidens
* Author URI: https://wpza.co.za
*/
// If this file is called directly, abort.
if (!defined('WPINC')) {
die;
}
if(!class_exists("WPZAMaintenancePlugin"))
{

class WPZAMaintenancePlugin
{

public function __construct()
{
if (!class_exists("WPZAMaintenancePlugin")) {

require_once(sprintf("%s/includes/wpza-maintenance-development-mode.php", dirname(__FILE__)));
class WPZAMaintenancePlugin {

}
public function __construct() {
require_once(sprintf("%s/includes/wpza-maintenance-development-mode.php", dirname(__FILE__)));
}


public static function activate()
{
public static function activate() {
// Do something
}


public static function deactivate()
{
public static function deactivate() {
// Do something
}
}
}

}

}

if(class_exists('WPZAMaintenancePlugin'))
{
if (class_exists('WPZAMaintenancePlugin')) {
// Installation and uninstallation hooks
register_activation_hook(__FILE__, array('WPZAMaintenancePlugin', 'activate'));
register_deactivation_hook(__FILE__, array('WPZAMaintenancePlugin', 'deactivate'));



$plugin = new WPZAMaintenancePlugin();
}

0 comments on commit e044484

Please sign in to comment.