The oEmbed tweets on my hosted blog have been coming up in Chinese for the last few months, and I’ve been unable to resolve the situation with my web host. Add this to your theme’s functions.php if you are having the same issue; it will check the WP_LANG setting in wp-config.php and update the request to Twitter accordingly.
The filter that allows this functionality was added in WordPress 3.5.
Continue reading Set Twitter language for WordPress oEmbeds
I use Ozh’ Tweet Archiver to keep a local copy of my tweets, but I wanted to use the new Twitter oEmbed output to easily format my tweets as _tweets_, rather than just a status.
Continue reading Display tweets from Ozh’ Tweet Archiver using oEmbed
I’ve been circling this drain for years trying to make things just right.
Continue reading Add custom post types to the Loop
This could be handy if you are importing blog posts from Tumblr, links from Delicious, and tweets from Twitter.
Continue reading Add post format to FeedWordPress syndicated posts
This was tricky and took me several attempts to figure out how to gracefully remove posts in a specified category from the public BuddyPress Activity Stream. Proposed solutions took the approach of stopping the activity from being added to the table; however, this raised issues when an existing post was updated and put in the excluded category, and also when an excluded post was updated to no longer be in the excluded category. Additionally, these posts were not included in the author’s individual Activity Stream, which led to further confusion.
I had to move `bp_blogs_record_post` from `save_post` to `wp_insert_post` to allow `_save_post_hook` to clean the post cache prior to running `in_category()`.
Continue reading Remove posts with category (or categories) from BuddyPress Activity Stream
I figured this was more useful as a plugin than as a gist. [BuddyPress Sitewide Notice Widget](http://wordpress.org/extend/plugins/buddypress-sitewide-notice-widget/) is available from the WordPress Plugin Directory.
Curly quotes are a particular nuisance, especially in incoming posts. This function removes them before the post (or comment) is inserted in the database. If an older post containing curly quotes is edited, it will save with straight quotes upon database insert.
Continue reading Remove curly quotes on save