{"id":264,"date":"2024-02-14T11:16:09","date_gmt":"2024-02-14T10:16:09","guid":{"rendered":"https:\/\/solarxbike.se\/labbet\/code-snippets\/?page_id=264"},"modified":"2024-02-14T14:10:48","modified_gmt":"2024-02-14T13:10:48","slug":"shortcode-2","status":"publish","type":"page","link":"https:\/\/solarxbike.se\/labbet\/code-snippets\/shortcode-2\/","title":{"rendered":"[shortcode]"},"content":{"rendered":"<pre><strong>k\u00e4lla<\/strong>: <a href=\"https:\/\/generatewp.com\/shortcodes\/\">GenerateWp<\/a> |<\/pre>\n<hr \/>\n<p>Utkast &#8221;shortcode&#8221;<\/p>\n<p>[show_tickets | user=&#8221;all&#8221; | status=&#8221;all&#8221; | view=&#8221;aktuella&#8221; ]<\/p>\n<p>&nbsp;<\/p>\n<pre class=\"prettyprint prettyprinted\"><span style=\"font-size: 10pt;\"><span class=\"com\">\/\/ Add Shortcode<\/span>\r\n<span class=\"kwd\">function<\/span><span class=\"pln\"> custom_shortcodeshow_tickets<\/span><span class=\"pun\">(<\/span><span class=\"pln\"> $atts <\/span><span class=\"pun\">)<\/span> <span class=\"pun\">{<\/span>\r\n\r\n\t<span class=\"com\">\/\/ Attributes<\/span><span class=\"pln\">\r\n\t$atts <\/span><span class=\"pun\">=<\/span><span class=\"pln\"> shortcode_atts<\/span><span class=\"pun\">(<\/span><span class=\"pln\">\r\n\t\tarray<\/span><span class=\"pun\">(<\/span>\r\n\t\t\t<span class=\"str\">'user'<\/span> <span class=\"pun\">=&gt;<\/span> <span class=\"str\">'all'<\/span><span class=\"pun\">,<\/span>\r\n\t\t\t<span class=\"str\">'status'<\/span> <span class=\"pun\">=&gt;<\/span> <span class=\"str\">'all'<\/span><span class=\"pun\">,<\/span>\r\n\t\t\t<span class=\"str\">'view'<\/span> <span class=\"pun\">=&gt;<\/span> <span class=\"str\">'aktuella'<\/span><span class=\"pun\">,<\/span>\r\n\t\t<span class=\"pun\">),<\/span><span class=\"pln\">\r\n\t\t$atts<\/span><span class=\"pun\">,<\/span>\r\n\t\t<span class=\"str\">'kund'<\/span>\r\n\t<span class=\"pun\">);<\/span>\r\n\r\n<span class=\"pun\">}<\/span><span class=\"pln\">\r\nadd_shortcode<\/span><span class=\"pun\">(<\/span> <span class=\"str\">'kund'<\/span><span class=\"pun\">,<\/span> <span class=\"str\">'custom_shortcodeshow_tickets'<\/span> <span class=\"pun\">);<\/span><\/span><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>k\u00e4lla: GenerateWp | Utkast &#8221;shortcode&#8221; [show_tickets | user=&#8221;all&#8221; | status=&#8221;all&#8221; | view=&#8221;aktuella&#8221; ] &nbsp; \/\/ Add Shortcode function custom_shortcodeshow_tickets( $atts ) { \/\/ Attributes $atts = shortcode_atts( array( &#8217;user&#8217; =&gt; &#8217;all&#8217;, &#8217;status&#8217; =&gt; &#8217;all&#8217;, &#8217;view&#8217; =&gt; &#8217;aktuella&#8217;, ), $atts, &#8217;kund&#8217; ); } add_shortcode( &#8217;kund&#8217;, &#8217;custom_shortcodeshow_tickets&#8217; );<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-264","page","type-page","status-publish"],"_links":{"self":[{"href":"https:\/\/solarxbike.se\/labbet\/code-snippets\/wp-json\/wp\/v2\/pages\/264","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/solarxbike.se\/labbet\/code-snippets\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/solarxbike.se\/labbet\/code-snippets\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/solarxbike.se\/labbet\/code-snippets\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/solarxbike.se\/labbet\/code-snippets\/wp-json\/wp\/v2\/comments?post=264"}],"version-history":[{"count":6,"href":"https:\/\/solarxbike.se\/labbet\/code-snippets\/wp-json\/wp\/v2\/pages\/264\/revisions"}],"predecessor-version":[{"id":277,"href":"https:\/\/solarxbike.se\/labbet\/code-snippets\/wp-json\/wp\/v2\/pages\/264\/revisions\/277"}],"wp:attachment":[{"href":"https:\/\/solarxbike.se\/labbet\/code-snippets\/wp-json\/wp\/v2\/media?parent=264"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}