0.2.3
Peter Molnar hello@petermolnar.eu
Sat, 12 Dec 2015 11:43:05 +0000
3 files changed,
32 insertions(+),
5 deletions(-)
M
blogroll2email.php
→
blogroll2email.php
@@ -4,7 +4,7 @@ /*
Plugin Name: blogroll2email Plugin URI: https://github.com/petermolnar/blogroll2email Description: Pulls RSS, Atom and microformats entries from blogroll links and sends them as email -Version: 0.2.2 +Version: 0.2.3 Author: Peter Molnar <hello@petermolnar.eu> Author URI: http://petermolnar.eu/ License: GPLv3@@ -34,12 +34,13 @@ // 30 mins is reasonable
const revisit_time = 1800; const schedule = 'blogroll2email'; - private $cachedir = WP_CONTENT_DIR . DIRECTORY_SEPARATOR. 'cache' . DIRECTORY_SEPARATOR. __CLASS__; + private $cachedir; /** * thing to run as early as possible */ public function __construct () { + $this->cachedir = WP_CONTENT_DIR . DIRECTORY_SEPARATOR. 'cache' . DIRECTORY_SEPARATOR. __CLASS__; // this is mostly for debugging reasons register_activation_hook( __FILE__ , array( &$this, 'plugin_activate' ) ); // clear schedules if there's any on deactivation@@ -163,8 +164,29 @@ if ( empty($bookmark->link_rss))
$this->parse_mf ( $bookmark, $owner ); else $this->parse_rss( $bookmark, $owner ); + + $export_yaml[ $owner->user_nicename ][] = array ( + 'name' => $bookmark->link_name, + 'url' => $bookmark->link_url, + 'rss' => $bookmark->link_rss, + 'description' => $bookmark->link_description, + 'lastfetched' => $bookmark->link_updated, + ); } + if (function_exists('yaml_emit')) { + $flatroot = WP_CONTENT_DIR . DIRECTORY_SEPARATOR . 'flat'; + if ( !is_dir($flatroot)) { + if (!mkdir( $flatroot )) { + static::debug_log('Failed to create ' . $flatroot . ', exiting YAML creation'); + } + } + foreach ( $export_yaml as $owner => $bookmarks ) { + $export = yaml_emit($bookmarks, YAML_UTF8_ENCODING ); + $export_file = $flatroot . DIRECTORY_SEPARATOR . 'bookmarks_' . $owner . '.yml'; + file_put_contents ($export_file, $export); + } + } } /**
M
composer.json
→
composer.json
@@ -2,7 +2,7 @@ {
"name": "petermolnar/blogroll2email", "description": "blogroll2email WordPress plugin", "require": { - "php": ">=5.3.0", + "php": ">=5.3.0", "mf2/mf2": "0.2.*" }, "license": "GPLv3",@@ -10,7 +10,7 @@ "authors": [
{ "name": "Peter Molnar", "email": "hello@petermolnar.eu", - "homepage": "https://petermolnar.eu" + "homepage": "https://petermolnar.eu" } ] }
M
readme.txt
→
readme.txt
@@ -4,7 +4,7 @@ Donate link:
Tags: blogroll, links, rss, email, reader Requires at least: 3.0 Tested up to: 4.4 -Stable tag: 0.2.2 +Stable tag: 0.2.3 License: GPLv3 License URI: http://www.gnu.org/licenses/gpl-3.0.html Required minimum PHP version: 5.3@@ -46,6 +46,11 @@
* every A. indicates BIG changes. * every .B version indicates new features. * every ..C indicates bugfixes for A.B version. + += 0.2.3 = +*2015-12-12* + +* fix for the great hook in wordpress plugins svn = 0.2.2 = *2015-12-03*