wxr_export_skip_commentmeta хук-фильтрWP 4.0.0

Filters whether to selectively skip comment 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_commentmeta', 'wp_kama_wxr_export_skip_commentmeta_filter', 10, 3 );

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

	// filter...
	return $skip;
}
$skip(true|false)
Whether to skip the current comment meta.
По умолчанию: false
$meta_key(строка)
Current meta key.
$meta(объект)
Current meta object.

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

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

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

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

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

Использование не найдено.