Skip to content
Permalink
Browse files

Initial Upload Added core functionality.

  • Loading branch information...
djm56 committed Nov 23, 2016
1 parent 80b5e37 commit b58721e89662bde15dc5caa805c30e2a783147b2
Showing with 119 additions and 2 deletions.
  1. +1 −0 .gitignore
  2. +21 −2 README.md
  3. +24 −0 includes/disable-auto-update.php
  4. +2 −0 includes/index.php
  5. +2 −0 index.php
  6. +13 −0 uninstall.php
  7. +56 −0 wpza-disable-auto-update.php
@@ -16,3 +16,4 @@ wp-content/plugins/hello.php
/sitemap.xml
/sitemap.xml.gz

/nbproject/private/
@@ -1,2 +1,21 @@
# WPZA-Disable-Auto-Updates
WordPress plugin used by WPZA to disable automatic updates
# Disable Auto Updates
WordPress plugin used to disable all automatic updates to Core, Theme's or plugins.

*This plugin should only be used if your WordPress site is actively maintained.*

## Installation

### Via ZIP package

1. [Download ZIP package](https://wpza.co.za).
2. In your WP administration go to *Plugins* / *Add New* / *Upload plugin*.
3. Select the ZIP package you've downloaded in step 1.
4. Go to *Plugins* and enable Disable Auto Updates.

## Authors

* **Donovan Maidens** - *Initial work* - [WPZA](https://wpza.co.za)

## License

This project is licensed under the GNU GENERAL PUBLIC LICENSE - see the [LICENSE.md](LICENSE.md) file for details
@@ -0,0 +1,24 @@
<?php
/*
* @link https://wpza.co.za
* @since 1.0.0
* @package wpza-disable-auto-update
*
* This disables all the updates for WordPress.
* This plugin should only be used on a WordPress site that is actively maintained.
*
*/
// Disable all Automatic Core Updates
add_filter( 'allow_dev_auto_core_updates', '__return_false' );
add_filter( 'allow_minor_auto_core_updates', '__return_false' );
add_filter( 'allow_major_auto_core_updates', '__return_false' );
// Disable All Automatic Plugin Updates
add_filter( 'auto_update_plugin', '__return_false' );
// Disable All Automatic Theme Updates
add_filter( 'auto_update_theme', '__return_false' );
@@ -0,0 +1,2 @@
<?php
// Silence is golden.
@@ -0,0 +1,2 @@
<?php
// Silence is golden.
@@ -0,0 +1,13 @@
<?php
/**
*
* @link https://wpza.co.za
* @since 1.0.0
* @package wpza-maintenance
*/
// If uninstall not called from WordPress, then exit.
if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
exit;
}
@@ -0,0 +1,56 @@
<?php
/**
*
* @link https://wpza.co.za
* @since 1.0.0
* @package wpza-disable-auto-update
*
* @wordpress-plugin
* Plugin Name: Disable Auto Updates
* Plugin URI: https://wpza.co.za/wpza-plugins
* Description: Disable all Core, Theme and Plugin Auto Updates.
* Version: 1.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("WPZADisableUpdatePlugin"))
{
class WPZADisableUpdatePlugin
{
public function __construct()
{
require_once(sprintf("%s/includes/disable-auto-update.php", dirname(__FILE__)));
}
public static function activate()
{
// Do something
}
public static function deactivate()
{
// Do something
}
}
}
if(class_exists('WPZADisableUpdatePlugin'))
{
// Installation and uninstallation hooks
register_activation_hook(__FILE__, array('WPZADisableUpdatePlugin', 'activate'));
register_deactivation_hook(__FILE__, array('WPZADisableUpdatePlugin', 'deactivate'));
$plugin = new WPZADisableUpdatePlugin();
}

0 comments on commit b58721e

Please sign in to comment.
You can’t perform that action at this time.