Allowing .rfa Files In Media Upload [duplicate]
Apologies, was able to figure it out. It is application/CDFV2 as of WP 5.5.3
Apologies, was able to figure it out. It is application/CDFV2 as of WP 5.5.3
If you want to delete files from the Media Library, then you need to delete both the database entry (attachment post) and the actual file (files to be more precise as there might be one or more scaled versions of the same image file depending on your setup). You can do these both actions for … Read more
custom_uploader is actually an instance of wp.media() and not an HTML element, so the variable does not have a onselect property, but it does have a on() method/function which you can use to listen to the select event which is triggered after an attachment is selected. Secondly, an HTML element does not have a innerHTML() … Read more
The first thing you will need to do is be able to load up the WordPress media manager on the page you are using. This means you need to either load the core of WordPress or just call the media method from WP. The following code will load the WordPress core and que all of … Read more
Yes, pretty much. Yes. When you upload an image to WordPress a few things happen. These might not be in the precise order, I’m going off memory, but it shouldn’t change much: It makes sure the image has a unique filename and puts it in the wp-content/uploads directory. It creates an attachment post for the … Read more
I managed to solve this after being pointed in the right direction. In my case, I filtered wp_get_attachment_image_attributes to change all the paths in the admin for attachments at once. In my case, I am using descriptive suffixes on all my image files (i.e. _featured etc) so modifying them was easy using strtr which I … Read more
You don’t have to create a new function each time you add a new admin column. You can use below functions to show both your media data in separate admin columns. function column_id($columns) { $columns[‘media_alt’] = __(‘Alt’); $columns[‘media_dimensions’] = __(‘Dimensions’); return $columns; } add_filter( ‘manage_media_columns’, ‘column_id’ ); function column_id_row($columnName, $columnID){ if ( $columnName == ‘media_alt’) … Read more
I haven’t worked this way myself, but a possible solution would be: Upload all of the assets via FTP / SSH / … to the webserver. Import the assets e.g. via Add From Server plugin. Doing a quick web search, a lot of tutorials (maybe outdated?) still refer to this plugin for this specific task. … Read more
Apparently the problem was that the id did not start with a letter and this caused all kinds of problems. Adding an incrementing number after the string fixed the issue: <td><?php wp_editor( wp_kses_post( $content ), ‘id’ .$step, $settings ); ?></td> The credits for the answer should go to @Sally CJ. Thank you!!
I believe you can just check if the post status is trash, and if so, don’t run the rest of your code. E.g. (PS: I intentionally used strict comparison, i.e. using === as in $pagenow === ‘post.php’) function post_extra_save( $post_id, $post ) { global $pagenow; if ($pagenow === ‘post.php’ && ‘trash’ !== $post->post_status) { … … Read more