• Leo Blanchette

    (@leoclipartillustrationcom)


    In a plugin I’ve done an add_action( 'after_setup_theme' , 'some_funct' ); and then the plugin calls a function named in the theme’s functions.php file.

    It should work! It came in after “theme setup”! Yet its saying undefined function!!! I’m living in the twighlight zone.

    Is there any instances or reasons after_setup_theme would disobey the idea of loading after theme setup?

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    Yes but not normally encountered, either WP is installing or a MU blog is being activated. See for yourself near the end of wp-settings.php.

    You could try ‘init’ or ‘wp-loaded’ though it should not make any difference. Something very queer is going on if it did. If not, you may have done something silly like nested function definitions, or even editing the wrong functions.php file. You can imagine how I know about these errors, I’m sure there’s others I’ll eventually discover.

Viewing 1 replies (of 1 total)
  • The topic ‘after_setup_theme not running after theme setup’ is closed to new replies.