WordPress.org

Making WordPress.org


Ignore:
Timestamp:
06/22/2016 03:21:57 PM (6 years ago)
Author:
ocean90
Message:

Plugin Directory: Change the API endpoint for locale banners to /locale-banner so it can be used for other requests.

See #1728.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/functions.php

    r3463 r3556  
    7676        wp_enqueue_script( 'wporg-plugins-accordion', get_template_directory_uri() . '/js/section-accordion.js', array(), '20160525', true );
    7777
    78         $slug = get_queried_object()->post_name;
    79         wp_enqueue_script( 'wporg-plugins-locale-banner', get_template_directory_uri() . '/js/locale-banner.js', array(), '20160619', true );
     78        wp_enqueue_script( 'wporg-plugins-locale-banner', get_template_directory_uri() . '/js/locale-banner.js', array(), '20160622', true );
    8079        wp_localize_script( 'wporg-plugins-locale-banner', 'wporgLocaleBanner', array(
    81             'apiURL' => rest_url( "/plugins/v1/plugin/$slug/translations" ),
     80            'apiURL' => rest_url( '/plugins/v1/locale-banner' ),
     81            'currentPlugin' => get_queried_object()->post_name,
    8282        ) );
    8383    }
Note: See TracChangeset for help on using the changeset viewer.