Changeset 2704062
- Timestamp:
- 04/04/2022 04:54:37 AM (4 years ago)
- Location:
- enlightenedimages
- Files:
-
- 6 edited
- 6 copied
-
tags/1.1 (copied) (copied from enlightenedimages/trunk)
-
tags/1.1/LICENSE.txt (copied) (copied from enlightenedimages/trunk/LICENSE.txt)
-
tags/1.1/README.txt (copied) (copied from enlightenedimages/trunk/README.txt) (5 diffs)
-
tags/1.1/enlightened-images.php (copied) (copied from enlightenedimages/trunk/enlightened-images.php) (1 diff)
-
tags/1.1/src (copied) (copied from enlightenedimages/trunk/src)
-
tags/1.1/src/class-elim-plugin.php (modified) (2 diffs)
-
tags/1.1/src/react-frontend/build/asset-manifest.json (modified) (1 diff)
-
tags/1.1/uninstall.php (copied) (copied from enlightenedimages/trunk/uninstall.php)
-
trunk/README.txt (modified) (5 diffs)
-
trunk/enlightened-images.php (modified) (1 diff)
-
trunk/src/class-elim-plugin.php (modified) (2 diffs)
-
trunk/src/react-frontend/build/asset-manifest.json (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
enlightenedimages/tags/1.1/README.txt
r2703981 r2704062 1 === Enlightened Images Alt Text Generator ===1 === Enlightened Images Alt Text Generator === 2 2 Contributors: bcupham 3 3 Tags: images, alt text, accessibility 4 4 Requires at least: 5.1.0 5 5 Tested up to: 5.9.2 6 Requires PHP: 7. 47 Stable tag: 1. 06 Requires PHP: 7.0 7 Stable tag: 1.1 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 15 15 Image alternative text, or "alt text" is both a requirement for accessible websites and a key part of any website SEO strategy. It is strongly recommended every image on your website have an alt text description. However, most websites have dozens or hundreds of images that are missing alt text. Adding it manually is a huge pain. 16 16 17 The Enlightened Images plugin solves this problem by generating alt text automatically using a bulk tool. Run the Bulk Alt Text tool and generate alt text for all images missing it.17 The Enlightened Images plugin solves this problem by generating alt text automatically using a bulk tool. Run the Bulk Alt Text tool and generate alt text for all images missing it. 18 18 19 19 == Features == 20 20 21 21 * Bulk generate alt text for every image in the Media Library missing it. 22 * Use your own Microsoft Azure account credentials to generate alt text, or optionally purchase an API key from Enlightened Images.22 * Use your own Microsoft Azure account credentials to generate alt text, or optionally purchase an API key from Enlightened Images. 23 23 24 24 == Installation == … … 27 27 2. Activate the plugin. 28 28 3. Go to Media -> Bulk Alt Text. 29 4. Either enter in your Enlightened Images API key, or your Azure API key and endpoint and save.29 4. Either enter in your Enlightened Images API key, or your Azure API key and endpoint and save. 30 30 5. Run the bulk annotation tool and watch your alt text problems melt away... 31 31 … … 41 41 Just kidding! We send it to Microsoft, where a computer makes a guess about what is the image and spits out a one-sentence description of it based on that guess. 42 42 43 == Do I Have to Buy an Enlightened Images API Key? ==43 == Do I Have to Buy an Enlightened Images API Key? == 44 44 45 No. You just have to get your own Microsoft Azure API key and "endpoint". It is a real pain, which is why we suggest [buying a key from us](https://enlightenedimageswp.com). Time = money and the time you spend trying to figure out how Azure works is very likely to befar more than purchasing a key from us.45 No. You just have to get your own Microsoft Azure API key and "endpoint". It is a real pain, which is why we suggest [buying a key from us](https://enlightenedimageswp.com). Time = money and the time you spend trying to figure out how Azure works is very likely to cost far more than purchasing a key from us. 46 46 47 47 == Is there a Pro Version of the Plugin? == … … 49 49 We're so glad you asked. Yes, [there is a pro version](https://enlightenedimageswp.com). The pro version allows you to generate alt text automatically when new images are uploaded. It also allows for editing the machine-generated alt text in the bulk tool, rather than having to go to the image attachment page. Plus, the pro version will support any new features we add, like text recognition, NSFW classification, and other cool stuff. 50 50 51 The pro version does not include an Enlightened Images API key. So you can have an API key, or you can have the pro plugin, or both. Or neither! It's all up to you.51 The pro version does not include an Enlightened Images API key. So you can have an API key, or you can have the pro plugin, or both. Or neither! It's all up to you. 52 52 53 53 == Is it Compatible With Image Optimization Plugins? == -
enlightenedimages/tags/1.1/enlightened-images.php
r2703976 r2704062 2 2 3 3 /** 4 * Plugin Name: Enlightened Images4 * Plugin Name: Enlightened Images 5 5 * Description: Generate image alt text automatically with machine learning. 6 * Version: 1. 06 * Version: 1.1 7 7 * Author: Ben Upham 8 8 * Text Domain: enlightenedimages -
enlightenedimages/tags/1.1/src/class-elim-plugin.php
r2703976 r2704062 214 214 ), 215 215 'meta_query' => array( 216 'relation' => 'AND', 216 217 array( 217 'key' => '_wp_attachment_image_alt', 218 'value' => '', 219 'compare' => '=' 218 'relation' => 'OR', 219 array( 220 'key' => '_wp_attachment_image_alt', 221 'value' => '', 222 'compare' => '=' 223 ), 224 array( 225 'key' => '_wp_attachment_image_alt', 226 'compare' => 'NOT EXISTS' 227 ) 220 228 ), 221 229 array( 222 'key' => '_wp_attachment_image_alt', 223 'compare' => 'NOT EXISTS' 224 ), 225 'relation' => 'OR' 230 'relation' => 'OR', 231 array( 232 'key' => 'elim_date', 233 'value' => date('Y-m-d H:i:s', $now), 234 'compare' => '!=' 235 ), 236 array( 237 'key' => 'elim_date', 238 'compare' => 'NOT EXISTS' 239 ) 240 ) 226 241 ), 227 242 'post_mime_type' => array('image/jpeg', 'image/gif', 'image/png', 'image/bmp'), … … 277 292 $image = null; 278 293 279 if ( $image_metadata['sizes']['medium']['width'] >= 50 && $image_metadata['sizes']['medium']['height'] >= 50) {294 if (isset($image_metadata['sizes']['medium']) && $image_metadata['sizes']['medium']['width'] >= 50 && $image_metadata['sizes']['medium']['height'] >= 50) { 280 295 $image = wp_get_attachment_image_url($p, 'medium'); 281 296 } else { 282 297 $image = wp_get_attachment_image_url($p, 'full'); 283 298 } 299 300 update_post_meta($p, 'elim_date', date('Y-m-d H:i:s', $now)); 284 301 285 302 if ($image === false) { -
enlightenedimages/tags/1.1/src/react-frontend/build/asset-manifest.json
r2703976 r2704062 2 2 "files": { 3 3 "main.css": "/static/css/main.a25026a1.css", 4 "main.js": "/static/js/main. 189b8f3a.js",5 "main.js.map": "/static/js/main. 189b8f3a.js.map",4 "main.js": "/static/js/main.2b4cd020.js", 5 "main.js.map": "/static/js/main.2b4cd020.js.map", 6 6 "index.html": "/index.html", 7 7 "static/css/main.a25026a1.css.map": "/static/css/main.a25026a1.css.map", 8 "static/js/main. 189b8f3a.js.LICENSE.txt": "/static/js/main.189b8f3a.js.LICENSE.txt",8 "static/js/main.2b4cd020.js.LICENSE.txt": "/static/js/main.2b4cd020.js.LICENSE.txt", 9 9 "static/media/index.css": "/static/media/alata-vietnamese-400-normal.6a13a2fd.woff2" 10 10 }, 11 11 "entrypoints": [ 12 12 "static/css/main.a25026a1.css", 13 "static/js/main. 189b8f3a.js"13 "static/js/main.2b4cd020.js" 14 14 ] 15 15 } -
enlightenedimages/trunk/README.txt
r2703981 r2704062 1 === Enlightened Images Alt Text Generator ===1 === Enlightened Images Alt Text Generator === 2 2 Contributors: bcupham 3 3 Tags: images, alt text, accessibility 4 4 Requires at least: 5.1.0 5 5 Tested up to: 5.9.2 6 Requires PHP: 7. 47 Stable tag: 1. 06 Requires PHP: 7.0 7 Stable tag: 1.1 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 15 15 Image alternative text, or "alt text" is both a requirement for accessible websites and a key part of any website SEO strategy. It is strongly recommended every image on your website have an alt text description. However, most websites have dozens or hundreds of images that are missing alt text. Adding it manually is a huge pain. 16 16 17 The Enlightened Images plugin solves this problem by generating alt text automatically using a bulk tool. Run the Bulk Alt Text tool and generate alt text for all images missing it.17 The Enlightened Images plugin solves this problem by generating alt text automatically using a bulk tool. Run the Bulk Alt Text tool and generate alt text for all images missing it. 18 18 19 19 == Features == 20 20 21 21 * Bulk generate alt text for every image in the Media Library missing it. 22 * Use your own Microsoft Azure account credentials to generate alt text, or optionally purchase an API key from Enlightened Images.22 * Use your own Microsoft Azure account credentials to generate alt text, or optionally purchase an API key from Enlightened Images. 23 23 24 24 == Installation == … … 27 27 2. Activate the plugin. 28 28 3. Go to Media -> Bulk Alt Text. 29 4. Either enter in your Enlightened Images API key, or your Azure API key and endpoint and save.29 4. Either enter in your Enlightened Images API key, or your Azure API key and endpoint and save. 30 30 5. Run the bulk annotation tool and watch your alt text problems melt away... 31 31 … … 41 41 Just kidding! We send it to Microsoft, where a computer makes a guess about what is the image and spits out a one-sentence description of it based on that guess. 42 42 43 == Do I Have to Buy an Enlightened Images API Key? ==43 == Do I Have to Buy an Enlightened Images API Key? == 44 44 45 No. You just have to get your own Microsoft Azure API key and "endpoint". It is a real pain, which is why we suggest [buying a key from us](https://enlightenedimageswp.com). Time = money and the time you spend trying to figure out how Azure works is very likely to befar more than purchasing a key from us.45 No. You just have to get your own Microsoft Azure API key and "endpoint". It is a real pain, which is why we suggest [buying a key from us](https://enlightenedimageswp.com). Time = money and the time you spend trying to figure out how Azure works is very likely to cost far more than purchasing a key from us. 46 46 47 47 == Is there a Pro Version of the Plugin? == … … 49 49 We're so glad you asked. Yes, [there is a pro version](https://enlightenedimageswp.com). The pro version allows you to generate alt text automatically when new images are uploaded. It also allows for editing the machine-generated alt text in the bulk tool, rather than having to go to the image attachment page. Plus, the pro version will support any new features we add, like text recognition, NSFW classification, and other cool stuff. 50 50 51 The pro version does not include an Enlightened Images API key. So you can have an API key, or you can have the pro plugin, or both. Or neither! It's all up to you.51 The pro version does not include an Enlightened Images API key. So you can have an API key, or you can have the pro plugin, or both. Or neither! It's all up to you. 52 52 53 53 == Is it Compatible With Image Optimization Plugins? == -
enlightenedimages/trunk/enlightened-images.php
r2703976 r2704062 2 2 3 3 /** 4 * Plugin Name: Enlightened Images4 * Plugin Name: Enlightened Images 5 5 * Description: Generate image alt text automatically with machine learning. 6 * Version: 1. 06 * Version: 1.1 7 7 * Author: Ben Upham 8 8 * Text Domain: enlightenedimages -
enlightenedimages/trunk/src/class-elim-plugin.php
r2703976 r2704062 214 214 ), 215 215 'meta_query' => array( 216 'relation' => 'AND', 216 217 array( 217 'key' => '_wp_attachment_image_alt', 218 'value' => '', 219 'compare' => '=' 218 'relation' => 'OR', 219 array( 220 'key' => '_wp_attachment_image_alt', 221 'value' => '', 222 'compare' => '=' 223 ), 224 array( 225 'key' => '_wp_attachment_image_alt', 226 'compare' => 'NOT EXISTS' 227 ) 220 228 ), 221 229 array( 222 'key' => '_wp_attachment_image_alt', 223 'compare' => 'NOT EXISTS' 224 ), 225 'relation' => 'OR' 230 'relation' => 'OR', 231 array( 232 'key' => 'elim_date', 233 'value' => date('Y-m-d H:i:s', $now), 234 'compare' => '!=' 235 ), 236 array( 237 'key' => 'elim_date', 238 'compare' => 'NOT EXISTS' 239 ) 240 ) 226 241 ), 227 242 'post_mime_type' => array('image/jpeg', 'image/gif', 'image/png', 'image/bmp'), … … 277 292 $image = null; 278 293 279 if ( $image_metadata['sizes']['medium']['width'] >= 50 && $image_metadata['sizes']['medium']['height'] >= 50) {294 if (isset($image_metadata['sizes']['medium']) && $image_metadata['sizes']['medium']['width'] >= 50 && $image_metadata['sizes']['medium']['height'] >= 50) { 280 295 $image = wp_get_attachment_image_url($p, 'medium'); 281 296 } else { 282 297 $image = wp_get_attachment_image_url($p, 'full'); 283 298 } 299 300 update_post_meta($p, 'elim_date', date('Y-m-d H:i:s', $now)); 284 301 285 302 if ($image === false) { -
enlightenedimages/trunk/src/react-frontend/build/asset-manifest.json
r2703976 r2704062 2 2 "files": { 3 3 "main.css": "/static/css/main.a25026a1.css", 4 "main.js": "/static/js/main. 189b8f3a.js",5 "main.js.map": "/static/js/main. 189b8f3a.js.map",4 "main.js": "/static/js/main.2b4cd020.js", 5 "main.js.map": "/static/js/main.2b4cd020.js.map", 6 6 "index.html": "/index.html", 7 7 "static/css/main.a25026a1.css.map": "/static/css/main.a25026a1.css.map", 8 "static/js/main. 189b8f3a.js.LICENSE.txt": "/static/js/main.189b8f3a.js.LICENSE.txt",8 "static/js/main.2b4cd020.js.LICENSE.txt": "/static/js/main.2b4cd020.js.LICENSE.txt", 9 9 "static/media/index.css": "/static/media/alata-vietnamese-400-normal.6a13a2fd.woff2" 10 10 }, 11 11 "entrypoints": [ 12 12 "static/css/main.a25026a1.css", 13 "static/js/main. 189b8f3a.js"13 "static/js/main.2b4cd020.js" 14 14 ] 15 15 }
Note: See TracChangeset
for help on using the changeset viewer.