Support » Plugin: WP to Twitter » How to add properties to URL before shortening

Viewing 1 replies (of 1 total)
  • Plugin Author Joe Dolson


    Hmmm. There’s a way to do it using a custom filter.

    There’s a filter applied to links prior to sending them for shortening called ‘wpt_shorten_link’, which excepts as arguments the link itself and the post ID for the post being handled. If you add a function to that filter that adds that attribute to the URL, that would work.

    You’ll want to look at the codex for add_filter:

    This is fairly advanced, but WP to twitter doesn’t have a system for adding custom attributes to the URL. Alternately, you can add a URL in a custom field that you use instead of the default permalink; but that would be more labor intensive in the long run.

Viewing 1 replies (of 1 total)
  • The topic ‘How to add properties to URL before shortening’ is closed to new replies.