force-https icon indicating copy to clipboard operation
force-https copied to clipboard

Filter in one pass via output buffer (power users)

Open deltafactory opened this issue 6 years ago • 0 comments

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.

deltafactory avatar Aug 01 '18 14:08 deltafactory