{"id":5618,"date":"2024-09-27T17:18:52","date_gmt":"2024-09-27T07:18:52","guid":{"rendered":"https:\/\/sydney.wordcamp.org\/2024\/?post_type=wcb_session&#038;p=5618"},"modified":"2024-11-22T09:50:51","modified_gmt":"2024-11-21T22:50:51","slug":"how-i-went-from-a-php-shortcode-guy-to-a-react-block-guy","status":"publish","type":"wcb_session","link":"https:\/\/sydney.wordcamp.org\/2024\/session\/how-i-went-from-a-php-shortcode-guy-to-a-react-block-guy\/","title":{"rendered":"How I Went From a PHP Shortcode Guy to a React \/ Block Guy"},"content":{"rendered":"\n<p>Learn Javascript deeply, This was said by Matt and WordPress in 2015.<br>I wasn&#8217;t that excited about that. I ignored that advice.<br>I continued on my Merry Way with PHP, which is both good and bad. WordPress is made with PHP.<br>I like PHP, I like server side code and have spent a lot of time in it.<br>Now blocks came out and I was kicking myself.<br>I was terrified to dive into the block editor because change can be so daunting, and it&#8217;s always so much more comforting to stick with the familiar.<br>I struggled to understand the code inside WordPress docs and I got stuck. Fast.<\/p>\n\n\n\n<p>How do I get this new block stuff to talk to PHP?<br>In this talk, I will show you how to go from hating blocks to loving them with these development techniques.<br>In this presentation we are going to make a PHP Shortcode, and then make a dynamic block to show how this works.<\/p>\n\n\n\n<p>Let&#8217;s do this.<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<span class=\"embed-youtube\" style=\"text-align:center; display: block;\"><iframe loading=\"lazy\" class=\"youtube-player\" width=\"525\" height=\"296\" src=\"https:\/\/www.youtube.com\/embed\/MF5XTFPgLIM?version=3&#038;rel=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;fs=1&#038;hl=en-AU&#038;autohide=2&#038;wmode=transparent\" allowfullscreen=\"true\" style=\"border:0;\" sandbox=\"allow-scripts allow-same-origin allow-popups allow-presentation allow-popups-to-escape-sandbox\"><\/iframe><\/span>\n<\/div><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Slides<\/h2>\n\n\n\n<p><a href=\"https:\/\/docs.google.com\/presentation\/d\/1Ir8m3nyeCl0AY68YVMHnXRSu6cqaszuw5QjJqASoJhE\/edit#slide=id.p\">https:\/\/docs.google.com\/presentation\/d\/1Ir8m3nyeCl0AY68YVMHnXRSu6cqaszuw5QjJqASoJhE\/edit#slide=id.p<\/a><\/p>\n\n\n\n<p>Talk Resources: <a href=\"https:\/\/www.mrkwp.com\/2024\/11\/wordcamp-sydney\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/www.mrkwp.com\/2024\/11\/wordcamp-sydney\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Learn Javascript deeply, This was said by Matt and WordPress in 2015.I wasn&#8217;t that excited about that. I ignored that advice.I continued on my Merry Way with PHP, which is both good and bad. WordPress is made with PHP.I like PHP, I like server side code and have spent a lot of time in it.Now &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/sydney.wordcamp.org\/2024\/session\/how-i-went-from-a-php-shortcode-guy-to-a-react-block-guy\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;How I Went From a PHP Shortcode Guy to a React \/ Block Guy&#8221;<\/span><\/a><\/p>\n","protected":false},"author":14303198,"featured_media":0,"template":"","meta":{"jetpack_post_was_ever_published":false,"_wcpt_session_time":1730588400,"_wcpt_session_duration":2700,"_wcpt_session_type":"session","_wcpt_session_slides":"","_wcpt_session_video":"","_wcpt_speaker_id":[5526],"footnotes":""},"session_track":[31],"session_category":[33],"class_list":["post-5618","wcb_session","type-wcb_session","status-publish","hentry","wcb_track-room-2","wcb_session_category-developing-on-wordpress"],"jetpack_sharing_enabled":true,"session_date_time":{"date":"3 November 2024","time":"10:00"},"session_speakers":[{"id":"5526","slug":"matt-knighton","name":"Matt Knighton","link":"https:\/\/sydney.wordcamp.org\/2024\/speaker\/matt-knighton\/"}],"session_cats_rendered":"Developing on WordPress","_links":{"self":[{"href":"https:\/\/sydney.wordcamp.org\/2024\/wp-json\/wp\/v2\/sessions\/5618","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sydney.wordcamp.org\/2024\/wp-json\/wp\/v2\/sessions"}],"about":[{"href":"https:\/\/sydney.wordcamp.org\/2024\/wp-json\/wp\/v2\/types\/wcb_session"}],"version-history":[{"count":5,"href":"https:\/\/sydney.wordcamp.org\/2024\/wp-json\/wp\/v2\/sessions\/5618\/revisions"}],"predecessor-version":[{"id":7559,"href":"https:\/\/sydney.wordcamp.org\/2024\/wp-json\/wp\/v2\/sessions\/5618\/revisions\/7559"}],"speakers":[{"embeddable":true,"href":"https:\/\/sydney.wordcamp.org\/2024\/wp-json\/wp\/v2\/speakers\/5526"}],"author":[{"embeddable":true,"href":"https:\/\/sydney.wordcamp.org\/2024\/wp-json\/wporg\/v1\/users\/mrkdevelopment"}],"wp:attachment":[{"href":"https:\/\/sydney.wordcamp.org\/2024\/wp-json\/wp\/v2\/media?parent=5618"}],"wp:term":[{"taxonomy":"wcb_track","embeddable":true,"href":"https:\/\/sydney.wordcamp.org\/2024\/wp-json\/wp\/v2\/session_track?post=5618"},{"taxonomy":"wcb_session_category","embeddable":true,"href":"https:\/\/sydney.wordcamp.org\/2024\/wp-json\/wp\/v2\/session_category?post=5618"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}