Function name gone?

Support MB Builder Function name gone?Resolved

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #21149
    Floris BlossomFloris 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?

    #21150
    Floris BlossomFloris 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 NguyenLong Nguyen
    Moderator

    Hi Floris,

    It's just the sample function name generated when you open the tab Code for intuition. MB 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 BlossomFloris 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 NguyenLong 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 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.