I have re-edited this: can be done to before to exhibit the output in point 2 pass a flexible to global color (point 3) just like a global variable or something like that?

        class myclass
             public function init()
                  global $shortcode_tags;
                      add_shortcode( MYSHORTCODE, array( 'myclass', 'shortcode' ) );
                  // * point 1


             public function shortcode( )
                 // *point2

             function globalcolor($color)

                     echo '<style>body{color:' .$color . '}</style>' . "\n";
                     // * point 3

add_action( 'wphead', array( 'myclass', 'globalcolor' ) ); 

add_action( 'init', array( 'myclass', 'init' ) );

PS. at this time im reading through about custom fields.enter code here

do_action() is known as by WordPress, you would like [cde].

The experience add_action() comes far too early. You call the course now for the after sales, for AJAX demands etc. Make use of the hook init that is known as around the frontend only.

You can't send the colour value how you attempted. Begin to see the sample code for any working example.

Sample code:


I highly recommend http://wordpress.stackexchange.com/ to request more questions about WordPress. :)