AnsPress_Prod_Updater::__construct( string $_plugin_file, array|null $_api_data = null, boolean $is_plugin = true )
Description #
Class constructor.
Parameters #
- $_plugin_filestring (Required) Path to the plugin file.
- $_api_dataarray | null (Optional) data to send with API calls. Default value: null
- $is_pluginboolean (Optional) Is plugin. Default value: true
Source #
File: admin/updater.php
public function __construct( $_plugin_file, $_api_data = null, $is_plugin = true ) { global $edd_plugin_data; $this->is_plugin = $is_plugin; $this->api_url = trailingslashit( 'https://anspress.net' ); $this->api_data = $_api_data; $this->name = plugin_basename( $_plugin_file ); $this->slug = isset( $this->api_data['slug'] ) ? $this->api_data['slug'] : basename( $_plugin_file, '.php' ); $this->version = $_api_data['version']; $this->response_key = $this->slug . '-update-response'; $edd_plugin_data[ $this->slug ] = $this->api_data; // Set up hooks. $this->init(); }
Expand full source code Collapse full source code View on GitHub: admin/updater.php:46
Add your comment