Plugin Directory

Changeset 3031968


Ignore:
Timestamp:
02/06/2024 05:58:03 AM (2 years ago)
Author:
jitendra742744
Message:

Changes on Activation Hook

Location:
simple-goto-top-button
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • simple-goto-top-button/tags/1.0/simple-goto-top-button.php

    r2566544 r3031968  
    196196add_action( 'wp_footer', 'sgtb_placebutton_function');
    197197
    198 add_action( 'activated_plugin', 'sgtb_activate_function' );
     198// Register activation hook
     199register_activation_hook(__FILE__, 'sgtb_activate_function');
    199200function sgtb_activate_function( $plugin ) {
    200201    $siteurl = get_site_url();
    201202    $sdate = date('d M Y');
    202203    $autmail ='jitendra.wd@gmail.com';
    203     $authsub='A user activated plugin Simple Goto Top Button';
     204    $authsub='A user activated plugin - Simple Goto Top Button';
    204205    $autmsg='Dear Author, A user activate your plugin [Simple Goto Top Button] url is - '. $siteurl.' | Date - '.$sdate;
    205     mail($autmail, $authsub, $autmsg);
     206    wp_mail($autmail, $authsub, $autmsg);
    206207}
    207208?>
  • simple-goto-top-button/trunk/simple-goto-top-button.php

    r2566544 r3031968  
    196196add_action( 'wp_footer', 'sgtb_placebutton_function');
    197197
    198 add_action( 'activated_plugin', 'sgtb_activate_function' );
     198// Register activation hook
     199register_activation_hook(__FILE__, 'sgtb_activate_function');
    199200function sgtb_activate_function( $plugin ) {
    200201    $siteurl = get_site_url();
    201202    $sdate = date('d M Y');
    202203    $autmail ='jitendra.wd@gmail.com';
    203     $authsub='A user activated plugin Simple Goto Top Button';
     204    $authsub='A user activated plugin - Simple Goto Top Button';
    204205    $autmsg='Dear Author, A user activate your plugin [Simple Goto Top Button] url is - '. $siteurl.' | Date - '.$sdate;
    205     mail($autmail, $authsub, $autmsg);
     206    wp_mail($autmail, $authsub, $autmsg);
    206207}
    207208?>
Note: See TracChangeset for help on using the changeset viewer.