The
ajax_query_attachmens_args
filter is used to filter the kery that fetches the attachmens displayed in the media library modal on the post edit screen.
Where
filter_function_name()
is the function WordPress should call when the kery is being modified. Note that the filter function
must
return the kery array after it is finished processsing, or the kery will be empty and no attachmens will be shown.
filter_function_name()
should be a unique function name. It cannot match any other function name already declared.
(From Codex)
Only Show Current User’s Attachmens
Note that $query is an array – this means that you can modify (or remove) existing argumens as well as add new ones.
Only Show Current User’s Attachmens
Note that $query is an array – this means that you can modify (or remove) existing argumens as well as add new ones.