{"id":118,"date":"2022-04-08T20:16:00","date_gmt":"2022-04-08T20:16:00","guid":{"rendered":"http:\/\/localhost\/wordpress_odindocs\/?p=118"},"modified":"2022-04-20T20:54:16","modified_gmt":"2022-04-20T20:54:16","slug":"template-functions","status":"publish","type":"post","link":"https:\/\/odindesignthemes.com\/struninndocs\/template-functions\/","title":{"rendered":"Template Functions"},"content":{"rendered":"\n<p>The plugin provides template functions for the following widgets:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong><a href=\"#channel-subscribe-button\">Channel Subscribe Button<\/a><\/strong><\/li><li><strong><a href=\"#channel-schedule\">Channel Schedule<\/a><\/strong><\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"channel-subscribe-button\"><strong>Channel Subscribe Button<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Syntax<\/h3>\n\n\n\n<p><strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#24831d\" class=\"has-inline-color\">struninntwitch_template_channel_subscribe_button(<\/mark> <mark style=\"background-color:rgba(0, 0, 0, 0);color:#cd2f23\" class=\"has-inline-color\">array<\/mark><mark style=\"background-color:rgba(0, 0, 0, 0);color:#0f55c8\" class=\"has-inline-color\"> $args<\/mark> <mark style=\"background-color:rgba(0, 0, 0, 0);color:#24831d\" class=\"has-inline-color\">=<\/mark> [] <mark style=\"background-color:rgba(0, 0, 0, 0);color:#24831d\" class=\"has-inline-color\">)<\/mark><\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Parameters<\/h3>\n\n\n\n<p><strong>$args<\/strong><br><em>(array)<\/em> <em>(Optional)<\/em> Arguments to modify template output.<\/p>\n\n\n<p style=\"padding-left: 40px;\"><strong>$additional_wrapper_classes<\/strong><br \/><em>(array) (Optional)<\/em> Additional classes for the wrapper.<\/p>\n<p style=\"padding-left: 40px;\"><strong>$text<\/strong><br \/>(string) (Optional) Button text.<br \/><em>Default value: &#8216;Subscribe!&#8217;<\/em><\/p>\n<p style=\"padding-left: 40px;\"><em><strong>$before_text<\/strong><br \/>(string) (Optional) <\/em><span style=\"color: initial;\">Content to insert before button text<\/span><em>.<\/em><\/p>\n<p style=\"padding-left: 40px;\"><em><strong>$after_text<\/strong><br \/>(string) (Optional) <\/em><span style=\"color: initial;\">Content to insert after button text<\/span>.<\/p>\n<p style=\"padding-left: 40px;\"><em><strong>$href<\/strong><br \/>(string) (Optional) <\/em><span style=\"color: initial;\">Button link URL<\/span>.<\/p>\n<p style=\"padding-left: 40px;\"><em><strong>$target<\/strong><br \/>(string) (Optional) <\/em><span style=\"color: initial;\">Button target<\/span>.<br \/><em>Default value: &#8216;_blank&#8217;<\/em><\/p>\n<p style=\"padding-left: 40px;\"><em><strong>$styles<\/strong><br \/>(string) (Optional) <\/em><span style=\"color: initial;\">Additional inline styles for the wrapper<\/span>.<\/p>\n\n\n<h3 class=\"wp-block-heading\">Example<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>$args = &#91;\n  'text'                       =&gt; __('Subscribe to my channel!', 'text_domain'),\n  'additional_wrapper_classes' =&gt; &#91;'custom-class-1', 'custom-class-2']\n];\n\nstruninntwitch_template_channel_subscribe_button($args);<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"channel-schedule\"><strong>Channel Schedule<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Syntax<\/h3>\n\n\n\n<p><strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#24831d\" class=\"has-inline-color\">struninntwitch_template_channel_schedule(<\/mark> <mark style=\"background-color:rgba(0, 0, 0, 0);color:#cd2f23\" class=\"has-inline-color\">array<\/mark><mark style=\"background-color:rgba(0, 0, 0, 0);color:#0f55c8\" class=\"has-inline-color\"> $args<\/mark> <mark style=\"background-color:rgba(0, 0, 0, 0);color:#24831d\" class=\"has-inline-color\">=<\/mark> [] <mark style=\"background-color:rgba(0, 0, 0, 0);color:#24831d\" class=\"has-inline-color\">)<\/mark><\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Parameters<\/h3>\n\n\n\n<p><strong>$args<\/strong><br><em>(array)<\/em> <em>(Optional)<\/em> Arguments to modify template output.<\/p>\n\n\n<p style=\"padding-left: 40px;\"><strong>$additional_wrapper_classes<\/strong><br \/><em>(array) (Optional)<\/em> Additional classes for the wrapper.<\/p>\n<p style=\"padding-left: 40px;\"><strong>$template<\/strong><br \/>(string) (Optional) <span style=\"color: initial;\">Schedule template to return, one of: &#8216;table&#8217;, &#8216;grid&#8217;, &#8216;album&#8217;.<\/span><br \/><em>Default value: &#8216;table&#8217;<\/em><\/p>\n<p style=\"padding-left: 40px;\"><em><strong>$hide_more_button<\/strong><br \/>(bool) (Optional) <\/em>True to hide more button<em>.<br \/>Default value: false<\/em><\/p>\n<p style=\"padding-left: 40px;\"><em><strong>$styles<\/strong><br \/>(string) (Optional) <\/em><span style=\"color: initial;\">Additional inline styles for the wrapper<\/span>.<\/p>\n\n\n<h3 class=\"wp-block-heading\">Example<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>$args = &#91;\n  'template'         =&gt; 'grid',\n  'hide_more_button' =&gt; true\n];\n\nstruninntwitch_template_channel_schedule($args);<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>The plugin provides template functions for the following widgets: Channel Subscribe Button Channel Schedule Channel Subscribe Button Syntax struninntwitch_template_channel_subscribe_button( array $args = [] ) Parameters $args(array) (Optional) Arguments to modify template output. $additional_wrapper_classes(array) (Optional) Additional classes for the wrapper. $text(string) (Optional) Button text.Default value: &#8216;Subscribe!&#8217; $before_text(string) (Optional) Content to insert before button text. $after_text(string) (Optional) [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,2],"tags":[],"class_list":["post-118","post","type-post","status-publish","format-standard","hentry","category-schedule-plugin","category-struninn-for-twitch"],"_links":{"self":[{"href":"https:\/\/odindesignthemes.com\/struninndocs\/wp-json\/wp\/v2\/posts\/118"}],"collection":[{"href":"https:\/\/odindesignthemes.com\/struninndocs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/odindesignthemes.com\/struninndocs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/odindesignthemes.com\/struninndocs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/odindesignthemes.com\/struninndocs\/wp-json\/wp\/v2\/comments?post=118"}],"version-history":[{"count":4,"href":"https:\/\/odindesignthemes.com\/struninndocs\/wp-json\/wp\/v2\/posts\/118\/revisions"}],"predecessor-version":[{"id":370,"href":"https:\/\/odindesignthemes.com\/struninndocs\/wp-json\/wp\/v2\/posts\/118\/revisions\/370"}],"wp:attachment":[{"href":"https:\/\/odindesignthemes.com\/struninndocs\/wp-json\/wp\/v2\/media?parent=118"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/odindesignthemes.com\/struninndocs\/wp-json\/wp\/v2\/categories?post=118"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/odindesignthemes.com\/struninndocs\/wp-json\/wp\/v2\/tags?post=118"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}