post_mime_types
Filter HookDescription
Filters the default list of post mime types.Hook Information
File Location |
wp-includes/post.php
View on GitHub
|
Hook Type | Filter |
Line Number | 3567 |
Hook Parameters
Type | Name | Description |
---|---|---|
array
|
$post_mime_types
|
Default list of post mime types. |
Usage Examples
Basic Usage
<?php
// Hook into post_mime_types
add_filter('post_mime_types', 'my_custom_filter', 10, 1);
function my_custom_filter($post_mime_types) {
// Your custom filtering logic here
return $post_mime_types;
}
Source Code Context
wp-includes/post.php:3567
- How this hook is used in WordPress core
<?php
3562 *
3563 * @since 2.5.0
3564 *
3565 * @param array $post_mime_types Default list of post mime types.
3566 */
3567 return apply_filters( 'post_mime_types', $post_mime_types );
3568 }
3569
3570 /**
3571 * Checks a MIME-Type against a list.
3572 *
PHP Documentation
<?php
/**
* Filters the default list of post mime types.
*
* @since 2.5.0
*
* @param array $post_mime_types Default list of post mime types.
*/
Quick Info
- Hook Type: Filter
- Parameters: 1
- File: wp-includes/post.php
Related Hooks
Related hooks will be displayed here in future updates.