' . __( 'Settings' ) . '' ); $go_pro_link = sprintf( '' . __( 'Go Pro' ) . '' ); array_push( $links, $settings_link, $go_pro_link ); return $links; } $plugin = plugin_basename( __FILE__ ); add_filter( "plugin_action_links_$plugin", 'eael_add_settings_link' ); // Redirect to options page register_activation_hook(__FILE__, 'eael_activate'); add_action('admin_init', 'eael_redirect'); function eael_activate() { add_option('eael_do_activation_redirect', true); } function eael_redirect() { if (get_option('eael_do_activation_redirect', false)) { delete_option('eael_do_activation_redirect'); if(!isset($_GET['activate-multi'])) { wp_redirect("admin.php?page=eael-settings"); } } } // Optional usage tracker if( ! class_exists( 'Eael_Plugin_Usage_Tracker') ) { require_once dirname( __FILE__ ) . '/includes/class-plugin-usage-tracker.php'; } if( ! function_exists( 'essential_addons_elementor_lite_start_plugin_tracking' ) ) { function essential_addons_elementor_lite_start_plugin_tracking() { $wisdom = new Eael_Plugin_Usage_Tracker( __FILE__, 'https://wpdeveloper.net', array(), true, true, 1 ); } essential_addons_elementor_lite_start_plugin_tracking(); } // admin notice add_action('admin_notices', 'eael_admin_notice'); function eael_admin_notice() { if ( current_user_can( 'install_plugins' ) ) { global $current_user ; $user_id = $current_user->ID; /* Check that the user hasn't already clicked to ignore the message */ if ( ! get_user_meta($user_id, 'eael_ignore_notice241') ) { echo '
'; echo ' '; printf(__('Last chance to grab the New Year Deal!! Enjoy 25% discount on Essential Addons for Elementor Pro. Use the coupon "NewYear" Grab the Deal No Thanks'), admin_url( 'admin.php?page=eael-settings&eael_nag_ignore=0' )); echo "