Namespace: findPosts

findPosts

Creates a dialog containing posts that can have a particular media attached to it.
Since:
  • 2.7.0
Source:

Requires

  • module:jQuery

Methods


<static> close()

Clears the found posts lists before hiding the attach media dialog.
Since:
  • 2.7.0
Source:
Returns:
Type
void

<static> open(af_name, af_val)

Opens a dialog to attach media to a post. Adds an overlay prior to retrieving a list of posts to attach the media to.
Parameters:
Name Type Description
af_name string The name of the affected element.
af_val string The value of the affected post element.
Since:
  • 2.7.0
Source:
Returns:
Always returns false.
Type
boolean

<static> overlay()

Binds a click event listener to the overlay which closes the attach media dialog.
Since:
  • 3.5.0
Source:
Returns:
Type
void

<static> send()

Retrieves and displays posts based on the search term. Sends a post request to the admin_ajax.php, requesting posts based on the search term provided by the user. Defaults to all posts if no search term is provided.
Since:
  • 2.7.0
Source:
Returns:
Type
void