I've written a plugin that allows users to bookmark their favorite posts, but have run into a small problem when using it on a multisite network.

Each time a post is bookmarked, the ID of that post is stored in an array of IDs in the current user's meta table. This all works great, until it's used on a MS setup.

If viewing the site that the bookmarks were created on, everything works great, but when viewing a different site, I get a list of post IDs that belong to the other site. This is because the user meta table is shared between sites.

So, what I need to do is retrieve only the user meta for the current site. Is there a way to do this? I don't think there is, so if anyone has some insight, that'd be great.

没有正确的解决方案

许可以下: CC-BY-SA归因
scroll top