Custom Fields
Re-Envisioned
Support MB Settings Page Problem with MB Settings Page in custom plugin with class-tgm-plugin-activation

This topic contains 1 reply, has 2 voices, and was last updated by  Anh Tran 1 year, 2 months ago.

  • Creator
    Topic
  • #9223
    Resolved
    datab
    Participant

    I wanted to use mb settings page plugin in my custom plugin using class-tgm-plugin-activation class, but i cannot make it work together. “mb_settings_pages” hook is not accessible in the plugin.
    Metabox group which is inlcuded the same way works without problems.
    Here is the code:

    https://ghostbin.com/paste/yubhz

Viewing 1 replies (of 1 total)
  • Author
    Replies
  • #9227

    Anh Tran
    Keymaster

    Hello,

    When do you call this statement add_filter( 'mb_settings_pages', 'prefix_options_page' );? Do you call it directly from the main plugin’s file?

    The filter mb_settings_pages must be called before admin_menu action, which is used to add admin menu. That action fires quite early, before admin_init, so if you call it inside a hook, it might not work as expected.

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.