• Resolved deankowalski

    (@deankowalski)


    Press this stopped working with 4.9 update. As I am a content aggregator this bug is devastating. How do I fix?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Okay, here’s a workaround.

    Step 1: You need your old bookmarklet back. You can create it yourself, copy and paste from here:

    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='https://www.YOURWEBSITEHERE.com/wp-admin/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)

    Yeah, that’s ugly. Note the YOURWEBSITEHERE part.

    Step 2: Go find class-wp-press-this-plugin.php, and comment out lines 1197-1208. That;’s a big if statement

    /*if ( empty( $_GET['_wpnonce'] ) || ! wp_verify_nonce( $_GET['_wpnonce'], 'scan-site' ) ) {
    			foreach ( array( 'u', 's', 't', 'v', '_meta', '_links', '_images', '_embeds' ) as $key ) {
    				if ( ! empty( $_REQUEST[ $key ] ) ) {
    					?>
    					<div class="error"><p>
    						<?php _e( 'The WordPress bookmarklet was deprecated. Please delete it from your web browser.', 'press-this' ); ?>
    					</p></div>
    			 		<?php
                                             return;
    				}
    			}
    		}*/
    

    Works for me.

    Plugin Author Brandon Kraft

    (@kraftbj)

    Code Wrangler

    Howdy,

    Version 1.1.0 will be released in the next day or so that will restore the bookmarklet. The issue that led to the removal is a security issue, but restoring it in either case.

    • This reply was modified 7 years, 3 months ago by Brandon Kraft.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Press This Not Working With 4.9 Update’ is closed to new replies.