/** * Output the main landing page for the Sputnik administration screen. */ protected static function dashboard() { ?> <p><?php _e('Some text about WPEconomy goes here! This will eventually be replaced with a dashboard-like interface, including latest news, etc.', 'wpsc'); ?> </p> <h4><?php _e('Search', 'wpsc'); ?> </h4> <p class="install-help"><?php _e('Search for plugins by keyword.', 'wpsc'); ?> </p> <?php Sputnik_Admin::search_form(); ?> <h4><?php _e('Popular tags'); ?> </h4> <p class="install-help"><?php _e('You may also browse based on the most popular tags on the store:', 'wpsc'); ?> </p> <?php echo '<p class="popular-tags">'; try { $api_tags = Sputnik::get_tags(); //Set up the tags in a way which can be interpreted by wp_generate_tag_cloud() $tags = array(); foreach ($api_tags as $tag) { $tags[$tag->name] = (object) array('link' => esc_url(self::build_url(array('tab' => 'search', 's' => urlencode($tag->name)))), 'name' => $tag->name, 'id' => sanitize_title_with_dashes($tag->name), 'count' => $tag->count); } echo wp_generate_tag_cloud($tags, array('single_text' => __('%s plugin', 'wpsc'), 'multiple_text' => __('%s plugins', 'wpsc'))); } catch (Exception $e) { echo $e->getMessage(); } echo '</p><br class="clear" />'; }