Plugin Directory

Changeset 2957528


Ignore:
Timestamp:
08/23/2023 09:44:22 PM (2 years ago)
Author:
clash82
Message:

Update to version 0.10.0 from GitHub

Location:
wp-lemme-know
Files:
2 added
12 edited
1 copied

Legend:

Unmodified
Added
Removed
  • wp-lemme-know/assets/screenshot-5.png

    • Property svn:mime-type changed from application/octet-stream to image/png
  • wp-lemme-know/assets/screenshot-6.png

    • Property svn:mime-type changed from application/octet-stream to image/png
  • wp-lemme-know/tags/0.10.0/plugin.php

    r2953394 r2957528  
    55Plugin URI:  https://github.com/clash82/wp-lemme-know
    66Description: Sends e-mail notification for subscribers when a new post is published.
    7 Version:     0.9.1
     7Version:     0.10.0
    88Author:      Rafał Toborek
    99Author URI:  https://kontakt.toborek.info
  • wp-lemme-know/tags/0.10.0/readme.txt

    r2953437 r2957528  
    44Tags: notifications, email, newsletter, subscribe2, mailing, smtp
    55Requires at least: 4.6
    6 Tested up to: 6.3
     6Tested up to: 6.3.1
    77Requires PHP: 5.6
    88Stable tag: trunk
     
    4949== Changelog ==
    5050
     51= 0.10.0 =
     52* added: latest 50 subscribers is now displayed in the dashboard panel.
     53
    5154= v0.9.0 =
    5255* added: tabs in the settings page.
  • wp-lemme-know/tags/0.10.0/src/ajax.php

    r2943152 r2957528  
    5757    global $wpdb;
    5858
    59     $email = strtolower($_POST['email']);
     59    $email = esc_html(strtolower($_POST['email']));
    6060    $tableName = $wpdb->prefix . 'lemme_know_subscribers';
    6161
  • wp-lemme-know/tags/0.10.0/src/dashboard.php

    r2943152 r2957528  
    2020);
    2121
     22add_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
    2228function wp_lemme_know_dashboard_callback()
    2329{
     
    2733    $subscriberCount = $wpdb->get_var(sprintf('SELECT COUNT(*) FROM `%s`', $tableName));
    2834
     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
    2944    $settings = [
    30         'email_count' => $subscriberCount
     45        'email_count' => $subscriberCount,
     46        'subscribers' => $subscribers
    3147    ];
    3248
  • 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  
    55Plugin URI:  https://github.com/clash82/wp-lemme-know
    66Description: Sends e-mail notification for subscribers when a new post is published.
    7 Version:     0.9.1
     7Version:     0.10.0
    88Author:      Rafał Toborek
    99Author URI:  https://kontakt.toborek.info
  • wp-lemme-know/trunk/readme.txt

    r2953437 r2957528  
    44Tags: notifications, email, newsletter, subscribe2, mailing, smtp
    55Requires at least: 4.6
    6 Tested up to: 6.3
     6Tested up to: 6.3.1
    77Requires PHP: 5.6
    88Stable tag: trunk
     
    4949== Changelog ==
    5050
     51= 0.10.0 =
     52* added: latest 50 subscribers is now displayed in the dashboard panel.
     53
    5154= v0.9.0 =
    5255* added: tabs in the settings page.
  • wp-lemme-know/trunk/src/ajax.php

    r2943152 r2957528  
    5757    global $wpdb;
    5858
    59     $email = strtolower($_POST['email']);
     59    $email = esc_html(strtolower($_POST['email']));
    6060    $tableName = $wpdb->prefix . 'lemme_know_subscribers';
    6161
  • wp-lemme-know/trunk/src/dashboard.php

    r2943152 r2957528  
    2020);
    2121
     22add_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
    2228function wp_lemme_know_dashboard_callback()
    2329{
     
    2733    $subscriberCount = $wpdb->get_var(sprintf('SELECT COUNT(*) FROM `%s`', $tableName));
    2834
     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
    2944    $settings = [
    30         'email_count' => $subscriberCount
     45        'email_count' => $subscriberCount,
     46        'subscribers' => $subscribers
    3147    ];
    3248
  • 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.