This file contains hidden or 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 | |
| // Put this in wp-config.php and replace https://example.com/ with the URL of the production site. | |
| define( 'RH_USE_REMOTE_MEDIA_URL', 'https://example.com/' ); | |
| // Put the rest of this in functions.php or a custom plugin or somewhere else. | |
| if ( defined( 'RH_USE_REMOTE_MEDIA_URL' ) && ! empty( RH_USE_REMOTE_MEDIA_URL ) ) { | |
| add_filter( 'wp_get_attachment_image_src', 'filter_wp_get_attachment_image_src' ); | |
| add_filter( 'wp_calculate_image_srcset', 'filter_wp_calculate_image_srcset' ); | |
| add_filter( 'wp_get_attachment_url', 'filter_wp_get_attachment_url' ); | |
| } |
This file contains hidden or 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 | |
| /** | |
| * This is free and unencumbered software released into the public domain. | |
| * | |
| * Anyone is free to copy, modify, publish, use, compile, sell, or | |
| * distribute this software, either in source code form or as a compiled | |
| * binary, for any purpose, commercial or non-commercial, and by any | |
| * means. | |
| * |
This file contains hidden or 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 | |
| /* Merge multiple RSS feeds with SimplePie | |
| * | |
| * Just modify the path to SimplePie and | |
| * modify the $feeds array with the feeds you want | |
| * | |
| * You should probably also change the channel title, link and description, | |
| * plus I added a CC license you may not want | |
| * | |
| * Help from: http://www.webmaster-source.com/2007/08/06/merging-rss-feeds-with-simplepie/ |