Plugin Directory

Changeset 3332502

Timestamp:
07/22/2025 08:23:27 PM (4 months ago)
Author:
matteoenna
Message:

release 3.1.3

Location:
wine-cellar-manager
Files:
8 edited
1 copied

Legend:

Unmodified
Added
Removed
  • wine-cellar-manager/tags/3.1.3/class/idealconsumptionalert/wineCellarManager_consumption-notifier_Class.php

    r3331698 r3332502  
    104104                    continue;
    105105                }
    106 
     106                $qty = get_post_meta( get_the_ID(), 'quantity', true ) ?? '';
     107                if(!$qty) continue;
    107108                list( $month, $year ) = explode( '/', $value );
    108109                $alert_date = DateTime::createFromFormat( 'Y-m-d', "$year-$month-01" );
     
    135136        }
    136137
    137         $to = get_option( 'admin_email' );
     138        $to = get_option( 'winecm_notification_email' );
     139        if ( ! is_email( $to ) ) {
     140            $to = get_option( 'admin_email' );
     141        }
     142
    138143        $subject = __( 'Wine Cellar – Ideal Consumption Alerts', 'wine-cellar-manager' );
    139144
    140         $body = __( "These are the wines requiring your attention:\n", 'wine-cellar-manager' );
     145        $body = __( "Hello,\n\n", 'wine-cellar-manager' );
     146        $body .= __( "These are the wines requiring your attention:\n", 'wine-cellar-manager' );
    141147
    142148        if ( $expired ) {
     
    154160        }
    155161
     162        // Footer
     163        $site_name = get_bloginfo( 'name' );
     164        $site_url  = home_url();
     165
     166        $body .= "\n\n—\n";
     167        $body .= sprintf(
     168            __( "This is an automatic notification from the plugin Wine Cellar Manager, running on the site %s (%s).", 'wine-cellar-manager' ),
     169            $site_name,
     170            $site_url
     171        );
     172        $body .= "\n" . __( "You're receiving this message because ideal consumption alerts are enabled. You can configure this in the plugin settings.", 'wine-cellar-manager' );
     173
    156174        $headers = ['Content-Type: text/plain; charset=UTF-8'];
    157175        wp_mail( $to, $subject, $body, $headers );
     176
    158177    }
    159178}
  • wine-cellar-manager/tags/3.1.3/readme.txt

    r3331698 r3332502  
    55Requires PHP: 7.2.5
    66Tested up to: 6.8
    7 Stable tag: 3.1.2
     7Stable tag: 3.1.3
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
  • wine-cellar-manager/tags/3.1.3/templates/admin/admin-sidebar.php

    r3331698 r3332502  
    1313    <div style="width: 300px; background: #f9f9f9; border: 1px solid #ddd; padding: 15px; border-radius: 4px;">
    1414        <h2><?php esc_html_e( 'Plugin Info', 'wine-cellar-manager' ); ?></h2>
    15         <p><?php esc_html_e( 'Version 3.1.2', 'wine-cellar-manager' ); ?> — <a href="https://profiles.wordpress.org/matteoenna/" target="_blank"><?php esc_html_e( 'by Matteo Enna', 'wine-cellar-manager' ); ?></a></p>
     15        <p><?php esc_html_e( 'Version 3.1.3', 'wine-cellar-manager' ); ?> — <a href="https://profiles.wordpress.org/matteoenna/" target="_blank"><?php esc_html_e( 'by Matteo Enna', 'wine-cellar-manager' ); ?></a></p>
    1616    </div>
    1717</div>
  • wine-cellar-manager/tags/3.1.3/wine-cellar-manager.php

    r3331698 r3332502  
    33   Plugin Name: Wine Cellar Manager
    44   Description: A plugin to manage your wine inventory.
    5    Version: 3.1.2
     5   Version: 3.1.3
    66   Author: Matteo Enna
    77   Author URI: https://matteoenna.it/it/wordpress-work/
  • wine-cellar-manager/trunk/class/idealconsumptionalert/wineCellarManager_consumption-notifier_Class.php

    r3331698 r3332502  
    104104                    continue;
    105105                }
    106 
     106                $qty = get_post_meta( get_the_ID(), 'quantity', true ) ?? '';
     107                if(!$qty) continue;
    107108                list( $month, $year ) = explode( '/', $value );
    108109                $alert_date = DateTime::createFromFormat( 'Y-m-d', "$year-$month-01" );
     
    135136        }
    136137
    137         $to = get_option( 'admin_email' );
     138        $to = get_option( 'winecm_notification_email' );
     139        if ( ! is_email( $to ) ) {
     140            $to = get_option( 'admin_email' );
     141        }
     142
    138143        $subject = __( 'Wine Cellar – Ideal Consumption Alerts', 'wine-cellar-manager' );
    139144
    140         $body = __( "These are the wines requiring your attention:\n", 'wine-cellar-manager' );
     145        $body = __( "Hello,\n\n", 'wine-cellar-manager' );
     146        $body .= __( "These are the wines requiring your attention:\n", 'wine-cellar-manager' );
    141147
    142148        if ( $expired ) {
     
    154160        }
    155161
     162        // Footer
     163        $site_name = get_bloginfo( 'name' );
     164        $site_url  = home_url();
     165
     166        $body .= "\n\n—\n";
     167        $body .= sprintf(
     168            __( "This is an automatic notification from the plugin Wine Cellar Manager, running on the site %s (%s).", 'wine-cellar-manager' ),
     169            $site_name,
     170            $site_url
     171        );
     172        $body .= "\n" . __( "You're receiving this message because ideal consumption alerts are enabled. You can configure this in the plugin settings.", 'wine-cellar-manager' );
     173
    156174        $headers = ['Content-Type: text/plain; charset=UTF-8'];
    157175        wp_mail( $to, $subject, $body, $headers );
     176
    158177    }
    159178}
  • wine-cellar-manager/trunk/readme.txt

    r3331698 r3332502  
    55Requires PHP: 7.2.5
    66Tested up to: 6.8
    7 Stable tag: 3.1.2
     7Stable tag: 3.1.3
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
  • wine-cellar-manager/trunk/templates/admin/admin-sidebar.php

    r3331698 r3332502  
    1313    <div style="width: 300px; background: #f9f9f9; border: 1px solid #ddd; padding: 15px; border-radius: 4px;">
    1414        <h2><?php esc_html_e( 'Plugin Info', 'wine-cellar-manager' ); ?></h2>
    15         <p><?php esc_html_e( 'Version 3.1.2', 'wine-cellar-manager' ); ?> — <a href="https://profiles.wordpress.org/matteoenna/" target="_blank"><?php esc_html_e( 'by Matteo Enna', 'wine-cellar-manager' ); ?></a></p>
     15        <p><?php esc_html_e( 'Version 3.1.3', 'wine-cellar-manager' ); ?> — <a href="https://profiles.wordpress.org/matteoenna/" target="_blank"><?php esc_html_e( 'by Matteo Enna', 'wine-cellar-manager' ); ?></a></p>
    1616    </div>
    1717</div>
  • wine-cellar-manager/trunk/wine-cellar-manager.php

    r3331698 r3332502  
    33   Plugin Name: Wine Cellar Manager
    44   Description: A plugin to manage your wine inventory.
    5    Version: 3.1.2
     5   Version: 3.1.3
    66   Author: Matteo Enna
    77   Author URI: https://matteoenna.it/it/wordpress-work/
Note: See TracChangeset for help on using the changeset viewer.