{"id":6452,"date":"2009-08-14T15:59:39","date_gmt":"2009-08-14T15:59:39","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/wp-less\/"},"modified":"2025-05-14T13:36:30","modified_gmt":"2025-05-14T13:36:30","slug":"wp-less","status":"publish","type":"plugin","link":"https:\/\/ceb.wordpress.org\/plugins\/wp-less\/","author":388058,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.9.8","stable_tag":"1.9.8","tested":"5.8.13","requires":"3.2","requires_php":"","requires_plugins":null,"header_name":"WP LESS","header_author":"thom4","header_description":"","assets_banners_color":"","last_updated":"2025-05-14 13:36:30","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/www.paypal.com\/cgi-bin\/webscr?cmd=_s-xclick&hosted_button_id=752034","header_plugin_uri":"https:\/\/github.com\/thom4parisot\/wp-less\/","header_author_uri":"https:\/\/thom4.net\/","rating":4.6,"author_block_rating":0,"active_installs":10000,"downloads":235988,"num_ratings":19,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0":{"tag":"1.0","author":"oncletom","date":"2009-08-17 19:36:13"},"1.1":{"tag":"1.1","author":"oncletom","date":"2009-08-28 12:12:15"},"1.2":{"tag":"1.2","author":"oncletom","date":"2010-04-05 09:51:33"},"1.3":{"tag":"1.3","author":"oncletom","date":"2010-11-18 22:58:50"},"1.3.1":{"tag":"1.3.1","author":"oncletom","date":"2010-12-02 16:11:15"},"1.4":{"tag":"1.4","author":"oncletom","date":"2011-12-26 14:55:05"},"1.4.1":{"tag":"1.4.1","author":"oncletom","date":"2012-01-09 10:35:06"},"1.4.2":{"tag":"1.4.2","author":"oncletom","date":"2012-01-10 11:01:34"},"1.9.2":{"tag":"1.9.2","author":"oncletom","date":"2021-09-03 08:24:13"},"1.9.3":{"tag":"1.9.3","author":"oncletom","date":"2021-09-03 12:39:51"},"1.9.4":{"tag":"1.9.4","author":"oncletom","date":"2024-11-28 09:58:24"},"1.9.5":{"tag":"1.9.5","author":"oncletom","date":"2024-11-28 10:09:31"},"1.9.6":{"tag":"1.9.6","author":"oncletom","date":"2025-05-14 09:36:41"},"1.9.7":{"tag":"1.9.7","author":"oncletom","date":"2025-05-14 13:16:31"},"1.9.8":{"tag":"1.9.8","author":"oncletom","date":"2025-05-14 13:36:30"}},"upgrade_notice":{"1.6.0":"<p>Warning: this release has some breaking changes. If you the old selector expression syntax (eg. Bootstrap 2.3) then it\u2019s recommended to use 0.3.9.<\/p>\n\n<ul>\n<li>Add support for ; as argument delimiter<\/li>\n<li>Add support for passing arguments by name to mixin<\/li>\n<li>Remove old selector expression syntax (&quot;hello&quot;)<\/li>\n<li>Remove ability to skip arguments by repeating delimiter<\/li>\n<li>Add built in functions: sin, cos, tan, asin, acos, atan, pow, pi, mod, sqrt, extract<\/li>\n<li>Fix bug where @arguments was not getting values from ...<\/li>\n<li>Selector interpolation works inside of brackets in selector<\/li>\n<li>Fix bug when resolving mixin that has same name as enclosing class<\/li>\n<li>Duplicate properties are now removed from output= 1.5 =<\/li>\n<\/ul>\n\n<p>Some changes in the API may breaks compatibility with your PHP code dealing with <code>wp-less<\/code>.<\/p>\n\n<p>Please <a href=\"https:\/\/github.com\/oncletom\/wp-less\/issues\">open issues<\/a> and describe your technical problems <a href=\"https:\/\/github.com\/oncletom\/wp-less\/tree\/master\/doc\">if the usage is not documented<\/a>.<\/p>","1.4":"<p>As <code>lessphp<\/code> has been upgraded to <code>0.3.0<\/code>, its behavior changed a little bit.<\/p>\n\n<p>Please check your LESS syntax <a href=\"http:\/\/leafo.net\/lessphp\/docs\/\">according to the document<\/a> before applying this update.<\/p>"},"ratings":{"1":"1","2":0,"3":"1","4":"2","5":"15"},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0","1.1","1.2","1.3","1.3.1","1.4","1.4.1","1.4.2","1.9.2","1.9.3","1.9.4","1.9.5","1.9.6","1.9.7","1.9.8"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3293306,"resolution":"1","location":"plugin"}},"screenshots":{"1":"Sample of LESS to CSS conversion."},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[39846,242270,2003,1739,11238],"plugin_category":[43],"plugin_contributors":[79250,79251],"plugin_business_model":[],"class_list":["post-6452","plugin","type-plugin","status-publish","hentry","plugin_tags-lesscss","plugin_tags-lessphp","plugin_tags-styles","plugin_tags-stylesheet","plugin_tags-toolkit","plugin_category-customization","plugin_contributors-fabrizim","plugin_contributors-oncletom","plugin_committers-oncletom"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/wp-less.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/wp-less\/trunk\/screenshot-1.png?rev=3293306","caption":"Sample of LESS to CSS conversion."}],"raw_content":"<!--section=description-->\n<p><a href=\"http:\/\/lesscss.org\">LESS<\/a> is a templating language based on top of CSS. It provides numerous enhancements to speed up development and make its maintenance easier.<\/p>\n\n<p>Theme developers can even bundle the plugin without worrying about conflicts: just include the special <code>bootstrap-for-theme.php<\/code> and read its instructions.<\/p>\n\n<h4>Features<\/h4>\n\n<ul>\n<li>Variables<\/li>\n<li>Mixins (inheritance of rules)<\/li>\n<li>Nested Rules (write less, do more)<\/li>\n<li>Accessors (inherit a value from a specific rule)<\/li>\n<li>Functions (logic operations for dynamic results)<\/li>\n<\/ul>\n\n<p>The plugin lets you concentrate on what you need: coding CSS. Everything else is handled automatically, from cache management to user delivery.\nSeriously.<\/p>\n\n<h4>Documentation<\/h4>\n\n<p>Advanced topics on how to use the plugin API are <a href=\"https:\/\/github.com\/oncletom\/wp-less\/tree\/master\/doc\">available on the Github project documentation<\/a>.<\/p>\n\n<h4>Requirements<\/h4>\n\n<p>The sole requirement is to use WordPress API and LESS convention: the <code>.less<\/code> extension.<\/p>\n\n<p><strong>Minimal Requirements<\/strong>: PHP 5.3 and WordPress 3.2.\n<strong>Relies on<\/strong>: <a href=\"http:\/\/lessphp.gpeasy.com\/\">Less.php<\/a>, <a href=\"http:\/\/wordpress.org\/extend\/plugins\/plugin-toolkit\/\">plugin-toolkit<\/a>.<\/p>\n\n<p><em>Notice<\/em>: in case you'd like to drop the usage of this plugin, it's safe to do it. You will just need to convert back your stylesheets to CSS.<\/p>\n\n<!--section=installation-->\n<h4>Automatic<\/h4>\n\n<ol>\n<li>Search for the plugin name (<code>WP-LESS<\/code>)<\/li>\n<li>Click on the install button<\/li>\n<li>Activate it<\/li>\n<\/ol>\n\n<h4>Manual<\/h4>\n\n<ol>\n<li>Download the latest stable archive of the plugin<\/li>\n<li>Unzip it in your plugin folder (by default, <code>wp-content\/plugins<\/code>)<\/li>\n<li>Activate it through your WordPress plugins administration page<\/li>\n<\/ol>\n\n<!--section=faq-->\n<p>Lots of efforts have been done to write a <a href=\"https:\/\/github.com\/oncletom\/wp-less\/tree\/master\/doc\">consistent documentation<\/a>\nto address issues you may encounter.<\/p>\n\n<p>It covers topics like path customization, declaring LESS variables from PHP, creating new LESS functions etc.<\/p>\n\n<!--section=changelog-->\n<h4>Version 1.9.0<\/h4>\n\n<ul>\n<li>feature: default less compiler is now <a href=\"https:\/\/github.com\/wikimedia\/less.php\">wikimedia\/less.php<\/a> (<a href=\"https:\/\/github.com\/oncletom\/wp-less\/pull\/117\">#117<\/a>)<\/li>\n<li>feature: output is compressed by default<\/li>\n<\/ul>\n\n<h4>Version 1.8.0<\/h4>\n\n<ul>\n<li>feature: default less compiler is now <a href=\"http:\/\/lessphp.gpeasy.com\/\">oyejorge\/less.php<\/a> (<a href=\"https:\/\/github.com\/oncletom\/wp-less\/pull\/90\">#90<\/a><\/li>\n<\/ul>\n\n<h4>Version 1.7.6<\/h4>\n\n<ul>\n<li>info: updated vendored lessphp libraries versions (oyejorge\/less.php@1.7.0.5)<\/li>\n<\/ul>\n\n<h4>Version 1.7.5<\/h4>\n\n<ul>\n<li>feature: now works properly in the admin side (<a href=\"https:\/\/github.com\/oncletom\/wp-less\/pull\/68\">#68<\/a>)<\/li>\n<\/ul>\n\n<h4>Version 1.7.4<\/h4>\n\n<ul>\n<li>feature: favour composer autoload to manual PHP <code>require<\/code> (<a href=\"https:\/\/github.com\/oncletom\/wp-less\/pull\/64\">#64<\/a>)<\/li>\n<\/ul>\n\n<h4>Version 1.7.3<\/h4>\n\n<ul>\n<li>bug: fixed the LESS library loading (<a href=\"https:\/\/github.com\/oncletom\/wp-less\/issues\/63\">#63<\/a>)<\/li>\n<li>doc: documented the new LESS library swapping<\/li>\n<\/ul>\n\n<h4>Version 1.7.0<\/h4>\n\n<ul>\n<li>feature: ability to provide your own flavour of <code>lessphp<\/code> or <code>less.php<\/code> (<a href=\"https:\/\/github.com\/oncletom\/wp-less\/pull\/53\">#53<\/a>)<\/li>\n<li>bug: fixed stylesheet directory computation (<a href=\"https:\/\/github.com\/oncletom\/wp-less\/pull\/61\">#61<\/a>)<\/li>\n<li>bug: unlink exception during utpdated files cleanup (<a href=\"https:\/\/github.com\/oncletom\/wp-less\/pull\/49\">#49<\/a>)<\/li>\n<li>style: code cleanup (<a href=\"https:\/\/github.com\/oncletom\/wp-less\/pull\/56\">#56<\/a>, <a href=\"https:\/\/github.com\/oncletom\/wp-less\/pull\/55\">#55<\/a>)<\/li>\n<\/ul>\n\n<h4>Version 1.6.0<\/h4>\n\n<p>Read the UPGRADE NOTICE carefully as this release contains BC change. Hence the version bump to <code>1.6.0<\/code>.<\/p>\n\n<ul>\n<li>lessphp: updated to v0.4.0<\/li>\n<\/ul>\n\n<h4>Version 1.5.4<\/h4>\n\n<ul>\n<li>bug: fixed stylesheet URL computation (<a href=\"https:\/\/github.com\/oncletom\/wp-less\/pull\/38\">#38<\/a>)<\/li>\n<li>bug: fixed cache-hit miss after stylesheet garbage collection (<a href=\"https:\/\/github.com\/oncletom\/wp-less\/pull\/40\">#40<\/a>)<\/li>\n<li>added a CONTRIBUTORS file<\/li>\n<\/ul>\n\n<h4>Version 1.5.3<\/h4>\n\n<ul>\n<li>lessphp: updated to v0.3.9<\/li>\n<\/ul>\n\n<h4>Version 1.5.2<\/h4>\n\n<ul>\n<li>bug: fixed garbage collector bug (<a href=\"https:\/\/github.com\/oncletom\/wp-less\/pull\/28\">#28<\/a>)<\/li>\n<li>bug: fixed cachebusting URI generation in deep mode (<a href=\"https:\/\/github.com\/oncletom\/wp-less\/pull\/29\">#29<\/a>)<\/li>\n<li>bug: fixed access to Plugin instance, matching the documentation (<a href=\"https:\/\/github.com\/oncletom\/wp-less\/pull\/39\">#39<\/a>)<\/li>\n<\/ul>\n\n<h4>Version 1.5.1<\/h4>\n\n<ul>\n<li>feature(beta): less stylesheets can be enqueued in <code>wp-admin<\/code><\/li>\n<li>feature: added <code>WPLessConfiguration::getTtl<\/code> method to let you configure the delay of old-files cleanup<\/li>\n<li>bug: fixed automatic replacements with absolute and data uri (<a href=\"https:\/\/github.com\/oncletom\/wp-less\/pull\/19\">#19<\/a>)<\/li>\n<li>bug: fixed garbage collector; was pruning active stylesheets even if too old (buggy with active cache) (<a href=\"https:\/\/github.com\/oncletom\/wp-less\/pull\/20\">#20<\/a>)<\/li>\n<\/ul>\n\n<h4>Version 1.5<\/h4>\n\n<p>Mostly issues related to <code>lessphp<\/code> 0.3.8 features.<\/p>\n\n<ul>\n<li>\/!\\ Leveraged PHP Minimum Version to 5.2.4 \/!\\ (<a href=\"http:\/\/wordpress.org\/about\/requirements\/\">WordPress already asks you the same<\/a>)<\/li>\n<li><a href=\"https:\/\/github.com\/oncletom\/wp-less\/tree\/master\/doc\">dev documentation available online<\/a><\/li>\n<li>bug: stylesheets compilation is now processed on <code>wp_enqueue_scripts<\/code> (<a href=\"https:\/\/github.com\/oncletom\/wp-less\/pull\/18\">prop of @RixTox<\/a>)<\/li>\n<li>feature: providing stylesheet and template directory uri variables (<code>@stylesheet_directory_uri<\/code> &amp; <code>@template_directory_uri<\/code>) following WordPress convention<\/li>\n<li>feature: Pruning old compiled files <a href=\"https:\/\/github.com\/oncletom\/wp-less\/pull\/15\">#15<\/a><\/li>\n<li>feature: Smarter LESS compilation (following @import file updates) <a href=\"https:\/\/github.com\/oncletom\/wp-less\/pull\/13\">#13<\/a><\/li>\n<li>feature: Systematic LESS rebuild through configuration <a href=\"https:\/\/github.com\/oncletom\/wp-less\/pull\/14\">#14<\/a><\/li>\n<li>improvement: Match lessphp variable API <a href=\"https:\/\/github.com\/oncletom\/wp-less\/pull\/12\">#12<\/a><\/li>\n<\/ul>\n\n<h4>Version 1.4.3<\/h4>\n\n<ul>\n<li>bug: fixed HTTPS\/Networked Blog URL replacement (<a href=\"https:\/\/github.com\/oncletom\/wp-less\/pull\/8\">#8<\/a>, <a href=\"https:\/\/github.com\/oncletom\/wp-less\/pull\/9\">#9<\/a>)<\/li>\n<li>bug: fixed the <code>property of non-object in Plugin.class.php<\/code> bug<\/li>\n<li>lessphp: updated to 0.3.8 (compatible with lessjs 1.3)<\/li>\n<\/ul>\n\n<h4>Version 1.4.2<\/h4>\n\n<ul>\n<li>feature: if <code>WP_DEBUG<\/code> is set to true, compilation is done on every page<\/li>\n<li>feature: rebuild now takes care of LESS PHP variable<\/li>\n<li>feature: added support of <a href=\"http:\/\/leafo.net\/lessphp\/docs\/index.html#custom_functions\">custom LESS functions<\/a><\/li>\n<li>lessphp: updated to version 0.3.1<\/li>\n<\/ul>\n\n<h4>Version 1.4.1<\/h4>\n\n<ul>\n<li>bug: CSS <code>url()<\/code> are now properly resolved relative to the theme URL<\/li>\n<\/ul>\n\n<h4>Version 1.4<\/h4>\n\n<ul>\n<li>action: <code>wp-less_compiler_parse_pre<\/code> now takes 3 arguments: class instance, text and variable arguments<\/li>\n<li>action: <code>wp-less_stylesheet_save_pre<\/code> now takes 2 arguments: class instance and variable arguments<\/li>\n<li>helper: added <code>less_add_variable<\/code> to ease manipulations from theme, if needed (the file needs to be included manually)<\/li>\n<li>stylesheet: <code>getBuffer()<\/code> and <code>setBuffer<\/code> will be removed in 1.5 version<\/li>\n<li>lessphp: removed the custom patch for buffer manipulation, due to built-in variable management<\/li>\n<li>lessphp: updated to version 0.3.0<\/li>\n<\/ul>\n\n<h4>Version 1.3.1<\/h4>\n\n<ul>\n<li>renamed <code>wp-less_compiler_parse<\/code> action to <code>wp-less_compiler_parse_pre<\/code> to avoid name conflicts<\/li>\n<li>renamed <code>wp-less_compiler_construct<\/code> action to <code>wp-less_compiler_construct_pre<\/code> to avoid name conflicts<\/li>\n<li>lessphp: patched the lib to let manipulating the buffer, and replace strings (do it at your own risks)<\/li>\n<\/ul>\n\n<h4>Version 1.3<\/h4>\n\n<ul>\n<li>moved stylesheet processing from <code>wp_print_styles<\/code> to <code>wp<\/code> action<\/li>\n<li>added new compiler actions and filters (same name each): <code>wp-less_compiler_construct<\/code> and <code>wp-less_compiler_parse<\/code><\/li>\n<li>added <code>WPLessCompiler::getBuffer()<\/code> and <code>WPLessCompiler::setBuffer()<\/code> method, to enables hooking on LESS content, before being compiled into CSS<\/li>\n<li>removed <code>WPLessStyleseet::getTargetContent<\/code> method<\/li>\n<li>upgraded <code>plugin-toolkit<\/code><\/li>\n<li>usage of <code>$WPLessPlugin-&gt;dispatch<\/code> instead of <code>$WPLessPlugin-&gt;registerHooks<\/code> to match the new <code>plugin-toolkit<\/code> signature<\/li>\n<li>no more configuration collision if usage of multiple plugins using <code>plugin-toolkit<\/code><\/li>\n<li>lessphp: updated to <a href=\"https:\/\/github.com\/leafo\/lessphp\/commit\/eac64a9d5a3bc3186a11c7130968388819f4c403\">eac64a9d5a3bc3186a11c7130968388819f4c403<\/a> commit<\/li>\n<\/ul>\n\n<h4>Version 1.2.1<\/h4>\n\n<ul>\n<li>fixed the case where no stylesheet is queued (no warning anymore)<\/li>\n<\/ul>\n\n<h4>Version 1.2<\/h4>\n\n<ul>\n<li>added 2 new filters working on freshly transformed CSS<\/li>\n<li>added a HTML helper to LESSify directly from templates, without queuying with <code>wp_enqueue_stylesheet<\/code> (can't really recommend this usage)<\/li>\n<li>added timestamp calculation so as you can be HTTP cache-control compliant<\/li>\n<li>documented plugin hooks and filters<\/li>\n<li>hooked a filter to update relative paths to deal <code>uri<\/code> and cached file location<\/li>\n<li>lessphp: updated to version 0.2.0<\/li>\n<\/ul>\n\n<h4>Version 1.1<\/h4>\n\n<ul>\n<li>added <code>bootstrap-for-theme.php<\/code> to let themers bundle the plugin in their own themes<\/li>\n<li>added <code>WPLessPlugin::registerHooks<\/code> methods to ease hooks activation<\/li>\n<li>theme bootstrap will only load if the plugin is not alread activated<\/li>\n<li><code>WPLessPlugin::processStylesheets()<\/code> and <code>WPLessPlugin::processStylesheet()<\/code> now accepts an additional parameter to force the rebuild<\/li>\n<li>lessphp: updated to version 0.1.6<\/li>\n<li>plugin-toolkit: updated to version 1.1<\/li>\n<\/ul>\n\n<h4>Version 1.0<\/h4>\n\n<ul>\n<li>implemented API to let you control the plugin the way you want<\/li>\n<li>just in time compilation with static file caching<\/li>\n<li>lessphp: bundled to version 0.1.6<\/li>\n<li>plugin-toolkit: bundled experimental plugin development<\/li>\n<\/ul>","raw_excerpt":"Implementation of LESS (Leaner CSS) in order to make themes development easier.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ceb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/6452","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ceb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/ceb.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/ceb.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=6452"}],"author":[{"embeddable":true,"href":"https:\/\/ceb.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/oncletom"}],"wp:attachment":[{"href":"https:\/\/ceb.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=6452"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/ceb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=6452"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/ceb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=6452"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/ceb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=6452"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/ceb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=6452"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/ceb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=6452"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}