title: How to get the values of Wordpress customize checkboxes
body: <p>I can't figure out how to get the value - whether they are checked or not - from checkboxes in the WP customize manager.</p>
  
  <p>This is the code in functions.php:</p>
  
  <pre><code>$wp_customize-&gt;add_setting('social_facebook', array(
      'type'       =&gt; 'option',
  ));
  
  $wp_customize-&gt;add_control(
      new WP_Customize_Control(
          $wp_customize,
          'social_facebook',
          array(
              'label'          =&gt; __( 'Facebook', 'theme_name' ),
              'section'        =&gt; 'social-icons',
              'settings'       =&gt; 'social_facebook',
              'type'           =&gt; 'checkbox',
          )
      )
  );
  </code></pre>
  
  <p>And this is how I try to get the value:</p>
  
  <pre><code>&lt;?php
  $facebook = get_theme_mod('social_facebook');
  if ($facebook != ''){?&gt;
  &lt;style&gt;
      .facebook {display:inline!important;}
  &lt;/style&gt;
  &lt;?php }
  ?&gt;
  </code></pre>
  
  <p>They values of the checkboxes are either "" (empty) or "1", so the system registers the checking of them. However, I don't know how to get the value through the get_theme_mod approach. Also, they don't have any name values, so I can't get the value through the usual way either. </p>