Loading data/wp-config.php +0 −8 Original line number Diff line number Diff line Loading @@ -4,14 +4,6 @@ * Additional configurations required by the docker image ****/ /** * Plugins, themes and language packs cannot be configured through the admin * interface; modify the configuration in /etc/wordpress/ according to the * documentation for PLUGINS[_LIST], THEMES[_LIST] and LANGUAGES[_LIST] **/ if ( !defined( 'WP_CLI' ) ) define('DISALLOW_FILE_MODS', true); /** * Disable running wp-cron.php on every page load. A sidecar process * examines the status of cron jobs and handles scheduling and running them. Loading plugins/override_plugin_install.php 0 → 100644 +19 −0 Original line number Diff line number Diff line <?php /** * Plugin Name: Disable New Plugins * Plugin URI: https://code.kodo.org.uk/singing-chimes.co.uk/wordpress/tree/master/plugins * Description: Removes the "Add Plugin" button from the admin dashboard * Licence: MPL-2.0 * Licence URI: https://www.mozilla.org/en-US/MPL/2.0/ * Author: Dominik Sekotill * Author URI: https://code.kodo.org.uk/dom */ add_filter( 'user_has_cap', 'override_plugin_install', 10, 3 ); function override_plugin_install( $allcaps, $caps, $args ) { if ( 'install_plugins' == $args[0] ) { $allcaps[$caps[0]] = false; } return $allcaps; } Loading
data/wp-config.php +0 −8 Original line number Diff line number Diff line Loading @@ -4,14 +4,6 @@ * Additional configurations required by the docker image ****/ /** * Plugins, themes and language packs cannot be configured through the admin * interface; modify the configuration in /etc/wordpress/ according to the * documentation for PLUGINS[_LIST], THEMES[_LIST] and LANGUAGES[_LIST] **/ if ( !defined( 'WP_CLI' ) ) define('DISALLOW_FILE_MODS', true); /** * Disable running wp-cron.php on every page load. A sidecar process * examines the status of cron jobs and handles scheduling and running them. Loading
plugins/override_plugin_install.php 0 → 100644 +19 −0 Original line number Diff line number Diff line <?php /** * Plugin Name: Disable New Plugins * Plugin URI: https://code.kodo.org.uk/singing-chimes.co.uk/wordpress/tree/master/plugins * Description: Removes the "Add Plugin" button from the admin dashboard * Licence: MPL-2.0 * Licence URI: https://www.mozilla.org/en-US/MPL/2.0/ * Author: Dominik Sekotill * Author URI: https://code.kodo.org.uk/dom */ add_filter( 'user_has_cap', 'override_plugin_install', 10, 3 ); function override_plugin_install( $allcaps, $caps, $args ) { if ( 'install_plugins' == $args[0] ) { $allcaps[$caps[0]] = false; } return $allcaps; }