Available since: 2.8
searchwp_mimes_{$mime_type_group}
View Parameters »Note: Use of this hook will require a manual reindex
As part of its ability to index many documents uploaded to the WordPress Media library, SearchWP will process the MIME
type of files as it processes them.
The default list of supported MIME types matches that of WordPress, but it has been grouped into the following groups:
pdf
text
richtext
msoffice_word
msoffice_excel
msoffice_powerpoint
Within each group are the explicit MIME types for that group. If you need to customize the MIME types within a group you can do so with this hook:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Add Markdown MIME type support in SearchWP. | |
add_filter( 'searchwp_mimes_text', function( $mimes ) { | |
$mimes[] = 'text/markdown'; | |
return $mimes; | |
} ); |
Parameters
Parameter | Type | Description |
---|---|---|
$mimes |
Array |
The MIME types for this group |