Support » Plugin: Social Sharing (by Danny) » Could use filter for URL

  • It would really be helpful if you added some additional filters.

    In particular, it’d be helpful to add a filter for the URL, with the post passed in for logic.

    e.g.

    $url = urlencode( get_permalink() );
    global $post;
    $url = apply_filters( 'dvk_social_url', $url, $post );

    This would allow users to do things like append query strings, or replace the link with a bit.ly shortened link (this is what I want to do).

    https://wordpress.org/plugins/dvk-social-sharing/

Viewing 1 replies (of 1 total)
  • Thread Starter Mannie Schumpert

    (@mannieschumpert)

    I added the filter to my install, and it turns out including the post object is both unnecessary and causes errors.

    But this is still very useful:

    $url = urlencode( get_permalink() );
    $url = apply_filters( 'dvk_social_url', $url );

Viewing 1 replies (of 1 total)
  • The topic ‘Could use filter for URL’ is closed to new replies.