How to run a function on plugin’s options page?
Simply register an additional sub-admin page for your plugin More info here. Then perform a wp_remote_request() to fetch the data. Loop through the results, display it in some sort of view for the end user – for e.g. a WP_List_Table and save your post types. Name the admin sub menu entry “Updates” and you’re done. … Read more