Ultimate Before After Image Slider & Gallery icon
Media, Galleries & Sliders

Ultimate Before After Image Slider & Gallery hooks reference

  • By Themefic
  • v4.7.22 New
  • Updated

Ultimate Before After Image Slider & Gallery 4.7.22 has 2 actions and 17 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.

functions.phpyour child theme
// Run your own code when Ultimate Before After Image Slider & Gallery fires an action
add_action( 'bafg_after_slider', function( $id ) {
	// Your code runs here.
}, 10, 1 );

// Change a value Ultimate Before After Image Slider & Gallery is about to use
add_filter( 'bafg_admin_column_image_url', function( $image_url, $column_name, $meta, $id, $method ) {
	// Change $image_url here.
	return $image_url;
}, 10, 5 );

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

  • admin/bafg-admin.php line 165
    /**
     * Allow Pro/extensions to modify the admin column image URL.
     */
    apply_filters( 'bafg_admin_column_image_url', $image_url, $column_name, $meta, $id, $method );
  • admin/tf-options/classes/BEAF_Metabox.php line 18 · used in 2 places
    apply_filters( "bafg_{$key}_sections", $params['sections'] );
  • admin/tf-options/classes/BEAF_Metabox.php line 16 · used in 2 places
    apply_filters( "bafg_{$key}_title", $params['title'] );
  • admin/tf-options/classes/BEAF_Settings.php line 21
    apply_filters( "bafg_{$key}_icon", $params['icon'] );
  • admin/tf-options/classes/BEAF_Settings.php line 22
    apply_filters( "bafg_{$key}_position", $params['position'] );
  • inc/Hook/Shortcode.php line 143
    do_action( 'bafg_after_slider', $id );
  • admin/tf-options/metaboxes/beaf-metabox.php line 111
    apply_filters( 'bafg_before_after_style', array( 'id' => 'bafg_before_after_style', 'type' => 'imageselect', 'label' => __( 'BEAF template style', 'beaf-before-and-after-gallery' ), 'subtitle' => __( 'Select a style for the before and after label.', 'beaf-before-and-after-gallery' ), 'options' => array( 'default' => array( 'title' => __( 'Default', 'beaf-before-and-after-gallery' ), 'url' => BEAF_ASSETS_URL . 'image/default.png', ), ),... );
  • inc/Hook/Shortcode.php line 117
    do_action( 'bafg_before_slider', $id );
  • admin/tf-options/fields/icon/BEAF_icon.php line 132
    apply_filters( 'bafg_icon_list', $icons );
  • admin/tf-options/metaboxes/beaf-metabox.php line 156
    apply_filters( 'bafg_on_scroll_slide', array( 'id' => '', 'type' => 'switch', 'label' => __( 'On Scroll Slide', 'beaf-before-and-after-gallery' ), 'default' => false, 'subtitle' => __( 'The before and after image slider will slide on scroll automatically.', 'beaf-before-and-after-gallery' ), 'dependency' => array( 'bafg_auto_slide', '==', false ), 'field_width' => 50, ), $post );
  • inc/Hook/PostType.php line 42
    apply_filters( 'bafg_post_type_supports', array( 'title' ) );
  • admin/tf-options/metaboxes/beaf-metabox.php line 16
    apply_filters( 'beaf_before_after_method', array( 'id' => 'bafg_before_after_method', 'type' => 'radio', 'label' => __( 'Before After Method', 'beaf-before-and-after-gallery' ), 'title' => __( 'Before After Method', 'beaf-before-and-after-gallery' ), 'subtitle' => __( 'Choose a method to make a before after slider using 2 images', 'beaf-before-and-after-gallery' ), 'options' => array( 'method_1' => array( 'label' => __( 'Method 1 (Using... );
  • admin/tf-options/BEAF_Options.php line 217
    apply_filters( 'beaf_option_field_state', array( 'class' => $class, 'badges' => $badges, ), $field, $value, $settings_id, $parent );
  • admin/tf-options/BEAF_Options.php line 80
    apply_filters( 'beaf_options_metabox_files', $metaboxes );
  • admin/tf-options/BEAF_Options.php line 98
    apply_filters( 'beaf_options_setting_files', $options );
  • admin/tf-options/BEAF_Options.php line 116
    apply_filters( 'beaf_options_taxonomy_files', $taxonomies );
  • inc/Hook/PostType.php line 36
    apply_filters( 'beaf_publicly_queryable', $bafg_publicly_queriable );
  • widget_title

    filter
    inc/widget/bafg-widget.php line 34
    apply_filters( 'widget_title', $instance['title'] );

Generated from Ultimate Before After Image Slider & Gallery'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: