esc_html__( 'webp', 'mpt' ) => 'webp'
This is an edge case, but I just discovered a bug where the unit conversion shows incorrectly when there are two ingredients with the same name.
I’ve got a recipe where the ingredients are in different groups. There’s a group of filling ingredients that include 1/2 cup Parmesan cheese, and then there’s a group of topping ingredients that includes 1/3 cup Parmesan cheese.
In the WPRM recipe, the unit conversion for the first one is 125 mL and for the second is 75 mL.
When I look at the recipe page on the site, however, both ingredients show the unit conversion as 75 mL.
My hack solution is to add a space at the end of one of the Parmesan cheese lines, so your plugin sees them as different ingredient names: one is “Parmesan cheese” and the other is “Parmesan cheese “. Once I do that, it works.
Other than that, everything is working great. Thanks again for this wonderful plugin!
]]>Hope this helps with your development.
]]>echo '<th class="frontier-menu" ><a id="frontier-post-add-new-link class="frontier-post-add-link" " href="'.frontier_post_add_link($tmp_p_id).'">'.$tmp_add_text.'</a></th>';
2) The only problem I ran with is, on /wp-admin/plugins.php, when I click on *any* “View details” link (not just this plugin but any of them), the pop-up layer only shows a blank frame. All white. Nothing else.
Since I am not a developer I am not sure I can investigate this but I will try, unless you find the solution.
It is not a big deal though because this website is in a WP network and I can check the plugin details pages from another sub-site where /#/ is not activated. However, if we can fix this, it will be fully compatible up to 5.2.3 at least.
Thanks for sharing this great little piece of code!
—
CHRISTIAN
It shows also on the demo, so if you have a screen resolution of 2560×1440 like me, just hop on https://wp-themes.com/corporate-lite/ to see the bug.
]]>...
// Remove sizes and srcset attribute.
$img->removeAttribute( 'sizes' );
$img->removeAttribute( 'srcset' );
// TODO: add "} // End if()." and delete everything below until next TODO
// Get src value.
$src = $img->getAttribute( 'src' );
// Check if we have a src.
if ( '' === $src ) {
// Set the value from data-noscript as src.
$src = $img->getAttribute( 'data-noscript' );
} // End if().
// Set data-src value.
$img->setAttribute( 'data-src', $src );
} else {
// TODO: Stop here
// Get src attribute.
$src = $img->getAttribute( 'src' );
// TODO: Review new optional code: stripping HTTP and HTTPS from src URLs
// or could you even maybe make it toggleable via checkbox in admin panel?
$src = str_replace(['http:', 'https:'], '', $src);
// Check if we do not have a value.
if ( '' === $src ) {
// Set the value from data-noscript as src.
$src = $img->getAttribute( 'data-noscript' );
} // End if().
// Set data-src value.
$img->setAttribute( 'data-src', $src );
// TODO: Delete the line below too.
}// End if().
I would be happy to be proven wrong, but after my changes everything works as it did before, so consider it both a minor bug report and a minor feature request.
]]>line 528:
actual: $pattern = ‘/.’ . $ext . ‘/i’;
modified: $pattern = ‘/^.*\.’ . $ext . ‘$/i’;
So, of course you know your plugin better then me, but it’s just a litte offer how to make hotfix.
What did I do? I marked the beginning of the phrase using ^ symbol and added .(dot) before file ext and $ in the end.
Maybe I created another bugs, I don’t know.
And thanks for this plugin it’s very useful for me)
https://www.edcor.com/wp-content/uploads/2017/02/duplicate-message.png
https://www.edcor.com/wp-content/uploads/2017/02/text-display-screenshot.png