Skip to content

Conversation

justinmaurerdotdev
Copy link

Fixes #1068.

Description

Per the #1068 issue, there are some use cases where the 'manage_posts_custom_column' hook is used outside of The Loop. In current versions of the plugin, this scenario produces an empty column. This PR refactors the callback for that hook to use the passed $post_id instead of using the global $post variable.

Testing

You can test that nothing has broken by viewing the Posts table and checking that the Authors column displays the same as before. I'm not 100% sure of a reliable test for the edge case, besides installing a plugin like Admin Columns and running the export from the Posts table.

…ils, since some uses of the 'manage_posts_custom_column' hook don't happen inside The Loop.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

List table $post is null in exports

1 participant