Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial Upload Added core functionality.
- Loading branch information
Showing
7 changed files
with
119 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,3 +16,4 @@ wp-content/plugins/hello.php | |
/sitemap.xml | ||
/sitemap.xml.gz | ||
|
||
/nbproject/private/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<?php | ||
// Silence is golden. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<?php | ||
// Silence is golden. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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(); | ||
} |