upload image with rest API to the media library

Does functions.php continuously execute while WordPress is running? Yes, it’s run on each page load. You can learn more about the (theme) functions file at https://developer.wordpress.org/themes/basics/theme-functions/. Should this be in functions.php file and how do i get it to execute only once? It can be put in that file, however, it should be run conditionally, … Read more