Jonathan Daggerhart
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Sorry, that file cannot be edited.Upgraded from 3.0.5 to 3.1This seems to be a known issue for child-themes in WP 3.1+
Forum: Plugins
In reply to: [Plugin: Widget Wrangler] unable to modify sidebarHi scottlowe,
I was able to find the root of the problem and have committed a fix. Should be working in all WP 3+ in version 1.1RC7
For plugin developers:
The issue was that I was not loading the javascript correctly. The correct way to load javascript in a wordpress 3 plugin is to enqueue the script. For admin pages, this is a two part process
In my admin_init I am now using the admin_enqueue_scripts action:
add_action('admin_enqueue_scripts', 'ww_admin_js');
Now my ww_admin_js function looks something like this:
wp_enqueue_script('ww-admin-js', plugins_url('/ww-admin.js', __FILE__ ), array('jquery-ui-core', 'jquery-ui-sortable'), false, true);
For additional page specific javascript loading I got my answer from this blog post:
https://planetozh.com/blog/2008/04/how-to-load-javascript-with-your-wordpress-plugin/Hope this helps another plugin developer.
Hi kristib,
Thanks for the heads up with the jQuery1.5 and jQuery UI incompatibilities. I’ve been looking into it for a little bit now and it seems there definitely is a problem with the two.
Widget Wrangler doesn’t use any specific version of jQuery, it just relies on whatever wordpress is using. What is confusing to me is that my WordPress 3.1 dev site is using jQuery 1.4.4, not 1.5. So I’m not sure why your site breaks with an update and fixes with a downgrade.
According to the jQuery bug report which discusses the issue ( https://bugs.jquery.com/ticket/8123 ), it appears that jQuery 1.5.1 will include a fix.
The wordpress Dev team is also aware of the problem ( https://wpdevel.wordpress.com/2011/02/10/if-your-menus-or-widgets-screens-broke/ ). This article says that WordPress 3.1 is freezing jQuery at version 1.4.4, and also offers a fix in case your theme is specifically using jQ1.5 (make sure you only load jQuery 1.5 on the frontend).
I guess what I’m getting at is that it’s not clear to me why you’re having the problem on your site, unless you’re somehow specifically loading jQuery 1.5.
For now, I would recommend loading jQ1.5 only on the frontend as presented in the article by the wordpress dev team above.
If that isn’t an easy option for you, then maybe you can try a fix for the bug offered on this page: https://giuliom.wordpress.com/2011/02/08/patching-cdn-hosted-jquery/
Hopefully, the jQuery team will release 1.5.1 soon, making this a non-issue. If you find that none of these options is helpful for you, then I could probably fix it with a Widget Wrangler release, but I don’t really want to add code to WW that patches such a specific bug with other software. Especially a bug that has already been fixed and is queued for release.
Sorry if this post is a bit rambling, but hopefully it helps you out. If not, let me know and I will see if there is another way I can help.
Hi chadwick, thanks for the heads up.
This should be fixed in 1.1rc6. Please let me know if this is not the case and there are more problems.
Hi peteratomic,
Sorry I didn’t see this post earlier.
I think the problem is in your code.
function_exist is a php function that returns a boolean true/false, so the ‘!’ in front of it is testing for if the function does not exist.
I think its an extremely confusing snippet of code to use as a wordpress standard, and its likely only relevant for compatibility with previous versions of wordpress.
If the Widget Wrangler Plugin is installed and enabled, it is not necessary for you to check to see if the function exist for dynamic_sidebar or ww_dynamic_sidebar.
Try this
<?php ww_dynamic_sidebar(‘homepage’); ?>
<?php ww_dynamic_sidebar(‘ambient’); ?>You should be able to add the ww_dynamic_sidebar() function anywhere you want and as many times as you want.
Again, sorry for the late reply.