Skip to content

Instantly share code, notes, and snippets.

@ellenmva
Last active August 29, 2015 14:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ellenmva/ab8b8b472dc49e511ea8 to your computer and use it in GitHub Desktop.
Save ellenmva/ab8b8b472dc49e511ea8 to your computer and use it in GitHub Desktop.
Defining less vars in section
<?php
function section_persistent() {
add_filter('pless_vars',array($this,'customless_vars'));
}
// Custom LESS Vars
function customless_vars($less) {
$less['ba-ss-thumbs-height'] = $this->opt('ba_ss_thumbs_height') ? $this->opt('ba_ss_thumbs_height') : '341px';
$less['ba-ss-thumbs-margin'] = $this->opt('ba_ss_thumbs_margin') ? $this->opt('ba_ss_thumbs_margin') : '20'.'px';
return $less;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment