Skip to main content
Agency Program 50% cashback. 10% commissions. Priority support. Built for growing agencies. 50% cashback for agencies Speak to the team Join free
WP-LESS icon

WP-LESS

v1.9.3-3
by thom4 · 4.6 (19 reviews)

Implementation of LESS (Leaner CSS) in order to make themes development easier.

10K+ active installs Updated Nov 28, 2024 Tested to 5.8.10
Try Demo Download
Pre-installed Ready in ~10s No card

About WP-LESS

LESS is a templating language that enhances CSS development and makes maintenance easier. It provides features such as variables, mixins, nested rules, accessors, and functions. The plugin handles everything automatically, from cache management to user delivery, and has minimal requirements of PHP 5.3 and WordPress 3.2.

Screenshots

WP-LESS screenshot

Frequently asked questions

What is LESS?
LESS is a templating language based on top of CSS. It provides numerous enhancements to speed up development and make its maintenance easier.
What are the features of LESS?
The features of LESS include variables, mixins (inheritance of rules), nested rules (write less, do more), accessors (inherit a value from a specific rule), and functions (logic operations for dynamic results).
Where can I find the documentation for the plugin?
The documentation for the plugin is available on the Github project documentation: https://github.com/oncletom/wp-less/tree/master/doc
What are the requirements for using the plugin?
The sole requirement is to use WordPress API and LESS convention: the .less extension. Minimal requirements are PHP 5.3 and WordPress 3.2. The plugin also relies on Less.php and plugin-toolkit.
Is it safe to drop the usage of this plugin?
Yes, it is safe to drop the usage of this plugin. You will just need to convert back your stylesheets to CSS.

Changelog

Version 1.9.0

Version 1.8.0

Version 1.7.6

