• Hello there,

    I’d like to “overwrite” the get_option() function in wp-includes.

    Everytime when it gets the home and siturl entries from the database, I’d like to set my own ones.

    Is it possible to manage something like this in a plugin?

    Greetings, mathew

Viewing 3 replies - 1 through 3 (of 3 total)
  • Is it not possible to just change them on the Admin screen?

    Yes you can do this. You ned a filter. Plugins can filter certain WordPress events… https://codex.www.ads-software.com/Plugin_API

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    For the specific case of the home and siteurl, these are already done. Just add these to your wp-config.php file:

    define('WP_SITEURL','https://example.com');
    define('WP_HOME','https://example.com');

    For a more generic case of any option, you can use a filter to do it.

    Thread Starter matkolbe

    (@matkolbe)

    Good morning,

    thanks for the help :o)

    I think I got to check the plugins, that could be the solution :o)

    Greetings, mathew

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘how to “overwrite” a function??? pls help :o)’ is closed to new replies.