PluginProbe
Photonic Gallery & Lightbox for Flickr, SmugMug & Others / 3.36
Photonic Gallery & Lightbox for Flickr, SmugMug & Others v3.36
3.36 3.35 3.34 3.33 2.19 2.20 2.21 2.22 2.23 2.24 2.25 2.26 2.27 2.28 2.29 2.30 2.31 2.32 2.33 2.34 2.40 2.41 2.42 2.43 2.44 All 141 releases
photonic / Core / Cron.php

Cron.php in Photonic Gallery & Lightbox for Flickr, SmugMug & Others 3.36, at Core/Cron.php

34 lines 1.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Photonic_Plugin\Core;
4
5 use Photonic_Plugin\Platforms\Instagram;
6
7 class Cron {
8 public function __construct() {
9 global $photonic_instagram_access_token;
10 $to = get_option('admin_email');
11 $headers = array('Content-Type: text/html; charset=UTF-8');
12
13 if (!empty($to)) {
14 $subject = sprintf(esc_attr__('[%s - Photonic] Access Credentials Expiring Soon!', 'photonic'), get_bloginfo('name'));
15 $body = sprintf(esc_html__('You are using %1$s on your website at %2$s. You have set it up to authenticate against the following platforms, for which your credentials have expired or will expire soon: ', 'photonic'), '<a href="https://wordpress.org/plugins/photonic/">Photonic</a>', site_url());
16
17 $module_body = '';
18 if (!empty($photonic_instagram_access_token)) {
19 require_once PHOTONIC_PATH . "/Platforms/Instagram.php";
20 $module = Instagram::get_instance();
21 $soon = $module->is_token_expiring_soon(10);
22 if (!empty($soon)) {
23 $module_body .= sprintf(esc_html__('%1$s%2$sInstagram%3$s - Instagram credentials expire every 60 days. Facebook requires you to reauthenticate to continue using application functionality. Please reauthenticate Photonic for Instagram from your dashboard (%4$s).%5$s', 'photonic'), '<li>', '<strong>', '</strong>', admin_url('admin.php?page=photonic-auth'), '</li>');
24 }
25 }
26
27 if (!empty($module_body)) {
28 $body .= '<ul>' . $module_body . '</ul>';
29 wp_mail($to, $subject, $body, $headers);
30 }
31 }
32 }
33 }
34