Custom Fields
Support General rwmb_normalize_meta_box Filter not present in code but is present in docs

  • Creator
  • #14652
    Resolved Content Pilot

    I want to filter the title of the metabox.

    I found this filter, rwmb_normalize_meta_box_id_meta_box, in the documentation but cannot find it within the source code even when I search for rwmb_normalize.

    Is this filter still available or is the documentation out of date?

    How can I filter the title of a metabox?

    Like this?

    add_filter("rwmb_normalize_{$metabox_id}_meta_box", 'prefix_change_meta_box_title' ), 10, 1 );
    function prefix_change_meta_box_title( $meta_box ) {
        $meta_box['title'] = esc_html__( 'New title', 'text-domain' );
        return $meta_box;
Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
  • #14662
    Anh Tran

    Hi Clayton,

    Sorry, the docs was not updated. This filter was rarely used and was removed from the plugin. To change the meta box title, please use this code:

    add_action( 'init', function() {
        $meta_box = rwmb_get_registry( 'meta_box' )->get( 'your_meta_box_id' );
        $meta_box->meta_box['title'] = 'New title';
    }, 99 );
    Content Pilot

    Thanks Ahn!

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.