文件操作 - Extension.php
返回文件管理
返回主菜单
删除本文件
文件: /home/www/public/wp-content/plugins/popup-maker/classes/Plugin/Extension.php
编辑文件内容
<?php /** * Extension base class * * @package PopupMaker\Plugin * @copyright Copyright (c) 2024, Code Atlantic LLC */ namespace PopupMaker\Plugin; defined( 'ABSPATH' ) || exit; /** * Abstract base class for all Popup Maker extensions. * * Override {@see Container::registered_controllers()} in child classes. * * @since 1.21.0 */ abstract class Extension extends Container { /** * Core plugin instance. * * @var \PopupMaker\Plugin\Core */ protected $core; /** * Extension constructor. * * @param array<string,string|bool> $config Configuration variables. */ public function __construct( $config ) { parent::__construct( $config ); // Get core plugin instance. $this->core = \PopupMaker\plugin(); } /** * Get core plugin instance. * * @return \PopupMaker\Plugin\Core */ public function core() { return $this->core; } /** * Get a service or configuration variable. * * @param string $id Service or configuration variable ID. * @return mixed * @throws \PopupMaker\Vendor\Pimple\Exception\UnknownIdentifierException */ public function get( $id ) { try { return parent::get( $id ); } catch ( \PopupMaker\Vendor\Pimple\Exception\UnknownIdentifierException $e ) { if ( $this->core()->offsetExists( $id ) ) { return $this->core()->get( $id ); } // Re-throw the exception if we couldn't find the service. throw $e; } } }
修改文件时间
将文件时间修改为当前时间的前一年
删除文件