I tested this plug-in to find that it breaks the standard function has_post_thumbnail.
When a post does not have a featured image using this function together with this plug-in activated results in a true situation. It returns image id 1. This only happens on non primary site of multi site installation.
So users be warned!
]]>Hi there,
Thanks for a great plugin!
One issue, albeit it is a bit obscure. If you select a featured image on a sub-site off a multisite install, regardless of whether the image is hosted on the actual sub-site, or on the main site, it does not get used for the og:image meta tag as it should. Instead, it displays a generic or blank image. This issue only occurs on subsites, not the main or parent site of the multisite install.
This means on Facebook and Twitter there is no associated image with the post on my two subsites, which is frustrating. When I deactivate the plugin, the image URL returns in the og:image meta tag. So it is definitely an issue with the plugin.
I would greatly appreciate if you were able to look into this. Thanks!
]]>Hey
Any chance you could give support to get_the_post_thumbnail_url
?
I need to insert the images in some of my themes as background images to have the effect I want. Cheers!
]]>Hi!
I cannot get this plugin working on WordPress 4.7: the dialog to select a picture with “Network shared data” is working, but this should not be saved correctly, because my theme (Customizr) cannot get the selected featured image. Any idea how to solve that?
Thank you in advance!
Best regards
]]>This plugin is great! I’m not using Network Media Library, but another plugin built from it: Multisite Global Media. Is it possible to include support for this plugin also?
]]>Hi,
I found that saving post via XML-RPC breaks MU featured image data.
XML-RPC “wp.editPost” triggers “save_post” and such events.
Unfortunately, there is no usual post data in XML-RPC call.
I added workaround code below:
function ibenic_mufimg_save_thumbnail( $post_id ) {
$currentBlogID = get_current_blog_id();
$switchCount = 0;
if( $currentBlogID == IBENIC_MUFIMG_PARENT_BLOG_ID){
return;
}
// I added this block
if (count($_POST) === 0) {
//error_log('Cancel changing MUFImage');
return;
}
$imgURL = $_POST["ibenic_mufimg_custom-img-src"];
]]>
Thank you for your useful plugin.
First thing, I consider this thing as a problem. That the default blog has been set at Network Admin only has old Featured Image box but not the new one with Images From URL or Network Shared Media. I need it at all blogs inside network. And I think a lot of people need the same too.
Second thing, I think this feature is useless: “Images from URL will be downloaded into the WordPress Media and it can be used for anything else inside WordPress”. It’s the same job as I save the image and upload it to my library.
More clear, who will need to use “Images From URL” feature? That’s when I don’t want to host the image on my server, and use the external url. But your plugin just makes it internal… So I prefer to remove that feature, and leave the “Images From URL” just as it, no need to share the image from external url multisites.
Some themes like “WP FanZone” shows featured images in blog top page.
When a post does not have a featured image, Multisite Featured Image writes the src attribute with no value.
This causes layout problem.
I fixed below:
function ibenic_mufimg_post_thumbnail_html($html, $post_id, $post_thumbnail_id, $size, $attr) {
/*snip*/
$imgTag = ''; // initialize
if ($imgURL != '') { // do not write tag if $imgURL is not available
$imgTag = "<img ";
$imgTag .= " src='".esc_url( $imgURL )."' ";
if(is_array($attr) && count($attr) > 0){
foreach ($attr as $attribute => $value) {
$imgTag .= " ".$attribute."='".$value."' ";
}
}
$imgTag .= " />";
} // end if
return $imgTag;
}
]]>
I found a problem in this Multisite Featured Image plugin where “Add New Post” page shows “You are currently editing the page that shows your latest posts.” instead of the editor.
Reproduce procedure:
1. Make 3 sub sites or more.
2. Go to “Add New Post” page in sub site.
I looked at the source code and fixed below:
----------------------------------------
function ibenic_mufimg_save_thumbnail( $post_id ) {
$currentBlogID = get_current_blog_id();
$switchCount = 0; // change to counter
/*snip*/
foreach ($blogList as $blog) {
if($blog["blog_id"] == $currentBlogID){
continue;
}
switch_to_blog( $blog["blog_id"] );
$switchCount++; // increment the counter
$imgID = ibenic_mfuimg_get_attachment_id_from_url( $imgURL );
if($imgID != false){
break;
}
}
}
/*snip*/
//Change to the current blog
for ($i = 0; $i < $switchCount; $i++) { // call $switchCount times
restore_current_blog();
}
----------------------------------------------
switch_to_blog() has a stack (actually just an array) and pushes current blog id to the stack.
restore_current_blog() pops the stack and back to the previous blog in the switching history.
We need to call restore_current_blog() same number of times of calling switch_to_blog().
Hi,
I’m trying to get this plugin working on a multisite, combined with the plugin Netwerk Shared Images, but I cannot find how to insert a featured image. The featured image box shows allright on a subsite, but when I click on Set custom image
and choose an image from Netwerk Shared Media, there is no option to add it as a featured image, only as an image in the post itself.
Also, the link that is mentioned in the description of this plugin is not working: https://siderrz.com/wordpress-multisite-shared-featured-image/
Is this plugin maintained, or should I search for another solution?
]]>