WPDev.one
Core PHP Functions

Functions Reference

4125+ PHP functions available in the WordPress global namespace. Complete documentation with parameters, return values, and usage examples.

Showing 2051 to 2100 of 4125 functions (Page 42 of 83)
wp_set_post_tags()

Sets the tags for a post.

$post_id $tags $append
wp_set_post_terms()

Sets the terms for a post.

$post_id $terms $taxonomy +1 more
wp_set_post_categories()

Sets categories for a post.

$post_id $post_categories $append
wp_transition_post_status()

Fires actions related to the transitioning of a post's status.

$new_status $old_status $post
wp_after_insert_post()

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

$post $update $post_before
add_ping()

Adds a URL to those already pinged.

$post $uri
get_enclosed()

Retrieves enclosures already enclosed for a post.

$post_id
get_pung()

Retrieves URLs already pinged for a post.

$post
get_to_ping()

Retrieves URLs that need to be pinged.

$post
trackback_url_list()

Does trackbacks for a list of URLs.

$tb_list $post_id
get_all_page_ids()

Gets a list of page IDs.

get_page()

Retrieves page data given a page ID or page object.

$page $output $filter
get_page_by_path()

Retrieves a page given its path.

$page_path $output $post_type
get_page_children()

Identifies descendants of a given page ID in a list of page objects.

$page_id $pages
get_page_hierarchy()

Orders the pages with children under parents in a flat list.

$pages $page_id
_page_traverse_name()

Traverses and return all the nested children post names of a root page.

$page_id $children $result
get_page_uri()

Builds the URI path for a page.

$page
get_pages()

Retrieves an array of pages (or hierarchical post type items).

$args
is_local_attachment()

Determines whether an attachment URI is local and really an attachment.

$url
wp_insert_attachment()

Inserts an attachment.

$args $file $parent_post_id +2 more
wp_delete_attachment()

Trashes or deletes an attachment.

$post_id $force_delete
wp_delete_attachment_files()

Deletes all files that belong to the given attachment.

$post_id $meta $backup_sizes +1 more
wp_get_attachment_metadata()

Retrieves attachment metadata for attachment ID.

$attachment_id $unfiltered
wp_update_attachment_metadata()

Updates metadata for an attachment.

$attachment_id $data
wp_get_attachment_url()

Retrieves the URL for an attachment.

$attachment_id
wp_get_attachment_caption()

Retrieves the caption for an attachment.

$post_id
wp_get_attachment_thumb_url()

Retrieves URL for an attachment thumbnail.

$post_id
wp_attachment_is()

Verifies an attachment is of a given type.

$type $post
wp_attachment_is_image()

Determines whether an attachment is an image.

$post
wp_mime_type_icon()

Retrieves the icon for a MIME type or attachment.

$mime $preferred_ext
wp_check_for_changed_slugs()

Checks for changed slugs for published post objects and save the old slug.

$post_id $post $post_before
wp_check_for_changed_dates()

Checks for changed dates for published post objects and save the old date.

$post_id $post $post_before
get_private_posts_cap_sql()

Retrieves the private post SQL based on capability.

$post_type
get_posts_by_author_sql()

Retrieves the post SQL based on capability, author, and type.

$post_type $full $post_author +1 more
get_lastpostdate()

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

$timezone $post_type
get_lastpostmodified()

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

$timezone $post_type
_get_last_post_time()

Gets the timestamp of the last time any post was modified or published.

$timezone $field $post_type
update_post_cache()

Updates posts in cache.

$posts
clean_post_cache()

Will clean the post in the cache.

$post
update_post_caches()

Updates post, term, and metadata caches for a list of post objects.

$posts $post_type $update_term_cache +1 more
update_post_author_caches()

Updates post author user caches for a list of post objects.

$posts
update_post_parent_caches()

Updates parent post caches for a list of post objects.

$posts
update_postmeta_cache()

Updates metadata cache for a list of post IDs.

$post_ids
clean_attachment_cache()

Will clean the attachment in the cache.

$id $clean_terms
_transition_post_status()

Hook for managing future post transitions to published.

$new_status $old_status $post
_future_post_hook()

Hook used to schedule publication for a post marked for the future.

$deprecated $post
_publish_post_hook()

Hook to schedule pings and enclosures when a post is published.

$post_id
wp_get_post_parent_id()

Returns the ID of the post's parent.

$post
wp_check_post_hierarchy_for_loops()

Checks the given subset of the post hierarchy for hierarchy loops.

$post_parent $post_id
set_post_thumbnail()

Sets the post thumbnail (featured image) for the given post.

$post $thumbnail_id