= $remind_due ) { add_action( 'admin_notices', [ __CLASS__, 'rtwpvg_display_admin_notice' ] ); } elseif ( ( $past_date >= $install_date ) && $nobug !== '2' ) { add_action( 'admin_notices', [ __CLASS__, 'rtwpvg_display_admin_notice' ] ); } } /** * Remove the notice for the user if review already done or if the user does not want to * * @return void */ public static function rtwpvg_spare_me() { if ( ! isset( $_REQUEST['_wpnonce'] ) || ! wp_verify_nonce( sanitize_text_field( wp_unslash( $_REQUEST['_wpnonce'] ) ), 'rtwpvg_notice_nonce' ) ) { return; } if ( isset( $_GET['rtwpvg_spare_me'] ) && ! empty( $_GET['rtwpvg_spare_me'] ) ) { $spare_me = sanitize_text_field( wp_unslash( $_GET['rtwpvg_spare_me'] ) ); if ( 1 == $spare_me ) { update_option( 'rtwpvg_spare_me', '1' ); } } if ( isset( $_GET['rtwpvg_remind_me'] ) && ! empty( $_GET['rtwpvg_remind_me'] ) ) { $remind_me = sanitize_text_field( wp_unslash( $_GET['rtwpvg_remind_me'] ) ); if ( 1 == $remind_me ) { $get_activation_time = strtotime( 'now' ); update_option( 'rtwpvg_remind_me', $get_activation_time ); update_option( 'rtwpvg_spare_me', '2' ); } } if ( isset( $_GET['rtwpvg_rated'] ) && ! empty( $_GET['rtwpvg_rated'] ) ) { $rtwpvg_rated = sanitize_text_field( wp_unslash( $_GET['rtwpvg_rated'] ) ); if ( 1 == $rtwpvg_rated ) { update_option( 'rtwpvg_rated', 'yes' ); update_option( 'rtwpvg_spare_me', '3' ); } } } protected static function rtwpvg_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', 'rtwpvg_spare_me', 'rtwpvg_remind_me', 'rtwpvg_rated' ], admin_url( $uri ) ); } /** * Display Admin Notice, asking for a review **/ public static function rtwpvg_display_admin_notice() { // WordPress global variable global $pagenow; $exclude = [ 'themes.php', 'users.php', 'tools.php', 'options-general.php', 'options-writing.php', 'options-reading.php', 'options-discussion.php', 'options-media.php', 'options-permalink.php', 'options-privacy.php', 'edit-comments.php', 'upload.php', 'media-new.php', 'admin.php', 'import.php', 'export.php', 'site-health.php', 'export-personal-data.php', 'erase-personal-data.php' ]; if ( ! in_array( $pagenow, $exclude ) ) { $args = [ '_wpnonce' => wp_create_nonce( 'rtwpvg_notice_nonce' ) ]; $dont_disturb = add_query_arg( $args + [ 'rtwpvg_spare_me' => '1' ], self::rtwpvg_current_admin_url() ); $remind_me = add_query_arg( $args + [ 'rtwpvg_remind_me' => '1' ], self::rtwpvg_current_admin_url() ); $rated = add_query_arg( $args + [ 'rtwpvg_rated' => '1' ], self::rtwpvg_current_admin_url() ); $reviewurl = 'https://wordpress.org/support/plugin/woo-product-variation-gallery/reviews/?filter=5#new-post'; ?>

Enjoying Variation Images Gallery?

Thank you for choosing Variation Images Gallery. If you have found our plugin useful and makes you smile, please consider giving us a 5-star rating on WordPress.org. It will help us to grow.