Ce diaporama a bien été signalé.
Le téléchargement de votre SlideShare est en cours. ×

Let's code_ WP REST API - custom routes and endpoints.pptx

Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Chargement dans…3
×

Consultez-les par la suite

1 sur 9 Publicité

Let's code_ WP REST API - custom routes and endpoints.pptx

Télécharger pour lire hors ligne

The WordPress REST API is more than just a set of default routes. It is also a tool for creating custom routes and endpoints. In this session, you'll learn how to create custom routes and endpoints, and test them using Postman.

The WordPress REST API is more than just a set of default routes. It is also a tool for creating custom routes and endpoints. In this session, you'll learn how to create custom routes and endpoints, and test them using Postman.

Publicité
Publicité

Plus De Contenu Connexe

Similaire à Let's code_ WP REST API - custom routes and endpoints.pptx (20)

Publicité

Plus récents (20)

Let's code_ WP REST API - custom routes and endpoints.pptx

  1. 1. Jonathan Bossenger Let’s Code Learn.WordPress.org Extending the WP REST API - custom routes & endpoints
  2. 2. 2 👋🏽 Welcome! As you join, please make sure you have your local development environment ready: • A local WordPress installation • A code editor like VSCode or Sublime • Postman https://www.postman.com/downloads/ Then, let everyone know in the chat where you’re joining us from, and something interesting about your city/state/country… Hello! ○ My name is Jonathan Bossenger ○ From Cape Town, South Africa ○ Ex-developer turned code instructor ○ Sponsored contributor at Automattic ○ jonathanbossenger.com
  3. 3. Learn.WordPress.org Let's code! The WP REST API - custom routes and endpoints Jonathan Bossenger
  4. 4. Announcements ○ Welcome, and thank you to Joshua for co-hosting! ○ We are presenting in focus mode, but please feel free to enable your video. ○ Please let me know if you can’t see my shared screen. ○ You are welcome to ask questions. ○ You are welcome to post questions in the chat, or unmute to ask questions.
  5. 5. Announcements ○ Make sure your local install is ready • https://www.postman.com/downloads/ ○ If I am going too fast, please let me know! ○ We will be posting this session to https://wordpress.tv/ afterwards ○ For more WordPress focused content please visit https://learn.wordpress.org/ ○ Follow up questions/feedback - https://github.com/WordPress/Learn/issues/1304
  6. 6. Learning Outcomes 1. Registering a custom WP REST API route 2. Registering different route endpoints 3. How to access WP REST API request data in your custom route 4. Protecting routes/requiring authentication 5. Adding and using path variables on routes
  7. 7. Objectives 1. Create a form submissions REST API plugin 2. Create a custom table to store form submissions 3. Register a custom WP REST API route to fetch submissions 4. Register a custom WP REST API route to post submissions 5. Register a custom WP REST API endpoint to fetch a single submission 7
  8. 8. 8 Let’s code.
  9. 9. Resources ○ https://github.com/WordPress/Learn/issues/1304 ○ https://www.postman.com/downloads/ ○ https://developer.wordpress.org/rest-api/extending-the-rest-api/adding-custom-endpoints/ ○ https://developer.wordpress.org/rest-api/extending-the-rest-api/routes-and-endpoints/ ○ https://developer.wordpress.org/reference/functions/dbdelta/ ○ https://developer.wordpress.org/reference/functions/register_rest_route/ ○ https://developer.wordpress.org/reference/functions/register_activation_hook/ ○ https://developer.wordpress.org/reference/functions/current_user_can/ ○ https://github.com/CastosHQ/Seriously-Simple-Podcasting/tree/master/php/classes/rest

Notes de l'éditeur

  • TITLE SLIDE: Make a copy of this presentation to your Google Drive, and edit to replace with your details.

×