Home Knowledge Base Melapress File Monitor List of hooks in Melapress File Monitor

List of hooks in Melapress File Monitor

Melapress File Monitor offers an all-in-one file monitoring solution for WordPress sites. It is a highly customizable plugin that enables administrators and website owners to achieve the functionality they need. However, in some cases, administrators might need to extend the pluginโ€™s existing functionality. To this end, Melapress File Monitor includes a number of hooks that enable you to modify the pluginโ€™s behavior. 

Below is a list of hooks, their parameters, and code samples.

mfm_append_dir_to_scan

Function

This hook enables you to add new directories to the pluginโ€™s scan list.

Parameters

$array_of_base_paths – The directory paths to be scanned.

Example code

add_filter( 'mfm_append_dir_to_scan', 'append_dir_to_scan' );
function override_has_expired_priority( $array_of_base_paths ) {
  return $array_of_base_paths;
}

mfm_append_ignored_dirs

Function

This hook enables you to direct the plugin to ignore specific directories during scans.

Parameters

$array_of_ignored_paths – The directory paths that are to be ignored during scans.

Example code

add_filter( 'mfm_append_dir_to_scan', 'append_dir_to_scan' );
function override_has_expired_priority( $array_of_ignored_paths ) {
  return $array_of_base_paths;
}

mfm_file_changes_notification_message

Function

This hook enables you to add content to the notification emails sent by Melapress Login Security.

Parameters

$my_intro – The content you would like to include in the email.

Example code

add_filter( 'mfm_file_changes_notification_message', 'customize_notification_message' );
function customize_notification_message( $email_content ) {
   $my_intro = __( 'Site changes custom intro here', 'text-domain' );
   $email_content = $my_intro . '<br>' . $email_content;
  
   return $email_content;
}
Close the CTA
Were you able to find what you were looking for?