[wp-hackers] Twenty Ten Theme tag

Chip Bennett chip at chipbennett.net
Fri Nov 11 14:54:53 UTC 2011


Otto,

It's the twentyten_posted_on() output:
http://themes.svn.wordpress.org/twentyten/1.1/functions.php

e.g.

function twentyten_posted_on() {

	printf( __( '<span class="%1$s">Posted on</span> %2$s <span
class="meta-sep">by</span> %3$s', 'twentyten' ),

		'meta-prep meta-prep-author',

		sprintf( '<a href="%1$s" title="%2$s" rel="bookmark"><span
class="entry-date">%3$s</span></a>',

			get_permalink(),

			esc_attr( get_the_time() ),

			get_the_date()

		),

		sprintf( '<span class="author vcard"><a class="url fn n" href="%1$s"
title="%2$s">%3$s</a></span>',

			get_author_posts_url( get_the_author_meta( 'ID' ) ),

			sprintf( esc_attr__( 'View all posts by %s', 'twentyten' ),
get_the_author() ),

			get_the_author()

		)

	);

}

The anchor text shows the date, but the anchor title attribute shows the
time.

Chip


On Fri, Nov 11, 2011 at 8:45 AM, Otto <otto at ottodestruct.com> wrote:

> I'm sorry, I don't understand what you're talking about. In twenty
> ten, the title has the title as the title. :)
>
> Here's the code:
>
> <h2 class="entry-title"><a href="<?php the_permalink(); ?>"
> title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ),
> the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php
> the_title(); ?></a></h2>
>
> No time there at all.
>
> -Otto
>
>
>
> On Fri, Nov 11, 2011 at 9:14 AM, Diana K. Cury <dianakac at gmail.com> wrote:
> > That is true, but why the post title has time (i.e 16:12) as title in
> > postmeta?!
> >
> > When testing the schema in google tools, I can see the weirdness, the rel
> > content in feed was showing the time and the title was missing. Once I
> > changed that, everything worked out.
> >
> > The time should point to some date/time I think, doesnt make sense to me
> use
> > it in post link in postmeta.
> >
> >
> > ----- Original Message ----- From: "Otto" <otto at ottodestruct.com>
> > To: <wp-hackers at lists.automattic.com>
> > Sent: Friday, November 11, 2011 10:25 AM
> > Subject: Re: [wp-hackers] Twenty Ten Theme tag
> >
> >
> >> The title of a link should reflect the content of that link, not the
> >> location it links to. In this case, since it's surrounding the_date,
> >> then use of the_time to have the post time in a different format makes
> >> sense.
> >>
> >> Screen readers for the blind use the title attributes in some cases,
> >> so they should always relate to the content of the link itself.
> >>
> >> -Otto
> >>
> >>
> >>
> >> On Thu, Nov 10, 2011 at 10:00 PM, Diana K. Cury <dianakac at gmail.com>
> >> wrote:
> >>>
> >>> I was battling for implement microdata/scheme in a child theme then I
> >>> found that when gererating the "Posted on" (a function in Twenty Ten),
> the
> >>> link title is... the time?! Why not the post title?
> >>>
> >>> I even tried to set the title, but it doesn't work ?!
> >>> _______________________________________________
> >>> 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