Changing titles in Uploader for “Posts”

you have the “media_view_strings” filter for this : add_filter(“media_view_strings”, function ($strings, $post) { $strings[“insertMediaTitle”] = “Upload Content”; $strings[“uploadFilesTitle”] = “Upload”; $strings[“mediaLibraryTitle”] = “Your Content”; return $strings; }, 10, 2);

wp_enqueue_media() and upload_mimes problem

I think, first of all you should move following filter outside the function and then check – add_filter( ‘upload_mimes’, array( ‘JBLAB_Utils’, ‘images_upload_mimes’ ) ); Even if it does not work, try changing the priority of the filter.

Upload multiple image with media_handle_upload with multiple file field [duplicate]

You can try adding the input file field once and using then using jQuery to add more fields when clicking add more. Here are the steps Register your setting using register_setting function Create Menu using add_menu_page. This also requires a calback function Add the thickbox and media-upload script using wp_enqueue_script and wp_enqueue_style Use the call … Read more

Issue with wp_handle_upload

In order to change upload size limit two options have to be changed in php.ini configuration file – upload_max_filesize and post_max_size. These options cannot be changed at runtime so you will need to have access to php.ini in order to modify them. Example: upload_max_filesize = 20M post_max_size = 22M

WordPress İmages Upload & Delete Error

opendir operates on directories on a filesystem, not HTTP URIs. While some HTTP URIs return directory listings (the one you are using doesn’t, it is a 404 error), those listings as HTML documents generated by the webserver and are not actual directories. So please change value of $directory variable. For Example: Current value in $directory … Read more

Custom upload folder

Use something like this function, you need to set condition for if(user==admin) and then if(post-type==’some-post-type’): function wpse_16722_type_upload_dir( $args ) { // Get the current post_id $id = ( isset( $_REQUEST[‘post_id’] ) ? $_REQUEST[‘post_id’] : ” ); if( $id ) { // Set the new path depends on current post_type $newdir=”https://wordpress.stackexchange.com/” . get_post_type( $id ); $args[‘path’] … Read more