Like my Twitter Avatar plugin, even my WP Github Gist plugin was broken recently due to changes in the underlying API that my plugin was using. This time it was because of the changes in the Gist Embed API.
Adding user to the gist embed url
In the earlier version of the gist embed API, the url to the embed script had only the id of the gist. But in the new version the user name is also added.
So I have added a new attribute called
user to the
gist shortcode where you can specify the user name.
Handling old Gist shortcodes
Unfortunately the above change breaks old
gist shortcodes that you might already have in your posts where the user name is not specified. I have introduced a filter called
wp-github-gist-user using which you can specify the user name for old gists. This will be helpful if you have embedded gist from the same user in all your old posts. If you have embeded gists from multiple users then I am sorry, you may have to go and manually add the
user to all of them.
You can checkout the sample plugin that I have created that explains how you can override the user name using this filter. Essentially you have to just add the following code to your
functions.php file or create a separate plugin like I did.
This is a mandatory update. You can download the latest version of the Plugin from the Plugin’s homepage or install it using the Plugin installer.
Please keep the feedback coming and if you want me to add any new features or find a bug, please leave a comment or post about it in twitter.
- WordPress Developer tools to increase productivity in WordCamp Mumbai
- Email Log WordPress plugin v1.9.1 released
- Email Log WordPress plugin v1.9 released
- How to find if you are on the last page of a multi-page post in WordPress
- Easy Retweet WordPress plugin v3.1 Released
- Creating custom tables with correct Character Set and Collation in WordPress