Plugin Directory

Changeset 1879884


Ignore:
Timestamp:
05/23/2018 09:27:04 AM (8 years ago)
Author:
emarten
Message:

changed another file_get_contents to wp_remote_get

File:
1 edited

Legend:

Unmodified
Added
Removed
  • dsgvo/trunk/eu-dsgvo-helper.php

    r1879880 r1879884  
    44        Plugin Name: EU DSGVO Helper
    55        Description: This Plugin will be further developed. It so far caches google webfonts locally and replaces youtube embeded videos with a preview-image which becomes an embeded video on-click. More functions will be added soon.
    6         Version: 1.0.1.1
     6        Version: 1.0.1.2
    77        Author: Eric Marten
    88        Author URL: https://www.herr-marten.de/
     
    6868                    if (!file_exists( $font_file ))
    6969                    {
    70                         file_put_contents($font_file,file_get_contents($match["url"]));
     70                        file_put_contents($font_file,
     71                        wp_remote_retrieve_body( wp_remote_get( $match["url"], array('timeout' => 60, 'user-agent' =>  $_SERVER["HTTP_USER_AGENT"] ) ) ) );
    7172                        $css=str_replace($match["url"],$font_url,$css);
    7273                    }
Note: See TracChangeset for help on using the changeset viewer.