Advertisements

get_shortcut_link

Definition:
function get_shortcut_link() {}

Retrieve shortcut link.
Use this in ‘a’ element ‘href’ attribute.

Defined filters

  • shortcut_link
    apply_filters('shortcut_link', $link)

Source code

function get_shortcut_link() {

	$link = "javascript:

			var d=document,

			w=window,

			e=w.getSelection,

			k=d.getSelection,

			x=d.selection,

			s=(e?e():(k)?k():(x?x.createRange().text:0)),

			f='" . admin_url('press-this.php') . "',

			l=d.location,

			e=encodeURIComponent,

			u=f+'?u='+e(l.href)+'&t='+e(d.title)+'&s='+e(s)+'&v=4';

			a=function(){if(!w.open(u,'t','toolbar=0,resizable=1,scrollbars=1,status=1,width=720,height=570'))l.href=u;};

			if (/Firefox/.test(navigator.userAgent)) setTimeout(a, 0); else a();

			void(0)";



	$link = str_replace(array("\r", "\n", "\t"),  '', $link);



	return apply_filters('shortcut_link', $link);

}

1687

Advertisements

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: