Reply To: Select all functionality


Home Forums Front End PM PRO Select all functionality Reply To: Select all functionality

#12765
shamim
Keymaster

Please add following code in your theme’s (child theme’s if any) functions.php

add_filter( 'fep_directory_output', function( $directory ){
	$checkbox = '<label><input type="checkbox" class="fep-cus-select-all" />'.__('Select all').'</label>';
	$checkbox .= '<script type="text/javascript"> jQuery(document).ready(function(){';
	$checkbox .= 'jQuery("#fep-table .fep-cus-select-all").change(function(){';
	$checkbox .= 'jQuery( \'#fep-table input[type="checkbox"]\' ).prop("checked", this.checked);';
	$checkbox .= '})}); </script>';
	
	return str_replace( '<div id="fep-table" class="fep-table fep-odd-even">', '<div id="fep-table" class="fep-table fep-odd-even">' . $checkbox, $directory);
});

It will show a checkbox in “Directory” to select all users from directory. Then from dropdown select “Send message”.