How to allow .bin files upload?

This code would allow you to upload .bin files. /** * Allow upload bin mime type */ add_filter( ‘upload_mimes’, ‘wpse_287673_allow_upload_bin_mime_type’, 1, 1 ); function wpse_287673_allow_upload_bin_mime_type( $mime_types ) { $mime_types[‘bin’] = ‘application/octet-stream’; return $mime_types; } This code is tested and is working for me, but it might be some differences for you since we are allowing … Read more

How to manage a music library in wordpress

You can register a custom post type called songs or albums. Learn more about custom post type registration here: https://codex.wordpress.org/Function_Reference/register_post_type More info on Post Type: https://codex.wordpress.org/Post_Types You can register custom taxonomies in WordPress as well. Learn about taxonomies here: https://codex.wordpress.org/Taxonomies Learn about taxonomy registration here: https://codex.wordpress.org/Function_Reference/register_taxonomy You can then associate songs or albums with an … Read more

How to change the text of the “You are about to permanently delete these items…” alert message when deleting media from the media library?

You could use the gettext filter. See the examples here https://codex.wordpress.org/Plugin_API/Filter_Reference/gettext. In your filter you will add code to check IF it’s the exact text you want to change then if the users meta value is what you are looking for the return the revised text. Else return the passed text unchanged.

How to fix broken media library?

Usually, the determination of the culprit involves one or more of the following: 1) Try one of the Twenty themes. 2) Disable all plugins (quickly via FTP renaming the plugins folder). If a theme, contact the theme support. If a plugin, add plugins one at a time (create a new plugins folder,them move plugin folders … Read more

Auto delete pictures in media library by age

You can use these functions to find and delete image attachments that are 3 days old since their date of creation: // Delete attachments (images) that are {n} days old. function auto_delete_old_image_atts() { // How many days old. $days = 3; // TRUE = bypasses the trash and force deletion. $force_delete = true; // Get … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)