芝麻web文件管理V1.00
编辑当前文件:/var/www/cognitio.in/wp-content/plugins/popup-maker/classes/Upgrade/Registry.php
register_upgrades(); /** * Fires during instantiation of the batch processing registry. * * @param PUM_Upgrade_Registry $this PUM_Abstract_Registry instance. */ do_action( 'pum_upgrade_process_init', $this ); } /** * Registers upgrade routines. * * @see PUM_Utils_Upgrades::add_routine() */ private function register_upgrades() { /** * Fires during instantiation of the batch processing registry allowing proper registration of upgrades. * * @param PUM_Upgrade_Registry $this PUM_Abstract_Registry instance. */ do_action( 'pum_register_upgrades', $this ); } /** * Adds an upgrade to the registry. * * @param int $upgrade_id upgrade ID. * @param array $attributes { * Upgrade attributes. * * @type string $class upgrade handler class. * @type string $file upgrade handler class file. * } * * @return true Always true. */ public function add_upgrade( $upgrade_id, $attributes ) { $attributes = wp_parse_args( $attributes, [ 'rules' => [], 'class' => '', 'file' => '', ] ); // Log an error if it's too late to register the process. if ( did_action( 'pum_upgrade_process_init' ) ) { PUM_Utils_Logging::instance()->log( sprintf( 'The %s upgrade process was registered too late. Registrations must occur while/before
pum_upgrade_process_init
fires.', esc_html( $upgrade_id ) ) ); return false; } return $this->register_process( $upgrade_id, $attributes ); } /** * Removes an upgrade from the registry by ID. * * @param string $upgrade_id upgrade ID. */ public function remove_upgrade( $upgrade_id ) { parent::remove_process( $upgrade_id ); } /** * Retrieves registered upgrades. * * @return array The list of registered upgrades. */ public function get_upgrades() { return parent::get_items(); } }