wphooks.info - get_attached_file

get_attached_file

(trunk - 5.0-alpha-42177)

The hook occurs in the following file:

wp-includes/post.php:
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
	}

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