wphooks.info - get_attached_file

get_attached_file

(trunk - 5.0-alpha-43320)

The hook occurs in the following file:

wp-includes/post.php:
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
	}

	/**
	 * Filters the attached file based on the given ID.
	 *
	 * @since 2.1.0
	 *
	 * @param string $file          Path to attached file.
	 * @param int    $attachment_id Attachment ID.
	 */
	return apply_filters( 'get_attached_file', $file, $attachment_id );
}

/**
 * Update attachment file path based on attachment ID.
 *
 * Used to update the file path of the attachment, which uses post meta name
 * '_wp_attached_file' to store the path of the attachment.
 *
 * @since 2.1.0