Custom Sidebars 3.38 has 10 actions and 19 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 Custom Sidebars fires an action
add_action( 'cs_ajax_request', function( $action ) {
// Your code runs here.
}, 10, 1 );
// Change a value Custom Sidebars is about to use
add_filter( 'cs_replace_sidebars', function( $replacements, $options ) {
// Change $replacements here.
return $replacements;
}, 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
-
cs_ajax_request
action/** * Notify all extensions about the ajax call. */ do_action( 'cs_ajax_request', $action ); -
cs_ajax_request_get
action/** * Notify all extensions about the GET ajax call. */ do_action( 'cs_ajax_request_get', $get_action ); -
cs_predetermine_replacements
action/** * Fires before determining sidebar replacements. */ do_action( 'cs_predetermine_replacements', $defaults ); -
cs_replace_sidebars
filter/** * Filter the replaced sidebars before they are processed by the plugin. */ apply_filters( 'cs_replace_sidebars', $replacements, $options ); -
cs_sidebar_params
filter/** * Filter sidebar options for custom sidebars. */ apply_filters( 'cs_sidebar_params', $sidebar ); -
cs_support_posttype
filter/** * Filters the support-flag. The flag defines if the posttype supports custom * sidebars or not. */ apply_filters( 'cs_support_posttype', $response, $posttype ); -
cs_widget_header
action/** * Show additional functions in the widget header. */ do_action( 'cs_widget_header' ); -
/** * Allowed pages array. */ apply_filters( 'custom_sidebars_allowed_pages_array', $allowed ); -
custom_sidebars_get_location
filter/** * Allow to change data of locations. */ apply_filters( 'custom_sidebars_get_location', $req, $defaults ); -
custom_sidebars_integrations
filter/** * ========================================================================= * Box 4: Plugin integration */ apply_filters( 'custom_sidebars_integrations', array() ); -
custom_sidebars_set_location
filter/** * Allow to change data of locations before save. */ apply_filters( 'custom_sidebars_set_location', $options, $req->id, $sidebars, $data ); -
widget_update_callback
filter/** * Filter a widget's settings before saving. */ apply_filters( 'widget_update_callback', $instance, $instance, array(), $obj ); -
wpmu_script_version
filter/** * Allow to setup script version. */ apply_filters( 'wpmu_script_version', TheLib3_Wrap::get_version(), $alias ); -
wpmu_style_version
filter/** * Allow to setup styles version. */ apply_filters( 'wpmu_style_version', TheLib3_Wrap::get_version(), $alias ); -
wpmui_pointer_classes
filter/** * Filter pointer classes */ apply_filters( 'wpmui_pointer_classes', $classes ); -
cs_explain
actiondo_action( 'cs_explain', '<h4>Replace sidebars</h4>', true ); -
cs_replace_post_type
filterapply_filters( 'cs_replace_post_type', $post_type, 'single' ); -
ms_active
filterapply_filters( 'ms_active', false ); -
cs_before_replace_sidebars
actiondo_action( 'cs_before_replace_sidebars' ); -
cs_init
actiondo_action( 'cs_init' ); -
cs_integrations
actiondo_action( 'cs_integrations' ); -
cs_predetermineReplacements
actiondo_action( 'cs_predetermineReplacements', $defaults ); -
cs_replace_taxonomy
filterapply_filters( 'cs_replace_taxonomy', $taxonomy, 'archive' ); -
custom_sidebars_explain
filterapply_filters( 'custom_sidebars_explain', $this->debug ); -
use_widgets_block_editor
filterapply_filters( 'use_widgets_block_editor', true ); -
wdev_lib-use_session
filterapply_filters( 'wdev_lib-use_session', $use_session ); -
wdev-register-plugin
actiondo_action( 'wdev-register-plugin', plugin_basename( __FILE__ ), 'CustomSidebars', '/plugins/custom-sidebars/', $cta_label, $drip_param ); -
wpml_active_languages
filterapply_filters( 'wpml_active_languages', array() ); -
wpml_current_language
filterapply_filters( 'wpml_current_language', null );
Generated from Custom Sidebars'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: