Changeset 3559 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/js/locale-banner.js
- Timestamp:
- 06/22/2016 04:06:56 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/js/locale-banner.js
r3556 r3559 2 2 ( function( $ ) { 3 3 4 $.ajax( {4 $.ajax( { 5 5 type: 'POST', 6 url 7 dataType 6 url: wporgLocaleBanner.apiURL, 7 dataType: 'json', 8 8 data: { 9 'plugin_slug' 9 'plugin_slug': wporgLocaleBanner.currentPlugin 10 10 }, 11 success : function( response ) {11 success: function ( response ) { 12 12 if ( ! response.suggest_string ) { 13 13 return; … … 19 19 } ); 20 20 21 $( '.plugin-header' ).after( $banner ); 21 if ( $( 'body' ).hasClass( 'single-plugin' ) ) { 22 $( '.plugin-header' ).after( $banner ); 23 } else { 24 $( '.site-main' ).prepend( $banner ); 25 } 22 26 } 23 27 } );
Note: See TracChangeset
for help on using the changeset viewer.