Skip to content

Instantly share code, notes, and snippets.

@WerdsWords
Last active December 19, 2015 23:18
Show Gist options
  • Save WerdsWords/6033380 to your computer and use it in GitHub Desktop.
Save WerdsWords/6033380 to your computer and use it in GitHub Desktop.
#7: post_comments_feed_link
<?php
/**
* Enforce https for post comments feed url
*
* @param string $url The post comments feed url.
*
* @return string The feed url.
*/
function wpdocs_change_comments_feed_url( $url ) {
// Make sure the feed url is https
$url = set_url_scheme( $url, 'https' );
return $url;
}
add_filter( 'post_comments_feed_link', 'wpdocs_change_comments_feed_url' );
@WerdsWords
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment