Changeset 2902750
- Timestamp:
- 04/22/2023 01:52:42 PM (3 years ago)
- Location:
- allaccessible
- Files:
-
- 6 edited
-
tags/1.2.10/allaccessible.php (modified) (4 diffs)
-
tags/1.2.10/assets/allaccessible-custom.js (modified) (1 diff)
-
tags/1.2.10/inc/AllAccessibleSettings.php (modified) (2 diffs)
-
trunk/allaccessible.php (modified) (4 diffs)
-
trunk/assets/allaccessible-custom.js (modified) (1 diff)
-
trunk/inc/AllAccessibleSettings.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
allaccessible/tags/1.2.10/allaccessible.php
r2902746 r2902750 192 192 if ('toplevel_page_allaccessible'!= $hook ) { 193 193 wp_enqueue_style('allaccessible-style', AACB_CSS .'allaccessible-style.css',array(),AACB_VERSION); 194 wp_register_script('allaccessible-custom', AACB_JS .'allaccessible-custom.js',array(),AACB_VERSION); 195 $ajax_data = array( 196 'ajax_url' => admin_url('admin-ajax.php') 197 ); 198 wp_localize_script('allaccessible-custom', 'ajax_object', $ajax_data); 199 200 wp_enqueue_script('allaccessible-custom'); 194 201 return; 195 202 } else { … … 199 206 wp_enqueue_script('allaccessible-select2-script', 'https://cdn.jsdelivr.net/npm/[email protected]/dist/js/select2.min.js',array(),AACB_VERSION); 200 207 wp_enqueue_style('allaccessible-admin-style', AACB_CSS .'allaccessible-style.css',array(),AACB_VERSION); 201 wp_enqueue_script('allaccessible-custom', AACB_JS .'allaccessible-custom.js',array(),AACB_VERSION); 202 wp_localize_script('aacb-admin', 'ajax_object', array('ajax_url' => admin_url('admin-ajax.php'))); 208 wp_register_script('allaccessible-custom', AACB_JS .'allaccessible-custom.js',array(),AACB_VERSION); 209 $ajax_data = array( 210 'ajax_url' => admin_url('admin-ajax.php') 211 ); 212 wp_localize_script('allaccessible-custom', 'ajax_object', $ajax_data); 213 214 wp_enqueue_script('allaccessible-custom'); 203 215 } 204 216 } … … 206 218 207 219 function aacb_dismiss_notice() { 208 update_option('aacb_hide_ notice', true);209 //echo 'success';220 update_option('aacb_hide_premium_notice', true); 221 echo 'success'; 210 222 wp_die(); 211 223 } … … 254 266 function aacb_activated_notice() { 255 267 $options = get_option('aacb_options'); 256 $hide_notice = get_option('aacb_hide_ notice');268 $hide_notice = get_option('aacb_hide_premium_notice'); 257 269 258 270 if ($options['aacb_installed'] && !get_option('aacb_accountID') && !$hide_notice) { 259 271 $settings_url = admin_url('options-general.php?page=allaccessible'); 260 272 ?> 261 <div id="aacb- notice" class="notice notice-success is-dismissible">273 <div id="aacb-premium-notice" class="notice notice-success is-dismissible"> 262 274 <p><?php _e( 'Activate AllAccessible Premium to Unlock Ai Accessibility Features.', 'allaccessible' ); ?> <a href="<?php echo $settings_url; ?>"><?php _e( 'Click Here', 'allaccessible' ); ?></a></p> 263 275 </div> -
allaccessible/tags/1.2.10/assets/allaccessible-custom.js
r2902746 r2902750 134 134 }); 135 135 136 $(document).ready(function ($) { 137 $(document).on('click', '#aacb-notice .notice-dismiss', function () { 138 var data = { 139 'action': 'aacb_dismiss_notice' 140 }; 136 $('#aacb-premium-notice .notice-dismiss').on('click', function () { 137 var data = { 138 'action': 'aacb_dismiss_notice' 139 }; 141 140 142 $.post(ajax_object.ajax_url, data, function (response) { 143 console.log('Notice dismissed: ' + response); 144 }); 141 $.post(ajax_object.ajax_url, data, function (response) { 142 console.log('Notice dismissed: ' + response); 145 143 }); 146 144 }); -
allaccessible/tags/1.2.10/inc/AllAccessibleSettings.php
r2902746 r2902750 25 25 26 26 <div class="aacb-col-12"> 27 < pclass="aacb_row">27 <div class="aacb_row"> 28 28 <?php if(!get_option('aacb_accountID')){ ?> 29 29 <p class="lead"><?php printf( __( 'Unlock all the benefits of our Ai accessibility automation with a free trial by connecting your AllAccessible account to your email below. Already using the free version? No problem! We\'ll set you up with a free 7-day trial of our premium version. After the trial period, upgrade to the premium version for just $10 a month and enjoy a more accessible digital experience.', 'allaccessible' ), get_bloginfo( 'name' ) ); ?>.</p> 30 <p><?php _e( 'Below are some additional features unlocked with AllAccessible Premium.', 'allaccessible' ); ?> 31 <ul class="aacb-features-list"> 32 <li><?php _e( 'User Control Panel', 'allaccessible' ); ?></li> 33 <li><?php _e( 'Accessibility Statement', 'allaccessible' ); ?></li> 34 <li><?php _e( 'Widget Customization (Color, Shape, Placement, etc.)', 'allaccessible' ); ?></li> 35 <li><?php _e( 'Ai Accessibility Fixes', 'allaccessible' ); ?></li> 36 <li><?php _e( 'Image Alt Text Generation', 'allaccessible' ); ?></li> 37 <li><?php _e( 'Monthly Accessibility Audits', 'allaccessible' ); ?></li> 38 <li><?php _e( 'Accessibility Accommodation Requests', 'allaccessible' ); ?></li> 39 </ul> 30 <p><?php _e( 'Below are some additional features unlocked with AllAccessible Premium.', 'allaccessible' ); ?><br /> 31 ✅ <?php _e( 'User Control Panel', 'allaccessible' ); ?><br /> 32 ✅ <?php _e( 'Accessibility Statement', 'allaccessible' ); ?><br /> 33 ✅ <?php _e( 'Widget Customization (Color, Shape, Placement, etc.)', 'allaccessible' ); ?><br /> 34 ✅ <?php _e( 'Ai Accessibility Fixes', 'allaccessible' ); ?><br /> 35 ✅ <?php _e( 'Image Alt Text Generation', 'allaccessible' ); ?><br /> 36 ✅ <?php _e( 'Monthly Accessibility Audits', 'allaccessible' ); ?><br /> 37 ✅ <?php _e( 'Accessibility Accommodation Requests', 'allaccessible' ); ?><br /> 40 38 </p> 41 39 … … 48 46 <input type="hidden" name="aacb_url" id="aacb_url" value="<?php echo get_bloginfo('wpurl'); ?>"> 49 47 </div> 50 <input class="btn btn-primary" type="submit" id="aacb-trial-btn" value="<?php esc_attr_e( __( ' Connect', 'allaccessible' ) ); ?>">48 <input class="btn btn-primary" type="submit" id="aacb-trial-btn" value="<?php esc_attr_e( __( 'Upgrade to Premium', 'allaccessible' ) ); ?>"> 51 49 </form> 52 50 <?php } else { ?> -
allaccessible/trunk/allaccessible.php
r2902746 r2902750 192 192 if ('toplevel_page_allaccessible'!= $hook ) { 193 193 wp_enqueue_style('allaccessible-style', AACB_CSS .'allaccessible-style.css',array(),AACB_VERSION); 194 wp_register_script('allaccessible-custom', AACB_JS .'allaccessible-custom.js',array(),AACB_VERSION); 195 $ajax_data = array( 196 'ajax_url' => admin_url('admin-ajax.php') 197 ); 198 wp_localize_script('allaccessible-custom', 'ajax_object', $ajax_data); 199 200 wp_enqueue_script('allaccessible-custom'); 194 201 return; 195 202 } else { … … 199 206 wp_enqueue_script('allaccessible-select2-script', 'https://cdn.jsdelivr.net/npm/[email protected]/dist/js/select2.min.js',array(),AACB_VERSION); 200 207 wp_enqueue_style('allaccessible-admin-style', AACB_CSS .'allaccessible-style.css',array(),AACB_VERSION); 201 wp_enqueue_script('allaccessible-custom', AACB_JS .'allaccessible-custom.js',array(),AACB_VERSION); 202 wp_localize_script('aacb-admin', 'ajax_object', array('ajax_url' => admin_url('admin-ajax.php'))); 208 wp_register_script('allaccessible-custom', AACB_JS .'allaccessible-custom.js',array(),AACB_VERSION); 209 $ajax_data = array( 210 'ajax_url' => admin_url('admin-ajax.php') 211 ); 212 wp_localize_script('allaccessible-custom', 'ajax_object', $ajax_data); 213 214 wp_enqueue_script('allaccessible-custom'); 203 215 } 204 216 } … … 206 218 207 219 function aacb_dismiss_notice() { 208 update_option('aacb_hide_ notice', true);209 //echo 'success';220 update_option('aacb_hide_premium_notice', true); 221 echo 'success'; 210 222 wp_die(); 211 223 } … … 254 266 function aacb_activated_notice() { 255 267 $options = get_option('aacb_options'); 256 $hide_notice = get_option('aacb_hide_ notice');268 $hide_notice = get_option('aacb_hide_premium_notice'); 257 269 258 270 if ($options['aacb_installed'] && !get_option('aacb_accountID') && !$hide_notice) { 259 271 $settings_url = admin_url('options-general.php?page=allaccessible'); 260 272 ?> 261 <div id="aacb- notice" class="notice notice-success is-dismissible">273 <div id="aacb-premium-notice" class="notice notice-success is-dismissible"> 262 274 <p><?php _e( 'Activate AllAccessible Premium to Unlock Ai Accessibility Features.', 'allaccessible' ); ?> <a href="<?php echo $settings_url; ?>"><?php _e( 'Click Here', 'allaccessible' ); ?></a></p> 263 275 </div> -
allaccessible/trunk/assets/allaccessible-custom.js
r2902746 r2902750 134 134 }); 135 135 136 $(document).ready(function ($) { 137 $(document).on('click', '#aacb-notice .notice-dismiss', function () { 138 var data = { 139 'action': 'aacb_dismiss_notice' 140 }; 136 $('#aacb-premium-notice .notice-dismiss').on('click', function () { 137 var data = { 138 'action': 'aacb_dismiss_notice' 139 }; 141 140 142 $.post(ajax_object.ajax_url, data, function (response) { 143 console.log('Notice dismissed: ' + response); 144 }); 141 $.post(ajax_object.ajax_url, data, function (response) { 142 console.log('Notice dismissed: ' + response); 145 143 }); 146 144 }); -
allaccessible/trunk/inc/AllAccessibleSettings.php
r2902746 r2902750 25 25 26 26 <div class="aacb-col-12"> 27 < pclass="aacb_row">27 <div class="aacb_row"> 28 28 <?php if(!get_option('aacb_accountID')){ ?> 29 29 <p class="lead"><?php printf( __( 'Unlock all the benefits of our Ai accessibility automation with a free trial by connecting your AllAccessible account to your email below. Already using the free version? No problem! We\'ll set you up with a free 7-day trial of our premium version. After the trial period, upgrade to the premium version for just $10 a month and enjoy a more accessible digital experience.', 'allaccessible' ), get_bloginfo( 'name' ) ); ?>.</p> 30 <p><?php _e( 'Below are some additional features unlocked with AllAccessible Premium.', 'allaccessible' ); ?> 31 <ul class="aacb-features-list"> 32 <li><?php _e( 'User Control Panel', 'allaccessible' ); ?></li> 33 <li><?php _e( 'Accessibility Statement', 'allaccessible' ); ?></li> 34 <li><?php _e( 'Widget Customization (Color, Shape, Placement, etc.)', 'allaccessible' ); ?></li> 35 <li><?php _e( 'Ai Accessibility Fixes', 'allaccessible' ); ?></li> 36 <li><?php _e( 'Image Alt Text Generation', 'allaccessible' ); ?></li> 37 <li><?php _e( 'Monthly Accessibility Audits', 'allaccessible' ); ?></li> 38 <li><?php _e( 'Accessibility Accommodation Requests', 'allaccessible' ); ?></li> 39 </ul> 30 <p><?php _e( 'Below are some additional features unlocked with AllAccessible Premium.', 'allaccessible' ); ?><br /> 31 ✅ <?php _e( 'User Control Panel', 'allaccessible' ); ?><br /> 32 ✅ <?php _e( 'Accessibility Statement', 'allaccessible' ); ?><br /> 33 ✅ <?php _e( 'Widget Customization (Color, Shape, Placement, etc.)', 'allaccessible' ); ?><br /> 34 ✅ <?php _e( 'Ai Accessibility Fixes', 'allaccessible' ); ?><br /> 35 ✅ <?php _e( 'Image Alt Text Generation', 'allaccessible' ); ?><br /> 36 ✅ <?php _e( 'Monthly Accessibility Audits', 'allaccessible' ); ?><br /> 37 ✅ <?php _e( 'Accessibility Accommodation Requests', 'allaccessible' ); ?><br /> 40 38 </p> 41 39 … … 48 46 <input type="hidden" name="aacb_url" id="aacb_url" value="<?php echo get_bloginfo('wpurl'); ?>"> 49 47 </div> 50 <input class="btn btn-primary" type="submit" id="aacb-trial-btn" value="<?php esc_attr_e( __( ' Connect', 'allaccessible' ) ); ?>">48 <input class="btn btn-primary" type="submit" id="aacb-trial-btn" value="<?php esc_attr_e( __( 'Upgrade to Premium', 'allaccessible' ) ); ?>"> 51 49 </form> 52 50 <?php } else { ?>
Note: See TracChangeset
for help on using the changeset viewer.