Skip to content

royboy789/WP-Rest-API-Taco-Endpoint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WordPress REST API Taco Endpoint

Whats the point?
To give you tacos!

┈┈┈┈╭╯╭╯╭╯┈┈┈┈┈
┈┈┈╱▔▔▔▔▔╲▔╲┈┈┈
┈┈╱┈╭╮┈╭╮┈╲╮╲┈┈
┈┈▏┈▂▂▂▂▂┈▕╮▕┈┈
┈┈▏┈╲▂▂▂╱┈▕╮▕┈┈
┈┈╲▂▂▂▂▂▂▂▂╲╱┈┈

To add a taco!

Use the taco_api_tacos filter

add_filter( 'taco_api_tacos', 'add_tacos', 10, 1 );  
function add_tacos( $tacos ) { $tacos[] = "your taco" }

Tacos in Posts

If you pass tacos=true to a /post/ID endpoint, you will get a taco response as part of your post object

The Response

taco response
Post Response:
taco response

Releases

No releases published

Packages

No packages published

Languages