[wp-hackers] Showing users post counts for custom post types
Jared Williams
jaredwilli at gmail.com
Sun Oct 24 04:25:14 UTC 2010
Hi,
I'm trying to figure out how to hook into the users.php manage page to
create custom columns for showing the number of posts users have for my
custom post types. I created a trac
ticket<http://core.trac.wordpress.org/ticket/15200>for this, but
@nacin explained why it's a job more for a plugin to do
instead, so I turned here.
I have been unable to find a way to manipulate the output of the users
table, so I can add custom columns for CPTs post counts for each user. And
that may have something to do with the question @nacin asked, what would the
post count numbers link to. For the current 'post' post count a user has, it
links to the post manage page, showing all posts for that user
(edit.php?author=ID#).
If I were to link it somewhere, it would be to
'edit.php?post_type=TYPE&author=ID' if that were even somehow possible I
guess. But I don't even necessarily need to link it to anywhere. I mostly
want to just show CPT post counts for each person, having 600 users and a
combined total of 300+ posts across 4 custom post types. Admins are only one
who can submit 'post' posts, so that column in the users page is useless.
Anyone have any tips on hooking into that to do this?
Thanks,
Jared
On Sat, Oct 23, 2010 at 8:51 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: save_post action done twice (Andrew Nacin)
> 2. Re: "The Matrix Has You" easter egg (Chris Williams)
> 3. Re: "The Matrix Has You" easter egg (Vid Luther)
> 4. Re: "The Matrix Has You" easter egg (Ryan Bilesky)
> 5. Re: "The Matrix Has You" easter egg (Alex Hempton-Smith)
> 6. Re: "The Matrix Has You" easter egg (Ryan Bilesky)
> 7. Re: "The Matrix Has You" easter egg (Mike Schinkel)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Sat, 23 Oct 2010 10:51:20 -0400
> From: Andrew Nacin <wp at andrewnacin.com>
> Subject: Re: [wp-hackers] save_post action done twice
> To: wp-hackers at lists.automattic.com
> Message-ID:
> <AANLkTik+dQDM6S+TtSWZ_YUmcFm9DxoTndT82015N3Cv at mail.gmail.com<AANLkTik%2BdQDM6S%2BTtSWZ_YUmcFm9DxoTndT82015N3Cv at mail.gmail.com>
> >
> Content-Type: text/plain; charset=ISO-8859-1
>
> On Fri, Oct 22, 2010 at 11:41 PM, John Blackbourn
> <johnbillion+wp at gmail.com <johnbillion%2Bwp at gmail.com><
> johnbillion%2Bwp at gmail.com <johnbillion%252Bwp at gmail.com>>
> > wrote:
>
> > Two handy functions for this scenario:
> >
> > wp_is_post_revision( $post_id ) and wp_is_post_autosave( $post_id ).
>
>
> I think save_post also gets triggered when we create an auto-draft while
> loading up post-new.php.
>
>
> ------------------------------
>
> Message: 2
> Date: Sat, 23 Oct 2010 12:43:33 -0400
> From: Chris Williams <chris at clwill.com>
> Subject: Re: [wp-hackers] "The Matrix Has You" easter egg
> To: "wp-hackers at lists.automattic.com"
> <wp-hackers at lists.automattic.com>
> Message-ID: <C8E85EC5.14B0F%chris at clwill.com<C8E85EC5.14B0F%25chris at clwill.com>
> >
> Content-Type: text/plain; charset="iso-8859-1"
>
> Thanks to the incredible evangelism of WP a relatively new and
> inexperienced web master sets up a WP blog. It has the "famous 5-minute
> install". Couldn't be easier.
>
> Then as we saw with the OP, he or one of his users stumbles upon a rather
> frightening easter egg, and he/they become alarmed that they've been hacked.
> WP's reputation as a reliable and easy platform is sullied as they spend
> time searching the internet to find a resolution. Only to find that it was
> "a joke", installed as part of the program from the original bona fide
> sources.
>
> Your solution is to suggest they write javascript to disable this? Really?
> How was this person to know about this risk in the first place? How many
> more potentially scary and alarming easter eggs do you expect them to
> magically know about and prevent? What level of Computer Science expertise
> is required to manage a WP install, beyond the "5-minute install"? And
> isn't your solution like locking the barn door after the horse is gone?
>
> ________________________________
> From: Ryan Bilesky <rbilesky at gmail.com>
> Subject: Re: [wp-hackers] "The Matrix Has You" easter egg
>
> If you don't like the easter egg use javascript to prevent both radio
> buttons for any given revision from being selected at the same time.
> Problem solved.
>
>
>
>
> ------------------------------
>
> Message: 3
> Date: Sat, 23 Oct 2010 13:18:30 -0400
> From: Vid Luther <vid at zippykid.com>
> Subject: Re: [wp-hackers] "The Matrix Has You" easter egg
> To: "wp-hackers at lists.automattic.com"
> <wp-hackers at lists.automattic.com>
> Message-ID: <8586410596422950376 at unknownmsgid>
> Content-Type: text/plain; charset=UTF-8
>
> +1
>
> Sent from my iPhone
>
> On Oct 23, 2010, at 12:43 PM, Chris Williams <chris at clwill.com> wrote:
>
> > Thanks to the incredible evangelism of WP a relatively new and
> inexperienced web master sets up a WP blog. It has the "famous 5-minute
> install". Couldn't be easier.
> >
> > Then as we saw with the OP, he or one of his users stumbles upon a rather
> frightening easter egg, and he/they become alarmed that they've been hacked.
> WP's reputation as a reliable and easy platform is sullied as they spend
> time searching the internet to find a resolution. Only to find that it was
> "a joke", installed as part of the program from the original bona fide
> sources.
> >
> > Your solution is to suggest they write javascript to disable this?
> Really? How was this person to know about this risk in the first place?
> How many more potentially scary and alarming easter eggs do you expect them
> to magically know about and prevent? What level of Computer Science
> expertise is required to manage a WP install, beyond the "5-minute install"?
> And isn't your solution like locking the barn door after the horse is gone?
> >
> > ________________________________
> > From: Ryan Bilesky <rbilesky at gmail.com>
> > Subject: Re: [wp-hackers] "The Matrix Has You" easter egg
> >
> > If you don't like the easter egg use javascript to prevent both radio
> > buttons for any given revision from being selected at the same time.
> > Problem solved.
> >
> >
> > _______________________________________________
> > wp-hackers mailing list
> > wp-hackers at lists.automattic.com
> > http://lists.automattic.com/mailman/listinfo/wp-hackers
>
>
> ------------------------------
>
> Message: 4
> Date: Sat, 23 Oct 2010 12:43:52 -0700
> From: Ryan Bilesky <rbilesky at gmail.com>
> Subject: Re: [wp-hackers] "The Matrix Has You" easter egg
> To: wp-hackers at lists.automattic.com
> Message-ID:
> <AANLkTi=YNF3MJhE+QCHVqtqJSh0MTzRhdV9ginfszvEr at mail.gmail.com<YNF3MJhE%2BQCHVqtqJSh0MTzRhdV9ginfszvEr at mail.gmail.com>
> >
> Content-Type: text/plain; charset=ISO-8859-1
>
> calling it a "frightening easter egg" is a bit overkill, i mean its just
> plain overkill. The point of the idea is this, if you manage WP installs
> for someone, you can add the javascript so they won't ever see it. IMO
> anyone who is able to install and manage WP by there own should have no
> problem with that, it would only cause a problem maybe for some horribly
> non-technical person, like my parents. In which case there is probably
> someone with some technical ability who runs the site handles upgrades,
> ect.
>
> Plus the javascript can be added in via a plugin so really if someone
> writes
> the plugin its a simple as installing a plugin.
>
> On Sat, Oct 23, 2010 at 9:43 AM, Chris Williams <chris at clwill.com> wrote:
>
> > Thanks to the incredible evangelism of WP a relatively new and
> > inexperienced web master sets up a WP blog. It has the "famous 5-minute
> > install". Couldn't be easier.
> >
> > Then as we saw with the OP, he or one of his users stumbles upon a rather
> > frightening easter egg, and he/they become alarmed that they've been
> hacked.
> > WP's reputation as a reliable and easy platform is sullied as they spend
> > time searching the internet to find a resolution. Only to find that it
> was
> > "a joke", installed as part of the program from the original bona fide
> > sources.
> >
> > Your solution is to suggest they write javascript to disable this?
> Really?
> > How was this person to know about this risk in the first place? How
> many
> > more potentially scary and alarming easter eggs do you expect them to
> > magically know about and prevent? What level of Computer Science
> expertise
> > is required to manage a WP install, beyond the "5-minute install"? And
> > isn't your solution like locking the barn door after the horse is gone?
> >
> > ________________________________
> > From: Ryan Bilesky <rbilesky at gmail.com>
> > Subject: Re: [wp-hackers] "The Matrix Has You" easter egg
> >
> > If you don't like the easter egg use javascript to prevent both radio
> > buttons for any given revision from being selected at the same time.
> > Problem solved.
> >
> >
> > _______________________________________________
> > wp-hackers mailing list
> > wp-hackers at lists.automattic.com
> > http://lists.automattic.com/mailman/listinfo/wp-hackers
> >
>
>
> ------------------------------
>
> Message: 5
> Date: Sat, 23 Oct 2010 21:48:41 +0200
> From: Alex Hempton-Smith <hempsworth at gmail.com>
> Subject: Re: [wp-hackers] "The Matrix Has You" easter egg
> To: wp-hackers at lists.automattic.com
> Message-ID:
> <AANLkTins4+oXj=vX+gW-KeQ8pvxniB2_jYHCUN3neB5W at mail.gmail.com<vX%2BgW-KeQ8pvxniB2_jYHCUN3neB5W at mail.gmail.com>
> >
> Content-Type: text/plain; charset=ISO-8859-1
>
> Many people use control panels with their hosts that give one-click
> installs. It's also present on wordpress.com.
>
> -- Alex
>
>
> On Sat, Oct 23, 2010 at 9:43 PM, Ryan Bilesky <rbilesky at gmail.com> wrote:
>
> > calling it a "frightening easter egg" is a bit overkill, i mean its just
> > plain overkill. The point of the idea is this, if you manage WP installs
> > for someone, you can add the javascript so they won't ever see it. IMO
> > anyone who is able to install and manage WP by there own should have no
> > problem with that, it would only cause a problem maybe for some horribly
> > non-technical person, like my parents. In which case there is probably
> > someone with some technical ability who runs the site handles upgrades,
> > ect.
> >
> > Plus the javascript can be added in via a plugin so really if someone
> > writes
> > the plugin its a simple as installing a plugin.
> >
> > On Sat, Oct 23, 2010 at 9:43 AM, Chris Williams <chris at clwill.com>
> wrote:
> >
> > > Thanks to the incredible evangelism of WP a relatively new and
> > > inexperienced web master sets up a WP blog. It has the "famous
> 5-minute
> > > install". Couldn't be easier.
> > >
> > > Then as we saw with the OP, he or one of his users stumbles upon a
> rather
> > > frightening easter egg, and he/they become alarmed that they've been
> > hacked.
> > > WP's reputation as a reliable and easy platform is sullied as they
> spend
> > > time searching the internet to find a resolution. Only to find that it
> > was
> > > "a joke", installed as part of the program from the original bona fide
> > > sources.
> > >
> > > Your solution is to suggest they write javascript to disable this?
> > Really?
> > > How was this person to know about this risk in the first place? How
> > many
> > > more potentially scary and alarming easter eggs do you expect them to
> > > magically know about and prevent? What level of Computer Science
> > expertise
> > > is required to manage a WP install, beyond the "5-minute install"? And
> > > isn't your solution like locking the barn door after the horse is gone?
> > >
> > > ________________________________
> > > From: Ryan Bilesky <rbilesky at gmail.com>
> > > Subject: Re: [wp-hackers] "The Matrix Has You" easter egg
> > >
> > > If you don't like the easter egg use javascript to prevent both radio
> > > buttons for any given revision from being selected at the same time.
> > > Problem solved.
> > >
> > >
> > > _______________________________________________
> > > 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
> >
>
>
> ------------------------------
>
> Message: 6
> Date: Sat, 23 Oct 2010 14:29:37 -0700
> From: Ryan Bilesky <rbilesky at gmail.com>
> Subject: Re: [wp-hackers] "The Matrix Has You" easter egg
> To: wp-hackers at lists.automattic.com
> Message-ID:
> <AANLkTinnocvq3dU2SznLqU=aLC4k2R=GYBDVRJ8gfshP at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> I wold imagine it is a small group of people who would be confused or even
> scared by it, and those people probably aren't those who host their own
> website, they are the people who would hire a developer to setup their
> website. Now, this is just an assumption but regardless i find the easter
> egg quite amusing and have trigger it on purpose even, and anything short
> of
> removing it or having it off by default would have the same affect my
> javascript suggestion would, an effect which I don't believe is much if
> any. And I don't foresee it going away.
>
> On Sat, Oct 23, 2010 at 12:48 PM, Alex Hempton-Smith
> <hempsworth at gmail.com>wrote:
>
> > Many people use control panels with their hosts that give one-click
> > installs. It's also present on wordpress.com.
> >
> > -- Alex
> >
> >
> > On Sat, Oct 23, 2010 at 9:43 PM, Ryan Bilesky <rbilesky at gmail.com>
> wrote:
> >
> > > calling it a "frightening easter egg" is a bit overkill, i mean its
> just
> > > plain overkill. The point of the idea is this, if you manage WP
> installs
> > > for someone, you can add the javascript so they won't ever see it. IMO
> > > anyone who is able to install and manage WP by there own should have no
> > > problem with that, it would only cause a problem maybe for some
> horribly
> > > non-technical person, like my parents. In which case there is probably
> > > someone with some technical ability who runs the site handles upgrades,
> > > ect.
> > >
> > > Plus the javascript can be added in via a plugin so really if someone
> > > writes
> > > the plugin its a simple as installing a plugin.
> > >
> > > On Sat, Oct 23, 2010 at 9:43 AM, Chris Williams <chris at clwill.com>
> > wrote:
> > >
> > > > Thanks to the incredible evangelism of WP a relatively new and
> > > > inexperienced web master sets up a WP blog. It has the "famous
> > 5-minute
> > > > install". Couldn't be easier.
> > > >
> > > > Then as we saw with the OP, he or one of his users stumbles upon a
> > rather
> > > > frightening easter egg, and he/they become alarmed that they've been
> > > hacked.
> > > > WP's reputation as a reliable and easy platform is sullied as they
> > spend
> > > > time searching the internet to find a resolution. Only to find that
> it
> > > was
> > > > "a joke", installed as part of the program from the original bona
> fide
> > > > sources.
> > > >
> > > > Your solution is to suggest they write javascript to disable this?
> > > Really?
> > > > How was this person to know about this risk in the first place? How
> > > many
> > > > more potentially scary and alarming easter eggs do you expect them to
> > > > magically know about and prevent? What level of Computer Science
> > > expertise
> > > > is required to manage a WP install, beyond the "5-minute install"?
> And
> > > > isn't your solution like locking the barn door after the horse is
> gone?
> > > >
> > > > ________________________________
> > > > From: Ryan Bilesky <rbilesky at gmail.com>
> > > > Subject: Re: [wp-hackers] "The Matrix Has You" easter egg
> > > >
> > > > If you don't like the easter egg use javascript to prevent both radio
> > > > buttons for any given revision from being selected at the same time.
> > > > Problem solved.
> > > >
> > > >
> > > > _______________________________________________
> > > > 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
> >
>
>
> ------------------------------
>
> Message: 7
> Date: Sat, 23 Oct 2010 20:51:20 -0400
> From: Mike Schinkel <mikeschinkel at newclarity.net>
> Subject: Re: [wp-hackers] "The Matrix Has You" easter egg
> To: wp-hackers at lists.automattic.com
> Message-ID: <E084564A-308E-4906-AB5C-313979412BB2 at newclarity.net>
> Content-Type: text/plain; charset=us-ascii
>
> I'm thinking this thread does a good job of illustrating the "Curse of
> Knowledge":
>
> http://www.nytimes.com/2007/12/30/business/30know.html
>
> (link via Joel Spolsky)
>
> -Mike
>
> On Oct 23, 2010, at 5:29 PM, Ryan Bilesky wrote:
>
> > I wold imagine it is a small group of people who would be confused or
> even
> > scared by it, and those people probably aren't those who host their own
> > website, they are the people who would hire a developer to setup their
> > website. Now, this is just an assumption but regardless i find the
> easter
> > egg quite amusing and have trigger it on purpose even, and anything short
> of
> > removing it or having it off by default would have the same affect my
> > javascript suggestion would, an effect which I don't believe is much if
> > any. And I don't foresee it going away.
> >
> > On Sat, Oct 23, 2010 at 12:48 PM, Alex Hempton-Smith
> > <hempsworth at gmail.com>wrote:
> >
> >> Many people use control panels with their hosts that give one-click
> >> installs. It's also present on wordpress.com.
> >>
> >> -- Alex
> >>
> >>
> >> On Sat, Oct 23, 2010 at 9:43 PM, Ryan Bilesky <rbilesky at gmail.com>
> wrote:
> >>
> >>> calling it a "frightening easter egg" is a bit overkill, i mean its
> just
> >>> plain overkill. The point of the idea is this, if you manage WP
> installs
> >>> for someone, you can add the javascript so they won't ever see it. IMO
> >>> anyone who is able to install and manage WP by there own should have no
> >>> problem with that, it would only cause a problem maybe for some
> horribly
> >>> non-technical person, like my parents. In which case there is probably
> >>> someone with some technical ability who runs the site handles upgrades,
> >>> ect.
> >>>
> >>> Plus the javascript can be added in via a plugin so really if someone
> >>> writes
> >>> the plugin its a simple as installing a plugin.
> >>>
> >>> On Sat, Oct 23, 2010 at 9:43 AM, Chris Williams <chris at clwill.com>
> >> wrote:
> >>>
> >>>> Thanks to the incredible evangelism of WP a relatively new and
> >>>> inexperienced web master sets up a WP blog. It has the "famous
> >> 5-minute
> >>>> install". Couldn't be easier.
> >>>>
> >>>> Then as we saw with the OP, he or one of his users stumbles upon a
> >> rather
> >>>> frightening easter egg, and he/they become alarmed that they've been
> >>> hacked.
> >>>> WP's reputation as a reliable and easy platform is sullied as they
> >> spend
> >>>> time searching the internet to find a resolution. Only to find that
> it
> >>> was
> >>>> "a joke", installed as part of the program from the original bona fide
> >>>> sources.
> >>>>
> >>>> Your solution is to suggest they write javascript to disable this?
> >>> Really?
> >>>> How was this person to know about this risk in the first place? How
> >>> many
> >>>> more potentially scary and alarming easter eggs do you expect them to
> >>>> magically know about and prevent? What level of Computer Science
> >>> expertise
> >>>> is required to manage a WP install, beyond the "5-minute install"?
> And
> >>>> isn't your solution like locking the barn door after the horse is
> gone?
> >>>>
> >>>> ________________________________
> >>>> From: Ryan Bilesky <rbilesky at gmail.com>
> >>>> Subject: Re: [wp-hackers] "The Matrix Has You" easter egg
> >>>>
> >>>> If you don't like the easter egg use javascript to prevent both radio
> >>>> buttons for any given revision from being selected at the same time.
> >>>> Problem solved.
> >>>>
> >>>>
> >>>> _______________________________________________
> >>>> 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
>
>
> End of wp-hackers Digest, Vol 69, Issue 49
> ******************************************
>
--
Jared Williams
*Web Developer / Designer*
*WPHonors.com <http://2010.wphonors.com> - 2010 WPHonors
*New2WP.com <http://new2wp.com> - Development
Tweeaks.com - Design/Tech
More information about the wp-hackers
mailing list