WP HOOKS

Wpisy

Hooki związane z wpisami, stronami i niestandardowymi typami treści.

44 akcji107 filtrówrazem 151

Popularne w tej kategorii

Odpala się po dodaniu załącznika — np. po przesłaniu pliku do biblioteki mediów.

Dodaje klasy do znacznika <body> na froncie witryny.

Odpala się po usunięciu wpisu z bazy. Używany do sprzątania powiązanych danych — załączników, plików, wpisów w zewnętrznych systemach.

Dodaje klasy do znacznika <article> w pętli.

Modyfikuje HTML miniaturki wpisu renderowanej przez the_post_thumbnail().

Modyfikuje argumenty rejestracji typu treści — pozwala zmieniać typy rejestrowane przez inne wtyczki.

Uruchamiany po zarejestrowaniu typu treści. Przydatny do modyfikacji typów rejestrowanych przez inne wtyczki.

Uruchamiany po zapisaniu wpisu do bazy danych. Pozwala zapisać metadane, zareagować na publikację itp. Dostępne warianty: save_post_{$post_type} i save_post_{$post_id}.

Odmiana hooka save_post ograniczona do konkretnego typu treści — np. save_post_book działa tylko dla wpisów typu book.

Filtruje treść wpisu przy wyświetlaniu. Wtyczki używają go do doklejania treści, boksów społecznościowych i notek.

Filtruje zajawkę wpisu przy wyświetlaniu.

Filtruje tytuł wpisu przy wyświetlaniu w pętli.

Uruchamiany przy każdej zmianie statusu wpisu. Otrzymuje nowy status, stary status i obiekt wpisu — świetny do powiadomień o publikacji.

Uruchamiany po wstawieniu lub zaktualizowaniu wpisu przez wp_insert_post(). Trzeci parametr $update informuje, czy to aktualizacja.

Filtruje dane wpisu tuż przed zapisem do bazy danych.

Wszystkie hooki

_wp_post_revision_fieldsfiltr

Filters the list of fields saved in post revisions.

_wp_put_post_revisionakcja

Fires once a revision has been saved.

_wp_relative_upload_pathfiltr

Filters the relative path to an uploaded file.

{$field_no_prefix}_edit_prefiltrdynamiczny

Filters the value of a specific post field to edit.

{$field_no_prefix}_save_prefiltrdynamiczny

Filters the value of a specific field before saving.

{$field}filtrdynamiczny

Filters the value of a specific post field for display.

{$field}_prefiltrdynamiczny

Filters the value of a specific post field before saving.

{$new_status}_{$post->post_type}akcjadynamiczny

Fires when a post is transitioned from one status to another.

{$old_status}_to_{$new_status}akcjadynamiczny

Fires when a post is transitioned from one status to another.

add_attachmentakcja

Fires once an attachment has been added.

add_pingfiltr

Filters the new ping URL to add for the given post.

add_trashed_suffix_to_trashed_postsfiltr

Filters whether or not to add a `__trashed` suffix to trashed posts that match the name of the updated post.

after_delete_postakcja

Fires after a post is deleted, at the conclusion of wp_delete_post().

attachment_updatedakcja

Fires once an existing attachment has been updated.

before_delete_postakcja

Fires before a post is deleted, at the start of wp_delete_post().

begin_fetch_post_thumbnail_htmlakcja

Fires before fetching the post thumbnail HTML.

body_classfiltr

Filters the list of CSS body class names for the current post or page.

clean_attachment_cacheakcja

Fires after the given attachment's cache is cleaned.

clean_page_cacheakcja

Fires immediately after the given page's cache is cleaned.

clean_post_cacheakcja

Fires immediately after the given post's cache is cleaned.

default_category_post_typesfiltr

Filters post types (in addition to 'post') that require a default category.

delete_attachmentakcja

Fires before an attachment is deleted, at the start of wp_delete_attachment().

delete_postakcja

Fires immediately before a post is deleted from the database.

delete_post_{$post->post_type}akcjadynamiczny

Fires immediately before a post is deleted from the database.

deleted_postakcja

Fires immediately after a post is deleted from the database.

deleted_post_{$post->post_type}akcjadynamiczny

Fires immediately after a post is deleted from the database.

edit_{$field}filtrdynamiczny

Filters the value of a specific post field to edit.

edit_attachmentakcja

Fires once an existing attachment has been updated.

edit_postakcja

Fires once an existing post has been updated.

edit_post_{$post->post_type}akcjadynamiczny

Fires once an existing post has been updated.

end_fetch_post_thumbnail_htmlakcja

Fires after fetching the post thumbnail HTML.

get_attached_filefiltr

Filters the attached file based on the given ID.

