title: WordPress add_action style arguments works but changes admin panel
body: <p>I've made a code so you can easily add a style sheet to the site, this is for our framework.</p>
  
  <p>It works but if I use this the CSS changes the dashboard layout either? Same with customizer, if I don't use this method, but just a normal wp enqueue it works but that's not what I want.</p>
  
  <pre><code>    class theme_setup{
          function main_css_setup($css) {
              wp_enqueue_style( 'style', get_template_directory_uri().'/css/'.$css.'.css' );
          }
          function add_css_main($css){
              add_action( 'wp_enqueue_scripts', array($this, 'main_css_setup'),10,1 );
              do_action( 'wp_enqueue_scripts', $css );
          }
      }
  $theme_setup = new theme_setup();
  $theme_setup-&gt;add_css_main('main');
  </code></pre>
  
  <p><strong>Dashboard change:</strong>
  <a href="https://i.stack.imgur.com/KZ96y.png" rel="nofollow noreferrer">First example</a>
  <a href="https://i.stack.imgur.com/26JiD.png" rel="nofollow noreferrer">Second example</a></p>
  
  <p>I think it has something to do with the <code>do_action</code>, I searched on my best behave, but without any luck.</p>
  
  <p>I'm using the '<code>do_action</code>' to pass the argument that the user gives with the <code>add_css_main</code>, I know I can use global variables, but these are "static", and that will make the idea be gone of a flexible function.</p>
  
  <blockquote>
    <p>Update: </p>
  </blockquote>
  
  <pre><code>function themename_custom_logo_setup($height,$width) {
      $defaults = array(
          'height'      =&gt; $height,
          'width'       =&gt; $width,
          'flex-height' =&gt; true,
          'flex-width'  =&gt; true,
          'header-text' =&gt; array( 'site-title', 'site-description' ),
      );
      add_theme_support( 'custom-logo', $defaults );
  }
  
      function add_custom_logo($width,$height){
      add_action( 'after_setup_theme', array($this, 'themename_custom_logo_setup' ),10,2);
      do_action( 'after_setup_theme', $height,$width);
  }
  
  $theme_setup-&gt;add_custom_logo(88,250);
  </code></pre>
  
  <p>Does work, but the variables are not even passed at al.</p>