/** * Add-ons Page * * Renders the add-ons page content. * * @since 1.0 * @return void */ function edd_add_ons_page() { ob_start(); ?> <div class="wrap" id="edd-add-ons"> <h2> <?php _e('Add Ons for Easy Digital Downloads', 'edd'); ?> — <a href="http://easydigitaldownloads.com/extensions/?utm_source=plugin-addons-page&utm_medium=plugin&ytm_campaign=EDD%20Addons%20Page&utm_content=All%20Extensions" class="button-primary" title="<?php _e('Browse All Extensions', 'edd'); ?> " target="_blank"><?php _e('Browse All Extensions', 'edd'); ?> </a> </h2> <p><?php _e('These add-ons extend the functionality of Easy Digital Downloads.', 'edd'); ?> </p> <?php echo edd_add_ons_get_feed(); ?> </div> <?php echo ob_get_clean(); }
/** * Add-ons Page * * Renders the add-ons page content. * * @access private * @since 1.0 * @return void */ function edd_add_ons_page() { ob_start(); ?> <div class="wrap" id="edd-add-ons"> <h2> <?php _e('Add Ons for Easy Digital Downloads', 'edd'); ?> — <a href="http://easydigitaldownloads.com/extensions/?ref=1" class="button-primary" title="<?php _e('Browse All Extensions', 'edd'); ?> " target="_blank"><?php _e('Browse All Extensions', 'edd'); ?> </a> </h2> <p><?php _e('These add-ons extend the functionality of Easy Digital Downloads.', 'edd'); ?> </p> <?php echo edd_add_ons_get_feed(); ?> </div> <?php echo ob_get_clean(); }
/** * Add-ons Page * * Renders the add-ons page content. * * @since 1.0 * @return void */ function edd_add_ons_page() { $add_ons_tabs = apply_filters('edd_add_ons_tabs', array('popular' => 'Popular', 'new' => 'New')); $active_tab = isset($_GET['tab']) && array_key_exists($_GET['tab'], $add_ons_tabs) ? $_GET['tab'] : 'popular'; ob_start(); ?> <div class="wrap" id="edd-add-ons"> <h2> <?php _e('Extensions for Easy Digital Downloads', 'edd'); ?> <span> <a href="http://easydigitaldownloads.com/extensions/?utm_source=plugin-addons-page&utm_medium=plugin&ytm_campaign=EDD%20Addons%20Page&utm_content=All%20Extensions" class="button-primary" title="<?php _e('Browse All Extensions', 'edd'); ?> " target="_blank"><?php _e('Browse All Extensions', 'edd'); ?> </a> </span> </h2> <p><?php _e('These extensions <em><strong>add functionality</strong></em> to your Easy Digital Downloads powered store.', 'edd'); ?> </p> <h2 class="nav-tab-wrapper"> <?php foreach ($add_ons_tabs as $tab_id => $tab_name) { $tab_url = add_query_arg(array('settings-updated' => false, 'tab' => $tab_id)); $active = $active_tab == $tab_id ? ' nav-tab-active' : ''; echo '<a href="' . esc_url($tab_url) . '" title="' . esc_attr($tab_name) . '" class="nav-tab' . $active . '">'; echo esc_html($tab_name); echo '</a>'; } ?> <span class="edd-tab-span"><img src="<?php echo EDD_PLUGIN_URL; ?> assets/images/edd-peeking.png" /></span> </h2> <div id="tab_container"> <?php echo edd_add_ons_get_feed($active_tab); ?> <div class="clear"></div> <div class="edd-add-ons-footer"> <a href="http://easydigitaldownloads.com/extensions/?utm_source=plugin-addons-page&utm_medium=plugin&ytm_campaign=EDD%20Addons%20Page&utm_content=All%20Extensions" class="button-primary" title="<?php _e('Browse All Extensions', 'edd'); ?> " target="_blank"><?php _e('Browse All Extensions', 'edd'); ?> </a> </div> </div><!-- #tab_container--> </div> <?php echo ob_get_clean(); }
/** * Add-ons Check Feed * * Gets the feed or sets an error. * * @access private * @since 1.0 * @return void */ function edd_add_ons_check_feed() { global $edd_addons_feed_content; $screen = get_current_screen(); if (isset($screen->base) && $screen->base === 'download_page_edd-addons') { $cache = edd_add_ons_get_feed(); if (false === $cache) { add_action('admin_notices', 'edd_admin_addons_notices'); } else { $edd_addons_feed_content = $cache; } } }