Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#40367 closed feature request (wontfix)

Proposal for a new functions file to add and manage custom hooks.

Reported by: adhun's profile adhun Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Themes Keywords: close
Focuses: Cc:

Description

Even being a hardcore WordPress developer, we all have had to use one of those free or premium theme to make some websites quick and hassle-free. In most cases, we place our custom patches/hooks on our theme's functions.php in order to achieve the site-specific requirements. That’s literally modifying a theme file. It will get replaced when the theme is updated. I think there should be a better way to handle this. Introducing a global custom-functions file that's independent of themes and plugins would fix the issue. I would really love your thoughts on this.

Change History (5)

#1 @swissspidy
7 years ago

  • Component changed from General to Themes
  • Focuses accessibility template performance removed

I think there should be a better way to handle this.

Have you tried using a child theme? That's what they were built for.

Introducing a global custom-functions file that's independent of themes and plugins would fix the issue.

Well, there's my-hacks.php (please don't use that one though!)

Last edited 7 years ago by swissspidy (previous) (diff)

#2 @jadpm
7 years ago

Introducing a global custom-functions file that's independent of themes and plugins would fix the issue.

I would say that mu plugins are the very definition of that?

#3 @swissspidy
7 years ago

  • Keywords close added

#4 @johnbillion
7 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

Thanks for the ticket, @adhun. This is precisely why child themes were introduced, so you can take a theme and use it as a parent theme and then place your customisations into a child theme.

#5 @adhun
7 years ago

Thanks all for the valuable suggestions.

Note: See TracTickets for help on using tickets.