Changeset 3404954
- Timestamp:
- 11/28/2025 09:13:35 AM (4 months ago)
- Location:
- image-protection
- Files:
-
- 8 added
- 5 edited
-
tags/1.0.7 (added)
-
tags/1.0.7/CHANGELOG.md (added)
-
tags/1.0.7/README.md (added)
-
tags/1.0.7/image-protection.php (added)
-
tags/1.0.7/protection.js (added)
-
tags/1.0.7/readme.txt (added)
-
tags/1.0.7/uninstall.php (added)
-
trunk/CHANGELOG.md (modified) (1 diff)
-
trunk/README.md (modified) (2 diffs)
-
trunk/image-protection.php (modified) (7 diffs)
-
trunk/protection.js (modified) (2 diffs)
-
trunk/readme.txt (modified) (1 diff)
-
trunk/uninstall.php (added)
Legend:
- Unmodified
- Added
- Removed
-
image-protection/trunk/CHANGELOG.md
r3307138 r3404954 5 5 The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), 6 6 and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 7 8 ## [1.0.7] - 2025-11-28 9 10 ### Added 11 - Option to control the amount of blur applied to images. 12 - Uninstall cleanup to remove plugin options. 13 7 14 8 15 ## [1.0.6] - 2025-06-05 -
image-protection/trunk/README.md
r3307138 r3404954 5 5 **Requires at least:** 5.0 6 6 **Tested up to:** 6.8 7 **Stable tag:** 1.0. 67 **Stable tag:** 1.0.7 8 8 **Requires PHP:** 7.4 9 9 **License:** GPLv2 or later … … 76 76 ### How can I uninstall the plugin? 77 77 To uninstall, go to the Plugins page in your WordPress admin, find the Image Protection plugin, and click "Deactivate." You can then delete it if desired. 78 -
image-protection/trunk/image-protection.php
r3307138 r3404954 4 4 * Plugin URI: https://wordpress.org/plugins/image-protection 5 5 * Description: Protects images from being copied, saved, or screenshot. 6 * Version: 1.0. 66 * Version: 1.0.7 7 7 * Requires at least: 5.0 8 8 * Requires PHP: 7.4 … … 24 24 * Define plugin constants. 25 25 */ 26 define( 'IMAGE_PROTECTION_VERSION', '1.0. 6' );26 define( 'IMAGE_PROTECTION_VERSION', '1.0.7' ); 27 27 define( 'IMAGE_PROTECTION_PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); 28 28 define( 'IMAGE_PROTECTION_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); … … 59 59 'type' => 'boolean', 60 60 'default' => true, 61 ) 62 ); 63 64 register_setting( 65 'image_protection_options', 66 'image_protection_blur_amount', 67 array( 68 'type' => 'integer', 69 'default' => 10, 70 'sanitize_callback' => 'absint', 61 71 ) 62 72 ); … … 88 98 // Set default message if not already set 89 99 if ( get_option( 'image_protection_message' ) === false ) { 90 update_option( 'image_protection_message', __('Image protected', 'image-protection') );100 update_option( 'image_protection_message', __('Images protected', 'image-protection') ); 91 101 } 92 102 ?> … … 126 136 </td> 127 137 </tr> 138 <tr valign="top"> 139 <th scope="row"><?php esc_html_e( 'Blur amount (px)', 'image-protection' ); ?></th> 140 <td> 141 <input type="number" id="image_protection_blur_amount" name="image_protection_blur_amount" value="<?php echo esc_attr( get_option( 'image_protection_blur_amount', 10 ) ); ?>" class="small-text" min="0" step="1" /> 142 <p class="description"><?php esc_html_e( 'The amount of blur to apply to images (in pixels). Default is 10.', 'image-protection' ); ?></p> 143 </td> 144 </tr> 128 145 </table> 129 146 <?php submit_button(); ?> … … 155 172 $message = get_option( 'image_protection_message', __('Image protected', 'image-protection') ); 156 173 $show_credit = get_option( 'image_protection_show_credit', true ); 174 $blur_amount = get_option( 'image_protection_blur_amount', 10 ); 157 175 158 176 wp_localize_script( … … 162 180 'message' => esc_js( $message ), 163 181 'showCredit' => (bool) $show_credit, 182 'blurAmount' => absint( $blur_amount ), 164 183 ) 165 184 ); -
image-protection/trunk/protection.js
r3307138 r3404954 10 10 this.message = typeof imageProtectionVars !== 'undefined' && imageProtectionVars.message ? imageProtectionVars.message : ''; 11 11 this.showCredit = typeof imageProtectionVars !== 'undefined' && imageProtectionVars.showCredit; 12 this.blurAmount = typeof imageProtectionVars !== 'undefined' && imageProtectionVars.blurAmount ? parseInt(imageProtectionVars.blurAmount) : 10; 12 13 this.messageHovered = false; 13 14 this.init(); … … 240 241 this.filteredImages.forEach(img => { 241 242 img.style.transition = "none"; 242 img.style.filter = 'blur(10px)';243 img.style.filter = `blur(${this.blurAmount}px)`; 243 244 244 245 // Display message if available -
image-protection/trunk/readme.txt
r3307138 r3404954 4 4 Requires at least: 5.0 5 5 Tested up to: 6.8 6 Stable tag: 1.0. 66 Stable tag: 1.0.7 7 7 Requires PHP: 7.4 8 8 License: GPLv2 or later
Note: See TracChangeset
for help on using the changeset viewer.