• Resolved Ann Lickander

    (@annlickander)


    Hi!

    I noticed that I got “Are you sure”-messages when I clicked on links when I edited a page and found that your plugin add its javascript to all admin pages.
    I fixed it on my site, but thought it would be nice to add it to the plugin in case other people have the same problem, or will have.
    Row 65, in pagecommentsoffplease.php
    Instead of
    add_action('admin_print_scripts-settings_page_page_comments_off_please', array(&$this, 'register_admin_scripts'));

    Write this to only load the javascript on the right option page
    add_action('admin_print_scripts-settings_page_page_comments_off_please', array(&$this, 'register_admin_scripts'));

    I also noted that row 273 to row 284 seem a bit wonky. The variable string doesn’t start with an ” and ENDIT; is added to after the “.

    But, still, great plugin and thank you for taking the time to make it and update it ??

    https://www.ads-software.com/plugins/page-comments-off-please/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author techism

    (@techism)

    Hey, thanks for the highly specific / constructive feedback. I’ll fold that in as soon as I can clarify…

    One question…you gave the same code twice…I think your altered suggestion was missed?

    Plugin Author techism

    (@techism)

    No worries, I noodled it out. Thanks for the tip!
    Lemme know if v2.0.2 is anything but ideal.

    Thanks,
    -Joe

    Thread Starter Ann Lickander

    (@annlickander)

    Wow, that was fast ??

    And yeah, I accidently copied in the same text twice, I meant to say to change:
    add_action(‘admin_print_scripts’, array(&$this, ‘register_admin_scripts’));

    to:
    add_action(‘admin_print_scripts-settings_page_page_comments_off_please’, array(&$this, ‘register_admin_scripts’));

    But I see that you’ve changed it now ?? Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘.js issue, added to all pages’ is closed to new replies.