Support » Fixing WordPress » How to rename function by plugin?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Just go into the plugin file (PHP) and search for:
    function make_clickable
    Then rename the “make_clickable” part to anything you like.

    Function make_clickable is in core files of wordpress. In wp-includes/default-filters.php and formatting.php

    It’s not possible to rename it by some filter, or function in my plugin? thx

    Edward Caissie


    Theme Review Admin, The JellyBeen Man

    I’m just wondering why you need to rename the function … wouldn’t simply having another function call the make_clickable() function work just as well and essentially accomplish the same thing?

    No, I need to rename it in wordpress 🙁
    Manualy it works, but my question is.. it is possible to rename it by my plugin? It is very important for me, Thanks

    Edward Caissie


    Theme Review Admin, The JellyBeen Man

    If I am understanding you correctly, you want your code to re-write the core WordPress code?!

    I would say its strongly not recommended but good luck if you have your heart set on it.

    No, there is no WordPress filter that will rename php functions. The only functions that you can modify via plugins are the pluggable functions (and even those you can’t rename–that’s kinda what makes them pluggable).

    If you explain exactly what you’re trying to do and why, we might be able to come up with an acceptable solution. My best guess is that you’re trying to declare your own function called make_clickable(), and you’re getting an error because it’s already defined. In which case, you can just use a different name for your function and problem solved.

    If for some strange reason you need to call the make_clickable() function but want to call it using a different name, you can just wrap it in your own function:

    function my_function_name($ret) {
      return make_clickable($ret); // Call the real fucntion, return the results

    If neither of those help, you’ll have to provide more info.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How to rename function by plugin?’ is closed to new replies.