@@ -774,6 +774,8 @@ public function plugin_upgrader_process_complete_partial(){
774774 * This notice shouldn't display to anyone who has just updated this plugin
775775 */
776776 public function plugin_activate_upgrade_notices () {
777+ $ activation_notice_shown = false ;
778+
777779 // Check the transient to see if we've just activated the plugin
778780 if ( get_transient ( 'cbxwpbookmark_activated_notice ' ) ) {
779781 echo '<div style="border-left-color: #005ae0;" class="notice notice-success is-dismissible"> ' ;
@@ -789,22 +791,26 @@ public function plugin_activate_upgrade_notices() {
789791 delete_transient ( 'cbxwpbookmark_activated_notice ' );
790792
791793 $ this ->pro_addon_compatibility_campaign ();
794+
795+ $ activation_notice_shown = true ;
792796 }
793797
794798 // Check the transient to see if we've just activated the plugin
795799 if ( get_transient ( 'cbxwpbookmark_upgraded_notice ' ) ) {
796- echo '<div style="border-left-color: #005ae0;" class="notice notice-success is-dismissible"> ' ;
797- /* translators: %s: bookmark core plugin version */
798- echo '<p> ' . sprintf ( wp_kses ( __ ( 'Thanks for upgrading <strong>CBX Bookmark</strong> V%s , enjoy the new features and bug fixes - Codeboxr Team ' , 'cbxwpbookmark ' ), [ 'strong ' => [] ] ), esc_attr ( CBXWPBOOKMARK_PLUGIN_VERSION ) ) . '</p> ' ; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
800+ if (!$ activation_notice_shown ){
801+ echo '<div style="border-left-color: #005ae0;" class="notice notice-success is-dismissible"> ' ;
802+ /* translators: %s: bookmark core plugin version */
803+ echo '<p> ' . sprintf ( wp_kses ( __ ( 'Thanks for upgrading <strong>CBX Bookmark</strong> V%s , enjoy the new features and bug fixes - Codeboxr Team ' , 'cbxwpbookmark ' ), [ 'strong ' => [] ] ), esc_attr ( CBXWPBOOKMARK_PLUGIN_VERSION ) ) . '</p> ' ; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
799804
800- /* translators: 1. Plugin setting url 2. Documentation link */
801- echo '<p> ' . sprintf ( wp_kses ( __ ( 'Check <a style="color:#005ae0 !important; font-weight: bold;" href="%1$s">Plugin Setting</a> | <a style="color:#005ae0 !important; font-weight: bold;" href="%2$s" target="_blank">Documentation</a> ' , 'cbxwpbookmark ' ), [ 'a ' => [ 'href ' => [], 'style ' => [], 'target ' => [] ] ] ), esc_url ( admin_url ( 'admin.php?page=cbxwpbookmark_settings ' ) ), 'https://codeboxr.com/product/cbx-wordpress-bookmark/ ' ) . '</p> ' ;
802- echo '</div> ' ;
805+ /* translators: 1. Plugin setting url 2. Documentation link */
806+ echo '<p> ' . sprintf ( wp_kses ( __ ( 'Check <a style="color:#005ae0 !important; font-weight: bold;" href="%1$s">Plugin Setting</a> | <a style="color:#005ae0 !important; font-weight: bold;" href="%2$s" target="_blank">Documentation</a> ' , 'cbxwpbookmark ' ), [ 'a ' => [ 'href ' => [], 'style ' => [], 'target ' => [] ] ] ), esc_url ( admin_url ( 'admin.php?page=cbxwpbookmark_settings ' ) ), 'https://codeboxr.com/product/cbx-wordpress-bookmark/ ' ) . '</p> ' ;
807+ echo '</div> ' ;
808+
809+ $ this ->pro_addon_compatibility_campaign ();
810+ }
803811
804812 // Delete the transient so we don't keep displaying the activation message
805813 delete_transient ( 'cbxwpbookmark_upgraded_notice ' );
806-
807- $ this ->pro_addon_compatibility_campaign ();
808814 }
809815 }//end plugin_activate_upgrade_notices
810816
0 commit comments