[wp-hackers] wp-hackers Digest, Vol 70, Issue 74

Chip Bennett chip at chipbennett.net
Thu Nov 25 21:20:40 UTC 2010


Wouldn't this work?

if ( is_user_logged_in() ) {
     wp_nav_menu( array( 'theme_location => 'logged-in-menu' ) );
} else {
     wp_nav_menu( array( 'theme_location => 'logged-out-menu' ) );
}

For pages, just replace is_user_logged_in() with is_page( $pageid ).

Chip

On Thu, Nov 25, 2010 at 10:49 AM, pradipta sinha <singh.gabu at gmail.com>wrote:

> Hi,
> NEW TOPIC :  *wp_nav_menu*
> I have a question to all of gurus of wp,
> Can I use different wp_nav_menu In different  pages , Or after sign on the
> members will get a new menu or different  menu .
>
> Is that possible ?
>
>
>
>
> On Thu, Nov 25, 2010 at 9:04 PM, <wp-hackers-request at lists.automattic.com
> >wrote:
>
> > Send wp-hackers mailing list submissions to
> >        wp-hackers at lists.automattic.com
> >
> > To subscribe or unsubscribe via the World Wide Web, visit
> >        http://lists.automattic.com/mailman/listinfo/wp-hackers
> > or, via email, send a message with subject or body 'help' to
> >        wp-hackers-request at lists.automattic.com
> >
> > You can reach the person managing the list at
> >        wp-hackers-owner at lists.automattic.com
> >
> > When replying, please edit your Subject line so it is more specific
> > than "Re: Contents of wp-hackers digest..."
> >
> > Today's Topics:
> >
> >   1. Re: meenews: obfuscated code (Chip Bennett)
> >   2. Re: meenews: obfuscated code (Iain Cambridge)
> >   3. Re: meenews: obfuscated code (Chip Bennett)
> >   4. Re: meenews: obfuscated code (Otto)
> >   5. Re: meenews: obfuscated code (Otto)
> >   6. Re: meenews: obfuscated code (Chip Bennett)
> >   7. Re: meenews: obfuscated code (Chip Bennett)
> >   8. Re: <!DOCTYPE html> (Haluk Karamete)
> >
> >
> > ---------- Forwarded message ----------
> > From: Chip Bennett <chip at chipbennett.net>
> > To: wp-hackers at lists.automattic.com
> > Date: Thu, 25 Nov 2010 07:08:28 -0600
> > Subject: Re: [wp-hackers] meenews: obfuscated code
> > On Thu, Nov 25, 2010 at 4:08 AM, Iain Cambridge <wackiebackie at gmail.com
> > >wrote:
> >
> > >
> > > If you look at http://wordpress.org/extend/plugins/about/ You will see
> > > clause 5 of the requirements being if no license is specified it is
> > > GPLv2.
> > >
> > > Indeed it does say that, but that statement doesn't make it so.
> >
> > Only the *copyright holder* can specify the license of a copyrighted
> work.
> > So, if no license is specified, then *there is no license*.
> >
> > (It's the reason that Themes submitted for inclusion in the Theme
> > Repository
> > are required to declare their license.)
> >
> > Chip
> >
> >
> >
> > ---------- Forwarded message ----------
> > From: Iain Cambridge <wackiebackie at gmail.com>
> > To: wp-hackers at lists.automattic.com
> > Date: Thu, 25 Nov 2010 13:41:15 +0000
> > Subject: Re: [wp-hackers] meenews: obfuscated code
> > Not being a lawyer I am not sure and high chance I am very wrong. But
> > aren't those requirements like a legal requirement for using it and by
> > using the svn hosting you have subsequently agreed to there for that
> > clause would affected the licensing of and copyrighting of public
> > domain items such the plugin previously discussed? If not then can
> > that clause be removed to remove confusion?
> >
> > Iain
> >
> >
> > On Thu, Nov 25, 2010 at 1:08 PM, Chip Bennett <chip at chipbennett.net>
> > wrote:
> > > On Thu, Nov 25, 2010 at 4:08 AM, Iain Cambridge <
> wackiebackie at gmail.com
> > >wrote:
> > >
> > >>
> > >> If you look at http://wordpress.org/extend/plugins/about/ You will
> see
> > >> clause 5 of the requirements being if no license is specified it is
> > >> GPLv2.
> > >>
> > >> Indeed it does say that, but that statement doesn't make it so.
> > >
> > > Only the *copyright holder* can specify the license of a copyrighted
> > work.
> > > So, if no license is specified, then *there is no license*.
> > >
> > > (It's the reason that Themes submitted for inclusion in the Theme
> > Repository
> > > are required to declare their license.)
> > >
> > > Chip
> > > _______________________________________________
> > > wp-hackers mailing list
> > > wp-hackers at lists.automattic.com
> > > http://lists.automattic.com/mailman/listinfo/wp-hackers
> > >
> >
> >
> >
> > ---------- Forwarded message ----------
> > From: Chip Bennett <chip at chipbennett.net>
> > To: wp-hackers at lists.automattic.com
> > Date: Thu, 25 Nov 2010 07:56:53 -0600
> > Subject: Re: [wp-hackers] meenews: obfuscated code
> > That statement isn't legally binding.
> >
> > The most obvious reason is the utter lack of
> > privity<http://en.wikipedia.org/wiki/Privity>.
> > For example, that statement is found
> > here<http://wordpress.org/extend/plugins/about/>,
> > but the request for SVN access is on a completely different
> > page<http://wordpress.org/extend/plugins/add/>.
> > I suppose there must be a legally binding way for WPORG to claim a
> > non-exclusive right to distribute all repository-hosted code under GPL
> > (which is essentially what they are attempting to claim with that
> > statement), but the current setup certainly doesn't suffice.
> >
> > Chip
> >
> > On Thu, Nov 25, 2010 at 7:41 AM, Iain Cambridge <wackiebackie at gmail.com
> > >wrote:
> >
> > > Not being a lawyer I am not sure and high chance I am very wrong. But
> > > aren't those requirements like a legal requirement for using it and by
> > > using the svn hosting you have subsequently agreed to there for that
> > > clause would affected the licensing of and copyrighting of public
> > > domain items such the plugin previously discussed? If not then can
> > > that clause be removed to remove confusion?
> > >
> > > Iain
> > >
> > >
> > > On Thu, Nov 25, 2010 at 1:08 PM, Chip Bennett <chip at chipbennett.net>
> > > wrote:
> > > > On Thu, Nov 25, 2010 at 4:08 AM, Iain Cambridge <
> > wackiebackie at gmail.com
> > > >wrote:
> > > >
> > > >>
> > > >> If you look at http://wordpress.org/extend/plugins/about/ You will
> > see
> > > >> clause 5 of the requirements being if no license is specified it is
> > > >> GPLv2.
> > > >>
> > > >> Indeed it does say that, but that statement doesn't make it so.
> > > >
> > > > Only the *copyright holder* can specify the license of a copyrighted
> > > work.
> > > > So, if no license is specified, then *there is no license*.
> > > >
> > > > (It's the reason that Themes submitted for inclusion in the Theme
> > > Repository
> > > > are required to declare their license.)
> > > >
> > > > Chip
> > > > _______________________________________________
> > > > 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
> > >
> >
> >
> >
> > ---------- Forwarded message ----------
> > From: Otto <otto at ottodestruct.com>
> > To: wp-hackers at lists.automattic.com
> > Date: Thu, 25 Nov 2010 07:56:21 -0600
> > Subject: Re: [wp-hackers] meenews: obfuscated code
> > On Thu, Nov 25, 2010 at 7:08 AM, Chip Bennett <chip at chipbennett.net>
> > wrote:
> > >> If you look at http://wordpress.org/extend/plugins/about/ You will
> see
> > >> clause 5 of the requirements being if no license is specified it is
> > >> GPLv2.
> > >>
> > >> Indeed it does say that, but that statement doesn't make it so.
> > >
> > > Only the *copyright holder* can specify the license of a copyrighted
> > work.
> > > So, if no license is specified, then *there is no license*.
> >
> > The copyright holder did specify the license. They did it by uploading
> > it to the repository without an explicit license attached.
> >
> > The plugin is assumed to be GPLv2 when it lacks a specific
> > declaration. This is because the author (and copyright holder) of the
> > plugin took affirmative action to not only submit it for inclusion but
> > also to upload it to the repository using SVN. Given that the
> > requirements are known, this action makes it implicitly  licensed, and
> > as it states on http://wordpress.org/extend/plugins/about/, the lack
> > of a stated license makes it GPLv2.
> >
> > You *can* declare a license on a work through an implicit action. You
> > do not need to specify it outright. Look at the Terms and Conditions
> > for many different sites, for example. Usually they contain a clause
> > to the effect of "you grant us a perpetual, non-revocable, license to
> > publish any material you submit to the service in whatever media we
> > choose" or similar. This is a *license*, and by using the service, you
> > agree to the terms. Yes, you retain copyright to your work, but the
> > act of submitting it somewhere can indeed put a license on it.
> >
> > We require explicit licensing in the themes directory not because it's
> > necessary, but because we want to make theme authors aware of
> > licensing and what it means.
> >
> >
> > BTW, the plugin in question is not obfuscated, that's just newline
> idiocy.
> >
> > -Otto
> >
> >
> >
> > ---------- Forwarded message ----------
> > From: Otto <otto at ottodestruct.com>
> > To: wp-hackers at lists.automattic.com
> > Date: Thu, 25 Nov 2010 08:00:26 -0600
> > Subject: Re: [wp-hackers] meenews: obfuscated code
> > On Thu, Nov 25, 2010 at 7:56 AM, Chip Bennett <chip at chipbennett.net>
> > wrote:
> > > That statement isn't legally binding.
> >
> > I'm sorry, but I disagree. Consult a quality copyright lawyer.
> >
> > > The most obvious reason is the utter lack of
> > > privity<http://en.wikipedia.org/wiki/Privity>.
> > > For example, that statement is found
> > > here<http://wordpress.org/extend/plugins/about/>,
> > > but the request for SVN access is on a completely different
> > > page<http://wordpress.org/extend/plugins/add/>.
> >
> > Meaningless. Sites all over the web have their terms and conditions of
> > use on separate pages.
> >
> > > I suppose there must be a legally binding way for WPORG to claim a
> > > non-exclusive right to distribute all repository-hosted code under GPL
> > > (which is essentially what they are attempting to claim with that
> > > statement), but the current setup certainly doesn't suffice.
> >
> > Thank you for your opinion, however, I must point out that this is
> > only your opinion. Until it's backed up by a legal authority, it's
> > meaningless. Mine too, I will add. ;)
> >
> > -Otto
> >
> >
> >
> > ---------- Forwarded message ----------
> > From: Chip Bennett <chip at chipbennett.net>
> > To: wp-hackers at lists.automattic.com
> > Date: Thu, 25 Nov 2010 08:24:33 -0600
> > Subject: Re: [wp-hackers] meenews: obfuscated code
> > On Thu, Nov 25, 2010 at 7:56 AM, Otto <otto at ottodestruct.com> wrote:
> >
> > > On Thu, Nov 25, 2010 at 7:08 AM, Chip Bennett <chip at chipbennett.net>
> > > wrote:
> > > >> If you look at http://wordpress.org/extend/plugins/about/ You will
> > see
> > > >> clause 5 of the requirements being if no license is specified it is
> > > >> GPLv2.
> > > >>
> > > >> Indeed it does say that, but that statement doesn't make it so.
> > > >
> > > > Only the *copyright holder* can specify the license of a copyrighted
> > > work.
> > > > So, if no license is specified, then *there is no license*.
> > >
> > > The copyright holder did specify the license. They did it by uploading
> > > it to the repository without an explicit license attached.
> > >
> >
> > No. The failure to specify the license is what causes WPORG to *claim*
> > certain rights, primarily, the right to redistribute the code under the
> > terms of GPLv2.
> >
> > If the copyright holder, for whatever reason, disagreed with that claim,
> he
> > could very easily get a court to rule in his favor. (Not that it would
> > matter; to my knowledge, if such a person were to request to WPORG that
> the
> > code be removed from SVN entirely, that request would be granted,
> anyway.)
> >
> > >
> > > The plugin is assumed to be GPLv2 when it lacks a specific
> > > declaration. This is because the author (and copyright holder) of the
> > > plugin took affirmative action to not only submit it for inclusion but
> > > also to upload it to the repository using SVN. Given that the
> > > requirements are known, this action makes it implicitly  licensed, and
> > > as it states on http://wordpress.org/extend/plugins/about/, the lack
> > > of a stated license makes it GPLv2.
> > >
> >
> > But *assuming* a license is not the same as being *granted* that license.
> >
> > You likewise cannot *assume* that "the requirements are known" to the
> > copyright holder - especially for the reason that I pointed out already.
> > The
> > SVN request page *does not include the requirements*, and does not
> require
> > any affirmative action on the part of the copyright holder that
> submitting
> > that form is in any way tied to acceptance of the "requirements".
> Likewise
> > for SVN-commit access.
> >
> > There's nothing legally binding in any of this.
> >
> > I'm not saying that it *couldn't* be done in a legally-binding way (in
> > fact,
> > I'm sure it can - and in fact, I think it *should* be). I'm just saying
> > that
> > the way it's implemented currently, it's not legally binding.
> >
> > >
> > > You *can* declare a license on a work through an implicit action. You
> > > do not need to specify it outright. Look at the Terms and Conditions
> > > for many different sites, for example. Usually they contain a clause
> > > to the effect of "you grant us a perpetual, non-revocable, license to
> > > publish any material you submit to the service in whatever media we
> > > choose" or similar. This is a *license*, and by using the service, you
> > > agree to the terms. Yes, you retain copyright to your work, but the
> > > act of submitting it somewhere can indeed put a license on it.
> > >
> >
> > Indeed such sites exist, with such terms and conditions. But they do so
> in
> > a
> > way that is entirely different from what WPORG does with Plugins. WPORG
> > doesn't even contain even a semblance of the above-stated clause. WPORG
> > doesn't claim that the site has a particular license, it claims that the
> > copyrighted code is "explicitly" a certain license.
> >
> > >
> > > We require explicit licensing in the themes directory not because it's
> > > necessary, but because we want to make theme authors aware of
> > > licensing and what it means.
> > >
> > > And because it ensures that the end user knows the license under which
> he
> > has rights for the Theme.
> >
> > But, I would treat explicit licensing of third-party code as a necessity.
> > It
> > is beneficial to copyright holders and end users alike, because it
> > eliminates the possibility of ambiguity or confusion for all parties.
> >
> > Chip
> >
> >
> >
> > ---------- Forwarded message ----------
> > From: Chip Bennett <chip at chipbennett.net>
> > To: wp-hackers at lists.automattic.com
> > Date: Thu, 25 Nov 2010 08:40:11 -0600
> > Subject: Re: [wp-hackers] meenews: obfuscated code
> > On Thu, Nov 25, 2010 at 8:00 AM, Otto <otto at ottodestruct.com> wrote:
> >
> > > On Thu, Nov 25, 2010 at 7:56 AM, Chip Bennett <chip at chipbennett.net>
> > > wrote:
> > > > That statement isn't legally binding.
> > >
> > > I'm sorry, but I disagree. Consult a quality copyright lawyer.
> > >
> >
> > What matters here is not so much *copyright* law, as it is *contract*
> law,
> > as the transaction between WPORG and the Plugin developer (copyright
> > holder)
> > is a *contractual* relationship. Thus, if there is no privity, there is
> no
> > contract. And with no contract, nothing that WPORG claims is legally
> > binding.
> >
> > >
> > > > The most obvious reason is the utter lack of
> > > > privity<http://en.wikipedia.org/wiki/Privity>.
> > > > For example, that statement is found
> > > > here<http://wordpress.org/extend/plugins/about/>,
> > > > but the request for SVN access is on a completely different
> > > > page<http://wordpress.org/extend/plugins/add/>.
> > >
> > > Meaningless. Sites all over the web have their terms and conditions of
> > > use on separate pages.
> > >
> >
> > Yes, and none of them is analogous to Plugin submission to WPORG.
> >
> > >
> > > > I suppose there must be a legally binding way for WPORG to claim a
> > > > non-exclusive right to distribute all repository-hosted code under
> GPL
> > > > (which is essentially what they are attempting to claim with that
> > > > statement), but the current setup certainly doesn't suffice.
> > >
> > > Thank you for your opinion, however, I must point out that this is
> > > only your opinion. Until it's backed up by a legal authority, it's
> > > meaningless. Mine too, I will add. ;)
> > >
> >
> > Of course, if you stepped back, and took the time to realize that our
> > objective here is the same (ensuring that WPORG has a legally enforceable
> > right to distribute repository-hosted code under a GPL-compatible
> license),
> > perhaps you would be less dismissive about my point.
> >
> > At the most basic level, I've pointed out that a Plugin developer can get
> > to
> > the Plugin upload page directly
> > <http://wordpress.org/extend/plugins/add/>(i.e. without ever
> > navigating to/through the page that includes the
> > "requirements" and the license claim). Once SVN-commit access is granted,
> > connecting to SVN does not include any statement or verification
> regarding
> > acceptance of any terms or conditions.
> >
> > Thus, *WPORG cannot prove* that a Plugin developer has read, understood,
> or
> > agreed to the stated "requirements" or license claim. If that cannot be
> > proven, then privity has not been established. Without privity, the
> > contract
> > is invalid. And without a valid contract, the "requirements" and license
> > claim are not legally binding.
> >
> > Now, IANAL, so I couldn't say with any certainty what *would* meet the
> > legal
> > standard. I'm pretty sure that what would qualify in the US very possibly
> > would *not* qualify in the EU (which, IIRC, does not look too kindly on
> > "click-through" license agreements).
> >
> > But, at least add a "I have read and agreed to the Terms and Conditions"
> > checkbox to the Plugin add-request form. If SVN allows for a MOD, add a
> > message that says something like "by committing code to the WPORG SVN,
> you
> > indicate your acceptance of the Terms and Conditions here: [url]"
> >
> > But just putting the statement "If you don’t specify a v2-compatible
> > license, what you check in is explicitly GPLv2." (which is semantically
> > incorrect to begin with; it should say "implicitly" rather than
> > "explicitly") on an arbitrary page on the WPORG site doesn't cut it.
> >
> > Chip
> >
> >
> >
> > ---------- Forwarded message ----------
> > From: Haluk Karamete <halukkaramete at gmail.com>
> > To: wp-hackers at lists.automattic.com
> > Date: Thu, 25 Nov 2010 07:34:34 -0800
> > Subject: Re: [wp-hackers] <!DOCTYPE html>
> > The reason I got into this was to leverage my asp programming skills
> > right into wordpress/php realm. I know it is long shot but when all
> > you get is a hammer, everything looks like a nail.
> >
> > When writing a post, right within the WYSIWYG editor, I go <script
> > src='/library/runasp.js'></script><script
> > runasp("/myasppage.asp","")</script>
> >
> > And then boom, when you look at the post, right where I mentioned
> > runasp("/myASPpage.asp",""), i get an iframe with no scroll bars
> > regardless of how short or tall the output coming from that asp page,
> > basically a perfectly sized iframe. Since there are no borders and
> > scroll bars, I can do whatever I want to do in the myasp.asp page and
> > the reader won't know a difference. That's a very convenient trick for
> > me to get going.
> >
> > Of course, this trick has nothing to do with ASP per se. This is a
> > general iframe resizing matter which opens up some wordpress
> > hack/extension possibilities for the rest of us. When I do <script
> > runasp("/myPHPpage.php","")</script> or <script
> > runasp("/myHTMpage.htm","")</script>, the code still works, regardless
> > of how many times I use the trick within a given post.
> >
> > It's a shame IE spoils the whole experience.
> >
> > I think some of the js calls I use do not work with IE properly.
> >
> >
> >
> >
> > On Wed, Nov 24, 2010 at 10:06 PM, Ryan McCue <lists at rotorised.com>
> wrote:
> > > Haluk Karamete wrote:
> > >> The 2010's header.php has this ( <!DOCTYPE html> ) as the first thing.
> > >>
> > >> If I remove this or comment it out, what are the harms? How important
> > >> is it to keep it?
> > >
> > > This is more a HTML question than a WordPress question, as it's
> > > independent of WordPress.
> > >
> > > That said, having a DOCTYPE in the document forces the browser into
> > > standards mode. Without this, the browser will render in quirks mode,
> > > which for IE is the equivalent of IE 5.5.
> > >
> > > Most likely, your problem could be solved in a different way (using the
> > > aforementioned html5shiv, or IE9.js), enabling you to keep standards
> > mode.
> > >
> > > --
> > > Ryan McCue
> > > <http://ryanmccue.info/>
> > >
> > > _______________________________________________
> > > 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