WP HOOKS
filtrod 2.8.0

media_row_actions

Args 3Plik wp-admin/includes/class-wp-media-list-table.phpDokumentacja WP ↗

Opis — z kodu źródłowego

Filters the action links for each attachment in the Media list table.

Parametry

ParametrTypOpis
$actionsstring[]An array of action links for each attachment. Includes 'Edit', 'Delete Permanently', 'View', 'Copy URL' and 'Download file'.
$post\WP_PostWP_Post object for the current attachment.
$detachedboolWhether the list table contains media not attached to any posts. Default true.

Wywołanie

Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'media_row_actions', 'twoja_funkcja', 10, 3 );

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

Popularne w tej kategorii