WP HOOKS
filtrdynamicznyod 2.3.0

edit_{$field}

Args 2Plik wp-includes/post.php

Opis — z kodu źródłowego

Filters the value of a specific post field to edit.

The dynamic portion of the hook name, $field, refers to the post field name. Possible filter names include:

  • edit_post_author
  • edit_post_date
  • edit_post_date_gmt
  • edit_post_content
  • edit_post_title
  • edit_post_excerpt
  • edit_post_status
  • edit_post_password
  • edit_post_name
  • edit_post_modified
  • edit_post_modified_gmt
  • edit_post_content_filtered
  • edit_post_parent
  • edit_post_type
  • edit_post_mime_type

Parametry

ParametrTypOpis
$valuemixedValue of the post field.
$post_idintPost ID.

Wywołanie

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

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

Popularne w tej kategorii