Changeset 2957528
- Timestamp:
- 08/23/2023 09:44:22 PM (2 years ago)
- Location:
- wp-lemme-know
- Files:
-
- 2 added
- 12 edited
- 1 copied
-
assets/screenshot-5.png (modified) (1 prop) (previous)
-
assets/screenshot-6.png (modified) (1 prop) (previous)
-
tags/0.10.0 (copied) (copied from wp-lemme-know/trunk)
-
tags/0.10.0/assets/css/style-admin-dashboard.css (added)
-
tags/0.10.0/plugin.php (modified) (1 diff)
-
tags/0.10.0/readme.txt (modified) (2 diffs)
-
tags/0.10.0/src/ajax.php (modified) (1 diff)
-
tags/0.10.0/src/dashboard.php (modified) (2 diffs)
-
tags/0.10.0/templates/dashboard.php (modified) (1 diff)
-
trunk/assets/css/style-admin-dashboard.css (added)
-
trunk/plugin.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/src/ajax.php (modified) (1 diff)
-
trunk/src/dashboard.php (modified) (2 diffs)
-
trunk/templates/dashboard.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
wp-lemme-know/assets/screenshot-5.png
-
Property
svn:mime-type
changed from
application/octet-streamtoimage/png
-
Property
svn:mime-type
changed from
-
wp-lemme-know/assets/screenshot-6.png
-
Property
svn:mime-type
changed from
application/octet-streamtoimage/png
-
Property
svn:mime-type
changed from
-
wp-lemme-know/tags/0.10.0/plugin.php
r2953394 r2957528 5 5 Plugin URI: https://github.com/clash82/wp-lemme-know 6 6 Description: Sends e-mail notification for subscribers when a new post is published. 7 Version: 0. 9.17 Version: 0.10.0 8 8 Author: Rafał Toborek 9 9 Author URI: https://kontakt.toborek.info -
wp-lemme-know/tags/0.10.0/readme.txt
r2953437 r2957528 4 4 Tags: notifications, email, newsletter, subscribe2, mailing, smtp 5 5 Requires at least: 4.6 6 Tested up to: 6.3 6 Tested up to: 6.3.1 7 7 Requires PHP: 5.6 8 8 Stable tag: trunk … … 49 49 == Changelog == 50 50 51 = 0.10.0 = 52 * added: latest 50 subscribers is now displayed in the dashboard panel. 53 51 54 = v0.9.0 = 52 55 * added: tabs in the settings page. -
wp-lemme-know/tags/0.10.0/src/ajax.php
r2943152 r2957528 57 57 global $wpdb; 58 58 59 $email = strtolower($_POST['email']);59 $email = esc_html(strtolower($_POST['email'])); 60 60 $tableName = $wpdb->prefix . 'lemme_know_subscribers'; 61 61 -
wp-lemme-know/tags/0.10.0/src/dashboard.php
r2943152 r2957528 20 20 ); 21 21 22 add_action('admin_head', function () { 23 $style = file_get_contents(plugin_dir_path(__FILE__).'../assets/css/style-admin-dashboard.css'); 24 25 printf('<style>%s</style>', $style); 26 }); 27 22 28 function wp_lemme_know_dashboard_callback() 23 29 { … … 27 33 $subscriberCount = $wpdb->get_var(sprintf('SELECT COUNT(*) FROM `%s`', $tableName)); 28 34 35 $subscribersResults = $wpdb->get_results(sprintf('SELECT `s_email`, `s_date` FROM `%s` WHERE `s_confirmed`=\'yes\' ORDER BY `s_date` DESC LIMIT 50', $tableName)); 36 $subscribers = []; 37 foreach ($subscribersResults as $subscriber) { 38 $subscribers[] = [ 39 'email' => $subscriber->s_email, 40 'date' => $subscriber->s_date 41 ]; 42 } 43 29 44 $settings = [ 30 'email_count' => $subscriberCount 45 'email_count' => $subscriberCount, 46 'subscribers' => $subscribers 31 47 ]; 32 48 -
wp-lemme-know/tags/0.10.0/templates/dashboard.php
r2943152 r2957528 1 <?= sprintf(__('Total count of subscriptions: %d'), $settings['email_count']); ?> 1 <h3><?= sprintf(__('Total count of subscriptions: %d'), $settings['email_count']) ?></h3> 2 3 <?php if (count($settings['subscribers']) > 0): ?> 4 <div class="wp-lemme-know-admin-dashboard-list"> 5 <table> 6 <thead> 7 <tr> 8 <th><?= __('Email address') ?></th> 9 <th><?= __('Since') ?></th> 10 </tr> 11 </thead> 12 <tbody> 13 <?php foreach ($settings['subscribers'] as $index => $subscriber): ?> 14 <tr> 15 <td><a href="mailto:<?= $subscriber['email'] ?>"><?= $subscriber['email'] ?></a></td> 16 <td> 17 <time datetime="<?= mysql2date('c', $subscriber['date']) ?>"><?= sprintf( 18 '%s, %s', 19 mysql2date(get_option('date_format'), $subscriber['date']), 20 mysql2date(get_option('time_format'), $subscriber['date']) 21 ) ?></time> 22 </td> 23 </tr> 24 <?php endforeach; ?> 25 </tbody> 26 </table> 27 </div> 28 <?php endif ?> -
wp-lemme-know/trunk/plugin.php
r2953394 r2957528 5 5 Plugin URI: https://github.com/clash82/wp-lemme-know 6 6 Description: Sends e-mail notification for subscribers when a new post is published. 7 Version: 0. 9.17 Version: 0.10.0 8 8 Author: Rafał Toborek 9 9 Author URI: https://kontakt.toborek.info -
wp-lemme-know/trunk/readme.txt
r2953437 r2957528 4 4 Tags: notifications, email, newsletter, subscribe2, mailing, smtp 5 5 Requires at least: 4.6 6 Tested up to: 6.3 6 Tested up to: 6.3.1 7 7 Requires PHP: 5.6 8 8 Stable tag: trunk … … 49 49 == Changelog == 50 50 51 = 0.10.0 = 52 * added: latest 50 subscribers is now displayed in the dashboard panel. 53 51 54 = v0.9.0 = 52 55 * added: tabs in the settings page. -
wp-lemme-know/trunk/src/ajax.php
r2943152 r2957528 57 57 global $wpdb; 58 58 59 $email = strtolower($_POST['email']);59 $email = esc_html(strtolower($_POST['email'])); 60 60 $tableName = $wpdb->prefix . 'lemme_know_subscribers'; 61 61 -
wp-lemme-know/trunk/src/dashboard.php
r2943152 r2957528 20 20 ); 21 21 22 add_action('admin_head', function () { 23 $style = file_get_contents(plugin_dir_path(__FILE__).'../assets/css/style-admin-dashboard.css'); 24 25 printf('<style>%s</style>', $style); 26 }); 27 22 28 function wp_lemme_know_dashboard_callback() 23 29 { … … 27 33 $subscriberCount = $wpdb->get_var(sprintf('SELECT COUNT(*) FROM `%s`', $tableName)); 28 34 35 $subscribersResults = $wpdb->get_results(sprintf('SELECT `s_email`, `s_date` FROM `%s` WHERE `s_confirmed`=\'yes\' ORDER BY `s_date` DESC LIMIT 50', $tableName)); 36 $subscribers = []; 37 foreach ($subscribersResults as $subscriber) { 38 $subscribers[] = [ 39 'email' => $subscriber->s_email, 40 'date' => $subscriber->s_date 41 ]; 42 } 43 29 44 $settings = [ 30 'email_count' => $subscriberCount 45 'email_count' => $subscriberCount, 46 'subscribers' => $subscribers 31 47 ]; 32 48 -
wp-lemme-know/trunk/templates/dashboard.php
r2943152 r2957528 1 <?= sprintf(__('Total count of subscriptions: %d'), $settings['email_count']); ?> 1 <h3><?= sprintf(__('Total count of subscriptions: %d'), $settings['email_count']) ?></h3> 2 3 <?php if (count($settings['subscribers']) > 0): ?> 4 <div class="wp-lemme-know-admin-dashboard-list"> 5 <table> 6 <thead> 7 <tr> 8 <th><?= __('Email address') ?></th> 9 <th><?= __('Since') ?></th> 10 </tr> 11 </thead> 12 <tbody> 13 <?php foreach ($settings['subscribers'] as $index => $subscriber): ?> 14 <tr> 15 <td><a href="mailto:<?= $subscriber['email'] ?>"><?= $subscriber['email'] ?></a></td> 16 <td> 17 <time datetime="<?= mysql2date('c', $subscriber['date']) ?>"><?= sprintf( 18 '%s, %s', 19 mysql2date(get_option('date_format'), $subscriber['date']), 20 mysql2date(get_option('time_format'), $subscriber['date']) 21 ) ?></time> 22 </td> 23 </tr> 24 <?php endforeach; ?> 25 </tbody> 26 </table> 27 </div> 28 <?php endif ?>
Note: See TracChangeset
for help on using the changeset viewer.