LESS is a templating language based on top of CSS. It provides numerous enhancements to speed up development and make its maintenance easier.
Theme developers can even bundle the plugin without worrying about conflicts: just include the special
bootstrap-for-theme.php and read its instructions.
- Mixins (inheritance of rules)
- Nested Rules (write less, do more)
- Accessors (inherit a value from a specific rule)
- Functions (logic operations for dynamic results)
The plugin lets you concentrate on what you need: coding CSS. Everything else is handled automatically, from cache management to user delivery.
Advanced topics on how to use the plugin API are available on the Github project documentation.
The sole requirement is to use WordPress API and LESS convention: the
Minimal Requirements: PHP 5.3 and WordPress 3.2.
Relies on: Less.php, plugin-toolkit.
Notice: 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.
Ảnh màn hình
- Search for the plugin name (
- Click on the install button
- Activate it
- Download the latest stable archive of the plugin
- Unzip it in your plugin folder (by default,
- Activate it through your WordPress plugins administration page
Lots of efforts have been done to write a consistent documentation
to address issues you may encounter.
It covers topics like path customization, declaring LESS variables from PHP, creating new LESS functions etc.
Người đóng góp & Lập trình viên
“WP-LESS” là mã nguồn mở. Những người sau đã đóng góp vào plugin này.Những người đóng góp
“WP-LESS” đã được dịch qua 1 ngôn ngữ. Cảm ơn những người tham gia dịch vì đóng góp của họ.
Dịch “WP-LESS” sang ngôn ngữ của bạn.
Muốn tham gia phát triển?
Duyệt code, check out SVN repository, hoặc theo dõi nhật ký phát triển qua RSS.
Nhật ký thay đổi
- feature: default less compiler is now wikimedia/less.php
- feature: output is compressed by default
- feature: default less compiler is now oyejorge/less.php (#90
- info: updated vendored lessphp libraries versions (firstname.lastname@example.org)
- feature: now works properly in the admin side (#68)
- feature: favour composer autoload to manual PHP
- bug: fixed the LESS library loading (#63)
- doc: documented the new LESS library swapping
- feature: ability to provide your own flavour of
- bug: fixed stylesheet directory computation (#61)
- bug: unlink exception during utpdated files cleanup (#49)
- style: code cleanup (#56, #55)
Read the UPGRADE NOTICE carefully as this release contains BC change. Hence the version bump to
- lessphp: updated to v0.4.0
- bug: fixed stylesheet URL computation (#38)
- bug: fixed cache-hit miss after stylesheet garbage collection (#40)
- added a CONTRIBUTORS file
- lessphp: updated to v0.3.9
- 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)
- feature(beta): less stylesheets can be enqueued in
- feature: added
WPLessConfiguration::getTtlmethod 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)
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 (
@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
- bug: fixed HTTPS/Networked Blog URL replacement (#8, #9)
- bug: fixed the
property of non-object in Plugin.class.phpbug
- lessphp: updated to 0.3.8 (compatible with lessjs 1.3)
- feature: if
WP_DEBUGis 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
- bug: CSS
url()are now properly resolved relative to the theme URL
wp-less_compiler_parse_prenow takes 3 arguments: class instance, text and variable arguments
wp-less_stylesheet_save_prenow takes 2 arguments: class instance and variable arguments
- helper: added
less_add_variableto ease manipulations from theme, if needed (the file needs to be included manually)
setBufferwill 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
wp-less_compiler_parse_preto avoid name conflicts
wp-less_compiler_construct_preto avoid name conflicts
- lessphp: patched the lib to let manipulating the buffer, and replace strings (do it at your own risks)
- moved stylesheet processing from
- added new compiler actions and filters (same name each):
WPLessCompiler::setBuffer()method, to enables hooking on LESS content, before being compiled into CSS
- usage of
$WPLessPlugin->registerHooksto match the new
- no more configuration collision if usage of multiple plugins using
- lessphp: updated to eac64a9d5a3bc3186a11c7130968388819f4c403 commit
- fixed the case where no stylesheet is queued (no warning anymore)
- 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
uriand cached file location
- lessphp: updated to version 0.2.0
bootstrap-for-theme.phpto let themers bundle the plugin in their own themes
WPLessPlugin::registerHooksmethods to ease hooks activation
- theme bootstrap will only load if the plugin is not alread activated
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
- 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