Featured Images in RSS & Mailchimp Email - Version 1.3.8

Version Description

  • New: Added support for Full image sizes, props to drstout. Updated compatibility to WP v4.7.
Download this release

Release Info

Developer presswizards
Plugin Icon 128x128 Featured Images in RSS & Mailchimp Email
Version 1.3.8
Comparing to
See all releases

Version 1.3.8

Files changed (2) hide show
  1. featured_images_in_rss.php +149 -0
  2. readme.txt +129 -0
featured_images_in_rss.php ADDED
@@ -0,0 +1,149 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Plugin Name: Featured Images in RSS w/ Size and Position
4
+ Plugin URI: http://wordpress.org/plugins/featured-images-for-rss-feeds/
5
+ Description: Adds featured images from posts to your site's RSS feed output, with featured image size and CSS positioning options.
6
+ Author: Press Wizards
7
+ Version: 1.3.8
8
+ Author URI: http://presswizards.com/wordpress/
9
+ Text Domain: features-images-for-rss-feeds
10
+ */
11
+
12
+ // Adding WordPress plugin action links
13
+
14
+ add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), 'firss_add_plugin_action_links' );
15
+ function firss_add_plugin_action_links( $links ) {
16
+ return array_merge(
17
+ array(
18
+ 'donate' => '<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=R4SE22RQ4CB2E">Donate Now</a>',
19
+ 'settings' => '<a href="' . get_bloginfo( 'wpurl' ) . '/wp-admin/options-general.php?page=firss_settings">Settings</a>'
20
+ ),
21
+ $links
22
+ );
23
+ }
24
+ add_filter( 'plugin_row_meta', 'firss_plugin_meta_links', 10, 2 );
25
+ function firss_plugin_meta_links( $links, $file ) {
26
+ $plugin = plugin_basename(__FILE__);
27
+ // create link
28
+ if ( $file == $plugin ) {
29
+ return array_merge(
30
+ $links,
31
+ array( '<a href="http://wordpress.org/support/view/plugin-reviews/featured-images-for-rss-feeds" target=_blank>Please rate and review</a>' )
32
+ );
33
+ }
34
+ return $links;
35
+ }
36
+
37
+ function featured_images_in_rss($content) {
38
+ global $post;
39
+ if ( has_post_thumbnail( $post->ID ) ){
40
+ firss_settings_init(); // checks and sets default values if options have never been set before.
41
+ $featured_images_in_rss_size = get_option('featured_images_in_rss_size');
42
+ $featured_images_in_rss_css_code = firss_eval_css(get_option('featured_images_in_rss_css'));
43
+ $content = get_the_post_thumbnail( $post->ID, $featured_images_in_rss_size, array( 'style' => $featured_images_in_rss_css_code ) ) . $content;
44
+ }
45
+ return $content;
46
+ }
47
+
48
+ add_filter('the_excerpt_rss', 'featured_images_in_rss', 1000, 1);
49
+ add_filter('the_content_feed', 'featured_images_in_rss', 1000, 1);
50
+
51
+ function firss_eval_css($featured_images_in_rss_css) {
52
+ switch ($featured_images_in_rss_css) {
53
+ case "left-above":
54
+ $featured_images_in_rss_css_code = 'display: block; margin-bottom: 5px; clear:both;';
55
+ break;
56
+ case "centered-above":
57
+ $featured_images_in_rss_css_code = 'display: block; margin: auto; margin-bottom: 5px;';
58
+ break;
59
+ case "left-wrap":
60
+ $featured_images_in_rss_css_code = 'float: left; margin-right: 5px;';
61
+ break;
62
+ case "right-wrap":
63
+ $featured_images_in_rss_css_code = 'float: right; margin-left: 5px;';
64
+ break;
65
+ default:
66
+ $featured_images_in_rss_css_code = 'display: block; margin-bottom: 5px; clear: both;';
67
+ break;
68
+ }
69
+ return $featured_images_in_rss_css_code;
70
+ }
71
+
72
+ function register_firss_settings() {
73
+ register_setting('firss-settings-group', 'featured_images_in_rss_size');
74
+ register_setting('firss-settings-group', 'featured_images_in_rss_css');
75
+ }
76
+
77
+ function firss_create_menu() {
78
+ add_options_page('Featured Images in RSS Feeds', 'Featured Images in RSS Feeds', 'manage_options', 'firss_settings', 'firss_settings_page');
79
+ }
80
+
81
+ // Add Options Menu
82
+ add_action('admin_menu', 'firss_create_menu');
83
+ add_action('admin_init', 'register_firss_settings');
84
+
85
+ function firss_settings_init() {
86
+ $featured_images_in_rss_size = get_option('featured_images_in_rss_size');
87
+ if (empty($featured_images_in_rss_size)){
88
+ update_option('featured_images_in_rss_size', 'thumbnail');
89
+ $featured_images_in_rss_size = get_option('featured_images_in_rss_size');
90
+ }
91
+ $featured_images_in_rss_css = get_option('featured_images_in_rss_css');
92
+ if (empty($featured_images_in_rss_css)){
93
+ update_option('featured_images_in_rss_css', 'left-above');
94
+ $featured_images_in_rss_css = get_option('featured_images_in_rss_css');
95
+ }
96
+ }
97
+ function firss_settings_page() {
98
+ firss_settings_init();
99
+ $featured_images_in_rss_size = get_option('featured_images_in_rss_size');
100
+ $featured_images_in_rss_css = get_option('featured_images_in_rss_css');
101
+ ?>
102
+ <div class="wrap">
103
+ <h2>Featured Images In RSS Feeds</h2>
104
+ <h3>by <a href=http://twitter.com/PressWizards target=_blank>Rob Marlbrough</a>, <a href=http://presswizards.com/wordpress/ target=_blank>Press Wizards WordPress Development</a></h3>
105
+ <h4>In partnership with <a href=http://fandommarketing.com/ target=_blank>Fandom Marketing Social and Digital Marketing Agency</a></h4>
106
+ <h4>We can help with WordPress design, maintenance, and development: <a href=http://presswizards.com/wordpress/ target=_blank>Contact us</a></h4>
107
+ <form method="post" action="options.php">
108
+ <?php settings_fields( 'firss-settings-group' ); ?>
109
+ <table class="form-table">
110
+ <tr valign="top">
111
+ <th scope="column">Choose the featured image size to include in your RSS feeds.</th>
112
+ <td>
113
+ <?php $image_sizes = get_intermediate_image_sizes(); ?>
114
+ <select name="featured_images_in_rss_size">
115
+ <?php foreach ($image_sizes as $size_name) : ?>
116
+ <option value="<?php echo $size_name; ?>"<?php
117
+ echo ($featured_images_in_rss_size == $size_name ? ' selected="selected"' : '');
118
+ ?>><?php echo $size_name; ?></option>
119
+ <?php endforeach; ?>
120
+ <option value="full"<?php echo ($featured_images_in_rss_size == 'full' ? ' selected="selected"' : ''); ?>>full</option>
121
+ </select>
122
+ </td>
123
+ <td>(Customize image pixel sizes in
124
+ <BR /><a href=/wp-admin/options-media.php>Media Options</a>, then you'll need to <a href=http://wordpress.org/plugins/regenerate-thumbnails/ target=_blank>Regenerate Thumbnails</a>.)</th>
125
+ </td>
126
+ </tr>
127
+ <tr>
128
+ <th scope="column">Choose the positioning of the featured images in your RSS feeds.</th>
129
+ <td>
130
+ <select name="featured_images_in_rss_css">
131
+ <option value="left-above" <?php echo $featured_images_in_rss_css == 'left-above'?'selected="selected"':''; ?>>Image Left Above Text</option>
132
+ <option value="centered-above" <?php echo $featured_images_in_rss_css == 'centered-above'?'selected="selected"':''; ?>>Image Centered Above Text</option>
133
+ <option value="left-wrap" <?php echo $featured_images_in_rss_css == 'left-wrap'?'selected="selected"':''; ?>>Image Left Text Wraps</option>
134
+ <option value="right-wrap" <?php echo $featured_images_in_rss_css == 'right-wrap'?'selected="selected"':''; ?>>Image Right Text Wraps</option>
135
+ </select>
136
+ </td>
137
+ </tr>
138
+ </table>
139
+ <p class="submit"><input type="submit" name="submit-bpu" class="button-primary" value="<?php _e('Save Changes') ?>" /></p>
140
+ </form>
141
+ Here's your site's RSS feed for viewing/troubleshooting: <a href=/feed/ target=_blank><?php echo site_url(); ?>/feed/</a>
142
+ <BR />- If it redirects to the Feedburner feed you may need to disable that for this plugin to work.
143
+ <BR />- We recommend using this Chrome extension to view your feed as HTML: <a href=https://chrome.google.com/webstore/detail/rss-subscription-extensio/nlbjncdgjeocebhnmkbbbdekmmmcbfjd target=_blank>RSS Subscription Extension (by Google)</a>
144
+ <BR />- Clear your browser cache [usually shift-reload] to view RSS feed changes. Note that Feedburner caches feeds, you should <a href=http://feedburner.google.com/fb/a/pingSubmit?bloglink=<?php echo site_url(); ?> target=_blank>Ping Feedburner</a> so it updates your feed.
145
+ <p /><a target=_blank href=https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=R4SE22RQ4CB2E>Donate</a> now to drive development and get the features you want. If this plugin saved you time, perhaps send a donation with an amount you feel your time is worth, or just say thanks. :)
146
+ <BR />Please <a href=http://wordpress.org/support/view/plugin-reviews/featured-images-for-rss-feeds?rate=5#postform target=_blank>Rate and Review</a> so others can benefit from your experiences with it. Share on your social networks, too.
147
+ <BR />Please <a href=http://wordpress.org/support/plugin/featured-images-for-rss-feeds target=_blank>submit a new Support Thread</a> for troubleshooting help or feature requests.
148
+ </div>
149
+ <?php } ?>
readme.txt ADDED
@@ -0,0 +1,129 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ === Featured Images in RSS & Mailchimp Email ===
2
+ Contributors: presswizards
3
+ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=R4SE22RQ4CB2E
4
+ Tags: featured images in rss, rss images, featured image, thumbnails, images in rss, mailchimp, mailchimp rss, rss campaigns, infusionsoft, hubspot, constant contact, content marketing, marketing automation
5
+ Requires at least: 2.9
6
+ Tested up to: 4.7
7
+ Stable tag: trunk
8
+ License: GPLv2 or later
9
+ License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
+
11
+ Outputs images in your RSS feed to Mailchimp, Infusionsoft, Hubspot, and other services that use RSS feed data for content marketing.
12
+
13
+ == Description ==
14
+
15
+ Get images in your RSS feed instantly for free. Output blog featured photos to Mailchimp RSS emails, Infusionsoft, Hubspot, Constant Contact, Zoho, Feedburner, Bloglovin’, Feedly, and other services that use RSS feed data. A trusted plugin, developed in San Diego, CA (US), with over 10,000 active installs and 50+ five-star reviews. We actively answer every support forum thread.
16
+
17
+ Features:
18
+
19
+ * Featured image size: Select from thumbnail, medium, large, any theme-specific sizes, and full size.
20
+ * Image Position: Select Image left above text, Image left text wrap, Image right text wrap, and Image centered above text.
21
+ * Coming soon... Padding: Instantly set the spacing between the image and the body text.
22
+
23
+ **Need help** or wish it did something else as well? Use the [Support](http://wordpress.org/support/plugin/featured-images-for-rss-feeds) tab to submit your thoughts.
24
+
25
+ **Love this plugin?** Please submit a [rating and review](https://wordpress.org/support/plugin/featured-images-for-rss-feeds/reviews/?filter=5#new-post), I'd appreciate your praise. (Have an issue? Post to the support forums before leaving a bad review.)
26
+
27
+ **Real Testimonials**
28
+
29
+ > "Must-have for content marketing. This is a super easy way to customize the featured images that appear in the RSS feed – no more ugly pre-populated visuals. I especially love the Mailchimp integration. It’s great to have this much control over our content. Image is everything!" - @morganmariequinn [Read the review](https://wordpress.org/support/topic/must-have-for-content-marketing/)
30
+
31
+ > "Must Have for Featured Image Based Themes & MailChimp Users. For several years my WordPress theme has used featured images at the head of all my posts. The problem is, then, when feeding my RSS feed to MailChimp, that featured image at the head of the post is lost. Sometimes the image is highly crucial to the post (not to mention more enjoyable), so this plugin is a life saver. A must have!" - @ericdye [Read the review](https://wordpress.org/support/topic/must-have-for-featured-image-based-themes-mailchimp-users/)
32
+
33
+ > "It just works – lovely! Great with MailChimp. I installed this plugin, changed the (very simple) settings and the featured images started appearing in my MailChimp campaigns straight away – perfect!" - @barn2media [Read the review](https://wordpress.org/support/topic/it-just-works-lovely-great-with-mailchimp/)
34
+
35
+ We promise you'll love the features this plugin provides for your content marketing automation!
36
+
37
+ == Installation ==
38
+
39
+ Go to Plugins -> Add New, search for the name of the plugin, and then find it in the list, and click Install Now.
40
+
41
+ Or use the manual upload method:
42
+
43
+ 1. Click the Upload option. Choose the plugin zip file you downloaded. Click the Upload button.
44
+ 2. Activate the plugin.
45
+ 3. Set the plugin options, if desired.
46
+
47
+ == Frequently Asked Questions ==
48
+ = Images are not aligning or resizing properly =
49
+ * Please note that the alignment and sizing CSS is sometimes stripped out depending on the RSS reader/service you're using it with, and may require custom CSS inside the service you're using (Mailchimp, etc)
50
+ * [View an example of Mailchimp RSS Template Code](https://wordpress.org/support/topic/example-mailchimp-rss-template-code)
51
+ * [Need to center your RSS image in Mailchimp?](https://wordpress.org/support/topic/image-center-on-rss-mailchimp-campaign)
52
+
53
+ = No images showing in your RSS feed or double images issues? =
54
+ * If the plugin is installed/activated, and images still aren’t showing [click here](https://wordpress.org/support/topic/installed-no-images-showing)
55
+ * [What to do if you have two images](https://wordpress.org/support/topic/2-images)
56
+
57
+ = Included Features =
58
+ * Featured image size: Select from thumbnail, medium, large, any theme-specific sizes, and full size.
59
+ * Image Position: Select Image left above text, Image left text wrap, Image right text wrap, and Image centered above text.
60
+ * Coming soon... Padding: Instantly set the spacing between the image and the body text.
61
+
62
+ = Testimonials =
63
+ **Real Testimonials**
64
+
65
+ > "Must-have for content marketing. This is a super easy way to customize the featured images that appear in the RSS feed – no more ugly pre-populated visuals. I especially love the Mailchimp integration. It’s great to have this much control over our content. Image is everything!" - @morganmariequinn [Read the review](https://wordpress.org/support/topic/must-have-for-content-marketing/)
66
+
67
+ > "Must Have for Featured Image Based Themes & MailChimp Users. For several years my WordPress theme has used featured images at the head of all my posts. The problem is, then, when feeding my RSS feed to MailChimp, that featured image at the head of the post is lost. Sometimes the image is highly crucial to the post (not to mention more enjoyable), so this plugin is a life saver. A must have!" - @ericdye [Read the review](https://wordpress.org/support/topic/must-have-for-featured-image-based-themes-mailchimp-users/)
68
+
69
+ > "It just works – lovely! Great with MailChimp. I installed this plugin, changed the (very simple) settings and the featured images started appearing in my MailChimp campaigns straight away – perfect!" - @barn2media [Read the review](https://wordpress.org/support/topic/it-just-works-lovely-great-with-mailchimp/)
70
+
71
+ We promise you'll love the features this plugin provides for your content marketing automation!
72
+
73
+ = Need help? =
74
+ Be sure to check the [Support Threads](http://wordpress.org/support/plugin/featured-images-for-rss-feeds) to see if you’re question has already been answered. If not, submit your question and we’ll answer it.
75
+
76
+ = Love this plugin? =
77
+ Please submit a [rating and review](https://wordpress.org/support/plugin/featured-images-for-rss-feeds/reviews/?filter=5#new-post), we'd appreciate your testimonial.
78
+
79
+ (Have an issue? Post to the support forums before leaving a poor review.)
80
+
81
+ == Screenshots ==
82
+
83
+ 1. An example RSS feed with images included to the left with the text wrapping to the right, medium sized.
84
+ 2. An example RSS feed with featured images included above the text, full sized.
85
+ 3. A screenshot of the plugin's options screen.
86
+ 4. A sad example of an RSS feed with no images, because they aren't using this plugin. Don't have sad RSS feeds, use this plugin.
87
+
88
+ == Changelog ==
89
+
90
+ = 1.3.8 =
91
+ * New: Added support for Full image sizes, props to drstout. Updated compatibility to WP v4.7.
92
+
93
+ = 1.3.7 =
94
+ * Update: Exploring new features for future version, stay tuned! Donate now to help drive development and get the features you want.
95
+
96
+ = 1.3.6 =
97
+ * Fix: Fixed Permissions Denied on Options Page (changing capability from update_core to manage_options worked?). Shout out to @girlgeniuss for the help. Bumped tested up to v3.9.
98
+
99
+ = 1.3.5 =
100
+ * Update: Verified support for WP 3.8.1, added CSS to bump text below small images that are Left Above formatted. Reworked options page layout.
101
+
102
+ = 1.3.4 =
103
+ * Update: Verified support for WP 3.8, added Settings menu to Plugin page links for fun, and a Please rate and review link as well.
104
+
105
+ = 1.3.3 =
106
+ * New: Added support for custom sizes and a new Image Right Text Wraps option (shout out to Josh Kohlbach for providing his code modifications).
107
+
108
+ = 1.3.2 =
109
+ * Update: Added to the plugin name to make it more descriptive and differential from other plugins named similarly.
110
+
111
+ = 1.3.1 =
112
+ * Update: Made author name consistent across repository and in dashboard, to avoid confusion.
113
+
114
+ = 1.3 =
115
+ * Fix: Fixed settings init, if no option values are set, init the default values before outputting images into the feed.
116
+
117
+ = 1.2 =
118
+ * New: Added option for CSS styling: Image Left Above Text, Image Centered Above Text, Image Left Text Wraps.
119
+
120
+ = 1.1 =
121
+ * Update: Add notes about clearing cache, Feedburner cache and Feedburner ping link.
122
+
123
+ = 1.0 =
124
+ * New: First release. Yay. Hi Mom. ;)
125
+
126
+ == Upgrade Notice ==
127
+
128
+ = 1.3.8 =
129
+ * Added support for Full image sizes, props to drstout