Too much recursion error when chosing image from image library for two different meta boxes in one post

I think you’re running into a problem people mentioned in the comments to that story. Someone else posted about it here: http://www.theenglishguy.co.uk/2010/01/24/multiple-media-uploads-in-wordpress-functions-php/ Basically, the JavaScript from that site should be modified to be more like this: jQuery(document).ready(function() { var formlabel = 0; var old_send_to_editor = window.send_to_editor; var old_tb_remove = window.tb_remove; jQuery(‘.upload_image_button’).click(function(){ formlabel = jQuery(this).parent(); tb_show(”, … Read more

Image dimensions same as image size

No, it won’t create a new image that is exactly the same size.. nor should it. All the thumbnail, medium, and large images are resized images, by definition. Since the original image is already 600×600, there’s no point in creating another file at the same size, but with a lower quality (remember that JPEG compression … Read more

Attach Files Metabox

For the part of opening a lightbox, browse for something and then performing something on an action within: WordPress has this already build in. For what you ask is basically the thickbox that opens up like in the post editor when you browse for an image in the gallery. You find all the code you … Read more

Where to put third party PHP library?

If each plugin/theme functions on its own, then you should probably drop the the library in every theme/plugin. Then just check to see if it a class or function from the third-party library exists before requiring it. <?php if( class_exists( ‘SomeClass’ ) ) { // require/include here } or <?php if( function_exists( ‘some_function’ ) ) … Read more

Update media library files after upload via FTP

Avoid direct upload WordPress doesn’t scan upload directory for new files, instead use WordPress media uploader to add files WordPress automatically creates folder and store them accordingly. But you can use this plugin to import those uploaded files into WordPress, it should help you https://wordpress.org/plugins/add-from-server/

Prevent WordPress from generating medium_large 768px size of image uploads?

To remove the medium_large image size you can try to remove it with the intermediate_image_sizes filter: add_filter( ‘intermediate_image_sizes’, function( $sizes ) { return array_filter( $sizes, function( $val ) { return ‘medium_large’ !== $val; // Filter out ‘medium_large’ } ); } ); Not sure if you’re trying to remove all the intermediate sizes, but then you … Read more

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