Plugin Directory

Changeset 3340527


Ignore:
Timestamp:
08/06/2025 05:19:09 PM (8 months ago)
Author:
nosilver4u
Message:

tagging and releasing 2.8.7

Location:
imsanity
Files:
14 edited
1 copied

Legend:

Unmodified
Added
Removed
  • imsanity/tags/2.8.7/.travis.yml

    r3076045 r3340527  
    1616php:
    1717  - 7.4
    18   - 8.2
     18  - 8.3
    1919
    2020env:
  • imsanity/tags/2.8.7/ajax.php

    r3186675 r3340527  
    1313/**
    1414 * Searches for up to 250 images that are candidates for resize and renders them
    15  * to the browser as a json array, then dies
     15 * to the browser as a json array, then dies.
    1616 */
    1717function imsanity_get_images() {
    18     if ( ! current_user_can( 'activate_plugins' ) || empty( $_REQUEST['_wpnonce'] ) ) {
     18    $permissions = apply_filters( 'imsanity_admin_permissions', 'manage_options' );
     19    if ( ! current_user_can( $permissions ) || empty( $_REQUEST['_wpnonce'] ) ) {
    1920        wp_send_json(
    2021            array(
     
    4344/**
    4445 * Resizes the image with the given id according to the configured max width and height settings
    45  * renders a json response indicating success/failure and dies
     46 * renders a json response indicating success/failure and dies.
    4647 */
    4748function imsanity_ajax_resize() {
    48     if ( ! current_user_can( 'activate_plugins' ) || empty( $_REQUEST['_wpnonce'] ) ) {
     49    $permissions = apply_filters( 'imsanity_editor_permissions', 'edit_others_posts' );
     50    if ( ! current_user_can( $permissions ) || empty( $_REQUEST['_wpnonce'] ) ) {
    4951        wp_send_json(
    5052            array(
    5153                'success' => false,
    52                 'message' => esc_html__( 'Administrator permission is required', 'imsanity' ),
     54                'message' => esc_html__( 'Editor permission is required', 'imsanity' ),
    5355            )
    5456        );
     
    8284
    8385/**
    84  * Resizes the image with the given id according to the configured max width and height settings
    85  * renders a json response indicating success/failure and dies
     86 * Removes the original image with the given id and renders a json response indicating success/failure and dies.
    8687 */
    8788function imsanity_ajax_remove_original() {
    88     if ( ! current_user_can( 'activate_plugins' ) || empty( $_REQUEST['_wpnonce'] ) ) {
     89    $permissions = apply_filters( 'imsanity_editor_permissions', 'edit_others_posts' );
     90    if ( ! current_user_can( $permissions ) || empty( $_REQUEST['_wpnonce'] ) ) {
    8991        wp_send_json(
    9092            array(
    9193                'success' => false,
    92                 'message' => esc_html__( 'Administrator permission is required', 'imsanity' ),
     94                'message' => esc_html__( 'Editor permission is required', 'imsanity' ),
    9395            )
    9496        );
     
    125127 */
    126128function imsanity_ajax_finish() {
    127     if ( ! current_user_can( 'activate_plugins' ) || empty( $_REQUEST['_wpnonce'] ) ) {
     129    $permissions = apply_filters( 'imsanity_admin_permissions', 'manage_options' );
     130    if ( ! current_user_can( $permissions ) || empty( $_REQUEST['_wpnonce'] ) ) {
    128131        wp_send_json(
    129132            array(
  • imsanity/tags/2.8.7/changelog.txt

    r3197618 r3340527  
     1= 2.8.7 =
     2*Release Date = August 6, 2024*
     3
     4* added: change default permissions via imsanity_editor_permissions and imsanity_admin_permissions filters
     5* changed: default permission to resize individual images changed to editor role
     6
    17= 2.8.6 =
    28*Release Date - November 26, 2024*
     
    511
    612= 2.8.5 =
     13*Release Date – November 26, 2024*
     14
    715* bumped WP tested version
    816* changed: improve JSON handling/efficiency
    917
    1018= 2.8.4 =
     19*Release Date – April 29, 2024*
     20
    1121* bumped WP tested version and PHP minimum
    1222
    1323= 2.8.3 =
     24*Release Date – April 23, 2024*
     25
    1426* changed: use updated WP coding standards
    1527* fixed: PHP 8 error trying to do math with string values
    1628
    1729= 2.8.2 =
     30*Release Date – October 5, 2022*
     31
    1832* fixed: mime type error when filename in attachment metadata is incorrect
    1933
    2034= 2.8.1 =
     35*Release Date – June 16, 2022*
     36
    2137* changed: escape and sanitize more things
    2238* changed: tighten PHPCS rules used for pre-release testing
    2339
    2440= 2.8.0 =
     41*Release Date – May 18, 2022*
     42
    2543* added: support for resizing WebP images via ImageMagick
    2644* changed: update attachment file size to keep WP 6.0 metadata in sync
     
    2947
    3048= 2.7.2 =
     49*Release Date – June 3, 2021*
     50
    3151* fixed: delete originals might remove full-size version in rare cases
    3252* fixed: error thrown for image that is 1 pixel larger than max dimensions
    3353
    3454= 2.7.1 =
     55*Release Date – November 24, 2020*
     56
    3557* changed: clarify text for queue reset button
    3658* changed: Delete Originals function in bulk/selective resizer will clean metadata if original image is already gone
    3759
    3860= 2.7.0 =
     61*Release Date – November 18, 2020*
     62
    3963* changed: bulk resizer will resize all images with no limits, use list mode for selective resizing
    4064* added: see current dimensions and resize individual images in Media Library list mode
  • imsanity/tags/2.8.7/imsanity.php

    r3197618 r3340527  
    1515Author: Exactly WWW
    1616Domain Path: /languages
    17 Version: 2.8.6
    18 Requires at least: 6.4
     17Version: 2.8.7
     18Requires at least: 6.5
    1919Requires PHP: 7.4
    2020Author URI: https://ewww.io/about/
     
    2626}
    2727
    28 define( 'IMSANITY_VERSION', '2.8.6' );
     28define( 'IMSANITY_VERSION', '2.8.7' );
    2929define( 'IMSANITY_SCHEMA_VERSION', '1.1' );
    3030
  • imsanity/tags/2.8.7/media.php

    r2743190 r3340527  
    9797        echo '<div>' . (int) $imagew . 'w x ' . (int) $imageh . 'h</div>';
    9898
    99         $maxw = imsanity_get_option( 'imsanity_max_width', IMSANITY_DEFAULT_MAX_WIDTH );
    100         $maxh = imsanity_get_option( 'imsanity_max_height', IMSANITY_DEFAULT_MAX_HEIGHT );
     99        $maxw        = imsanity_get_option( 'imsanity_max_width', IMSANITY_DEFAULT_MAX_WIDTH );
     100        $maxh        = imsanity_get_option( 'imsanity_max_height', IMSANITY_DEFAULT_MAX_HEIGHT );
     101        $permissions = apply_filters( 'imsanity_editor_permissions', 'edit_others_posts' );
    101102        if ( $imagew > $maxw || $imageh > $maxh ) {
    102             if ( current_user_can( 'activate_plugins' ) ) {
     103            if ( current_user_can( $permissions ) ) {
    103104                $manual_nonce = wp_create_nonce( 'imsanity-manual-resize' );
    104105                // Give the user the option to optimize the image right now.
     
    110111                );
    111112            }
    112         } elseif ( current_user_can( 'activate_plugins' ) && imsanity_get_option( 'imsanity_delete_originals', false ) && ! empty( $meta['original_image'] ) && function_exists( 'wp_get_original_image_path' ) ) {
     113        } elseif ( current_user_can( $permissions ) && imsanity_get_option( 'imsanity_delete_originals', false ) && ! empty( $meta['original_image'] ) && function_exists( 'wp_get_original_image_path' ) ) {
    113114            $original_image = wp_get_original_image_path( $id );
    114115            if ( empty( $original_image ) || ! is_file( $original_image ) ) {
  • imsanity/tags/2.8.7/phpcs.ruleset.xml

    r3076045 r3340527  
    1010    <rule ref="WordPress.PHP.NoSilencedErrors">
    1111        <properties>
    12             <property name="customAllowedFunctionsList" type="array" value="exif_read_data"/>
     12            <property name="customAllowedFunctionsList" type="array">
     13                <element value="exif_read_data"/>
     14            </property>
    1315        </properties>
    1416    </rule>
  • imsanity/tags/2.8.7/readme.txt

    r3197618 r3340527  
    33Donate link: https://ewww.io/donate/
    44Tags: image, scale, resize, space saver, quality
    5 Requires at least: 6.4
    6 Tested up to: 6.7
    7 Requires PHP: 7.4
    8 Stable tag: 2.8.6
     5Tested up to: 6.8
     6Stable tag: 2.8.7
    97License: GPLv3
    108
     
    109107== Changelog ==
    110108
     109= 2.8.7 =
     110*Release Date = August 6, 2024*
     111
     112* added: change default permissions via imsanity_editor_permissions and imsanity_admin_permissions filters
     113* changed: default permission to resize individual images changed to editor role
     114
    111115= 2.8.6 =
    112116*Release Date - November 26, 2024*
  • imsanity/trunk/.travis.yml

    r3076045 r3340527  
    1616php:
    1717  - 7.4
    18   - 8.2
     18  - 8.3
    1919
    2020env:
  • imsanity/trunk/ajax.php

    r3186675 r3340527  
    1313/**
    1414 * Searches for up to 250 images that are candidates for resize and renders them
    15  * to the browser as a json array, then dies
     15 * to the browser as a json array, then dies.
    1616 */
    1717function imsanity_get_images() {
    18     if ( ! current_user_can( 'activate_plugins' ) || empty( $_REQUEST['_wpnonce'] ) ) {
     18    $permissions = apply_filters( 'imsanity_admin_permissions', 'manage_options' );
     19    if ( ! current_user_can( $permissions ) || empty( $_REQUEST['_wpnonce'] ) ) {
    1920        wp_send_json(
    2021            array(
     
    4344/**
    4445 * Resizes the image with the given id according to the configured max width and height settings
    45  * renders a json response indicating success/failure and dies
     46 * renders a json response indicating success/failure and dies.
    4647 */
    4748function imsanity_ajax_resize() {
    48     if ( ! current_user_can( 'activate_plugins' ) || empty( $_REQUEST['_wpnonce'] ) ) {
     49    $permissions = apply_filters( 'imsanity_editor_permissions', 'edit_others_posts' );
     50    if ( ! current_user_can( $permissions ) || empty( $_REQUEST['_wpnonce'] ) ) {
    4951        wp_send_json(
    5052            array(
    5153                'success' => false,
    52                 'message' => esc_html__( 'Administrator permission is required', 'imsanity' ),
     54                'message' => esc_html__( 'Editor permission is required', 'imsanity' ),
    5355            )
    5456        );
     
    8284
    8385/**
    84  * Resizes the image with the given id according to the configured max width and height settings
    85  * renders a json response indicating success/failure and dies
     86 * Removes the original image with the given id and renders a json response indicating success/failure and dies.
    8687 */
    8788function imsanity_ajax_remove_original() {
    88     if ( ! current_user_can( 'activate_plugins' ) || empty( $_REQUEST['_wpnonce'] ) ) {
     89    $permissions = apply_filters( 'imsanity_editor_permissions', 'edit_others_posts' );
     90    if ( ! current_user_can( $permissions ) || empty( $_REQUEST['_wpnonce'] ) ) {
    8991        wp_send_json(
    9092            array(
    9193                'success' => false,
    92                 'message' => esc_html__( 'Administrator permission is required', 'imsanity' ),
     94                'message' => esc_html__( 'Editor permission is required', 'imsanity' ),
    9395            )
    9496        );
     
    125127 */
    126128function imsanity_ajax_finish() {
    127     if ( ! current_user_can( 'activate_plugins' ) || empty( $_REQUEST['_wpnonce'] ) ) {
     129    $permissions = apply_filters( 'imsanity_admin_permissions', 'manage_options' );
     130    if ( ! current_user_can( $permissions ) || empty( $_REQUEST['_wpnonce'] ) ) {
    128131        wp_send_json(
    129132            array(
  • imsanity/trunk/changelog.txt

    r3197618 r3340527  
     1= 2.8.7 =
     2*Release Date = August 6, 2024*
     3
     4* added: change default permissions via imsanity_editor_permissions and imsanity_admin_permissions filters
     5* changed: default permission to resize individual images changed to editor role
     6
    17= 2.8.6 =
    28*Release Date - November 26, 2024*
     
    511
    612= 2.8.5 =
     13*Release Date – November 26, 2024*
     14
    715* bumped WP tested version
    816* changed: improve JSON handling/efficiency
    917
    1018= 2.8.4 =
     19*Release Date – April 29, 2024*
     20
    1121* bumped WP tested version and PHP minimum
    1222
    1323= 2.8.3 =
     24*Release Date – April 23, 2024*
     25
    1426* changed: use updated WP coding standards
    1527* fixed: PHP 8 error trying to do math with string values
    1628
    1729= 2.8.2 =
     30*Release Date – October 5, 2022*
     31
    1832* fixed: mime type error when filename in attachment metadata is incorrect
    1933
    2034= 2.8.1 =
     35*Release Date – June 16, 2022*
     36
    2137* changed: escape and sanitize more things
    2238* changed: tighten PHPCS rules used for pre-release testing
    2339
    2440= 2.8.0 =
     41*Release Date – May 18, 2022*
     42
    2543* added: support for resizing WebP images via ImageMagick
    2644* changed: update attachment file size to keep WP 6.0 metadata in sync
     
    2947
    3048= 2.7.2 =
     49*Release Date – June 3, 2021*
     50
    3151* fixed: delete originals might remove full-size version in rare cases
    3252* fixed: error thrown for image that is 1 pixel larger than max dimensions
    3353
    3454= 2.7.1 =
     55*Release Date – November 24, 2020*
     56
    3557* changed: clarify text for queue reset button
    3658* changed: Delete Originals function in bulk/selective resizer will clean metadata if original image is already gone
    3759
    3860= 2.7.0 =
     61*Release Date – November 18, 2020*
     62
    3963* changed: bulk resizer will resize all images with no limits, use list mode for selective resizing
    4064* added: see current dimensions and resize individual images in Media Library list mode
  • imsanity/trunk/imsanity.php

    r3197618 r3340527  
    1515Author: Exactly WWW
    1616Domain Path: /languages
    17 Version: 2.8.6
    18 Requires at least: 6.4
     17Version: 2.8.7
     18Requires at least: 6.5
    1919Requires PHP: 7.4
    2020Author URI: https://ewww.io/about/
     
    2626}
    2727
    28 define( 'IMSANITY_VERSION', '2.8.6' );
     28define( 'IMSANITY_VERSION', '2.8.7' );
    2929define( 'IMSANITY_SCHEMA_VERSION', '1.1' );
    3030
  • imsanity/trunk/media.php

    r2743190 r3340527  
    9797        echo '<div>' . (int) $imagew . 'w x ' . (int) $imageh . 'h</div>';
    9898
    99         $maxw = imsanity_get_option( 'imsanity_max_width', IMSANITY_DEFAULT_MAX_WIDTH );
    100         $maxh = imsanity_get_option( 'imsanity_max_height', IMSANITY_DEFAULT_MAX_HEIGHT );
     99        $maxw        = imsanity_get_option( 'imsanity_max_width', IMSANITY_DEFAULT_MAX_WIDTH );
     100        $maxh        = imsanity_get_option( 'imsanity_max_height', IMSANITY_DEFAULT_MAX_HEIGHT );
     101        $permissions = apply_filters( 'imsanity_editor_permissions', 'edit_others_posts' );
    101102        if ( $imagew > $maxw || $imageh > $maxh ) {
    102             if ( current_user_can( 'activate_plugins' ) ) {
     103            if ( current_user_can( $permissions ) ) {
    103104                $manual_nonce = wp_create_nonce( 'imsanity-manual-resize' );
    104105                // Give the user the option to optimize the image right now.
     
    110111                );
    111112            }
    112         } elseif ( current_user_can( 'activate_plugins' ) && imsanity_get_option( 'imsanity_delete_originals', false ) && ! empty( $meta['original_image'] ) && function_exists( 'wp_get_original_image_path' ) ) {
     113        } elseif ( current_user_can( $permissions ) && imsanity_get_option( 'imsanity_delete_originals', false ) && ! empty( $meta['original_image'] ) && function_exists( 'wp_get_original_image_path' ) ) {
    113114            $original_image = wp_get_original_image_path( $id );
    114115            if ( empty( $original_image ) || ! is_file( $original_image ) ) {
  • imsanity/trunk/phpcs.ruleset.xml

    r3076045 r3340527  
    1010    <rule ref="WordPress.PHP.NoSilencedErrors">
    1111        <properties>
    12             <property name="customAllowedFunctionsList" type="array" value="exif_read_data"/>
     12            <property name="customAllowedFunctionsList" type="array">
     13                <element value="exif_read_data"/>
     14            </property>
    1315        </properties>
    1416    </rule>
  • imsanity/trunk/readme.txt

    r3197618 r3340527  
    33Donate link: https://ewww.io/donate/
    44Tags: image, scale, resize, space saver, quality
    5 Requires at least: 6.4
    6 Tested up to: 6.7
    7 Requires PHP: 7.4
    8 Stable tag: 2.8.6
     5Tested up to: 6.8
     6Stable tag: 2.8.7
    97License: GPLv3
    108
     
    109107== Changelog ==
    110108
     109= 2.8.7 =
     110*Release Date = August 6, 2024*
     111
     112* added: change default permissions via imsanity_editor_permissions and imsanity_admin_permissions filters
     113* changed: default permission to resize individual images changed to editor role
     114
    111115= 2.8.6 =
    112116*Release Date - November 26, 2024*
Note: See TracChangeset for help on using the changeset viewer.