Changeset 3162486
- Timestamp:
- 10/04/2024 06:41:02 AM (18 months ago)
- Location:
- givingx
- Files:
-
- 6 edited
-
tags/1.0.0/admin/class-givingx-admin.php (modified) (1 diff)
-
tags/1.0.0/includes/class-givingx-activator.php (modified) (1 diff)
-
tags/1.0.0/includes/class-givingx.php (modified) (1 diff)
-
trunk/admin/class-givingx-admin.php (modified) (1 diff)
-
trunk/includes/class-givingx-activator.php (modified) (1 diff)
-
trunk/includes/class-givingx.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
givingx/tags/1.0.0/admin/class-givingx-admin.php
r3146804 r3162486 243 243 } 244 244 245 /** 246 * Redirect to a specific page after activation 247 * 248 * @since 1.0.0 249 */ 250 public function givingx_redirect_after_activation() { 251 // Check if the transient is set 252 if (get_transient('givingx_activation_redirect')) { 253 // Delete the transient to avoid future redirects 254 delete_transient('givingx_activation_redirect'); 255 256 // Prevent redirect on multisite activation 257 if (is_network_admin() || isset($_GET['activate-multi'])) { 258 return; 259 } 260 261 // Redirect to your desired page 262 wp_redirect(admin_url('admin.php?page=givingx')); 263 exit; 264 } 265 } 266 245 267 } -
givingx/tags/1.0.0/includes/class-givingx-activator.php
r3146804 r3162486 33 33 */ 34 34 public static function activate() { 35 35 // Set a transient to trigger redirect after activation 36 set_transient('givingx_activation_redirect', true, 30); 36 37 } 37 38 -
givingx/tags/1.0.0/includes/class-givingx.php
r3146804 r3162486 171 171 172 172 $plugin_admin = new Givingx_Admin( $this->get_plugin_name(), $this->get_version() ); 173 173 174 /** 175 * Plugin Page Redirect 176 */ 177 $this->loader->add_action( 'admin_init', $plugin_admin, 'givingx_redirect_after_activation' ); 178 174 179 /** 175 180 * Admin Menu Ui Prepare -
givingx/trunk/admin/class-givingx-admin.php
r3146804 r3162486 243 243 } 244 244 245 /** 246 * Redirect to a specific page after activation 247 * 248 * @since 1.0.0 249 */ 250 public function givingx_redirect_after_activation() { 251 // Check if the transient is set 252 if (get_transient('givingx_activation_redirect')) { 253 // Delete the transient to avoid future redirects 254 delete_transient('givingx_activation_redirect'); 255 256 // Prevent redirect on multisite activation 257 if (is_network_admin() || isset($_GET['activate-multi'])) { 258 return; 259 } 260 261 // Redirect to your desired page 262 wp_redirect(admin_url('admin.php?page=givingx')); 263 exit; 264 } 265 } 266 245 267 } -
givingx/trunk/includes/class-givingx-activator.php
r3146804 r3162486 33 33 */ 34 34 public static function activate() { 35 35 // Set a transient to trigger redirect after activation 36 set_transient('givingx_activation_redirect', true, 30); 36 37 } 37 38 -
givingx/trunk/includes/class-givingx.php
r3146804 r3162486 171 171 172 172 $plugin_admin = new Givingx_Admin( $this->get_plugin_name(), $this->get_version() ); 173 173 174 /** 175 * Plugin Page Redirect 176 */ 177 $this->loader->add_action( 'admin_init', $plugin_admin, 'givingx_redirect_after_activation' ); 178 174 179 /** 175 180 * Admin Menu Ui Prepare
Note: See TracChangeset
for help on using the changeset viewer.