AnsPress_Prod_Updater::__construct( string $_plugin_file, array|null $_api_data = null, boolean $is_plugin = true )

Description #

Class constructor.

Parameters #

  • $_plugin_file
    string (Required) Path to the plugin file.
  • $_api_data
    array | null (Optional) data to send with API calls. Default value: null
  • $is_plugin
    boolean (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();

	}

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Add your comment