Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug(admin-notices): Auto dismiss of front-end notices does not work #2869

Closed
Sidsector9 opened this issue Mar 5, 2018 · 0 comments
Closed
Assignees

Comments

@Sidsector9
Copy link
Contributor

Issue Overview

In the PHP code:

We set values for dismissible as:

/**
 * Change auto_dismissible to dismissible and set the value to true
 *
 * @since 1.8.14
 */
$default_notice_args = array(
	'dismissible'      => true,
	'dismiss_interval' => 5000,
);

And in jQuery, the comparison is done with "auto"

var give_notices = jQuery( '.give_notice[data-dismissible="auto"]' );

This causes the feature to not work because comparison is done between auto and 1

Expected Behavior

Front end notices should automatically hide if dismissible is set

Current Behavior

Auto dismissible front end notice does not work

Possible Solution

Either set 'dismissible' => auto OR set jQuery( '.give_notice[data-dismissible="1"]' )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants