SearchWP

This Documentation is for SearchWP Version 3

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:

<?php
// Add Markdown MIME type support in SearchWP.
add_filter( 'searchwp_mimes_text', function( $mimes ) {
$mimes[] = 'text/markdown';
return $mimes;
} );
view raw functions.php hosted with ❤ by GitHub

Parameters

Parameter Type Description
$mimes Array

The MIME types for this group