all repos — blogroll2email @ af7907fed296794fa90baa3244decee6772a3f6b

0.2.2

tested till WordPress 4.4
Peter Molnar hello@petermolnar.eu
Thu, 03 Dec 2015 12:00:51 +0000
commit

af7907fed296794fa90baa3244decee6772a3f6b

parent

6b274aeb63edf2058996dfb82c8f812bde826f03

2 files changed, 33 insertions(+), 5 deletions(-)

jump to
M blogroll2email.phpblogroll2email.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 +Version: 0.2.2 Author: Peter Molnar <hello@petermolnar.eu> Author URI: http://petermolnar.eu/ License: GPLv3

@@ -180,7 +180,6 @@ *

* */ protected function send ( $to, $link, $title, $fromname, $sourceurl, $content, $time, $dry = false ) { - // enable HTML mail add_filter( 'wp_mail_content_type', array( $this, 'set_html_content_type') );

@@ -271,9 +270,9 @@

// if there's a feed author, get it, we may need it if there's no entry // author $feed_author = $feed->get_author(); + $last_updated_ = 0; if ( $maxitems > 0 ) { - $last_updated_ = 0; foreach ( $feed_items as $item ) { // U stands for Unix Time $date = $item->get_date( 'U' );

@@ -286,6 +285,20 @@ $from = $from . ': ' . $author->get_name();

elseif ( $feed_author ) $from = $from . ': ' . $feed_author->get_name(); + $content = $item->get_content(); + + $matches = array(); + preg_match_all('/farm[0-9]\.staticflickr\.com\/[0-9]+\/[0-9]+_[0-9a-zA-Z]+_m\.jpg/s', $content, $matches); + + if ( !empty ( $matches[0] ) ) { + foreach ( $matches[0] as $to_replace ) { + $clean = str_replace('_m.jpg', '_c.jpg', $to_replace); + $content = str_replace ( $to_replace, $clean, $content ); + } + } + + //$content = apply_filters('blogroll2email_content', $content); + if ( $this->send ( $owner->user_email, $item->get_link(),

@@ -432,6 +445,10 @@ if ( $last_updated > $current_updated ) {

global $wpdb; $wpdb->update( $wpdb->prefix . 'links', array ( 'link_updated' => date( 'Y-m-d H:i:s', $last_updated )), array('link_id'=> $bookmark->link_id ) ); } + } + + protected function generate_sieve_description ( $category ) { + } /**
M readme.txtreadme.txt

@@ -3,8 +3,8 @@ Contributors: cadeyrn

Donate link: Tags: blogroll, links, rss, email, reader Requires at least: 3.0 -Tested up to: 4.2.2 -Stable tag: 0.2 +Tested up to: 4.4 +Stable tag: 0.2.2 License: GPLv3 License URI: http://www.gnu.org/licenses/gpl-3.0.html

@@ -45,6 +45,17 @@

* every A. indicates BIG changes. * every .B version indicates new features. * every ..C indicates bugfixes for A.B version. + += 0.2.2 = +*2015-12-03* + +* tested for WordPress 4.4 + += 0.2.1 = +*2015-10-20* + +* uninitiated variable bugfix +* updated mf2 library = 0.2 = *2015-07-16*