WordPress Media URLs?
WordPress Media URLs?
WordPress Media URLs?
i deactivated all the plugins and reactivated them back again, just to find out than one of those was currupted / outdated. now everything works fine again.
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
Solved, thanks to this post by Mike Jolley (see ‘Passing data to the uploader script’).
Insert into post or
You shouldn’t have to reload anything you will need to hook this fucntion into a hook so it’s actually run something like this should do it: do_action( ‘init’, ‘toolbox_setup’ ); http://codex.wordpress.org/Function_Reference/do_action
Adding filter: add_filter( ‘upload_dir’, ‘change_upload_dir’, 10, 1 ); Function content: function change_upload_dir($param) { // Check for REFER $actual_page = $_SERVER[‘HTTP_REFERER’]; parse_str( parse_url($actual_page, PHP_URL_QUERY), $query_array ); if ( strpos($actual_page, ‘plugin_name.php’) ) { $mydir=”/customdir”; $param[‘path’] = $param[‘basedir’] . $mydir; } return $param; } Hope this will help Other ideas, based not on HTTP_REFERER, are appreciated 🙂
The most of the images don’t appear, although URLs are correct
Used Duplicator to transfer a site. Now my media uploads aren’t working
Files larger than 500 kilobytes are not allowed