get_shortcut_link [ WordPress Function ]
get_shortcut_link ( No parameters )
| Returns: |
|
| Defined at: |
|
Benzer Fonksiyonlar: wp_get_shortlink, get_search_link, get_author_link, the_shortlink, get_month_link
Retrieve the Press This bookmarklet link.
Use this in 'a' element 'href' attribute.
Source
<?php
function get_shortcut_link() {
// In case of breaking changes, version this. #WP20071
$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);
}
?>
Examples [ wp-snippets.com ]
Google Arama Sonuçlarý
- <?php /** * Tools Administration Screen. * * @package WordPress ...
1)jQuery('.pressthis-code').show().find('textarea').focus().select();return false;" href ="<?php echo htmlspecialchars( get_shortcut_link() ); ?>"><span><?php ...
core.svn.wordpress.org - PHPXRef 0.7 : WordPress : Detail view of link-template.php
get_shortcut_link() home_url() get_home_url() site_url() get_site_url() admin_url( ) get_admin_url() includes_url() content_url() plugins_url() network_site_url() ...
phpxref.ftwr.co.uk - wp-admin/options-writing.php source - yukei.net
1)jQuery('.pressthis-code').show().find('textarea').focus().select();return false;" href ="<?php echo htmlspecialchars( get_shortcut_link() ); ?>"><span><?php ...
lab.yukei.net - PHPXref.com - WordPress 3.0.1 - /wp-admin/tools.php source
Aug 19, 2010 ... p> 36 <p class="pressthis"><a href="<?php echo htmlspecialchars( get_shortcut_link() ); ?>" title="<?php echo esc_attr(__('Press This')) ?> ...
phpxref.com