[Plugin: Camera slideshow] Camera and wp-ecommerce
-
Hello,
I’ve been having problems to have camera playing along with the wp-ecommerce plugin. I’m completely new to WordPress so I hope I’m not too far off.
I noticed that the problem comes from the fact that the ‘
camera_enqueue_cond
‘ method is called twice on my front-page, once with the homepage content, and once with my products. First time it detects the camera slideshow in my homepage and sets$shortcode_found
to true. The second time it’s run with the products, and since it doesn’t find any slideshow,$shortcode_found
is set to false.Then ‘
wp_head
‘ is run, so ‘camera_enqueue_head
‘ is run. The problem is that the global variable$shortcode_found
is now set to false, so the scripts are not added to the document, which obliously breaks the slideshow.The quick fix I used is to replace this line in ‘
camera_enqueue_cond
‘
$shortcode_found = false;
with this :
$shortcode_found = $shortcode_found || false;
Seems to be doing the trick, but I have no idea if it’s what i’m supposed to do, having absolutely no experience with wordpress plugins.Any advice would be really appreciated !
- The topic ‘[Plugin: Camera slideshow] Camera and wp-ecommerce’ is closed to new replies.