• Resolved waldirb

    (@waldirb)


    Hi there! Great plugin, I was looking for the ability to add more spacers with different values but it seems like there is no option for it, it would be great if there was, if thats not something you think that should be included a filter (apply_filters) for $var_content in the compile_scss() would be great! that way developers can hook into it before the sass overwrites are written and add in any extra variables they want without the need to add every single option that exist in bootstrap, let me know your thoughts and thank you for an amazing project that I use on pretty much all the web sites I build!

    file_put_contents( $var_path, apply_filters( 'areoi-overwrite-vars', $var_content ) );
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Miles

    (@areoimiles)

    Hi @waldirb

    Thanks for the kind words and the suggestion.

    I have just released an update and included your suggestion of a filter on the Bootstrap variables. You can use the filter as below:

    add_filter( 'areoi-overwrite-vars', function( $var_content ) {
    
    	$var_content .= '
    		$spacers: (
    		  0: 0,
    		  1: $spacer * .25,
    		  2: $spacer * .5,
    		  3: $spacer,
    		  4: $spacer * 1.5,
    		  5: $spacer * 3,
    		  6: $spacer * 4,
    		  7: $spacer * 5,
    		);
    	';
    
    	return $var_content;
    } );

    Hopefully, this resolves your issue. But, if you have any more problems please let me know.

    Thanks
    Miles

    Thread Starter waldirb

    (@waldirb)

    Amazing! Thank you so much!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Ability to filter variables.’ is closed to new replies.