Changeset 3200269
- Timestamp:
- 12/01/2024 03:55:43 PM (13 months ago)
- Location:
- lana-downloads-manager/trunk
- Files:
-
- 2 edited
-
lana-downloads-manager.php (modified) (3 diffs)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lana-downloads-manager/trunk/lana-downloads-manager.php
r3004462 r3200269 4 4 * Plugin URI: https://lana.codes/product/lana-downloads-manager/ 5 5 * Description: Downloads Manager with counter and log. 6 * Version: 1. 8.26 * Version: 1.9.0 7 7 * Author: Lana Codes 8 8 * Author URI: https://lana.codes/ … … 12 12 13 13 defined( 'ABSPATH' ) or die(); 14 define( 'LANA_DOWNLOADS_MANAGER_VERSION', '1. 8.2' );14 define( 'LANA_DOWNLOADS_MANAGER_VERSION', '1.9.0' ); 15 15 define( 'LANA_DOWNLOADS_MANAGER_DIR_URL', plugin_dir_url( __FILE__ ) ); 16 16 define( 'LANA_DOWNLOADS_MANAGER_DIR_PATH', plugin_dir_path( __FILE__ ) ); … … 390 390 391 391 add_action( 'init', 'lana_downloads_manager_update_custom_post_type' ); 392 393 /** 394 * Lana Downloads Manager 395 * delete the lana download assigned files before deleting the post 396 * 397 * @param $post_id 398 * @param $post 399 */ 400 function lana_downloads_manager_delete_lana_download_files_before_delete_post( $post_id, $post ) { 401 402 if ( ! $post ) { 403 return; 404 } 405 406 if ( ! is_a( $post, 'WP_Post' ) ) { 407 return; 408 } 409 410 if ( 'lana_download' != $post->post_type ) { 411 return; 412 } 413 414 if ( ! apply_filters( 'lana_downloads_manager_delete_lana_download_files', true ) ) { 415 return; 416 } 417 418 $attachments = get_children( array( 419 'post_parent' => $post_id, 420 'post_type' => 'attachment', 421 ) ); 422 423 if ( ! empty( $attachments ) ) { 424 foreach ( $attachments as $attachment ) { 425 wp_delete_attachment( $attachment->ID, true ); 426 } 427 } 428 } 429 430 add_action( 'before_delete_post', 'lana_downloads_manager_delete_lana_download_files_before_delete_post', 10, 2 ); 392 431 393 432 /** -
lana-downloads-manager/trunk/readme.txt
r3004462 r3200269 4 4 Tags: download, download manager, file manager, download counter 5 5 Requires at least: 4.0 6 Tested up to: 6. 47 Stable tag: 1. 8.26 Tested up to: 6.7 7 Stable tag: 1.9.0 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 57 57 58 58 == Changelog == 59 60 = 1.9.0 = 61 * add function to delete the lana download assigned files before deleting the post 59 62 60 63 = 1.8.2 = … … 196 199 == Upgrade Notice == 197 200 201 = 1.9.0 = 202 This version improves functionality. Upgrade recommended. 203 198 204 = 1.8.2 = 199 205 This version fixes log pager. Upgrade recommended.
Note: See TracChangeset
for help on using the changeset viewer.