Hi,
I’m not sure what you mean by “send the blog ID”. Do you mean to get the blog ID? If so, just use get_current_blog_id()
.
You can use the debug utility method to check the value.
AdminPageFramework_Debug::log( get_current_blog_id() );
Change the class name AdminPageFramework_Debug
to yours with your class prefix for compiled versions.
Don’t forget to enable WP_DEBUG
. After loading a page, find the debug log file in wp-content.
On multisite, my plugin stores the option with key ‘APF_Option’ on every blog, in separate tables ‘prefix_blogid_option’.
When I call getOption(), I get the value stored on the current blog table, but I want to display the option saved on another blog.
For example, I’m on blog 1 and I want option stored on blog 2.
I hope I’m clear enough…
Thanks
Maybe,
AdminPageFramework_Debug::log( get_blog_option( 3, 'APF_Option' ) );
where 3
is the blog ID.
Yes, it’s the best way to do it.
Thanks!