-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
[Features-Request] More hooks for handling url table custom columns #3074
Copy link
Copy link
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Code of Conduct
- I agree to follow this project's 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
- some plugins use custom url table columns, e.g. user column to save the YOURLS_USER, who created the shortlink
- it is already possible to:
- adjust database scheme in plugin activation hook
- add new column to the search and order by dropdowns with 'html_select'
- apply the custom column for the search/ordering with 'admin_view_search_in' and 'admin_view_sort_by'
- however, handling the changes to the sql query and the generation of long names requires changing code of the core in two places:
- admin/index.php::"// Searching": requires modification to add the custom column for the 'search all' case
- includes/Views/AdminParams.php::get_param_long_name": currently only works for the native columns without checking for unknown columns
Motivation
- the usage of custom url table columns is made easier without having to patch core functionalities
Describe the solution
- admin/index.php::"// Searching": add filter to be able to change sql search clause from within a plugin (analogous to where clause with hook 'admin_list_where')
- includes/Views/AdminParams.php::get_param_long_name": add filter inside the function to allow custom handling (especially for non-native columns)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request