Provide ability to change less compiler, specifically to less.php #53
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The leafo/lessphp branch is no longer actively maintaned. As such, the latest features of the less compiler are missing (eg. the extend keyword). This becomes an issue when working with frameworks that take advantage of these new language constructs. Bootstrap > 3.0.0 will not compile with lessphp (leafo/lessphp#535). This issue has been hanging around for a while now, but no progress has been made.
This Pull Request addresses this issue by allowing the ability to use the 'lessc.inc.php' that is now part of the less.php project to provide compatability with lessphp projects. It allows the choice of compiler through a constant that can be added to the wp-config.php file, WP_LESS_COMPILER.
The options for this variable are "less.php", which will include the above mentioned include. Since this is the primary (only?) alternative right now, it is included as a submodule in the same 'vendor' directory as lessphp.
The issues with using the different compiler are 1) performance and 2) no support for php defined functions added via registerFunction.
For backwards compatibility I think this should be an opt-in on behalf of the developer at this point because if they are currently using the registerFunction feature of less.php, it will break their theme.