This should do it:
add_action('admin_notices', 'https_the_content');
function https_the_content() {
global $post;
if(!$post->post_content)
return;
//change src to use the current url scheme
$post->post_content = str_replace(array("src=\"http://", "src="http://"), array("src=\"//", "src="https://"), $post->post_content);
return $post->post_content;
}
Related Posts:
- How can I make an Ajax login form work with FORCE_SSL_ADMIN enabled?
- Is the WordPress HTTPS Plugin Still Safe To Use? [closed]
- Enable Full SSL for WordPress
- How can I force users to a particular subdomain to log in for MU (Multisite)?
- How can I fix the mixed content problems of the kk star ratings plugin?
- https rewrite not working for All in one security Brute force > rename login url
- How do I secure a subdomain using UCC SSL?
- What is the recommended way to be notified of security updates to my plugins? [closed]
- Generate all urls with https
- SSL Error: unable to get local issuer certificate
- Best collection of code for your 'functions.php' file [closed]
- What Are Security Best Practices for WordPress Plugins and Themes? [closed]
- Are WordPress Plugins essential?
- What are the common security flaws I need to look for? [closed]
- How to Add a Third Level Sub Menu to the WordPress Admin Menu
- Why “Contact Form 7” doesn’t update PHPmailer library?
- Add section (add_settings_section) to a custom page (add_submenu_page)
- Secure WordPress paid plugin
- Disable all https in WordPress
- Remove Google Fonts Which Are (Probably) Added By Plugins
- How to make media upload private? [duplicate]
- Does WordPress contain “default” anti-SQL injection code that responds with a 404 error?
- How can I log a user out of WordPress before the page loads?
- What does a security risk in a plugin look like?
- WordPress Capabilities: edit_user vs edit_users
- How to enable Admins to see Plugins
- Creating button next to “add media” that allows you to choose a single post
- Bad Request (Invalid Hostname) on working server, database problem
- Why am I sometimes getting a 404 error when I try to update a page with Elementor?
- Why users disable the WordPress update?
- How many security plugins are too many? [closed]
- Will WordPress username displayed somewhere in the site?
- Is revealing just the AUTH_KEY a security issue?
- Why Better WP security plugin returns 418 I’m a Teapot “error”?
- Admin Dashboard with Custom Tab for Client
- How to limit WordPress pages during updates?
- rms_unique_wp_mu_pl_fl_nm.php
- Security checking in meta_box save is reluctant?
- wordpress reusable content blocks
- Cannot access wp-admin after disabling all plugin
- How to send little data between admin pages of my plugin?
- How To Clean The Malware Infected & Hacked WordPress Websites? [duplicate]
- Editing admin pages in WordPress [closed]
- Layout Plugin Admin Pages: Use BootStrap? [closed]
- Remove Duplicator plugin from admin menu if not an administrator
- Doubt using $wpbd->get_col for a single column
- Is this the right way to execute some PHP in my plugin after a button click on an options page?
- Display update notification messages like ‘What’s New’
- Headers Content-Security-Policy CSP Major Issue
- Admin accounts unable to see plugins from external IP
- WordPress wp-admin/network/plugin-install
- how to access all user dashboard on fronted page [closed]
- How to set add question capability for author role in wp pro quiz plugin
- do_action() hook into load-(page)
- Malware installation during plugin update?
- I should enable automatic updates?
- Can some vulnerabilities in plugins be exploited even when the plugin is inactive?
- What’s causing this error? “Warning: Invalid argument”
- Too many login attempts
- Simply poll & Events Calendar plugins clashing
- Website show Google Ads when we have no Google Ads linked to our website
- Chrome Dev Tools console says every page in my blog has link to http://maps.google.com [closed]
- Remove value from array within post meta ajax admin
- How do I convert my WordPress website to be domain agnostic?
- Webservice credential storage [duplicate]
- Add logo to admin menu in my plugin
- Regarding plugin security
- Plugin permissions for Editor role
- Error: Can´t access facebook comment plugin admin page
- Is this plugin safe to run?
- How to add an admin alert for missing plugins
- Gathering all Custom Post Type posts in to array/object the proper way
- Adding a jQuery modal dialog to the admin area
- Redirect plugin after form submit or show errors
- Is the Block Bad Queries Plugin Still Relevant?
- What is the most efficient way of adding additional functionaliy for admin only
- How can I disable new plugin and theme install, but allow updates?
- How to create admin setting for this small plugin
- Validating ajax search
- Hide all Admin Notices and move on a separate page
- WordPress disable direct access of files in WordPress installation path
- Asking help regarding potential malware
- Specific Page/Post Need to Stay Non SSL
- why is my wordpress not loading any images?
- How To Remove “All, Publish, Draft and Expired” in Events Dashboard
- Bing/msn bots is heavily requesting random of my website
- Add_Meta_box to custom page (formidable edit post)
- My site thinks it’s secure when it is fact not
- How to enable Admins to see Plugins
- Being hacked. Is there a list of WordPress security holes I can check against?
- Defined user role to access plugin’s pages
- Add a checkbox in plugin options page and make it actually work
- Write mysql credentials in plugin
- Embedding code snippets in posts with indentation
- SWF in wordpress post
- Unwanted Links and Spam WordPress Pages and Posts
- How to create plugin list groups?
- File permissions for wp-minify plugin
- Stop the user if login from the cookies
- Display Any Field fromAdmin Panel in Frontend via Shortcode?