wxr_export_skip_postmeta хук-фильтрWP 3.3.0

Filters whether to selectively skip post meta used for WXR exports.

Returning a truthy value from the filter will skip the current meta object from being exported.


add_filter( 'wxr_export_skip_postmeta', 'wp_kama_wxr_export_skip_postmeta_filter', 10, 3 );

 * Function for `wxr_export_skip_postmeta` filter-hook.
 * @param bool   $skip     Whether to skip the current post meta.
 * @param string $meta_key Current meta key.
 * @param object $meta     Current meta object.
 * @return bool
function wp_kama_wxr_export_skip_postmeta_filter( $skip, $meta_key, $meta ){

	// filter...
	return $skip;
Whether to skip the current post meta.
По умолчанию: false
Current meta key.
Current meta object.

Список изменений

С версии 3.3.0 Введена.

Где вызывается хук

wp-admin/includes/export.php 620
if ( apply_filters( 'wxr_export_skip_postmeta', false, $meta->meta_key, $meta ) ) {

Где используется хук в WordPress

wp-admin/includes/export.php 441
add_filter( 'wxr_export_skip_postmeta', 'wxr_filter_postmeta', 10, 2 );