= $remind_due ) { add_action( 'admin_notices', [__CLASS__, 'show_notice']); } else if (($past_date >= $install_date) && $nobug !== "2") { add_action( 'admin_notices', [__CLASS__, 'show_notice']); } } public static function show_notice() { global $pagenow; $exclude = []; if ( ! in_array( $pagenow, $exclude ) ) { $dont_disturb = esc_url( add_query_arg( 'donot_disturb', '1', self::current_admin_url() ) ); $remind_me = esc_url( add_query_arg( 'thepack_remind_me', '1', self::current_admin_url() ) ); $plugin = 'the-pack-addon/index.php'; if ( file_exists( WP_PLUGIN_DIR . '/the-pack-addon/index.php' ) ) { $action_url = wp_nonce_url( 'plugins.php?action=activate&plugin=' . $plugin . '&plugin_status=all&paged=1&s', 'activate-plugin_' . $plugin ); $button_label = __( 'Activate The Pack', 'icon-element' ); } else { $action_url = wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=the-pack-addon' ), 'install-plugin_the-pack-addon' ); $button_label = __( 'Install The Pack Addon', 'icon-element' ); } echo '

The Biggest Elementor Library

Top notch elementor addon for your site ! 74+ free widgets, header & footer builder, 30+ pages and more. Grab it today !

'; echo ''; } } // remove the notice for the user if review already done or if the user does not want to public static function donot_disturb() { if ( isset( $_GET['donot_disturb'] ) && ! empty( $_GET['donot_disturb'] ) ) { $spare_me = $_GET['donot_disturb']; if ( 1 == $spare_me ) { update_option( 'donot_disturb', "1" ); } } if ( isset( $_GET['thepack_remind_me'] ) && ! empty( $_GET['thepack_remind_me'] ) ) { $remind_me = $_GET['thepack_remind_me']; if ( 1 == $remind_me ) { $get_activation_time = strtotime( "now" ); update_option( 'thepack_remind_me', $get_activation_time ); update_option( 'donot_disturb', "2" ); } } } protected static function current_admin_url() { $uri = isset( $_SERVER['REQUEST_URI'] ) ? esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) ) : ''; $uri = preg_replace( '|^.*/wp-admin/|i', '', $uri ); if ( ! $uri ) { return ''; } return remove_query_arg( [ '_wpnonce', '_wc_notice_nonce', 'wc_db_update', 'wc_db_update_nonce', 'wc-hide-notice' ], admin_url( $uri ) ); } } Thepack_Marketing_Notice::init(); }