Comments (11)
in wp-admin/includes/image.php :
wp_read_image_metadata()
calls:
wp_kses_post_deep()
which strips tags.
So we have to use the php exif parsing. I'll look at hooking this in for the Media editor, pulling the values for the fields if they are not otherwise populated.
@mattl does this indicate a more general problem with the Exif tag format we are proposing? I don't believe so, but worth considering. Also maybe we should consider adding source and CC+ if we haven't already.
from wp-plugin-creativecommons.
Making progress with the php Exif parsing, just trying to make it efficient for the code and logical for the user.
from wp-plugin-creativecommons.
Code now extracts license and attribution url when you view the media. Looking to see if I can hook this in to the image upload process, but if not this will be Good Enough, I think.
from wp-plugin-creativecommons.
Metadata now extracted on image upload.
This won't get metadata for existing images if the plugin is installed and we have (e.g.) 20,000 images with Exif already in the system.
@mattl we can run the extract code when you view the image in the Media editor, or is this something we might want to give the user the option of running manually from the settings for the plugin (a button [Scan Existing Images for License Metadata And Apply It] ) if that's possible?
from wp-plugin-creativecommons.
Won't existing images have been previously stripped by WordPress?
from wp-plugin-creativecommons.
I don't believe so. The strings are stripped after reading from the file, rather than the file itself being sanitised.
from wp-plugin-creativecommons.
Maybe something like this? We could pull all the existing images from the CC website as a test, but also @ericsteuer has good insight into how this works on a big site liked Wired.com who probably have a few hundred thousand images.
from wp-plugin-creativecommons.
I had in mind more a global "Extract CC License metadata where present but
don't overwrite anything" option.
We could also add a button to the media manager to do this for individual
images.
So the former would support hundreds of thousands, the latter just a few if
you only want to use a few.
On Fri, Jul 29, 2016 at 1:57 PM, Matt Lee [email protected] wrote:
[image: screenshot from 2016-07-29 15-56-15]
https://cloud.githubusercontent.com/assets/33296/17263143/0538b4a8-55a5-11e6-9471-e62fa5f2e11b.pngMaybe something like this? We could pull all the existing images from the
CC website as a test, but also @ericsteuer https://github.com/ericsteuer
has good insight into how this works on a big site liked Wired.com who
probably have a few hundred thousand images.—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#14 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABU8ocliyFl3zU0pVeCqom5cyrKPavHks5qamkxgaJpZM4JWuJI
.
from wp-plugin-creativecommons.
The worry I have there is that we'd wind up adding extra captions to existing images all over the place.
from wp-plugin-creativecommons.
Sure. It's the sort of thing where the user will want the plugin to do the right thing, for a value of "the right thing" that will differ from case to case. And they'll really want an Undo button.
So if this is too difficult to do usefully we shouldn't make something that will just frustrate people. :-)
from wp-plugin-creativecommons.
Why not use the 'regenerate thumbnails approach' in which you have a plugin run once for all existing images? This could be a seperate add-on plugin which can be removed after it has run, since it's likely to be run only once.
from wp-plugin-creativecommons.
Related Issues (20)
- Notice: wp_enqueue_script() was called incorrectly HOT 12
- Warning: getimagesize: failed to open stream HOT 18
- [RFC] deprecate `create-guten-block` scripts; use `@wordpress/scripts` instead HOT 4
- Composer Upgrade failed HOT 2
- [Feature] Setup baseline docker-compose.yml file for easier development
- [Feature] Expand docker-compose.yml file to include wpcli functionality HOT 1
- [Feature] Expand docker-compose.yml file to include composer and phpcs functionality HOT 2
- [Feature] Expand docker-compose.yml file to include database GUI application image (Adminer, phpMyAdmin)
- [Bug] Footer display option for site-wide license is flush to left viewport edge HOT 4
- [Bug] Media item meta options area will not preserve selected license Title in License URL, despite License URL updating correctly HOT 3
- Release/deploy v2022.07.1
- CC plugin admin fails to load with PHP 8
- Scope strategy of the migration from `create-guten-block` scripts to a `@wordpress/scripts` core setup
- Release/deploy v2022.09.1
- [Bug] CC logos do not show on images, when using the WPZoom theme Inspiro HOT 3
- [Feature] Test the plugin with the latest major releases of WordPress HOT 3
- [Feature] Add support for attribution on featured image HOT 2
- Utilize organization default community health files
- [Bug] Fix JavaScript/NPM (replace cgb-scripts)
- [Feature] Use docker compose version 2 (non swarm deployment)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wp-plugin-creativecommons.