1

I receive this error while debug mode is enabled:

Notice: load_plugin_textdomain was called with an argument that is deprecated since version 2.7 with no alternative available. in /home/xyz/public_html/wp-includes/functions.php on line 3739

I found that is related to this plugin: https://wordpress.org/plugins/custom-smilies-se/

I really need to have this plugin and would not ignore it; Also plugin author had not responded about this issue. Could you please guide me to modify it?

1

The plugin calling load_plugin_textdomain() the wrong way:

load_plugin_textdomain(
    'custom_smilies', 
    PLUGINDIR . '/' . dirname(plugin_basename(__FILE__)) . '/lang'
);

You have to change the code to:

load_plugin_textdomain(
    'custom_smilies', 
    false,
    plugin_dir_path(__FILE__) . '/lang'
);
  • Thanks a lot! it is fixed. I have noticed this plugin has another related error: Notice: has_cap was called with an argument that is deprecated since version 2.0! Usage of user levels by plugins and themes is deprecated. Use roles and capabilities instead. @toscho – Omid Toraby Jan 16 '16 at 19:37
0

I changed

function clcs_add_pages() {
    add_options_page(__('Smilies Options', 'custom_smilies'), __('Smilies', 'custom_smilies'), 8, CLCSABSFILE, 'clcs_options_admin_page');
}

to this code

function clcs_add_pages() {
    add_options_page(__('Smilies Options', 'custom_smilies'), __('Smilies', 'custom_smilies'), 'manage_network_plugins', CLCSABSFILE, 'clcs_options_admin_page');
} 

and solved! @toscho

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.