Feeds: Ensure that galleries can be output as a list of links in feeds.
Adjusts the gallery shortcode handler to check for the `link` attribute when outputting to a feed. Fixes #22101. Props ifrins, mdgl, SergeyBiryukov, chriscct7, stevenkword, iworks, DrewAPicture, birgire, whyisjake. Built from https://develop.svn.wordpress.org/trunk@48496 git-svn-id: http://core.svn.wordpress.org/trunk@48258 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a53b741359
commit
69aaab5108
|
@ -2250,7 +2250,16 @@ function gallery_shortcode( $attr ) {
|
|||
if ( is_feed() ) {
|
||||
$output = "\n";
|
||||
foreach ( $attachments as $att_id => $attachment ) {
|
||||
$output .= wp_get_attachment_link( $att_id, $atts['size'], true ) . "\n";
|
||||
if ( ! empty( $atts['link'] ) ) {
|
||||
if ( 'none' === $atts['link'] ) {
|
||||
$output .= wp_get_attachment_image( $att_id, $atts['size'], false, $attr );
|
||||
} else {
|
||||
$output .= wp_get_attachment_link( $att_id, $atts['size'], false );
|
||||
}
|
||||
} else {
|
||||
$output .= wp_get_attachment_link( $att_id, $atts['size'], true );
|
||||
}
|
||||
$output .= "\n";
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.5-beta2-48495';
|
||||
$wp_version = '5.5-beta2-48496';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue