This is actually a PHP question, and not a WordPress question.
The issue is that global variables don’t pass through the include()
/require()
call from the template file into header.php
.
The solution is to define $data
after you globalize it.
Without knowing your options framework or your Theme specifically, I can only answer in general terms; that said, you would likely define $data
like so:
global $data;
$data = get_option( 'some_option' );
or
global $data;
$data = framework_get_options();
Hint: take a look at /css/styles.php
to see how your framework/Theme does this, specifically.