Support » Plugin: Tabify Edit Screen » [Plugin: Tabify Edit Screen] Compatibility with other custom fields plugins

  • Resolved miloradt

    (@miloradt)


    I love this plugin and I think it is going to help my users quite a bit. However, I am using a plugin to create custom write fields for all users, and these custom fields show up in every new tab.

    The plugin I am using is Advanced Custom Fields 3.1.7.

    Is there a way for Tabify Edit Screen to recognize custom fields and allow the user to assign them to tabs as well? Or at least to limit the custom fields to only one tab?

    I have not tested Tabify Edit Screen with alternative custom fields plugins like More Fields. I will try this some time this week and let you know if it behaves differently.

    Thanks! Keep up the good work!

    http://wordpress.org/extend/plugins/tabify-edit-screen/

Viewing 15 replies - 16 through 30 (of 39 total)
  • Plugin Author Marko Heijnen

    (@markoheijnen)

    If you read the forum here on wordpress.org you will see that I tried that

    Hey guys,

    Always nice to hear people are having a go at ACF.

    The tabify plugin looks pretty cool. I’ll have a look for some docs on how to hook in and show the ACF field groups in the metabox lists.

    Any help would be appreciated.

    Thanks
    Elliot

    Hmmm…

    Perhaps this is because ACF is not using the hook “add_meta_boxes” to add it’s metaboxes (didn’t realize you weren’t meant to use admin_head for that…)

    Plugin Author Marko Heijnen

    (@markoheijnen)

    Yes that is the way how to do that in 3.0. admin_init was before and if you do it on admin_head then that should work fine too.

    When looking at my reaction at the topic I’m not even sure what I meant with that:
    http://wordpress.org/support/topic/plugin-advanced-custom-fields-the-way-the-plugin-add-meta-boxes-breaks-can-be-improvred?replies=3

    I will dive into it right now.

    Plugin Author Marko Heijnen

    (@markoheijnen)

    Hey Elliot,

    What first forgot to say, thank you for looking into it again.

    Now I know it again. It is because of acf_input::validate_page(). That will return false when it is on my admin settings page. So the metaboxes will not be called. Will play with it to add a filter in the end of the function what enable you to return true.

    If I’m correct your plugin always shows the metabox right? So no checking on page template, taxonomy or any other value.

    Marko

    Hi guys

    I’ve attempted to use the “add_meta_boxes” action to add compatibility with the ACF plugin but unfortunately it is not that easy.

    Because the ACF plugin uses “location rules” to dynamically add the metaboxes to post types, the Tabify plugin never knows that acf adds metaboxes to anything.

    I’ve tried to work around this, but I can’t see an easy solution.

    This is just a problem caused by ACF having such a unique “location rules” functionality, which will not be changed as it is bloody powerful!

    Why not disable the location rules from running on any plugin page based off of the options-general.php in the admin page?

    And or add a hook that can disable location rules altogether, which any plugin could hook into with a one liner.

    This is just a problem caused by ACF having such a unique “location rules” functionality, which will not be changed as it is bloody powerful!

    Maybe a switch of some kind, i almost never use ACF location rules in the way other than in post,page,cpt or options page….

    Hi Scott,

    I can see where your coming from, but it’s not that easy.
    After a few minutes staring into the ceiling and thinking about it, I think the way in which ACF add’s field groups can be drastically improved.

    At the moment, it is using PHP to compare location rules, but this can be done via JS + AJAX on the page load.

    I’ll try re writing ACF to add it’s field groups to every $post_type. Then only use JS to show / hide metaboxes…

    Thanks guys!

    Great, glad this could be constructive 🙂

    Plugin Author Marko Heijnen

    (@markoheijnen)

    I think calling it from PHP is fine as it is. Doing it with JS/AJAX seems weird to me and also makes it weird when JS is disabled. ( I know this doesn’t really help me ).

    I’m thinking to find of a solution that works great and I find it difficult to find one. If it is possible to have the code on ‘add_meta_boxes’ that would help Scott’s first idea to disable location rules when acf_input::validate_page() return false.

    If that isn’t possible maybe a filter into acf_input::validate_page() to be able to return true. and then a filter to be able to disable the location rules. This idea seems more complex because of multiple filters

    Hi guys,

    Just want to clarify this. ACF does not currently loop through all post_types and add field groups to them..

    Field groups are added “on the fly” when on an edit page.

    The problem we are having is not caused by the acf validate_page() or such.

    I’m currently re-writing the plugin to have a simpler (add all acf field groups to all post types) approach

    Hi again,

    Okay, so after re writing the ACF plugin to add metaboxes to all post types, is appears there is a new issue.

    The Tabify plugin is using JS to hide / show the metaboxes based on the tab. This causes ACF field groups (which should remain hidden) to appear.

    I just don’t think these 2 plugin can integrate easily. Any ideas?

    Hi again,

    Okay, so after re writing the ACF plugin to add metaboxes to all post types, is appears there is a new issue.

    The Tabify plugin is using JS to hide / show the metaboxes based on the tab. This causes ACF field groups (which should remain hidden) to appear.

    I just don’t think these 2 plugin can integrate easily. Any ideas?

    Can you share edited version?

Viewing 15 replies - 16 through 30 (of 39 total)
  • The topic ‘[Plugin: Tabify Edit Screen] Compatibility with other custom fields plugins’ is closed to new replies.