WordPress Media Library Hook

1k Views Asked by At

I'm working on a personal project for myself and would like to know if there is a hook I can use to alter the source of the media being displayed in the media library?

I'm somewhat new to WordPress, was able to get hooks working to display the images on the frontend but can't seem to find what the hook is for images on the backend.

enter image description here

1

There are 1 best solutions below

0
Keshav Agrawal On

You can use a WordPress hook named 'wp_enqueue_media', it'll help you to trigger the WordPress media library easily and allow you to make changes to WordPress default media library as per your code.

add_action('wp_enqueue_media', array($this, 'mediaChange'));