Viewing 5 replies - 1 through 5 (of 5 total)
  • I have suggested this many times and have been ignored. But I use the YOURLS plugin for WordPress and then have modified the SNAP script so that if the extended field has a YOURLS URL value, it will use that for %SURL instead

    In NextScripts_SNAP.php, around line 605, my code looks like:

    if (preg_match('%SURL%', $msg)) {
         $url=get_post_meta( $postID, '_yourls_url', true );
    	 if($url=='') {
    	    $url = get_permalink($postID);   $response  = wp_remote_get('https://gd.is/gtq/'.$url);
            if ((is_array($response) && ($response['response']['code']=='200'))) $url = $response['body'];
    	 }
    	  $msg = str_ireplace("%SURL%", $url, $msg);
      }

    Just note I’m a few versions behind since I have to make these and other changes repeatedly each time I update

    Plugin Author NextScripts

    (@nextscripts)

    Since version 2.4 SNAP supports bit.ly and built-in WordPress URL shorthener in addition to gd.is.

    Built-in WordPress URL shorthener allows third party plugin to replace it, so all varieties of URL shortheners could be used, for example wp.me from Jetpack.

    We don’t see any reasons to include support for anything else there.

    Plugin Author NextScripts

    (@nextscripts)

    BTW mentioned above “shortlink-domain” plugin is using built-in WordPress URL shorthener, so it could be perfectly used with SNAP

    Ludwig.

    Thread Starter christopheran

    (@christopheran)

    I don’t see an option for using the built-in WordPress URL shorthener though.

    The only options that appear on the settings are gd.is and bit.ly. Or am I overlooking something?

    Plugin Author NextScripts

    (@nextscripts)

    Please get the latest 2.4.3 version.

    Plugin Settings->Other Settings->URL Shorthener
    https://snag.gy/yLH6w.jpg

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘custom URL Shorthener?’ is closed to new replies.