wp/wp-content/plugins/portfolio/inc/demo-data/class-bws-demo-data.php
changeset 16 a86126ab1dd4
parent 12 d8a8807227e4
--- a/wp/wp-content/plugins/portfolio/inc/demo-data/class-bws-demo-data.php	Tue Oct 22 16:11:46 2019 +0200
+++ b/wp/wp-content/plugins/portfolio/inc/demo-data/class-bws-demo-data.php	Tue Dec 15 13:49:49 2020 +0100
@@ -2,7 +2,7 @@
 
 /**
  * Load demo data
- * @version 1.0.3
+ * @version 1.0.4
  */
 
 if ( ! class_exists( 'Bws_Demo_Data' ) ) {
@@ -532,7 +532,7 @@
 
 		function bws_handle_demo_notice( $show_demo_notice ) {
 
-			if ( 1 == $show_demo_notice ) {
+			if ( 1 == $show_demo_notice && empty( $this->bws_demo_options ) ) {
 				global $wp_version;
 
 				if ( isset( $_POST['bws_hide_demo_notice'] ) && check_admin_referer( $this->bws_plugin_basename, 'bws_demo_nonce_name' ) ) {
@@ -582,14 +582,19 @@
 							}
 						</style>
 					<?php } ?>
-					<div class="update-nag" style="position: relative;">
-						<form id="bws_handle_notice_form" action="" method="post">
-							<button class="notice-dismiss bws_hide_demo_notice" title="<?php _e( 'Close notice', $this->bws_plugin_text_domain ); ?>"></button>
-							<input type="hidden" name="bws_hide_demo_notice" value="hide" />
+                    <div class="notice" style="position: relative;">
+                        <form id="bws_handle_notice_form" action="" method="post">
+                            <button class="notice-dismiss bws_hide_demo_notice" title="<?php _e( 'Close notice', $this->bws_plugin_text_domain ); ?>"></button>
+                            <input type="hidden" name="bws_hide_demo_notice" value="hide" />
 							<?php wp_nonce_field( $this->bws_plugin_basename, 'bws_demo_nonce_name' ); ?>
-						</form>
-						<div style="margin: 0 20px;"><?php printf( __( 'Do you want to install demo content and settings for %s (You can do this later using Import / Export settings)?', $this->bws_plugin_text_domain ), '<a href="edit.php?post_type=bws-portfolio&page=portfolio.php">Portfolio by BestWebSoft</a>' ); ?>&nbsp;<a href="<?php echo admin_url( 'admin.php?page=' . $this->bws_plugin_page ); ?>"><?php _e( 'Yes, install demo now', $this->bws_plugin_text_domain ); ?></a></div>
-					</div>
+                        </form>
+                        <p>
+							<?php printf(
+								__( 'Do you want to install demo content and settings for %s now?', $this->bws_plugin_text_domain ),
+								'<b>' . $this->bws_plugin_name . ' by BestWebSoft</b>'
+							); ?>&nbsp;<a href="<?php echo admin_url( 'admin.php?page=' . $this->bws_plugin_page ); ?>"><?php _e( 'Yes, install demo data', $this->bws_plugin_text_domain ); ?></a>
+                        </p>
+                    </div>
 				<?php }
 			}
 		}