Forum Replies Created

Viewing 1 replies (of 1 total)
  • The problem is the that get_current_screen is failing, but the plugin code hides the errors with the “@” operator.

    See modules/wpl.m.post-type.wp-lead.php, lines 212 and 230.

    First remove the @ sign, so the code reads as follows:

    $screen = get_current_screen(); //@this function is not working on some wp installation. Look more into this.

    Then, in wordpress-leads.php, insert a line to include the screen.php from the wordpress core. I’ve inserted it prior to the other includes, as follows:

    include_once(ABSPATH . 'wp-admin/includes/screen.php'); // added by RAV / IGDM to fix screen error
    include_once('modules/wpl.m.post-type.wp-lead.php');
    include_once('modules/wpl.m.post-type.list.php');
    include_once('modules/wpl.m.ajax-setup.php');
    include_once('modules/wpl.m.form-integrations.php');
    include_once('functions/wpl.f.global.php');

    That fixes it for me. Can’t say I understand why the screen.php isn’t loaded prior though.

Viewing 1 replies (of 1 total)