Tag Info

New answers tagged

0

If you moved your page from one host to another - check if your Upload path is correct to your new host (and not a leftover from previous host) Navigate to: http://YOURDOMAIN/wp-admin/options.php Find the field for "upload_path" and cross check.


0

First, I assume the problem isn't as much 1M files, but your server unable to handle it? Logically it worked elsewhere, right? My opinion is that presenting is as a “problem” to the client might be a little one sided. It's in realm of technical possibility, but it won't be a smooth process. WP stores image sizes information as serialized PHP data in ...


2

I think what you need is (function(){ var featuredImage = wp.media.featuredImage.frame(); featuredImage.on('select', function(){ var attachment = featuredImage.state().get('selection').first().toJSON(); console.log(attachment); }); })(); The attachment object should have height and width properties.


1

That's the pre-3.5 media interface so I think you must be on 3.4.x? Anyway the first way should work as long as you're using the browser (non-multifile) upload... try changing add_filter( 'flash_uploader', '_force_html_uploader' ); to add_action( 'pre-html-upload-ui', '_force_html_uploader' ); and the "js/upload.js" (note the subdirectory - it's ...


0

I've struggled with the same thing pretty much always. There's a plugin called File Un-Attach, and a Unattach and Re-attach Media Attachments. See if they work for you. There's also 5 year old Trac ticket on this, but it seems to be under conversation still.


1

I presume you've fixed this already but (in a blatant attempt to snaffle the bounty and) as mentioned in the comments there's a simple fix, in your myplugin_meta_box_callback() function change the line $mime_types = array( 'application/pdf' ); to $mime_types = 'application/pdf'; The library.type option to wp.media expects a string (which can ...


0

The correct way to do this is to: $('#upload-background-image-one').click(function() { formfield = $('#background-size-one').attr('name'); tb_show('', 'media-upload.php?type=image&TB_iframe=true'); // Take the selected image and insert only the src path into the text field. window.send_to_editor = function(html) { ...


0

You can hard-code this change for all your sites like this: 1. Create a new php file with a path like this: wp-content/mu-plugins/no_date_assets.php If the wp-content/mu-plugins folder does not already exist, you will have to manually create it. 2. In that file paste the following: <?php $uploads_use_yearmonth_folders = get_option( ...



Top 50 recent answers are included