Changeset 3305490
- Timestamp:
- 06/03/2025 06:56:39 AM (10 months ago)
- Location:
- bulk-featured-image
- Files:
-
- 27 added
- 6 edited
-
tags/1.2.2 (added)
-
tags/1.2.2/README.md (added)
-
tags/1.2.2/admin (added)
-
tags/1.2.2/admin/class-bfi-list-table.php (added)
-
tags/1.2.2/admin/class-bulk-featured-image-admin.php (added)
-
tags/1.2.2/admin/class-bulk-featured-image-settings-fields.php (added)
-
tags/1.2.2/assets (added)
-
tags/1.2.2/assets/css (added)
-
tags/1.2.2/assets/css/bootstrap.min.css (added)
-
tags/1.2.2/assets/css/bulk-featured-image-admin.css (added)
-
tags/1.2.2/assets/css/select2.min.css (added)
-
tags/1.2.2/assets/images (added)
-
tags/1.2.2/assets/images/menu-icon.png (added)
-
tags/1.2.2/assets/js (added)
-
tags/1.2.2/assets/js/bulk-featured-image-admin.js (added)
-
tags/1.2.2/assets/js/select2.min.js (added)
-
tags/1.2.2/bulk-featured-image.php (added)
-
tags/1.2.2/includes (added)
-
tags/1.2.2/includes/activator.php (added)
-
tags/1.2.2/includes/class-bulk-featured-image.php (added)
-
tags/1.2.2/includes/deactivator.php (added)
-
tags/1.2.2/includes/functions.php (added)
-
tags/1.2.2/index.php (added)
-
tags/1.2.2/languages (added)
-
tags/1.2.2/languages/index.php (added)
-
tags/1.2.2/readme.txt (added)
-
tags/1.2.2/uninstall.php (added)
-
trunk/admin/class-bfi-list-table.php (modified) (2 diffs)
-
trunk/admin/class-bulk-featured-image-settings-fields.php (modified) (3 diffs)
-
trunk/assets/js/bulk-featured-image-admin.js (modified) (4 diffs)
-
trunk/bulk-featured-image.php (modified) (2 diffs)
-
trunk/includes/class-bulk-featured-image.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
bulk-featured-image/trunk/admin/class-bfi-list-table.php
r2668791 r3305490 29 29 $data = $this->table_data(); 30 30 31 usort( $data, array( &$this, 'sort_data' ) );32 33 31 $table_data = $this->get_post_data(); 34 32 … … 211 209 <?php if( !empty($thumb)) { ?> 212 210 <div class="bfi-remove-image"> 213 <a id="remove-featured-image" class="remove-featured-image" data-current_page="<?php echo $current_page; ?>" data-id="<?php echo $post_id; ?>"> Remove image</a>211 <a id="remove-featured-image" class="remove-featured-image" data-current_page="<?php echo $current_page; ?>" data-id="<?php echo $post_id; ?>"><?php esc_html_e( 'Remove image', 'bulk-featured-image' ); ?></a> 214 212 </div> 215 213 <?php } ?> -
bulk-featured-image/trunk/admin/class-bulk-featured-image-settings-fields.php
r2668791 r3305490 150 150 $bfi_settings = get_option( $setting_key, true ); 151 151 152 $message_updated = false; 152 153 if( isset( $_FILES['bfi_upload_file'] ) && !empty( $_FILES['bfi_upload_file'] ) && is_array($_FILES['bfi_upload_file'])) { 153 154 $image_url = !empty( $_FILES['bfi_upload_file']['tmp_name'] ) ? sanitize_text_field( $_FILES['bfi_upload_file']['tmp_name'] ) : ''; … … 160 161 if( !empty($attach_id) && $attach_id > 0 ) { 161 162 $settings['bfi_upload_file'] = (int)sanitize_text_field($attach_id); 163 $message_updated = true; 162 164 } 163 165 } … … 209 211 update_option( $setting_key, $bfi_settings ); 210 212 211 self::add_message( sprintf(__( 'Your <strong>%s</strong> featured image updated successfully.', 'bulk-featured-image' ), ucwords($current_sub_section) ) ); 212 } 213 if( $message_updated ) { 214 self::add_message( sprintf(__( 'Your <strong>%s</strong> featured image updated successfully.', 'bulk-featured-image' ), ucwords($current_sub_section) ) ); 215 } 216 } 217 213 218 214 219 public function add_default_post_type_thumb( $section ) { -
bulk-featured-image/trunk/assets/js/bulk-featured-image-admin.js
r3197217 r3305490 44 44 } else { 45 45 bfi_remove_loader( currentobj ); 46 alert( 'The default image cannot be removed. Please upgrade to the PRO version to access this feature.');46 alert(bfie_object.removeDefaultMsg); 47 47 } 48 48 } … … 108 108 } 109 109 110 function bfi_drag_drop(event, id ='') {110 function bfi_drag_drop(event, id='') { 111 111 112 112 var preview_id = 'bfi_upload_preview'; 113 if ( parseInt( id ) > 0 ) { 113 114 if (parseInt(id) > 0) { 114 115 preview_id += '_' + id; 115 jQuery( '#post_thumbnail_url_' + id ).parent().remove(); 116 jQuery( '#no_thumbnail_url_' + id ).remove(); 117 116 jQuery('#post_thumbnail_url_' + id).parent().remove(); 117 jQuery('#no_thumbnail_url_' + id).remove(); 118 118 } 119 119 120 var fileName = URL.createObjectURL( event.target.files[0] ); 121 var preview = document.getElementById( preview_id ); 122 var previewImg = document.createElement( "img" ); 123 previewImg.setAttribute( "src", fileName ); 120 var preview = document.getElementById(preview_id); 121 var removeImageButton = jQuery('#bfi_upload_preview_' + id).closest('.bfi-image-uploader-wrap').siblings('.bfi-remove-image'); 122 var file = event.target.files[0]; 124 123 preview.innerHTML = ""; 125 preview.appendChild( previewImg ); 124 125 // Allowed file types 126 var allowedTypes = ["image/jpeg", "image/png", "image/jpg"]; 127 128 if (!allowedTypes.includes(file.type)) { 129 var errorMsg = document.createElement("div"); 130 errorMsg.style.color = "red"; 131 errorMsg.style.fontWeight = "bold"; 132 errorMsg.innerText = bfie_object.invalidFileType; 133 preview.appendChild(errorMsg); 134 135 removeImageButton.hide(); 136 event.target.value = ''; 137 return; 138 } 139 140 var fileName = URL.createObjectURL(file); 141 var previewImg = document.createElement("img"); 142 previewImg.setAttribute("src", fileName); 143 144 preview.appendChild(previewImg); 145 126 146 } 127 147 … … 131 151 upload_file += '_' + id; 132 152 } 133 //document.getElementById(upload_file).parentNode.className = 'draging dragBox'; 153 134 154 } 155 135 156 function bfi_drop( event, id ='') { 136 157 var upload_file = 'bfi_upload_file'; … … 138 159 upload_file += '_' + id; 139 160 } 140 //document.getElementById(upload_file).parentNode.className = 'dragBox';141 161 } -
bulk-featured-image/trunk/bulk-featured-image.php
r3197217 r3305490 4 4 Plugin URI: https://wordpress.org/plugins/bulk-featured-image/ 5 5 Description: Bulk Featured images update. 6 Version: 1.2. 16 Version: 1.2.2 7 7 Author: CreedAlly 8 8 Author URI: https://creedally.com/ … … 18 18 // Define plugin version. 19 19 if ( ! defined( 'BFIE_VERSION' ) ) { 20 define( 'BFIE_VERSION', '1.2. 1' );20 define( 'BFIE_VERSION', '1.2.2' ); 21 21 } 22 22 -
bulk-featured-image/trunk/includes/class-bulk-featured-image.php
r3165742 r3305490 140 140 'ajax_url' => admin_url( 'admin-ajax.php' ), 141 141 'delete_post_message' => __('Are You sure you want to Remove this Image!','bulk-featured-image' ), 142 'invalidFileType' => __('Invalid file type. Only JPG, JPEG, or PNG files are allowed.','bulk-featured-image' ), 143 'removeDefaultMsg' => __('The default image cannot be removed. Please upgrade to the PRO version to access this feature.','bulk-featured-image' ), 142 144 ) 143 145 ); -
bulk-featured-image/trunk/readme.txt
r3197217 r3305490 2 2 Contributors: creedally, dhavalparejia, priyank9033 3 3 Tags: thumbnails, post-thumbnail 4 Requires at least: 4.75 Tested up to: 6. 7.16 Requires PHP: 5.67 Stable tag: 1.2. 14 Requires at least: 5.8 5 Tested up to: 6.8.1 6 Requires PHP: 7.4 7 Stable tag: 1.2.2 8 8 License: GPL-2.0+ 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.txt … … 84 84 == Changelog == 85 85 86 = 1.2.2 - 06/03/2025 = 87 * Fix – Validate file type during image upload. 88 * Compatibility with WordPress 6.8.1 version. 89 86 90 = 1.2.1 - 11/26/2024 = 87 91
Note: See TracChangeset
for help on using the changeset viewer.