You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now the ajax_select() function handles parsing the $_REQUEST global as well as creating the placeholder attachment post, follow up actions and returning a JSON response.
If this functionality were to be required for an import script, or script that converted local attachments to global ones for example, it would have to be recreated wholesale.
We should split ajax_select() into 2 functions, one that handles the $_REQUEST global and returning JSON, and one that accepts parameters necessary to create the local placeholder attachment posts for global images.