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 2101 to 2150 of 4125 functions (Page 43 of 83)
delete_post_thumbnail()

Removes the thumbnail (featured image) from the given post.

$post
wp_delete_auto_drafts()

Deletes auto-drafts for new posts that are > 7 days old.

wp_queue_posts_for_term_meta_lazyload()

Queues posts for lazy-loading of term meta.

$posts
_update_term_count_on_transition_post_status()

Updates the custom taxonomies' term counts when a post's status is changed.

$new_status $old_status $post
_prime_post_caches()

Adds any posts from the given IDs to the cache that do not already exist in cache.

$ids $update_term_cache $update_meta_cache
_prime_post_parent_id_caches()

Prime the cache containing the parent ID of various post objects.

$ids
wp_add_trashed_suffix_to_post_name_for_trashed_posts()

Adds a suffix if any trashed posts have a given slug.

$post_name $post_id
wp_add_trashed_suffix_to_post_name_for_post()

Adds a trashed suffix for a given post.

$post
wp_cache_set_posts_last_changed()

Sets the last changed time for the 'posts' cache group.

get_available_post_mime_types()

Gets all available post MIME types for a given post type.

$type
wp_get_original_image_path()

Retrieves the path to an uploaded image file.

$attachment_id $unfiltered
wp_get_original_image_url()

Retrieves the URL to an original attachment image.

$attachment_id
wp_untrash_post_set_previous_status()

Filters callback which sets the status of an untrashed post to its previous status.

$new_status $post_id $previous_status
use_block_editor_for_post()

Returns whether the post can be edited in the block editor.

$post
use_block_editor_for_post_type()

Returns whether a post type is compatible with the block editor.

$post_type
wp_create_initial_post_meta()

Registers any additional post meta fields.

wp_simplepie_autoload()

WordPress autoloader for SimplePie.

$class
register_rest_route()

Registers a REST API route.

$route_namespace $route $args +1 more
register_rest_field()

Registers a new field on an existing WordPress object type.

$object_type $attribute $args
rest_api_init()

Registers rewrite rules for the REST API.

rest_api_register_rewrites()

Adds REST rewrite rules.

rest_api_default_filters()

Registers the default REST API filters.

create_initial_rest_routes()

Registers default REST API routes.

rest_api_loaded()

Loads the REST API.

rest_get_url_prefix()

Retrieves the URL prefix for any API resource.

get_rest_url()

Retrieves the URL to a REST endpoint on a site.

$blog_id $path $scheme
rest_url()

Retrieves the URL to a REST endpoint.

$path $scheme
rest_do_request()

Do a REST request.

$request
rest_get_server()

Retrieves the current REST server instance.

rest_ensure_request()

Ensures request arguments are a request object (for consistency).

$request
rest_ensure_response()

Ensures a REST response is a response object (for consistency).

$response
rest_handle_deprecated_function()

Handles _deprecated_function() errors.

$function_name $replacement $version
rest_handle_deprecated_argument()

Handles _deprecated_argument() errors.

$function_name $message $version
rest_handle_doing_it_wrong()

Handles _doing_it_wrong errors.

$function_name $message $version
rest_send_cors_headers()

Sends Cross-Origin Resource Sharing headers with API requests.

$value
rest_handle_options_request()

Handles OPTIONS requests for the server.

$response $handler $request
rest_send_allow_header()

Sends the "Allow" header to state all methods that can be sent to the current route.

$response $server $request
_rest_array_intersect_key_recursive()

Recursively computes the intersection of arrays using keys for comparison.

$array1 $array2
rest_filter_response_fields()

Filters the REST API response to include only an allow-listed set of response object fields.

$response $server $request
rest_is_field_included()

Given an array of fields to include in a response, some of which may be

$field $fields
rest_output_rsd()

Adds the REST API URL to the WP RSD endpoint.

rest_output_link_wp_head()

Outputs the REST API link tag into page header.

rest_output_link_header()

Sends a Link header for the REST API.

rest_cookie_check_errors()

Checks for errors when using cookie-based authentication.

$result
rest_cookie_collect_status()

Collects cookie authentication status.

rest_application_password_collect_status()

Collects the status of authenticating with an application password.

$user_or_error $app_password
rest_get_authenticated_app_password()

Gets the Application Password used for authenticating the request.

rest_application_password_check_errors()

Checks for errors when using application password-based authentication.

$result
rest_add_application_passwords_to_index()

Adds Application Passwords info to the REST API index.

$response
rest_get_avatar_urls()

Retrieves the avatar URLs in various sizes.

$id_or_email