thom4
Forum Replies Created
-
Forum: Themes and Templates
In reply to: Using WP Less on Touchfolio themeHi,
as some other have reported, the plugin only detects updated
.less
files which are registered via WP API.If you
@import
LESS files within your code, it does not detect changes.
The only solution for the moment is to alter a registered LESS file or clear the compiled file (in yourwp-content/uploads/wp-less
directory).If you work on a local environment, activating
WP_DEBUG
will force file compilation on every page of your WP instance.Forum: Plugins
In reply to: [WP-LESS] wp-less fails under httpsThanks for the report. I’m publishing an update of the plugin within the day.
Sorry for the delay, seriously.
Hi all of you.
What kind of improvements do you suggest? I’d be really happy to hear the encountered difficulties you had so as I can better understand what I must improve.
Thanks guys and sorry for the delay ??
Ok, I’ll add something to deal with variables, and eventually an automatic rebuild when
WP_DEBUG
is set to true.In 1.4.2, the plugin detects variable changes and recompile if needed.
Thanks for you feedback!
Forum: Plugins
In reply to: [WP-LESS] [Plugin: WP-LESS] I really can't get this plugin to workHello,
I can’t check imported files without opening recursively every less files… which would be terrible for performances.
In case you are in a development process, the 1.4.2 version of the plugin now recompiles every time when the
WP_DEBUG
constant is set to true.Forum: Plugins
In reply to: [WP-LESS] [Plugin: WP-LESS] How to use functionHi,
this was a bug which should have been fixed in version
1.4.1
.
Relative paths were not replaced if they were not wrapped by simple or double quotes.Keep me in touch.
Forum: Plugins
In reply to: [WP-LESS] [Plugin: WP-LESS] I really can't get this plugin to workOkay I figured out the problem.
It should be fixed in the next release (
1.4.1
).Thanks for reporting the issue!
Forum: Plugins
In reply to: [WP-LESS] [Plugin: WP-LESS] I really can't get this plugin to workCould you please copy/paste me your stylesheets properties causing this problem?
Because on my side I can’t reproduce it.
Thanks.
Forum: Plugins
In reply to: [WP-LESS] [Plugin: WP-LESS] I really can't get this plugin to workYou can do this change in any theme you bootstrap the plugin from.
The explained need is quite specific to you, so I won’t change the usual behavior only for that.If you want to bundle wp-less in your theme, follow the steps in the boostrap-for-theme .php file. Basically it is:
- drop wp-less in your theme (so as you have
wp-content/themes/your-theme/wp-less
- include the bootstrap file in your theme
functions.php
file - register the hooks to let the plugin do silently the work with your LESS files (through
$WPLessPlugin->dispatch();
)
Usually you include the bootstraper like this:
require dirname( __FILE__ ) . '/wp-less/bootstrap-for-theme.php'; $WPLessPlugin->dispatch( );
In your case, it should looks like this:
require dirname( __FILE__ ) . '/wp-less/bootstrap-for-theme.php'; $WPLessPlugin->getConfiguration()->setUploadUrl(get_template_directory_uri()); $WPLessPlugin->getConfiguration()->setUploadDir(get_template_directory()); $WPLessPlugin->dispatch();
Not so hard.
Anyway, I’ll look at your problem because yes, relative URL should be replaced properly.
Forum: Plugins
In reply to: [WP-LESS] [Plugin: WP-LESS] I really can't get this plugin to workCan you write here example of URL in stylesheet that are failing?
In one of my LESS stylesheet, I have this:
.rss{ a{ background: url('images/feed-readers.png') no-repeat left center; } }
And the path is properly replaced, even if the resulting CSS file is located in
wp-content/uploads
folder.Keep me in touch.
Forum: Plugins
In reply to: [WP-LESS] [Plugin: WP-LESS] I really can't get this plugin to workHowever, you can alter the upload dir (file access) and upload uri (file URI for browser) through the
WPPluginToolkitConfiguration
class.Example:
... $WPLessPlugin->getConfiguration()->setUploadUrl(get_template_directory_uri()); $WPLessPlugin->getConfiguration()->setUploadDir(get_template_directory()); $WPLessPlugin->dispatch();
Forum: Plugins
In reply to: [WP-LESS] [Plugin: WP-LESS] I really can't get this plugin to workOK, I understand the concern.
However, if you have an
url('images/blah.png')
, the replacement takes care of all this.
If you look at your compiled CSS file, resources are called with absolute URL.
If it’s not properly done, it may be a bug and in this case, I would fix it.Your themes and plugins folders don’t always have write permission access. And indeed, you should never rely on this. WordPress has a writeable directory which is made for that.
Forum: Plugins
In reply to: [WP-LESS] [Plugin: WP-LESS] I really can't get this plugin to workHello,
this is normal. I assumed the
upload
folder to have write permissions.
So when a.less
file is parsed, the plugin compiles it to the upload folder, and replace the stylesheet URL with the new one.Is it causing a problem for you?
PS: it reads wordpress upload folder location. So if you have a different setup, the plugin will follow it.
Forum: Plugins
In reply to: [WP-LESS] [Plugin: WP-LESS] property of non-object in Plugin.class.php ln 70Is there anyone else talking in this thread?
It’s like many people were talking but I see only messages from Sjeiti.
Forum: Plugins
In reply to: [WP-LESS] [Plugin: WP-LESS] I really can't get this plugin to workWell sorry: the previous example in fact refers to an embed copy of the plugin inside a theme. Or whenever you want but not the activated plugin. In this latest case, once activated, it does everything you need (no need to worry, just register your less stylesheets).
The theme-bootstrap is just a handy way to include WP LESS library, and let you control it the way you want. It checks if the class exists yet (to avoid fatal error of double registering class).
In all case, it just take care of *.less files queued through wp_enqueue_style – the way it should be done even without the plugin.
- drop wp-less in your theme (so as you have