title: WordPress plugin and wp_head
body: <p>I've re-edited this question: is possible to before to show the output in point 2 pass  a variable to global color (point 3) like a global variable or something?</p>
  
  <pre><code>        class myclass
          {
               public function init()
               {
                    global $shortcode_tags;
                        add_shortcode( MYSHORTCODE, array( 'myclass', 'shortcode' ) );
                    // * point 1
                    return;
  
               }
  
               public function shortcode( )
               {
                   // *point2
               } 
  
               function globalcolor($color)
  
  
                {
                       echo '&lt;style&gt;body{color:' .$color . '}&lt;/style&gt;' . "\n";
                       // * point 3
                   }
              }
  
  add_action( 'wphead', array( 'myclass', 'globalcolor' ) ); 
  
  add_action( 'init', array( 'myclass', 'init' ) );
  </code></pre>
  
  <p>PS. right now im reading about custom fields.<code>enter code here</code></p>