Se ha denunciado esta presentación.
Utilizamos tu perfil de LinkedIn y tus datos de actividad para personalizar los anuncios y mostrarte publicidad más relevante. Puedes cambiar tus preferencias de publicidad en cualquier momento.

Introduction to AJAX In WordPress

1.536 visualizaciones

Publicado el

Slides form my WordCamp Miami talk on using AJAX in WordPress

Publicado en: Internet
  • Sé el primero en comentar

  • Sé el primero en recomendar esto

Introduction to AJAX In WordPress

  1. 1. Introduction To AJAX In WordPress Josh Pollock -- @Josh412 --
  2. 2. Who Am I?
  3. 3. What We're Covering Today ● What Is AJAX? ● How It Works In WordPress ● Look At Examples ● How To Take This Further
  4. 4. PART 1: What Is AJAX?
  5. 5. What Is AJAX? It's Magic!
  6. 6. Remember What This Replaced?
  7. 7. That Is AJAX That's Awesome
  8. 8. Request Types Did It Cause The Page To Refresh? Request - When the client requests data from server. Asynchronous Request - A request that doesn't require a new page load.
  9. 9. Processing Client-side : Happens in the browser/app. Server-side - Happens on the server. Server-Side vs Client-Side
  10. 10. PHP vs JavaScript JavaScript runs client-side* PHP runs server side. * This is true enough for today.
  11. 11. An AJAX Request Client Sends Request Server Processes Request Server Responds To Request Client Receives Response
  12. 12. jQuery AJAX
  13. 13. PART 2: How It Works In WordPress
  14. 14. AJAX In WordPress jQuery GET/POST admin-ajax.php (or other endpoint) jQuery Callback callback function
  15. 15. AJAX Actions ● wp_ajax_ (logged in users) ● wp_ajax_nopriv_ (non-logged in users)
  16. 16. Part 2: EXAMPLE TIME!
  17. 17. Part 3: Further Reading & Questions
  18. 18. ● AJAX: The WordPress Developers Handbook ● AJAX Without admin-ajax ● Process Forms With AJAX & The REST API ● History API ● The REST API… All things REST API! Further Reading
  19. 19. Ask Now, Ask Later Questions? Twitter: Josh412 WPORG Slack: shelob9 Post Status Slack: josh
  20. 20. THANKS!