Joe Dolson on "[Plugin: wp-Typography] conflict with wp-to-twitter"

ساخت وبلاگ

if both wp-typography and WP to Twitter are activated, wp-typography doesn't work anymore for some reason ...
(it doesn't matter to me personally because i already was moving away from WP to Twitter)

https://wordpress.org/plugins/wp-typography/

You mean no typographic replacements are done? Have you got a link to demo page where both plugisn are enabled? From a quick look at the WP-to-Twitter code I don't see anything that could be the cause of this ... *strange*

exactly, the replacements aren't done (only the one wordpress does itself). indeed, i found it strange too - never thougt of this plugin to interfere here (took me a while to figure it out ...)
i reactivated wp-to-twitter on https://teestube.matthias-mader.de so you can check it out.

Could you please enable "Remove hyphenation when copying to clipboard" ("Bedingte Trennstriche beim Kopieren in die Zwischenablage entfeen") in the settings? I'd like to see whether the plugin is doing anything at all. That option would load a small JS file on the front end.

should be enabled now.

OK. The plugin is running. It's also doing at least some substitions, e.g. <span class="caps">.

What exactly is not working? The quote marks in Einen feinen grünen Tee hat mir “mein”? Please post the source snippet for this line from the HTML editor here.

the quote marks aren't working (and they are the main reason to use wp-typography for me)

the souce snippet:

Einen feinen grünen Tee hat mir "mein" Teeladen als Probe mitgegeben:

should be substituted to (according to the settings of wp-typography):
Einen feinen grünen Tee hat mir „mein“ Teeladen als Probe mitgegeben:

Strange. It looks like wptexturize is called before wp-Typography, but that should be impossible (wp-Typography disables it). I'll have to debug this in detail later.

ok, no worries (as i said earlier: i don't use the plugin-combination at the moment ...)

How bizarre. If you find anything in your explorations that I need to fix in WP to Twitter, let me know!

Found the culprit. It's the Freemius, which calls get_plugin_data() in it's constructor, which in tu calls wptexturize(). Since this happens immediately on include, there is no chance for wp-Typography's filters to be applied. Unfortunately, this means there is literally nothing I can do to ameliorate this in wp-Typography.

@Joe: I don't know anything about Freemius, but either create the object instance later (say, in an init action) or get them to set the $markup parameter to false in line 3522 of class-freemius.php upstream (i.e. Freemius::get_plugin_data).

You know, I might have been too hasty in writing there's nothing I can do. While I think that postponing creation of the Freemius instance is the way to go, there is a $reset switch to wptexturize, forcing re-evaluation of all the pattes & the shortcut filter. But I'm not sure how stable that interface is (the parameter is described as "for unit testing").

I'll contact freemius and push this issue upstream - they're quite responsive to issues, so that shouldn't be a problem.

WordPress ...
ما را در سایت WordPress دنبال می کنید

برچسب : نویسنده : استخدام کار wpss بازدید : 277 تاريخ : شنبه 9 مرداد 1395 ساعت: 22:46