theme-based functions.php should override pluggable-functions.php

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

theme-based functions.php should override pluggable-functions.php

Aaron Brazell
Don't you think?

Ticket #2479 <http://trac.wordpress.org/ticket/2479#preview> in Trac.

_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: theme-based functions.php should override pluggable-functions.php

Andy Skelton
On 2/18/06, Aaron Brazell <[hidden email]> wrote:
> Don't you think?
>
> Ticket #2479 <http://trac.wordpress.org/ticket/2479#preview> in Trac.

I don't think so. {theme}/functions.php is not a plugin. It should not
be treated as one.

There are many differences between a theme's functions file and a
plugin. Let's keep it that way.

Andy
_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: theme-based functions.php should override pluggable-functions.php

Aaron Brazell
On 2/18/06, Andy Skelton <[hidden email]> wrote:

>
> On 2/18/06, Aaron Brazell <[hidden email]> wrote:
> > Don't you think?
> >
> > Ticket #2479 <http://trac.wordpress.org/ticket/2479#preview> in Trac.
>
> I don't think so. {theme}/functions.php is not a plugin. It should not
> be treated as one.
>
> There are many differences between a theme's functions file and a
> plugin. Let's keep it that way.
>
> Andy
>
I know what you're saying and I am not saying {theme}/functions.php is a
plugin.  But it is user-designated and in my opinion, if a user is given
veto power over pluggable-functions.php via a plugin, he should be given it
the other way as well.

I do agree there's differences between functions.php and plugins (for
instance the added layer of protection from activation being required) --
but then I'm talking about overriding pluggable-functions, not critical
functionality.

_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: theme-based functions.php should override pluggable-functions.php

Owen Winkler
Aaron Brazell wrote:
> I do agree there's differences between functions.php and plugins (for
> instance the added layer of protection from activation being required) --
> but then I'm talking about overriding pluggable-functions, not critical
> functionality.

Not-critical functionality like user authentication?

The reason themes now have functions.php is so that they can provide
specialized output and configuration options, not additional functionality.

Themes should use their functions.php to be plugin-aware, not replace
the functionality provided by plugins.

Owen

_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: theme-based functions.php should override pluggable-functions.php

Robert Deaton
In reply to this post by Aaron Brazell
On 2/18/06, Aaron Brazell <[hidden email]> wrote:

> On 2/18/06, Andy Skelton <[hidden email]> wrote:
> >
> > On 2/18/06, Aaron Brazell <[hidden email]> wrote:
> > > Don't you think?
> > >
> > > Ticket #2479 <http://trac.wordpress.org/ticket/2479#preview> in Trac.
> >
> > I don't think so. {theme}/functions.php is not a plugin. It should not
> > be treated as one.
> >
> > There are many differences between a theme's functions file and a
> > plugin. Let's keep it that way.
> >
> > Andy
> >
>
> I know what you're saying and I am not saying {theme}/functions.php is a
> plugin.  But it is user-designated and in my opinion, if a user is given
> veto power over pluggable-functions.php via a plugin, he should be given it
> the other way as well.
>
> I do agree there's differences between functions.php and plugins (for
> instance the added layer of protection from activation being required) --
> but then I'm talking about overriding pluggable-functions, not critical
> functionality.
Overriding pluggable-functions is critical functionality, login,
cookies, userdata, admin redirection, things that a theme should never
worry about. I can't think of anything that a theme would need to do
that would require you to change the whole user or authorization
portions of the code.

Not to mention the number of themes we would potentially break because
they assume that these functions are defined, notably
get_currentuserinfo.

--
--Robert Deaton
http://somethingunpredictable.com

_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: theme-based functions.php should override pluggable-functions.php

Aaron Brazell
On 2/18/06, Robert Deaton <[hidden email]> wrote:

>
>
> Overriding pluggable-functions is critical functionality, login,
> cookies, userdata, admin redirection, things that a theme should never
> worry about. I can't think of anything that a theme would need to do
> that would require you to change the whole user or authorization
> portions of the code.
>
> Not to mention the number of themes we would potentially break because
> they assume that these functions are defined, notably
> get_currentuserinfo.
>
>
Fair enough. That's the explanation I needed.  Call this an explanation in
the theory here. I did what I needed to do by moving to a plugin anyway, so
it isn't a big deal.  Thanks for the explanation.

- Aaron

_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Loading...