WordPress.org

Ready to get started?Download WordPress

Forums

Flare
Shortcode for Flare buttons (2 posts)

  1. FoodiesLoveThis
    Member
    Posted 8 months ago #

    Dear Team,

    First let me tell that you guys rock with this amazing plugin.

    My website http://www.FoodiesLoveThis.com/celebrity-fitness is using your buttons. Everything seems to be fine but it will be great if you can come with some shortcodes for the horizontal buttons.

    Regards,
    FoodiesLoveThis Team
    http://www.FoodiesLoveThis.com

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

  2. iriarte300
    Member
    Posted 5 months ago #

    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

Reply

You must log in to post.

About this Plugin

About this Topic