Setting up a HIPAA secured form / file upload

Assuming a developer that is/stays current on relevant security issues creates/manages the site, and a HIPAA compliant (per the regulations) hosting environment is used, forms, uploading, etc. is fine. If you proceed, note that compliance is more than technical. Policies/procedures have to be in place for using/managing the solution as well as incorporating the solution … Read more

Change file name on upload in Media Page

The best way of doing this might be to attach a custom field to each post to keep the increment {n}. Something to the effect of: $attach_inc = 1; if ( is_single() ) { if ( $attach_inc = get_post_meta( $post_id, ‘attachment_inc’, true ) ) { $attach_inc++; update_post_meta( $post_id, ‘attachment_inc’, $attach_inc ); } else { add_post_meta( … Read more

wp_upload_bits() is not giving the file path right in localhost

I ran into the same exact issue (getting paths like ‘X:xampphtdocswordpress/wp-content/uploads/2017/05/filename.jpg’ on WAMP on Windows). The issue seems to be due to update_post_meta() passing values through stripslashes() when storing the data. The workaround is to add wp_slash() around your value you pass to update_post_meta(). You’re probably calling update_post_meta() something like this: update_post_meta( $id, ‘doesnt_work’, $data … Read more

Resize uploaded original images to a minimum automatically

From purely WordPress point of view you want add_image_size() with a “hard” crop mode. That will ensure that any significantly large image will be sized to fit into those dimensions exactly, cropping some parts if necessary. The problem is usually that WP won’t upsize small images to fit, as far as I remember. It is … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)