Load all WordPress tags from the given site.

        :param max_pages: kill counter to avoid infinite looping
        :return: None

def load_tags(self, max_pages=30):
        """
        Load all WordPress tags from the given site.

        :param max_pages: kill counter to avoid infinite looping
        :return: None
        """
        logger.info("loading tags")

        # clear them all out so we don't get dupes if requested
        if self.purge_first:
            Tag.objects.filter(site_id=self.site_id).delete()

        path = "sites/{}/tags".format(self.site_id)
        params = {"number": 1000}
        page = 1

        response = self.get(path, params)

        if not response.ok:
            logger.warning("Response NOT OK! status_code=%s\n%s", response.status_code, response.text)

        while response.ok and response.text and page < max_pages:
            logger.info(" - page: %d", page)

            api_tags = response.json().get("tags")
            if not api_tags:
                # we're done here
                break

            tags = []
            for api_tag in api_tags:

                # if it exists locally, update local version if anything has changed
                existing_tag = Tag.objects.filter(site_id=self.site_id, wp_id=api_tag["ID"]).first()
                if existing_tag:
                    self.update_existing_tag(existing_tag, api_tag)
                else:
                    tags.append(self.get_new_tag(api_tag))

            if tags:
                Tag.objects.bulk_create(tags)
            elif not self.full:
                # we're done here
                break

            # get next page
            page += 1
            params["page"] = page
            response = self.get(path, params)

            if not response.ok:
                logger.warning("Response NOT OK! status_code=%s\n%s", response.status_code, response.text)
                return