PluginProbe ʕ •ᴥ•ʔ
Smash Balloon Social Photo Feed – Easy Social Feeds Plugin / 6.11.0
Smash Balloon Social Photo Feed – Easy Social Feeds Plugin v6.11.0
6.11.0 1.11.1 1.11.2 1.11.3 1.12 1.12.1 1.12.2 1.2 1.2.1 1.2.2 1.2.3 1.3.0 1.3.1 1.3.10 1.3.11 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.3.9 1.4 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.6.1 1.4.6.2 1.4.7 1.4.8 1.4.9 1.5 1.5.1 1.6 1.6.1 1.6.2 1.7 1.8 1.8.1 1.8.2 1.8.3 1.9 1.9.1 2.0 2.0.1 2.0.2 2.1 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.2 2.2.1 2.2.2 2.4 2.4.1 2.4.2 2.4.3 2.4.4 2.4.5 2.4.6 2.4.7 2.5 2.5.1 2.5.2 2.5.3 2.5.4 2.6 2.6.1 2.6.2 2.7 2.8 2.8.1 2.8.2 2.9 2.9.1 2.9.10 2.9.2 2.9.3 2.9.3.1 2.9.4 2.9.5 2.9.6 2.9.7 2.9.8 2.9.9 6.0 6.0.1 6.0.2 6.0.3 6.0.4 6.0.5 6.0.6 6.0.7 6.0.8 6.1 6.1.1 6.1.2 6.1.3 6.1.4 6.1.5 6.1.6 6.10.0 6.10.1 6.2 6.2.1 6.2.10 6.2.2 6.2.3 6.2.4 6.2.5 6.2.6 6.2.7 6.2.8 6.2.9 6.3 6.3.1 6.4 6.4.1 6.4.2 6.4.3 6.5.0 6.5.1 6.6.0 6.6.1 6.7.0 6.7.1 6.8.0 6.9.0 6.9.1 trunk 1.0 1.0.1 1.0.2 1.1 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.10 1.10.1 1.10.2 1.11
instagram-feed / inc / Email_Notification.php
instagram-feed / inc Last commit date
Builder 2 weeks ago Helpers 2 weeks ago Integrations 2 weeks ago Services 2 weeks ago admin 2 weeks ago Email_Notification.php 2 weeks ago Platform_Data.php 2 weeks ago class-sb-instagram-api-connect.php 2 weeks ago class-sb-instagram-cache.php 2 weeks ago class-sb-instagram-connected-account.php 2 weeks ago class-sb-instagram-cron-updater.php 2 weeks ago class-sb-instagram-data-encryption.php 2 weeks ago class-sb-instagram-data-manager.php 2 weeks ago class-sb-instagram-display-elements.php 2 weeks ago class-sb-instagram-education.php 2 weeks ago class-sb-instagram-feed-locator.php 2 weeks ago class-sb-instagram-feed.php 2 weeks ago class-sb-instagram-gdpr-integrations.php 2 weeks ago class-sb-instagram-oembed.php 2 weeks ago class-sb-instagram-parse.php 2 weeks ago class-sb-instagram-post-set.php 2 weeks ago class-sb-instagram-post.php 2 weeks ago class-sb-instagram-posts-manager.php 2 weeks ago class-sb-instagram-settings.php 2 weeks ago class-sb-instagram-single.php 2 weeks ago class-sb-instagram-token-refresher.php 2 weeks ago email.php 2 weeks ago if-functions.php 2 weeks ago index.php 2 weeks ago
Email_Notification.php
64 lines
1 <?php
2
3 namespace InstagramFeed;
4
5 use SB_Instagram_Education;
6
7 /**
8 * Class Email_Notification
9 */
10 class Email_Notification
11 {
12 /**
13 * Sends a notification email to the admin(s) of the site.
14 *
15 * @param string $title
16 * @param string $bold
17 * @param string $details
18 *
19 * @return bool
20 */
21 public static function send($title, $bold, $details)
22 {
23 $options = get_option('sb_instagram_settings');
24
25 $to_string = !empty($options['email_notification_addresses']) ? str_replace(' ', '', $options['email_notification_addresses']) : get_option('admin_email', '');
26
27 $all_emails = explode(',', $to_string);
28 $valid_emails = [];
29
30 foreach ($all_emails as $email) {
31 if (is_email($email)) {
32 $valid_emails[] = $email;
33 }
34 }
35
36 if (empty($valid_emails)) {
37 return false;
38 }
39
40 $from_name = esc_html(wp_specialchars_decode(get_bloginfo('name')));
41 $email_from = $from_name . ' <' . get_option('admin_email', $valid_emails[0]) . '>';
42 $header_from = "From: " . $email_from;
43
44 $headers = array('Content-Type: text/html; charset=utf-8', $header_from);
45
46 $header_image = SBI_PLUGIN_URL . 'img/balloon-120.png';
47
48 $footer_link = admin_url('admin.php?page=sbi-settings&view=advanced&flag=emails');
49
50 $message_content = '<h6 style="padding:0;word-wrap:normal;font-family:\'Helvetica Neue\',Helvetica,Arial,sans-serif;font-weight:bold;line-height:130%;font-size: 16px;color:#444444;text-align:inherit;margin:0 0 20px 0;Margin:0 0 20px 0;">' . $bold . '</h6>' . $details;
51
52 include_once SBI_PLUGIN_DIR . 'inc/class-sb-instagram-education.php';
53 $educator = new SB_Instagram_Education();
54 $dyk_message = $educator->dyk_display();
55
56 ob_start();
57 include SBI_PLUGIN_DIR . 'inc/email.php';
58 $email_body = ob_get_contents();
59 ob_get_clean();
60
61 return wp_mail($valid_emails, $title, $email_body, $headers);
62 }
63 }
64