WordPress.org

Support

Support » Plugins and Hacks » [Plugin: Twitter Tools] Stylise new blog posts from tweets

[Plugin: Twitter Tools] Stylise new blog posts from tweets

  • danleedham
    Member

    @danleedham

    I love the ability to create a new blog post from each of my tweets, however I’m slightly stuck at making these blog posts automatically anything but just the line pulled directly from twitter. How would I get them to be styled in a way like the styling used by Twitter’s ‘Embed This Tweet’ section:

    <blockquote class="twitter-tweet"><p>'Tweet Content Here'</p>&mdash; 'Name' ('@username') <a href="https://twitter.com/LINKTOTWEET" data-datetime="2012-06-04T10:00:00+00:00">DATE, 2012</a></blockquote>
    <script src="//platform.twitter.com/widgets.js" charset="utf-8"></script>

    Something else slightly more random, but how would I get anything #’ed to be then used as a WordPress tag?

    http://wordpress.org/extend/plugins/twitter-tools/

Viewing 2 replies - 1 through 2 (of 2 total)
  • danleedham
    Member

    @danleedham

    So I’ve had a deeper look into the code and on line 499 following I found

    function do_tweet_post($tweet) {
    		global $wpdb;
    		remove_action('publish_post', 'aktt_notify_twitter', 99);
    		$data = array(
    			'post_content' => $wpdb->escape(aktt_make_clickable($tweet->tw_text))

    Would I be right in just adding something like:

    post_content' =>'
    <blockquote><p>' . $wpdb->escape(aktt_make_clickable($tweet->tw_text)) . '</blockquote>
    <script src="//platform.twitter.com/widgets.js" charset="utf-8"></script>'

    Looking forward to some guidance 🙂

    danleedham
    Member

    @danleedham

    Since the 3.4 update, this is no longer a needed feature as WP has it built in. Will the plugin give the option to have simply the link posted and so the tweet show up like it’s been properly embedded?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Twitter Tools] Stylise new blog posts from tweets’ is closed to new replies.