Changeset 3377092
- Timestamp:
- 10/12/2025 08:42:05 PM (6 months ago)
- Location:
- yournotify/trunk
- Files:
-
- 3 edited
-
includes/class-yournotify-optin.php (modified) (1 diff)
-
readme.txt (modified) (1 diff)
-
yournotify.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
yournotify/trunk/includes/class-yournotify-optin.php
r3242205 r3377092 12 12 13 13 public function register_shortcodes() { 14 add_shortcode('yournotify_ optin_form', array($this, 'render_optin_form'));14 add_shortcode('yournotify_subscribe', array($this, 'render_optin_form')); 15 15 } 16 16 -
yournotify/trunk/readme.txt
r3377085 r3377092 4 4 Requires at least: 4.6 5 5 Tested up to: 6.7 6 Stable tag: 1.1. 66 Stable tag: 1.1.7 7 7 License: GPLv3 or later 8 8 -
yournotify/trunk/yournotify.php
r3377085 r3377092 4 4 * Plugin URI: https://yournotify.com 5 5 * Description: Yournotify WP Plugin to power your email and sms marketing communications with features to support (WooCommerce, Automation, SMTP, Subscriber Form) 6 * Version: 1.1. 66 * Version: 1.1.7 7 7 * Author: Yournotify 8 8 * Author URI: https://yournotify.com … … 95 95 new Yournotify_Subscription(); 96 96 97 // load settings definition early so register_setting hooks attach before admin_init 97 98 98 require_once __DIR__ . '/admin-settings-tabbed.php'; 99 require_once __DIR__ . '/admin-settings-router.php'; 99 100 100 // router renders the UI 101 require_once __DIR__ . '/admin-settings-router.php'; 101 add_action('init', function () { 102 if (function_exists('shortcode_exists') && function_exists('do_shortcode') && !shortcode_exists('yournotify_subscribe')) { 103 add_shortcode('yournotify_subscribe', function($atts = [], $content = '') { 104 if (shortcode_exists('yournotify_optin_form')) { 105 $pairs = []; 106 foreach ($atts as $k=>$v) { $pairs[] = $k.'="'.esc_attr($v).'"'; } 107 $attr = $pairs ? ' ' . implode(' ', $pairs) : ''; 108 return do_shortcode('[yournotify_optin_form' . $attr . ']'); 109 } 110 return '<div class="yournotify-subscribe-error">Yournotify subscribe form not available.</div>'; 111 }); 112 } 113 });
Note: See TracChangeset
for help on using the changeset viewer.