• Resolved Marc_O

    (@marc_o)


    Hello,
    I’ve just installed the new free add on to use ShortURLs with Twitter share. It works great but i’ve already a plugin that make all my links shorten by Bitly by defaut and i don’t want to use Google shorten URLS but those Bitly URLs.
    By defaut they are used when i call the wp_get_shortlink () function. Is there a way you could adapt the add on so we could have the choice between Google short URLS and the default one use by the website (WordPress short links or else) ?
    I’ve try to change it in the template-functions.php of the main plugin using wp_get_shortlink () instead of get_permalink () but i’m not sure if it won’t mess with the sharecount and the shortlink is aldo used with facebook making the sharing slower.
    Thanks

    https://www.ads-software.com/plugins/mashsharer/

Viewing 3 replies - 1 through 3 (of 3 total)
  • > i’ve try to change it in the template-functions.php of the main plugin using wp_get_shortlink () instead of get_permalink ()

    This will mess with the share count function and will return wrong results

    You could rewrite your own add-on to use bitly or you extend the current addon for support with bitly and this library for example:
    https://github.com/Falicon/BitlyPHP

    Writing or modifying add-ons for mashshare is very simple.
    Hope i am able to write some tutorials about it in the next time.

    Try the following as a workaround for your page:

    Line 75 of scripts.php in mashshare-shorturls/includes

    Change: ‘shorturl’ => mashsuGetShortURL()
    to: ‘shorturl’ => echo wp_get_shortlink()

    Does this work?

    Thread Starter Marc_O

    (@marc_o)

    Hello,
    The change didn’t work with ‘shorturl’ => echo wp_get_shortlink() but it works great with ‘shorturl’ => wp_get_shortlink()
    Thank for your answer ??

    I am glad to hear. I will put this code as an option into the next update of the shortlink addon.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Add on ShortURL with default shortlink ?’ is closed to new replies.