| 1 |
<?php |
| 2 |
/** |
| 3 |
* Controls Http requests |
| 4 |
*/ |
| 5 |
|
| 6 |
namespace Extendify\Library\Controllers; |
| 7 |
|
| 8 |
use Extendify\Http; |
| 9 |
|
| 10 |
if (!defined('ABSPATH')) { |
| 11 |
die('No direct access.'); |
| 12 |
} |
| 13 |
|
| 14 |
/** |
| 15 |
* The controller for sending little bits of info |
| 16 |
*/ |
| 17 |
class MetaController |
| 18 |
{ |
| 19 |
/** |
| 20 |
* Send data about a specific topic |
| 21 |
* |
| 22 |
* @param \WP_REST_Request $request - The request. |
| 23 |
* @return WP_REST_Response|WP_Error |
| 24 |
*/ |
| 25 |
public static function getAll($request) |
| 26 |
{ |
| 27 |
$response = Http::get('/meta-data', $request->get_params()); |
| 28 |
return new \WP_REST_Response($response); |
| 29 |
} |
| 30 |
} |
| 31 |
|