Custom Link In WordPress Media “Attachment Details” Upload Screen

A hacky way to do it is to do a string replace on the tmpl-attachment-details template: // See wp_print_media_templates() in “wp-includes/media-template.php” function wpse157297_print_media_templates() { $my_link = ‘<a class=”my_link-attachment” href=”https://wordpress.stackexchange.com/questions/157297/my_link.php?url={{ data.url }}” target=”_blank”>’ . __( ‘My Link’ ) . ‘</a>’; $nonimage=”<# if ( “image” !== data.type && ! data.uploading ) { #>” . $my_link . ‘<# … Read more

How do I secure a subdomain using UCC SSL?

The UCC SSL Certificate is used to secure multiple domains like www.example.com, www. example.net, www.example.co.uk etc. and if you want to secure your subdomains like shop.example.com, distributors.example.com and careers.example.com then you should try Unified Communication Wildcard Certificate instead of UCC SSL Certificate because it protects both multi-domains as well as subdomains.

Create input select image URL?

By Javascript you can pop-up the media and on select you can update the image URL to the textbox. Below is the code. var custom_uploader; jQuery(‘<Should-be-a-button-selector>’).click(function(e) { e.preventDefault(); //If the uploader object has already been created, reopen the dialog if (custom_uploader) { custom_uploader.open(); return; } //Extend the wp.media object custom_uploader = wp.media.frames.file_frame = wp.media({ title: … Read more

Make custom thumbnail size image in media_sideload_image function

You can do something like this in your functions file. add_image_size( ‘category-thumb’, 300 ); // 300 pixels wide (and unlimited height) add_image_size( ‘homepage-thumb’, 220, 180, true ); // (cropped) Then you can do something like this to give your custom size a certain name in the Admin area. add_filter( ‘image_size_names_choose’, ‘my_custom_sizes’ ); function my_custom_sizes( $sizes … Read more

How to associate media with a post?

If you want to give the users some course material to download, you could simply “Add Media” or “Upload ZIP” into the “Course” content section. Also if you want only people who start a “Course” to have the course material then you could place the Course material files in the content of the “Unit” post … Read more

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