Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add unlisted post status and filter to admin post list. #40

Merged
merged 3 commits into from
Oct 15, 2020
Merged

Add unlisted post status and filter to admin post list. #40

merged 3 commits into from
Oct 15, 2020

Conversation

matthewmcvickar
Copy link
Contributor

@matthewmcvickar matthewmcvickar commented Oct 5, 2020

Description

  • Adds ' — Unlisted' next to unlisted posts in the post list, like you'd see next to a draft or private post.
  • Adds 'Unlisted' as a filter above the list of posts, similar to 'Mine' or 'Drafts,' et cetera.

Screenshots

Unlisted post status added to post list item:
image

Unlisted post filter:
image

Types of changes

  • Three new functions/hooks added to class-unlist-posts-admin.php.

How has this been tested?

  • Tested in a development environment with hidden posts.

Checklist:

  • My code is tested COULD NOT TEST
  • My code passes the PHPCS tests COULD NOT TEST
  • My code follows accessibility standards
  • My code has proper inline documentation
  • I've included any necessary tests NO TESTS EXIST
  • I've included developer documentation INLINE
  • I've added proper labels to this pull request NO LABELS AVAILABLE

@matthewmcvickar
Copy link
Contributor Author

matthewmcvickar commented Oct 5, 2020

Update: I was able to get the PHPCS to run, and it found no problems with this file:

❯ ./vendor/bin/phpcs -p class-unlist-posts-admin.php --standard=PHPCompatibilityWP
. 1 / 1 (100%)

@matthewmcvickar
Copy link
Contributor Author

Another update: I added localization for the 'Unlisted' post status string.

Copy link
Collaborator

@Nikschavan Nikschavan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy to fix this up myself in a few days

class-unlist-posts-admin.php Outdated Show resolved Hide resolved
@Nikschavan
Copy link
Collaborator

Thank you for the PR @matthewmcvickar, I will get this merged and released in a few days

@Nikschavan Nikschavan merged commit 9508910 into brainstormforce:master Oct 15, 2020
Nikschavan added a commit that referenced this pull request Oct 15, 2020
@matthewmcvickar
Copy link
Contributor Author

Excellent! Thank you!

@Nikschavan Nikschavan mentioned this pull request Oct 15, 2020
7 tasks
@Nikschavan
Copy link
Collaborator

Nikschavan commented Oct 15, 2020

btw @matthewmcvickar I created a few follow-up PRs #41 and #42 to add few more changes

  1. Posts filter is displayed on all public post types
  2. The count of the posts is relative to that particular post type.
  3. Dynamically build the link to post status relative to the current post type.

@Nikschavan Nikschavan mentioned this pull request Oct 15, 2020
7 tasks
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.

2 participants