[wp-meta] [Making WordPress.org] #561: Allowing filtering of speakers by track
Making WordPress.org
noreply at wordpress.org
Fri Jul 18 16:13:03 UTC 2014
#561: Allowing filtering of speakers by track
--------------------------+--------------------------
Reporter: hlashbrooke | Owner:
Type: enhancement | Status: new
Priority: normal | Component: wordcamp.org
Resolution: | Keywords: has-patch
--------------------------+--------------------------
Comment (by iandunn):
Looks good :)
Instead of refreshing the transient via a URL parameter, I think we can do
it automatically with something like this:
{{{
#!php
add_action( 'save_post', array( $this,
'refresh_wordcamp_speaker_ids_transient' ), 10, 2 );
public function refresh_wordcamp_speaker_ids_transient( $post, $post_raw )
{
$relevant_post_types = array( 'wcb_speaker', 'wcb_session' );
if ( has_shortcode( 'speakers', $post ) || in_array(
$post->post_type, $relevant_post_types ) ) {
delete_transient( 'wordcamp_speaker_ids' );
}
}
}}}
What do you think?
Other than that, the only thing I'd mention is that we can use
`HOUR_IN_SECONDS` instead of `3600`, to make it a little more obvious.
Still waiting to hear back from Andrea, but I'll post an update when I do.
--
Ticket URL: <https://meta.trac.wordpress.org/ticket/561#comment:7>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org
More information about the wp-meta
mailing list