Media doesn't attach to custom post type posts
-
Hey! My friend Alex Woolfson uses this plugin, as well as one I developed. My plugin relies heavily on custom post types and the media attached to them, but Alex noticed that – while BM Custom Login is active –?media uploaded on the Add/Edit Post screen for my plugin’s custom post type posts weren’t actually attaching.
I wanted to rule out my plugin as the culprit (as it very well could’ve been) so I did a quick test on my dev box with just BM Custom Login and a dummy plugin that only registers a custom post type:
function dummy_post () { register_post_type('dummy_post', array( 'public' => true )); } add_action('init', 'dummy_post');
Even with just these two plugins active images don’t properly attach to the custom post type posts when uploaded. After some poking around it looks like the issue may be with the
enqueue_color_picker()
function: it’s callingwp_enqueue_media()
everywhere, which is preventing media from properly attaching to custom post type posts. I did a pull request on GitHub with a proposed fix.
- The topic ‘Media doesn't attach to custom post type posts’ is closed to new replies.