</div><!-- inside --> </div><!-- postbox --> <div id="email-users-donation" class="postbox email-users-postbox"> <div class="handlediv" title="Click to toggle"><br /></div> <h3 class="hndle"><span><?php _e('Make a Donation', MAILUSERS_I18N_DOMAIN); ?> </span></h3> <div class="inside"> <div style="text-align: center; font-size: 0.75em;padding:0px 5px;margin:0px auto;"><!-- PayPal box wrapper --> <div><!-- PayPal box--> <p style="margin: 0.25em 0"><b>Email Users <?php echo mailusers_get_current_version(); ?> </b></p> <p style="margin: 0.25em 0"><a href="http://email-users.vincentprat.info" target="_blank"><?php _e('Plugin\'s Home Page', MAILUSERS_I18N_DOMAIN); ?> </a></p> <form action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_s-xclick"> <input type="hidden" name="hosted_button_id" value="EYKMSYDUL746U"> <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"> <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1"> </form> </div><!-- PayPal box --> </div>
function mailusers_plugin_activation() { mailusers_init_i18n(); $installed_version = mailusers_get_installed_version(); if ($installed_version == mailusers_get_current_version()) { // do nothing } elseif ($installed_version == '') { $plugin_settings = mailusers_get_default_plugin_settings(); // Add the options which will add them if they don't // exist but won't overwrite any existing settings. foreach ($plugin_settings as $key => $value) { add_option($key, $value); } mailusers_add_default_capabilities(); mailusers_add_default_user_meta(); } else { if ($installed_version >= '2.0' && $installed_version < '3.0.0') { // Version 2.x, a bug was corrected in the template, update it $plugin_settings = mailusers_get_default_plugin_settings(); // Add the options which will add them if they don't // exist but won't overwrite any existing settings. foreach ($plugin_settings as $key => $value) { add_option($key, $value); } delete_option('mailusers_mail_user_level'); delete_option('mailusers_mail_method'); delete_option('mailusers_smtp_port'); delete_option('mailusers_smtp_server'); delete_option('mailusers_smtp_user'); delete_option('mailusers_smtp_authentication'); delete_option('mailusers_smtp_password'); // Remove old capabilities $role = get_role('editor'); $role->remove_cap('email_users'); mailusers_add_default_capabilities(); mailusers_add_default_user_meta(); } else { } } // Update version number update_option('mailusers_version', mailusers_get_current_version()); }