';
echo '
' . $msg['msg'] . '
';
if ( 'error' !== $msg['type'] ) {
echo '
Dismiss Notice';
echo '
';
}
echo '
';
}
}
}
public function add_error( $msg, $global = false ) {
$this->add_msg( $msg, 'error', $global );
}
public function add_warning( $msg, $global = false ) {
$this->add_msg( $msg, 'warning', $global );
}
public function add_success( $msg, $global = false ) {
$this->add_msg( $msg, 'success', $global );
}
public function nag_ignore() {
if ( ! isset( $_GET['woodmart-hide-notice'] ) ) {
return;
}
global $current_user;
$user_id = $current_user->ID;
$hide_notice = sanitize_text_field( wp_unslash( $_GET['woodmart-hide-notice'] ) );
//delete_user_meta($user_id, $this->ignore_key);
/* If user clicks to ignore the notice, add that to their user meta */
if ( $hide_notice ) {
add_user_meta( $user_id, $hide_notice, true );
}
}
}