-
Notifications
You must be signed in to change notification settings - Fork 1
/
send-images-rss.php
executable file
·79 lines (71 loc) · 2.38 KB
/
send-images-rss.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<?php
/**
* Send Images to RSS
*
* @package SendImagesRSS
* @author Robin Cornett
* @author Gary Jones <[email protected]>
* @link https://github.com/robincornett/send-images-rss
* @copyright 2014-2020 Robin Cornett
* @license GPL-2.0+
*
* @wordpress-plugin
* Plugin Name: Send Images to RSS
* Plugin URI: https://wordpress.org/plugins/send-images-rss
* Description: Makes your RSS emails look more like your website by converting overly large images and galleries to an email friendly format. Built with MailChimp in mind.
* Version: 3.4.1
* Author: Robin Cornett
* Author URI: https://robincornett.com
* Text Domain: send-images-rss
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
* Domain Path: /languages
* GitHub Plugin URI: https://github.com/robincornett/send-images-rss
* GitHub Branch: master
*/
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
die;
}
if ( ! defined( 'SENDIMAGESRSS_BASENAME' ) ) {
define( 'SENDIMAGESRSS_BASENAME', plugin_basename( __FILE__ ) );
}
// Include classes
function send_images_rss_require() {
$files = array(
'class-sendimagesrss',
'class-sendimagesrss-document-getter',
'class-sendimagesrss-excerpt-fixer',
'class-sendimagesrss-feed-fixer',
'class-sendimagesrss-help',
'class-sendimagesrss-strip-gallery',
'class-sendimagesrss-settings',
);
foreach ( $files as $file ) {
require plugin_dir_path( __FILE__ ) . 'includes/' . $file . '.php';
}
}
send_images_rss_require();
// Instantiate dependent classes
$sendimagesrss_strip_gallery = new SendImagesRSS_Strip_Gallery();
$sendimagesrss_excerpt_fixer = new SendImagesRSS_Excerpt_Fixer();
$sendimagesrss_help = new SendImagesRSS_Help();
$sendimagesrss_feed_fixer = new SendImagesRSS_Feed_Fixer();
$sendimagesrss_settings = new SendImagesRSS_Settings();
// Instantiate main class and pass in dependencies
$sendimagesrss = new SendImagesRSS(
$sendimagesrss_strip_gallery,
$sendimagesrss_excerpt_fixer,
$sendimagesrss_feed_fixer,
$sendimagesrss_help,
$sendimagesrss_settings
);
// Run the plugin
$sendimagesrss->run();
/**
* Helper function to get the RSS setting.
* @since 3.1.0
*/
function sendimagesrss_get_setting() {
return apply_filters( 'sendimagesrss_get_setting', false );
}