I need to automatically (without anything visible to the user in the UI and without user intervention) 'mark' a post in a sub-blog with the theme it was set to when the user posted.
As I understand it I have to use
wp_insert_term() once to insert this new term 'uses-theme' into the terms table in the database.
Then I have to add an action containing
wp_set_post_terms() (with the value of
get_current_theme()), to some core function that is executed when a post is created or saved.
I don't have access to the core .php files, so I'm looking for some way of adding this to the functions.php.
If it's easier to automatically tag or categorize, I will do that. I just don't know how to hook it in.
UPDATE: I just realized I get the blogid in the post meta. If I could look up the stylesheet_directory or similar "bloginfo" field from the database, the problem would be solved. But I'm looking at the blogs table, and it doesn't have those bloginfo fields - and get_bloginfo() only returns info about the CURRENT blog.
If I knew how to look up stylesheet information from the blog id, I would be home! How?