Custom Fields
Re-Envisioned
Support Meta Box Builder Function name gone?

  • Creator
    Topic
  • #21149
    Resolved Floris Blossom
    Participant

    Before I used the MB Builder, I made the code directly in functions.php

    I am able to remake the whole code, except that I don’t see the function name anymore. I referred to that somewhere else on my website (bootstrap, php).

    I used to have:

    function companyfun( $meta_boxes ) {
    $prefix = ‘comp-‘;

    But now the MB Builder (and the new? online generator) say:

    function your_prefix_register_meta_boxes( $meta_boxes ) {
    $prefix = ‘comp-‘;

    I know I’m probably overlooking something simple, but what does ‘your_prefix_register_meta_boxes’ entail?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Author
    Replies
  • #21150
    Floris Blossom
    Participant

    Sorry, heard from a friend who helped me that we made that ourselves. And can’t seem to edit/delete the post.

    So maybe a better question is, how is the function name saved?

    #21154
    Long Nguyen
    Moderator

    Hi Floris,

    It’s just the sample function name generated when you open the tab Code for intuition. Meta Box Builder creates a post type meta-box for each field group and saves the information of fields as post content. Then it registers the custom field base on the post content. You can read more in the file wp-content/plugins/meta-box-builder/src/Register.php.

    #21155
    Floris Blossom
    Participant

    Thank you very much for the quick reply!

    I think I can figure it out, but possibly for someone else asking the same, where would that file be located in the AIO version?

    #21160
    Long Nguyen
    Moderator

    Hi,

    If you are using MB AIO, the file locates in wp-content/plugins/meta-box-aio/vendor/meta-box/meta-box-builder/src/Register.php.

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