• I need to show the short link in twitter button..

    the code:
    data-url="<?php echo wp_get_shortlink(); ?>" data-counturl="<?php echo get_permalink(); ?>"

    how to put on line 60 in button.php flare/models/

    'horizontal' => '<a href="https://twitter.com/share" class="twitter-share-button" {{via}} {{tailoring}}>Tweet</a>

    http://wordpress.org/plugins/flare/

Viewing 1 replies (of 1 total)
  • Make the following changess:

    In models/button.php line 60 and 62:
    Add
    data-url="{{rawurl}}"
    before {{via}} {{tailoring}}

    and in line 300:
    Change the replacements array for the following:

    $replacements = array(
                    "{{url}}" => urlencode( wp_get_shortlink( $wp_query->post->ID ) ),
                    "{{rawurl}}" => wp_get_shortlink( $wp_query->post->ID )
                );

    Also in line 959 of /flare.php:
    Change it to:

    $count_url = admin_url( 'admin-ajax.php' ) . "?action={$namespace}_get_counts&url=" . urlencode( wp_get_shortlink( $wp_query->post->ID ) ) . "&post_id={$wp_query->post->ID}&_wpnonce=" . wp_create_nonce( "{$this->namespace}-get-counts" );

    In order to get the real flare stats values of the short url.

    Hope it helps

Viewing 1 replies (of 1 total)

The topic ‘twitter short link’ is closed to new replies.