• Resolved aljuk

    (@aljuk)


    I’ve run into a clash between Codepress Custom Columns and Ninja Forms.

    The latest update to ninja foms contains a system to manage form submissions which integrates column headers for the ‘submission’ post_type. With both plugins attempting to provide columns for this post_type I’m getting “headers already sent” etc. and it got me thinking…

    Would there be any easy way to add switches to Codepress Custom Columns to enable / disable its functionality on a per post_type basis? This might prove useful with setups which employ other plugins that provide their own one-off column display functionality.

    https://wordpress.org/plugins/codepress-admin-columns/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Jesper van Engelen

    (@engelen)

    Heya!

    This is, in fact, possible at this point! Using the filter cac/storage_models, you can remove storage models that should be disabled.

    To disable Admin Columns for a post type called “mycpt”, for example, the following code would suffice:
    https://gist.github.com/engelen/a8e1df97e547104f378d

    Please note that this will remove the post type from the settings screen as well.

    Does this solve your problem?

    Cheers!
    Jesper

    Plugin Author Jesper van Engelen

    (@engelen)

    By the way, we’ll contact the Ninja Forms authors as well regarding this issue! We’re always looking to improve compatibility with third party plugins.

    Hello, Jesper!

    I think I’m getting the same issues that aljuk. I used your gist above, and it indeed removes the Submission (named nf_sub) Custom Post Type from the list on the CAC plugin. But this doesn’t solve the problem, unfortunatelly.

    Just to let it registered, here is what I get when I try to check a Submission list with the CAC plugin activated:

    Warning: Invalid argument supplied for foreach() in (...) /wp-content/plugins/ninja-forms/classes/subs-cpt.php on line 286
    
    Warning: Invalid argument supplied for foreach() in (...) /wp-content/plugins/ninja-forms/classes/subs-cpt.php on line 286
    
    Warning: Invalid argument supplied for foreach() in (...)/ /wp-content/plugins/ninja-forms/classes/subs-cpt.php on line 286
    
    Warning: Cannot modify header information - headers already sent by (output started at (...) /wp-content/plugins/ninja-forms/classes/subs-cpt.php:286) in (...) /wp-includes/pluggable.php on line 1173

    Any ideas about this? I talked to the support team from Ninja Forms and sent to them this thread to let them know about the issue. Can you guys work on a solution? Both plugins are fundamental to my projects! 🙁

    Thanks for any feedback!

    Cheers,

    Diego de Oliveira

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Feature request : disable columns by post_type’ is closed to new replies.