Activity > Comments section. ISL loads the standard js and not the disable ISL TinyMCE js.
Applies to all other instances of TinyMCE used by plugins and themes:
wp_editor() instances Visual editor cannot have Event Listeners added outside of TinyMCE. If someone does NOT choose to disable ISL for TinyMCE instances, then if someone is idle for X minutes and focused in the TinyMCE Visual editor window and the ISL timeout fires then they will be logged out and all unsaved content in the TinyMCE Visual editing window will be lost.
TinyMCE Notes:
Consistent element id to check for instances of TinyMCE: id='editor-buttons-css'
WordPress element id to check for Post, Page & Comment TinyMCE Editor: id="wp-content-editor-container"
.54.1: switched to Roles instead of using user_level
.54.1: Request URI Exclusion option|condition added
.54.2: Added Custom Roles
*/
##
function bpsPro_idle_session_logout() {
$BPS_ISL_options = get_option('bulletproof_security_options_idle_session');
if ( $BPS_ISL_options['bps_isl'] == 'On' ) {
if ( $BPS_ISL_options['bps_isl_timeout'] == '' ) {
return;
}
$uri_exclusions = array_filter( explode( ', ', trim( $BPS_ISL_options['bps_isl_uri_exclusions'], ", \t\n\r") ) );
if ( in_array( esc_html($_SERVER['REQUEST_URI']), $uri_exclusions ) ) {
return;
}
global $current_user, $pagenow;
$current_user = wp_get_current_user();
$user_roles = $current_user->roles;
$user_role = array_shift($user_roles);
if ( @! preg_match( '/'.$current_user->user_login.'/i', $BPS_ISL_options['bps_isl_user_account_exceptions'], $matches ) ) {
if ( $user_role == 'administrator' && $BPS_ISL_options['bps_isl_administrator'] == '1' || $user_role == 'editor' && $BPS_ISL_options['bps_isl_editor'] == '1' || $user_role == 'author' && $BPS_ISL_options['bps_isl_author'] == '1' || $user_role == 'contributor' && $BPS_ISL_options['bps_isl_contributor'] == '1' || $user_role == 'subscriber' && $BPS_ISL_options['bps_isl_subscriber'] == '1' ) {
$timeout = $BPS_ISL_options['bps_isl_timeout'] * 60000;
if ( $BPS_ISL_options['bps_isl_tinymce'] == '1' && 'index.php' != $pagenow ) {
?>
$value ) {
if ( $key == 'bps_isl_custom_roles' && is_array($value) ) {
foreach ( $value as $ckey => $cvalue ) {
if ( $user_role == $ckey && $cvalue == '1' ) {
$timeout = $BPS_ISL_options['bps_isl_timeout'] * 60000;
} else {
return;
}
}
}
}
if ( $BPS_ISL_options['bps_isl_tinymce'] == '1' && 'index.php' != $pagenow ) {
?>