Esempio n. 1
0
function nebula_scss_variables($scss)
{
    $override = apply_filters('pre_nebula_scss_variables', false, $scss);
    if ($override !== false) {
        return $override;
    }
    $scss = preg_replace("(<%template_directory%>)", get_template_directory_uri(), $scss);
    //Template Directory
    $scss = preg_replace("(<%stylesheet_directory%>)", get_stylesheet_directory_uri(), $scss);
    //Stylesheet Directory (For child themes)
    $scss = preg_replace("(" . str_replace('/', '\\/', get_template_directory()) . ")", '', $scss);
    //Reduce theme path for SCSSPHP debug line comments
    $scss = preg_replace("(" . str_replace('/', '\\/', get_stylesheet_directory()) . ")", '', $scss);
    //Reduce theme path for SCSSPHP debug line comments (For child themes)
    $scss = preg_replace("<%__utm.gif%>", ga_UTM_gif(), $scss);
    //GA __utm.gif pixel with parameters for tracking via CSS
    do_action('nebula_scss_variables');
    $scss .= "\r\n/* Processed on " . date('l, F j, Y \\a\\t g:ia', time()) . ' */';
    update_option('nebula_scss_last_processed', time());
    return $scss;
}
</script>

<div class="row">
	<div class="sixteen columns">
		<strong>Example __utm.gif Path:</strong><br/>
		<pre class="nebula-code HTML"><?php 
echo ga_UTM_gif();
?>
</pre>

		<?php 
if (1 == 2) {
    //For testing
    ?>
			<img src="<?php 
    echo ga_UTM_gif();
    ?>
" />
		<?php 
}
?>
	</div>
</div>

<div class="row">
	<div class="sixteen columns">
		<h2>Google Analytics __utm.gif Generator</h2>
		<p>Note: Still in progress!!</p>

		<form>
			<ul style="list-style: none; padding-left: 0;">
Esempio n. 3
0
function nebula_scss_variables($scss)
{
    $scss = preg_replace("(<%template_directory%>)", get_template_directory_uri(), $scss);
    //Template Directory
    $scss = preg_replace("(" . str_replace('/', '\\/', get_template_directory()) . ")", '', $scss);
    //Reduce theme path
    $scss = preg_replace("<%__utm.gif%>", ga_UTM_gif(), $scss);
    //GA __utm.gif pixel with parameters for tracking via CSS
    do_action('nebula_scss_variables');
    $scss .= "\r\n/* Processed on " . date('l, F j, Y \\a\\t g:ia', time()) . ' */';
    update_option('nebula_scss_last_processed', time());
    return $scss;
}