wphooks.info - get_attached_file

get_attached_file

(trunk - 5.0-alpha-42490)

The hook occurs in the following file:

wp-includes/post.php:
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
	}

	/**
	 * 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