Custom Field and rwmb_get_value hook?

Support General Custom Field and rwmb_get_value hook?Resolved

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #33024
    Nicholas CoxNicholas Cox
    Participant

    I have created a Custom Field which basically saves an array. I can call this from the database using meatbox but obviously just returns the array as it should.

    echo rwmb_get_value( 'x' );

    Is there a way I can hook into the returned value so I can display this differently when calling 'echo rwmb_get_value( 'x' );'? e.g. to JSON or to a string

    #33032
    Long NguyenLong Nguyen
    Moderator

    Hi,

    You can use the filter hook rwmb_get_value to modify the value returned by this function. Please follow the documentation
    https://docs.metabox.io/filters/#rwmb_get_value

    #33097
    Nicholas CoxNicholas Cox
    Participant

    ok that's great thanks!

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