BackWPup. * Version: 2.0.0 * Author: Armando Lüscher * Author URI: https://noplanman.ch * Text Domain: advanced-backwpup-s3-destinations * Network: true * Requires at least: 6.0 * Requires PHP: 8.0 * License: GPLv2 or later * License URI: https://www.gnu.org/licenses/gpl-2.0.html */ /** * Copyright 2023 Armando Lüscher (email: armando@noplanman.ch) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ namespace NPM\AdvancedBackWPupS3Destinations; // Exit if accessed directly. defined( 'ABSPATH' ) || exit; /** * Make sure BackWPup is installed and activated. */ add_action( 'admin_init', static function () { if ( current_user_can( 'activate_plugins' ) && ! is_plugin_active( 'backwpup/backwpup.php' ) && ! is_plugin_active( 'backwpup-pro/backwpup.php' ) ) { deactivate_plugins( plugin_basename( __FILE__ ) ); add_action( 'admin_notices', 'NPM\AdvancedBackWPupS3Destinations\admin_notice_missing_plugin' ); add_action( 'network_admin_notices', 'NPM\AdvancedBackWPupS3Destinations\admin_notice_missing_plugin' ); } } ); /** * Admin notice to alert about missing BackWPup plugin. */ function admin_notice_missing_plugin(): void { ?>