WordPress.org

Ready to get started?Download WordPress

Plugin Directory

JM Twitter Cards

Easy integration of Twitter cards in WordPress. All card types provided.

Other notes

4.3 brings new filter for your convenience if you're a developer

  • jm_tc_get_excerpt
  • jm_tc_image_source
  • jm_tc_card_type

Here is a snippet you can use with new filters

**Get native excerpt, some themes use them **

`add_filter('jm_tc_get_excerpt','_jm_tc_modify_excerpt');
function _jm_tc_modify_excerpt() {
    global $post;
    return get_excerpt_from_far_far_away($post->ID);
}

function get_excerpt_from_far_far_away( $post_id )
{
    global $wpdb;
    $query = 'SELECT post_excerpt FROM '. $wpdb->posts .' WHERE ID = '. $post_id .' LIMIT 1';
    $result = $wpdb->get_results($query, ARRAY_A);
    $post_excerpt = $result[0]['post_excerpt'];
    return $post_excerpt;
}`

Hack source image e.g if you use relative paths

`add_filter('jm_tc_image_source', '_jm_tc_relative_paths');
function _jm_tc_relative_paths($content) {
    return trailingslashit( home_url() ).$content;
}`

BE CAREFUL WITH THIS! DO NOT USE IF YOU DO NOT KNOW WHAT YOU ARE DOING, YOU CAN BREAK YOUR CARDS WITH THIS !!!

There are a lot of new filters since 5.2

Meant to help developers only. You'll have to code to use them.

Requires: 3.6 or higher
Compatible up to: 4.0-beta2
Last Updated: 2014-8-12
Downloads: 74,370

Ratings

4 stars
4.7 out of 5 stars

Support

4 of 11 support threads in the last two months have been resolved.

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

0,1,0
0,1,0
0,1,0
0,1,0
0,1,0
0,1,0
100,1,1
100,1,1
0,2,0
100,1,1 100,1,1
100,1,1 100,1,1 100,1,1
100,1,1
100,1,1
0,1,0 100,1,1
100,1,1
100,1,1