-
Notifications
You must be signed in to change notification settings - Fork 4
Conversation
- Added fallbacks for when layout isn't present - Added helper functions for transcripts - Added support for collection elements - Added support for lists - Added intermediate support for slideshows -Added support for corrections
Improved speed on API Push mapping page - refined MySQL query - Added transient caching
Added slideshow support via splide
Small tweak to layout language
- Previously formatted as shortcode with info as JSON - Shortcode would then parse and enqueue style and scripts - Now just generates and saves inline
if ( isset( $_POST['publishNow'] ) ) { | ||
$publish = true; | ||
} | ||
if ( isset( $_POST['createDaft'] ) ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is 'createDaft' a typo? @jwcounts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do see that its in the original code however
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a typo in the variable name, but yeah, it's been there a while and is consistent. I decided not to mess with it. The text on the visible button that's connected to is correct, though.
AND $wpdb->postmeta.meta_key NOT RegExp '(^[0-9]+$)' | ||
"; | ||
//AND $wpdb->postmeta.meta_key NOT RegExp '(^[_0-9].+$)' | ||
$keys = $wpdb->get_col( $wpdb->prepare( $query, $post_type ) ); | ||
if ( $keys ) natcasesort( $keys ); | ||
|
||
//set_transient('ds_npr_' . $post_type .'_meta_keys', $keys, 60*60*24); # 1 Day Expiration | ||
set_transient( 'ds_npr_' . $post_type . '_meta_keys', $keys, 60*60*24 ); # 1 Day Expiration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jwcounts do you know why this transient setting was disabled/commented out previously? Are there consequences to re-enabling?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I can tell, we're the first people to touch this file in about 4 years. I'm assuming that it was commented out because transients were probably newer and less reliable.
As for consequences, I'm assuming that setting a transient without any kind of caching mechanism installed probably doesn't do anything, and getting a transient returns a blank (which is accepted behavior for an expired transient too).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was also glad to take a stab at that MySQL query, because those dropdowns were returning over 10k entries apiece. It took the page a good 45 seconds to load each time, and most of them were _oembed_
transients.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jwcounts Could you point out a couple of test case stories you used for the slideshow and rich media stuff? I want to replicate them in my environment, I'm particularly interested to see how the splide stuff works and make sure it will respond properly in my env.
Here's the ID for an article about Stephen Breyer's retirement: 1075781724 It's got the slideshow, inline photos, and a YouTube video. I haven't found many with slideshows, but I'll do some more searching. Others to check:
|
@jwcounts things are generally looking really good, but I think something that has changed is that transcripts were broken and now aren't. Can we add a div around that transcript? Maybe id = npr_transcript ? |
Good idea. I'll include that in a bit. |
Ok, other than the items (making transcripts and corrections css-addressible), this all looks really solid to me. Once those are added, this has my approval -- even more, I think these are great, particularly the slideshow handling! |
sry didn't mean to close |
Thanks! I've been very happy with the progress so far. |
CSS-addressible handling of correction text with localized display of…
Sounds like we can wrap this up. |
Fixed some bugs with the new get_body_with_layout() function, as well as incorporating transcripts where available. Also added some helper functions and a better fallback in case layout information isn't present.
Added support for displaying slideshows included in some NPR articles, using a library called Splide.
Finally, incorporated a bunch of feedback from the Wordpress Plugin Directory team, mostly around sanitizing and validating incoming data, and properly escaping outgoing data. Needed to do this in order to get the plugin approved and reopened in the plugin directory.