nris
Forum Replies Created
-
Forum: Networking WordPress
In reply to: Creating a Domain-mapped subdomainActually, I should clarify – the 4 domains all have the same document root on the server – but they are a network of sites, each with different content, but using the same WP database.
They are *not* simply aliases of the same site.- This reply was modified 8 years, 3 months ago by nris.
Forum: Plugins
In reply to: [Tools for Twitter] Picture links not being removedHi Alex,
No offence intended – but when there’s been no response from you after 2 months, (and in fact only one response to ANY question on the Twitter Tools support page in that time), I think it’s reasonable to make the ONE assumption that you’re not monitoring the forum.
I agree that my solution is not the best way to remove the Picture URLs – it will effectively remove any URL in the Tweet. But I’m pretty much a PHP newbie, and so can’t fathom exactly where the plugin decides whether there’s an image to add, and what it’s URL is – if I could track that down, then I could remove that specific URL from the Tweet, rather than any t.co link.
I had a deadline to meet for a client, and so I needed something that would work for the kind of Tweets the Client makes.
For now, my solution works – I look forward to an update with a better solution, for what is an otherwise excellent plugin!
Neil
Forum: Plugins
In reply to: [Tools for Twitter] Picture links not being removedYou don’t have to change it – the code uses an older, (presumably less efficient) way of adding Images if wp_sideload_image doesn’t exist.
There’s a chance that at some point that this older method might become deprecated, so a future WordPress release might break it, if this plugin hasn’t been updated by then.
Forum: Plugins
In reply to: [Tools for Twitter] Picture links not being removedIt’s a shame that Alex King doesn’t appear to monitor this forum any more.
In the end, I found a solution…
You can either modify the Plugin as follows:
In /wordpress/wp-content/themes/twitter-tools/classes/aktt_tweet.php
Change Line 582 from:
'post_content' => $post_content,
to
'post_content' => preg_replace("#http:\/\/t.co\/\S*#","",$post_content),Or you can modify the Theme:
In your theme’s functions.php file add the following at the end of the file (before the final “?>” line):add_filter('aktt_tweet_create_blog_post_data',aktt_remove_tco); function aktt_remove_tco($data) { $data['post_content'] = preg_replace("#http:\/\/t.co\/\S*#","",$data['post_content']); return $data; }The very best solution is to put the code in a Child Theme – that way if you update the parent theme, you won’t lose your change.
BTW, you might also think about another change to twitter-tools.php: replace each occurrence of “wp_sideload_images” with “media_sideload_images”, which has superceded it.
Forum: Plugins
In reply to: [Tools for Twitter] Reply tweets are still generating postsYes, I have the same problem. I only want *my* tweets – not everyone else’s !