Publicité
Publicité

Contenu connexe

Similaire Ă  Using the WP REST API(20)

Publicité

Using the WP REST API

  1. Jonathan Bossenger Let’s Code Learn.WordPress.org Using the WordPress REST API
  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 • The admin-ajax example plugin • https://github.com/jonathanbossenger/wp-learn- rest-api/releases/download/0.0.1/wp-learn-rest- api.0.0.1.zip Then, let everyone know in the chat where you’re joining us from… Hello! ○ My name is Jonathan Bossenger ○ From Cape Town, South Africa ○ Ex-developer turned code instructor ○ Sponsored contributor at Automattic ○ @jon_bossenger in Twitter
  3. Learn.WordPress.org Let's code! Using the WordPress REST API Jonathan Bossenger
  4. Announcements â—‹ Welcome, and thanks to Thelma for co-hosting! â—‹ We are presenting in focus mode, but please feel free to enable your video. â—‹ You are welcome to ask questions. â—‹ You are welcome to post questions in the chat, or unmute to ask questions.
  5. Announcements â—‹ Make sure your local install is ready â—‹ https://github.com/jonathanbossenger/wp-learn-rest-api/releases/download/0.0.1/wp- learn-rest-api.0.0.1.zip â—‹ 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/
  6. Learning Outcomes 1. Using the WordPress REST API (aka WP REST API) • What is the WP REST API 2. All about Routes and Endpoints 3. Using Global Parameters • Limiting fields • Implementing Pagination and Ordering 4. WP REST API Authentication overview 5. Using the WP REST API in a WordPress plugin
  7. Objectives 1 1. Setup and review the example plugin 2. Learn what the words REST and API mean 3. Understand the difference between an endpoint and a route 4. Learn how to alter REST API response data 5. Update the example plugin to replace the admin-ajax with a REST API call 7
  8. 8 Let’s code.
  9. Resources â—‹ https://github.com/jonathanbossenger/wp-learn-rest-api/releases/download/0.0.1/wp-learn-rest-api.0.0.1.zip â—‹ https://github.com/jonathanbossenger/wp-learn-rest-api/ â—‹ https://developer.wordpress.org/rest-api/ â—‹ https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/const â—‹ https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach

Notes de l'Ă©diteur

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