Custom Fields
Re-Envisioned
Support Meta Box AIO How to find out (via PHP code) what extensions are activated by Metabox AIO?

This topic contains 2 replies, has 2 voices, and was last updated by  Teia Local Studio 3 weeks, 3 days ago.

  • Creator
    Topic
  • #16614
    Resolved
    Teia Local Studio
    Participant

    Hello guys,

    I need to run some PHP code if a specific extension is activated (MB Term Meta).
    Using it as a traditional plugin, it was easy, because we can apply this:

    if (in_array('mb-term-meta/mb-term-meta.php', apply_filters('active_plugins', get_option('active_plugins')))) {
        do code here...
    }

    However, inspecting the get_option('active_plugins') I can find only Metabox AIO — however MB Term Meta is activated through it. Is there a way to perform this check?

    if (mb-term-meta *is activated* via metabox-aio) {
        do code here...
    }

    Thank you!
    G.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
    Replies
  • #16624

    Anh Tran
    Keymaster

    Hi,

    The better way to check is via function_exists or class_exists. For MB Term Meta, this check will work:

    if ( function_exists( 'mb_term_meta_load' ) ) {
    }
    #16638

    Teia Local Studio
    Participant

    Super!
    So easy…
    =)

    Lock, please!
    Thank you so much as always!
    G.

Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.