While The JetPack Twitter Share work with plugin cos_slug_translator,it will twitter a wrong url
cos_slug_translator pluginGet the real page
the plugin cos_slug_translator use publish_post hook to hook article publish and aritcle update.
due to this plugin change the post_name, the twitter link wrong.
My Article is written in Chinese, The post_name will translte in browser, like %7E%12%1E%9A, it's ugly. so ,i use this plugin to translate my post name into english.
Could you point me to the plugin's page in the WordPress.org plugin directory, so I can give it a try on my end?
Thank you.
Hi, I upload the plugin code.
this plugin didn't upload to wordpress directory. if we can deal it, i will publish a cos-slug-translator-fix to wordpress plugin directory
Thank you. I see that the title is indeed replaced as the post is being published. It may be best to use the save_post hook instead, so the change can happen as you save your draft:
https://codex.wordpress.org/Plugin_API/Action_Reference/save_post
This should help here.
Another approach would be to also change the text of the text that is sent to Social Networks as you publish the post, as explained here:
https://jeremy.hu/jetpack-hashtags-tweets-publicize/
I hope this helps.
@jeherve Hi, Jeremy, Thanks for you article, Now, I build a new Plugin and can run with JetPack, I open source it at https://github.com/bestony/automatic-translate-slug
I also upload it to wordpress plugin directory!
👍 👍 👍
Most helpful comment
Thank you. I see that the title is indeed replaced as the post is being published. It may be best to use the
save_posthook instead, so the change can happen as you save your draft:https://codex.wordpress.org/Plugin_API/Action_Reference/save_post
This should help here.
Another approach would be to also change the text of the text that is sent to Social Networks as you publish the post, as explained here:
https://jeremy.hu/jetpack-hashtags-tweets-publicize/
I hope this helps.