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

    (@maxwellberkel)

    Thanks JP.

    The log viewer widget in the admin bar requires react that’s why it’s loading on every page. Is it causing a conflict with another plugin/js file?

    Thread Starter jpcaparas

    (@jpcaparas)

    Hi Max,

    Thanks for your reply.

    We’re actually building a module for generating report screens based on Griddle: https://dynamictyped.github.io/Griddle/

    As such, we’re trying to load the React 0.12.0.js library (and it’s JSX transformer).

    https://griddlegriddle.github.io/Griddle/quickstart.html

    I’m trying to hook the said Griddle script as the LAST script. I’ve tried using delayed priorities for wp_footer and wp_enqueue_script actions. However, your plugin is still loading as the last script, causing incompatibilities. Is it possible for you to make the plugin load a bit earlier? Is it also okay for you to define action hooks where we can hook into?

    Thanks so much,
    JP

    Plugin Author maxwellberkel

    (@maxwellberkel)

    The log viewer supports a few filters to control access to the log viewer and displaying of the dashboard and admin bar widgets.

    The following snippet will accomplish what you want.

    if ($_GET[‘page’] !== ‘wp-log-viewer’) {
    add_filter (‘wplv_user_authorized’, function () { return false; });
    }

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Please load the React library only on the plugin screen’ is closed to new replies.