title: Redux Framework Global Variable Issue
body: <p>I need your help. I'm developing WordPress themes on Themeforest marketpalce. I'm used Redux Framework Option panel on my theme. But Envato Reviewers soft rejected my item. I'm sorry. I'm not good php developer.</p>
  
  <p>Rejection issue is: Globals should always be within a function or a class and should be used restrictively &amp; only if theme really needs to. It's highly recommended not to use them at all just to keep things out of the global namespace, they're poor coding practice. <a href="http://envato.d.pr/1165K/4ZmfhB7P" rel="nofollow">http://envato.d.pr/1165K/4ZmfhB7P</a></p>
  
  <p>I've changed it on function. but it not working. How can i fix it. </p>
  
  <pre>
  
      function my_global_var(){
          global $global_var;
          return $global_var;
      }
  
      my_global_var();
      echo $global_var['opt_name'];
  
  </pre>
  
  <p>Please suggest me solution. thanks.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Found This Solution. What do you think for this solution. </p>
  
  <pre><code>if ( !function_exists('my_global_var') ) {
      function my_global_var($sm_opt_1, $sm_opt_2, $sm_opt_check ){
          global $opt_name;
          if( $sm_opt_check ) {
              if(isset($opt_name[$sm_opt_1][$sm_opt_2])) {
                  return $opt_name[$sm_opt_1][$sm_opt_2];
              }
          } else {
              if(isset($opt_name[$sm_opt_1])) {
                  return $opt_name[$sm_opt_1];
              }
          }
      }
  }
  </code></pre>
  
  <p>Example:</p>
  
  <pre><code>my_global_var('opt_val','',false); // old redux code $opt_name['opt_val'];
  my_global_var('opt_val','opt_val_2',true); // old redux code $opt_name['opt_val']['opt_val_2'];
  </code></pre>