• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
Easy Digital Downloads a2z

Easy Digital Downloads a2z

Easy Digital Downloads a2z

  • Home
  • Plugins
  • Shortcodes
  • APIs
  • Classes
  • Files
  • Hooks
  • Sitemap
  • Blog
Home / APIs / edd_add_ons_get_feed() – Add-ons Get Feed

You appear to be a bot. Output may be restricted

Description

Add-ons Get Feed

Gets the add-ons page feed.

Usage

$void = edd_add_ons_get_feed( $tab );

Parameters

$tab
( mixed ) optional default: popular –

Returns

void

Source

File name: easy-digital-downloads/includes/admin/add-ons.php
Lines:

1 to 29 of 29
function edd_add_ons_get_feed( $tab = 'popular' ) {
  $cache = get_transient( 'easydigitaldownloads_add_ons_feed_' . $tab );

  if ( false === $cache ) {
    $url = 'https://easydigitaldownloads.com/?feed=addons';

    if ( 'popular' !== $tab ) {
      $url = add_query_arg( array( 'display' => $tab ), $url );
    }

    $feed = wp_remote_get( esc_url_raw( $url ), array( 'sslverify' => false ) );

    if ( ! is_wp_error( $feed ) ) {
      if ( isset( $feed['body'] ) && strlen( $feed['body'] ) > 0 ) {
        $cache = wp_remote_retrieve_body( $feed );
        set_transient( 'easydigitaldownloads_add_ons_feed_' . $tab, $cache, 3600 );
      }
    } else {
      $cache = '<div class="error"><p>' . __( 'There was an error retrieving the extensions list from the server. Please try again later.', 'easy-digital-downloads' ) . '</div>';
    }
  }

  if ( isset( $_GET['view'] ) && 'integrations' === $_GET['view'] ) {
    // Set a new campaign for tracking purposes
    $cache = str_replace( 'EDDAddonsPage', 'EDDIntegrationsPage', $cache );
  }

  return $cache;
}
 

 View on GitHub View on Trac

Published: 26th November 2019 | Last updated: 14th November 2021

Primary Sidebar

Information

Function name: edd_add_ons_get_feed
Plugin ref: Easy Digital Downloads
Version: 2.11.6
Sourcefile: includes/admin/add-ons.php
File ref: includes/admin/add-ons.php
Deprecated?: No
API Letters: A,E,F,G,O

Footer

Easy Digital Downloads a2z
Easy Digital Downloads a2z
Easy Digital Downloads a2z
WordPress 5.9.3
WordPress a2z
WordPress core a2z
Genesis Theme Framework a2z
Jetpack a2z
WordPress develop tests
Easy Digital Downloads a2z
WooCommerce a2z
Yoast SEO a2z
WordPress Blocks

Site:  edd.wp-a2z.org
© Copyright Easy Digital Downloads a2z 2014-2022. All rights reserved.


Website designed and developed by Herb Miller
Proudly powered by WordPress and oik plugins

  • Home
  • Blog
  • Sitemap
  • Sites