Plugin Directory

Changeset 3441355


Ignore:
Timestamp:
01/17/2026 02:41:22 AM (3 months ago)
Author:
pushrelay
Message:

Release 1.7.1: PHP 8.2 compatibility + documentation polish (no breaking changes)

Location:
pushrelay/trunk
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • pushrelay/trunk/CHANGELOG.md

    r3437249 r3441355  
    22
    33All notable changes to PushRelay will be documented in this file.
     4
     5## [1.7.1] - 2026-01-16
     6
     7### Compatibility & Documentation Release
     8
     9**PHP 8.2+ Compatibility:**
     10- Fixed deprecation warnings for null passed to string functions
     11- Added null safety guards to: strtoupper, strtolower, str_replace, strpos, substr, strlen, wp_trim_words
     12- Guarded foreach loops against non-array values
     13- No behavior changes — only defensive guards
     14
     15**Documentation:**
     16- Improved short description for WordPress.org
     17- Updated support documentation with clear URLs
     18- Added GitHub repository link for transparency
     19
     20**Links:**
     21- API Documentation: https://pushrelay.com/api-documentation
     22- Blog: https://pushrelay.com/blog/
     23- GitHub: https://github.com/pushrelay/pushrelay
     24
     25### Unchanged
     26- No functional changes
     27- No database changes
     28- No API changes
     29- No breaking changes
    430
    531## [1.7.0] - 2026-01-08
  • pushrelay/trunk/README.md

    r3432942 r3441355  
    11# PushRelay - WordPress Push Notifications Plugin
    22
    3 ![Version](https://img.shields.io/badge/version-2.0.1-blue.svg)
    4 ![WordPress](https://img.shields.io/badge/wordpress-5.8+-green.svg)
    5 ![PHP](https://img.shields.io/badge/php-7.4%2B-purple.svg)
    6 ![License](https://img.shields.io/badge/license-GPL--2.0-red.svg)
    7 
    8 ## 🚀 The Most Powerful Push Notifications Plugin for WordPress
    9 
    10 PushRelay is a professional-grade push notifications plugin that rivals OneSignal with advanced features, beautiful UI, and seamless WordPress integration.
     3[![Version](https://img.shields.io/badge/version-1.7.1-blue.svg)](https://wordpress.org/plugins/pushrelay/)
     4[![WordPress](https://img.shields.io/badge/wordpress-5.8+-green.svg)](https://wordpress.org/)
     5[![PHP](https://img.shields.io/badge/php-7.4%2B-purple.svg)](https://php.net/)
     6[![License](https://img.shields.io/badge/license-GPL--2.0-red.svg)](https://www.gnu.org/licenses/gpl-2.0.html)
     7
     8## 🚀 Reliable Push Notifications for WordPress
     9
     10PushRelay is a professional push notifications plugin with advanced features, clean UI, and seamless WordPress integration.
     11
     12**WordPress.org:** [https://wordpress.org/plugins/pushrelay/](https://wordpress.org/plugins/pushrelay/)
    1113
    1214## ✨ Features
     
    7476
    7577- **WordPress**: 5.8 or higher
    76 - **PHP**: 7.4 or higher (PHP 8.0+ fully supported)
     78- **PHP**: 7.4 or higher (PHP 8.2+ fully supported)
    7779- **MySQL**: 5.7 or higher
    7880- **WooCommerce**: 5.0+ (optional, for e-commerce features)
    7981
    80 ## 🔄 Version 2.0.1 Updates
    81 
    82 ### Fixed
    83 ✅ PHP 8.0+ compatibility issues resolved
    84 ✅ Deprecated warnings eliminated
    85 ✅ Header output errors fixed
    86 ✅ Null value handling improved
    87 ✅ Character encoding cleaned (UTF-8 without BOM)
    88 
    89 ### Added
    90 ✅ `get_subscriber_stats()` method in Subscribers class
    91 ✅ Enhanced null safety checks throughout
    92 ✅ Better error handling in all views
    93 
    94 ### Improved
    95 ✅ Code quality and consistency
    96 ✅ Performance optimizations
    97 ✅ Documentation updates
     82## 🔄 Version 1.7.1
     83
     84**PHP 8.2+ Compatibility:**
     85- Fixed deprecation warnings for null passed to string functions
     86- Added null safety guards throughout codebase
     87- No behavior changes
     88
     89**Documentation:**
     90- Improved WordPress.org description
     91- Updated support links
     92- Added GitHub repository link
     93
     94**No breaking changes. Safe auto-update.**
    9895
    9996## 📂 Plugin Structure
     
    190187## 📚 Documentation
    191188
    192 Full documentation available at: [https://pushrelay.com/docs](https://pushrelay.com/docs)
    193 
    194 ## 🤝 Support
    195 
    196 - **Documentation**: [https://pushrelay.com/docs](https://pushrelay.com/docs)
    197 - **Support Tickets**: Create from WordPress admin
    198 - **Email**: support@pushrelay.com
     189* **API Documentation**: [https://pushrelay.com/api-documentation](https://pushrelay.com/api-documentation)
     190* **Blog & Tutorials**: [https://pushrelay.com/blog/](https://pushrelay.com/blog/)
     191
     192## 🤝 Support & Contributing
     193
     194**Plugin Support:**
     195* WordPress.org support forums (recommended for users)
     196* Built-in ticket system in WordPress dashboard
     197
     198**Contributing:**
     199* GitHub Issues for bug reports and feature requests
     200* Pull requests welcome
     201* Please read contributing guidelines first
     202
     203**Business Inquiries:**
     204* [Contact Page](https://pushrelay.com/contact) (not for plugin support)
     205
     206> **Note:** GitHub Issues are for bug reports and feature requests only, not for general plugin support. For help using the plugin, please use the WordPress.org forums or the built-in ticket system.
    199207
    200208## 📄 License
     
    218226Developed with ❤️ by the PushRelay Team
    219227
    220 ## 📊 Stats
    221 
    222 - **Total Downloads**: Coming soon
    223 - **Active Installations**: Growing daily
    224 - **Average Rating**: ⭐⭐⭐⭐⭐
     228## 📊 Links
     229
     230* **WordPress.org**: [https://wordpress.org/plugins/pushrelay/](https://wordpress.org/plugins/pushrelay/)
     231* **GitHub**: [https://github.com/pushrelay/pushrelay](https://github.com/pushrelay/pushrelay)
     232* **Documentation**: [https://pushrelay.com/api-documentation](https://pushrelay.com/api-documentation)
    225233
    226234---
    227235
    228 **Made with passion to compete with OneSignal** 🚀
     236**Developed with ❤️ by the PushRelay Team**
  • pushrelay/trunk/includes/class-api-client.php

    r3437249 r3441355  
    308308        } elseif ( $decoded !== null && isset( $decoded['error'] ) ) {
    309309            $error_message .= ': ' . $decoded['error'];
    310         } elseif ( ! empty( $body ) ) {
    311             // Include raw body for debugging (truncated)
     310        } elseif ( ! empty( $body ) && is_string( $body ) ) {
     311            // Include raw body for debugging (truncated) - guard for PHP 8.2+
    312312            $error_message .= ' - Response: ' . substr( $body, 0, 200 );
    313313        }
     
    444444        }
    445445       
    446         if (empty($websites['data'])) {
     446        if (empty($websites['data']) || !is_array($websites['data'])) {
    447447            return new WP_Error('no_websites', __('No websites found in your PushRelay account', 'pushrelay'));
    448448        }
     
    452452        $exact_match = null;
    453453       
     454        // Guard current_domain for PHP 8.2+
     455        $current_domain = is_string($current_domain) ? $current_domain : '';
     456       
    454457        foreach ($websites['data'] as $website) {
    455458            $api_host = isset($website['host']) ? $website['host'] : '';
    456459           
    457             // Remove www. for comparison
    458             $api_host_clean = str_replace('www.', '', $api_host);
     460            // Remove www. for comparison - guard for PHP 8.2+
     461            $api_host_clean = str_replace('www.', '', (string) $api_host);
    459462            $current_domain_clean = str_replace('www.', '', $current_domain);
    460463           
  • pushrelay/trunk/includes/class-campaigns.php

    r3437249 r3441355  
    384384     */
    385385    private function get_post_excerpt($post) {
    386         if (!empty($post->post_excerpt)) {
    387             return wp_trim_words($post->post_excerpt, 20);
    388         }
    389        
    390         return wp_trim_words(strip_shortcodes($post->post_content), 20);
     386        // Guard against null for PHP 8.2+ compatibility
     387        $excerpt = isset($post->post_excerpt) && is_string($post->post_excerpt) ? $post->post_excerpt : '';
     388        $content = isset($post->post_content) && is_string($post->post_content) ? $post->post_content : '';
     389       
     390        if (!empty($excerpt)) {
     391            return wp_trim_words($excerpt, 20);
     392        }
     393       
     394        return wp_trim_words(strip_shortcodes($content), 20);
    391395    }
    392396   
  • pushrelay/trunk/includes/class-debug-logger.php

    r3437249 r3441355  
    115115        // Also log to WordPress debug.log if WP_DEBUG is enabled
    116116        if (defined('WP_DEBUG') && WP_DEBUG) {
    117             error_log(sprintf('[PushRelay] [%s] %s', strtoupper($level), $message)); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log
     117            // Guard against null for PHP 8.2+ compatibility
     118            $level_str = is_string($level) ? strtoupper($level) : 'INFO';
     119            error_log(sprintf('[PushRelay] [%s] %s', $level_str, $message)); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log
    118120        }
    119121       
     
    172174     */
    173175    private static function is_sensitive_key( $key ) {
     176        // Guard against null for PHP 8.1+ compatibility
     177        if ( ! is_string( $key ) || $key === '' ) {
     178            return false;
     179        }
    174180        $key_lower = strtolower( $key );
    175181        foreach ( self::$sensitive_keys as $sensitive ) {
     
    188194     */
    189195    private static function looks_like_sensitive_value( $value ) {
     196        // Guard against null for PHP 8.1+ compatibility
     197        if ( ! is_string( $value ) ) {
     198            return false;
     199        }
     200       
    190201        // Skip short values
    191202        if ( strlen( $value ) < 20 ) {
  • pushrelay/trunk/includes/class-segmentation.php

    r3437249 r3441355  
    348348            $filter_url = $filters['subscribed_on_url'];
    349349           
    350             if (strpos($subscriber_url, $filter_url) === false) {
     350            // Guard against null for PHP 8.1+ compatibility
     351            $subscriber_url = is_string($subscriber_url) ? $subscriber_url : '';
     352            $filter_url = is_string($filter_url) ? $filter_url : '';
     353           
     354            if ($filter_url !== '' && strpos($subscriber_url, $filter_url) === false) {
    351355                return false;
    352356            }
  • pushrelay/trunk/includes/class-service-worker.php

    r3432942 r3441355  
    136136        $request_uri = isset($_SERVER['REQUEST_URI']) ? sanitize_text_field(wp_unslash($_SERVER['REQUEST_URI'])) : '';
    137137        $request_path = strtok($request_uri, '?');
    138         $request_path = trim($request_path, '/');
     138        // Guard against null/false for PHP 8.1+ compatibility
     139        $request_path = is_string($request_path) ? trim($request_path, '/') : '';
    139140       
    140141        // Handle service worker request
     
    627628        $content_type = wp_remote_retrieve_header($response, 'content-type');
    628629       
     630        // Guard against null values for PHP 8.1+ compatibility
     631        $body = is_string($body) ? $body : '';
     632        $content_type = is_string($content_type) ? $content_type : '';
     633       
    629634        // Check for configured service worker
    630635        if ($code === 200 && strpos($body, 'website_id') !== false) {
  • pushrelay/trunk/includes/class-support-tickets.php

    r3432942 r3441355  
    212212                            <div class="system-info">
    213213                                <?php foreach ($attachments['system_info'] as $key => $value): ?>
    214                                     <strong><?php echo esc_html(ucwords(str_replace('_', ' ', $key))); ?>:</strong>
     214                                    <?php $key_str = is_string($key) ? $key : ''; // PHP 8.2+ guard ?>
     215                                    <strong><?php echo esc_html(ucwords(str_replace('_', ' ', $key_str))); ?>:</strong>
    215216                                    <?php
    216217                                    if (is_array($value)) {
  • pushrelay/trunk/includes/class-woocommerce.php

    r3432942 r3441355  
    296296        $statuses = wc_get_order_statuses();
    297297        $status_label = isset($statuses['wc-' . $new_status]) ? $statuses['wc-' . $new_status] : ucfirst($new_status);
     298        // Guard against null for PHP 8.2+ compatibility
     299        $status_label = is_string($status_label) ? $status_label : '';
    298300       
    299301        // Create notification
     
    526528            /* translators: %s: Product name */
    527529            'title' => sprintf(__('New: %s', 'pushrelay'), $product->get_name()),
    528             'description' => wp_trim_words($product->get_short_description(), 15),
     530            // Guard against null for PHP 8.2+ compatibility
     531            'description' => wp_trim_words((string) $product->get_short_description(), 15),
    529532            'url' => get_permalink($product_id),
    530533            'segment' => 'all',
  • pushrelay/trunk/pushrelay.php

    r3437249 r3441355  
    44 * Plugin URI: https://pushrelay.com
    55 * Description: The most powerful push notifications plugin for WordPress. WooCommerce integration, advanced segmentation, automated campaigns, and real-time analytics.
    6  * Version: 1.7.0
     6 * Version: 1.7.1
    77 * Author: PushRelay
    88 * Author URI: https://pushrelay.com
     
    8686
    8787// Define plugin constants
    88 define('PUSHRELAY_VERSION', '1.7.0');
     88define('PUSHRELAY_VERSION', '1.7.1');
    8989define('PUSHRELAY_DB_VERSION', '1.6.0');
    9090define('PUSHRELAY_PLUGIN_DIR', plugin_dir_path(__FILE__));
  • pushrelay/trunk/readme.txt

    r3437249 r3441355  
    55Tested up to: 6.9
    66Requires PHP: 7.4
    7 Stable tag: 1.7.0
     7Stable tag: 1.7.1
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
    1010
    11 Push notifications for WordPress with WooCommerce integration, segmentation, and analytics.
     11Send web push notifications to bring visitors back to your WordPress site.
    1212
    1313== Description ==
    1414
    15 PushRelay is the ultimate push notifications solution for WordPress. Send targeted web push notifications to your subscribers with advanced segmentation, automated campaigns, and comprehensive analytics.
    16 
    17 ### 🚀 WHY PUSHRELAY?
    18 
    19 PushRelay goes beyond basic push notifications. It's a complete engagement platform designed to help you connect with your audience in meaningful ways.
    20 
    21 **Better than OneSignal:**
    22 * ✅ Automatic Service Worker installation (no FTP needed)
    23 * ✅ Deep WooCommerce integration with cart abandonment recovery
    24 * ✅ Advanced subscriber segmentation with visual builder
    25 * ✅ Real-time analytics and performance insights
    26 * ✅ Built-in support ticket system
    27 * ✅ API health monitoring with auto-fix
    28 * ✅ Native WordPress experience
    29 
    30 ### ⭐ KEY FEATURES
     15PushRelay lets you send web push notifications to your WordPress visitors. Use it to announce new content, recover abandoned carts, and keep your audience engaged — all without requiring email addresses.
     16
     17**Requires a free PushRelay account and API key from [pushrelay.com](https://pushrelay.com).**
     18
     19= What You Can Do =
     20
     21* **Bring visitors back** — Send notifications about new posts, products, or updates
     22* **Recover abandoned carts** — Remind WooCommerce shoppers to complete their purchase
     23* **Announce sales & events** — Time-sensitive notifications reach users instantly
     24* **Automate campaigns** — Trigger notifications when posts are published
     25* **Segment your audience** — Target by device, location, or custom parameters
     26
     27= How It Works =
     28
     291. Visitors opt-in to receive notifications (permission-based, no spam)
     302. You create campaigns from your WordPress dashboard
     313. Notifications appear on subscribers' devices — even when they're not on your site
     32
     33= Key Features =
    3134
    3235**Smart Campaign Management**
     
    122125* Privacy policy integration
    123126
    124 ### 💡 SUPPORT
    125 
    126 * Built-in ticket system
    127 * Automatic log attachment
    128 * System information collection
    129 * Email support at support@pushrelay.com
    130 * Comprehensive documentation
    131 * Video tutorials
     127### 💡 SUPPORT & RESOURCES
     128
     129**Plugin Support:**
     130* WordPress.org support forums (recommended)
     131* Built-in ticket system in your WordPress dashboard
     132* Automatic log attachment for faster resolution
     133
     134**Documentation:**
     135* [API Documentation](https://pushrelay.com/api-documentation)
     136* [Blog & Tutorials](https://pushrelay.com/blog/)
     137
     138**Open Source:**
     139* [GitHub Repository](https://github.com/pushrelay/pushrelay)
     140* Contributions welcome via pull requests
     141* Bug reports via GitHub Issues
     142
     143**Business Inquiries Only:**
     144* [Contact Page](https://pushrelay.com/contact) (not for plugin support)
     145
     146*Note: For plugin support, please use the WordPress.org forums or the built-in ticket system. GitHub Issues are for bug reports and feature requests, not general support.*
    132147
    133148### 🌐 REQUIREMENTS
     
    265280
    266281== Changelog ==
     282
     283= 1.7.1 - 2026-01-16 =
     284**Compatibility & Documentation Release**
     285
     286* Fixed PHP 8.2+ deprecation warnings
     287* Added null safety guards throughout codebase
     288* Improved short description for WordPress.org
     289* Updated documentation and support links
     290* Added GitHub repository link
     291* No functional changes
     292* No breaking changes
    267293
    268294= 1.7.0 - 2026-01-08 =
     
    360386== Upgrade Notice ==
    361387
     388= 1.7.1 =
     389Fixed PHP 8.2+ deprecation warnings. Improved documentation. No functional changes. No breaking changes.
     390
    362391= 1.7.0 =
    363392Campaign status and dashboard widgets now stay in sync automatically. Processing widget updates correctly. No page refresh required. No breaking changes.
Note: See TracChangeset for help on using the changeset viewer.