export_wp_filename
Filter HookDescription
Filters the export filename.Hook Information
File Location |
wp-admin/includes/export.php
View on GitHub
|
Hook Type | Filter |
Line Number | 94 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$wp_filename
|
The name of the file for download. |
string
|
$sitename
|
The site name. |
string
|
$date
|
Today's date, formatted. |
Usage Examples
Basic Usage
<?php
// Hook into export_wp_filename
add_filter('export_wp_filename', 'my_custom_filter', 10, 3);
function my_custom_filter($wp_filename, $sitename, $date) {
// Your custom filtering logic here
return $wp_filename;
}
Source Code Context
wp-admin/includes/export.php:94
- How this hook is used in WordPress core
<?php
89 *
90 * @param string $wp_filename The name of the file for download.
91 * @param string $sitename The site name.
92 * @param string $date Today's date, formatted.
93 */
94 $filename = apply_filters( 'export_wp_filename', $wp_filename, $sitename, $date );
95
96 header( 'Content-Description: File Transfer' );
97 header( 'Content-Disposition: attachment; filename=' . $filename );
98 header( 'Content-Type: text/xml; charset=' . get_option( 'blog_charset' ), true );
99
PHP Documentation
<?php
/**
* Filters the export filename.
*
* @since 4.4.0
*
* @param string $wp_filename The name of the file for download.
* @param string $sitename The site name.
* @param string $date Today's date, formatted.
*/
Quick Info
- Hook Type: Filter
- Parameters: 3
- File: wp-admin/includes/export.php
Related Hooks
Related hooks will be displayed here in future updates.