• joostdevalk

    (@joostdevalk)


    You’re correctly only loading the scripts on your own admin pages, but you’re registering datatables globally on all admin pages. This is leading to a plugin conflict with my AAA Option Optimizer plugin, which also uses datatables.

    The fix is very simple. Change this in the file class-ahrefs-seo-view.php:

    $this->register_scripts();

    if ( $screen instanceof \WP_Screen && in_array( $screen->id, $this->admin_screens, true ) ) {
    do_action( 'ahrefs_seo_process_data_' . $screen->id );
    $this->add_scripts();
    }

    so that register_scripts is called inside the if statement, and you’re done. I couldn’t find a GitHub for your plugin otherwise I’d have done a pull request ??

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Please register scripts only on your own page’ is closed to new replies.