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 2001 to 2050 of 4125 functions (Page 41 of 83)
add_post_type_support()

Registers support of certain features for a post type.

$post_type $feature $args
remove_post_type_support()

Removes support for a feature from a post type.

$post_type $feature
get_all_post_type_supports()

Gets all the post type features

$post_type
post_type_supports()

Checks a post type's support for a given feature.

$post_type $feature
get_post_types_by_support()

Retrieves a list of post type names that support a specific feature.

$feature $operator
set_post_type()

Updates the post type for the post ID.

$post_id $post_type
is_post_type_viewable()

Determines whether a post type is considered "viewable".

$post_type
is_post_status_viewable()

Determines whether a post status is considered "viewable".

$post_status
is_post_publicly_viewable()

Determines whether a post is publicly viewable.

$post
is_post_embeddable()

Determines whether a post is embeddable.

$post
get_posts()

Retrieves an array of the latest posts, or posts matching the given criteria.

$args
add_post_meta()

Adds a meta field to the given post.

$post_id $meta_key $meta_value +1 more
delete_post_meta()

Deletes a post meta field for the given post ID.

$post_id $meta_key $meta_value
get_post_meta()

Retrieves a post meta field for the given post ID.

$post_id $key $single
update_post_meta()

Updates a post meta field based on the given post ID.

$post_id $meta_key $meta_value +1 more
delete_post_meta_by_key()

Deletes everything from post meta matching the given meta key.

$post_meta_key
register_post_meta()

Registers a meta key for posts.

$post_type $meta_key $args
unregister_post_meta()

Unregisters a meta key for posts.

$post_type $meta_key
get_post_custom()

Retrieves post meta fields, based on post ID.

$post_id
get_post_custom_keys()

Retrieves meta field names for a post.

$post_id
get_post_custom_values()

Retrieves values for a custom post field.

$key $post_id
is_sticky()

Determines whether a post is sticky.

$post_id
sanitize_post()

Sanitizes every post field.

$post $context
sanitize_post_field()

Sanitizes a post field based on context.

$field $value $post_id +1 more
stick_post()

Makes a post sticky.

$post_id
unstick_post()

Un-sticks a post.

$post_id
_count_posts_cache_key()

Returns the cache key for wp_count_posts() based on the passed arguments.

$type $perm
wp_count_posts()

Counts number of posts of a post type and if user has permissions to view.

$type $perm
wp_count_attachments()

Counts number of attachments for the mime type(s).

$mime_type
get_post_mime_types()

Gets default post mime types.

wp_match_mime_types()

Checks a MIME-Type against a list.

$wildcard_mime_types $real_mime_types
wp_post_mime_type_where()

Converts MIME types into SQL.

$post_mime_types $table_alias
wp_delete_post()

Trashes or deletes a post or page.

$post_id $force_delete
_reset_front_page_settings_for_post()

Resets the page_on_front, show_on_front, and page_for_post settings when

$post_id
wp_trash_post()

Moves a post or page to the Trash

$post_id
wp_untrash_post()

Restores a post from the Trash.

$post_id
wp_trash_post_comments()

Moves comments for a post to the Trash.

$post
wp_untrash_post_comments()

Restores comments for a post from the Trash.

$post
wp_get_post_categories()

Retrieves the list of categories for a post.

$post_id $args
wp_get_post_tags()

Retrieves the tags for a post.

$post_id $args
wp_get_post_terms()

Retrieves the terms for a post.

$post_id $taxonomy $args
wp_get_recent_posts()

Retrieves a number of recent posts.

$args $output
wp_insert_post()

Inserts or update a post.

$postarr $wp_error $fire_after_hooks
wp_update_post()

Updates a post with new post data.

$postarr $wp_error $fire_after_hooks
wp_publish_post()

Publishes a post by transitioning the post status.

$post
check_and_publish_future_post()

Publishes future post and make sure post ID has future post status.

$post
wp_resolve_post_date()

Uses wp_checkdate to return a valid Gregorian-calendar value for post_date.

$post_date $post_date_gmt
wp_unique_post_slug()

Computes a unique slug for the post, when given the desired slug and some post details.

$slug $post_id $post_status +2 more
_truncate_post_slug()

Truncates a post slug.

$slug $length
wp_add_post_tags()

Adds tags to a post.

$post_id $tags