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 3051 to 3100 of 4125 functions (Page 62 of 83)
wp_admin_bar_comments_menu()

Adds edit comments link with awaiting moderation count bubble.

$wp_admin_bar
wp_admin_bar_appearance_menu()

Adds appearance submenu items to the "Site Name" menu.

$wp_admin_bar
wp_admin_bar_updates_menu()

Provides an update link if theme/plugin/core updates are available.

$wp_admin_bar
wp_admin_bar_search_menu()

Adds search form.

$wp_admin_bar
wp_admin_bar_recovery_mode_menu()

Adds a link to exit recovery mode when Recovery Mode is active.

$wp_admin_bar
wp_admin_bar_add_secondary_groups()

Adds secondary menus.

$wp_admin_bar
wp_enqueue_admin_bar_header_styles()

Enqueues inline style to hide the admin bar when printing.

wp_enqueue_admin_bar_bump_styles()

Enqueues inline bump styles to make room for the admin bar.

show_admin_bar()

Sets the display status of the admin bar.

$show
is_admin_bar_showing()

Determines whether the admin bar should be showing.

_get_admin_bar_pref()

Retrieves the admin bar display preference of a user.

$context $user
wp_sitemaps_get_server()

Retrieves the current Sitemaps server instance.

wp_get_sitemap_providers()

Gets an array of sitemap providers.

wp_register_sitemap_provider()

Registers a new sitemap provider.

$name $provider
wp_sitemaps_get_max_urls()

Gets the maximum number of URLs for a sitemap.

$object_type
get_sitemap_url()

Retrieves the full URL for a sitemap.

$name $subtype_name $page
get_default_block_categories()

Returns the list of default categories for block types.

get_block_categories()

Returns all the categories for block types that will be shown in the block editor.

$post_or_block_editor_context
get_allowed_block_types()

Gets the list of allowed block types to use in the block editor.

$block_editor_context
get_default_block_editor_settings()

Returns the default block editor settings.

get_legacy_widget_block_editor_settings()

Returns the block editor settings needed to use the Legacy Widget block which

_wp_get_iframed_editor_assets()

Collect the block editor assets that need to be loaded into the editor's iframe.

wp_get_first_block()

Finds the first occurrence of a specific block in an array of blocks.

$blocks $block_name
wp_get_post_content_block_attributes()

Retrieves Post Content block attributes from the current post template.

get_block_editor_settings()

Returns the contextualized block editor settings for a selected editor context.

$custom_settings $block_editor_context
block_editor_rest_api_preload()

Preloads common data used with the block editor by specifying an array of

$preload_paths $block_editor_context
get_block_editor_theme_styles()

Creates an array of theme styles to load into the block editor.

get_classic_theme_supports_block_editor_settings()

Returns the classic theme supports settings for block editor.

wp_initialize_site_preview_hooks()

Initialize site preview.

wp_nav_menu()

Displays a navigation menu.

$args
_wp_menu_item_classes_by_context()

Adds the class property classes for the current context, if applicable.

$menu_items
walk_nav_menu_tree()

Retrieves the HTML list content for nav menu items.

$items $depth $args
_nav_menu_item_id_use_once()

Prevents a menu item ID from being used more than once.

$id $item
wp_nav_menu_remove_menu_item_has_children_class()

Remove the `menu-item-has-children` class from bottom level menu items.

$classes $menu_item $args +1 more
check_comment()

Checks whether a comment passes internal checks to be allowed to add.

$author $email $url +4 more
get_approved_comments()

Retrieves the approved comments for a post.

$post_id $args
get_comment()

Retrieves comment data given a comment ID or comment object.

$comment $output
get_comments()

Retrieves a list of comments.

$args
get_comment_statuses()

Retrieves all of the WordPress supported comment statuses.

get_default_comment_status()

Gets the default comment status for a post type.

$post_type $comment_type
get_lastcommentmodified()

Retrieves the date the last comment was modified.

$timezone
get_comment_count()

Retrieves the total comment counts for the whole site or a single post.

$post_id
add_comment_meta()

Adds meta data field to a comment.

$comment_id $meta_key $meta_value +1 more
delete_comment_meta()

Removes metadata matching criteria from a comment.

$comment_id $meta_key $meta_value
get_comment_meta()

Retrieves comment meta field for a comment.

$comment_id $key $single
wp_lazyload_comment_meta()

Queue comment meta for lazy-loading.

$comment_ids
update_comment_meta()

Updates comment meta field based on comment ID.

$comment_id $meta_key $meta_value +1 more
wp_set_comment_cookies()

Sets the cookies used to store an unauthenticated commentator's identity. Typically used

$comment $user $cookies_consent
sanitize_comment_cookies()

Sanitizes the cookies sent to the user already.

wp_allow_comment()

Validates whether this comment is allowed to be made.

$commentdata $wp_error