Removing delete permanently button in uploading files media

This might do the trick! css: .media-sidebar .details .edit-attachment { display: none; } .media-sidebar .details .delete-attachment { display: none; } And this: foreach( array( ‘post.php’, ‘post-new.php’ ) as $hook ) add_action( “admin_print_styles-$hook”, ‘admin_styles_so_25894288’); function admin_styles_so_25894288() { global $typenow; if( ‘post’ !== $typenow ) return; ?> <style> .media-sidebar .details .delete-attachment { display: block; } .media-sidebar .details … Read more

WP media attachment location vs permalink

I think a possible solution could be following codesnippet from Mark Kaplun. To solve issues with this you could remove the http part and WordPress will/should use https instead. Because the rest of your website is working correctly I assume that further settings are correct and will do their job as wished. add_filter(‘the_content’,’wpse_217012′,1000,1); // remove … Read more

Attachment file display link text

I’ve changed the button to: <a class=”button big brand-1″ a href=”https://wordpress.stackexchange.com/questions/221483/<?php echo wp_get_attachment_url($attachment->ID, false); ?>”> <?php echo $default_strings[‘price_text’][ $lang ]; ?> </a> a href is added around the wp_get_attachment_url rather than using the_attachment_link which contains the whole link.

Using $_FILES variable into the same function for uploading images and files

I did override something. I did not validation and only build structured to validation and upload function. You can validate file as you needed. if ($_FILES) { // Get the upload attachment files $images = $_FILES[‘moreimages’]; $errors=””; foreach ($images[‘name’] as $key => $value) { if ($images[‘name’][$key]) { $image = array( ‘name’ => $images[‘name’][$key], ‘type’ => … Read more

wp_mail doen’t send mails whit 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)