• Resolved garbonzo

    (@garbonzo)


    I’ve written about a dozen functions that are used in many places in my theme. Currently I store all the functions in functions.php… but I was wondering if it was more efficient for wordpress if I instead put them all in a plugin instead?
    None of the functions use any filters or hooks, or require admin pages.
    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • From a cleanliness and upgrading perspective, you’re better off storing them in plugins. If you wanted to upgrade with a modded functions.php file, you’ve gotta copy any differences into your file or copy your changes out. With plugins, it’s just a straight upgrade.

    As for efficiency, I can see no difference logically.

    Look at it this way:
    If you put all the functions into categories, and then make a plugin for each category (ie: sorted by what they do), then you can easily enable or disable them as needed, without having to mod the functions.php file.

    Thread Starter garbonzo

    (@garbonzo)

    Thanks, food for thought.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Better to use functions.php or a plugin?’ is closed to new replies.