{"action":"created","issue":{"url":"https://api.github.com/repos/ReduxFramework/redux-framework/issues/2015","labels_url":"https://api.github.com/repos/ReduxFramework/redux-framework/issues/2015/labels{/name}","comments_url":"https://api.github.com/repos/ReduxFramework/redux-framework/issues/2015/comments","events_url":"https://api.github.com/repos/ReduxFramework/redux-framework/issues/2015/events","html_url":"https://github.com/ReduxFramework/redux-framework/issues/2015","id":55852905,"number":2015,"title":"Banner or Javascript code by switch button","user":{"login":"meno010","id":6188043,"avatar_url":"https://avatars.githubusercontent.com/u/6188043?v=3","gravatar_id":"","url":"https://api.github.com/users/meno010","html_url":"https://github.com/meno010","followers_url":"https://api.github.com/users/meno010/followers","following_url":"https://api.github.com/users/meno010/following{/other_user}","gists_url":"https://api.github.com/users/meno010/gists{/gist_id}","starred_url":"https://api.github.com/users/meno010/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meno010/subscriptions","organizations_url":"https://api.github.com/users/meno010/orgs","repos_url":"https://api.github.com/users/meno010/repos","events_url":"https://api.github.com/users/meno010/events{/privacy}","received_events_url":"https://api.github.com/users/meno010/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-29T03:50:59Z","updated_at":"2015-01-29T07:09:25Z","closed_at":"2015-01-29T07:09:25Z","body":"Need to use switch button to choose between Banner or HTML/Javascript Ad\r\nwe used this code\r\n\r\n    ###################\r\n    <?php  if ( ! empty( redux_demo('header_banner_kind_2', true)) )\r\n     {\r\n     echo (redux_demo('header_banner_html_2'));\r\n     }\r\n     elseif \r\n     (empty( redux_demo('header_banner_kind2', FALSE)) ){  ?>\r\n    <a href=\"<?php echo $redux_demo['header_banner_url_2']; ?>\">\r\n    <img src=\"<?php echo $redux_demo['header_banner_image_2']['url'];?>\"></a>\r\n    ###################`\r\n\r\nBut most times it's return only HTML/Javascript Ads !!!\r\nalso may be kind is HTML/Javascript but it's return Banners !!!\r\n\r\nhow we can return switch button if is true or false  because we used many codes without fix ??\r\n1- if ( ! empty( redux_demo('header_banner_kind_2', true)) )\r\n 2-if ( redux_demo('header_banner_kind_2') ==\"1\") \r\n3- if ( redux_demo('header_banner_kind_2') == TRUE) \r\n\r\nWordPress 4.0.1\r\nRedux version: 3.3.8.8\r\nOur config\r\n     ###################\r\n     array(\r\n     'id'=>'header_banner_kind_2',\r\n     'type' => 'switch', \r\n     'title' => __('Banner Kind #2', 'redux-framework-demo'),\r\n     'subtitle'=> __('Look, it\\'s on!', 'redux-framework-demo'),\r\n     'required' => array('header_banner_2', '=' , '1'),\r\n     \"default\" \t=> 0,\r\n     'on'       => 'HTML/Javascript',\r\n     'off'      => 'Banner',\r\n     ),\r\n     ###################\r\n"},"comment":{"url":"https://api.github.com/repos/ReduxFramework/redux-framework/issues/comments/71980204","html_url":"https://github.com/ReduxFramework/redux-framework/issues/2015#issuecomment-71980204","issue_url":"https://api.github.com/repos/ReduxFramework/redux-framework/issues/2015","id":71980204,"user":{"login":"kprovance","id":3412363,"avatar_url":"https://avatars.githubusercontent.com/u/3412363?v=3","gravatar_id":"","url":"https://api.github.com/users/kprovance","html_url":"https://github.com/kprovance","followers_url":"https://api.github.com/users/kprovance/followers","following_url":"https://api.github.com/users/kprovance/following{/other_user}","gists_url":"https://api.github.com/users/kprovance/gists{/gist_id}","starred_url":"https://api.github.com/users/kprovance/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kprovance/subscriptions","organizations_url":"https://api.github.com/users/kprovance/orgs","repos_url":"https://api.github.com/users/kprovance/repos","events_url":"https://api.github.com/users/kprovance/events{/privacy}","received_events_url":"https://api.github.com/users/kprovance/received_events","type":"User","site_admin":false},"created_at":"2015-01-29T07:09:25Z","updated_at":"2015-01-29T07:09:25Z","body":"There is no possible way for me to test this code.  Your top snippet indicates a function of `redux_demo` that isn't included, and therefore untestable.  Truth is, for something like these, you'd be better off using the button_set field."}}