Changeset 3493349
- Timestamp:
- 03/28/2026 01:43:53 PM (8 days ago)
- Location:
- altpilot
- Files:
-
- 2 added
- 10 edited
- 1 copied
-
tags/1.0.5 (copied) (copied from altpilot/trunk)
-
tags/1.0.5/altpilot.php (modified) (3 diffs)
-
tags/1.0.5/app/classes/Filters.php (modified) (1 diff)
-
tags/1.0.5/app/classes/Image.php (modified) (3 diffs)
-
tags/1.0.5/app/classes/Reference.php (added)
-
tags/1.0.5/changelog.txt (modified) (1 diff)
-
tags/1.0.5/readme.txt (modified) (3 diffs)
-
trunk/altpilot.php (modified) (3 diffs)
-
trunk/app/classes/Filters.php (modified) (1 diff)
-
trunk/app/classes/Image.php (modified) (3 diffs)
-
trunk/app/classes/Reference.php (added)
-
trunk/changelog.txt (modified) (1 diff)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
altpilot/tags/1.0.5/altpilot.php
r3412405 r3493349 8 8 * Plugin URI: https://altpilot.ai 9 9 * Description: Alt Text AI Generator - Powerful and easy-to-use . Automatically generate image alt texts using AI and improve your SEO and accessibility. 10 * Version: 1.0. 410 * Version: 1.0.5 11 11 * Requires at least: 6.3 12 12 * Requires PHP: 7.4 … … 16 16 * Text Domain: altpilot 17 17 * Domain Path: /languages 18 * Tested up to: 6. 818 * Tested up to: 6.9 19 19 */ 20 20 21 21 namespace AltPilot; 22 22 23 use AltPilot\App\Classes\LogTable;24 23 use Exception; 25 24 … … 101 100 ); 102 101 } 103 104 // Create a log table if it does not exist105 new Log();106 102 107 103 } -
altpilot/tags/1.0.5/app/classes/Filters.php
r3363856 r3493349 227 227 } 228 228 229 $modifiedContent = str_replace('<?xml encoding="UTF-8">', '', $modifiedContent); 230 229 231 // Remove the xml encoding tag from the output 230 return str_replace('<?xml encoding="UTF-8">', '', $modifiedContent);232 return preg_replace('/<p>\s*(\[[^\]]+\])\s*<\/p>/', '$1', $modifiedContent); 231 233 } 232 234 -
altpilot/tags/1.0.5/app/classes/Image.php
r3363856 r3493349 171 171 } 172 172 173 // Find id in references 174 $reference = Reference::read(['img_url' => $url]); 175 if ($reference && !empty($reference['attachment_id'])) { 176 return (int)$reference['attachment_id']; 177 } 178 173 179 // Get all attachment IDs from the database 174 180 $attachments = Image::get_ids(); … … 183 189 $attachment_metadata = wp_get_attachment_metadata( $attachment_id ); 184 190 191 // Get the main file URL for the attachment and check if it matches the provided URL 192 if ( isset( $attachment_metadata['file'] ) && str_contains($url, $attachment_metadata['file'])) { 193 194 // Create a reference for future lookups 195 Reference::create([ 196 'attachment_id' => $attachment_id, 197 'img_url' => $url, 198 ]); 199 200 return $attachment_id; 201 202 } 203 185 204 // Get the attachment's URL for each size 186 205 $sizes = $attachment_metadata['sizes'] ?? []; … … 189 208 // Check if the URL matches the attachment's URL 190 209 if ( isset( $size['file'] ) && str_contains($url, $size['file'])) { 210 211 // Create a reference for future lookups 212 Reference::create([ 213 'attachment_id' => $attachment_id, 214 'img_url' => $url, 215 ]); 216 191 217 return $attachment_id; 192 218 } -
altpilot/tags/1.0.5/changelog.txt
r3412405 r3493349 1 = 1.0.5 = 2 * Improved performance of the plugin by optimizing database queries. 3 1 4 = 1.0.4 = 2 5 * Refactor readme text -
altpilot/tags/1.0.5/readme.txt
r3412405 r3493349 3 3 Tags: alt, AI 4 4 Requires at least: 6.3 5 Tested up to: 6. 86 Stable tag: 1.0. 45 Tested up to: 6.9 6 Stable tag: 1.0.5 7 7 Requires PHP: 7.4 8 8 License: GPLv2 or later … … 81 81 == Changelog == 82 82 83 = 1.0.5 = 84 * Improved performance of the plugin by optimizing database queries. 85 83 86 = 1.0.4 = 84 87 * Refactor readme text … … 100 103 == Upgrade Notice = 101 104 105 = 1.0.5 = 106 * Improved performance of the plugin by optimizing database queries. 107 102 108 = 1.0.4 = 103 109 * Refactor readme text -
altpilot/trunk/altpilot.php
r3412405 r3493349 8 8 * Plugin URI: https://altpilot.ai 9 9 * Description: Alt Text AI Generator - Powerful and easy-to-use . Automatically generate image alt texts using AI and improve your SEO and accessibility. 10 * Version: 1.0. 410 * Version: 1.0.5 11 11 * Requires at least: 6.3 12 12 * Requires PHP: 7.4 … … 16 16 * Text Domain: altpilot 17 17 * Domain Path: /languages 18 * Tested up to: 6. 818 * Tested up to: 6.9 19 19 */ 20 20 21 21 namespace AltPilot; 22 22 23 use AltPilot\App\Classes\LogTable;24 23 use Exception; 25 24 … … 101 100 ); 102 101 } 103 104 // Create a log table if it does not exist105 new Log();106 102 107 103 } -
altpilot/trunk/app/classes/Filters.php
r3363856 r3493349 227 227 } 228 228 229 $modifiedContent = str_replace('<?xml encoding="UTF-8">', '', $modifiedContent); 230 229 231 // Remove the xml encoding tag from the output 230 return str_replace('<?xml encoding="UTF-8">', '', $modifiedContent);232 return preg_replace('/<p>\s*(\[[^\]]+\])\s*<\/p>/', '$1', $modifiedContent); 231 233 } 232 234 -
altpilot/trunk/app/classes/Image.php
r3363856 r3493349 171 171 } 172 172 173 // Find id in references 174 $reference = Reference::read(['img_url' => $url]); 175 if ($reference && !empty($reference['attachment_id'])) { 176 return (int)$reference['attachment_id']; 177 } 178 173 179 // Get all attachment IDs from the database 174 180 $attachments = Image::get_ids(); … … 183 189 $attachment_metadata = wp_get_attachment_metadata( $attachment_id ); 184 190 191 // Get the main file URL for the attachment and check if it matches the provided URL 192 if ( isset( $attachment_metadata['file'] ) && str_contains($url, $attachment_metadata['file'])) { 193 194 // Create a reference for future lookups 195 Reference::create([ 196 'attachment_id' => $attachment_id, 197 'img_url' => $url, 198 ]); 199 200 return $attachment_id; 201 202 } 203 185 204 // Get the attachment's URL for each size 186 205 $sizes = $attachment_metadata['sizes'] ?? []; … … 189 208 // Check if the URL matches the attachment's URL 190 209 if ( isset( $size['file'] ) && str_contains($url, $size['file'])) { 210 211 // Create a reference for future lookups 212 Reference::create([ 213 'attachment_id' => $attachment_id, 214 'img_url' => $url, 215 ]); 216 191 217 return $attachment_id; 192 218 } -
altpilot/trunk/changelog.txt
r3412405 r3493349 1 = 1.0.5 = 2 * Improved performance of the plugin by optimizing database queries. 3 1 4 = 1.0.4 = 2 5 * Refactor readme text -
altpilot/trunk/readme.txt
r3412405 r3493349 3 3 Tags: alt, AI 4 4 Requires at least: 6.3 5 Tested up to: 6. 86 Stable tag: 1.0. 45 Tested up to: 6.9 6 Stable tag: 1.0.5 7 7 Requires PHP: 7.4 8 8 License: GPLv2 or later … … 81 81 == Changelog == 82 82 83 = 1.0.5 = 84 * Improved performance of the plugin by optimizing database queries. 85 83 86 = 1.0.4 = 84 87 * Refactor readme text … … 100 103 == Upgrade Notice = 101 104 105 = 1.0.5 = 106 * Improved performance of the plugin by optimizing database queries. 107 102 108 = 1.0.4 = 103 109 * Refactor readme text
Note: See TracChangeset
for help on using the changeset viewer.