Can you open a media frame to sellect an attachment to associate with another attachment you are editing on an existing media frame?

I figured this out. You CAN open another frame Here is my code: jQuery(document).ready(function ($) { var frame; frame = wp.media(); $(document).on(‘click’, ‘.compat-field-add_attachment input’, function (e) { get_attachment(frame); }); }); function get_attachment(frame) { // Create the media frame. frame = wp.media.frames.meta_image_frame = wp.media({ // Tell the modal to show only images. library: { type: ‘image’ … Read more

wp_get_attachment_image with custom size not rendering possible 2x srcset image

It appears the problem was that image size variants were being capped by the max_srcset_image_width property that can be raised with the following: add_filter( ‘max_srcset_image_width’, ‘setSrcsetMaximumWidth’, 10, 2 ); function setSrcsetMaximumWidth( $max_srcset_image_width, $sizes_array ) { return 3200; } I was never aware of this before and have no idea why I never ran into this.

wp_mail doen’t send mails with attachment

Try code below. <?php $attachments = array(); array_push($attachments, WP_CONTENT_DIR . ‘/uploads/my-first-attachment.docx’ ); array_push($attachments, WP_CONTENT_DIR . ‘/uploads/my-second-attachment.zip’ ); $to=”[email protected]”; $subject=”Online: multiple attachment demo through wp_mail of wordpress”; $message=”This is testing”; $headers=”From: NAPSWI online <[email protected]>”; get_header(); if( wp_mail( $to, $subject, $message, $headers, $attachments) ) { // the message was sent… echo ‘The test message was sent. Check … Read more

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