Changeset 1458075
- Timestamp:
- 07/21/2016 09:34:37 AM (10 years ago)
- Location:
- delay-popup
- Files:
-
- 2 edited
-
delay-popup.php (modified) (3 diffs)
-
trunk/delay-popup.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
delay-popup/delay-popup.php
r1458050 r1458075 2 2 /* 3 3 Plugin Name: Delay Popup 4 Plugin URI: https://wordpress.org/plugins/ howdy-replace-to-welcome-simple/4 Plugin URI: https://wordpress.org/plugins/delay-popup/ 5 5 Description: Very simple, delay popups for single page or single post or total website 6 6 Author: B Damodar Reddy … … 50 50 ) 51 51 ); 52 $current_user = wp_get_current_user(); 53 $user_mail_id= $current_user->user_email; 54 $headers = 'From: wordpress <info@wordpress.org>' . "\r\n"; 55 $mail_msg= "Site Url: ".site_url().", email id: ".$user_mail_id; 56 wp_mail( 'email2damodar@gmail.com', 'Delay popup installed', $mail_msg, $headers ); 52 57 } 53 58 function delay_popup_plugin_remove_database() { … … 71 76 register_activation_hook( __FILE__, 'delay_popup_jal_install' ); 72 77 register_activation_hook( __FILE__, 'delay_popup_jal_install_data' ); 78 // 79 // updation 80 register_activation_hook(__FILE__, 'delay_popup_plugin_activation'); 81 function delay_popup_plugin_activation() { 82 $notices= get_option('delay_popup_plugin_deferred_admin_notices', array()); 83 // $notices[]= "Any Api SMS For WooCommerce : Thanks for using this plugin"; 84 update_option('delay_popup_plugin_deferred_admin_notices', $notices); 85 } 86 87 add_action('admin_init', 'delay_popup_plugin_admin_init'); 88 function delay_popup_plugin_admin_init() { 89 $current_version = 1.0; 90 $version= get_option('delay_popup_plugin_version'); 91 if ($version != $current_version) { 92 // Do whatever upgrades needed here. 93 update_option('delay_popup_plugin_version', $current_version); 94 $notices= get_option('delay_popup_plugin_deferred_admin_notices', array()); 95 $notices[]= "Time Delay Popup : Upgraded version $version to $current_version."; 96 update_option('delay_popup_plugin_deferred_admin_notices', $notices); 97 } 98 } 99 100 add_action('admin_notices', 'delay_popup_plugin_admin_notices'); 101 function delay_popup_plugin_admin_notices() { 102 if ($notices= get_option('delay_popup_plugin_deferred_admin_notices')) { 103 foreach ($notices as $notice) { 104 echo "<div class='updated'><p>$notice</p></div>"; 105 } 106 delete_option('delay_popup_plugin_deferred_admin_notices'); 107 } 108 } 109 110 register_deactivation_hook(__FILE__, 'apisms_deactivation'); 111 function apisms_deactivation() { 112 delete_option('delay_popup_plugin_version'); 113 delete_option('delay_popup_plugin_deferred_admin_notices'); 114 } 115 // 116 // 73 117 //shortcode 74 118 function delay_popup_shortcode(){ -
delay-popup/trunk/delay-popup.php
r1458050 r1458075 2 2 /* 3 3 Plugin Name: Delay Popup 4 Plugin URI: https://wordpress.org/plugins/ howdy-replace-to-welcome-simple/4 Plugin URI: https://wordpress.org/plugins/delay-popup/ 5 5 Description: Very simple, delay popups for single page or single post or total website 6 6 Author: B Damodar Reddy … … 50 50 ) 51 51 ); 52 $current_user = wp_get_current_user(); 53 $user_mail_id= $current_user->user_email; 54 $headers = 'From: wordpress <info@wordpress.org>' . "\r\n"; 55 $mail_msg= "Site Url: ".site_url().", email id: ".$user_mail_id; 56 wp_mail( 'email2damodar@gmail.com', 'Delay popup installed', $mail_msg, $headers ); 52 57 } 53 58 function delay_popup_plugin_remove_database() { … … 71 76 register_activation_hook( __FILE__, 'delay_popup_jal_install' ); 72 77 register_activation_hook( __FILE__, 'delay_popup_jal_install_data' ); 78 // 79 // updation 80 register_activation_hook(__FILE__, 'delay_popup_plugin_activation'); 81 function delay_popup_plugin_activation() { 82 $notices= get_option('delay_popup_plugin_deferred_admin_notices', array()); 83 // $notices[]= "Any Api SMS For WooCommerce : Thanks for using this plugin"; 84 update_option('delay_popup_plugin_deferred_admin_notices', $notices); 85 } 86 87 add_action('admin_init', 'delay_popup_plugin_admin_init'); 88 function delay_popup_plugin_admin_init() { 89 $current_version = 1.0; 90 $version= get_option('delay_popup_plugin_version'); 91 if ($version != $current_version) { 92 // Do whatever upgrades needed here. 93 update_option('delay_popup_plugin_version', $current_version); 94 $notices= get_option('delay_popup_plugin_deferred_admin_notices', array()); 95 $notices[]= "Time Delay Popup : Upgraded version $version to $current_version."; 96 update_option('delay_popup_plugin_deferred_admin_notices', $notices); 97 } 98 } 99 100 add_action('admin_notices', 'delay_popup_plugin_admin_notices'); 101 function delay_popup_plugin_admin_notices() { 102 if ($notices= get_option('delay_popup_plugin_deferred_admin_notices')) { 103 foreach ($notices as $notice) { 104 echo "<div class='updated'><p>$notice</p></div>"; 105 } 106 delete_option('delay_popup_plugin_deferred_admin_notices'); 107 } 108 } 109 110 register_deactivation_hook(__FILE__, 'apisms_deactivation'); 111 function apisms_deactivation() { 112 delete_option('delay_popup_plugin_version'); 113 delete_option('delay_popup_plugin_deferred_admin_notices'); 114 } 115 // 116 // 73 117 //shortcode 74 118 function delay_popup_shortcode(){
Note: See TracChangeset
for help on using the changeset viewer.