Opened 10 years ago

Closed 4 years ago

#659 closed enhancement (reported-upstream)

Add Website and Twitter fields to Speakers post type / shortcode

Reported by: iandunn's profile iandunn Owned by:
Milestone: Priority: low
Component: WordCamp Site & Plugins Keywords: good-first-bug needs-patch


It'd be good to provide attendees with more information about speakers, by adding links to their website and Twitter profile when displaying their bio via the [speakers] shortcode.

We should add input fields for each to the Speaker post type, and then display the links underneath the bio if they exist. e.g.,

Jane Doe

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin finibus hendrerit lacus, elementum pharetra velit aliquet non. Donec auctor lacus quis lectus aliquet tincidunt. Ut nisl nisl, pretium in mauris in, congue tincidunt elit. Cras hendrerit, arcu sit amet aliquet aliquet, eros metus ultrices mi.

Website | Twitter

Attachments (1)

659.diff (6.7 KB) - added by BrashRebel 10 years ago.
Changes made to wc-post-types.php plugin for WordCamp sites.

Download all attachments as: .zip

Change History (9)

10 years ago

Changes made to wc-post-types.php plugin for WordCamp sites.

#1 follow-up: @BrashRebel
10 years ago

  • Cc kyle@… added
  • Keywords has-patch dev-feedback added

Added in two new fields in the speaker info meta box. Then added show_links to $attr and output the two new links in the shortcode.

I'm wondering if this could be enhanced and simplified by retrieving the website and Twitter links from the user's .org profile. Would that be a good idea?

#2 in reply to: ↑ 1 @iandunn
10 years ago

Replying to BrashRebel:

I'm wondering if this could be enhanced and simplified by retrieving the website and Twitter links from the user's .org profile. Would that be a good idea?

That's a really good idea. One potential drawback is that some speakers will have multiple websites or Twitter accounts, and might want the flexibility to feature a different one for different camps.

That's probably an edge case, though, and wouldn't outweigh the benefit of organizer's not having to manually ask for and enter data that we can grab automatically. It will also probably increase the number of speaker posts that actually have data, since we won't be relying on speakers and organizers to do extra work.

So, lets remove the fields and grab the data automatically, then cache it. It should be pulled whenever the username on the post changes, and also when the cache is older than 24 hours.

The best way to handle the cache is to always display the cached data, even if it's stale. We don't want to slow down the page load waiting on a remote service. If it is stale, though, we should kick off an asynchronous request for new data, and then update the cached value if that request succeeds. The updated value will then be available for the next page load.

#3 @iandunn
10 years ago

Oh, I forgot to mention, doesn't collect Twitter usernames, it just pulls them from Gravatar's API, so that's why we'll need a remote request.

The other sticking point is that the URL stored in the account is the value from the profile, not the profile. Ideally we want to use the value, since profiles will be going away eventually (see #518). doesn't have an API to pull user data. could query the Profiles database to get the info, but that wouldn't work on sandboxes, so I tempted to just say let's use the account value, and it'll eventually be synced w/ Profiles once the support profiles are decommissioned.

#4 @iandunn
9 years ago

  • Keywords needs-patch added; has-patch dev-feedback removed

#5 @iandunn
8 years ago

  • Owner set to iandunn
  • Status changed from new to accepted

#6 @iandunn
7 years ago

  • Owner iandunn deleted
  • Status changed from accepted to assigned

This ticket was mentioned in Slack in #meta-wordcamp by iandunn. View the logs.

4 years ago

#8 @dd32
4 years ago

  • Resolution set to reported-upstream
  • Status changed from assigned to closed

This ticket has been moved to GitHub

Note: See TracTickets for help on using tickets.