Freesoul Deactivate Plugins – Action Hooks Reference
This document lists all WordPress action hooks provided by Freesoul Deactivate Plugins (free version) via do_action() or do_action_ref_array().
Plugin Lifecycle Hooks
fdp_loaded
- File:
freesoul-deactivate-plugins.php:55 - Function: Fired at plugin bootstrap
- Parameters: None
- When it fires: Immediately after the plugin bootstrap file (
fdp-load.php) is required, before any other plugin initialization - Context: Both frontend and backend
- Intended usage: Initialize custom functionality that depends on FDP being loaded. This is the earliest hook available after FDP constants and basic setup are defined.
add_action( 'fdp_loaded', 'my_custom_init' );
fdp_disabled
- File:
mu-plugins/eos-deactivate-plugins.php:2622 - Function: Fired when FDP is detected as disabled or missing
- Parameters: None
- When it fires: When
EOS_DP_VERSIONconstant is not defined, indicating FDP main plugin is disabled or not loaded - Context: Both frontend and backend
- Intended usage: Perform cleanup or alternative behavior when FDP is not available. This hook fires from the MU-plugin when it detects the main plugin is disabled.
add_action( 'fdp_disabled', 'my_cleanup_function' );
fdp_flush_rewrite_rules
- File:
mu-plugins/eos-deactivate-plugins.php:205 - Function: Fired when rewrite rules are flushed during the same request
- Parameters: None
- When it fires: When FDP detects that a plugin, theme, or MU-plugin has updated rewrite rules during the same HTTP request (triggered by the
update_optionhook monitoringrewrite_rulesoption changes) - Context: Both frontend and backend
- Intended usage: React to rewrite rule flushing events. FDP uses this to rebuild its own rewrite rules cache. Useful for plugins that need to know when rewrite rules are being modified.
add_action( 'fdp_flush_rewrite_rules', 'my_rewrite_handler' );
fdp_after_theme_activation
- File:
admin/eos-dp-helper.php:1461 - Function:
eos_dp_add_fdp_theme_activation_hook() - Parameters: None
- When it fires: After a theme is activated, triggered by WordPress
update_option_stylesheetorupdate_site_option_stylesheethooks - Context: Backend only
- Intended usage: Perform actions after theme activation, such as rebuilding menus, clearing caches, or updating FDP-specific theme-related settings. FDP uses this to rebuild rewrite rules and admin menu cache.
add_action( 'fdp_after_theme_activation', 'rebuild_cache', 90 );
AJAX & Settings Hooks
fdp_before_ajax_request
- File:
admin/eos-dp-ajax.php:10 - Function: Fired at the start of AJAX request processing
- Parameters: None
- When it fires: At the very beginning of
eos-dp-ajax.phpfile execution, before any AJAX handler functions are called - Context: Backend (AJAX requests only)
- Intended usage: Set up environment, perform validation, or initialize resources before any FDP AJAX request is processed. All FDP AJAX handlers run after this hook.
add_action( 'fdp_before_ajax_request', 'setup_ajax_environment' );
fdp_singles_saved
- File:
admin/eos-dp-ajax.php:82 - Function:
eos_dp_save_settings() - Parameters:
$opts(array) – The saved options array containing post IDs, plugin settings, post type, locked/unlocked IDs, and custom URL needs - When it fires: After single post/page plugin settings are successfully saved via AJAX (after
eos_dp_save_settingsprocesses the data and updates post meta and options) - Context: Backend (AJAX requests only)
- Intended usage: React to single post settings being saved. The
$optsarray contains all the settings that were just saved, including post IDs, post type, locked/unlocked IDs, and custom URL requirements.
add_action( 'fdp_singles_saved', function( $opts ) {
// Process saved settings
} );
eos_dp_after_create_plugin
- File:
admin/eos-dp-ajax.php:1179 - Function:
eos_dp_create_plugin() - Parameters:
$plugin_name(string) – The full plugin name including suffix (e.g., “my-plugin-abc123”),$wp_filesystem(object) – WP_Filesystem instance used to create the plugin files - When it fires: After a new plugin is successfully created via FDP’s plugin creation feature (after main plugin file and readme.txt are written to disk)
- Context: Backend (AJAX requests only)
- Intended usage: Perform actions after plugin creation, such as activating the plugin, setting up default options, or sending notifications. The plugin files have been created but the plugin may not be activated yet.
add_action( 'eos_dp_after_create_plugin', function( $plugin_name, $wp_filesystem ) {
// Process new plugin
}, 10, 2 );
Admin UI Hooks
fdp_admin_notices
- File:
admin/eos-dp-helper.php:210 - Function:
eos_dp_admin_notices() - Parameters: None
- When it fires: When FDP admin notices are being displayed (called from WordPress
admin_noticesaction) - Context: Backend only (FDP admin pages)
- Intended usage: Add custom admin notices to FDP admin pages. This hook is called within FDP’s admin notices handler, allowing you to display notices alongside FDP’s own notices.
add_action( 'fdp_admin_notices', function() {
echo '<div class="notice">Custom notice</div>';
} );
eos_dp_admin_menu_items
- File:
admin/eos-dp-helper.php:336 - Function:
fdp_add_submenu_page()(called during menu registration) - Parameters: None
- When it fires: During FDP admin menu registration, after FDP’s own menu items are added but before the
fdp_menu_pagesfilter is applied - Context: Backend only
- Intended usage: Add custom menu items to FDP admin menu. This hook fires during menu registration, allowing you to add menu items before FDP processes the menu pages filter.
fdp_after_general_inline_style
- File:
admin/fdp-admin.php:500 - Function:
eos_dp_admin_head() - Parameters: None
- When it fires: After FDP’s general inline CSS styles are output in the
<style id="fdp-inline-backend-css">tag, within the admin head section - Context: Backend only (FDP admin pages)
- Intended usage: Add custom CSS to FDP admin pages. The hook fires inside a
<style>tag, so you can output CSS directly.
fdp_after_admin_head_removed
- File:
admin/fdp-admin.php:459 - Function: Anonymous function in
admin_print_scriptsaction - Parameters: None
- When it fires: After all
admin_headactions are removed on FDP pages (as part of FDP’s page cleanup process) - Context: Backend only (FDP admin pages)
- Intended usage: Add custom head content after FDP removes other plugins’ admin_head actions. This allows you to add head content that won’t be removed by FDP’s cleanup.
fdp_after_admin_footer_removed
- File:
admin/fdp-admin.php:464 - Function: Anonymous function in
admin_print_scriptsaction - Parameters: None
- When it fires: After all
admin_footeractions are removed on FDP pages (as part of FDP’s page cleanup process) - Context: Backend only (FDP admin pages)
- Intended usage: Add custom footer content after FDP removes other plugins’ admin_footer actions.
Navigation & Menu Hooks
fdp_before_main_nav_menu_items
- File:
admin/templates/partials/eos-dp-navigation.php:27 - Function: Fired during navigation rendering
- When it fires: Before the main navigation menu items are rendered in FDP’s admin navigation
- Context: Backend only (FDP admin pages)
- Intended usage: Add content before the main navigation menu, such as promotional banners or custom navigation elements.
fdp_submenu_item_{$slug}
- File:
admin/templates/partials/eos-dp-navigation.php:80 - When it fires: For each submenu item, after the submenu file is included (if it exists), where
{$slug}is the sanitized menu item slug - Intended usage: Add custom submenu items for specific menu sections (e.g., ‘settings’, ‘tools’).
eos_dp_tabs
- File:
admin/templates/partials/eos-dp-navigation.php:93 - When it fires: After the main navigation menu items are rendered, before the closing
</ul>tag
fdp_top_bar_notifications
- File:
admin/templates/partials/eos-dp-navigation.php:102 - When it fires: When rendering the notifications dropdown in FDP’s top bar
- Intended usage: Add custom notifications using
eos_dp_display_admin_notice().
eos_dp_before_settings_nav / eos_dp_after_settings_nav
- File:
admin/templates/partials/eos-dp-navigation.php - When it fires: Before/After the settings navigation section is rendered.
Table & Display Hooks
fdp_before_table_rows / fdp_before_table_rows_{$page_slug}
- File:
admin/classes/class-fdp-custom-rows.php:106-107 - Function:
FDP_Custom_Rows_Page::tableBody() - Intended usage: Add content like filters or search boxes before table rows in custom URL/admin URL pages.
fdp_after_last_plugin
- File:
admin/classes/class-fdp-custom-rows.php:161 - Parameters:
$url(string),$k(int) - When it fires: After the last plugin column is rendered for each row in custom URL/admin URL pages
fdp_after_table_rows / fdp_after_table_rows_{$page_slug}
- File:
admin/classes/class-fdp-custom-rows.php:174-175 - When it fires: After all table rows are rendered. Useful for pagination or summary info.
fdp_table_head_first_col / fdp_table_head_first_col_{$page}
- File:
admin/templates/partials/eos-dp-table-head.php:19-20 - When it fires: When rendering the first column header.
eos_dp_table_head_col_after / eos_dp_after_table_head_columns
- File:
admin/templates/partials/eos-dp-table-head.php - When it fires: After each column header or after all columns (before row closing).
eos_dp_pre_table_head / eos_dp_after_singles_title
- File:
admin/classes/class-fdp-frontend-singles.php - Context: Singles (frontend) page.
eos_dp_after_archive_title / eos_dp_after_terms_archive_title
- File:
admin/classes/class-fdp-archives.php/class-fdp-terms-archives.php - When it fires: After titles on Archives or Terms Archives pages.
fdp_before_row_filters / fdp_after_row_filters
- File:
admin/classes/class-fdp-frontend-singles.php:652-681 - When it fires: Before/After the icon/button filters section in Singles page.
Action Buttons Hooks
eos_dp_action_buttons
- File:
admin/templates/partials/eos-dp-action-buttons.php:166 - When it fires: During action buttons rendering in Singles, Post Types, Archives, Terms, and Backend Singles.
eos_dp_archive_action_buttons
- File: Multiple classes (Archives, Terms, Backend Singles)
- Intended usage: Add custom action buttons specifically for archive-related pages.
eos_dp_backend_actions
- File:
admin/classes/class-fdp-backend-singles.php:316 - When it fires: In Backend Singles page, after
eos_dp_action_buttons.
eos_dp_metabox_before_action_buttons / eos_dp_metabox_actions
- File:
inc/fdp-metaboxes.php:163-177 - Context: Post/page edit screens (WordPress Metabox).
Section & Wrapper Hooks
eos_dp_before_wrapper
- File: Multiple templates/classes
- When it fires: Before the main
<div id="eos-dp-wrp">is rendered.
fdp_after_table / fdp_after_table_{$section_id}
- File:
admin/classes/abstracts/class-eos-fdp-plugins-manager-page.php:220-221 - When it fires: After the table is rendered, before the closing wrapper div.
fdp_after_section / fdp_after_section_{$section_id}
- File:
admin/classes/abstracts/class-eos-fdp-plugins-manager-page.php:226-227 - When it fires: After the entire
</section>tag.
One Column Page Hooks
fdp_one_column_after_title / fdp_one_column_before_section
- File:
admin/classes/class-fdp-one-column-page.php - Context: Mobile, Desktop, Search, Browser, One Place pages.
fdp_addon_description
- Parameters:
$page_slug(string) - Intended usage: Add add-on-specific descriptions based on the current page slug.
Footer & Save Hooks
fdp_after_save_button
- File:
admin/templates/partials/eos-dp-footer.php:68 - Intended usage: Add buttons or help text next to the main save button.
eos_dp_after_footer
- File:
admin/templates/partials/eos-dp-footer.php:96 - Intended usage: Add scripts or custom HTML at the end of the FDP footer.
Submenu Hooks
Hooks found at the end of various navigation submenus:
fdp_settings_submenu_endfdp_tools_submenu_endeos_dp_before_tabsfdp_testing_submenu_endfdp_help_submenu_end
Integration Hooks
fdp_get_plugin_info
- File:
fdp-load.php:284 - Parameters:
$file_data(string),$plugin(string) - Intended usage: Modify or process plugin file data before FDP parses the plugin header.
fdp_define_pointers
- File:
admin/pointers/fdp-pointer.php:10 - Intended usage: Define custom admin pointers (tooltips) for FDP pages.
eos_dp_actions_menu_items
- File:
admin/templates/partials/nav-menu-items/menu-item-integration.php:22 - Context: Integration page.
Notes
- Dynamic Hook Names: Several hooks use dynamic names with placeholders like
{$page_slug},{$page}, or{$section_id}. These are replaced with actual values at runtime. - Hook Priority: Most hooks use default priority (10).
- Context Clarity: Some hooks fire in both frontend and backend (like
fdp_loaded), while most UI hooks are backend only. - Parameters: Parameters are documented based on what is passed to
do_action(). If none are listed, the action is called without arguments.
