{"id":265,"date":"2019-10-15T12:48:55","date_gmt":"2019-10-15T18:48:55","guid":{"rendered":"https:\/\/www.great-white-software.com\/blog\/?p=265"},"modified":"2019-10-07T14:51:26","modified_gmt":"2019-10-07T20:51:26","slug":"new-attributes-in-2019r2","status":"publish","type":"post","link":"https:\/\/www.great-white-software.com\/blog\/2019\/10\/15\/new-attributes-in-2019r2\/","title":{"rendered":"New Attributes in 2019r2"},"content":{"rendered":"\n<p>There&#8217;s a lot of things to digest in 2019r2<\/p>\n\n\n\n<p>One of the handy things that was added is a new Attribute you can make use of in your own custom controls &#8211; DefaultEvent<\/p>\n\n\n\n<p>By adding this attribute to your custom class&#8217; attributes you can make it so any one of the events your custom controls exposes is the &#8220;default event&#8221;. This is the one that will be selected when a user puts an instance of your control on a layout and adds events to it.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1263\" height=\"779\" src=\"https:\/\/i2.wp.com\/www.great-white-software.com\/blog\/wp-content\/uploads\/2019\/08\/Screen-Shot-2019-08-28-at-4.14.27-PM.png?fit=840%2C518&amp;ssl=1\" alt=\"\" class=\"wp-image-266\" srcset=\"https:\/\/i0.wp.com\/www.great-white-software.com\/blog\/wp-content\/uploads\/2019\/08\/Screen-Shot-2019-08-28-at-4.14.27-PM.png?w=1263&amp;ssl=1 1263w, https:\/\/i0.wp.com\/www.great-white-software.com\/blog\/wp-content\/uploads\/2019\/08\/Screen-Shot-2019-08-28-at-4.14.27-PM.png?resize=300%2C185&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.great-white-software.com\/blog\/wp-content\/uploads\/2019\/08\/Screen-Shot-2019-08-28-at-4.14.27-PM.png?resize=768%2C474&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.great-white-software.com\/blog\/wp-content\/uploads\/2019\/08\/Screen-Shot-2019-08-28-at-4.14.27-PM.png?resize=1024%2C632&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.great-white-software.com\/blog\/wp-content\/uploads\/2019\/08\/Screen-Shot-2019-08-28-at-4.14.27-PM.png?resize=1200%2C740&amp;ssl=1 1200w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1246\" height=\"844\" src=\"https:\/\/i2.wp.com\/www.great-white-software.com\/blog\/wp-content\/uploads\/2019\/08\/Screen-Shot-2019-08-28-at-4.14.46-PM.png?fit=840%2C569&amp;ssl=1\" alt=\"\" class=\"wp-image-267\" srcset=\"https:\/\/i0.wp.com\/www.great-white-software.com\/blog\/wp-content\/uploads\/2019\/08\/Screen-Shot-2019-08-28-at-4.14.46-PM.png?w=1246&amp;ssl=1 1246w, https:\/\/i0.wp.com\/www.great-white-software.com\/blog\/wp-content\/uploads\/2019\/08\/Screen-Shot-2019-08-28-at-4.14.46-PM.png?resize=300%2C203&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.great-white-software.com\/blog\/wp-content\/uploads\/2019\/08\/Screen-Shot-2019-08-28-at-4.14.46-PM.png?resize=768%2C520&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.great-white-software.com\/blog\/wp-content\/uploads\/2019\/08\/Screen-Shot-2019-08-28-at-4.14.46-PM.png?resize=1024%2C694&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.great-white-software.com\/blog\/wp-content\/uploads\/2019\/08\/Screen-Shot-2019-08-28-at-4.14.46-PM.png?resize=1200%2C813&amp;ssl=1 1200w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/figure>\n\n\n\n<p>Handy stuff.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>There&#8217;s a lot of things to digest in 2019r2 One of the handy things that was added is a new Attribute you can make use of in your own custom controls &#8211; DefaultEvent By adding this attribute to your custom class&#8217; attributes you can make it so any one of the events your custom controls &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.great-white-software.com\/blog\/2019\/10\/15\/new-attributes-in-2019r2\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;New Attributes in 2019r2&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[6,3],"class_list":["post-265","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-tips","tag-xojo"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.great-white-software.com\/blog\/wp-json\/wp\/v2\/posts\/265","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.great-white-software.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.great-white-software.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.great-white-software.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.great-white-software.com\/blog\/wp-json\/wp\/v2\/comments?post=265"}],"version-history":[{"count":1,"href":"https:\/\/www.great-white-software.com\/blog\/wp-json\/wp\/v2\/posts\/265\/revisions"}],"predecessor-version":[{"id":268,"href":"https:\/\/www.great-white-software.com\/blog\/wp-json\/wp\/v2\/posts\/265\/revisions\/268"}],"wp:attachment":[{"href":"https:\/\/www.great-white-software.com\/blog\/wp-json\/wp\/v2\/media?parent=265"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.great-white-software.com\/blog\/wp-json\/wp\/v2\/categories?post=265"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.great-white-software.com\/blog\/wp-json\/wp\/v2\/tags?post=265"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}