mirror of
https://gh.wpcy.net/https://github.com/szepeviktor/wordpress-website-lifecycle.git
synced 2026-04-25 04:52:19 +08:00
33 lines
784 B
PHP
33 lines
784 B
PHP
<?php
|
|
|
|
/*
|
|
* Plugin Name: Disable TGMPA
|
|
* Plugin URI: https://github.com/szepeviktor/wordpress-website-lifecycle
|
|
*/
|
|
|
|
// Disable TGMPA (procedural)
|
|
add_action(
|
|
'after_setup_theme',
|
|
static function () {
|
|
remove_action('admin_init', 'tgmpa_load_bulk_installer');
|
|
// EDIT here!
|
|
remove_action('tgmpa_register', 'CUSTOM-FUNCTION');
|
|
},
|
|
PHP_INT_MAX,
|
|
0
|
|
);
|
|
|
|
// Disable TGMPA (OOP)
|
|
add_action(
|
|
'after_setup_theme',
|
|
static function () {
|
|
// EDIT here!
|
|
global $wpoEngine;
|
|
if (method_exists($wpoEngine, 'initRequiredPlugin')) {
|
|
remove_action('admin_init', 'tgmpa_load_bulk_installer');
|
|
remove_action('tgmpa_register', [$wpoEngine, 'initRequiredPlugin']);
|
|
}
|
|
},
|
|
PHP_INT_MAX,
|
|
0
|
|
);
|