Closed nlemoine closed 3 years ago
For a bit of context, the original design decision here was that the column callback function could be shared with one that's used within the loop on the front end, for example for outputting a meta value, and would therefore use the global post. At the time it made sense but I don't think there's a huge amount of value in that and it's easy enough to work around.
Happy to merge this in, but this is technically a breaking change so I'll leave it for version 5.0.
Note: In d0b86d4116ec513690c5f525d887e197d9f9f2fb I changed this to passing the full WP_Post
object.
Nice! This is even better 👍
$post_id
parameter is available in the original hook. This PR passes it to the custom column callback (function
) and avoids to callglobal $post
to access current post data.