芝麻web文件管理V1.00
编辑当前文件:/home/disqkgca/aqanet.org/wp-content/plugins/ht-mega-for-elementor/includes/class.api.php
$timeout, 'body' => [ 'api_version' => HTMEGA_VERSION, 'site_lang' => get_bloginfo( 'language' ), ], ] ); if ( is_wp_error( $response ) || 200 !== (int) wp_remote_retrieve_response_code( $response ) ) { set_transient( $cache_key, [], 2 * HOUR_IN_SECONDS ); return false; } $info_data = json_decode( wp_remote_retrieve_body( $response ), true ); if ( empty( $info_data ) || ! is_array( $info_data ) ) { set_transient( $cache_key, [], 2 * HOUR_IN_SECONDS ); return false; } if ( isset( $info_data['info'] ) ) { update_option( self::NEWS_FEED_OPTION_KEY, $info_data['info'], 'no' ); unset( $info_data['info'] ); } set_transient( $cache_key, $info_data, 2 * (24 * HOUR_IN_SECONDS) ); } return $info_data; } /** * Get news feed data. * Retrieve the feed info data from remote woolentor server. * * @param bool $force_update Optional. Whether to force the data update. * @return array News Feed data. */ public static function get_remote_data( $force_update = false ) { self::get_info_data( $force_update ); $feed = get_option( self::NEWS_FEED_OPTION_KEY ); return empty( $feed ) ? [] : $feed; } }