WPCode 2.4.2 has 24 actions and 72 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 WPCode fires an action
add_action( 'wpcode_admin_notice_dismiss_ajax', function( $post, $level, $notices ) {
// Your code runs here.
}, 10, 3 );
// Change a value WPCode is about to use
add_filter( 'wpcode_clear_cache_on_global_save', function( $value ) {
// Change $value here.
return $value;
}, 10, 1 );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
-
/** * This filter is documented in * includes/admin/pages/class-wpcode-admin-page-headers-footers.php */ apply_filters( 'wpcode_clear_cache_on_global_save', true ); -
/** * Whether this save comes from a trusted, user-independent writer such as the * file importer. A trusted writer skips the logged-in capability checks below * and the post-type write gate; the filesystem it reads from is its trust * boundary. */ apply_filters( 'wpcode_snippet_save_trusted_context', false, $this ); -
sanitize_textarea_field
filter/** * Filters a sanitized textarea field string. */ apply_filters( 'sanitize_textarea_field', $filtered, $str ); -
wp_doing_ajax
filter/** * Filters whether the current request is a WordPress Ajax request. */ apply_filters( 'wp_doing_ajax', defined( 'DOING_AJAX' ) && DOING_AJAX ); -
wp_doing_cron
filter/** * Filters whether the current request is a WordPress cron request. */ apply_filters( 'wp_doing_cron', defined( 'DOING_CRON' ) && DOING_CRON ); -
/** * Filters whether the write abilities are enabled. */ apply_filters( 'wpcode_abilities_write_enabled', (bool) wpcode()->settings->get_option( 'abilities_write_enabled', false ) ); -
/** * Allows developers to apply additional logic to the dismissing notice * process. Executes after updating option or user meta (according to the * notice level). */ do_action( 'wpcode_admin_notice_dismiss_ajax', $post['id'], $level, $notices ); -
/** * Fires after a snippet has been duplicated. */ do_action( 'wpcode_after_snippet_duplicated', $this ); -
/** * Fires before a snippet that is about to be duplicated is saved. */ do_action( 'wpcode_before_snippet_duplicated', $this ); -
/** * Filters the `get_posts()` arguments while preparing items for the code * snippets table. */ apply_filters( 'wpcode_code_snippets_table_prepare_items_args', $args ); -
/** * Action that fires on the right side of the table navigation. Used to add * additional buttons or controls on the right side. */ do_action( 'wpcode_code_snippets_table_right_actions', $which ); -
/** * Allow counting snippets filtered by a given search criteria. */ apply_filters( 'wpcode_code_snippets_table_update_count', array(), $args ); -
/** * Filters the code types that should keep the core filters. */ apply_filters( 'wpcode_code_types_to_keep_core_content_filters', array( 'text', 'html', ) ); -
wpcode_file_cache_ttl
filter/** * Filter the $ttl for a file if you want to change it. */ apply_filters( 'wpcode_file_cache_ttl', $ttl, $name ); -
wpcode_get_user_ip
filter/** * Filter detected IP address. */ apply_filters( 'wpcode_get_user_ip', $ip ); -
/** * Filter the markup for the location display inputs. This is used to add the * number input for auto insert locations. */ apply_filters( 'wpcode_location_display_inputs', $markup, isset( $this->snippet ) ? $this->snippet : false, $this ); -
/** * Filter whether the Testing Mode toggle is shown in the header. */ apply_filters( 'wpcode_show_testing_mode_toggle', true ); -
/** * Skip the activation test-run for this snippet. For callers that already * test-ran the same code in this request: running it a second time would * redeclare its functions, which is a fatal error. */ apply_filters( 'wpcode_skip_activation_checks', false, $this ); -
wpcode_snippet_after_update
action/** * Run extra logic after the snippet is saved. */ do_action( 'wpcode_snippet_after_update', $this->id, $this ); -
/** * Filter whether the editor is read-only for this snippet. */ apply_filters( 'wpcode_snippet_manager_is_read_only', $this->is_read_only, isset( $this->snippet ) ? $this->snippet : null ); -
/** * Filter the message shown when the editor is read-only. */ apply_filters( 'wpcode_snippet_manager_read_only_message', __( 'This snippet is active, so it is read-only here. Please ask a user who can activate snippets to make changes.', 'insert-headers-and-footers' ), isset( $this->snippet ) ? $this->snippet : null ); -
/** * Filter to refuse a bulk action before it runs. Return a non-empty message to * refuse the whole batch. */ apply_filters( 'wpcode_snippets_bulk_action_refusal', '', $ids, $action ); -
wpcode_snippets_with_updates
filter/** * Filter the list of snippets with updates. This allows other classes to add * their snippets with updates to the results. */ apply_filters( 'wpcode_snippets_with_updates', $snippets_with_updates ); -
wpcode_plugin_deactivated
actiondo_action( 'wpcode_plugin_deactivated', $plugin ); -
apply_filters( 'wpcode_get_snippets_for_location', wpcode()->conditional_logic->check_snippets_conditions( $snippets_for_location ), $location ); -
wpcode_pre_save_snippet
filterapply_filters( 'wpcode_pre_save_snippet', false, clone $snippet ); -
wpcode_snippet_output
filterapply_filters( 'wpcode_snippet_output', $snippet_code, $snippet ); -
disable_ihaf
filterapply_filters( 'disable_ihaf', false ); -
disable_ihaf_body
filterapply_filters( 'disable_ihaf_body', false ); -
disable_ihaf_header
filterapply_filters( 'disable_ihaf_header', false ); -
apply_filters( 'wpcode_add_snippet_show_library', true ); -
apply_filters( 'wpcode_admin_bar_edit_snippet_link', admin_url( 'admin.php?page=wpcode-snippet-manager&snippet_id=' . $snippet->get_id() ), $snippet ); -
wpcode_admin_bar_info_top
actiondo_action( 'wpcode_admin_bar_info_top', $wp_admin_bar ); -
wpcode_admin_js_data
filterapply_filters( 'wpcode_admin_js_data', array( 'nonce' => wp_create_nonce( 'wpcode_admin' ), 'code_type_options' => wpcode()->execute->get_code_type_options(), 'please_wait' => __( 'Please wait.', 'insert-headers-and-footers' ), 'ok' => __( 'OK', 'insert-headers-and-footers' ), 'save_failed' => __( 'The snippet could not be saved.', 'insert-headers-and-footers' ), 'live_preview_save_title' => __( 'Save Snippet First', 'insert-headers... ); -
wpcode_admin_notices
actiondo_action( 'wpcode_admin_notices' ); -
apply_filters( 'wpcode_admin_notifications_has_access', ! wpcode()->settings->get_option( 'hide_am_notices', false ) ); -
wpcode_admin_page
actiondo_action( 'wpcode_admin_page' ); -
do_action( "wpcode_admin_page_content_{$this->page_slug}", $this ); -
wpcode_auto_disable_frontend
filterapply_filters( 'wpcode_auto_disable_frontend', is_admin() ); -
do_action( 'wpcode_before_admin_pages_loaded', $this->pages ); -
wpcode_before_snippet_save
actiondo_action( 'wpcode_before_snippet_save', $this ); -
wpcode_before_version_update
actiondo_action( 'wpcode_before_version_update', $activated ); -
wpcode_cache_active_snippets
filterapply_filters( 'wpcode_cache_active_snippets', true ); -
apply_filters( 'wpcode_code_snippets_per_page', 20 ); -
apply_filters( 'wpcode_code_snippets_row_actions', $actions, $snippet, $this->view ); -
do_action( 'wpcode_code_snippets_table_after_rows', $this ); -
do_action( 'wpcode_code_snippets_table_before_rows', $this ); -
apply_filters( 'wpcode_code_snippets_table_column_value', $value, $snippet, $column_name ); -
apply_filters( 'wpcode_code_snippets_table_columns', $columns ); -
apply_filters( 'wpcode_code_snippets_table_update_count_all', $this->count, $args ); -
wpcode_code_type_options
filterapply_filters( 'wpcode_code_type_options', $options ); -
apply_filters( 'wpcode_code_types_for_display', $code_types ); -
apply_filters( 'wpcode_conditional_logic_admin_options', array_merge( $available_options, $unavailable_options ) ); -
wpcode_default_code_type
filterapply_filters( 'wpcode_default_code_type', $this->code_type ); -
wpcode_do_auto_insert
filterapply_filters( 'wpcode_do_auto_insert', true ); -
wpcode_editor_config
filterapply_filters( 'wpcode_editor_config', $editor_args ); -
apply_filters( 'wpcode_error_locations_auto_disable', array( 'everywhere', 'admin_only', ) ); -
wpcode_export_snippet_data
filterapply_filters( 'wpcode_export_snippet_data', $snippet_data, $snippet ); -
apply_filters( 'wpcode_force_deactivate_snippet', false, $this ); -
wpcode_format_log_entry
filterapply_filters( 'wpcode_format_log_entry', $entry, array( 'timestamp' => $timestamp, 'message' => $message, ) ); -
wpcode_get_option
filterapply_filters( 'wpcode_get_option', $value, $option_name ); -
apply_filters( "wpcode_get_option_{$option_name}", $value, $option_name ); -
wpcode_header_buttons
actiondo_action( 'wpcode_header_buttons', $this->snippet ); -
wpcode_icons
filterapply_filters( 'wpcode_icons', array( 'logo' => '<path fill-rule="evenodd" clip-rule="evenodd" d="M57.5706 64H6.56732C2.89985 64 0 61.1064 0 57.4468V6.55319C0 2.89362 2.89985 0 6.56732 0H57.5706C61.2381 0 64.1379 2.89362 64.1379 6.55319V57.4468C64.1379 61.1064 61.2381 64 57.5706 64ZM15.863 52.0855C15.5219 52.0855 15.0954 52.0004 14.7543 51.9153C13.2191 51.3196 12.4515 49.6175 13.0485 48.0855L26.439 13.7877C27.036 12.2558 28.... ); -
wpcode_import_snippet_data
filterapply_filters( 'wpcode_import_snippet_data', $snippet ); -
wpcode_install
actiondo_action( 'wpcode_install' ); -
do_action( 'wpcode_library_api_auth_connected' ); -
do_action( 'wpcode_library_api_auth_deleted' ); -
apply_filters( 'wpcode_library_import_snippet_data', $snippet_data ); -
apply_filters( 'wpcode_load_admin_bar_scripts', false ); -
wpcode_load_global_scripts
filterapply_filters( 'wpcode_load_global_scripts', $dont_load ); -
wpcode_load_snippet
filterapply_filters( 'wpcode_load_snippet', $snippet ); -
wpcode_loaded
actiondo_action( 'wpcode_loaded' ); -
wpcode_log_file_size_limit
filterapply_filters( 'wpcode_log_file_size_limit', $log_size_limit ); -
wpcode_metabox_admin_tabs
actiondo_action( 'wpcode_metabox_admin_tabs' ); -
apply_filters( 'wpcode_metabox_scripts_force_collapse', true, $screen ); -
apply_filters( 'wpcode_notification_content_display', $notifications[ $key ]['content'] ); -
apply_filters( 'wpcode_on_demand_ignore_conditional_logic', false ); -
apply_filters( 'wpcode_override_syntax_highlighting', true ); -
wpcode_plugin_activation
actiondo_action( 'wpcode_plugin_activation' ); -
wpcode_post_metabox_priority
filterapply_filters( 'wpcode_post_metabox_priority', 'default' ); -
apply_filters( 'wpcode_shortcode_attribute_value', $value, $attribute ); -
do_action( 'wpcode_shortcode_before_output', $snippet, $atts, $content, $tag ); -
wpcode_shortcode_preview
filterapply_filters( 'wpcode_shortcode_preview', '[wpcode id="' . absint( $snippet->get_id() ) . '"]', $snippet ); -
apply_filters( 'wpcode_shortcode_use_conditional_logic', true ); -
apply_filters( 'wpcode_skip_clear_all_plugins_cache', false, $context ); -
wpcode_smart_tags
filterapply_filters( 'wpcode_smart_tags', $tags ); -
wpcode_snippet_error_tracked
actiondo_action( 'wpcode_snippet_error_tracked', $error, $snippet ); -
apply_filters( "wpcode_snippet_output_{$this->type}", $code, $this->snippet ); -
wpcode_snippet_output_php
filterapply_filters( 'wpcode_snippet_output_php', $snippet->get_code(), $snippet ); -
wpcode_snippets_bulk_actions
filterapply_filters( 'wpcode_snippets_bulk_actions', $bulk_actions ); -
apply_filters( 'wpcode_strip_script_tags_for_js', true ); -
apply_filters( 'wpcode_text_execute_shortcodes', true ); -
apply_filters( 'wpcode_usage_tracking_excluded_settings', array( 'facebook_pixel_api_token', 'pinterest_conversion_token', 'tiktok_access_token', ) ); -
wpcode_use_auto_insert_cache
filterapply_filters( 'wpcode_use_auto_insert_cache', $this->use_cache );
Generated from WPCode'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: