Changeset 38462
- Timestamp:
- 08/31/2016 06:07:01 AM (8 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-press-this.php
r38459 r38462 14 14 */ 15 15 class WP_Press_This { 16 17 16 // Used to trigger the bookmarklet update notice. 17 const VERSION = 8; 18 18 public $version = 8; 19 19 -
trunk/src/wp-includes/link-template.php
r38459 r38462 2899 2899 * 2900 2900 * @global bool $is_IE Whether the browser matches an Internet Explorer user agent. 2901 * @global WP_Press_This $wp_press_this2902 *2903 * @return string The Press This bookmarklet link URL.2904 2901 */ 2905 2902 function get_shortcut_link() { 2906 2903 global $is_IE; 2907 2904 2908 $GLOBALS['wp_press_this'] = new WP_Press_This();2909 $bookmarklet_version = $GLOBALS['wp_press_this']->version;2910 2905 $link = ''; 2911 2906 … … 2925 2920 $link = 'javascript:var d=document,w=window,e=w.getSelection,k=d.getSelection,x=d.selection,' . 2926 2921 's=(e?e():(k)?k():(x?x.createRange().text:0)),f=' . $url . ',l=d.location,e=encodeURIComponent,' . 2927 'u=f+"?u="+e(l.href)+"&t="+e(d.title)+"&s="+e(s)+"&v=' . $bookmarklet_version. '";' .2922 'u=f+"?u="+e(l.href)+"&t="+e(d.title)+"&s="+e(s)+"&v=' . WP_Press_This::VERSION . '";' . 2928 2923 'a=function(){if(!w.open(u,"t","toolbar=0,resizable=1,scrollbars=1,status=1,width=600,height=700"))l.href=u;};' . 2929 2924 'if(/Firefox/.test(navigator.userAgent))setTimeout(a,0);else a();void(0)'; … … 2935 2930 2936 2931 if ( $src ) { 2937 $url = wp_json_encode( admin_url( 'press-this.php' ) . '?v=' . $bookmarklet_version);2932 $url = wp_json_encode( admin_url( 'press-this.php' ) . '?v=' . WP_Press_This::VERSION ); 2938 2933 $link = 'javascript:' . str_replace( 'window.pt_url', $url, $src ); 2939 2934 }
Note: See TracChangeset
for help on using the changeset viewer.