As I'm testing some tweaks to the import of my Twitter feed (and hopefully submitting some other PRs here), I wanted a way to do a limited import for faster debugging. This commit adds a WordPress filter keyring_importer_stop_after_imported_count that allows one to specify an import threshold after which (but not necessarily right at) the import will end. Setting it to something low like 10 means that the import would likely conclude after the first request, about 75 tweets in my case.
There may be a better way, or a better place to put this, but hopefully something like it will be useful to others.
As I'm testing some tweaks to the import of my Twitter feed (and hopefully submitting some other PRs here), I wanted a way to do a limited import for faster debugging. This commit adds a WordPress filter
keyring_importer_stop_after_imported_count
that allows one to specify an import threshold after which (but not necessarily right at) the import will end. Setting it to something low like 10 means that the import would likely conclude after the first request, about 75 tweets in my case.There may be a better way, or a better place to put this, but hopefully something like it will be useful to others.