{"id":383,"date":"2022-04-20T20:41:46","date_gmt":"2022-04-20T20:41:46","guid":{"rendered":"http:\/\/localhost\/wordpress_odindocs\/?p=380"},"modified":"2022-04-20T20:41:46","modified_gmt":"2022-04-20T20:41:46","slug":"template-functions-2","status":"publish","type":"post","link":"https:\/\/odindesignthemes.com\/struninndocs\/template-functions-2\/","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-videos\">Channel Videos<\/a><\/strong><\/li><li><a href=\"#channel-stream\"><strong>Channel Stream<\/strong><\/a><\/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-videos\"><strong>Channel Videos<\/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_videos(<\/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>$first<\/strong><br><em>(int) (Optional) <\/em><span style=\"color: initial;\">Amount of videos to display.<br><\/span><em>Default value: 1<br><\/em><\/p>\n<p style=\"padding-left: 40px;\"><strong>$type<\/strong><br><em>(string) (Optional)<\/em> <span style=\"color: initial;\">Type of videos to display, one of: &#8216;all&#8217;, &#8216;upload&#8217;, &#8216;archive&#8217;, &#8216;highlight&#8217;.<\/span><br><em>Default value: &#8216;archive&#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  'first'            =&gt; 4,\n  'type'             =&gt; 'upload',\n  'hide_more_button' =&gt; true\n];\n\nstruninntwitch_template_channel_videos($args);<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"channel-stream\"><strong>Channel Stream<\/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_stream(<\/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;\"><em><strong>$theme<\/strong><br>(string) (Optional) <\/em><span style=\"color: initial;\">Stream player theme, one of: &#8216;dark&#8217;, &#8216;light&#8217;.<br><\/span><em>Default value: &#8216;dark&#8217;<\/em><\/p>\n<p style=\"padding-left: 40px;\"><em><strong>$muted<\/strong><br>(bool) (Optional) <\/em>True to mute the stream<em>.<br>Default value: true<\/em><\/p>\n<p style=\"padding-left: 40px;\"><em><strong>$autoplay<\/strong><br>(bool) (Optional) <\/em>True to autoplay the stream<em>.<br>Default value: true<\/em><\/p>\n<p style=\"padding-left: 40px;\"><em><strong>$chat<\/strong><br>(bool) (Optional) <\/em>True to display stream chat<em>.<br>Default value: true<\/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  'autoplay' =&gt; false,\n  'chat'     =&gt; false\n];\n\nstruninntwitch_template_channel_stream($args);<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>The plugin provides template functions for the following widgets: Channel Subscribe Button Channel Videos Channel Stream 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. [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,2],"tags":[],"class_list":["post-383","post","type-post","status-publish","format-standard","hentry","category-stream-plugin","category-struninn-for-twitch"],"_links":{"self":[{"href":"https:\/\/odindesignthemes.com\/struninndocs\/wp-json\/wp\/v2\/posts\/383"}],"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\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/odindesignthemes.com\/struninndocs\/wp-json\/wp\/v2\/comments?post=383"}],"version-history":[{"count":0,"href":"https:\/\/odindesignthemes.com\/struninndocs\/wp-json\/wp\/v2\/posts\/383\/revisions"}],"wp:attachment":[{"href":"https:\/\/odindesignthemes.com\/struninndocs\/wp-json\/wp\/v2\/media?parent=383"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/odindesignthemes.com\/struninndocs\/wp-json\/wp\/v2\/categories?post=383"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/odindesignthemes.com\/struninndocs\/wp-json\/wp\/v2\/tags?post=383"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}