Support » Plugin: WordPress-Amazon-Associate » FancyBox

Viewing 1 replies (of 1 total)
  • I’ve fixed this issue in WPAA.php

    A couple of changes:

    in function __construct

    //add_action('admin_print_scripts', array(&$this, 'doPageScripts'));
    add_action('admin_enqueue_scripts',array(&$this, 'doPageScripts') );

    and in doPageScripts, I’ve used the hook suffix to check directly rather than parsing the parameters and also only install the thickbox and fancybox on the new page and new post as that should be the only places we might want to activate WPAA from, rather than activating on all admin pages. Also spotted an issue with the way that the plugin folder was being referenced.

    function doPageScripts($hook_suffix) {
            if ($hook_suffix == $this->config_hook) {
            } else if( is_admin() && ($hook_suffix =='post-new.php' or $hook_suffix == 'page-new.php')) {
                wp_enqueue_script('fancybox', plugins_url( '/js/fancybox/jquery.fancybox-1.3.4.js' , __FILE__ ));
Viewing 1 replies (of 1 total)
  • The topic ‘FancyBox’ is closed to new replies.