I have been trying to get a grasp of WordPress Theme Development. I have some understanding of JavaScript and PHP. When I was trying to figure out how to use the media uploader and I found several articles using lines of code like below:
mediaUploader = wp.media.frames.file_frame = wp.media({
title: 'Choose a Profile Picture',
button: {
text: 'Choose Picture'
},
multiple: false
});
It does not make sense to me to use "mediaUploader = wp.media.frames.file_frame = wp.media({});". Why not just use mediaUploader = wp.media({})? I appreciate any help I can get on this because I really want to understand it.