force-https
force-https copied to clipboard
Filter in one pass via output buffer (power users)
I support the plugins current approach to replace URLs in specific instances but ran into some cases where exterior page content (driven by dynamic options) used insecure URLs. Until such time where we can track down those loose ends, this snippet fixes mixed content warnings. It may be helpful to others as part of your documentation:
require_once(FHTTPS_PATH.'/core/filters.php');
ob_start( array( FHTTPS_Core_Filters::instance(), 'content' ) );
I implemented it in a custom plugin, executing during the plugins_loaded
action with checks to ensure the plugin is active.