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
- Locked out of admin and some pictures don’t show after failed SSL installation
- do_action() hook into load-(page)
- Stop Plugin Enumeration [closed]
- Troubleshooting Plugins.php HTTP install path vs. a HTTPS for a single Plug-In
- Malware installation during plugin update?
- How to change the name of the “edit my profile” link in the WordPress admin backend
- Sync User to cPanel webmail?
- Adding CSS to custom post type admin page causes error
- Hack-Proof OR Security in WordPress — is it real?
- Display Custom Field Value on Admin Page Column
- How to remove/hide Yoast’s “SEO” tab in admin panel?
- I should enable automatic updates?
- Edit External CSS
- Can some vulnerabilities in plugins be exploited even when the plugin is inactive?
- Admin AJAX doesn’t work in plugin admin page – Even though code is copied verbatim from WordPress Codex
- Add sub menu page in your plugin
- Security and Must Use Plugins
- What’s causing this error? “Warning: Invalid argument”
- Is Timthumb still broken? What security measures should be taken?
- Prevent direct access to WordPress plugin assets?
- Move plugin-settings to ‘Settings’-menu in the admin
- redirected you too many times
- Is it safe to use admin-ajax.php in the frontend?
- How to protect WordPress from security scanner [closed]
- WordPress Admin Menu defining function is seperate file
- How do I add some javascript validation to the admin interface form’s onsubmit?
- remove all submenus from plugin
- Specific way to allow WordPress users to view their current password? And edit it?
- Create WordPress posts from JSON array using plugin in admin
- Too many login attempts
- Plugin getting Cannot modify header information errors
- Is there any pre-existing plugin to track and block IPs with suspicious activity on my site?
- creating a plug in that would tap into save/update action of posts [closed]
- Simply poll & Events Calendar plugins clashing
- How to prevent plugins from sniffing/stealing other plugins’ options?
- How to see which sites use my installed plugins (wordpress multisite)
- Website show Google Ads when we have no Google Ads linked to our website
- Vulnerability Concern From the Plugin or From Not Updating the Plugin?
- How to use the CSS of the WordPress core in the development of my administration page?
- Custom API plugin to execute 3rd party API to retrieve data
- How to deal with Slow HTTP POST (slowloris) vulnerability
- Running multiple security plugins
- how do I secure my WP website from hackers? [closed]
- in source code but I can’t find it in files or plugins
- Updating WordPress plugin admin panel footer text
- WordPress permissions error with admin account
- Chrome Dev Tools console says every page in my blog has link to http://maps.google.com [closed]
- getting notifications about updates only in the “core” page
- 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
- Problem after updating plugins
- Equivalent of admin.php for public pages
- HTTPS connection with wampserver for “Facebook for WordPress” plugin
- Regarding plugin security
- Remove specific administrator’s capability
- problem with register_activation_hook in plugin
- Plugin permissions for Editor role
- How do I determine if the user who registered is not spam?
- Error: Can´t access facebook comment plugin admin page
- If I use an alternative login (e.g. CAS or other SSO) plugin, is my site protected from the recent brute force login attempts?
- Is this plugin safe to run?
- How to add an admin alert for missing plugins
- How to hide plugin options for editors via functions.php
- Ajax request sends url rather than data
- Gathering all Custom Post Type posts in to array/object the proper way
- How to add captcha to publish widget
- Adding a jQuery modal dialog to the admin area
- Redirect plugin after form submit or show errors
- Is it safe to use Web Invoice 2.1.0 without SSL?
- How to create a plugin page that shows XML?
- Is the Block Bad Queries Plugin Still Relevant?
- WP Insert Post If user refreshes override new post
- What is the most efficient way of adding additional functionaliy for admin only
- 404 errors when updating options in admin dashboard
- Website Captcha Error: The reCAPTCHA wasn’t entered correctly
- Hide plugins and theme from public
- WordPress search shows protected content
- Security of a WordPress Plugin
- Can I disable xml-rpc by setting it to false?
- How can I disable new plugin and theme install, but allow updates?
- Help to Create a Simple Plugin to make a post
- How to create admin setting for this small plugin
- WC Fix Attributes – ‘Add New’ Not Searchable/Delayed
- Validating ajax search
- www redirects to another directory in wordpress
- Admin Custom Plugin List Files in admin Table
- Content-Security-Policy implementation with WordPress W3Total Cache plugin installed
- Hide all Admin Notices and move on a separate page
- WordPress disable direct access of files in WordPress installation path