I’m in the middle of building out a settings template for this particular plugin. It’s set to blog-level in terms of scope and the settings page is displaying and working fine.
I now need to access the current blog_id in order to run the rest of my settings, and placing
What gives?
I checked out the source of the page and the auto-generated form headers for this plugin correctly show a blog_id of 28 in the hidden input field.
How can I access the blog_id in order to generate a
Reported on Movable Type 4.2
Assuming instance is a function that initialises the plugin and that $app has been loaded with the app context, then this is what I use.
my $cfg = instance()->get_config_hash('blog:'.$app->blog->id);$cfg then contains all the setting pairs as a hash.