This plugin records which user actually published a post, which in a multi-author environment may not always be the original post author. This helps to maintain accountability for who was ultimately responsible for a post appearing live on a site.
The admin listing of posts is amended with a new “Published By” column that shows the name of the person who published the post (for those posts that have actually been published).
For posts that were published prior to the use of this plugin (and thus the plugin could not directly record who published those posts), the plugin makes a best guess attempt to ascertain who published the post. After failing to find the publisher of the post as recorded by the plugin, it checks for who last edited the post, then who is responsible for the latest revision of the post, and finally failing those, it assumes it was the post author. In cases where it had to go through this process, the name of the person it deduced as the likely publisher appears italicized and with a question mark at the end. If you’d rather the plugin not make an attempt to guess the publisher, you can disable the checks by including this snippet in your theme’s functions.php (or, ideally, a site-specific mu-plugin):
<?php add_filter( 'c2c_published_by_skip_guessing', '__return_true' ); ?>
published-by.zipinside the plugins directory for your site (typically
/wp-content/plugins/). Or install via the built-in WordPress plugin installer)
- Activate the plugin through the ‘Plugins’ admin menu in WordPress
- If a post is published, then changed back to a draft, and then published a second time by a different user, who is noted as the publishing user?
The user most recently responsible for a post getting published will be recorded as the publishing user. Editing a published post does not change the publishing user.
- How do I see (or hide) the “Published By” column in an admin listing of posts?
In the upper-right of the page is a “Screen Options” link that reveals a panel of options. In the “Columns” section, check (to show) or uncheck (to hide) the “Published By” option.
- Why does the person’s name listed as the “Published By” user appear in italics with a question mark at the end?
It’s an indication that for the given post the name shown is a guess by the plugin based on existing post data. For posts that were published prior to the use of this plugin (and thus the plugin could not directly record who published those posts), the plugin makes a best guess attempt to ascertain who published the post. After failing to find the publisher of the post as recorded by the plugin, it checks for who last edited the post, then who is responsible for the latest revision of the post, and finally failing those, it assumes it was the post author. It’s likely that the guess is correct, but it’s impossible to say for certain when the plugin isn’t activated when posts were published.
- Does this plugin include unit tests?
Contributors & Developers
“Published By” is open source software. The following people have contributed to this plugin.Contributors
- New: When showing the ‘Published by’ user, link their display name to their profile page.
get_user_url()to get the link to the user’s profile
- Add styles for the ‘Published by:’ metabox appearance
- New: Visually indicate when the ‘published by’ user for a post is guessed
is_publisher_id_guessed()to determine if the publisher_id for a given post was guessed
- Display guessed publisher’s name in italics with question mark at the end
- Change: Register meta field via
- Add own
hide_meta()in favor of use of
- Include meta field and value in REST API responses for posts
- Add own
- Change: Modify handling for ‘c2c_published_by_post_status’ filter
- Add and internally use
get_post_statuses()as getter for post statuses that should have the ‘Published By’ column
- Allow more dynamic filtering by running the filter in
get_post_statuses()rather than just once on ‘init’
- Add and internally use
- Change: If the current user is the person who published the post, then simply state “you” as the name.
- Change: Add more unit tests.
- Change: Ensure
get_publisher_id()returns an integer value.
- Change: Enable more error output for unit tests.
- Change: Default
/tmp/wordpress-tests-librather than erroring out if not defined via environment variable.
- Change: Note compatibility through WP 4.7+.
- Change: Remove support for WordPress older than 4.6 (should still work for earlier versions)
- New: Add FAQ about showing or hiding the “Published By” column.
- Change: Update existing two screenshots and add a third.
- Change: Update copyright date (2017).
- Change: Add support for language packs:
- Don’t load plugin translations from file.
- Remove ‘Domain Path’ from plugin header.
- Remove .pot file and /lang subdirectory.
- Change: Explicitly declare methods in unit tests as public.
- New: Add LICENSE file.
- New: Add empty index.php to prevent files from being listed if web server has enabled directory listings.
- Change: Note compatibility through WP 4.4+.
- Change: Update copyright date (2016).
- Change: Use
__DIR__since the latter is only available on PHP 5.3+.
- Change: Minor tweaks to formatting for inline docs.
- Change: Note compatibility through WP 4.3+.
- Minor additions to unit tests
- Use DIR instead of
- Note compatibility through WP 4.1+
- Update copyright date (2015)
- Regenerate .pot
- Minor amendment to documentation
- Minor tweak to an FAQ question
- Change documentation links to wp.org to be https
- Change donate link
- Note compatibility through WP 4.0+
- Add plugin icon
- Initial public release