Skip to content

Improve function portability for processing selections #52

@roborourke

Description

@roborourke

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions