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
2 2 dev #101
Merged
Merged
2 2 dev #101
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Adding the ability to pass a staff member ID to the `simple-staff-list` shortcode to display a single staff member using the default staff loop template. Usage: `[simple-staff-list id=5]`
I decided to show the staff member's post ID so it's easier for end users to find and use in the shortcode.
Adds the `sslp_query_args` filter that filters the args used in `WP_Query` by the `[simple-staff-list]` shortcode. The second parameter is `$context` and describes the context in which the filter is being run. I added this parameter in case there are other scenarios where we're querying staff members but _not_ from the shortcode i.e. a future Gutenberg block. If an array is not returned, I reset `$args` to the unfiltered value. I then assign the `post_type` value so we're always going to be querying the `staff-member` post type.
…code-query-args Add the `sslp_query_args` filter
Needed to set a sane default here instead of `-1`. If a user happened to have 100s or 1000s of staff members, using the shortcode could have caused trouble.
…aff-query Limits the WP_Query posts_per_page to 100
Adds the group data to the CSV export
Adds the `sslp_enable_staff_member_archive` filter to control whether or not the `https://your-site.com/staff-members` archive page is enabled. The default is `true`. Remember that after changing this value you'll need to flush your permalinks to have the change take effect.
…taff-member-archive Adds a filter to disable the staff-members archive page.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #71, #72, #84, #86, and #96