hi guzz i am create wordpress plugin and i want to access php variable on css style i include 'style.php'
file and i want to access php style variable on this file but how ,
my php code
<?php
function my_style_render(){
// mystyle file load
wp_enqueue_style('mystyle', MY_PLUGIN_URL."/css/my_style.css");
$color = '#149382';
ob_start();
include MY_PLUGIN_PATH . '/css/style.php';
$custom_css = ob_get_clean();
wp_add_inline_style( 'mystyle', $custom_css );
}
?>
//and my style.php file
.model_inline {
background-color: {$color};
}
but color in not apply on 'model_inline' class ... anyone suggestion ..