PHP code example of askupa-software / wp-dynamic-css
1. Go to this page and download the library: Download askupa-software/wp-dynamic-css library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
askupa-software / wp-dynamic-css example snippets
// 1. Load the library (skip this if you are loading the library as a plugin)
css_enqueue( 'my_dynamic_style', 'path/to/my-style.css' );
// 3. Set the callback function (used to convert variables to actual values)
function my_dynamic_css_callback( $var_name )
{
return get_theme_mod($var_name);
}
wp_dynamic_css_set_callback( 'my_dynamic_style', 'my_dynamic_css_callback' );
// 4. Nope, only three steps