Returns whether the current user has the specified capability.
Description
This function also accepts an ID of an object to check against if the capability is a meta capability. Meta capabilities such as edit_post
and edit_user
are capabilities used by the map_meta_cap()
function to map to primitive capabilities that a user or role has, such as edit_posts
and edit_others_posts
.
Example usage:
current_user_can( 'edit_posts' );
current_user_can( 'edit_post', $post->ID );
current_user_can( 'edit_post_meta', $post->ID, $meta_key );
While checking against particular roles in place of a capability is supported in part, this practice is discouraged as it may produce unreliable results.
Note: Will always return true if the current user is a super admin, unless specifically denied.
See also
Parameters
$capability
stringrequired- Capability name.
$args
mixedoptional- Optional further parameters, typically starting with an object ID.
Return
bool Whether the current user has the given capability. If$capability
is a meta cap and $object_id
is passed, whether the current user has the given meta capability for the given object.Source
function current_user_can( $capability, ...$args ) {
return user_can( wp_get_current_user(), $capability, ...$args );
}
Related
Uses | Description |
---|---|
user_can()wp-includes/capabilities.php | Returns whether a particular user has the specified capability. |
wp_get_current_user()wp-includes/pluggable.php | Retrieves the current user object. |
Used by | Description |
---|---|
current_user_can_for_site()wp-includes/capabilities.php | Returns whether the current user has the specified capability for a given site. |
_block_bindings_post_meta_get_value()wp-includes/block-bindings/post-meta.php | Gets value for Post Meta source. |
WP_Plugin_Dependencies::check_plugin_dependencies_during_ajax()wp-includes/class-wp-plugin-dependencies.php | Checks plugin dependencies after a plugin is installed via AJAX. |
WP_Plugin_Dependencies::display_admin_notice_for_unmet_dependencies()wp-includes/class-wp-plugin-dependencies.php | Displays an admin notice if dependencies are not installed. |
WP_REST_Font_Faces_Controller::get_item_permissions_check()wp-includes/rest-api/endpoints/class-wp-rest-font-faces-controller.php | Checks if a given request has access to a font face. |
WP_REST_Font_Faces_Controller::get_items_permissions_check()wp-includes/rest-api/endpoints/class-wp-rest-font-faces-controller.php | Checks if a given request has access to font faces. |
WP_REST_Font_Families_Controller::get_item_permissions_check()wp-includes/rest-api/endpoints/class-wp-rest-font-families-controller.php | Checks if a given request has access to a font family. |
WP_REST_Font_Families_Controller::get_items_permissions_check()wp-includes/rest-api/endpoints/class-wp-rest-font-families-controller.php | Checks if a given request has access to font families. |
WP_REST_Font_Collections_Controller::get_items_permissions_check()wp-includes/rest-api/endpoints/class-wp-rest-font-collections-controller.php | Checks whether the user has permissions to use the Fonts Collections. |
wp_ajax_activate_plugin()wp-admin/includes/ajax-actions.php | Handles activating a plugin via AJAX. |
wp_get_plugin_action_button()wp-admin/includes/plugin-install.php | Gets the markup for the plugin install action button. |
WP_REST_Template_Revisions_Controller::delete_item_permissions_check()wp-includes/rest-api/endpoints/class-wp-rest-template-revisions-controller.php | Checks if a given request has access to delete a revision. |
_wp_footnotes_kses_init()wp-includes/blocks.php | Registers the filter of footnotes meta field if the user does not have |
WP_REST_Navigation_Fallback_Controller::get_item_permissions_check()wp-includes/rest-api/endpoints/class-wp-rest-navigation-fallback-controller.php | Checks if a given request has access to read fallbacks. |
wp_get_theme_preview_path()wp-includes/theme-previews.php | Filters the blog option to return the path for the previewed theme. |
wp_attach_theme_preview_middleware()wp-includes/theme-previews.php | Adds a middleware to |
WP_REST_Terms_Controller::check_read_terms_permission_for_post()wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php | Checks if the terms for a post can be read. |
wp_refresh_metabox_loader_nonces()wp-admin/includes/misc.php | Refresh nonces used with meta boxes in the block editor. |
WP_REST_Block_Patterns_Controller::get_items_permissions_check()wp-includes/rest-api/endpoints/class-wp-rest-block-patterns-controller.php | Checks whether a given request has permission to read block patterns. |
WP_REST_Block_Pattern_Categories_Controller::get_items_permissions_check()wp-includes/rest-api/endpoints/class-wp-rest-block-pattern-categories-controller.php | Checks whether a given request has permission to read block patterns. |
WP_REST_Menu_Items_Controller::check_has_read_only_access()wp-includes/rest-api/endpoints/class-wp-rest-menu-items-controller.php | Checks whether the current user has read permission for the endpoint. |
WP_REST_Global_Styles_Controller::get_theme_item_permissions_check()wp-includes/rest-api/endpoints/class-wp-rest-global-styles-controller.php | Checks if a given request has access to read a single theme global styles config. |
WP_REST_Global_Styles_Controller::check_read_permission()wp-includes/rest-api/endpoints/class-wp-rest-global-styles-controller.php | Checks if a global style can be read. |
WP_REST_Global_Styles_Controller::get_available_actions()wp-includes/rest-api/endpoints/class-wp-rest-global-styles-controller.php | Get the link relations available for the post and current user. |
WP_REST_URL_Details_Controller::permissions_check()wp-includes/rest-api/endpoints/class-wp-rest-url-details-controller.php | Checks whether a given request has permission to read remote URLs. |
WP_REST_Menus_Controller::check_has_read_only_access()wp-includes/rest-api/endpoints/class-wp-rest-menus-controller.php | Checks whether the current user has read permission for the endpoint. |
WP_REST_Menu_Locations_Controller::get_items_permissions_check()wp-includes/rest-api/endpoints/class-wp-rest-menu-locations-controller.php | Checks whether a given request has permission to read menu locations. |
WP_REST_Menu_Locations_Controller::get_item_permissions_check()wp-includes/rest-api/endpoints/class-wp-rest-menu-locations-controller.php | Checks if a given request has access to read a menu location. |
WP_REST_Edit_Site_Export_Controller::permissions_check()wp-includes/rest-api/endpoints/class-wp-rest-edit-site-export-controller.php | Checks whether a given request has permission to export. |
_resolve_template_for_new_post()wp-includes/block-template.php | Sets the current WP_Query to return auto-draft posts. |
wp_admin_bar_edit_site_menu()wp-includes/admin-bar.php | Adds the “Edit site” link to the Toolbar. |
WP_Widget_Block::update()wp-includes/widgets/class-wp-widget-block.php | Handles updating settings for the current Block widget instance. |
WP_REST_Widgets_Controller::permissions_check()wp-includes/rest-api/endpoints/class-wp-rest-widgets-controller.php | Performs a permissions check for managing widgets. |
WP_REST_Sidebars_Controller::do_permissions_check()wp-includes/rest-api/endpoints/class-wp-rest-sidebars-controller.php | Checks if the user has permissions to make the request. |
WP_REST_Templates_Controller::get_available_actions()wp-includes/rest-api/endpoints/class-wp-rest-templates-controller.php | Get the link relations available for the post and current user. |
WP_REST_Templates_Controller::permissions_check()wp-includes/rest-api/endpoints/class-wp-rest-templates-controller.php | Checks if the user has permissions to make the request. |
WP_REST_Templates_Controller::get_items_permissions_check()wp-includes/rest-api/endpoints/class-wp-rest-templates-controller.php | Checks if a given request has access to read templates. |
WP_REST_Templates_Controller::get_item_permissions_check()wp-includes/rest-api/endpoints/class-wp-rest-templates-controller.php | Checks if a given request has access to read a single template. |
WP_REST_Pattern_Directory_Controller::get_items_permissions_check()wp-includes/rest-api/endpoints/class-wp-rest-pattern-directory-controller.php | Checks whether a given request has permission to view the local block pattern directory. |
WP_REST_Widget_Types_Controller::check_read_permission()wp-includes/rest-api/endpoints/class-wp-rest-widget-types-controller.php | Checks whether the user can read widget types. |
get_block_editor_settings()wp-includes/block-editor.php | Returns the contextualized block editor settings for a selected editor context. |
get_default_block_editor_settings()wp-includes/block-editor.php | Returns the default block editor settings. |
deactivated_plugins_notice()wp-admin/includes/plugin.php | Renders an admin notice when a plugin was deactivated during an update. |
WP_REST_Posts_Controller::check_password_required()wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php | Overrides the result of the post password check for REST requested posts. |
WP_REST_Server::add_active_theme_link_to_index()wp-includes/rest-api/class-wp-rest-server.php | Adds a link to the active theme for users who have proper permissions. |
WP_REST_Themes_Controller::get_item_permissions_check()wp-includes/rest-api/endpoints/class-wp-rest-themes-controller.php | Checks if a given request has access to read the theme. |
WP_REST_Themes_Controller::check_read_active_theme_permission()wp-includes/rest-api/endpoints/class-wp-rest-themes-controller.php | Checks if a theme can be read. |
wp_force_plain_post_permalink()wp-includes/link-template.php | Determine whether post should always use a plain permalink structure. |
wp_ajax_send_password_reset()wp-admin/includes/ajax-actions.php | Handles sending a password reset link via AJAX. |
WP_REST_Site_Health_Controller::validate_request_permission()wp-includes/rest-api/endpoints/class-wp-rest-site-health-controller.php | Validates if the current user can request this REST endpoint. |
WP_REST_Application_Passwords_Controller::do_permissions_check()wp-includes/rest-api/endpoints/class-wp-rest-application-passwords-controller.php | Performs a permissions check for the request. |
WP_REST_Application_Passwords_Controller::get_items_permissions_check()wp-includes/rest-api/endpoints/class-wp-rest-application-passwords-controller.php | Checks if a given request has access to get application passwords. |
WP_REST_Application_Passwords_Controller::get_item_permissions_check()wp-includes/rest-api/endpoints/class-wp-rest-application-passwords-controller.php | Checks if a given request has access to get a specific application password. |
WP_REST_Application_Passwords_Controller::create_item_permissions_check()wp-includes/rest-api/endpoints/class-wp-rest-application-passwords-controller.php | Checks if a given request has access to create application passwords. |
WP_REST_Application_Passwords_Controller::update_item_permissions_check()wp-includes/rest-api/endpoints/class-wp-rest-application-passwords-controller.php | Checks if a given request has access to update application passwords. |
WP_REST_Application_Passwords_Controller::delete_items_permissions_check()wp-includes/rest-api/endpoints/class-wp-rest-application-passwords-controller.php | Checks if a given request has access to delete all application passwords for a user. |
WP_REST_Application_Passwords_Controller::delete_item_permissions_check()wp-includes/rest-api/endpoints/class-wp-rest-application-passwords-controller.php | Checks if a given request has access to delete a specific application password for a user. |
WP_REST_Block_Directory_Controller::get_items_permissions_check()wp-includes/rest-api/endpoints/class-wp-rest-block-directory-controller.php | Checks whether a given request has permission to install and activate plugins. |
WP_REST_Plugins_Controller::plugin_status_permission_check()wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php | Handle updating a plugin’s status. |
WP_REST_Plugins_Controller::get_item_permissions_check()wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php | Checks if a given request has access to get a specific plugin. |
WP_REST_Plugins_Controller::check_read_permission()wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php | Checks if the given plugin can be viewed by the current user. |
WP_REST_Plugins_Controller::create_item_permissions_check()wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php | Checks if a given request has access to upload plugins. |
WP_REST_Plugins_Controller::update_item_permissions_check()wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php | Checks if a given request has access to update a specific plugin. |
WP_REST_Plugins_Controller::delete_item_permissions_check()wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php | Checks if a given request has access to delete a specific plugin. |
WP_REST_Plugins_Controller::get_items_permissions_check()wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php | Checks if a given request has access to get plugins. |
WP_REST_Block_Types_Controller::check_read_permission()wp-includes/rest-api/endpoints/class-wp-rest-block-types-controller.php | Checks whether a given block type should be visible. |
WP_REST_Attachments_Controller::edit_media_item_permissions_check()wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php | Checks if a given request has access to editing media. |
wp_ajax_toggle_auto_updates()wp-admin/includes/ajax-actions.php | Handles enabling or disable plugin and theme auto-updates via AJAX. |
wp_ajax_media_create_image_subsizes()wp-admin/includes/ajax-actions.php | Handles creating missing image sub-sizes for just uploaded images via AJAX. |
paused_themes_notice()wp-admin/includes/theme.php | Renders an admin notice in case some themes have been paused due to errors. |
WP_Site_Health::check_wp_version_check_exists()wp-admin/includes/class-wp-site-health.php | Tests whether |
WP_Site_Health::get_test_https_status()wp-admin/includes/class-wp-site-health.php | Tests if the site is serving content over HTTPS. |
paused_plugins_notice()wp-admin/includes/plugin.php | Renders an admin notice in case some plugins have been paused due to errors. |
validate_plugin_requirements()wp-admin/includes/plugin.php | Validates the plugin requirements for WordPress version and PHP version. |
wp_ajax_health_check_get_sizes()wp-admin/includes/ajax-actions.php | Handles site health check to get directories and database sizes via AJAX. |
wp_ajax_health_check_dotorg_communication()wp-admin/includes/ajax-actions.php | Handles site health checks on server communication via AJAX. |
wp_ajax_health_check_background_updates()wp-admin/includes/ajax-actions.php | Handles site health checks on background updates via AJAX. |
wp_ajax_health_check_loopback_requests()wp-admin/includes/ajax-actions.php | Handles site health checks on loopback requests via AJAX. |
wp_ajax_health_check_site_status_result()wp-admin/includes/ajax-actions.php | Handles site health check to update the result status via AJAX. |
WP_REST_Blocks_Controller::check_read_permission()wp-includes/rest-api/endpoints/class-wp-rest-blocks-controller.php | Checks if a pattern can be read. |
WP_REST_Themes_Controller::get_items_permissions_check()wp-includes/rest-api/endpoints/class-wp-rest-themes-controller.php | Checks if a given request has access to read the theme. |
WP_REST_Autosaves_Controller::get_items_permissions_check()wp-includes/rest-api/endpoints/class-wp-rest-autosaves-controller.php | Checks if a given request has access to get autosaves. |
WP_REST_Block_Renderer_Controller::get_item_permissions_check()wp-includes/rest-api/endpoints/class-wp-rest-block-renderer-controller.php | Checks if a given request has access to read blocks. |
wp_get_code_editor_settings()wp-includes/general-template.php | Generates and returns code editor settings. |
do_block_editor_incompatible_meta_box()wp-admin/includes/template.php | Renders a “fake” meta box with an information message, shown on the block editor, when an incompatible meta box is found. |
register_and_do_post_meta_boxes()wp-admin/includes/meta-boxes.php | Registers the default post meta boxes, and runs the |
WP_REST_Posts_Controller::get_available_actions()wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php | Gets the link relations available for the post and current user. |
WP_Privacy_Policy_Content::notice()wp-admin/includes/class-wp-privacy-policy-content.php | Adds a notice with a link to the guide when editing the privacy policy page. |
WP_Privacy_Policy_Content::text_change_check()wp-admin/includes/class-wp-privacy-policy-content.php | Performs a quick check to determine whether any privacy info has changed. |
wp_ajax_wp_privacy_export_personal_data()wp-admin/includes/ajax-actions.php | Handles exporting a user’s personal data via AJAX. |
wp_ajax_wp_privacy_erase_personal_data()wp-admin/includes/ajax-actions.php | Handles erasing personal data via AJAX. |
wp_xmlrpc_server::get_term_custom_fields()wp-includes/class-wp-xmlrpc-server.php | Retrieves custom fields for a term. |
wp_xmlrpc_server::set_term_custom_fields()wp-includes/class-wp-xmlrpc-server.php | Sets custom fields for a term. |
WP_Customize_Manager::handle_load_themes_request()wp-includes/class-wp-customize-manager.php | Loads themes into the theme browsing/installation UI. |
WP_Customize_Manager::check_changeset_lock_with_heartbeat()wp-includes/class-wp-customize-manager.php | Checks locked changeset with heartbeat API. |
WP_Customize_Manager::handle_override_changeset_lock_request()wp-includes/class-wp-customize-manager.php | Removes changeset lock when take over request is sent via Ajax. |
WP_Customize_Manager::handle_dismiss_autosave_or_lock_request()wp-includes/class-wp-customize-manager.php | Deletes a given auto-draft changeset or the autosave revision for a given changeset or delete changeset lock. |
WP_Customize_Manager::handle_changeset_trash_request()wp-includes/class-wp-customize-manager.php | Handles request to trash a changeset. |
wp_enqueue_code_editor()wp-includes/general-template.php | Enqueues assets needed by the code editor for the given settings. |
WP_Widget_Custom_HTML::update()wp-includes/widgets/class-wp-widget-custom-html.php | Handles updating settings for the current Custom HTML widget instance. |
WP_Widget_Custom_HTML::render_control_template_scripts()wp-includes/widgets/class-wp-widget-custom-html.php | Render form template scripts. |
WP_Customize_Themes_Panel::content_template()wp-includes/customize/class-wp-customize-themes-panel.php | An Underscore (JS) template for this panel’s content (but not its container). |
WP_Customize_Themes_Panel::render_template()wp-includes/customize/class-wp-customize-themes-panel.php | An Underscore (JS) template for rendering this panel’s container. |
WP_Customize_Themes_Section::render_template()wp-includes/customize/class-wp-customize-themes-section.php | Renders a themes section as a JS template. |
wp_load_press_this()wp-admin/press-this.php | |
wp_edit_theme_plugin_file()wp-admin/includes/file.php | Attempts to edit a file for a theme or plugin. |
WP_oEmbed_Controller::get_proxy_item_permissions_check()wp-includes/class-wp-oembed-controller.php | Checks if current user can make a proxy oEmbed request. |
WP_REST_Meta_Fields::delete_meta_value()wp-includes/rest-api/fields/class-wp-rest-meta-fields.php | Deletes a meta value for an object. |
WP_REST_Meta_Fields::update_multi_meta_value()wp-includes/rest-api/fields/class-wp-rest-meta-fields.php | Updates multiple meta values for an object. |
WP_REST_Meta_Fields::update_meta_value()wp-includes/rest-api/fields/class-wp-rest-meta-fields.php | Updates a meta value for an object. |
WP_REST_Users_Controller::check_role_update()wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php | Determines if the current user is allowed to make the desired roles change. |
WP_REST_Users_Controller::delete_item_permissions_check()wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php | Checks if a given request has access delete a user. |
WP_REST_Users_Controller::create_item_permissions_check()wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php | Checks if a given request has access create users. |
WP_REST_Users_Controller::update_item_permissions_check()wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php | Checks if a given request has access to update a user. |
WP_REST_Users_Controller::get_items_permissions_check()wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php | Permissions check for getting all users. |
WP_REST_Users_Controller::get_items()wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php | Retrieves all users. |
WP_REST_Users_Controller::get_item_permissions_check()wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php | Checks if a given request has access to read a user. |
WP_REST_Revisions_Controller::delete_item_permissions_check()wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php | Checks if a given request has access to delete a revision. |
WP_REST_Revisions_Controller::get_items_permissions_check()wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php | Checks if a given request has access to get revisions. |
WP_REST_Attachments_Controller::create_item_permissions_check()wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php | Checks if a given request has access to create an attachment. |
WP_REST_Post_Statuses_Controller::check_read_permission()wp-includes/rest-api/endpoints/class-wp-rest-post-statuses-controller.php | Checks whether a given post status should be visible. |
WP_REST_Post_Statuses_Controller::get_items_permissions_check()wp-includes/rest-api/endpoints/class-wp-rest-post-statuses-controller.php | Checks whether a given request has permission to read post statuses. |
WP_REST_Settings_Controller::get_item_permissions_check()wp-includes/rest-api/endpoints/class-wp-rest-settings-controller.php | Checks if a given request has access to read and manage settings. |
WP_REST_Terms_Controller::create_item_permissions_check()wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php | Checks if a request has access to create a term. |
WP_REST_Terms_Controller::update_item_permissions_check()wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php | Checks if a request has access to update the specified term. |
WP_REST_Terms_Controller::delete_item_permissions_check()wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php | Checks if a request has access to delete the specified term. |
WP_REST_Terms_Controller::get_items_permissions_check()wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php | Checks if a request has access to read terms in the specified taxonomy. |
WP_REST_Terms_Controller::get_item_permissions_check()wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php | Checks if a request has access to read or edit the specified term. |
WP_REST_Posts_Controller::sanitize_post_statuses()wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php | Sanitizes and validates the list of post statuses, including whether the user can query private statuses. |
WP_REST_Posts_Controller::check_read_permission()wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php | Checks if a post can be read. |
WP_REST_Posts_Controller::check_update_permission()wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php | Checks if a post can be edited. |
WP_REST_Posts_Controller::check_create_permission()wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php | Checks if a post can be created. |
WP_REST_Posts_Controller::check_delete_permission()wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php | Checks if a post can be deleted. |
WP_REST_Posts_Controller::handle_status_param()wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php | Determines validity and normalizes the given status parameter. |
WP_REST_Posts_Controller::check_assign_terms_permission()wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php | Checks whether current user can assign all terms sent with the current request. |
WP_REST_Posts_Controller::update_item_permissions_check()wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php | Checks if a given request has access to update a post. |
WP_REST_Posts_Controller::can_access_password_content()wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php | Checks if the user can access password-protected content. |
WP_REST_Posts_Controller::create_item_permissions_check()wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php | Checks if a given request has access to create a post. |
WP_REST_Posts_Controller::get_items_permissions_check()wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php | Checks if a given request has access to read posts. |
WP_REST_Taxonomies_Controller::get_item_permissions_check()wp-includes/rest-api/endpoints/class-wp-rest-taxonomies-controller.php | Checks if a given request has access to a taxonomy. |
WP_REST_Taxonomies_Controller::get_items_permissions_check()wp-includes/rest-api/endpoints/class-wp-rest-taxonomies-controller.php | Checks whether a given request has permission to read taxonomies. |
WP_REST_Taxonomies_Controller::get_items()wp-includes/rest-api/endpoints/class-wp-rest-taxonomies-controller.php | Retrieves all public taxonomies. |
WP_REST_Post_Types_Controller::get_items_permissions_check()wp-includes/rest-api/endpoints/class-wp-rest-post-types-controller.php | Checks whether a given request has permission to read types. |
WP_REST_Post_Types_Controller::get_items()wp-includes/rest-api/endpoints/class-wp-rest-post-types-controller.php | Retrieves all public post types. |
WP_REST_Post_Types_Controller::get_item()wp-includes/rest-api/endpoints/class-wp-rest-post-types-controller.php | Retrieves a specific post type. |
WP_REST_Comments_Controller::check_edit_permission()wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php | Checks if a comment can be edited or deleted. |
WP_REST_Comments_Controller::check_read_post_permission()wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php | Checks if the post can be read. |
WP_REST_Comments_Controller::check_read_permission()wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php | Checks if the comment can be read. |
WP_REST_Comments_Controller::prepare_item_for_database()wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php | Prepares a single comment to be inserted into the database. |
WP_REST_Comments_Controller::get_item_permissions_check()wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php | Checks if a given request has access to read the comment. |
WP_REST_Comments_Controller::create_item_permissions_check()wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php | Checks if a given request has access to create a comment. |
WP_REST_Comments_Controller::create_item()wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php | Creates a comment. |
WP_REST_Comments_Controller::get_items_permissions_check()wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php | Checks if a given request has access to read comments. |
wp_check_comment_flood()wp-includes/comment.php | Checks whether comment flooding is occurring. |
WP_Customize_Nav_Menus::print_post_type_container()wp-includes/class-wp-customize-nav-menus.php | Prints the markup for new menu items. |
WP_Customize_Nav_Menus::sanitize_nav_menus_created_posts()wp-includes/class-wp-customize-nav-menus.php | Sanitizes post IDs for posts created for nav menu items to be published. |
WP_Customize_Nav_Menus::ajax_insert_auto_draft_post()wp-includes/class-wp-customize-nav-menus.php | Ajax handler for adding a new auto-draft post. |
WP_Customize_Manager::validate_setting_values()wp-includes/class-wp-customize-manager.php | Validates setting values. |
network_edit_site_nav()wp-admin/includes/ms.php | Outputs the HTML for a network’s “Edit Site” tabular interface. |
wp_ajax_delete_plugin()wp-admin/includes/ajax-actions.php | Handles deleting a plugin via AJAX. |
wp_ajax_install_theme()wp-admin/includes/ajax-actions.php | Handles installing a theme via AJAX. |
wp_ajax_update_theme()wp-admin/includes/ajax-actions.php | Handles updating a theme via AJAX. |
wp_ajax_delete_theme()wp-admin/includes/ajax-actions.php | Handles deleting a theme via AJAX. |
wp_ajax_install_plugin()wp-admin/includes/ajax-actions.php | Handles installing a plugin via AJAX. |
wp_ajax_get_post_thumbnail_html()wp-admin/includes/ajax-actions.php | Handles retrieving HTML for the featured image via AJAX. |
WP_Customize_Partial::check_capabilities()wp-includes/customize/class-wp-customize-partial.php | Checks if the user can refresh this partial. |
WP_Customize_Manager::customize_pane_settings()wp-includes/class-wp-customize-manager.php | Prints JavaScript settings for parent window. |
wp_handle_comment_submission()wp-includes/comment.php | Handles the submission of a comment, usually posted to wp-comments-post.php via a comment form. |
WP_Screen::render_meta_boxes_preferences()wp-admin/includes/class-wp-screen.php | Renders the meta boxes preferences. |
wp_ajax_save_wporg_username()wp-admin/includes/ajax-actions.php | Handles saving the user’s WordPress.org username via AJAX. |
wp_ajax_delete_inactive_widgets()wp-admin/includes/ajax-actions.php | Handles removing inactive widgets via AJAX. |
wp_admin_bar_customize_menu()wp-includes/admin-bar.php | Adds the “Customize” link to the Toolbar. |
wp_xmlrpc_server::_toggle_sticky()wp-includes/class-wp-xmlrpc-server.php | Encapsulates the logic for sticking a post and determining if the user has permission to do so. |
WP_Customize_Nav_Menus::__construct()wp-includes/class-wp-customize-nav-menus.php | Constructor. |
WP_Customize_Nav_Menus::ajax_load_available_items()wp-includes/class-wp-customize-nav-menus.php | Ajax handler for loading available menu items. |
WP_Customize_Nav_Menus::ajax_search_available_items()wp-includes/class-wp-customize-nav-menus.php | Ajax handler for searching available menu items. |
WP_Posts_List_Table::handle_row_actions()wp-admin/includes/class-wp-posts-list-table.php | Generates and displays row action links. |
WP_Posts_List_Table::column_cb()wp-admin/includes/class-wp-posts-list-table.php | Handles the checkbox column output. |
WP_Posts_List_Table::column_title()wp-admin/includes/class-wp-posts-list-table.php | Handles the title column output. |
WP_MS_Themes_List_Table::column_name()wp-admin/includes/class-wp-ms-themes-list-table.php | Handles the name column output. |
wp_ajax_crop_image()wp-admin/includes/ajax-actions.php | Handles cropping an image via AJAX. |
WP_MS_Sites_List_Table::handle_row_actions()wp-admin/includes/class-wp-ms-sites-list-table.php | Generates and displays row action links. |
WP_Terms_List_Table::handle_row_actions()wp-admin/includes/class-wp-terms-list-table.php | Generates and displays row action links. |
WP_MS_Users_List_Table::handle_row_actions()wp-admin/includes/class-wp-ms-users-list-table.php | Generates and displays row action links. |
WP_MS_Users_List_Table::column_username()wp-admin/includes/class-wp-ms-users-list-table.php | Handles the username column output. |
WP_Media_List_Table::column_parent()wp-admin/includes/class-wp-media-list-table.php | Handles the parent column output. |
WP_Media_List_Table::column_cb()wp-admin/includes/class-wp-media-list-table.php | Handles the checkbox column output. |
WP_Media_List_Table::column_title()wp-admin/includes/class-wp-media-list-table.php | Handles the title column output. |
WP_Customize_Manager::unsanitized_post_values()wp-includes/class-wp-customize-manager.php | Gets dirty pre-sanitized setting values in the current customized state. |
WP_Customize_Theme_Control::content_template()wp-includes/customize/class-wp-customize-theme-control.php | Render a JS template for theme display. |
WP_Customize_Media_Control::to_json()wp-includes/customize/class-wp-customize-media-control.php | Refresh the parameters passed to the JavaScript via JSON. |
customize_themes_print_templates()wp-admin/includes/theme.php | Prints JS templates for the theme-browsing UI in the Customizer. |
wp_ajax_update_plugin()wp-admin/includes/ajax-actions.php | Handles updating a plugin via AJAX. |
wp_media_attach_action()wp-admin/includes/media.php | Encapsulates the logic for Attach/Detach actions. |
wp_edit_attachments_query_vars()wp-admin/includes/post.php | Returns the query variables for the current attachments request. |
wp_ajax_destroy_sessions()wp-admin/includes/ajax-actions.php | Handles destroying multiple open sessions for a user via AJAX. |
Custom_Background::ajax_background_add()wp-admin/includes/class-custom-background.php | Handles Ajax request for adding custom background context to an attachment. |
WP_Customize_Panel::check_capabilities()wp-includes/class-wp-customize-panel.php | Checks required user capabilities and whether the theme has the feature support required by the panel. |
wp_ajax_parse_embed()wp-admin/includes/ajax-actions.php | Applies Ajax handlers to a string. |
wp_ajax_parse_media_shortcode()wp-admin/includes/ajax-actions.php | |
wp_ajax_set_attachment_thumbnail()wp-admin/includes/ajax-actions.php | Handles setting the featured image for an attachment via AJAX. |
_wp_handle_upload()wp-admin/includes/file.php | Handles PHP uploads in WordPress. |
WP_MS_Users_List_Table::ajax_user_can()wp-admin/includes/class-wp-ms-users-list-table.php | |
WP_MS_Users_List_Table::get_bulk_actions()wp-admin/includes/class-wp-ms-users-list-table.php | |
wp_prepare_themes_for_js()wp-admin/includes/theme.php | Prepares themes for JavaScript. |
get_theme_update_available()wp-admin/includes/theme.php | Retrieves the update link if there is a theme update available. |
get_theme_feature_list()wp-admin/includes/theme.php | Retrieves list of WordPress theme features (aka theme tags). |
WP_Plugins_List_Table::get_bulk_actions()wp-admin/includes/class-wp-plugins-list-table.php | |
WP_Plugins_List_Table::single_row()wp-admin/includes/class-wp-plugins-list-table.php | |
WP_Plugins_List_Table::__construct()wp-admin/includes/class-wp-plugins-list-table.php | Constructor. |
WP_Plugins_List_Table::ajax_user_can()wp-admin/includes/class-wp-plugins-list-table.php | |
WP_Plugins_List_Table::prepare_items()wp-admin/includes/class-wp-plugins-list-table.php | |
WP_Plugins_List_Table::no_items()wp-admin/includes/class-wp-plugins-list-table.php | |
WP_Links_List_Table::ajax_user_can()wp-admin/includes/class-wp-links-list-table.php | |
Theme_Upgrader_Skin::after()wp-admin/includes/class-theme-upgrader-skin.php | Performs an action following a single theme update. |
Theme_Installer_Skin::after()wp-admin/includes/class-theme-installer-skin.php | Performs an action following a single theme install. |
Plugin_Installer_Skin::after()wp-admin/includes/class-plugin-installer-skin.php | Performs an action following a plugin install. |
Bulk_Theme_Upgrader_Skin::bulk_footer()wp-admin/includes/class-bulk-theme-upgrader-skin.php | Displays the footer following the bulk update process. |
Bulk_Plugin_Upgrader_Skin::bulk_footer()wp-admin/includes/class-bulk-plugin-upgrader-skin.php | Displays the footer following the bulk update process. |
Plugin_Upgrader_Skin::after()wp-admin/includes/class-plugin-upgrader-skin.php | Performs an action following a single plugin update. |
WP_List_Table::comments_bubble()wp-admin/includes/class-wp-list-table.php | Displays a comment count bubble. |
check_import_new_users()wp-admin/includes/ms.php | Checks if the current user has permissions to import new users. |
site_admin_notice()wp-admin/includes/ms.php | Displays an admin notice to upgrade all sites after a core upgrade. |
WP_MS_Themes_List_Table::get_bulk_actions()wp-admin/includes/class-wp-ms-themes-list-table.php | |
WP_MS_Themes_List_Table::__construct()wp-admin/includes/class-wp-ms-themes-list-table.php | Constructor. |
WP_MS_Themes_List_Table::ajax_user_can()wp-admin/includes/class-wp-ms-themes-list-table.php | |
WP_MS_Themes_List_Table::prepare_items()wp-admin/includes/class-wp-ms-themes-list-table.php | |
wp_check_locked_posts()wp-admin/includes/misc.php | Checks lock status for posts displayed on the Posts screen. |
wp_refresh_post_lock()wp-admin/includes/misc.php | Checks lock status on the New/Edit Post screen and refresh the lock. |
wp_refresh_post_nonces()wp-admin/includes/misc.php | Checks nonce expiration on the New/Edit Post screen and refresh if needed. |
WP_Theme_Install_List_Table::ajax_user_can()wp-admin/includes/class-wp-theme-install-list-table.php | |
maintenance_nag()wp-admin/includes/update.php | Displays maintenance nag HTML message. |
core_update_footer()wp-admin/includes/update.php | Returns core update footer message. |
update_nag()wp-admin/includes/update.php | Returns core update notification message. |
update_right_now_message()wp-admin/includes/update.php | Displays WordPress version and active theme in the ‘At a Glance’ dashboard widget. |
wp_plugin_update_rows()wp-admin/includes/update.php | Adds a callback to display update information for plugins with updates available. |
wp_plugin_update_row()wp-admin/includes/update.php | Displays update information for a plugin. |
wp_theme_update_rows()wp-admin/includes/update.php | Adds a callback to display update information for themes with updates available. |
wp_theme_update_row()wp-admin/includes/update.php | Displays update information for a theme. |
wp_welcome_panel()wp-admin/includes/dashboard.php | Displays a welcome panel to introduce users to WordPress. |
install_plugin_install_status()wp-admin/includes/plugin-install.php | Determines the status we can perform on a plugin. |
install_plugin_information()wp-admin/includes/plugin-install.php | Displays plugin information in dialog box form. |
wp_dashboard_recent_posts()wp-admin/includes/dashboard.php | Generates Publishing Soon and Recently Published sections. |
wp_dashboard_recent_comments()wp-admin/includes/dashboard.php | Show Comments section. |
wp_dashboard_quota()wp-admin/includes/dashboard.php | Displays file upload quota on dashboard. |
wp_add_dashboard_widget()wp-admin/includes/dashboard.php | Adds a new dashboard widget. |
wp_dashboard_right_now()wp-admin/includes/dashboard.php | Dashboard widget that displays some basic stats about the site. |
wp_network_dashboard_right_now()wp-admin/includes/dashboard.php | |
wp_dashboard_quick_press()wp-admin/includes/dashboard.php | Displays the Quick Draft widget. |
_wp_dashboard_recent_comments_row()wp-admin/includes/dashboard.php | Outputs a row for the Recent Comments widget. |
wp_dashboard_setup()wp-admin/includes/dashboard.php | Registers dashboard widgets. |
user_can_access_admin_page()wp-admin/includes/plugin.php | Determines whether the current user can access the current admin page. |
add_menu_page()wp-admin/includes/plugin.php | Adds a top-level menu page. |
add_submenu_page()wp-admin/includes/plugin.php | Adds a submenu page. |
add_users_page()wp-admin/includes/plugin.php | Adds a submenu page to the Users/Profile main menu. |
validate_active_plugins()wp-admin/includes/plugin.php | Validates active plugins. |
WP_Plugin_Install_List_Table::display_rows()wp-admin/includes/class-wp-plugin-install-list-table.php | Generates the list table rows. |
edit_user()wp-admin/includes/user.php | Edit user settings based on contents of $_POST |
WP_Plugin_Install_List_Table::ajax_user_can()wp-admin/includes/class-wp-plugin-install-list-table.php | |
WP_Plugin_Install_List_Table::prepare_items()wp-admin/includes/class-wp-plugin-install-list-table.php | |
WP_Internal_Pointers::enqueue_scripts()wp-admin/includes/class-wp-internal-pointers.php | Initializes the new feature pointers. |
get_inline_data()wp-admin/includes/template.php | Adds hidden fields with the data for use in the inline editor for posts and pages. |
wp_comment_reply()wp-admin/includes/template.php | Outputs the in-line comment reply-to form in the Comments list table. |
meta_form()wp-admin/includes/template.php | Prints the form in the Custom Fields meta box. |
WP_Themes_List_Table::ajax_user_can()wp-admin/includes/class-wp-themes-list-table.php | |
WP_Themes_List_Table::no_items()wp-admin/includes/class-wp-themes-list-table.php | |
WP_Themes_List_Table::display_rows()wp-admin/includes/class-wp-themes-list-table.php | Generates the list table rows. |
wp_terms_checklist()wp-admin/includes/template.php | Outputs an unordered list of checkbox input elements labelled with term names. |
wp_popular_terms_checklist()wp-admin/includes/template.php | Retrieves a list of the most popular terms from the specified taxonomy. |
WP_Users_List_Table::single_row()wp-admin/includes/class-wp-users-list-table.php | Generates HTML for a single row on the users.php admin panel. |
WP_MS_Sites_List_Table::ajax_user_can()wp-admin/includes/class-wp-ms-sites-list-table.php | |
WP_MS_Sites_List_Table::get_bulk_actions()wp-admin/includes/class-wp-ms-sites-list-table.php | |
WP_Users_List_Table::ajax_user_can()wp-admin/includes/class-wp-users-list-table.php | Checks the current user’s permissions. |
WP_Users_List_Table::get_bulk_actions()wp-admin/includes/class-wp-users-list-table.php | Retrieves an associative array of bulk actions available on this table. |
WP_Users_List_Table::extra_tablenav()wp-admin/includes/class-wp-users-list-table.php | Outputs the controls to allow user roles to be changed in bulk. |
media_upload_max_image_resize()wp-admin/includes/media.php | Displays the checkbox to scale images. |
get_media_item()wp-admin/includes/media.php | Retrieves HTML form for modifying the image attachment. |
get_compat_media_markup()wp-admin/includes/media.php | |
media_upload_form_handler()wp-admin/includes/media.php | Handles form submissions for the legacy media uploader. |
get_sample_permalink_html()wp-admin/includes/post.php | Returns the HTML of the sample permalink slug editor. |
post_preview()wp-admin/includes/post.php | Saves a draft or manually autosaves for the purpose of showing a post preview. |
wp_autosave()wp-admin/includes/post.php | Saves a post submitted with XHR. |
wp_write_post()wp-admin/includes/post.php | Creates a new post from the “Write Post” form using |
add_meta()wp-admin/includes/post.php | Adds post meta data defined in the |
_wp_translate_postdata()wp-admin/includes/post.php | Renames |
edit_post()wp-admin/includes/post.php | Updates an existing post with values provided in |
bulk_edit_posts()wp-admin/includes/post.php | Processes the post data for the bulk editing of posts. |
wp_ajax_save_attachment_order()wp-admin/includes/ajax-actions.php | Handles saving the attachment order via AJAX. |
wp_ajax_send_attachment_to_editor()wp-admin/includes/ajax-actions.php | Handles sending an attachment to the editor via AJAX. |
wp_ajax_get_revision_diffs()wp-admin/includes/ajax-actions.php | Handles getting revision diffs via AJAX. |
wp_ajax_query_themes()wp-admin/includes/ajax-actions.php | Handles getting themes from themes_api() via AJAX. |
wp_ajax_save_widget()wp-admin/includes/ajax-actions.php | Handles saving a widget via AJAX. |
wp_ajax_upload_attachment()wp-admin/includes/ajax-actions.php | Handles uploading attachments via AJAX. |
wp_ajax_image_editor()wp-admin/includes/ajax-actions.php | Handles image editing via AJAX. |
wp_ajax_set_post_thumbnail()wp-admin/includes/ajax-actions.php | Handles setting the featured image via AJAX. |
wp_ajax_wp_remove_post_lock()wp-admin/includes/ajax-actions.php | Handles removing a post lock via AJAX. |
wp_ajax_get_attachment()wp-admin/includes/ajax-actions.php | Handles getting an attachment via AJAX. |
wp_ajax_query_attachments()wp-admin/includes/ajax-actions.php | Handles querying attachments via AJAX. |
wp_ajax_save_attachment()wp-admin/includes/ajax-actions.php | Handles updating attachment attributes via AJAX. |
wp_ajax_save_attachment_compat()wp-admin/includes/ajax-actions.php | Handles saving backward compatible attachment attributes via AJAX. |
wp_ajax_add_menu_item()wp-admin/includes/ajax-actions.php | Handles adding a menu item via AJAX. |
wp_ajax_add_meta()wp-admin/includes/ajax-actions.php | Handles adding meta via AJAX. |
wp_ajax_add_user()wp-admin/includes/ajax-actions.php | Handles adding a user via AJAX. |
wp_ajax_update_welcome_panel()wp-admin/includes/ajax-actions.php | Handles updating whether to display the welcome panel via AJAX. |
wp_ajax_menu_get_metabox()wp-admin/includes/ajax-actions.php | Handles for retrieving menu meta boxes via AJAX. |
wp_ajax_menu_locations_save()wp-admin/includes/ajax-actions.php | Handles saving menu locations via AJAX. |
wp_ajax_menu_quick_search()wp-admin/includes/ajax-actions.php | Handles menu quick searching via AJAX. |
wp_ajax_inline_save()wp-admin/includes/ajax-actions.php | Handles Quick Edit saving a post from a list table via AJAX. |
wp_ajax_inline_save_tax()wp-admin/includes/ajax-actions.php | Handles Quick Edit saving for a term via AJAX. |
wp_ajax_widgets_order()wp-admin/includes/ajax-actions.php | Handles saving the widgets order via AJAX. |
_wp_ajax_add_hierarchical_term()wp-admin/includes/ajax-actions.php | Handles adding a hierarchical term via AJAX. |
wp_ajax_delete_comment()wp-admin/includes/ajax-actions.php | Handles deleting a comment via AJAX. |
wp_ajax_delete_tag()wp-admin/includes/ajax-actions.php | Handles deleting a tag via AJAX. |
wp_ajax_delete_link()wp-admin/includes/ajax-actions.php | Handles deleting a link via AJAX. |
wp_ajax_delete_meta()wp-admin/includes/ajax-actions.php | Handles deleting meta via AJAX. |
wp_ajax_delete_post()wp-admin/includes/ajax-actions.php | Handles deleting a post via AJAX. |
wp_ajax_trash_post()wp-admin/includes/ajax-actions.php | Handles sending a post to the Trash via AJAX. |
wp_ajax_delete_page()wp-admin/includes/ajax-actions.php | Handles deleting a page via AJAX. |
wp_ajax_dim_comment()wp-admin/includes/ajax-actions.php | Handles dimming a comment via AJAX. |
wp_ajax_add_link_category()wp-admin/includes/ajax-actions.php | Handles adding a link category via AJAX. |
wp_ajax_add_tag()wp-admin/includes/ajax-actions.php | Handles adding a tag via AJAX. |
wp_ajax_get_tagcloud()wp-admin/includes/ajax-actions.php | Handles getting a tagcloud via AJAX. |
wp_ajax_get_comments()wp-admin/includes/ajax-actions.php | Handles getting comments via AJAX. |
wp_ajax_replyto_comment()wp-admin/includes/ajax-actions.php | Handles replying to a comment via AJAX. |
wp_ajax_edit_comment()wp-admin/includes/ajax-actions.php | Handles editing a comment via AJAX. |
wp_ajax_ajax_tag_search()wp-admin/includes/ajax-actions.php | Handles tag search via AJAX. |
wp_ajax_wp_compression_test()wp-admin/includes/ajax-actions.php | Handles compression testing via AJAX. |
wp_ajax_imgedit_preview()wp-admin/includes/ajax-actions.php | Handles image editor previews via AJAX. |
wp_ajax_autocomplete_user()wp-admin/includes/ajax-actions.php | Handles user autocomplete via AJAX. |
wp_prepare_revisions_for_js()wp-admin/includes/revision.php | Prepare revisions for JavaScript. |
post_custom_meta_box()wp-admin/includes/meta-boxes.php | Displays custom fields form fields. |
link_submit_meta_box()wp-admin/includes/meta-boxes.php | Displays link create form fields. |
wp_link_manager_disabled_message()wp-admin/includes/bookmark.php | Outputs the ‘disabled’ message for the WordPress Link Manager. |
post_submit_meta_box()wp-admin/includes/meta-boxes.php | Displays post submit form fields. |
attachment_submit_meta_box()wp-admin/includes/meta-boxes.php | Displays attachment submit form fields. |
post_tags_meta_box()wp-admin/includes/meta-boxes.php | Displays post tags form fields. |
post_categories_meta_box()wp-admin/includes/meta-boxes.php | Displays post categories form fields. |
edit_link()wp-admin/includes/bookmark.php | Updates or inserts a link using values provided in $_POST. |
WP_Media_List_Table::ajax_user_can()wp-admin/includes/class-wp-media-list-table.php | |
WP_Media_List_Table::extra_tablenav()wp-admin/includes/class-wp-media-list-table.php | |
WP_Media_List_Table::_get_row_actions()wp-admin/includes/class-wp-media-list-table.php | |
WP_Comments_List_Table::column_response()wp-admin/includes/class-wp-comments-list-table.php | |
WP_Comments_List_Table::extra_tablenav()wp-admin/includes/class-wp-comments-list-table.php | |
WP_Comments_List_Table::single_row()wp-admin/includes/class-wp-comments-list-table.php | |
WP_Terms_List_Table::inline_edit()wp-admin/includes/class-wp-terms-list-table.php | Outputs the hidden row displayed when inline editing |
WP_Comments_List_Table::ajax_user_can()wp-admin/includes/class-wp-comments-list-table.php | |
WP_Terms_List_Table::ajax_user_can()wp-admin/includes/class-wp-terms-list-table.php | |
WP_Terms_List_Table::get_bulk_actions()wp-admin/includes/class-wp-terms-list-table.php | |
WP_Terms_List_Table::column_cb()wp-admin/includes/class-wp-terms-list-table.php | |
WP_Posts_List_Table::inline_edit()wp-admin/includes/class-wp-posts-list-table.php | Outputs the hidden row displayed when inline editing |
WP_Posts_List_Table::get_bulk_actions()wp-admin/includes/class-wp-posts-list-table.php | |
WP_Posts_List_Table::extra_tablenav()wp-admin/includes/class-wp-posts-list-table.php | |
WP_Posts_List_Table::__construct()wp-admin/includes/class-wp-posts-list-table.php | Constructor. |
WP_Posts_List_Table::ajax_user_can()wp-admin/includes/class-wp-posts-list-table.php | |
edit_comment()wp-admin/includes/comment.php | Updates a comment with values provided in $_POST. |
Custom_Image_Header::ajax_header_crop()wp-admin/includes/class-custom-image-header.php | Gets attachment uploaded by Media Manager, crops it, then saves it as a new object. Returns JSON-encoded object details. |
Custom_Image_Header::ajax_header_add()wp-admin/includes/class-custom-image-header.php | Given an attachment ID for a header image, updates its “last used” timestamp to now. |
Custom_Image_Header::ajax_header_remove()wp-admin/includes/class-custom-image-header.php | Given an attachment ID for a header image, unsets it as a user-uploaded header image for the active theme. |
Custom_Image_Header::step_1()wp-admin/includes/class-custom-image-header.php | Displays first step of custom header image page. |
Custom_Image_Header::admin_page()wp-admin/includes/class-custom-image-header.php | Displays the page based on the current step. |
Custom_Image_Header::take_action()wp-admin/includes/class-custom-image-header.php | Executes custom header modification. |
confirm_delete_users()wp-admin/includes/ms.php | |
list_plugin_updates()wp-admin/update-core.php | Display the upgrade plugins form. |
list_theme_updates()wp-admin/update-core.php | Display the upgrade themes form. |
Custom_Background::wp_set_background_image()wp-admin/includes/class-custom-background.php | |
Custom_Background::admin_page()wp-admin/includes/class-custom-background.php | Displays the custom background page. |
_wp_menu_output()wp-admin/menu-header.php | Display menu. |
WP_Customize_Manager::enqueue_control_scripts()wp-includes/class-wp-customize-manager.php | Enqueues scripts for customize controls. |
WP_Customize_Manager::customize_preview_init()wp-includes/class-wp-customize-manager.php | Prints JavaScript settings. |
WP_Customize_Manager::customize_preview_settings()wp-includes/class-wp-customize-manager.php | Prints JavaScript settings for preview frame. |
WP_Customize_Manager::save()wp-includes/class-wp-customize-manager.php | Handles customize_save WP Ajax request to save/update a changeset. |
WP_Customize_Manager::setup_theme()wp-includes/class-wp-customize-manager.php | Starts preview and customize theme. |
WP_Customize_Manager::__construct()wp-includes/class-wp-customize-manager.php | Constructor. |
wp_register()wp-includes/general-template.php | Displays the Registration or Admin link. |
kses_init_filters()wp-includes/kses.php | Adds all KSES input form content filters. |
kses_init()wp-includes/kses.php | Sets up most of the KSES filters for input form content. |
WP_Query::get_posts()wp-includes/class-wp-query.php | Retrieves an array of posts based on query variables. |
wp_upload_bits()wp-includes/functions.php | Creates a file in the upload folder with given content. |
get_allowed_mime_types()wp-includes/functions.php | Retrieves the list of allowed mime types and file extensions. |
WP_Widget_Text::update()wp-includes/widgets/class-wp-widget-text.php | Handles updating settings for the current Text widget instance. |
wp_widget_rss_output()wp-includes/widgets.php | Display the RSS entries in a list. |
WP_Customize_Section::check_capabilities()wp-includes/class-wp-customize-section.php | Checks required user capabilities and whether the theme has the feature support required by the section. |
get_edit_user_link()wp-includes/link-template.php | Retrieves the edit user link. |
get_adjacent_post()wp-includes/link-template.php | Retrieves the adjacent post. |
get_edit_post_link()wp-includes/link-template.php | Retrieves the edit post link for post. |
get_delete_post_link()wp-includes/link-template.php | Retrieves the delete posts link for post. |
get_edit_comment_link()wp-includes/link-template.php | Retrieves the edit comment link. |
edit_comment_link()wp-includes/link-template.php | Displays the edit comment link with formatting. |
get_edit_bookmark_link()wp-includes/link-template.php | Displays the edit bookmark link. |
edit_bookmark_link()wp-includes/link-template.php | Displays the edit bookmark link anchor content. |
get_edit_term_link()wp-includes/link-template.php | Retrieves the URL for editing a given term. |
edit_term_link()wp-includes/link-template.php | Displays or retrieves the edit term link with formatting. |
wp_get_update_data()wp-includes/update.php | Collects counts and UI strings for available updates. |
wp_admin_bar_wp_menu()wp-includes/admin-bar.php | Adds the WordPress logo menu. |
wp_admin_bar_my_account_item()wp-includes/admin-bar.php | Adds the “My Account” item. |
wp_admin_bar_my_account_menu()wp-includes/admin-bar.php | Adds the “My Account” submenu items. |
wp_admin_bar_site_menu()wp-includes/admin-bar.php | Adds the “Site Name” menu. |
wp_admin_bar_my_sites_menu()wp-includes/admin-bar.php | Adds the “My Sites/[Site Name]” menu and all submenus. |
wp_admin_bar_edit_menu()wp-includes/admin-bar.php | Provides an edit link for posts and terms. |
wp_admin_bar_new_content_menu()wp-includes/admin-bar.php | Adds “Add New” menu. |
wp_admin_bar_comments_menu()wp-includes/admin-bar.php | Adds edit comments link with awaiting moderation count bubble. |
wp_admin_bar_appearance_menu()wp-includes/admin-bar.php | Adds appearance submenu items to the “Site Name” menu. |
WP_Customize_Setting::check_capabilities()wp-includes/class-wp-customize-setting.php | Validate user capabilities whether the theme supports the setting. |
wp_post_revision_title()wp-includes/post-template.php | Retrieves formatted date timestamp of a revision (linked to that revisions’s page). |
wp_post_revision_title_expanded()wp-includes/post-template.php | Retrieves formatted date timestamp of a revision (linked to that revisions’s page). |
wp_list_post_revisions()wp-includes/post-template.php | Displays a list of a post’s revisions. |
get_posts_by_author_sql()wp-includes/post.php | Retrieves the post SQL based on capability, author, and type. |
wp_insert_post()wp-includes/post.php | Inserts or update a post. |
_count_posts_cache_key()wp-includes/post.php | Returns the cache key for wp_count_posts() based on the passed arguments. |
wp_count_posts()wp-includes/post.php | Counts number of posts of a post type and if user has permissions to view. |
redirect_canonical()wp-includes/canonical.php | Redirects incoming links to the proper URL based on the site url. |
wp_xmlrpc_server::mt_getPostCategories()wp-includes/class-wp-xmlrpc-server.php | Retrieves post categories. |
wp_xmlrpc_server::mt_setPostCategories()wp-includes/class-wp-xmlrpc-server.php | Sets categories for a post. |
wp_xmlrpc_server::mt_publishPost()wp-includes/class-wp-xmlrpc-server.php | Sets a post’s publish status to ‘publish’. |
wp_xmlrpc_server::mw_editPost()wp-includes/class-wp-xmlrpc-server.php | Edits a post. |
wp_xmlrpc_server::mw_getPost()wp-includes/class-wp-xmlrpc-server.php | Retrieves a post. |
wp_xmlrpc_server::mw_getRecentPosts()wp-includes/class-wp-xmlrpc-server.php | Retrieves list of recent posts. |
wp_xmlrpc_server::mw_getCategories()wp-includes/class-wp-xmlrpc-server.php | Retrieves the list of categories on a given blog. |
wp_xmlrpc_server::mw_newMediaObject()wp-includes/class-wp-xmlrpc-server.php | Uploads a file, following your settings. |
wp_xmlrpc_server::mt_getRecentPostTitles()wp-includes/class-wp-xmlrpc-server.php | Retrieves the post titles of recent posts. |
wp_xmlrpc_server::mt_getCategoryList()wp-includes/class-wp-xmlrpc-server.php | Retrieves the list of all categories on a blog. |
wp_xmlrpc_server::blogger_getUserInfo()wp-includes/class-wp-xmlrpc-server.php | Retrieves user’s data. |
wp_xmlrpc_server::blogger_getPost()wp-includes/class-wp-xmlrpc-server.php | Retrieves a post. |
wp_xmlrpc_server::blogger_getRecentPosts()wp-includes/class-wp-xmlrpc-server.php | Retrieves the list of recent posts. |
wp_xmlrpc_server::blogger_newPost()wp-includes/class-wp-xmlrpc-server.php | Creates a new post. |
wp_xmlrpc_server::blogger_editPost()wp-includes/class-wp-xmlrpc-server.php | Edits a post. |
wp_xmlrpc_server::blogger_deletePost()wp-includes/class-wp-xmlrpc-server.php | Deletes a post. |
wp_xmlrpc_server::mw_newPost()wp-includes/class-wp-xmlrpc-server.php | Creates a new post. |
wp_xmlrpc_server::_getOptions()wp-includes/class-wp-xmlrpc-server.php | Retrieves blog options value from list. |
wp_xmlrpc_server::wp_setOptions()wp-includes/class-wp-xmlrpc-server.php | Updates blog options. |
wp_xmlrpc_server::wp_getMediaItem()wp-includes/class-wp-xmlrpc-server.php | Retrieves a media item by ID. |
wp_xmlrpc_server::wp_getPostFormats()wp-includes/class-wp-xmlrpc-server.php | Retrieves a list of post formats used by the site. |
wp_xmlrpc_server::wp_getMediaLibrary()wp-includes/class-wp-xmlrpc-server.php | Retrieves a collection of media library items (or attachments). |
wp_xmlrpc_server::wp_getPostType()wp-includes/class-wp-xmlrpc-server.php | Retrieves a post type. |
wp_xmlrpc_server::wp_getPostTypes()wp-includes/class-wp-xmlrpc-server.php | Retrieves post types. |
wp_xmlrpc_server::wp_getRevisions()wp-includes/class-wp-xmlrpc-server.php | Retrieves revisions for a specific post. |
wp_xmlrpc_server::wp_restoreRevision()wp-includes/class-wp-xmlrpc-server.php | Restores a post revision. |
wp_xmlrpc_server::blogger_getUsersBlogs()wp-includes/class-wp-xmlrpc-server.php | Retrieves blogs that user owns. |
wp_xmlrpc_server::wp_getComments()wp-includes/class-wp-xmlrpc-server.php | Retrieves comments. |
wp_xmlrpc_server::wp_deleteComment()wp-includes/class-wp-xmlrpc-server.php | Deletes a comment. |
wp_xmlrpc_server::wp_editComment()wp-includes/class-wp-xmlrpc-server.php | Edits a comment. |
wp_xmlrpc_server::wp_newComment()wp-includes/class-wp-xmlrpc-server.php | Creates a new comment. |
wp_xmlrpc_server::wp_getCommentStatusList()wp-includes/class-wp-xmlrpc-server.php | Retrieves all of the comment status. |
wp_xmlrpc_server::wp_getCommentCount()wp-includes/class-wp-xmlrpc-server.php | Retrieves comment counts. |
wp_xmlrpc_server::wp_getPostStatusList()wp-includes/class-wp-xmlrpc-server.php | Retrieves post statuses. |
wp_xmlrpc_server::wp_getPageStatusList()wp-includes/class-wp-xmlrpc-server.php | Retrieves page statuses. |
wp_xmlrpc_server::wp_getPageTemplates()wp-includes/class-wp-xmlrpc-server.php | Retrieves page templates. |
wp_xmlrpc_server::wp_getPages()wp-includes/class-wp-xmlrpc-server.php | Retrieves Pages. |
wp_xmlrpc_server::wp_deletePage()wp-includes/class-wp-xmlrpc-server.php | Deletes a page. |
wp_xmlrpc_server::wp_editPage()wp-includes/class-wp-xmlrpc-server.php | Edits a page. |
wp_xmlrpc_server::wp_getPageList()wp-includes/class-wp-xmlrpc-server.php | Retrieves page list. |
wp_xmlrpc_server::wp_getAuthors()wp-includes/class-wp-xmlrpc-server.php | Retrieves authors list. |
wp_xmlrpc_server::wp_getTags()wp-includes/class-wp-xmlrpc-server.php | Gets the list of all tags. |
wp_xmlrpc_server::wp_newCategory()wp-includes/class-wp-xmlrpc-server.php | Creates a new category. |
wp_xmlrpc_server::wp_deleteCategory()wp-includes/class-wp-xmlrpc-server.php | Deletes a category. |
wp_xmlrpc_server::wp_suggestCategories()wp-includes/class-wp-xmlrpc-server.php | Retrieves category list. |
wp_xmlrpc_server::wp_getComment()wp-includes/class-wp-xmlrpc-server.php | Retrieves a comment. |
wp_xmlrpc_server::wp_getPosts()wp-includes/class-wp-xmlrpc-server.php | Retrieves posts. |
wp_xmlrpc_server::wp_newTerm()wp-includes/class-wp-xmlrpc-server.php | Creates a new term. |
wp_xmlrpc_server::wp_editTerm()wp-includes/class-wp-xmlrpc-server.php | Edits a term. |
wp_xmlrpc_server::wp_deleteTerm()wp-includes/class-wp-xmlrpc-server.php | Deletes a term. |
wp_xmlrpc_server::wp_getTerm()wp-includes/class-wp-xmlrpc-server.php | Retrieves a term. |
wp_xmlrpc_server::wp_getTerms()wp-includes/class-wp-xmlrpc-server.php | Retrieves all terms for a taxonomy. |
wp_xmlrpc_server::wp_getTaxonomy()wp-includes/class-wp-xmlrpc-server.php | Retrieves a taxonomy. |
wp_xmlrpc_server::wp_getTaxonomies()wp-includes/class-wp-xmlrpc-server.php | Retrieves all taxonomies. |
wp_xmlrpc_server::wp_getUser()wp-includes/class-wp-xmlrpc-server.php | Retrieves a user. |
wp_xmlrpc_server::wp_getUsers()wp-includes/class-wp-xmlrpc-server.php | Retrieves users. |
wp_xmlrpc_server::wp_getProfile()wp-includes/class-wp-xmlrpc-server.php | Retrieves information about the requesting user. |
wp_xmlrpc_server::wp_editProfile()wp-includes/class-wp-xmlrpc-server.php | Edits user’s profile. |
wp_xmlrpc_server::wp_getPage()wp-includes/class-wp-xmlrpc-server.php | Retrieves a page. |
wp_xmlrpc_server::_insert_post()wp-includes/class-wp-xmlrpc-server.php | Helper method for wp_newPost() and wp_editPost(), containing shared logic. |
wp_xmlrpc_server::wp_deletePost()wp-includes/class-wp-xmlrpc-server.php | Deletes a post for any registered post type. |
wp_xmlrpc_server::wp_getPost()wp-includes/class-wp-xmlrpc-server.php | Retrieves a post. |
wp_xmlrpc_server::wp_getUsersBlogs()wp-includes/class-wp-xmlrpc-server.php | Retrieves the blogs of the user. |
wp_xmlrpc_server::get_custom_fields()wp-includes/class-wp-xmlrpc-server.php | Retrieves custom fields for post. |
wp_xmlrpc_server::set_custom_fields()wp-includes/class-wp-xmlrpc-server.php | Sets custom fields for post. |
WP_Customize_Header_Image_Control::render_content()wp-includes/customize/class-wp-customize-header-image-control.php | |
WP_Customize_Control::check_capabilities()wp-includes/class-wp-customize-control.php | Checks if the user can use this control. |
WP_Customize_Control::render_content()wp-includes/class-wp-customize-control.php | Render the control’s content. |
wp_comment_form_unfiltered_html_nonce()wp-includes/comment-template.php | Displays form token for unfiltered comments. |
WP_Customize_Widgets::sanitize_widget_instance()wp-includes/class-wp-customize-widgets.php | Sanitizes a widget instance. |
WP_Customize_Widgets::wp_ajax_update_widget()wp-includes/class-wp-customize-widgets.php | Updates widget settings asynchronously. |
WP_Customize_Widgets::__construct()wp-includes/class-wp-customize-widgets.php | Initial loader. |
_WP_Editors::editor()wp-includes/class-wp-editor.php | Outputs the HTML for a single instance of the editor. |
Changelog
Version | Description |
---|---|
5.8.0 | Converted to wrapper for the user_can() function. |
5.3.0 | Formalized the existing and already documented ...$args parameter by adding it to the function signature. |
2.0.0 | Introduced. |
If you want to check more than two roles, you can check if the roles of the current user is inside an array of roles, something like:
if ( !current_user_can( 'edit_posts' )) { show_admin_bar( false ); }
Reference: List of all Roles and Capabilities
hide admin bar if the current user is not an admin or do not have administrative access
This note is a bit misleading. Explicitly denying the capability by using
$user->add_cap( 'capability', false )
will not work. The only way to explicitly deny a capability for super admins is to use themap_meta_cap
filter to returndo_not_allow
for checks for that capability.Check if the current user can edit the post with a specific post ID:
The old Codex says current_user_can( $capability , $object_id ); but there’s no parameter $object_id in the head title on this page, even though it is listed in the Parameters section.
$args = array_slice( func_get_args(), 1 );