- Timestamp:
- 08/19/2020 12:21:11 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/api.wordpress.org/public_html/themes/info/1.0/index.php
r8914 r10178 5 5 } 6 6 7 // Load WordPress, pretend we're the Theme Directory in order to avoid having to switch sites after loading. 8 $_SERVER['HTTP_HOST'] = 'wordpress.org'; 9 $_SERVER['REQUEST_URI'] = '/themes/'; 10 7 // Load WordPress as the Theme Directory in order to avoid having to switch sites after loading. 8 $wp_init_host = 'https://wordpress.org/themes/'; 11 9 require dirname( dirname( dirname( __DIR__ ) ) ) . '/wp-init.php'; 12 10 … … 29 27 30 28 // Serve an API request. 31 echo wporg_themes_query_api( $action, $request, $format ); 29 $api = wporg_themes_query_api( $action, $request, 'api_object' ); 30 31 if ( ! empty( $api->bad_input ) ) { 32 status_header( 400 ); 33 } 34 35 echo $api->get_result( $format );
Note: See TracChangeset
for help on using the changeset viewer.