move_uploaded_file() not working on wordpress front end
move_uploaded_file() not working on wordpress front end
move_uploaded_file() not working on wordpress front end
You just create a folder called videos/and any subfolders/ inside your cpanel public_html directory then move the video from from the wordpress upload folder to the newly created videos folder or any sub directory you want to put it inside the videos folder. and thats it
If the import function you’re using uses wp_insert_post() (used also by wp_insert_attachment()) to add the new images (attachment posts) to your site, then you could perhaps use the wp_insert_attachment_data( array $data, array $postarr ) filter, which is defined inside wp_insert_post(). According to the docs it, Filters attachment post data before it is updated in or … Read more
I have added this code to enable everyone to add files function allow_own_attachments( $user_caps, $req_caps, $args, $UserObj ) { if ( empty($args[2]) ) { return $user_caps; // nothing to check } $post = get_post( $args[2] ); // post_id was passed here if (is_object($post)){ //check if $post is an object. If it is’t checked the code … Read more
wp_generate_attachment_metadata is creating an empty array
Yes, you was right, problem was in cron from root user. Dont know why, but folders creating even if nothing upload there, only if smth use wp scripts
How to extend an existing (Gutenberg) block
How to upload media to a specific folder without a plugin in WordPress?
adding images column to admin edit columns not working for SVG
How to hide some specific attachments using post meta from media library