AnsPress_Prod_Updater::plugins_api_filter( mixed $_data, string $_action = '', object $_args = null )

Description #

Updates information on the “View version x.x details” page with custom data.

Parameters #

  • $_data
    mixed (Required)
  • $_action
    string (Optional) Default value: ''
  • $_args
    object (Optional) Default value: null

Source #

File: admin/updater.php

	public function plugins_api_filter( $_data, $_action = '', $_args = null ) {
		if ( $_action != 'plugin_information' ) {
			return $_data;
		}

		if ( ! isset( $_args->slug ) || ( $_args->slug != $this->slug ) ) {
			return $_data;
		}

		$to_send = array(
			'slug'   => $this->slug,
			'is_ssl' => is_ssl(),
			'fields' => array(
				'banners' => false, // These will be supported soon hopefully
				'reviews' => false,
			),
		);

		$api_response = $this->api_request( 'plugin_information', $to_send );

		if ( false !== $api_response ) {
			$_data = $api_response;
		}

		return $_data;
	}

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