WordPress.org

Forums

[resolved] [closed] Auto Update Filters (8 posts)

  1. Tom Lany
    Member
    Posted 1 year ago #

    Hi,

    I'd like to turn the new auto update feature in WordPress 3.7 off for translation files.

    In the Disabling Automatic Updates codex article, it looks like you can add the following filter to turn this functionality off.

    add_filter( 'auto_update_translation', '__return_false' );

    I tried adding this to my wp-config.php, and I received a PHP error in my browser when I went back to my site. What file should I add this filter to?

    Thanks for your help!

  2. vestimir
    Member
    Posted 1 year ago #

    Can you please post the error itself so we can figure out what's wrong.

  3. Tom Lany
    Member
    Posted 1 year ago #

    This is the error I received:
    Fatal error: Call to undefined function add_filter() in /home/username/wp-config.php on line 93

  4. vestimir
    Member
    Posted 1 year ago #

    You should add this code to your child-theme's functions.php not to the wp-config.php.

  5. manavkumar
    Member
    Posted 1 year ago #

    add_filter is a hook which will register or add custom function to a WordPress site. So you should write this line of code to function.php file into your custom-theme folder.

  6. Tom Lany
    Member
    Posted 1 year ago #

    I added this code to my theme's function.php, and it is now working. Thanks for the help!

  7. littledove22
    Member
    Posted 1 year ago #

    I wish someone would add the information about adding the "add_filter" codes to the functions.php in the child theme to the Codex page about automatic updates!

  8. Andrew
    Forum moderator
    Posted 1 year ago #

    Edit: Oh I understand now. Your wish is your command because anyone can edit the Codex docs: http://codex.wordpress.org/index.php?title=Special:UserLogin&returnto=Version_3.9

Topic Closed

This topic has been closed to new replies.

About this Topic