get_bookmarksfiltr

Filters the returned list of bookmarks.

get_enclosedfiltr

Filters the list of enclosures already enclosed for the given post.

get_lastpostdatefiltr

Filters the most recent time that a post on the site was published.

get_lastpostmodifiedfiltr

Filters the most recent time that a post on the site was modified.

get_page_urifiltr

Filters the URI for a page.

get_pagesfiltr

Filters the retrieved list of pages.

get_pages_query_argsfiltr

Filters query arguments passed to WP_Query in get_pages.

get_post_statusfiltr

Filters the post status.

get_pungfiltr

Filters the list of already-pinged URLs for the given post.

get_the_excerptfiltr

Filters the retrieved post excerpt.

get_the_guidfiltr

Filters the Global Unique Identifier (guid) of the post.

get_to_pingfiltr

Filters the list of URLs yet to ping for the given post.

has_post_thumbnailfiltr

Filters whether a post has a post thumbnail.

icon_dirfiltr

Filters the icon directory path.

icon_dir_urifiltr

Filters the icon directory URI.

icon_dirsfiltr

Filters the array of icon directory URIs.

is_post_embeddablefiltr

Filter whether a post is embeddable.

is_post_status_viewablefiltr

Filters whether a post status is considered "viewable".

is_post_type_viewablefiltr

Filters whether a post type is considered "viewable".

is_stickyfiltr

Filters whether a post is sticky.

link_categoryfiltr

Filters the category name.

list_pagesfiltr

Filters the page title when creating an HTML drop-down list of pages.

page_css_classfiltr

Filters the list of CSS classes to include with each page item in the list.

page_menu_link_attributesfiltr

Filters the HTML attributes applied to a page menu item's anchor element.

post_classfiltr

Filters the list of CSS class names for the current post.

post_class_taxonomiesfiltr

Filters the taxonomies to generate classes for each individual term.

post_mime_typesfiltr

Filters the default list of post mime types.

post_password_requiredfiltr

Filters whether a post requires the user to supply a password.

post_stuckakcja

Fires once a post has been added to the sticky list.

post_thumbnail_htmlfiltr

Filters the post thumbnail HTML.

post_thumbnail_idfiltr

Filters the post thumbnail ID.

post_thumbnail_sizefiltr

Filters the post thumbnail size.

post_thumbnail_urlfiltr

Filters the post thumbnail URL.

post_type_labels_{$post_type}filtrdynamiczny

Filters the labels of a specific post type.

post_unstuckakcja

Fires once a post has been removed from the sticky list.

post_updatedakcja

Fires once an existing post has been updated.

pre_{$field}filtrdynamiczny

Filters the value of a specific post field before saving.

pre_delete_attachmentfiltr

Filters whether an attachment deletion should take place.

pre_delete_postfiltr

Filters whether a post deletion should take place.

pre_get_available_post_mime_typesfiltr

Filters the list of available post MIME types for the given post type.

pre_get_lastpostmodifiedfiltr

Pre-filter the return value of get_lastpostmodified() before the query is run.

pre_post_insertakcja

Fires immediately before a new post is inserted in the database.

pre_post_updateakcja

Fires immediately before an existing post is updated in the database.

pre_trash_postfiltr

Filters whether a post trashing should take place.

pre_untrash_postfiltr

Filters whether a post untrashing should take place.

pre_wp_unique_post_slugfiltr

Filters the post slug before it is generated to be unique.

prepend_attachmentfiltr

Filters the attachment markup to be prepended to the post content.

private_title_formatfiltr

Filters the text prepended to the post title of private posts.

protected_title_formatfiltr

Filters the text prepended to the post title for protected posts.

register_{$post_type}_post_type_argsfiltrdynamiczny

Filters the arguments for registering a specific post type.

register_post_type_argsfiltr

Filters the arguments for registering a post type.

registered_post_typeakcja

Fires after a post type is registered.

registered_post_type_{$post_type}akcjadynamiczny

Fires after a specific post type is registered.

save_postakcja

Fires once a post has been saved.

save_post_{$post->post_type}akcjadynamiczny

Fires once a post has been saved.

the_contentfiltr

Filters the post content.

the_content_more_linkfiltr

Filters the Read More link text.

the_excerptfiltr

Filters the displayed post excerpt.

the_guidfiltr

Filters the escaped Global Unique Identifier (guid) of the post.

the_meta_keyfiltr

Filters the HTML output of the li element in the post custom fields list.

the_password_formfiltr

Filters the HTML output for the protected post password form.

the_password_form_incorrect_passwordfiltr

Filters the invalid password message shown on password-protected posts.

the_post_thumbnail_captionfiltr

