Skip to main content
5 events
when toggle format what by license comment
May 18, 2018 at 18:50 vote accept BlueHelmet
Jun 3, 2016 at 10:42 history edited TheDeadMedic CC BY-SA 3.0
added 402 characters in body
Jun 3, 2016 at 10:40 comment added TheDeadMedic No, you would just use it instead of in_category( 'video' ) in your save function. And yes, you can conditionally add fields depending on mime type as you have described.
May 28, 2016 at 17:38 comment added BlueHelmet Is that something I would wrap around both functions? Also, I did find an article that says for custom attachment fields of a certain kind (for example, audio files) you wrap the function with: if( substr($post->post_mime_type, 0, 5) == 'audio' ){ // add your custom fields for audio files } Article: code.tutsplus.com/articles/…
May 27, 2016 at 10:50 history answered TheDeadMedic CC BY-SA 3.0