This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Run server: "php -S localhost:8888 api.php" | |
| // get the HTTP method, path and body of the request | |
| $method = $_SERVER['REQUEST_METHOD']; | |
| $request = explode('/', trim($_SERVER['PATH_INFO'],'/')); | |
| $input = json_decode(file_get_contents('php://input'),true); | |
| // connect to the mysql database |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function(){ | |
| /** | |
| * Create a new MediaLibraryTaxonomyFilter we later will instantiate | |
| */ | |
| var MediaLibraryTaxonomyFilter = wp.media.view.AttachmentFilters.extend({ | |
| id: 'media-attachment-taxonomy-filter', | |
| createFilters: function() { | |
| var filters = {}; | |
| // Formats the 'terms' we've included via wp_localize_script() |