MainWP Child 6.4.2 has 52 actions and 98 filters, read directly from its source code on Nov 17, 2026. The list updates automatically when a new version is released.
How to use these hooks
Actions let you run your own code at a specific moment. Filters let you change a value before the plugin uses it. Put your code in a child theme's functions.php or a code-snippets plugin, never in the plugin's own files, because updates overwrite them.
// Run your own code when MainWP Child fires an action
add_action( 'mainwp_before_post_update', function( $new_post, $post_custom, $post_category, $post_tags, $others ) {
// Your code runs here.
}, 10, 5 );
// Change a value MainWP Child is about to use
add_filter( 'nonce_user_logged_out', function( $uid, $action ) {
// Change $uid here.
return $uid;
}, 10, 2 );Parts of a name in {braces} are filled in at runtime (for example a post type or field ID). Choose Example on any hook for a ready-to-edit snippet.
All hooks
-
nonce_user_logged_out
filter/** * Filter whether the user who generated the nonce is logged out. */ apply_filters( 'nonce_user_logged_out', $uid, $action ); -
mainwp_before_post_update
action/** * Hook: `mainwp_before_post_update` */ do_action( 'mainwp_before_post_update', $new_post, $post_custom, $post_category, $post_tags, $others ); -
/** * Filter 'mainwp_branding_role_cap_enable_contact_form' */ apply_filters( 'mainwp_branding_role_cap_enable_contact_form', false ); -
/** * Allow filtering the upload directory array. */ apply_filters( 'mainwp_child_get_wp_upload_dir', $upload_dir, $subdir, $die_on_error, $direct_access ); -
/** * To support clean changes logs records. */ do_action( 'mainwp_child_actions_data_clean', $days_number . ' days', $days_number ); -
/** * Fires for every backup download authorization event. */ do_action( 'mainwp_child_backup_download_audit', array( 'event' => $event, 'file' => $file, 'size' => (int) $size, 'ip' => isset( $_SERVER['REMOTE_ADDR'] ) ? sanitize_text_field( wp_unslash( $_SERVER['REMOTE_ADDR'] ) ) : '', 'time' => time(), 'reason' => $reason, ) ); -
/** * Fires when the backup traversal skips a symlink or unsafe path. */ do_action( 'mainwp_child_backup_skipped_path', $path, $reason ); -
/** * Fires when the watchdog re-enters a stalled backup task. */ do_action( 'mainwp_child_backup_task_resume', $task, $version, $owner ); -
/** * Action: process before send close message. */ do_action( 'mainwp_child_before_send_close_message', $value, $action ); -
/** * Action: process send feedback message. */ do_action( 'mainwp_child_before_send_feedback_message', $value, $action ); -
/** * Action before update plugin, theme. */ do_action( 'mainwp_child_before_update_plugin_theme' ); -
/** * Action before update WP. */ do_action( 'mainwp_child_before_update_wp' ); -
/** * Filter 'mainwp_child_branding_init_options' */ apply_filters( 'mainwp_child_branding_init_options', $opts ); -
/** * Filter: `mainwp_child_changes_logs_before_post_meta_create_event` */ apply_filters( 'mainwp_child_changes_logs_before_post_meta_create_event', true, $meta_key, $meta_value, $post ); -
/** * Filter: `mainwp_child_changes_logs_before_post_meta_delete_event` */ apply_filters( 'mainwp_child_changes_logs_before_post_meta_delete_event', true, $meta_key, $meta_value, $post, $meta_id ); -
/** * Filter: `mainwp_child_changes_logs_before_post_meta_update_event` */ apply_filters( 'mainwp_child_changes_logs_before_post_meta_update_event', true, $meta_key, $meta_value, self::$old_meta[ $meta_id ], $post, $meta_id ); -
/** * Filter: `mainwp_child_changes_logs_event_data_before_log`. */ apply_filters( 'mainwp_child_changes_logs_event_data_before_log', $log_data, $type_id ); -
/** * Filter: `mainwp_child_changes_logs_load_frontend_loggers` */ apply_filters( 'mainwp_child_changes_logs_load_frontend_loggers', $loggers ); -
/** * Filter: `mainwp_child_changes_logs_load_login_loggers` */ apply_filters( 'mainwp_child_changes_logs_load_login_loggers', $loggers ); -
/** * Action Hook. */ do_action( 'mainwp_child_changes_logs_post_meta_updated', $meta_id, $object_id, (object) self::$old_meta, $meta_key, $meta_value ); -
/** * Filter: `mainwp_child_changes_logs_type_id_before_log`. */ apply_filters( 'mainwp_child_changes_logs_type_id_before_log', $type_id, $log_data ); -
mainwp_child_extra_execution
filter/** * Filter 'mainwp_child_extra_execution' */ apply_filters( 'mainwp_child_extra_execution', $information, $post ); -
/** * Filter mainwp_child_is_enable_schedule_job. */ apply_filters( 'mainwp_child_is_enable_schedule_job', true, $cron_hook, $recurrence ); -
/** * Hook: Fire after login required authed. */ do_action( 'mainwp_child_login_required_authed', $username ); -
sanitize_file_name
filter/** * Filters a sanitized filename string. */ apply_filters( 'sanitize_file_name', $filename, $filename_raw ); -
sanitize_file_name_chars
filter/** * Filters the list of characters to remove from a filename. */ apply_filters( 'sanitize_file_name_chars', $special_chars, $filename_raw ); -
mainwp_child_reports_log
actiondo_action( 'mainwp_child_reports_log', 'backupbuddy' ); -
apply_filters( 'woocommerce_reports_order_statuses', array( 'completed', 'processing', 'on-hold' ) ); -
updraftplus_dbscan_urlchange
filterapply_filters( 'updraftplus_dbscan_urlchange', sprintf( esc_html__( 'Warning: %s', 'updraftplus' ), '<a href="http://updraftplus.com/shop/migrator/">' . esc_html__( 'This backup set is from a different site - this is not a restoration, but a migration. You need the Migrator add-on in order to make this work.', 'updraftplus' ) . '</a>' ), $old_siteurl, $res ); -
gpi_check_status
filterapply_filters( 'gpi_check_status', false ); -
do_action( 'mainwp_child_restore_checkpoint', 'after_first_file_change', $task->task_id ); -
active_plugins
filterapply_filters( 'active_plugins', get_option( 'active_plugins' ) ); -
mainwp_child_after_newpost
actiondo_action( 'mainwp_child_after_newpost', array( 'success' => true, 'link' => get_permalink( $post_id ), 'added_id' => $post_id, 'new_post_data' => $post instanceof \WP_Post ? array( 'post_id' => $post_id, 'post_type' => $post->post_type, 'post_title' => $post->post_title, 'post_date' => $post->post_date, 'post_date_gmt' => $post->post_date_gmt, 'new_status' => $post->post_status, 'old_status' => $old_status, 'singular_name' => strtolo... ); -
mainwp_child_after_update
actiondo_action( 'mainwp_child_after_update', 'plugin', $result, $plugins ); -
mainwp_child_before_update
actiondo_action( 'mainwp_child_before_update', 'plugin', $plugins ); -
apply_filters( 'mainwp_child_hide_update_notice', array() ); -
do_action( 'mainwp_child_install_plugin_theme', $args ); -
do_action_deprecated( 'mainwp_child_installPluginTheme', array( $args ), '4.0.7.1', 'mainwp_child_install_plugin_theme' ); -
apply_filters( 'mainwp_child_mu_plugin_enabled', false ); -
do_action( 'mainwp_reports_backupbuddy_backup', $message, $backupType, $finish_time, $fingerprint ); -
mainwp_reports_maintenance
actiondo_action( 'mainwp_reports_maintenance', 'Maintenance Performed', time(), implode( ',', $details ), 'Maintenance Performed', $revision_retention ); -
apply_filters( 'updraftplus_accept_archivename', array() ); -
admin_enqueue_scripts
actiondo_action( 'admin_enqueue_scripts', '' ); -
check_passwords
actiondo_action_ref_array( 'check_passwords', array( $user->user_login, &$pass1, &$pass2 ) ); -
apply_filters( 'check_requirements_auto_backup_wptc', '' ); -
comment_email
filterapply_filters( 'comment_email', $comment->comment_author_email ); -
deprecated_hook_run
actiondo_action( 'deprecated_hook_run', $hook_name, $replacement, $version, $message ); -
error_log_mainwp_lines
filterapply_filters( 'error_log_mainwp_lines', 10 ); -
error_log_mainwp_logs
filterapply_filters( 'error_log_mainwp_logs', array( $error_log ) ); -
fastpixel/purge/all
actiondo_action( 'fastpixel/purge/all' ); -
apply_filters( 'get_backup_before_update_setting_wptc', '' ); -
get_bbu_note_view
filterapply_filters( 'get_bbu_note_view', '' ); -
apply_filters( 'get_restore_to_staging_request_wptc', '' ); -
https_local_ssl_verify
filterapply_filters( 'https_local_ssl_verify', true ); -
illegal_user_logins
filterapply_filters( 'illegal_user_logins', array() ); -
apply_filters( 'is_any_staging_process_going_on', '' ); -
is_restore_to_staging_wptc
filterapply_filters( 'is_restore_to_staging_wptc', '' ); -
itsec_has_external_backup
filterapply_filters( 'itsec_has_external_backup', $has_backup ); -
apply_filters( 'itsec_scheduled_external_backup', $sceduled_backup ); -
mainwp_backup
actiondo_action( 'mainwp_backup', $destination, $message, $size, $status, $type ); -
apply_filters( 'mainwp_child_actions_disable_cron_log', $disable_cron_log, $context, $action, $args, $message, $user_id ); -
apply_filters( 'mainwp_child_actions_save_data', true, $context, $action, $args, $message, $user_id ); -
apply_filters( 'mainwp_child_actions_saved_number_of_days', $days_number ); -
apply_filters( 'mainwp_child_authed_download_params', $auth_dl ); -
do_action( 'mainwp_child_changes_logs_after_load_loggers', $this ); -
apply_filters( 'mainwp_child_changes_logs_database_blog_id_value', $blog_id, $type_id, $data ); -
apply_filters( 'mainwp_child_changes_logs_disable_user_switching_plugin_tracking', false ); -
apply_filters( 'mainwp_child_changes_logs_disabled_logs', array() ); -
apply_filters( 'mainwp_child_changes_logs_disabled_system_logs', $default_disabled_logs ); -
apply_filters( 'mainwp_child_changes_logs_ignored_post_types', Changes_Helper::IGNORED_POST_TYPES ); -
apply_filters( 'mainwp_child_changes_logs_load_loggers', $loggers ); -
do_action( 'mainwp_child_changes_logs_logged', null, $type_id, $data, $blog_id ); -
do_action( 'mainwp_child_changes_logs_loggers_manager_add' ); -
apply_filters( 'mainwp_child_changes_logs_login_page', $login ); -
apply_filters( 'mainwp_child_changes_logs_login_screen_url', $login ); -
apply_filters( 'mainwp_child_changes_logs_override_is_multisite', self::$is_multisite ); -
apply_filters( 'mainwp_child_contact_support_mail_headers', $headers, $email, $from ); -
apply_filters( 'mainwp_child_db_updater_sync_data', array() ); -
mainwp_child_deactivation
actiondo_action( 'mainwp_child_deactivation' ); -
apply_filters( 'mainwp_child_early_access_allow_local_http', false, $url ); -
apply_filters( 'mainwp_child_file_deployment_allow_local_http', false, $url ); -
apply_filters( 'mainwp_child_forced_get_total_size', false ); -
apply_filters( 'mainwp_child_get_other_tokens_data', null, $token, $data, $records, $context, $action, $skip_records, $connector ); -
apply_filters( 'mainwp_child_get_reports_section_token_value', $tok_value, $record, $data, $context, $token, $section ); -
mainwp_child_get_total_size
filterapply_filters( 'mainwp_child_get_total_size', $get_file_size ); -
mainwp_child_init_subpages
filterapply_filters( 'mainwp_child_init_subpages', $all_subpages ); -
apply_filters( 'mainwp_child_parse_reports_token_content', $results, $parts, $token, $type ); -
mainwp_child_plugin_action
actiondo_action( 'mainwp_child_plugin_action', $args ); -
apply_filters( 'mainwp_child_plugin_health_check_max_plugins_to_batch', 10 ); -
mainwp_child_plugin_row_meta
filterapply_filters( 'mainwp_child_plugin_row_meta', $plugin_meta, $plugin_file, $mainWPChild->plugin_slug ); -
apply_filters( 'mainwp_child_prepared_reports_data', array( 'other_tokens_data' => $other_tokens_data, 'sections_data' => $sections_data, ), $sections, $other_tokens, $args ); -
mainwp_child_site_stats
actiondo_action( 'mainwp_child_site_stats' ); -
apply_filters( 'mainwp_child_stats_get_plugin_info', $out, $pluginslug ); -
mainwp_child_theme_action
actiondo_action( 'mainwp_child_theme_action', $args ); -
apply_filters( 'mainwp_child_theme_health_check_max_themes_to_batch', 10 ); -
do_action( 'mainwp_child_top_server_information' ); -
mainwp_child_unique_id
filterapply_filters( 'mainwp_child_unique_id', $uniqueId ); -
apply_filters( 'mainwp_child_virusdie_allow_local_http', false, $url ); -
mainwp_child_woocom_get_data
filterapply_filters( 'mainwp_child_woocom_get_data', $data ); -
apply_filters( 'mainwp_child_woocom_report_data', $data ); -
apply_filters( 'mainwp_child_woocom_sync_data', $data ); -
apply_filters( 'mainwp_child_woocommerce_db_update_conflicts', array() ); -
apply_filters( 'mainwp_create_post_custom_author', false, $new_post_id ); -
do_action( 'mainwp_reports_backupwordpress_backup', $destination, $message, 'finished', $backup_type, $date, $fingerprint ); -
do_action( 'mainwp_reports_backwpup_backup', $message, $backup_type, $backup_time, $fingerprint ); -
mainwp_reports_sucuri_scan
actiondo_action( 'mainwp_reports_sucuri_scan', $result, $scan_status, $scan_data, $scan_time ); -
do_action( 'mainwp_reports_wordfence_scan', $message, $ctime, $details, $result ); -
do_action( 'mainwp_reports_wptimecapsule_backup', $message, $backup_type, $backup_time, $fingerprint ); -
apply_filters( 'mainwp_restore_snapshot_disk_multiplier', 1.0 ); -
mainwp_site_sync_others_data
filterapply_filters( 'mainwp_site_sync_others_data', $information, $othersData ); -
mainwp-child-get-total-size
filterapply_filters_deprecated( 'mainwp-child-get-total-size', array( true ), '4.0.7.1', 'mainwp_child_get_total_size' ); -
mainwp-child-init-subpages
filterapply_filters_deprecated( 'mainwp-child-init-subpages', array( array() ), '4.0.7.1', 'mainwp_child_init_subpages' ); -
mainwp-site-sync-others-data
filterapply_filters_deprecated( 'mainwp-site-sync-others-data', array( $information, $othersData ), '4.0.7.1', 'mainwp_site_sync_others_data' ); -
pcm_after_edge_cache_purge
actiondo_action( 'pcm_after_edge_cache_purge' ); -
pcm_after_object_cache_flush
actiondo_action( 'pcm_after_object_cache_flush' ); -
phpmailer_init
actiondo_action_ref_array( 'phpmailer_init', array( &$phpmailer ) ); -
plugins_api
filterapply_filters( 'plugins_api', false, 'plugin_information', array( 'slug' => $plugin ) ); -
rt_nginx_helper_purge_all
actiondo_action( 'rt_nginx_helper_purge_all' ); -
run_gpi
actiondo_action( 'run_gpi', $forceRecheck ); -
apply_filters( 'save_settings_revision_limit_wptc', $data['revision_limit'] ); -
staging_status_wptc
filterapply_filters( 'staging_status_wptc', '' ); -
swis_clear_complete_cache
actiondo_action( 'swis_clear_complete_cache' ); -
do_action( 'update_white_labling_settings_wptc', $cust_req_info ); -
updraft_backupnow_options
filterapply_filters( 'updraft_backupnow_options', $options, array() ); -
updraftplus_checkzip_{$type}
actiondo_action_ref_array( "updraftplus_checkzip_{$type}", array( $updraft_dir . '/' . $file, &$mess, &$warn, &$err, ) ); -
do_action_ref_array( "updraftplus_checkzip_end_{$type}", array( &$mess, &$warn, &$err ) ); -
updraftplus_com_link
filterapply_filters( 'updraftplus_com_link', 'https://updraftplus.com/faqs/tell-me-more-about-the-search-and-replace-site-location-in-the-database-option/' ); -
apply_filters( "updraftplus_config_option_include_{$key}", '', $prefix, $for_updraftcentral ); -
apply_filters( 'updraftplus_dbscan_urlchange_www_append_warning', '' ); -
apply_filters( "updraftplus_defaultoption_include_{$key}", true ); -
apply_filters( "updraftplus_dirlist_{sanitize_text_field(wp_unslash($_POST['entity']))}", $basedir ); -
apply_filters( 'updraftplus_http_to_https_additional_warning', sprintf( esc_html__( 'As long as your web hosting allows http (i.e. non-SSL access) or will forward requests to https (which is almost always the case), this is no problem. If that is not yet set up, then you should set it up, or use %s so that the non-https links are automatically replaced.', 'updraftplus' ), apply_filters( 'updraftplus_migrator_addon_link', '<a href="https://updraftplus.com/s... ); -
apply_filters( 'updraftplus_https_to_http_additional_warning', sprintf( esc_html__( 'This restoration will work if you still have an SSL certificate (i.e. can use https) to access the site. Otherwise, you will want to use %s to search/replace the site address so that the site can be visited without https.', 'updraftplus' ), '<a href="https://updraftplus.com/shop/migrator/">' . esc_html__( 'the migrator add-on', 'updraftplus' ) . '</a>' ) ); -
apply_filters_ref_array( 'updraftplus_importforeign_backupable_plus_db', array( $backupable_plus_db, array( $foreign_known[ $backups[ $timestamp ]['meta_foreign'] ], &$mess, &$warn, &$err, ), ) ); -
apply_filters( 'updraftplus_migrator_addon_link', '<a href="https://updraftplus.com/shop/migrator/">' . esc_html__( 'the migrator add-on', 'updraftplus' ) . '</a>' ); -
apply_filters( 'updraftplus_msg_unfinishedbackup', '<br><span title="' . esc_attr( esc_html__( 'If you are seeing more backups than you expect, then it is probably because the deletion of old backup sets does not happen until a fresh backup completes.', 'updraftplus' ) ) . '">' . esc_html__( '(Not finished)', 'updraftplus' ) . '</span>', $jobdata, $nonce ); -
apply_filters( 'updraftplus_print_active_job_continue', true, $is_oneshot, $next_resumption, $jobdata ); -
updraftplus_showbackup_date
filterapply_filters( 'updraftplus_showbackup_date', $pretty_date, $backup, $jobdata, (int) $key, false ); -
user_profile_update_errors
actiondo_action_ref_array( 'user_profile_update_errors', array( &$errors, $update, &$user ) ); -
apply_filters( 'woocommerce_dashboard_status_widget_sales_query', $query ); -
do_action( "woocommerce_hide_{$name}_notice" ); -
wp_login
actiondo_action( 'wp_login', $user->user_login ); -
wpfc_clear_all_cache
actiondo_action( 'wpfc_clear_all_cache', true ); -
wphb_clear_page_cache
actiondo_action( 'wphb_clear_page_cache' ); -
wpvivid_get_mainwp_sync_data
filterapply_filters( 'wpvivid_get_mainwp_sync_data', $information ); -
wpvivid_handle_mainwp_action
filterapply_filters( 'wpvivid_handle_mainwp_action', $ret, $data );
Generated from MainWP Child's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.
Can't find the right hook?
We can build the customisation for you. Describe what you need: