Custom Fields
Re-Envisioned
Support General Working with the field custom-html through filters

  • Creator
    Topic
  • #27656
    Max
    Participant

    Hello. viewed this topic
    https://docs.metabox.io/using-custom-html-to-output-anything/. I understood how to work with the field through the return function. Is it possible to change the field through filters?

    My task is this. I create a table with prices on the settings page. group + fields within the group I want the names of the lines that are in the first column to correspond to the page titles.
    I will have 15 rows in my table.
    I want to programmatically get the title of the page by the id of the page. Questions.
    1) Can I in a function that is in PHP Callback
    challenge different arguments? (I don't want to create 15 different PHP Callback functions)
    2) Is there a filter that will change the field values?
    tried like this:
    field id = head_standart

    add_filter( 'rwmb_field_meta', 'your_filter_function', 10, 3 );
    function your_filter_function( $meta, $field, $saved ) {
    if ( 'head_standart' == $field['id'] ) {
    $meta = "<div>lll</div>";
    }
    return $meta;
    }

    not work

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