array( 'name' => 'ASAP Notes', // The plugin name. 'slug' => 'asap-notes', // The plugin slug (typically the folder name). 'source' => get_template_directory() . '/addons/asap-notes.zip', // The plugin source. 'url' => 'www.themeasap.com/add-ons/asap-notes', 'short_description' => 'A simple plugin to add notes on your ThemeASAP themes', 'author' => 'ibenic', 'type' => 'bundle', ), ); } function bloatless_get_recommended_plugins() { return array( 'siteorigin-panels', 'woocommerce', ); } function bloatless_theme_addons_page() { require_once( ABSPATH . 'wp-admin/includes/plugin-install.php' ); $currentTab = 'recommended'; if ( isset( $_GET['tab'] ) ) { $currentTab = $_GET['tab']; } ?>
' . sprintf( __( 'See all the plugins from the author %s', 'bloatless' ), 'Igor Benic' ) . '
'; $plugins = plugins_api( 'query_plugins', array( 'author' => 'ibenic', 'fields' => array( 'last_updated' => true, 'icons' => true, 'active_installs' => true, ), ) ); bloatless_list_plugins( $plugins->plugins, $currentTab ); } if ( $currentTab == 'recommended' ) { echo 'Recommended Plugins for this theme
'; $recommended = bloatless_get_recommended_plugins(); $plugins = array(); foreach ( $recommended as $value ) { $plugins[] = plugins_api( 'plugin_information', array( 'slug' => $value, 'fields' => array( 'last_updated' => true, 'icons' => true, 'active_installs' => true, ), ) ); } bloatless_list_plugins( $plugins, $currentTab ); } ?>