edd_add_ons_page

Add-ons Page.

Description

edd_add_ons_page(); 

Renders the add-ons page content.


Usage

  1. if ( !function_exists( 'edd_add_ons_page' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'easy-digital-downloads/includes/admin/add-ons.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = edd_add_ons_page(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/includes/admin/add-ons.php  
  1. function edd_add_ons_page() { 
  2. $add_ons_tabs = apply_filters( 'edd_add_ons_tabs', array( 'popular' => 'Popular', 'new' => 'New') ); 
  3. $active_tab = isset( $_GET['tab'] ) && array_key_exists( $_GET['tab'], $add_ons_tabs ) ? $_GET['tab'] : 'popular'; 
  4.  
  5. ob_start(); ?> 
  6. <div class="wrap" id="edd-add-ons"> 
  7. <h1> 
  8. <?php _e( 'Extensions for Easy Digital Downloads', 'easy-digital-downloads' ); ?> 
  9. <span> 
  10.   <a href="http://easydigitaldownloads.com/extensions/?utm_source=plugin-addons-page&utm_medium=plugin&utm_campaign=EDD%20Addons%20Page&utm_content=All%20Extensions" class="button-primary" target="_blank"><?php _e( 'Browse All Extensions', 'easy-digital-downloads' ); ?></a> 
  11. </span> 
  12. </h1> 
  13. <p><?php _e( 'These extensions <em><strong>add functionality</strong></em> to your Easy Digital Downloads powered store.', 'easy-digital-downloads' ); ?></p> 
  14. <h2 class="nav-tab-wrapper"> 
  15. <?php 
  16. foreach( $add_ons_tabs as $tab_id => $tab_name ) { 
  17.  
  18. $tab_url = add_query_arg( array( 
  19. 'settings-updated' => false,  
  20. 'tab' => $tab_id 
  21. ) ); 
  22.  
  23. $active = $active_tab == $tab_id ? ' nav-tab-active' : ''; 
  24.  
  25. echo '<a href="' . esc_url( $tab_url ) . '" class="nav-tab' . $active . '">'; 
  26. echo esc_html( $tab_name ); 
  27. echo '</a>'; 
  28. ?> 
  29. <span class="edd-tab-span"><img src="<?php echo EDD_PLUGIN_URL; ?>assets/images/edd-peeking.png" /></span> 
  30. </h2> 
  31. <div id="tab_container"> 
  32. <?php echo edd_add_ons_get_feed( $active_tab ); ?> 
  33. <div class="clear"></div> 
  34. <div class="edd-add-ons-footer"> 
  35. <a href="http://easydigitaldownloads.com/extensions/?utm_source=plugin-addons-page&utm_medium=plugin&utm_campaign=EDD%20Addons%20Page&utm_content=All%20Extensions" class="button-primary" target="_blank"><?php _e( 'Browse All Extensions', 'easy-digital-downloads' ); ?></a> 
  36. </div> 
  37. </div><!-- #tab_container--> 
  38. </div> 
  39. <?php 
  40. echo ob_get_clean();