Filters the displayed post thumbnail caption.

the_titlefiltr

Filters the post title.

transition_post_statusakcja

Fires when a post is transitioned from one status to another.

trash_post_commentsakcja

Fires before comments are sent to the Trash.

trashed_postakcja

Fires after a post is sent to the Trash.

trashed_post_commentsakcja

Fires after comments are sent to the Trash.

unregistered_post_typeakcja

Fires after a post type was unregistered.

untrash_postakcja

Fires before a post is restored from the Trash.

untrash_post_commentsakcja

Fires before comments are restored for a post from the Trash.

untrashed_postakcja

Fires after a post is restored from the Trash.

untrashed_post_commentsakcja

Fires after comments are restored for a post from the Trash.

update_attached_filefiltr

Filters the path to the attached file to update.

use_block_editor_for_postfiltr

Filters whether a post is able to be edited in the block editor.

use_block_editor_for_post_typefiltr

Filters whether a post is able to be edited in the block editor.

wp_{$post->post_type}_revisions_to_keepfiltrdynamiczny

Filters the number of revisions to save for the given post by its post type.

wp_after_insert_postakcja

Fires once a post, its terms and meta data has been saved.

wp_count_attachmentsfiltr

Filters the attachment counts by mime type.

wp_count_postsfiltr

Filters the post counts by status for the current post type.

wp_delete_post_revisionakcja

Fires once a post revision has been deleted.

wp_dropdown_pagesfiltr

Filters the HTML output of a list of pages as a dropdown.

wp_get_attachment_captionfiltr

Filters the attachment caption.

wp_get_attachment_linkfiltr

Filters a retrieved attachment page link.

wp_get_attachment_link_attributesfiltr

Filters the list of attachment link attributes.

wp_get_attachment_metadatafiltr

Filters the attachment meta data.

wp_get_attachment_thumb_urlfiltr

Filters the attachment thumbnail URL.

wp_get_attachment_urlfiltr

Filters the attachment URL.

wp_get_original_image_pathfiltr

Filters the path to the original image.

wp_get_original_image_urlfiltr

Filters the URL to the original attachment image.

wp_insert_attachment_datafiltr

Filters attachment post data before it is updated in or added to the database.

wp_insert_postakcja

Fires once a post has been saved.

wp_insert_post_datafiltr

Filters slashed post data just before it is inserted into the database.

wp_insert_post_empty_contentfiltr

Filters whether the post should be considered "empty".

wp_insert_post_parentfiltr

Filters the post parent -- used to check for and prevent hierarchy loops.

wp_link_pagesfiltr

Filters the HTML output of page links for paginated posts.

wp_link_pages_argsfiltr

Filters the arguments used in retrieving page links for paginated posts.

wp_link_pages_linkfiltr

Filters the HTML output of individual page number links.

wp_list_bookmarksfiltr

Filters the bookmarks list before it is echoed or returned.

wp_list_pagesfiltr

Filters the HTML output of the pages to list.

wp_list_pages_excludesfiltr

Filters the array of pages to exclude from the pages list.

wp_mime_type_iconfiltr

Filters the mime type icon.

wp_page_menufiltr

Filters the HTML output of a page-based menu.

wp_page_menu_argsfiltr

Filters the arguments used to generate a page-based menu.

wp_post_revision_meta_keysfiltr

Filter the list of post meta keys to be revisioned.

wp_post_revision_title_expandedfiltr

Filters the formatted author and date for a revision.

wp_restore_post_revisionakcja

Fires after a post revision has been restored.

wp_revisions_to_keepfiltr

Filters the number of revisions to save for the given post.

wp_save_post_revision_check_for_changesfiltr

Filters whether the post has changed since the latest revision.

wp_save_post_revision_post_has_changedfiltr

Filters whether a post has changed.

wp_save_post_revision_revisions_before_deletionfiltr

Filters the revisions to be considered for deletion.

wp_trash_postakcja

Fires before a post is sent to the Trash.

wp_unique_post_slugfiltr

Filters the unique post slug.

wp_unique_post_slug_is_bad_attachment_slugfiltr

Filters whether the post slug would make a bad attachment slug.

wp_unique_post_slug_is_bad_flat_slugfiltr

Filters whether the post slug would be bad as a flat slug.

wp_unique_post_slug_is_bad_hierarchical_slugfiltr

Filters whether the post slug would make a bad hierarchical post slug.

wp_untrash_post_statusfiltr

Filters the status that a post gets assigned when it is restored from the trash (untrashed).

wp_update_attachment_metadatafiltr

Filters the updated attachment meta data.

xmlrpc_publish_postakcja

Fires when _publish_post_hook() is called during an XML-RPC request.