WordPress fires admin_enqueue_scripts
hook earlier, than add_options_page
, where you put your admin_enqueue_scripts
.
Solution is simple, you need to put your admin_enqueue_scripts
hook outside of the add_options_page
function callback.
function load_wp_media(){
wp_enqueue_media();
wp_enqueue_script( 'waterStampScript', plugin_dir_url( __FILE__ ) . 'js/app.js', array('jquery'));
}
add_action( 'admin_enqueue_scripts', 'load_wp_media' );