beaulebens / keyring-social-importers

A collection of importers which pull your content back from social networks, and into your own WordPress install.
32 stars 17 forks source link

Add filter to stop importing after a certain count, replace Twitter-shortened links with full version #11

Closed ChrisHardie closed 7 years ago

ChrisHardie commented 7 years ago

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.

beaulebens commented 7 years ago

Committed these (with some changes) in a992093af71e7105b63cffefa3b6029c2c1951ba and 4a03ce063e687b5d7f2bac2419a7a93d836788b7. Thanks!