Last active
August 27, 2021 16:19
-
-
Save jirsbek/13c68594de381e32b3b61f8aea517f2a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Add param to display gallery in full size in RSS | |
*/ | |
add_filter( | |
'shortcode_atts_gallery', | |
function ($out) { | |
$out['link'] = 'file'; // By defaul show file link in gallery, not attachmnet URL | |
if (is_feed() and $_GET['gallery'] === 'full') { | |
$out['size'] = 'full'; | |
} | |
return $out; | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment