xytroyzy / wordpress-custom-content-type-manager

Automatically exported from code.google.com/p/wordpress-custom-content-type-manager
0 stars 0 forks source link

add some validations on image field. #584

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
BEFORE YOU FILE: Are you using the latest version of the CCTM?  Please
check http://wordpress.org/extend/plugins/custom-content-type-manager/

What functionality do you want to see?

Do you have examples of similar functionality on other sites or in other
plugins? (Please share URLs below)

Please provide any additional information below.

This would be good if you add some validation rules for image .. 
like max min size of the image and max min height width of the uploading image .
and if I add some validation class in 
wp-content/uploads/cctm/validators/ then it should appear in image validation 
rules drop-down  

Original issue reported on code.google.com by mansab.p...@gmail.com on 12 Mar 2015 at 12:08

GoogleCodeExporter commented 8 years ago
It's really hard to do that due to how PHP works: you can only validate image 
size after the image has been uploaded, and the upload is restricted by the 
server's php max upload settings.  WordPress's own functions for this are 
almost useless, unfortunately, so I would need to write the whole thing from 
scratch.  It would be nice though, to do asset management correctly.

How to add custom classes is defined in the wiki, but some of this may be 
changing in the next release.

Original comment by ever...@fireproofsocks.com on 12 Mar 2015 at 5:01

GoogleCodeExporter commented 8 years ago
https://github.com/craftsmancoding/custom-content-type-manager/issues/24

Original comment by ever...@fireproofsocks.com on 11 May 2015 at 5:47