Plugin Directory

Changeset 2690315


Ignore:
Timestamp:
03/07/2022 06:57:31 PM (4 years ago)
Author:
simplestage
Message:

Add redirect to activation

Location:
simplestage/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • simplestage/trunk/AdminSetup.php

    r2690254 r2690315  
    1616        add_filter( 'plugin_action_links_simplestage/simplestage.php', array( $this, 'settings_link' ) );
    1717        add_action( 'admin_init', array( $this, 'register_settings' ) );
     18        add_action( 'admin_init', array( $this, 'maybe_redirect' ) );
     19        register_activation_hook( __FILE__, array( $this, 'activate' ) );
     20    }
     21
     22
     23    /**
     24     * since 1.0.3
     25     */
     26    public function activate()
     27    {
     28        add_option( 'simplestage_do_activation_redirect', true );
     29    }
     30
     31    /**
     32     * since 1.0.3
     33     */
     34    public function maybe_redirect()
     35    {
     36        if ( get_option( 'simplestage_do_activation_redirect', false ) ) {
     37            delete_option( 'simplestage_do_activation_redirect' );
     38            exit( wp_redirect( "options-general.php?page=simplestage" ) );
     39        }
    1840    }
    1941
  • simplestage/trunk/readme.txt

    r2690254 r2690315  
    55Tested up to: 5.9
    66Requires PHP: 5.6
    7 Stable tag: 1.0.2
     7Stable tag: 1.0.3
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
  • simplestage/trunk/simplestage.php

    r2690254 r2690315  
    44 * Plugin URI: https://simplestage.com
    55 * Description: Add the Simplestage Web Request script to your site
    6  * Version: 1.0.2
     6 * Version: 1.0.3
    77 * Author: SimpleStage
    88 * Tested up to: 5.9
Note: See TracChangeset for help on using the changeset viewer.