its there an error in custom press plugin?

Hi there,

I was trying to fix some errors on my site ( running soooooo sloooooow). And notice an error when activating custom press plugging. The log says:

PHP Notice: Use of undefined constant WPLANG – assumed ‘WPLANG’ in /..content/plugins/custompress/core/core.php on line 57.

I tried to put this in instead :

// People use both “_” and “-” versions for locale IDs en_GB en-GB

//Translate it all to dashes because that’s the way the standard translation files for datepicker are named.

$wplang = str_replace(‘_’, ‘-‘, ‘WPLANG’:wink:;

$lang = ($wplang == ”:wink: ? ” : substr($wplang, 0, 2); // Non specific locale


Just dont know if it is an error or what? :slight_smile:

  • Vaughan
    • Support/SLS MockingJay

    Hi niklas,

    Hope you’re well?

    WPLANG was deprecated in wp 4.5.

    The above is just a php notice though and shouldn’t prevent the plugin working.

    You can fix this though by editing the following.

    Open & edit /wp-content/plugins/custompress/core/core.php

    Find the following:

    $wplang = str_replace('_', '-', WPLANG);

    replace with:

    $wplang = str_replace('_', '-', get_option('WPLANG'));

    Hope this helps

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.