Changeset 6462 for sites/trunk/wordpress.org/public_html/wp-content/plugins/theme-directory/class-themes-api.php
- Timestamp:
- 01/30/2018 03:18:52 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/theme-directory/class-themes-api.php
r6419 r6462 118 118 * @return string|void 119 119 */ 120 public function get_result( ) {121 if ( defined( 'JSON_RESPONSE' ) && JSON_RESPONSE) {120 public function get_result( $format = 'raw' ) { 121 if ( 'json' === $format ) { 122 122 return wp_json_encode( $this->response ); 123 } else {123 } elseif ( 'php' === $format ) { 124 124 return serialize( $this->response ); 125 } else { // 'raw' === $format, or anything else. 126 return $this->response; 125 127 } 126 128 }
Note: See TracChangeset
for help on using the changeset viewer.