[wp-trac] [WordPress Trac] #6481: Fancy permalinks should be enabled on new sites
WordPress Trac
noreply at wordpress.org
Wed Dec 31 04:18:22 UTC 2014
#6481: Fancy permalinks should be enabled on new sites
------------------------------------+------------------
Reporter: Denis-de-Bernardy | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 4.2
Component: Permalinks | Version: 2.7
Severity: minor | Resolution:
Keywords: has-patch dev-feedback | Focuses:
------------------------------------+------------------
Comment (by ericlewis):
Replying to [comment:60 valendesigns]:
> Probably, or is the wrong way to go? I would prefer a `function_exists`
check around all functions, but that's just my preference and one I'm
willing change if needed. Where did you read or hear that it's an anti-
pattern?
JeremyClarke added this to the
[http://codex.wordpress.org/Pluggable_Functions Pluggable Functions Codex
page] a while ago:
> Pluggable functions are no longer being added to WordPress core. All new
functions instead use filters on their output to allow for similar
overriding of their functionality.
I wasn't around for 1.5 when pluggable functions were introduced. Someone
with a better historical perspective can chime in here, but my thought is
pluggable functions make backwards compatibility harder. You have to
support a developer doing anything in the world they want to in their
version of the function. Offering developers a hook to noop a function
with their callback [https://core.trac.wordpress.org/browser/tags/4.1/src
/wp-includes/option.php#L45 as in the options API] gives more control over
changing the internals of a function. Also, as only one function can be
defined in PHP, two plugins can't both play nicely in this context. The
hooks API is a stable, robust way to extend functionality.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/6481#comment:63>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list