Plugin Directory

Changeset 3442367


Ignore:
Timestamp:
01/19/2026 09:57:12 AM (2 months ago)
Author:
Milmor
Message:

Update to version 5.2.1 from GitHub

Location:
wp-attachments
Files:
6 edited
1 copied

Legend:

Unmodified
Added
Removed
  • wp-attachments/tags/5.2.1/inc/meta-box.php

    r3308377 r3442367  
    388388            wp_send_json_error('Missing data');
    389389        }
     390       
     391        // Object-level authorization: verify user can edit both the target post and the attachment
     392        if (!current_user_can('edit_post', $post_id)) {
     393            wp_send_json_error('Permission denied: cannot edit target post');
     394        }
     395        if (!current_user_can('edit_post', $attachment_id)) {
     396            wp_send_json_error('Permission denied: cannot edit attachment');
     397        }
     398       
    390399        wp_update_post(array(
    391400            'ID' => $attachment_id,
  • wp-attachments/tags/5.2.1/readme.txt

    r3308377 r3442367  
    55Requires at least: 4.4 
    66Tested up to: 6.9
    7 Version: 5.2
    8 Stable tag: 5.2
     7Version: 5.2.1
     8Stable tag: 5.2.1
    99License: GPLv2 or later 
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html 
     
    9191== Changelog ==
    9292
     93
     94= 5.2.1 2026-01-19 =
     95* Minor fixes and improvements.
     96
    9397= 5.2 2025-06-09 =
    9498* Fixed regression with images (thanks @reesher + @steeltape for feedback)
  • wp-attachments/tags/5.2.1/wp-attachments.php

    r3308377 r3442367  
    66Author: Marco Milesi
    77Author URI:   https://www.marcomilesi.com
    8 Version: 5.2
     8Version: 5.2.1
    99Text Domain: wp-attachments
    1010*/
     
    1212require_once( plugin_dir_path(__FILE__) . 'inc/attach_unattach_reattach.php' );
    1313
    14 function wpa_action_init() {
     14add_action('init', function () {
    1515    load_plugin_textdomain( 'wp-attachments' );
    1616
     
    4040    $wpa_ict = (int) get_option('wpa_ict', 0);
    4141    wp_enqueue_style('wpa-css', plugin_dir_url(__FILE__) . 'styles/' . $wpa_ict . '/wpa.css');
    42 }
    43 add_action('init', 'wpa_action_init');
     42} );
    4443
    4544add_action('admin_init', function() {
  • wp-attachments/trunk/inc/meta-box.php

    r3308377 r3442367  
    388388            wp_send_json_error('Missing data');
    389389        }
     390       
     391        // Object-level authorization: verify user can edit both the target post and the attachment
     392        if (!current_user_can('edit_post', $post_id)) {
     393            wp_send_json_error('Permission denied: cannot edit target post');
     394        }
     395        if (!current_user_can('edit_post', $attachment_id)) {
     396            wp_send_json_error('Permission denied: cannot edit attachment');
     397        }
     398       
    390399        wp_update_post(array(
    391400            'ID' => $attachment_id,
  • wp-attachments/trunk/readme.txt

    r3308377 r3442367  
    55Requires at least: 4.4 
    66Tested up to: 6.9
    7 Version: 5.2
    8 Stable tag: 5.2
     7Version: 5.2.1
     8Stable tag: 5.2.1
    99License: GPLv2 or later 
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html 
     
    9191== Changelog ==
    9292
     93
     94= 5.2.1 2026-01-19 =
     95* Minor fixes and improvements.
     96
    9397= 5.2 2025-06-09 =
    9498* Fixed regression with images (thanks @reesher + @steeltape for feedback)
  • wp-attachments/trunk/wp-attachments.php

    r3308377 r3442367  
    66Author: Marco Milesi
    77Author URI:   https://www.marcomilesi.com
    8 Version: 5.2
     8Version: 5.2.1
    99Text Domain: wp-attachments
    1010*/
     
    1212require_once( plugin_dir_path(__FILE__) . 'inc/attach_unattach_reattach.php' );
    1313
    14 function wpa_action_init() {
     14add_action('init', function () {
    1515    load_plugin_textdomain( 'wp-attachments' );
    1616
     
    4040    $wpa_ict = (int) get_option('wpa_ict', 0);
    4141    wp_enqueue_style('wpa-css', plugin_dir_url(__FILE__) . 'styles/' . $wpa_ict . '/wpa.css');
    42 }
    43 add_action('init', 'wpa_action_init');
     42} );
    4443
    4544add_action('admin_init', function() {
Note: See TracChangeset for help on using the changeset viewer.