Resource icon

Tutorials Auto Save Remote Images without plugin

  • Our resources on GPL5U Forum are CLEAN and SAFE. So you can use them for development and testing purposes. If your are on Windows and have an antivirus that alerts you about a possible infection: Know it's a false positive because all scripts are double checked by our experts. We advise you to add GPL5U to trusted sites/sources or disable your antivirus momentarily while downloading a resource. "Enjoy your presence on GPL5U"
  • Upgrade Your Account
    Hello Guest! Upgrade your account to download from our sections Here
    How to upgrade your account to download resources Learn More.

GPL5U

Administrative
Staff member
Administrator
Theme5s Lover
Trusted Uploader
Decoding Master
Reputation: 100%
Jan 8, 2018
2,518
508
113
theme5s.com
gpl5u submitted a new resource:

Auto Save Remote Images without plugin - Automatically keep the all remote picture to the local media libary when you publishing posts

Automatically keep the all remote picture to the local media libary when you publishing posts, and automatically set featured image

Include this code to functions file of theme you use

PHP:
<?php
class Auto_Save_Images
{
    function __construct()
    {
        add_filter('content_save_pre', array(
            $this,
            'post_save_images'
        ));
    }
    function post_save_images($content)
    {
        if (($_POST['save'] || $_POST['publish']))...

Read more about this resource...
 

New resources