BSF_Update_Manager::bsf_update_transient_data( $product_type )
Update transient Data.
Description
@param string $product_type Product Type.
Return
($update_required.)
Source
File: admin/bsf-core/class-bsf-update-manager.php
public function bsf_update_transient_data( $product_type ) { $this->maybe_force_check_bsf_product_updates(); $all_products = array(); $update_required = array(); if ( 'plugins' === $product_type ) { $all_products = $this->prepare_plugins_for_update( brainstorm_get_all_products( false, true, false ) ); } if ( 'themes' === $product_type ) { $all_products = brainstorm_get_all_products( true, false, true ); } foreach ( $all_products as $key => $product ) { $product_id = isset( $product['id'] ) ? $product['id'] : ''; $constant = strtoupper( str_replace( '-', '_', $product_id ) ); $constant = 'BSF_' . $constant . '_CHECK_UPDATES'; if ( defined( $constant ) && ( constant( $constant ) === 'false' || constant( $constant ) === false ) ) { continue; } $remote = isset( $product['remote'] ) ? $product['remote'] : ''; $local = isset( $product['version'] ) ? $product['version'] : ''; $version_beta = isset( $product['version_beta'] ) ? $product['version_beta'] : $remote; if ( $this->use_beta_version( $product_id ) ) { $remote = $version_beta; } if ( version_compare( $remote, $local, '>' ) ) { array_push( $update_required, $product ); } } return $update_required; }
Expand full source code Collapse full source code View on Trac