WordPress.org

Ready to get started?Download WordPress

Forums

Tabify Edit Screen
[resolved] Compatibility with other custom fields plugins (40 posts)

  1. miloradt
    Member
    Posted 2 years ago #

    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/

  2. Marko Heijnen
    Member
    Plugin Author

    Posted 2 years ago #

    Not sure what happens. There is a possibility to hook into a hook and do the stuff their. It is already implemented for the plugin: types.

    It is on my planning to make it workable with such kind of plugins that don't call add_meta_box in their normally way.

    I do wonder you can see the metaboxes in the settings page.

  3. Marko Heijnen
    Member
    Plugin Author

    Posted 2 years ago #

    I looked into the code and I see I have to write some own code for it. This plugin like types should register the meta boxes in another way.

    If you download the development version or implement this changeset ( http://plugins.trac.wordpress.org/changeset/529615 ) you can let it work for now.

    I will report it as an issue to the developer of Advanced Custom Fields

  4. sireneweb
    Member
    Posted 2 years ago #

    me too i'm interesting for compatibility with advanced custom field

  5. sireneweb
    Member
    Posted 2 years ago #

    there are a bug with the ACF

    Bug with ACF compatibility :
    1. Display all group fields for each langages, WMPL compatibility, because actually it display all group fields in X exemples (depends of X langage activate)
    2. Display only group fields attached to custom post type, because actually it display all group fields in every custom post type.

  6. sireneweb
    Member
    Posted 1 year ago #

    Have you resolve the bug ?

  7. Marko Heijnen
    Member
    Plugin Author

    Posted 1 year ago #

    first thing is not me to fix it. Also that kind of structure is just wrong. Translating a metabox is fine but for every language a new one.

    Second thing is something I don't know about. I need to look into that. I know ACF does really weird things and I was even thinking about to drop support

  8. antoinicolas
    Member
    Posted 1 year ago #

    Hello Marko,
    I hope you will keep ACF support and wish Eliott will help you to do so.
    ACF is very popular and useful. Your plugin seems to be very promising !
    The two would be so great for WP admins !
    This could be as a premium (read paid) extra to your plugin, no ?
    Regards,
    Antoine

  9. Marko Heijnen
    Member
    Plugin Author

    Posted 1 year ago #

    I don't do stuff so I can earn some money with it. I do stuff because I like them to do.

    To go to a point that my plugin will work well with ACF it just cost to much time and energy for something that can break so damn easily. That doesn't make sense to me.

    I rather would see the other way around. That ACF is compatible with my plugin. I do stuff how WordPress does things so it would be more easily for ACF to fix it.

    Next month I will look into most of the issues with my plugin and solve them before going into the issues with other plugins

  10. sireneweb
    Member
    Posted 1 year ago #

    good news :)
    I understand your problem Marko, if we can help you, we are open.

  11. antoinicolas
    Member
    Posted 1 year ago #

    I understand too Marko, that makes really sense.

  12. lupetalo
    Member
    Posted 1 year ago #

    No, it make sense to at least try to be compatible with plugin that is used by milions.... ACF maybe don't play by the WP rules but it is far more popular plugin and it can lift your plugin sky high if u can make it work together...

  13. Marko Heijnen
    Member
    Plugin Author

    Posted 1 year ago #

    I decided recently that at a certain point I will remove the compatible layer or at least disable by default. Plugins should do it correctly and it isn't up to me. This will be noted on an update this month.

    And ACF I really don't care about. I rather would suggest people to use Pods framework. That plugin already implement some changes to work nicely with my plugin.

  14. Scott Kingsley Clark
    Member
    Posted 1 year ago #

    It's not difficult to do things the right way and to use the right actions / filters in WordPress. After discovering the Pods 2.0 beta didn't do it the right way, I updated the plugin code and now not only is it compatible with Tabify, but it's compatible with many other plugins who would want to extend WordPress too. It shouldn't be up to a single plugin author to make things compatible with their own plugin, it should be up to the authors of all plugins to do their best to make sure their plugin plays well with others.

    Tabify is invaluable, it should be installed on any site that has more than 1 custom meta box in my opinion. As for ACF, who said that it was used by millions of sites? I won't name my sources, but there's data to suggest it's far far less than that.

  15. lupetalo
    Member
    Posted 1 year ago #

    And ACF I really don't care about.

    That is a vain view.. If someone does things differently it does not mean that you should say things like that. ACF is widely used and acknowledged. Why argue who do things right or wrong? You say that you wrote plugin because you like to do that, why dont then do something usefull for comunity and at least contact Eliot and try to understand how things work.
    http://support.advancedcustomfields.com/post/discussion

  16. lupetalo
    Member
    Posted 1 year ago #

    As for ACF, who said that it was used by millions of sites? I won't name my sources, but there's data to suggest it's far far less than that.

    That is figurative speech...

  17. Marko Heijnen
    Member
    Plugin Author

    Posted 1 year ago #

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

  18. elliotcondon
    Member
    Posted 1 year ago #

    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

  19. elliotcondon
    Member
    Posted 1 year ago #

    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...)

  20. Marko Heijnen
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  21. Marko Heijnen
    Member
    Plugin Author

    Posted 1 year ago #

    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

  22. elliotcondon
    Member
    Posted 1 year ago #

    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!

  23. Scott Kingsley Clark
    Member
    Posted 1 year ago #

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

  24. Scott Kingsley Clark
    Member
    Posted 1 year ago #

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

  25. lupetalo
    Member
    Posted 1 year ago #

    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....

  26. elliotcondon
    Member
    Posted 1 year ago #

    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!

  27. Scott Kingsley Clark
    Member
    Posted 1 year ago #

    Great, glad this could be constructive :)

  28. Marko Heijnen
    Member
    Plugin Author

    Posted 1 year ago #

    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

  29. elliotcondon
    Member
    Posted 1 year ago #

    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

  30. elliotcondon
    Member
    Posted 1 year ago #

    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?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic