Tag Info

New answers tagged

0

This is how the plupload upoader is loaded on Media > Add New do_action( 'pre-plupload-upload-ui' ); // all the html output for plupload's use do_action( 'post-plupload-upload-ui' ); If it was this instead: ob_start(); // all the html output for plupload's use ob_end_clean(); Then no UI, no plupload: add_action( 'pre-plupload-upload-ui', ...


1

Why do people use CMS? they use it to avoid having to handle HTML structure, JS and CSS on a page by page base and focus on the content. But if you do want to handle them that way because it save you time, then maybe wordpress is not the best solution for you. Wordpress has to know what is the content of the pages to be able to function properly and image ...


0

Can't test at the moment but I'd try rewriting the date to variable code from: $time = current_time( 'mysql' ); $y = substr( $time, 0, 4 ); $m = substr( $time, 5, 2 ); $subdirectory = "/$y/$m"; To: $y = date('Y'); $m = date('m'); $subdirectory = "/" . $y . "/" . $m;


1

I'll give you a partial answer. In your first function you may use ucwords() PHP function: $alttitle = ucwords( str_replace( '-', ' ', $alt ) ); Second task is more complicated. I don't have a ready solution for you but the direction should be to extract attributes and values from HTML (playing with preg_match()), store them in variables and concatenate ...


0

Of course you can do as per some other people gave you to go through the Database and fix it. But it can also break it if not done properly. Before going into Database mode, I would suggest one thing that happened to me. First make sure that you go in the settings of WordPress and make sure that the URLs are good... EVEN if they are good SAVE SETTINGS once ...


0

You must update the URLs in the database. Here is a tool that you can use https://interconnectit.com/products/search-and-replace-for-wordpress-databases/ You can download it, unzip and upload it to your server where you have to replace URLs and then you can run it. It's pretty simple. You have to enter old and new base URLs. You can also perform a dry run, ...


2

You will want to run a find-and-replace script across the database to update all URLs to reflect the new domain. Just because you change the WordPress settings doesn't mean the content stored in the database has been updated with the new domain! I've had good luck with the Velvet Blues Update URLs plugin but you can also do this type of find and replace ...


0

I've used the code linked to below for just such a requirement. https://gist.github.com/seedprod/1367237 Doing this, you don't create a new image size every time you upload a file via the Media Editor, but only when necessary. So essentially, you just go in and add the call to resize the image "on the fly" in your templates where needed. So you'd add that ...


0

If people can guess the file download urls then they will still be able to get to them (e.g. if someone who has access shares the download urls out). To get around that kind of problem you typically need to set up a file handler script that will grab them from a protected directory that prohibits direct content downloading and serve them up. That being ...


0

I solved the issue as well. With reference to Josh Rodgers' answer, I had to log into my server's CPANEL, under "Software and Services", depending on how your server is set up, there is "Select PHP Version", then tick the "gd" box, save, and refresh your wordpress post or media page, then retry the upload. If you are looking at your wordpress via FTP, you ...


0

You would need to regenerate your thumbnails, to fit the new theme settings appropriately. The images, when uploaded previously while using the old theme, were sized specifically to that theme, then when you changed themes, which may have a different size that it uses for those same placements, has not had the chance to run their sizing functions ...


0

There a couple of different solutions depending on the cause of the problem. In your case it seems that is not a upload problem. I would rather try adding the following plugin <?php /* Plugin Name: Default to GD Plugin URI: http://wordpress.org/extend/plugins/default-to-gd Description: Sets GD as default WP_Image_Editor class. Author: Mike Schroder ...


2

Thanks @kaiser but not need to go through your solution I found a easy one and I'll share here for newbie likes me. If you're working on a WP Network site then the steps are: At the top, hover over My Sites and then click Network Admin. At the left, hover over Settings and then click Network Settings. Scroll to the bottom of the page and change the Max ...


1

Here's something I wrote because my clients were using very high quality pngs, when they could be more lossy jpgs for web. Note this still preserves the original image, only changes the thumbnails. Add this to your functions.php <?php //Force PNG Thumbnails into JPGs add_filter('wp_generate_attachment_metadata','force_png_to_jpg'); function ...


1

There's a filter named 'upload_size_limit' where you should be able to change the value. Just add a small mu-plugin for that job: <?php /** Plugin Name: (WPSE) #177620 Alter Upload Size Limit */ add_filter( 'upload_size_limit', function( $limit = 0, $u_bytes = 0, $p_bytes = 0 ) { return ( in_array( get_current_screen()->base, array( /* Add ...


0

I managed to solve it. The problem was in using a custom post-type with Metabox.php / MediaAccess.php (both from WPAlchemy class) Supposedly you can use custom post-types with WPAlchemy since, when instantiating a WPAlchemy_MetaBox object you can pass some optional parameters to enable that kind of costumization. Like this: $mb = $my_custom_metabox = new ...


0

The reason was the post_id key simply missing from the upload query. It was there for the normal posts, but was being omitted in the custom-post-type uploads. No idea why. The issue had something to do with the javascript uploader settings. So I've asked another question regarding the pluploader here and have managed to find the solution myself. I do not ...


1

Ok this seems to have fixed it: function wp_plupload_include_attachment_id( $params ) { global $post_ID; if ( isset( $post_ID ) ) $params['post_id'] = (int) $post_ID; return $params; } add_filter( 'plupload_default_params', 'wp_plupload_include_attachment_id' ); This preprocesses the uploader $params and makes sure the post_id ...


1

I've solved it: var frame = wp.media({ button : { text : 'Wählen' }, frame: 'post'/*, state : 'insert-image',//gallery-edit states : [ new insertImage() ], library : { type : 'image'}*/ });



Top 50 recent answers are included