Filter hook 'wxr_export_skip_termmeta'

in WP Core File wp-admin/includes/export.php at line 389

View Source

wxr_export_skip_termmeta

Filter Hook
Description
Filters whether to selectively skip term meta used for WXR exports. Returning a truthy value from the filter will skip the current meta object from being exported.

Hook Information

File Location wp-admin/includes/export.php View on GitHub
Hook Type Filter
Line Number 389

Hook Parameters

Type Name Description
bool $skip Whether to skip the current piece of term meta. Default false.
string $meta_key Current meta key.
object $meta Current meta object.

Usage Examples

Basic Usage
<?php
// Hook into wxr_export_skip_termmeta
add_filter('wxr_export_skip_termmeta', 'my_custom_filter', 10, 3);

function my_custom_filter($skip, $meta_key, $meta) {
    // Your custom filtering logic here
    return $skip;
}

Source Code Context

wp-admin/includes/export.php:389 - How this hook is used in WordPress core
<?php
 384  			 *
 385  			 * @param bool   $skip     Whether to skip the current piece of term meta. Default false.
 386  			 * @param string $meta_key Current meta key.
 387  			 * @param object $meta     Current meta object.
 388  			 */
 389  			if ( ! apply_filters( 'wxr_export_skip_termmeta', false, $meta->meta_key, $meta ) ) {
 390  				printf( "\t\t<wp:termmeta>\n\t\t\t<wp:meta_key>%s</wp:meta_key>\n\t\t\t<wp:meta_value>%s</wp:meta_value>\n\t\t</wp:termmeta>\n", wxr_cdata( $meta->meta_key ), wxr_cdata( $meta->meta_value ) );
 391  			}
 392  		}
 393  	}
 394  

PHP Documentation

<?php
/**
			 * Filters whether to selectively skip term meta used for WXR exports.
			 *
			 * Returning a truthy value from the filter will skip the current meta
			 * object from being exported.
			 *
			 * @since 4.6.0
			 *
			 * @param bool   $skip     Whether to skip the current piece of term meta. Default false.
			 * @param string $meta_key Current meta key.
			 * @param object $meta     Current meta object.
			 */
Quick Info
  • Hook Type: Filter
  • Parameters: 3
  • File: wp-admin/includes/export.php
Related Hooks

Related hooks will be displayed here in future updates.