»WordPress»TalkAdmin: use WeChat voice to publish WordPress articles
A few days ago, I shared a function of using WeChat to subscribe to my own website, which is through the official account of Sugar Balloon. Now I always share a method of using WeChat voice to control your website.
preface
Now many websites use WeChat to interact with their own websites. Although our website has no corresponding service, it has a fun function called TalkAdmin, a fun thing. So we can also use the sugar balloon to connect WeChat with our own website, such as directly using WeChat to publish articles to WordPress.
introduce
TalkAmin is a WeChat voice command tool launched by Fangtang Balloon.Just input the voice, match the corresponding regularity and provide the interface link.One is the uplink command, and the other is the downlink command. In short, the uplink command is that we use WeChat to send a command to the website, while the downlink command is that the website sends a command to WeChat, and then returns a command.A typical downlink command is the website comment review function.Of course, what we are talking about today is not the downward command but the upward command. The playing method of downward command will be written in a few days.
use
Although my evil title is to publish articles for WordPress, because an article is too long, it is unlikely to be solved with voice at one time, so we can use a relatively short text. My website has a function of saying that the basic words used are very short,So we are going to use the uplink command of the sugar balloon to achieve the function of voice messaging on WeChat. Since my talk is a custom post type, it is OK to use the function of inserting an article.
code
Save the following code as a file, put it in the secondary directory of the website, and just save a name you know.
The above code is written and placed in a secondary directory, any directory
In the above figure, only three names are filled in. If the names are regular, all the names should match/(.+)/, select the uplink command, and the Webhook address will fill in the link of the PHP file above, followed by the?Pk=8899 [8899 needs to be consistent with the code]
Now, try sending voice directly to the service number of the sugar balloon
It looks like a blockhouse.However, the current voice recognition function still needs to be improved.Although many can be correctly identified.Manual modification is still needed