Open anthonythorne opened 3 years ago
My current workaround is to deregister your admin-ajax method for ajax_suggest and run a copied version with the updated code. However, this doesn't work if your plugin updates the return format which it did recently.
Feel free to open a PR with the new filter.
@rebeccahum do you have a document that I may have missed in regards to procedures, branch names, etc for opening a PR?
I created the branch update/#810
and I receive the authentication error when trying to push. Obviously, I am missing a process.
Thanks
@anthonythorne Are you using a forked version of CAP for pushing the update?
@rebeccahum Thanks for the hint.
Can you see and or access https://github.com/anthonythorne/Co-Authors-Plus/tree/update/%23810
@anthonythorne What authentication error are you receiving?
Yes - I see that forked version.
Due to the requirements of a project that I am working on, the authors need to be filtered in a more complex manner than
coauthors_search_authors_get_terms_args
can offer.While
coauthors_edit_ignored_authors
would not be feasible to add 100,000s of user ids.The requirement is to both check the logged-in user's meta and role, and then the coauthors. This would be easily achieved with a filter within the coauthors plugin either as below in the
search_authors
method or within theajax_suggest
method.In respect to version 3.4.8
In file
co-authors-plus.php
for methodsearch_authors()
and before the return statementreturn (array) $found_users;
Adding a final filter for the returned coauthors.
Something like;