WP HOOKS
filtrdynamicznyod 4.9.8

get_object_subtype_{$object_type}

Args 2Plik wp-includes/meta.php

Opis — z kodu źródłowego

Filters the object subtype identifier.

The dynamic portion of the hook name, $object_type, refers to the meta object type (blog, post, comment, term, user, or any other type with an associated meta table). Possible hook names include:

  • get_object_subtype_blog
  • get_object_subtype_post
  • get_object_subtype_comment
  • get_object_subtype_term
  • get_object_subtype_user

Hook dynamiczny — możliwe nazwy

get_object_subtype_blogget_object_subtype_commentget_object_subtype_postget_object_subtype_termget_object_subtype_user

Parametry

ParametrTypOpis
$object_subtypestringObject subtype or empty string to override.
$object_idintID of the object to get the subtype for.

Wywołanie

Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'get_object_subtype_{$object_type}', 'twoja_funkcja', 10, 2 );

function twoja_funkcja($param_1, $param_2) {
	// Twój kod
}