• Resolved Ramzii

    (@ramzii)


    too bad, loved this plugin

    http://wordpress.org/extend/plugins/scissors-continued/

    tried this fix:

    function scissors_admin_head()
    {
    	global $scissors_dirname;
    
    	wp_enqueue_script('scissors_crop', '/' . PLUGINDIR . '/'.$scissors_dirname.'/js/jquery.Jcrop.js', array('jquery') );
    	wp_enqueue_script('scissors_js', '/' . PLUGINDIR . '/'.$scissors_dirname.'/js/scissors.js' );
    
    	$thisUrl = admin_url('admin-ajax.php');
    	echo "<!-- JS loaded for Scissors in media library -->\n";
    	echo "<script type='text/javascript'>\n/* <![CDATA[ */\n";
    	echo "scissors = {\n";
    	echo "ajaxUrl: '$thisUrl'";
    	foreach(array('large', 'medium', 'thumbnail') as $size)
    	{
    		$width = intval(get_option("{$size}_size_w"));
    		$height = intval(get_option("{$size}_size_h"));
    		$aspectRatio = max(1, $width) / max(1, $height);
    		if(!get_option("{$size}_crop")) $aspectRatio = 0;
    		echo ",\n{$size}AspectRatio: $aspectRatio";
    	}
    	echo "\n}\n";
    	echo "/* ]]> */\n</script>\n";
    	echo "<!-- End of JS loaded for Scissors in media library -->\n";
    }

    in the sciccors.php file (line 888)

    No luck. just resulted in ages of waiting while applying the watermark

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi, Ramzii.

    Looks like the plugin uses the wrong way to enqueue scripts on admin side. To fix it, simply replace this line:
    add_action('admin_print_script', 'scissors_admin_head');
    with this one:
    add_action('admin_enqueue_scripts', 'scissors_admin_head');

    Additionally, there was condition which always resulted in FALSE because there is no more ‘media’ variable in the query string. Looks like you’ve just removed the condition 🙂
    if(strstr($_SERVER['REQUEST_URI'], 'media'))

    PS: you may want to find and replace all occurrences of ‘wp_shrink_dimensions’ function call with ‘wp_constrain_dimensions’ as the former function is no longer exists.

    Thread Starter Ramzii

    (@ramzii)

    Thanks for the help!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘wp update 3.5 broke it’ is closed to new replies.