文件操作 - AutoUpdateController.php
返回文件管理
返回主菜单
删除本文件
文件: /home/www/public/wp-content/plugins/extendify/app/Shared/Controllers/AutoUpdateController.php
编辑文件内容
<?php /** * Controller for enabling plugin auto-updates. */ namespace Extendify\Shared\Controllers; defined('ABSPATH') || die('No direct access.'); use Extendify\Shared\Services\AutoUpdate\AutoUpdate; /** * Opts a plugin we installed into WordPress auto-updates. */ class AutoUpdateController { /** * Enable auto-updates for a plugin we just installed. * * @param \WP_REST_Request $request - The request. * @return \WP_REST_Response */ public static function enable($request) { $plugin = sanitize_text_field((string) $request->get_param('plugin')); if (AutoUpdate::isEnabled() && $plugin) { // The WP install response gives the plugin file without its ".php". AutoUpdate::enableAutoUpdateForPlugin(plugin_basename($plugin . '.php')); } return new \WP_REST_Response(['success' => true]); } }
修改文件时间
将文件时间修改为当前时间的前一年
删除文件