Forums

[Plugin: emObA - Email Obfuscator Advanced] Unable to activate plugin - call to undefined function (2 posts)

  1. sargespam
    Member
    Posted 2 years ago #

    I get the following error when I try to activate the plugin.

    Fatal error: Call to undefined function plugin_dir_url() in [path to]/emoba-email-obfuscator-advanced/emoba.php on line 63

    WordPress version 2.7.1
    Plugin version 1.3

    http://wordpress.org/extend/plugins/emoba-email-obfuscator-advanced/

  2. kirkpatrick
    Member
    Posted 2 years ago #

    Well, I didn't realize when I wrote 1.3 that plugin_dir_url was not introduced in WP until v2.8.

    I believe I will deal with this the lazy developer's way: emObA 1.3 requires WP2.8.

    If you don't want to upgrade WP and you know a tiny bit of PHP, you could patch emoba.php around line 51, in the code

    /****
    Place the css in the head:
    ****/
    function emoba_includes(){
      wp_enqueue_style( 'emoba_style', plugin_dir_url(__FILE__) . 'emoba_style.css');
    }
    add_action('init','emoba_includes');

    by replacing plugin_dir_url() with (I think -- not sure of the final slash)

    '/wp_content/plugins/emoba_dir/'
    where emoba_dir is the name of the folder emoba is in.

Topic Closed

This topic has been closed to new replies.

About this Topic