{"id":144,"date":"2014-07-15T11:27:04","date_gmt":"2014-07-15T17:27:04","guid":{"rendered":"http:\/\/laubsterboy.com\/blog\/?p=144"},"modified":"2018-02-11T11:46:52","modified_gmt":"2018-02-11T18:46:52","slug":"events-manager-custom-event-attributes-conditionals","status":"publish","type":"post","link":"https:\/\/www.johnrussell.dev\/blog\/2014\/07\/events-manager-custom-event-attributes-conditionals\/","title":{"rendered":"Events Manager Custom Event Attributes and Conditionals"},"content":{"rendered":"<p>The <a href=\"http:\/\/wp-events-plugin.com\/\">Events Manager<\/a> plugin for WordPress can be used to build a fantastic event and calendaring system, with countless features and expandability, but there are times that the built in event attributes just aren&#8217;t enough. Thankfully the plugin is very developer friendly and allows users to create custom event attributes directly in the dashboard. However, what if you need to display a custom event attribute if it&#8217;s used, and not display it if it&#8217;s not used? That&#8217;s where event attribute <a href=\"http:\/\/wp-events-plugin.com\/documentation\/conditional-placeholders\/\">conditional placeholders<\/a> come in, however if you&#8217;re wanting to use a conditional placeholder with custom event attributes you&#8217;ll have to create it yourself. That&#8217;s what we&#8217;ll cover in this article.<\/p>\n<h2>Creating Custom Event Attributes<\/h2>\n<p>First in order to use a custom conditional placeholder you&#8217;ll need to have custom event attributes, so let&#8217;s create those first. To do this simply login to your WordPress dashboard and go to Events &gt; Settings &gt; General (tab) &gt; General Options and scroll down until you find the\u00a0radio input for &#8220;Enable event attributes?&#8221; and be sure that is set to &#8220;Yes&#8221;. Next you will need to scroll down to the &#8220;Event Attributes&#8221; text area and add your own custom event attributes. Note that in order for the custom conditional placeholder to function properly the custom event attribute should\u00a0have no spaces, such as &#8220;#_ATT{this_is_my_custom_event_attribute}&#8221;. <strong>Also note that the custom event attribute is strictly case sensitive so be sure the exact same name is used throughout.<\/strong> For the sake of this article I will be creating a custom event attribute called test, so it will be added using the code below.<\/p>\n<pre class=\"lang:default decode:true\">#_ATT{test}<\/pre>\n<p>Once you&#8217;ve finished adding your custom event attributes be sure to save changes.<\/p>\n<h2>Creating Custom Conditional Placeholders<\/h2>\n<p>Next, we&#8217;ll add the necessary code to process our custom conditional placeholders. To do this we&#8217;ll implement the use of a filter hook that is called by the Events Manager plugin. Note that the code for the conditional placeholders will be added to your theme&#8217;s functions.php file. Thankfully the code for creating custom conditional placeholder is fairly simple, so I&#8217;ll show the code that I&#8217;ve used for the &#8220;test&#8221; custom event attribute and then explain how it works, and what you need to change.<\/p>\n<pre class=\"lang:default decode:true\">function em_event_output_condition_filter($replacement, $condition, $match, $EM_Event){\r\n    \/\/ Checks for has_test conditional\r\n    if(is_object($EM_Event) &amp;&amp; preg_match('\/^has_(test)$\/', $condition, $matches)){\r\n        if(array_key_exists($matches[1], $EM_Event-&gt;event_attributes) &amp;&amp; !empty($EM_Event-&gt;event_attributes[$matches[1]]) ){\r\n            $replacement = preg_replace(\"\/\\{\\\/?$condition\\}\/\", '', $match);\r\n        }else{\r\n            $replacement = '';\r\n        }\r\n    }\r\n    \r\n    return $replacement;\r\n}\r\nadd_filter('em_event_output_condition', 'em_event_output_condition_filter', 1, 4);<\/pre>\n<p>It&#8217;s as simple as that! Once the above code has been added to the functions.php file the &#8220;#_ATT{test}&#8221; custom event attribute and &#8220;{has_test}&#8221; custom conditional placeholder are ready to be used.<\/p>\n<p>Explaining the above code, we&#8217;re making use of the &#8220;em_event_output_condition&#8221; filter that is called by the Events Manager plugin each time it encounters a conditional placeholder that doesn&#8217;t match one of the built-in conditional placeholders.<\/p>\n<p>Here is a description of the passed attributes:<\/p>\n<ul>\n<li>$replacement (string) will almost always be empty<\/li>\n<li>$condition (string) will be the custom conditional placeholder name (such as, &#8220;has_test&#8221;)<\/li>\n<li>$match (string) will contain the text from the beginning of the custom conditional placeholder to the end (such as, &#8220;{has_test} #_ATT{test} {\/has_test}&#8221;)<\/li>\n<li>$EM_Event (event object) will be the event object of the current event being viewed<\/li>\n<\/ul>\n<p>Essentially what the above code does is check for the existence of our custom conditional placeholder, then checks to see if the custom event attribute exists and if it has a non-empty value. If those conditions are met, then the content within the\u00a0custom conditional placeholder, inside $match, is\u00a0returned. If those conditions are not met then an empty string is returned.<\/p>\n<p>Due to the simplicity of this filter, in order to modify the above code to work with your custom conditional placeholders simply change the word &#8220;test&#8221; on lines 2 and 3 to be the name of your custom event attribute, such as &#8220;my_custom_event_attribute&#8221;.<\/p>\n<p>There you have it! You&#8217;ve now created a custom event attribute and a corresponding custom conditional placeholder. You may be wondering, &#8220;what if I need to create multiple custom conditional placeholders?&#8221;, or &#8220;where do I use the custom conditional placeholder?&#8221;, and I&#8217;ll cover both of those questions in the final section.<\/p>\n<h2>Wrapping Everything\u00a0Up<\/h2>\n<p>In the case that you&#8217;re needing to create multiple custom conditional placeholders you simply duplicate a portion of the filter code above.<\/p>\n<pre class=\"lang:default decode:true\">    \/\/ Checks for has_test conditional\r\n    if(is_object($EM_Event) &amp;&amp; preg_match('\/^has_(test)$\/', $condition, $matches)){\r\n        if(array_key_exists($matches[1], $EM_Event-&gt;event_attributes) &amp;&amp; !empty($EM_Event-&gt;event_attributes[$matches[1]]) ){\r\n            $replacement = preg_replace(\"\/\\{\\\/?$condition\\}\/\", '', $match);\r\n        }else{\r\n            $replacement = '';\r\n        }\r\n    }<\/pre>\n<p>This is the code that actually does the processing, and duplicating it (and placing it above or below the existing code) and then replacing the custom event attribute with your additional custom event attribute is all you need to do. The reason that this works is because the Events Manager will call this filter *each* time it encounters a conditional placeholder that doesn&#8217;t match the built-in conditional placeholders. Note that your duplicated code MUST come before the line noted below.<\/p>\n<pre class=\"lang:default decode:true\">return $replacement;<\/pre>\n<p>Lastly, in order for the custom event attribute and custom conditional placeholder to have any effect we need to add it to the front-end. The most common, and simple, way to do this is to login to your WordPress dashboard and then go to Events &gt; Settings &gt; Formatting (tab) &gt; Events and scroll down to the \u00a0&#8220;Default single event format&#8221; text area. This is where you can add your custom event attribute and custom conditional placeholder code where ever you&#8217;d like it to display on the single event page.<\/p>\n<pre class=\"lang:default decode:true\">{has_test} This is an example of how to use the custom event attribute and display its value: #_ATT{test}, using a custom conditional placeholder.{\/has_test}<\/pre>\n<h2>What About no_attribute Conditionals<\/h2>\n<p>Update &#8211; September 26, 2014: As a follow up to \u00a0Koen&#8217;s question in the comments I&#8217;ve also added a snippet below that will allow you to use a conditional placeholder in the case that a custom attribute is not used.<\/p>\n<pre class=\"lang:default decode:true \">    \/\/ Checks for no_test conditional\r\n    if (is_object($EM_Event) &amp;&amp; preg_match('\/^no_(test)$\/', $condition, $matches)) {\r\n        if ( !array_key_exists($matches[1], $EM_Event-&gt;event_attributes) || empty($EM_Event-&gt;event_attributes[$matches[1]]) ) {\r\n            $replacement = preg_replace(\"\/\\{\\\/?$condition\\}\/\", '', $match);\r\n        } else {\r\n            $replacement = '';\r\n        }\r\n    }<\/pre>\n<p>This can simply be used in addition to your other conditions (has_attribute or no_attribute) within the\u00a0&#8220;em_event_output_condition_filter&#8221; filter function.<\/p>\n<h2>Nesting Conditionals<\/h2>\n<p>Update \u2013 October\u00a023, 2014: If you plan to nest conditionals within other conditionals (whether they&#8217;re custom or built-in) you will first need to enable this functionality. By default the Events Manager plugin will only look for the first level of conditionals, and unfortunately there is no option for enabling conditional recurrence within the Events Manager Settings within the dashboard. Instead you will need to add some additional code to your functions.php theme file. <strong>Once the below code has been added you will need to go to the Events Manager Settings and click save (no changes necessary) to fire the &#8220;em_options_save&#8221; action.<\/strong> I used this action since this is technically updating an Events Manager option and it prevents the update_option method from being called each page load.<\/p>\n<pre class=\"lang:php decode:true\">function lb_em_options_save() {\r\n\tupdate_option('dbem_conditional_recursions', 2);\r\n}\r\nadd_action('em_options_save', 'lb_em_options_save');<\/pre>\n<p>&nbsp;<\/p>\n<p>The Events Manager plugin checks for the\u00a0dbem_conditional_recursions option upon instantiation. If this option is set it will use its value, and if not then it will use the default value of one. So, the above code sets the option value to two thus overriding the default. \u00a0This will allow for one conditional to be nested within another, however you will need to adjust the above code if you plan nest conditionals at an even deeper level. Keep in mind high levels of recursion can negatively impact performance.<\/p>\n<h2>In Conclusion<\/h2>\n<p>Overall, the process of adding a custom event attribute and custom conditional placeholder is relatively simple and provides nearly infinite customizability to the Events Manager plugin. I hope this has been an easy to follow and informative guide on how to create custom event attributes. Be sure to\u00a0post comments and let me know if you&#8217;ve ran into any problems or have any questions.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Events Manager plugin for WordPress can be used to build a fantastic event and calendaring system, with countless features and expandability, but there are times that the built in event attributes just aren&#8217;t enough. Thankfully the plugin is very developer friendly and allows users to create custom event attributes directly in the dashboard. However, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[2,3],"tags":[13,16,24,25,28,31,44],"class_list":["post-144","post","type-post","status-publish","format-standard","hentry","category-code-snippet","category-guide","tag-conditional-placeholders","tag-custom-event-attributes","tag-event-attributes","tag-events-manager","tag-filters","tag-has_attribute","tag-no_attribute"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Events Manager Custom Event Attributes and Conditionals - John Russell Blog<\/title>\n<meta name=\"description\" content=\"A guide for how to create custom event attributes and custom conditional placeholders for the WordPress Events Manager plugin.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.johnrussell.dev\/blog\/2014\/07\/events-manager-custom-event-attributes-conditionals\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Events Manager Custom Event Attributes and Conditionals - John Russell Blog\" \/>\n<meta property=\"og:description\" content=\"A guide for how to create custom event attributes and custom conditional placeholders for the WordPress Events Manager plugin.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.johnrussell.dev\/blog\/2014\/07\/events-manager-custom-event-attributes-conditionals\/\" \/>\n<meta property=\"og:site_name\" content=\"John Russell Blog\" \/>\n<meta property=\"article:published_time\" content=\"2014-07-15T17:27:04+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-02-11T18:46:52+00:00\" \/>\n<meta name=\"author\" content=\"John Russell\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@laubsterboy\" \/>\n<meta name=\"twitter:site\" content=\"@laubsterboy\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"John Russell\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.johnrussell.dev\/blog\/2014\/07\/events-manager-custom-event-attributes-conditionals\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.johnrussell.dev\/blog\/2014\/07\/events-manager-custom-event-attributes-conditionals\/\"},\"author\":{\"name\":\"John Russell\",\"@id\":\"https:\/\/www.johnrussell.dev\/blog\/#\/schema\/person\/296c0c6bd1deeeb20834393e1e16325c\"},\"headline\":\"Events Manager Custom Event Attributes and Conditionals\",\"datePublished\":\"2014-07-15T17:27:04+00:00\",\"dateModified\":\"2018-02-11T18:46:52+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.johnrussell.dev\/blog\/2014\/07\/events-manager-custom-event-attributes-conditionals\/\"},\"wordCount\":1256,\"commentCount\":49,\"keywords\":[\"Conditional Placeholders\",\"Custom Event Attributes\",\"Event Attributes\",\"Events Manager\",\"Filters\",\"has_attribute\",\"no_attribute\"],\"articleSection\":[\"Code Snippet\",\"Guide\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.johnrussell.dev\/blog\/2014\/07\/events-manager-custom-event-attributes-conditionals\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.johnrussell.dev\/blog\/2014\/07\/events-manager-custom-event-attributes-conditionals\/\",\"url\":\"https:\/\/www.johnrussell.dev\/blog\/2014\/07\/events-manager-custom-event-attributes-conditionals\/\",\"name\":\"Events Manager Custom Event Attributes and Conditionals - John Russell Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.johnrussell.dev\/blog\/#website\"},\"datePublished\":\"2014-07-15T17:27:04+00:00\",\"dateModified\":\"2018-02-11T18:46:52+00:00\",\"author\":{\"@id\":\"https:\/\/www.johnrussell.dev\/blog\/#\/schema\/person\/296c0c6bd1deeeb20834393e1e16325c\"},\"description\":\"A guide for how to create custom event attributes and custom conditional placeholders for the WordPress Events Manager plugin.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.johnrussell.dev\/blog\/2014\/07\/events-manager-custom-event-attributes-conditionals\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.johnrussell.dev\/blog\/2014\/07\/events-manager-custom-event-attributes-conditionals\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.johnrussell.dev\/blog\/2014\/07\/events-manager-custom-event-attributes-conditionals\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.johnrussell.dev\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Events Manager Custom Event Attributes and Conditionals\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.johnrussell.dev\/blog\/#website\",\"url\":\"https:\/\/www.johnrussell.dev\/blog\/\",\"name\":\"John Russell Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.johnrussell.dev\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.johnrussell.dev\/blog\/#\/schema\/person\/296c0c6bd1deeeb20834393e1e16325c\",\"name\":\"John Russell\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.johnrussell.dev\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/00ce0f258fcc5e5d29897a5e81316009713e9104cfaf49f481c5bce3f81c7cb1?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/00ce0f258fcc5e5d29897a5e81316009713e9104cfaf49f481c5bce3f81c7cb1?s=96&d=mm&r=g\",\"caption\":\"John Russell\"},\"url\":\"https:\/\/www.johnrussell.dev\/blog\/author\/laubsterboy\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Events Manager Custom Event Attributes and Conditionals - John Russell Blog","description":"A guide for how to create custom event attributes and custom conditional placeholders for the WordPress Events Manager plugin.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.johnrussell.dev\/blog\/2014\/07\/events-manager-custom-event-attributes-conditionals\/","og_locale":"en_US","og_type":"article","og_title":"Events Manager Custom Event Attributes and Conditionals - John Russell Blog","og_description":"A guide for how to create custom event attributes and custom conditional placeholders for the WordPress Events Manager plugin.","og_url":"https:\/\/www.johnrussell.dev\/blog\/2014\/07\/events-manager-custom-event-attributes-conditionals\/","og_site_name":"John Russell Blog","article_published_time":"2014-07-15T17:27:04+00:00","article_modified_time":"2018-02-11T18:46:52+00:00","author":"John Russell","twitter_card":"summary_large_image","twitter_creator":"@laubsterboy","twitter_site":"@laubsterboy","twitter_misc":{"Written by":"John Russell","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.johnrussell.dev\/blog\/2014\/07\/events-manager-custom-event-attributes-conditionals\/#article","isPartOf":{"@id":"https:\/\/www.johnrussell.dev\/blog\/2014\/07\/events-manager-custom-event-attributes-conditionals\/"},"author":{"name":"John Russell","@id":"https:\/\/www.johnrussell.dev\/blog\/#\/schema\/person\/296c0c6bd1deeeb20834393e1e16325c"},"headline":"Events Manager Custom Event Attributes and Conditionals","datePublished":"2014-07-15T17:27:04+00:00","dateModified":"2018-02-11T18:46:52+00:00","mainEntityOfPage":{"@id":"https:\/\/www.johnrussell.dev\/blog\/2014\/07\/events-manager-custom-event-attributes-conditionals\/"},"wordCount":1256,"commentCount":49,"keywords":["Conditional Placeholders","Custom Event Attributes","Event Attributes","Events Manager","Filters","has_attribute","no_attribute"],"articleSection":["Code Snippet","Guide"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.johnrussell.dev\/blog\/2014\/07\/events-manager-custom-event-attributes-conditionals\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.johnrussell.dev\/blog\/2014\/07\/events-manager-custom-event-attributes-conditionals\/","url":"https:\/\/www.johnrussell.dev\/blog\/2014\/07\/events-manager-custom-event-attributes-conditionals\/","name":"Events Manager Custom Event Attributes and Conditionals - John Russell Blog","isPartOf":{"@id":"https:\/\/www.johnrussell.dev\/blog\/#website"},"datePublished":"2014-07-15T17:27:04+00:00","dateModified":"2018-02-11T18:46:52+00:00","author":{"@id":"https:\/\/www.johnrussell.dev\/blog\/#\/schema\/person\/296c0c6bd1deeeb20834393e1e16325c"},"description":"A guide for how to create custom event attributes and custom conditional placeholders for the WordPress Events Manager plugin.","breadcrumb":{"@id":"https:\/\/www.johnrussell.dev\/blog\/2014\/07\/events-manager-custom-event-attributes-conditionals\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.johnrussell.dev\/blog\/2014\/07\/events-manager-custom-event-attributes-conditionals\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.johnrussell.dev\/blog\/2014\/07\/events-manager-custom-event-attributes-conditionals\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.johnrussell.dev\/blog\/"},{"@type":"ListItem","position":2,"name":"Events Manager Custom Event Attributes and Conditionals"}]},{"@type":"WebSite","@id":"https:\/\/www.johnrussell.dev\/blog\/#website","url":"https:\/\/www.johnrussell.dev\/blog\/","name":"John Russell Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.johnrussell.dev\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.johnrussell.dev\/blog\/#\/schema\/person\/296c0c6bd1deeeb20834393e1e16325c","name":"John Russell","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.johnrussell.dev\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/00ce0f258fcc5e5d29897a5e81316009713e9104cfaf49f481c5bce3f81c7cb1?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/00ce0f258fcc5e5d29897a5e81316009713e9104cfaf49f481c5bce3f81c7cb1?s=96&d=mm&r=g","caption":"John Russell"},"url":"https:\/\/www.johnrussell.dev\/blog\/author\/laubsterboy\/"}]}},"_links":{"self":[{"href":"https:\/\/www.johnrussell.dev\/blog\/wp-json\/wp\/v2\/posts\/144","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.johnrussell.dev\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.johnrussell.dev\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.johnrussell.dev\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.johnrussell.dev\/blog\/wp-json\/wp\/v2\/comments?post=144"}],"version-history":[{"count":10,"href":"https:\/\/www.johnrussell.dev\/blog\/wp-json\/wp\/v2\/posts\/144\/revisions"}],"predecessor-version":[{"id":327,"href":"https:\/\/www.johnrussell.dev\/blog\/wp-json\/wp\/v2\/posts\/144\/revisions\/327"}],"wp:attachment":[{"href":"https:\/\/www.johnrussell.dev\/blog\/wp-json\/wp\/v2\/media?parent=144"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.johnrussell.dev\/blog\/wp-json\/wp\/v2\/categories?post=144"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.johnrussell.dev\/blog\/wp-json\/wp\/v2\/tags?post=144"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}