mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-01-24 21:27:56 -05:00
* New core-extensions to allow Docker volumes for third-party extensions #Fix https://github.com/FreshRSS/FreshRSS/issues/2650 Split our extensions directory into two: 1) Core extensions shipped with FreshRSS in ./lib/core-extensions/ 2) Third-party extensions modified by end-users in ./extensions/ which can easily be mounted as a Docker volume * Example of Docker Compose with extensions * Back-compatibility + fix array merge bug
14 lines
390 B
PHP
14 lines
390 B
PHP
<?php
|
|
|
|
class TumblrGdprExtension extends Minz_Extension {
|
|
public function init() {
|
|
$this->registerHook('simplepie_before_init', array('TumblrGdprExtension', 'curlHook'));
|
|
}
|
|
|
|
public static function curlHook($simplePie, $feed) {
|
|
if (preg_match('#^https?://[a-zA-Z_0-9-]+.tumblr.com/#i', $feed->url())) {
|
|
$simplePie->set_useragent(FRESHRSS_USERAGENT . ' like Baiduspider');
|
|
}
|
|
}
|
|
}
|