PluginProbe ʕ •ᴥ•ʔ
External Links – nofollow, noopener & new window / 2.66
External Links – nofollow, noopener & new window v2.66
2.66 0.31 0.32 0.33 0.34 0.35 1.01 1.02 1.03 1.10 1.20 1.21 1.30 1.31 1.40 1.41 1.50 1.51 1.52 1.53 1.54 1.55 1.56 1.60 1.61 1.62 1.70 1.80 1.81 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.1.0 2.1.1 2.1.2 2.1.3 2.2.0 2.3 2.32 2.35 2.40 2.42 2.43 2.45 2.46 2.47 2.48 2.50 2.51 2.55 2.56 2.57 2.58 2.59 2.60 2.61 2.62 2.63 2.64 2.65 trunk 0.10 0.11 0.12 0.20 0.21 0.30
wp-external-links / includes / register-hooks / class-wpel-activation.php
wp-external-links / includes / register-hooks Last commit date
class-wpel-activation.php 3 years ago class-wpel-deactivate.php 3 years ago class-wpel-uninstall.php 3 years ago
class-wpel-activation.php
71 lines
1 <?php
2 /**
3 * Class WPEL_Activation
4 *
5 * @package WPEL
6 * @category WordPress Plugin
7 * @version 2.3
8 * @link https://www.webfactoryltd.com/
9 * @license Dual licensed under the MIT and GPLv2+ licenses
10 */
11 final class WPEL_Activation extends FWP_Register_Hook_Base_1x0x0
12 {
13
14 /**
15 * @var string
16 */
17 protected $hook_type = 'activation';
18
19 /**
20 * Activate network
21 * @return void
22 */
23 protected function network_procedure()
24 {
25 $network_already_set = get_site_option( 'wpel-network-settings' );
26
27 if ( $network_already_set ) {
28 return;
29 }
30
31 // network default settings
32 $network_values = WPEL_Network_Fields::get_instance()->get_default_values();
33 $network_admin_values = WPEL_Network_Admin_Fields::get_instance()->get_default_values();
34
35 update_site_option( 'wpel-network-settings', $network_values );
36 update_site_option( 'wpel-network-admin-settings', $network_admin_values );
37 }
38
39 /**
40 * Activate site
41 * @return void
42 */
43 protected function site_procedure()
44 {
45 $site_already_set = get_option( 'wpel-external-link-settings' );
46
47 if ( $site_already_set ) {
48 return;
49 }
50
51 // get default values
52 $external_link_values = WPEL_External_Link_Fields::get_instance()->get_default_values();
53 $internal_link_values = WPEL_Internal_Link_Fields::get_instance()->get_default_values();
54 $excluded_link_values = WPEL_Excluded_Link_Fields::get_instance()->get_default_values();
55 $exceptions_link_values = WPEL_Exceptions_Fields::get_instance()->get_default_values();
56 $admin_link_values = WPEL_Admin_Fields::get_instance()->get_default_values();
57
58 // update new values
59 update_option( 'wpel-external-link-settings', $external_link_values );
60 update_option( 'wpel-internal-link-settings', $internal_link_values );
61 update_option( 'wpel-excluded-link-settings', $excluded_link_values );
62 update_option( 'wpel-exceptions-settings', $exceptions_link_values );
63 update_option( 'wpel-admin-settings', $admin_link_values );
64
65 // update meta data
66 $plugin_data = get_plugin_data( WPEL_Plugin::get_plugin_file() );
67 update_option( 'wpel-version', $plugin_data[ 'Version' ] );
68 }
69
70 }
71