{"id":5483,"date":"2012-11-04T20:42:29","date_gmt":"2012-11-04T20:42:29","guid":{"rendered":"http:\/\/www.oik-plugins.com\/?page_id=5483"},"modified":"2020-12-01T19:10:41","modified_gmt":"2020-12-01T19:10:41","slug":"lazy-shortcodes","status":"publish","type":"page","link":"https:\/\/www.oik-plugins.com\/about-oik-plugins-lazy-smart-shortcodes\/lazy-shortcodes\/","title":{"rendered":"lazy shortcodes"},"content":{"rendered":"One of the main principles of oik-plugins is to develop lazy shortcodes using lazy code.\r\nLazy shortcodes say\r\n<blockquote>Call me when you need me, here&#8217;s how to get in touch<\/blockquote>\r\n<!--more-->\r\n\r\nThe oik-plugins code is intended to be as efficient as possible.\r\n\r\nWe believe that it&#8217;s only necessary to instantiate the code when actually needed.\r\nJust because a shortcode is defined, there is no need to load all the gubbins that it uses until it&#8217;s actually invoked.\r\nThis principle applies to a lot of the code in the oik suite of plugins.\r\n<ul>\r\n\t<li>They don\u2019t waste time doing things that other plugins and APIs can do for them; don\u2019t include files if other plugins do it for you.<\/li>\r\n\t<li>They don\u2019t do things until necessary; waiting for messages to say something\u2019s happened before loading code<\/li>\r\n<\/ul>\r\nTo find out more about lazy smart shortcodes why not take some time looking at this <a title=\"Lazy smart shortcodes at WordCamp UK 2012\" href=\"http:\/\/oik-plugins.eu\/lazy-smart-shortcodes\/\" target=\"_blank\" rel=\"noopener noreferrer\">&#8220;presentation&#8221;<\/a>.\r\n\r\nTechnically lazy code implements \u201ccallbacks\u201d and deferred loading of functionality.","protected":false},"excerpt":{"rendered":"<p>One of the main principles of oik-plugins is to develop lazy shortcodes using lazy code.<br \/>\nLazy shortcodes say<\/p>\n<blockquote><p>Call me when you need me, here&#8217;s how to get in touch<\/p><\/blockquote>\n","protected":false},"author":1,"featured_media":0,"parent":2068,"menu_order":0,"comment_status":"closed","ping_status":"open","template":"","meta":{"_acf_changed":false,"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","footnotes":""},"letters":[542],"class_list":{"0":"post-5483","1":"page","2":"type-page","3":"status-publish","5":"letters-l","6":"entry"},"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>lazy shortcodes - [oik] plugins.com<\/title>\n<meta name=\"description\" content=\"Lazy - one of the main principles of oik-plugins. Don&#039;t do something until you really need to.\" \/>\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.oik-plugins.com\/about-oik-plugins-lazy-smart-shortcodes\/lazy-shortcodes\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"lazy shortcodes - [oik] plugins.com\" \/>\n<meta property=\"og:description\" content=\"Lazy - one of the main principles of oik-plugins. Don&#039;t do something until you really need to.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.oik-plugins.com\/about-oik-plugins-lazy-smart-shortcodes\/lazy-shortcodes\/\" \/>\n<meta property=\"og:site_name\" content=\"[oik] plugins.com\" \/>\n<meta property=\"article:modified_time\" content=\"2020-12-01T19:10:41+00:00\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.oik-plugins.com\/about-oik-plugins-lazy-smart-shortcodes\/lazy-shortcodes\/\",\"url\":\"https:\/\/www.oik-plugins.com\/about-oik-plugins-lazy-smart-shortcodes\/lazy-shortcodes\/\",\"name\":\"lazy shortcodes - [oik] plugins.com\",\"isPartOf\":{\"@id\":\"https:\/\/www.oik-plugins.com\/#website\"},\"datePublished\":\"2012-11-04T20:42:29+00:00\",\"dateModified\":\"2020-12-01T19:10:41+00:00\",\"description\":\"Lazy - one of the main principles of oik-plugins. Don't do something until you really need to.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.oik-plugins.com\/about-oik-plugins-lazy-smart-shortcodes\/lazy-shortcodes\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.oik-plugins.com\/about-oik-plugins-lazy-smart-shortcodes\/lazy-shortcodes\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.oik-plugins.com\/about-oik-plugins-lazy-smart-shortcodes\/lazy-shortcodes\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"About oik plugins &#8211; lazy smart shortcodes\",\"item\":\"https:\/\/www.oik-plugins.com\/about-oik-plugins-lazy-smart-shortcodes\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"lazy shortcodes\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.oik-plugins.com\/#website\",\"url\":\"https:\/\/www.oik-plugins.com\/\",\"name\":\"[oik] plugins.com\",\"description\":\"WordPress plugins and themes\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.oik-plugins.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"lazy shortcodes - [oik] plugins.com","description":"Lazy - one of the main principles of oik-plugins. Don't do something until you really need to.","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.oik-plugins.com\/about-oik-plugins-lazy-smart-shortcodes\/lazy-shortcodes\/","og_locale":"en_US","og_type":"article","og_title":"lazy shortcodes - [oik] plugins.com","og_description":"Lazy - one of the main principles of oik-plugins. Don't do something until you really need to.","og_url":"https:\/\/www.oik-plugins.com\/about-oik-plugins-lazy-smart-shortcodes\/lazy-shortcodes\/","og_site_name":"[oik] plugins.com","article_modified_time":"2020-12-01T19:10:41+00:00","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.oik-plugins.com\/about-oik-plugins-lazy-smart-shortcodes\/lazy-shortcodes\/","url":"https:\/\/www.oik-plugins.com\/about-oik-plugins-lazy-smart-shortcodes\/lazy-shortcodes\/","name":"lazy shortcodes - [oik] plugins.com","isPartOf":{"@id":"https:\/\/www.oik-plugins.com\/#website"},"datePublished":"2012-11-04T20:42:29+00:00","dateModified":"2020-12-01T19:10:41+00:00","description":"Lazy - one of the main principles of oik-plugins. Don't do something until you really need to.","breadcrumb":{"@id":"https:\/\/www.oik-plugins.com\/about-oik-plugins-lazy-smart-shortcodes\/lazy-shortcodes\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.oik-plugins.com\/about-oik-plugins-lazy-smart-shortcodes\/lazy-shortcodes\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.oik-plugins.com\/about-oik-plugins-lazy-smart-shortcodes\/lazy-shortcodes\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"About oik plugins &#8211; lazy smart shortcodes","item":"https:\/\/www.oik-plugins.com\/about-oik-plugins-lazy-smart-shortcodes\/"},{"@type":"ListItem","position":2,"name":"lazy shortcodes"}]},{"@type":"WebSite","@id":"https:\/\/www.oik-plugins.com\/#website","url":"https:\/\/www.oik-plugins.com\/","name":"[oik] plugins.com","description":"WordPress plugins and themes","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.oik-plugins.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/www.oik-plugins.com\/wp-json\/wp\/v2\/pages\/5483","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.oik-plugins.com\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.oik-plugins.com\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.oik-plugins.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.oik-plugins.com\/wp-json\/wp\/v2\/comments?post=5483"}],"version-history":[{"count":5,"href":"https:\/\/www.oik-plugins.com\/wp-json\/wp\/v2\/pages\/5483\/revisions"}],"predecessor-version":[{"id":40640,"href":"https:\/\/www.oik-plugins.com\/wp-json\/wp\/v2\/pages\/5483\/revisions\/40640"}],"up":[{"embeddable":true,"href":"https:\/\/www.oik-plugins.com\/wp-json\/wp\/v2\/pages\/2068"}],"wp:attachment":[{"href":"https:\/\/www.oik-plugins.com\/wp-json\/wp\/v2\/media?parent=5483"}],"wp:term":[{"taxonomy":"letters","embeddable":true,"href":"https:\/\/www.oik-plugins.com\/wp-json\/wp\/v2\/letters?post=5483"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}