Version 1.7.5

  • feature: now works properly in the admin side (#68)

Version 1.7.4

  • feature: favour composer autoload to manual PHP require (#64)

Version 1.7.3

  • bug: fixed the LESS library loading (#63)
  • doc: documented the new LESS library swapping

Version 1.7.0

  • feature: ability to provide your own flavour of lessphp or less.php (#53)
  • bug: fixed stylesheet directory computation (#61)
  • bug: unlink exception during utpdated files cleanup (#49)
  • style: code cleanup (#56, #55)

Version 1.6.0

Read the UPGRADE NOTICE carefully as this release contains BC change. Hence the version bump to 1.6.0.

  • lessphp: updated to v0.4.0

Version 1.5.4

  • bug: fixed stylesheet URL computation (#38)
  • bug: fixed cache-hit miss after stylesheet garbage collection (#40)
  • added a CONTRIBUTORS file

Version 1.5.3

  • lessphp: updated to v0.3.9

Version 1.5.2

  • bug: fixed garbage collector bug (#28)
  • bug: fixed cachebusting URI generation in deep mode (#29)
  • bug: fixed access to Plugin instance, matching the documentation (#39)

Version 1.5.1

  • feature(beta): less stylesheets can be enqueued in wp-admin
  • feature: added WPLessConfiguration::getTtl method to let you configure the delay of old-files cleanup
  • bug: fixed automatic replacements with absolute and data uri (#19)
  • bug: fixed garbage collector; was pruning active stylesheets even if too old (buggy with active cache) (#20)

Version 1.5

Mostly issues related to lessphp 0.3.8 features.

  • /! Leveraged PHP Minimum Version to 5.2.4 /! (WordPress already asks you the same)
  • dev documentation available online
  • bug: stylesheets compilation is now processed on wp_enqueue_scripts (prop of @RixTox)
  • feature: providing stylesheet and template directory uri variables (@stylesheet_directory_uri & @template_directory_uri) following WordPress convention
  • feature: Pruning old compiled files #15
  • feature: Smarter LESS compilation (following @import file updates) #13
  • feature: Systematic LESS rebuild through configuration #14
  • improvement: Match lessphp variable API #12

Version 1.4.3

  • bug: fixed HTTPS/Networked Blog URL replacement (#8, #9)
  • bug: fixed the property of non-object in Plugin.class.php bug
  • lessphp: updated to 0.3.8 (compatible with lessjs 1.3)

Version 1.4.2

  • feature: if WP_DEBUG is set to true, compilation is done on every page
  • feature: rebuild now takes care of LESS PHP variable
  • feature: added support of custom LESS functions
  • lessphp: updated to version 0.3.1

Version 1.4.1

  • bug: CSS url() are now properly resolved relative to the theme URL

Version 1.4

  • action: wp-less_compiler_parse_pre now takes 3 arguments: class instance, text and variable arguments
  • action: wp-less_stylesheet_save_pre now takes 2 arguments: class instance and variable arguments
  • helper: added less_add_variable to ease manipulations from theme, if needed (the file needs to be included manually)
  • stylesheet: getBuffer() and setBuffer will be removed in 1.5 version
  • lessphp: removed the custom patch for buffer manipulation, due to built-in variable management
  • lessphp: updated to version 0.3.0

Version 1.3.1

  • renamed wp-less_compiler_parse action to wp-less_compiler_parse_pre to avoid name conflicts
  • renamed wp-less_compiler_construct action to wp-less_compiler_construct_pre to avoid name conflicts
  • lessphp: patched the lib to let manipulating the buffer, and replace strings (do it at your own risks)

Version 1.3

  • moved stylesheet processing from wp_print_styles to wp action
  • added new compiler actions and filters (same name each): wp-less_compiler_construct and wp-less_compiler_parse
  • added WPLessCompiler::getBuffer() and WPLessCompiler::setBuffer() method, to enables hooking on LESS content, before being compiled into CSS
  • removed WPLessStyleseet::getTargetContent method
  • upgraded plugin-toolkit
  • usage of $WPLessPlugin->dispatch instead of $WPLessPlugin->registerHooks to match the new plugin-toolkit signature
  • no more configuration collision if usage of multiple plugins using plugin-toolkit
  • lessphp: updated to eac64a9d5a3bc3186a11c7130968388819f4c403 commit

Version 1.2.1

  • fixed the case where no stylesheet is queued (no warning anymore)

Version 1.2

  • added 2 new filters working on freshly transformed CSS
  • added a HTML helper to LESSify directly from templates, without queuying with wp_enqueue_stylesheet (can’t really recommend this usage)
  • added timestamp calculation so as you can be HTTP cache-control compliant
  • documented plugin hooks and filters
  • hooked a filter to update relative paths to deal uri and cached file location
  • lessphp: updated to version 0.2.0

Version 1.1

  • added bootstrap-for-theme.php to let themers bundle the plugin in their own themes
  • added WPLessPlugin::registerHooks methods to ease hooks activation
  • theme bootstrap will only load if the plugin is not alread activated
  • WPLessPlugin::processStylesheets() and WPLessPlugin::processStylesheet() now accepts an additional parameter to force the rebuild
  • lessphp: updated to version 0.1.6
  • plugin-toolkit: updated to version 1.1

Version 1.0

  • implemented API to let you control the plugin the way you want
  • just in time compilation with static file caching
  • lessphp: bundled to version 0.1.6
  • plugin-toolkit: bundled experimental plugin development

Try other plugins

Advanced Custom Fields (ACF) icon

Advanced Custom Fields (ACF)

4.5 · 2M+ installs

Advanced Custom Fields (ACF) helps you easily customize WordPress with powerful, professional and intuitive fields. Proudly powering over…

Regenerate Thumbnails icon

Regenerate Thumbnails

4.6 · 1M+ installs

Regenerate the thumbnails for one or more of your image uploads. Useful when changing their sizes or your…

Autoptimize icon

Autoptimize

4.7 · 1M+ installs

Autoptimize speeds up your website by optimizing JS, CSS, images (incl. lazy-load), HTML and Google Fonts, asyncing JS,…