[wp-hackers] "The Matrix Has You" easter egg
Moya, Eddie
emoya at tribune.com
Fri Oct 22 16:09:03 UTC 2010
That almost sounds like you implied there was a "point" to having easter eggs. Ha!
In all seriousness though, as much as I think these easter eggs should not be in there at all. I'll submit to the things I know wont change any time soon.
1. There will be dumb annoying easter eggs.
2. They will be on by default.
3. It wont be made completely obvious to end-users that they exist.
That said, I think I agree that an admin console option would be confusing. Perhaps we could make this work in such a way that a plugin can be simply written to shut them all off. Ideally, as I have already said, it would be great if this could become a core plugin.
To add to some of the thinking that Arlen has been doing.. How about this....
Global $wp_easter_eggs;
$wp_easter_eggs = array(
'revself-matrix' => true,
'camel-case-p-filter' => true /* the name "wordpress seems a bit vague */
)
For simplicities sake it would be nice if you could also just do this to turn them all off at once.
$wp_easter_eggs = false;
For such a thing to work, I would suggest a standard way of checking if an easter egg is enabled or not.
Function wp_easter_egg_check($egg_name){
global $wp_easter_eggs;
if(empty($wp_easter_eggs)) return false;
else return $wp_easter_egg[$egg_name];
}
Doing this in some way similar to this allows developers to nuke away all easter eggs easily, or target specific ones.
Hey, if you want to keep things obscure (you know.. For FUN!), you could name the change everything that says "easter_egg" to "dont_not_change"! (not being serious, really, don't do that).
--
Eddie Moya
Applications Developer
Tribune Technology
As a standard check for if a particular
By having it as a global, it could be hooked into at any given point relative to whatever egg someone is trying to change.
On 10/22/10 10:43 AM, "Eric Mann" <eric at eam.me> wrote:
The admin console has enough options already ... besides, adding a visible
option would defeat the point of having an Easter egg in the first place and
add needless clutter with an option that "doesn't do anything" the user is
aware of.
On Fri, Oct 22, 2010 at 8:40 AM, Gavin Pearce <Gavin.Pearce at 3seven9.com>wrote:
> Or, another option in the Admin Console (though you risk the chance of
> the end-user, switching them on, and wondering why it doesn't do
> anything) ...
>
> G
>
> -----Original Message-----
> From: wp-hackers-bounces at lists.automattic.com
> [mailto:wp-hackers-bounces at lists.automattic.com] On Behalf Of Arlen
> Beiler
> Sent: 22 October 2010 16:37
> To: wp-hackers at lists.automattic.com
> Subject: Re: [wp-hackers] "The Matrix Has You" easter egg
>
> And that could be put in a plugin or wp-config.php according to
> webmaster
> preference.
>
> On Fri, Oct 22, 2010 at 11:36 AM, Arlen Beiler <arlenbee at gmail.com>
> wrote:
>
> > Another way to do it, perhaps a better way, would be to have an easter
> egg
> > array that could be set on init.
> >
> > $eastereggs = array(
> > 'revself' => true,
> > 'wordpress' => true
> > )
> >
> > add_action('init','seteastereggs',0);
> > Function seteastereggs(){
> > $eastereggs['revself'] = false;
> > }
> >
> > On Fri, Oct 22, 2010 at 11:28 AM, Eric Mann <eric at eam.me> wrote:
> >
> >> I'd like to see a more fleshed-out example of how that would work,
> but it
> >> makes logical sense so far :-)
> >>
> >> On Fri, Oct 22, 2010 at 8:23 AM, Arlen Beiler <arlenbee at gmail.com>
> wrote:
> >>
> >> > - off
> >> > - on
> >> > - custom
> >> > - file
> >> >
> >> > How is that? For custom, we would then use an array, or whatever it
> is
> >> that
> >> > would be in eastereggs.php, since some people probably want
> everything
> >> in
> >> > one file. For file, it would read eastereggs.php.
> >> >
> >> > On Fri, Oct 22, 2010 at 10:56 AM, Eric Mann <eric at eam.me> wrote:
> >> >
> >> > > +1 For a setting in wp-config.
> >> > >
> >> > > define( 'EASTEREGGS', 'off' );
> >> > >
> >> > > Then maybe an "eastereggs.php" file we can drop in that defined
> which
> >> > ones
> >> > > we turn off. That way it's not a wholesale all-off or all-on,
> but
> >> sites
> >> > > could pick and choose which ones they want to enable (for
> example, on
> >> > some
> >> > > sites I'd definitely want the capital P feature but not the post
> >> revision
> >> > > comparison message ... on others I might want to remove both ...
> on
> >> > others
> >> > > I
> >> > > might want to keep both and remove something else).
> >> > >
> >> > > On Fri, Oct 22, 2010 at 7:42 AM, Arlen Beiler
> <arlenbee at gmail.com>
> >> > wrote:
> >> > >
> >> > > > How many easter eggs are there. And I would recommend a setting
> in
> >> > > > wp-config.php, rather than a plugin.
> >> > > >
> >> > > > On Fri, Oct 22, 2010 at 10:37 AM, Austin Matzko <
> >> austin at ilfilosofo.com
> >> > > > >wrote:
> >> > > >
> >> > > > > On Fri, Oct 22, 2010 at 9:29 AM, Eric Mann <eric at eam.me>
> wrote:
> >> > > > > > As entertaining as the feature might be ... is there any
> way I
> >> can
> >> > > turn
> >> > > > > it
> >> > > > > > off on a client site?
> >> > > > >
> >> > > > > I proposed a patch here to allow it to be turned off by
> filter,
> >> but
> >> > > > > the ticket never went anywhere:
> >> > > > >
> >> > > > > <
> >> > > > >
> >> > > >
> >> > >
> >> >
> >>
> http://core.trac.wordpress.org/attachment/ticket/12816/easter-egg-revisi
> ons-filter.12816.2.diff
> >> > > > > >
> >> > > > > _______________________________________________
> >> > > > > wp-hackers mailing list
> >> > > > > wp-hackers at lists.automattic.com
> >> > > > > http://lists.automattic.com/mailman/listinfo/wp-hackers
> >> > > > >
> >> > > > _______________________________________________
> >> > > > wp-hackers mailing list
> >> > > > wp-hackers at lists.automattic.com
> >> > > > http://lists.automattic.com/mailman/listinfo/wp-hackers
> >> > > >
> >> > > _______________________________________________
> >> > > wp-hackers mailing list
> >> > > wp-hackers at lists.automattic.com
> >> > > http://lists.automattic.com/mailman/listinfo/wp-hackers
> >> > >
> >> > _______________________________________________
> >> > wp-hackers mailing list
> >> > wp-hackers at lists.automattic.com
> >> > http://lists.automattic.com/mailman/listinfo/wp-hackers
> >> >
> >> _______________________________________________
> >> wp-hackers mailing list
> >> wp-hackers at lists.automattic.com
> >> http://lists.automattic.com/mailman/listinfo/wp-hackers
> >>
> >
> >
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
_______________________________________________
wp-hackers mailing list
wp-hackers at lists.automattic.com
http://lists.automattic.com/mailman/listinfo/wp-hackers
More information about the wp-hackers
mailing list