wpseek.com
Uma área de pesquisa sobre o WordPress para devs e autores do tema
pre_attachment_url_to_postid › Hooks de Filtros WordPress
Desde6.7.0
Obsoleton/a
› apply_filters( 'pre_attachment_url_to_postid', null, $url )
| Parâmetros: (2) |
|
| Definido em: |
|
| Codex: |
Filters the attachment ID to allow short-circuit the function.
Allows plugins to short-circuit attachment ID lookups. Plugins making use of this function should return: - 0 (integer) to indicate the attachment is not found, - attachment ID (integer) to indicate the attachment ID found, - null to indicate WordPress should proceed with the lookup. Warning: The post ID may be null or zero, both of which cast to a boolean false. For information about casting to booleans see the {@link https://www.php.net/manual/en/language.types.boolean.php PHP documentation}. Use the === operator for testing the post ID when developing filters using this hook.Funções relacionadas: attachment_url_to_postid, wp_get_attachment_url, get_attachment_fields_to_edit, get_attachment_link, get_attachment_taxonomies, image_attachment_fields_to_edit