[resolved] Predefined selection in image editor (3 posts)

  1. screen77
    Posted 3 years ago #

    i'm trying to set a predefined image selection.
    I have included a checkbox into the WP image editor, which should set a predefined selection by clicking on it. My problem is, that the selection mode is deactivated as long as i don't set a selection manually with my mouse.
    My idea is to have this checkbox and if it is active, there should be a predifned selection (like 554px * 195px).

    Could someone help me with this?

    The code is in: /wp-admin/includes/image-edit.php
    My Version is WP 3.1

  2. screen77
    Posted 3 years ago #

    Okay, looks like nobody can help in here.
    But i solved the problem on my own :-)

    If some one else got the same problem:
    Here is a solution placed in image-edit.php on Line 162. Just before the part with the selection:

    [Code moderated as per the Forum Rules. Please use the pastebin]

    If someone has an idea how to solve this problem without 'hacking' the core. It would be nice to read it here!

  3. screen77
    Posted 3 years ago #

    Here we go with the Code again:

Topic Closed

This topic has been closed to new replies.

About this Topic