MaxButtons icon
Social Media

MaxButtons hooks reference

  • By maxfoundry
  • v9.8.6
  • Updated

MaxButtons 9.8.6 has 17 actions and 23 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 MaxButtons fires an action
add_action( 'mb/editor/display_notices', function() {
	// Your code runs here.
}, 10, 1 );

// Change a value MaxButtons is about to use
add_filter( 'maxbuttons/list/num_items', function( $limit ) {
	// Change $limit here.
	return $limit;
}, 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

  • includes/maxbuttons-button.php line 45
    /**
     * Display admin notices
     */
    do_action( 'mb/editor/display_notices' );
  • includes/maxbuttons-list.php line 201 · used in 5 places
    do_action( 'mb-display-ads' );
  • classes/admin-class.php line 223 · used in 4 places
    do_action( 'mb-display-pagination', $args, 'top' );
  • classes/admin-class.php line 69 · used in 2 places
    apply_filters( 'maxbuttons/list/num_items', $limit );
  • classes/admin-class.php line 305 · used in 2 places
    apply_filters( 'mb/button/data_before_display', $data, $mode, array('preview' => $preview, 'compile' => $compile) );
  • classes/block.php line 28
    apply_filters( "{$this->blockname}-block-fields", $this->fields );
  • classes/integrations.php line 38
    do_action( 'maxbutton-direct-integrations' );
  • includes/maxbuttons-settings.php line 181
    do_action( 'maxbuttons_settings_end' );
  • classes/max-utils.php line 42
    do_action( "maxbuttons/ajax/{$plugin_action}", $_POST );
  • classes/controller.php line 106
    apply_filters( 'maxbuttons/editor/actions', $actions );
  • classes/maxbuttons-class.php line 610
    do_action( 'maxbuttons/init/editor_scripts' );
  • classes/maxbuttons-class.php line 364
    apply_filters( 'maxbuttons/plugin/admin_pages', $this->admin_pages );
  • maxbuttons.php line 73
    do_action( 'maxbuttons/plugin/init', $maxbuttons );
  • classes/button.php line 939
    apply_filters( 'mb_shortcode_display_args', $args, $button_id, $this->data );
  • classes/button.php line 575
    apply_filters( 'mb-before-button-output', $output );
  • classes/blocks.php line 32
    apply_filters( 'mb-block-paths', array(MB()->get_plugin_path() . "blocks/") );
  • includes/maxbuttons-list.php line 48
    do_action( 'mb-display-meta' );
  • includes/admin_header.php line 27
    do_action( 'mb-display-tabs' );
  • includes/admin_footer.php line 5
    do_action( 'mb-interface-end' );
  • includes/admin_header.php line 13
    do_action( 'mb-interface-start' );
  • mb-url

    filter
    blocks/basic.php line 193
    apply_filters( 'mb-url', $url, $data['url'] );
  • blocks/basic.php line 194
    apply_filters( "mb-url-{$button_id}", $url, $data['url'] );
  • classes/button.php line 350
    apply_filters( 'mb/button/compiledcss', $css, $mode );
  • classes/button.php line 341
    apply_filters( 'mb/button/rawcss', $css, $mode );
  • mb/button/rel

    filter
    blocks/basic.php line 177
    apply_filters( 'mb/button/rel', $rels );
  • classes/button.php line 759
    do_action( 'mb/button/save', $this->id );
  • classes/screen.php line 316
    apply_filters( 'mb/display_fields', $this->fields );
  • classes/screen.php line 157
    apply_filters( 'mb/editor/addfield', $this->fields, $field, $this );
  • classes/screen.php line 165
    do_action( "mb/editor/afterfield/{$field_id}", $field, $this );
  • classes/field.php line 95
    apply_filters( 'mb/editor/templates', $templates );
  • includes/admin_header.php line 24
    do_action( 'mb/header/display_notices' );
  • assets/integrations/tablepress/tablepress.php line 39
    apply_filters( 'mb/integrations/auto_inline_tablepress', true );
  • classes/admin-class.php line 433
    apply_filters( 'mb/media/shortcode_data', $shortcode_data, $screen );
  • classes/button.php line 932
    apply_filters( 'mb/shortcode/data', $this->data, $atts );
  • classes/button.php line 855
    apply_filters( 'mb/shortcode/nocache', $atts['nocache'] );
  • classes/max-utils.php line 89
    apply_filters( 'mb/use_unsafe_js/', false );
  • plugin_locale

    filter
    classes/maxbuttons-class.php line 238
    apply_filters( 'plugin_locale', get_locale(), $domain );

Generated from MaxButtons'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: