id, [ 'edit-rttpg', 'rttpg' ], true ) && 'elementor' === $settings['tpg_block_type'] ) { ?>

%3$s', esc_html__( 'You have selected only Elementor method. To use Shortcode Generator please enable shortcode or default from ', 'the-post-grid' ), esc_url( admin_url( 'edit.php?post_type=rttpg&page=rttpg_settings' ) ), esc_html__( 'Settings => Common Settings => Resource Load Type', 'the-post-grid' ) ); ?>

id && 'shortcode' === $settings['tpg_block_type'] ) { ?>

%3$s', esc_html__( 'You have selected only Shortcode Generator method. To use Elementor please enable Elementor or default from ', 'the-post-grid' ), esc_url( admin_url( 'edit.php?post_type=rttpg&page=rttpg_settings§ion=common-settings' ) ), esc_html__( 'Settings => Common Settings => Resource Load Type', 'the-post-grid' ) ); ?>

<?php echo esc_attr( $plugin_name ); ?>

Don't miss out on our biggest sale of the year! Get your plan with UPTO 50% OFF! Limited time offer!!!

Buy Now Dismiss

= $remind_due ) { add_action( 'admin_notices', [ __CLASS__, 'rttpg_display_admin_notice' ] ); } else if ( ( $past_date >= $install_date ) && '2' !== $nobug ) { add_action( 'admin_notices', [ __CLASS__, 'rttpg_display_admin_notice' ] ); } } /** * Display Admin Notice, asking for a review * * @return void */ public static function rttpg_display_admin_notice() { 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( 'rttpg_notice_nonce' ) ]; $dont_disturb = add_query_arg( $args + [ 'rttpg_spare_me' => '1' ], self::rttpg_current_admin_url() ); $remind_me = add_query_arg( $args + [ 'rttpg_remind_me' => '1' ], self::rttpg_current_admin_url() ); $rated = add_query_arg( $args + [ 'rttpg_rated' => '1' ], self::rttpg_current_admin_url() ); $reviewurl = 'https://wordpress.org/support/plugin/the-post-grid/reviews/?filter=5#new-post'; printf( '

%1$s

%2$s

', esc_html__( 'Enjoying The Post Grid?', 'the-post-grid' ), esc_html__( 'Thank you for choosing The Post Grid. 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.', 'the-post-grid' ), esc_url( $reviewurl ), esc_url( $rated ), esc_url( $remind_me ), esc_url( $dont_disturb ) ); echo ''; } } /** * Current admin URL. * * @return string */ protected static function rttpg_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 ) ); } /** * Remove the notice for the user if review already done * * @return void */ public static function rttpg_spare_me() { if ( ! isset( $_REQUEST['_wpnonce'] ) || ! wp_verify_nonce( $_REQUEST['_wpnonce'], 'rttpg_notice_nonce' ) ) { return; } if ( isset( $_GET['rttpg_spare_me'] ) && ! empty( $_GET['rttpg_spare_me'] ) ) { $spare_me = absint( $_GET['rttpg_spare_me'] ); if ( 1 == $spare_me ) { update_option( 'rttpg_spare_me', '1' ); } } if ( isset( $_GET['rttpg_remind_me'] ) && ! empty( $_GET['rttpg_remind_me'] ) ) { $remind_me = absint( $_GET['rttpg_remind_me'] ); if ( 1 == $remind_me ) { $get_activation_time = strtotime( 'now' ); update_option( 'rttpg_remind_me', $get_activation_time ); update_option( 'rttpg_spare_me', '2' ); } } if ( isset( $_GET['rttpg_rated'] ) && ! empty( $_GET['rttpg_rated'] ) ) { $rttpg_rated = absint( $_GET['rttpg_rated'] ); if ( 1 == $rttpg_rated ) { update_option( 'rttpg_rated', 'yes' ); update_option( 'rttpg_spare_me', '3' ); } } } }