Changeset 1869302
- Timestamp:
- 05/05/2018 09:52:49 PM (8 years ago)
- Location:
- ab-post-to-email
- Files:
-
- 19 added
- 2 edited
-
tags/1.10 (added)
-
tags/1.10/ab-post-to-email-plugin.php (added)
-
tags/1.10/files (added)
-
tags/1.10/files/template.html (added)
-
tags/1.10/files/template_img (added)
-
tags/1.10/files/template_img/blank.png (added)
-
tags/1.10/files/template_img/cog-01.jpg (added)
-
tags/1.10/files/template_img/cog-03.jpg (added)
-
tags/1.10/files/template_img/img_profile.jpg (added)
-
tags/1.10/files/template_img/picture.jpg (added)
-
tags/1.10/readme.txt (added)
-
trunk/ab-post-to-email-plugin.php (modified) (3 diffs)
-
trunk/files (added)
-
trunk/files/template.html (added)
-
trunk/files/template_img (added)
-
trunk/files/template_img/blank.png (added)
-
trunk/files/template_img/cog-01.jpg (added)
-
trunk/files/template_img/cog-03.jpg (added)
-
trunk/files/template_img/img_profile.jpg (added)
-
trunk/files/template_img/picture.jpg (added)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ab-post-to-email/trunk/ab-post-to-email-plugin.php
r1862870 r1869302 2 2 /* 3 3 Plugin Name: AB Post To Email 4 Plugin URI: http://aleksandar.bjelosevic.info/abpto fb4 Plugin URI: http://aleksandar.bjelosevic.info/abptoem 5 5 Description: This plugin send automatic email to all subscriber's when new post is out, 6 Version: 1. 006 Version: 1.10 7 7 Author: Aleksandar Bjelosevic 8 8 Author URI: http://aleksandar.bjelosevic.info … … 19 19 ); 20 20 21 21 $file = file_get_contents('files/template.html', FILE_USE_INCLUDE_PATH); 22 22 23 23 $subscribers = get_users($args1); … … 27 27 $post_url = get_permalink( $post_id ); 28 28 $url = get_bloginfo('url'); 29 $post_title = get_the_title( $post_id ); 30 $author = get_userdata($post->post_author); 29 $img_post = get_the_post_thumbnail_url($post_id, 'medium_large'); 30 $post_title = get_the_title( $post_id ); 31 $author = get_userdata($post->post_author); 32 $first_name = $author->first_name; 33 $tekstclanka= wp_trim_words(get_post_field('post_content', $post_id), 30); 34 $linkdoclanka=$post_url; 35 $last_name = $author->last_name; 31 36 $subject = 'New post on site-'.$url; 32 $message = "Hello, this is new post: "; 33 $message .= " <a href='". $post_url. "'>'".$post_title."'</a>\n\n"; 37 $message = str_replace("[naslovclanka]",$post_title,$file); 38 $file = str_replace("[nazivsajta]",$url,$message); 39 $message = str_replace("[postimage]", $img_post,$file); 40 $file=str_replace("[linkdoclanka]",$linkdoclanka,$message); 41 $message = str_replace("[tekstclanka]",$tekstclanka,$file); 34 42 $headers = array('Content-Type: text/html; charset=UTF-8'); 35 43 -
ab-post-to-email/trunk/readme.txt
r1862870 r1869302 5 5 Requires at least: 3.8 6 6 Tested up to: 4.95 7 Stable tag: 1. 007 Stable tag: 1.10 8 8 License: GPLv3 9 9 License URI: http://www.gnu.org/licenses/gpl.html … … 23 23 == Changelog == 24 24 25 = V1.10 = 26 Template added, email with preview of post added 25 27 26 28 = V1.00 =
Note: See TracChangeset
for help on using the changeset viewer.