Notifications
Clear all

Limited Support

Our team is currently on holiday, so support will be limited during this period. Response times may be slower than usual, and some inquiries may be delayed.
We appreciate your patience and understanding, and we’ll resume our usual support by the end of August.

 

Script [Closed] How to make error/success notices last longer

3 Posts
2 Users
2 Reactions
1,272 Views
JorgeW
Posts: 107
Topic starter
(@jorgew)
Estimable Member
Joined: 6 years ago

Hi @robert, @chris,

How can I give more time to read the notices that appear on top-right confirming actions, like post submitted, post edited, and especially when there was an error?

Currently users have about 1sec (I guess) to read those messages.

Thanks

2 Replies
JorgeW
Posts: 107
Topic starter
(@jorgew)
Estimable Member
Joined: 6 years ago
Posts: 990
Moderator
(@martin)
Support Team
Joined: 9 years ago

Hi @jorgew,

The error message duration is currently set 8 seconds. You can manage them using following hook codes in a PHP code snippet of the Code Snippets plugin:

function custom_wpforo_error_message_duration( $duration_in_milliseconds ){
	$duration_in_milliseconds = 10000; //10 seconds. 1000 is one second
	return $duration_in_milliseconds;
}
add_filter( 'wpforo_notice_timeout_error', 'custom_wpforo_error_message_duration', 11);

function custom_wpforo_success_message_duration( $duration_in_milliseconds ){
	$duration_in_milliseconds = 10000; //10 seconds. 1000 is one second
	return $duration_in_milliseconds;
}
add_filter( 'wpforo_notice_timeout_success', 'custom_wpforo_success_message_duration', 11);