Changeset 811
- Timestamp:
- 08/25/2014 08:33:54 PM (11 years ago)
- Location:
- sites/trunk/api.wordpress.org/public_html/translations
- Files:
-
- 4 added
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/api.wordpress.org/public_html/translations/plugins/1.0/index.php
r809 r811 8 8 wp_cache_init(); 9 9 10 $version = isset( $_REQUEST['version'] ) ? $_REQUEST['version'] : WP_CORE_LATEST_RELEASE; 10 $slug = isset( $_REQUEST['slug'] ) ? $_REQUEST['slug'] : ''; 11 $version = isset( $_REQUEST['version'] ) ? $_REQUEST['version'] : null; 11 12 12 $translations = find_all_translations_for_ core($version );13 $translations = find_all_translations_for_type_and_domain( 'plugin', $slug, $version ); 13 14 14 15 call_headers( 'application/json' ); 15 16 16 if ( version_compare( $version, '4.0-alpha-29017-src', '>=' ) ) { 17 echo json_encode( array( 'translations' => $translations ) ); 18 } else { 19 echo json_encode( array( 'languages' => $translations ) ); 20 } 17 echo json_encode( array( 'translations' => $translations ) ); 21 18 22 19 exit; -
sites/trunk/api.wordpress.org/public_html/translations/themes/1.0/index.php
r809 r811 8 8 wp_cache_init(); 9 9 10 $version = isset( $_REQUEST['version'] ) ? $_REQUEST['version'] : WP_CORE_LATEST_RELEASE; 10 $slug = isset( $_REQUEST['slug'] ) ? $_REQUEST['slug'] : ''; 11 $version = isset( $_REQUEST['version'] ) ? $_REQUEST['version'] : null; 11 12 12 $translations = find_all_translations_for_ core($version );13 $translations = find_all_translations_for_type_and_domain( 'theme', $slug, $version ); 13 14 14 15 call_headers( 'application/json' ); 15 16 16 if ( version_compare( $version, '4.0-alpha-29017-src', '>=' ) ) { 17 echo json_encode( array( 'translations' => $translations ) ); 18 } else { 19 echo json_encode( array( 'languages' => $translations ) ); 20 } 17 echo json_encode( array( 'translations' => $translations ) ); 21 18 22 19 exit;
Note: See TracChangeset
for help on using the changeset viewer.