{"id":4116,"date":"2019-10-30T13:41:16","date_gmt":"2019-10-30T11:41:16","guid":{"rendered":"https:\/\/2020.vienna.wordcamp.org\/?post_type=wcb_session&#038;p=4116"},"modified":"2020-01-17T11:15:12","modified_gmt":"2020-01-17T09:15:12","slug":"wordpress-workshop-1","status":"publish","type":"wcb_session","link":"https:\/\/vienna.wordcamp.org\/2020\/session\/wordpress-workshop-1\/","title":{"rendered":"WordPress REST API Workshop"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">The WP REST API enables WordPress content and functionality to be used with AJAX, thus enabling code to be executed without a page refresh.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The workshop has a set of progressive code examples that you can work with and keep that culminate in an AJAX form that posts data to a custom WP REST API endpoint that we will have created, which also has WP-NONCE verification as well.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The workshop has minimal JavaScript and JSON knowledge which will be explained as needed.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this workshop we will look at:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>What an API is and what makes it RESTful?<\/li><li>How to get and display content using the built in WP REST API.<\/li><li>How to create our own endpoints in the WP REST API for both GET and POST requests.<\/li><li>How to create custom REST APIs using page-[slug].php<\/li><li>Create some WP pages that GET content, search content and POST form data with the added security check of using WP-NONCES.<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">To make the most of this workshop it would be good to have a code editor, local web server or a code editor with \u2018live-server\u2019. Google\u2019s POSTMAN can also be helpful, and we may look at this if time permits.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Suitable for intermediate developers and above.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The WP REST API enables WordPress content and functionality to be used with AJAX, thus enabling code to be executed without a page refresh. The workshop has a set of progressive code examples that you can work with and keep that culminate in an AJAX form that posts data to a custom WP REST API &hellip; <a href=\"https:\/\/vienna.wordcamp.org\/2020\/session\/wordpress-workshop-1\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;WordPress REST API Workshop&#8221;<\/span><\/a><\/p>\n","protected":false},"author":15819979,"featured_media":0,"template":"","meta":{"_crdt_document":"","_wcpt_session_time":1581843600,"_wcpt_session_duration":3000,"_wcpt_session_type":"session","_wcpt_session_slides":"","_wcpt_session_video":"","_wcpt_speaker_id":[4402],"footnotes":""},"session_track":[25],"session_category":[],"class_list":["post-4116","wcb_session","type-wcb_session","status-publish","hentry","wcb_track-workshops"],"jetpack_sharing_enabled":true,"session_date_time":{"date":"February 16, 2020","time":"11:00"},"session_speakers":[{"id":"4402","slug":"craig-west","name":"Craig West","link":"https:\/\/vienna.wordcamp.org\/2020\/speaker\/craig-west\/"}],"session_cats_rendered":null,"_links":{"self":[{"href":"https:\/\/vienna.wordcamp.org\/2020\/wp-json\/wp\/v2\/sessions\/4116","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vienna.wordcamp.org\/2020\/wp-json\/wp\/v2\/sessions"}],"about":[{"href":"https:\/\/vienna.wordcamp.org\/2020\/wp-json\/wp\/v2\/types\/wcb_session"}],"version-history":[{"count":2,"href":"https:\/\/vienna.wordcamp.org\/2020\/wp-json\/wp\/v2\/sessions\/4116\/revisions"}],"predecessor-version":[{"id":4719,"href":"https:\/\/vienna.wordcamp.org\/2020\/wp-json\/wp\/v2\/sessions\/4116\/revisions\/4719"}],"speakers":[{"embeddable":true,"href":"https:\/\/vienna.wordcamp.org\/2020\/wp-json\/wp\/v2\/speakers\/4402"}],"author":[{"embeddable":true,"href":"https:\/\/vienna.wordcamp.org\/2020\/wp-json\/wporg\/v1\/users\/craigwestwpbtn"}],"wp:attachment":[{"href":"https:\/\/vienna.wordcamp.org\/2020\/wp-json\/wp\/v2\/media?parent=4116"}],"wp:term":[{"taxonomy":"wcb_track","embeddable":true,"href":"https:\/\/vienna.wordcamp.org\/2020\/wp-json\/wp\/v2\/session_track?post=4116"},{"taxonomy":"wcb_session_category","embeddable":true,"href":"https:\/\/vienna.wordcamp.org\/2020\/wp-json\/wp\/v2\/session_category?post=4116"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}