Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808
Warning: foreach() argument must be of type array|object, string given in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 813
Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808
Warning: foreach() argument must be of type array|object, string given in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 813
Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808
Warning: foreach() argument must be of type array|object, string given in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 813
Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808
PUM_Extension_Updater::plugins_api_filter( mixed $_data, string $_action = '', object $_args = null )
Updates information on the “View version x.x details” page with custom data.
Description Description
Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808
Warning: foreach() argument must be of type array|object, string given in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 813
Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808
Warning: foreach() argument must be of type array|object, string given in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 813
Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808
Warning: foreach() argument must be of type array|object, string given in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 813
Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808
Parameters Parameters
- $_data
-
(Required)
- $_action
-
(Optional)
Default value: ''
- $_args
-
(Optional)
Default value: null
Return Return
(object) $_data
Source Source
File: classes/Extension/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' => array(), 'reviews' => false, 'icons' => array(), ) ); $cache_key = 'edd_api_request_' . md5( serialize( $this->slug . $this->api_data['license'] . $this->beta ) ); // Get the transient where we store the api request for this plugin for 24 hours $edd_api_request_transient = $this->get_cached_version_info( $cache_key ); //If we have no transient-saved value, run the API, set a fresh transient with the API value, and return that value too right now. if ( empty( $edd_api_request_transient ) ) { $api_response = $this->api_request( 'plugin_information', $to_send ); // Expires in 3 hours $this->set_version_info_cache( $api_response, $cache_key ); if ( false !== $api_response ) { $_data = $api_response; } } else { $_data = $edd_api_request_transient; } // Convert sections into an associative array, since we're getting an object, but Core expects an array. if ( isset( $_data->sections ) && ! is_array( $_data->sections ) ) { $_data->sections = $this->convert_object_to_array( $_data->sections ); } // Convert banners into an associative array, since we're getting an object, but Core expects an array. if ( isset( $_data->banners ) && ! is_array( $_data->banners ) ) { $_data->banners = $this->convert_object_to_array( $_data->banners ); } // Convert icons into an associative array, since we're getting an object, but Core expects an array. if ( isset( $_data->icons ) && ! is_array( $_data->icons ) ) { $_data->icons = $this->convert_object_to_array( $_data->icons ); } if( ! isset( $_data->plugin ) ) { $_data->plugin = $this->name; } return $_data; }
Expand full source code Collapse full source code View on Trac