WordPress: How to get attachment file name by id?

How to get attachment file name by id? @wordpress
$attachment_id = 100; // attachment id
$thumbnail_name = basename ( get_attached_file( $attachment_id ) ); 

Share this post:

Share on facebook
Share on twitter
Share on linkedin
Share on email
Amitpal Singh
Amitpal Singh
Freelance website and application developer. Working from Sangrur Punjab in India.
Follow Amitpal on:

Register

Create your account and post ad