title: wordpress error on line 160 of ...wp-includes\class-wp-customize-control.php whilst adding hooks for extra functions
body: <p><strong>Thanks in advance for any help with this</strong>,
  Error Call to a member function check_capabilities()</p>
  
  <p>stuck in a rut with this one! </p>
  
  <p>Directory layout: </p>
  
  <ul>
  <li>'Theme folder'
  <ul>
  <li>functions.php (main directory for 'Theme')</li>
  <li>index.php</li>
  <li>style.css   </li>
  <li>functions folder (located inside of 'Theme folder')
  <ul>
  <li>customize.php</li>
  </ul></li>
  </ul></li>
  </ul>
  
  <p>Functions calls customize.php like this: </p>
  
  <pre><code>&lt;?php require_once('functions/customize.php'); ?&gt;
  </code></pre>
  
  <p>customize.php: </p>
  
  <pre><code>&lt;?php
  add_action('customize_register', 'adaptive_customize_register');
  function adaptive_customize_register($wp_customize) {
  //logo
  $wp_customize-&gt;add_section('adaptive_logo', array(
  'title' =&gt; __('Add Logo', 'adaptive_framework'), 
  'description' =&gt; __('Upload your main logo, this shows in the header',      'adaptive_framework'), 
  'priority' =&gt; '25'
  ));
      $wp_customize-&gt;add_setting('adaptive_custom_settings[add_logo]', array(
      'default' =&gt; 0,
      'type' =&gt; 'option'
  ));
  
  $wp_customize-&gt;add_control('adaptive_custom_settings[display_logo]', array(
      'label' =&gt; __('Display logo?','adaptive_framework'),
      'section' =&gt; 'adaptive_logo',
      'settings' =&gt; 'adaptive_custom_settings[display_top_logo]',
      'type' =&gt; 'checkbox'
      ));
  }
  
  
  
  ?&gt;
  </code></pre>
  
  <p>If anyone can help with please as I get error as follows: </p>
  
  <pre><code>Fatal error: Call to a member function check_capabilities() on a non-object in C:\xampp\htdocs\wordpress\wp-includes\class-wp-customize-control.php on line 160
  </code></pre>