jQueryUI CSS link with bare variable in it
-
I’m trying to use the accordian in jQuery UI, which is kinda part of WP. It’s the “kinda” aspect that is giving me problems, I suspect. Following advice on the web, I have this in functions.php:
function add_accordian_script() { if ( is_post_type_archive( 'oicevent' ) ) { wp_enqueue_script('jquery-ui-accordion'); } } add_action('wp_enqueue_scripts', 'add_accordian_script');
And in my theme’s js folder I have accordian.js with the following content:
jQuery(document).ready(function($) { $('#accordion').accordion({ collapsible: true, active: false, heightStyle: 'content', header: "header" }); });
Then I have a template to display an archive of the “oicevent” custom post type. You can see it in action at http://oicjapan.org/events/
The problem is the link for the CSS. I don’t know where the code is that creates this link, but a literal variable name (
$queryui-ver
) is jammed in the URL instead of the version number. It’s line 27 of the page source, but here it is for easy reference:<link rel='stylesheet' id='plugin_name-admin-ui-css-css' href='http://ajax.googleapis.com/ajax/libs/jqueryui/.$queryui-ver./themes/smoothness/jquery-ui.css?ver=4.0' type='text/css' media='all' />
It’s as if the PHP code is missing a couple of quotation marks (before the first period and after the second period). But I don’t know where to look for the code, because jQuery UI is not a separate plugin but somehow bundled with WP. Can someone point me in the right direction?
- The topic ‘jQueryUI CSS link with bare variable in it’ is closed to new replies.