Skip to content

Hooks for adding a search item #3262

@carsten-wilhelm

Description

@carsten-wilhelm

Code of Conduct

Submission validity

  • This is not a personal support request, that should be posted on discussions community.
  • I checked current issues and this request isn't a duplicate of an existing issue, opened or closed.

Summary

As part of a special multi-user plugin, we wanted to add a search filter for a username.

There are some issues with that, currently this is not possible without changing the core:

  • The filter "html_select" can be used to add an option, but this needs to be done in the generated HTML for the select box
    => it would be better to add a hook to include a new option before creating the HTML
  • The "search_in" parameter can be changed in the filter "admin_view_search_in", which seems to be OK
  • But then you get an error, because the new filter has no translation in "params_translations" in AdminParams..php
    => there is no filter or hook to add newe translations, so this would require core changes for now

Motivation

We want to filter for a specific username in our multi-user plugin

Describe the solution

Add a new filter before "html_select" where plugins can change the list of options
Add a new filter to add a new translation for the search filter.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions