Filter: RML/$action/AnyParentHasMeta

apply_filters( 'RML/$action/AnyParentHasMeta', $conditions, $folder, $args ) → {Array.<string>}

Add a condition after a defined action ($action) to check if any parent has a metadata. It also includes the self folder so you can check for own folder metadata. Note: All found parents are grouped and passed through an action RML/$action/AnyParentHasMeta/$meta_key so you can execute your command. The allowed $actions are:

  • "Folder/Insert": Items are moved to the folder (see RML/Item/MoveFinished action for $args)
  • "Folder/RelocatedOrMoved": A folder is relocated or moved to a given new parent (see RML/Item/Relocated action for $args), since 4.4
  • Your action: Please contact Real Media Library developer to request another action
Parameters:
Name Type Description
$conditions Array.<string>

The conditions which are joined together with OR

$folder IFolder

The IFolder object

$args Array.<arguments>

The referenced arguments

Since:
  • 3.3
See:
Returns:

The conditions

Type
Array.<string>
Example

Add a condition

$conditions[] = $wpdb->prepare("rmlmeta.meta_key = 'myMeta' AND rmlmeta.meta_value = %s", "test");