durin
Forum Replies Created
-
Forum: Plugins
In reply to: [HeadJS Loader] Late-enqueued scripts in the footerIt is always written. See the example above where the script is in the footer then added to the head.js call. Do you have one that is not working?
Forum: Plugins
In reply to: [HeadJS Loader] Late-enqueued scripts in the footerThis does detect scripts loaded in the footer if they are done with the enqueue function.
Ex.
wp_enqueue_script('fancybox', get_stylesheet_directory_uri() . '/jquery.fancybox.pack.js',array('jquery'),null, true);
Would load this in the footer. If I turn on headjs-loader it adds it to my head.js calls:
<script type='text/javascript'> head.js( "//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js", "https://localhost:4001/wordpress/wp-content/themes/xxx/jquery.fancybox.pack.js", ); </script>
Or are you saying that this should detect that this should be loaded in the footer and make a second head.js() call in the footer?
Forum: Plugins
In reply to: [HeadJS Loader] Exclude certain JS files from pluginI’ve put a test copy of the update on Github if you would like to try it out.
Forum: Plugins
In reply to: [HeadJS Loader] Disqus and HeadJSHow about if you uncheck the “Wrap inline javascript with head.ready function” option?
Forum: Plugins
In reply to: [HeadJS Loader] Disqus and HeadJSThanks for the feedback faoliviera.
Is there a specific plugin you are using for Disqus?
Forum: Plugins
In reply to: [HeadJS Loader] Exclude certain JS files from pluginThanks for the feedback Paul.
This was something I was thinking about adding. Right now there is no way to accomplish this would hacking the core of the plugin.
I’ll see if I can add this feature over the next week or 2.
Forum: Plugins
In reply to: [HeadJS Loader] [Plugin: HeadJS Loader] Bug on line 75 and 77This was an issue if no javascript was declared. Version 0.1.1 has more control logic around empty values which should fix this.
Forum: Fixing WordPress
In reply to: How To: First and Last CSS Classes for Sidebar WidgetsMathSmath thanks for sharing this. I did make one minor change. The way its written with the str_replace if you have more than 1 element with a class in it, the style change will be applied to all of them. Ex:
'before_widget' => '<li id="%1$s" class="widget %2$s"><div class="widget_padding">'
It would apply to both the li and div.
I only wanted to apply it to the first occurrence of a class there, so I changed it to a regex:
//$params[0]['before_widget'] = str_replace('class="', $class, $params[0]['before_widget']); // Insert our new classes into "before widget" $params[0]['before_widget'] = preg_replace('/class=\"/', "$class", $params[0]['before_widget'], 1);