Making WordPress.org


Ignore:
Timestamp:
09/24/2016 05:06:50 AM (8 years ago)
Author:
dd32
Message:

Plugin Directory: Switch from Categories back to Tags.

See #1719

File:
1 moved

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/api/routes/class-popular-tags.php

    r4124 r4125  
    99 * @package WordPressdotorg_Plugin_Directory
    1010 */
    11 class Popular_Categories extends Base {
     11class Popular_Tags extends Base {
    1212
    1313    function __construct() {
    14         register_rest_route( 'plugins/v1', '/popular-categories/?', array(
     14        register_rest_route( 'plugins/v1', '/popular-tags/?', array(
    1515            'methods'  => WP_REST_Server::READABLE,
    16             'callback' => array( $this, 'popular_categories' ),
     16            'callback' => array( $this, 'popular_tags' ),
    1717        ) );
    1818    }
     
    2424     * @return array A formatted array of all plugin categories on the site.
    2525     */
    26     function popular_categories( $request ) {
    27         $terms = get_terms( 'plugin_category', array( 'hide_empty' => false, 'orderby' => 'count', 'order' => 'DESC' ) );
     26    function popular_tags( $request ) {
     27        $terms = get_terms( 'plugin_tags', array( 'hide_empty' => false, 'orderby' => 'count', 'order' => 'DESC' ) );
    2828
    2929        $response = array();
Note: See TracChangeset for help on using the changeset viewer.