WordPress.org

Make WordPress Core

Opened 3 years ago

Last modified 3 years ago

#38718 new feature request

Code Snippets function in core

Reported by: lukecavanagh Owned by:
Milestone: Awaiting Review Priority: low
Severity: normal Version: 4.6.1
Component: Customize Keywords: 2nd-opinion
Focuses: Cc:
PR Number:

Description

If a user was not using a custom theme or a child theme for their parent theme, then having code snippets in core, would be handy way to add in PHP code snippets, instead of adding in the code into the functions.php of the active theme. Not all users would think about adding that code into site specific plugins either.

Change History (2)

#1 @celloexpressions
3 years ago

  • Keywords 2nd-opinion added
  • Priority changed from normal to low

I'm not quite sure what you're suggesting @lukecavanagh. Is the idea essentially to offer something similar to custom CSS but for PHP?

I'm not sure that that would be appropriate for core given the much higher likelihood of seriously breaking a site. It would be good to see a plugin version as a proof of concept before considering whether there's enough of a use case to justify core inclusion.

#2 @lukecavanagh
3 years ago

@celloexpressions

I am suggesting something similar to say https://wordpress.org/plugins/code-snippets/

So where a user is not using a child theme, so not adding in code snippets into the functions.php and wanted to add in code snippets for minor changes to there site.

Version 0, edited 3 years ago by lukecavanagh (next)
Note: See TracTickets for help on using tickets.