WordPress.org

Ready to get started?Download WordPress

Forums

Twitter Tools
Adjusting Twitter tools to include more information in the post (1 post)

  1. 1beb
    Member
    Posted 1 year ago #

    I'd like to include more than just the post, in the blog posts created by twitter tools.

    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))
    			, 'post_title' => $wpdb->escape(trim_add_elipsis($tweet->tw_text, 30))
    			, 'post_date' => get_date_from_gmt(date('Y-m-d H:i:s', $tweet->tw_created_at))
    			, 'post_category' => array($this->blog_post_category)
    			, 'post_status' => 'publish'
    			, 'post_author' => $wpdb->escape($this->blog_post_author)
    		);
    		$data = apply_filters('aktt_do_tweet_post', $data, $tweet); // return false here to not make a blog post
    		if (!$data) {
    			return;
    		}
    		$post_id = wp_insert_post($data);
    		add_post_meta($post_id, 'aktt_twitter_id', $tweet->tw_id, true);
    		wp_set_post_tags($post_id, $this->blog_post_tags);
    		add_action('publish_post', 'aktt_notify_twitter', 99);
    	}
    }

    My thought was that I could update $tweet->tw_text to be something like $tweet->tw_text.' from '.'tw_id.'">Twitter'))

    But this breaks the plugin. Basically, I'd like the post content to look like: TWEET TEXT from Twitter where "Twitter" is a link to the actual status.

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.