Better Twitter Embeds 2: Stripping the Convo for the Sake of the Convo
A few months ago, I noted a technique for stripping Twitter embeds of extraneous conversation, involving setting the tweet attribute “data-conversation” to “none.” What I provided was more hack than add-on, and required a somewhat laborious process of copying the page source and search and replacing it.
So, this morning, frustrated by yet another Twitter convo that couldn’t be carried forward effectively on Twitter, and that anyway deserved to be preserved for the eternal archives, I decided to automate the process.
All-Nude Tweets
PHP
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/**
* Let's render a series of tweets without extraneous/redundant conversation
* Add to functions.php - substitute desired post-format for 'link' below
adding support for the “status” format to my theme so I can use it instead of “link,”
getting rid of redundant javascript calls, and
some other bells and whistles
…on the way to a plug-in or distributable custom function, but I think it’s already pretty neat and usable as is, if I do say so myself, and I do, on the way further to another objective recently discussed on Twitter, and a good candidate for another post of this general type: On the “Tweet Storm” as rickety bridge between old-fashioned blogging and unsatisfying social media.
Writing since ancient times, blogging, e-commercing, and site installing-designing-maintaining since 2001; WordPress theme and plugin configuring and developing since 2004 or so; a lifelong freelancer, not associated nor to be associated with any company, publication, party, university, church, or other institution.
Posts in this series
By CK MacLeod
Writing since ancient times, blogging, e-commercing, and site installing-designing-maintaining since 2001; WordPress theme and plugin configuring and developing since 2004 or so; a lifelong freelancer, not associated nor to be associated with any company, publication, party, university, church, or other institution.
1 comment