Plugin_Upgrader::check_package

Advertisement

Summery Summery

Check a source package to be sure it contains a plugin.

Syntax Syntax

Plugin_Upgrader::check_package( string $source )

Description Description

This function is added to the ‘upgrader_source_selection’ filter by Plugin_Upgrader::install().

Parameters Parameters

$source

(Required) The path to the downloaded package source.

Return Return

(string|WP_Error) The source as passed, or a WP_Error object if no plugins were found.

Source Source

File: wp-admin/includes/class-plugin-upgrader.php

			$results[ $plugin ] = $this->result;

			// Prevent credentials auth screen from displaying multiple times.
			if ( false === $result ) {
				break;
			}
		} // End foreach $plugins.

		$this->maintenance_mode( false );

		// Force refresh of plugin update information.
		wp_clean_plugins_cache( $parsed_args['clear_update_cache'] );

		/** This action is documented in wp-admin/includes/class-wp-upgrader.php */
		do_action(
			'upgrader_process_complete',
			$this,
			array(
				'action'  => 'update',
				'type'    => 'plugin',
				'bulk'    => true,
				'plugins' => $plugins,
			)
		);

		$this->skin->bulk_footer();

		$this->skin->footer();

		// Cleanup our hooks, in case something else does a upgrade on this connection.

Advertisement

Changelog Changelog

Changelog
Version Description
3.3.0 Introduced.

Advertisement

Leave a Reply