current_user_can( string $capability, mixed $args )
Returns whether the current user has the specified capability.
Contents
Description #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 #See also
Parameters #Parameters
- $capability
-
(string) (Required) Capability name.
- $args
-
(mixed) (Optional) further parameters, typically starting with an object ID.
Return #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 #Source
File: wp-includes/capabilities.php
function current_user_can( $capability, ...$args ) { $current_user = wp_get_current_user(); if ( empty( $current_user ) ) { return false; } return $current_user->has_cap( $capability, ...$args ); }
Expand full source code Collapse full source code View on Trac
Related #Related
Uses #Uses
Uses | Description |
---|---|
wp-includes/pluggable.php: wp_get_current_user() |
Retrieve the current user object. |
Used By #Used By
Used By | Description |
---|---|
wp-includes/rest-api/endpoints/class-wp-rest-site-health-controller.php: WP_REST_Site_Health_Controller::validate_request_permission() |
Validates if the current user can request this REST endpoint. |
wp-includes/rest-api/endpoints/class-wp-rest-application-passwords-controller.php: WP_REST_Application_Passwords_Controller::do_permissions_check() |
Performs a permissions check for the request. |
wp-includes/rest-api/endpoints/class-wp-rest-block-directory-controller.php: WP_REST_Block_Directory_Controller::get_items_permissions_check() |
Checks whether a given request has permission to install and activate plugins. |
wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php: WP_REST_Plugins_Controller::plugin_status_permission_check() |
Handle updating a plugin’s status. |
wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php: WP_REST_Plugins_Controller::get_item_permissions_check() |
Checks if a given request has access to get a specific plugin. |
wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php: WP_REST_Plugins_Controller::check_read_permission() |
Checks if the given plugin can be viewed by the current user. |
wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php: WP_REST_Plugins_Controller::create_item_permissions_check() |
Checks if a given request has access to upload plugins. |
wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php: WP_REST_Plugins_Controller::update_item_permissions_check() |
Checks if a given request has access to update a specific plugin. |
wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php: WP_REST_Plugins_Controller::delete_item_permissions_check() |
Checks if a given request has access to delete a specific plugin. |
wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php: WP_REST_Plugins_Controller::get_items_permissions_check() |
Checks if a given request has access to get plugins. |
wp-includes/rest-api/endpoints/class-wp-rest-block-types-controller.php: WP_REST_Block_Types_Controller::check_read_permission() |
Checks whether a given block type should be visible. |
wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php: WP_REST_Attachments_Controller::edit_media_item_permissions_check() |
Checks if a given request has access to editing media. |
wp-admin/includes/ajax-actions.php: wp_ajax_toggle_auto_updates() |
Ajax handler to enable or disable plugin and theme auto-updates. |
wp-admin/includes/ajax-actions.php: wp_ajax_media_create_image_subsizes() |
Ajax handler for creating missing image sub-sizes for just uploaded images. |
wp-admin/includes/theme.php: paused_themes_notice() |
Renders an admin notice in case some themes have been paused due to errors. |
wp-admin/includes/class-wp-site-health.php: WP_Site_Health::check_wp_version_check_exists() |
Test if |
wp-admin/includes/plugin.php: paused_plugins_notice() |
Renders an admin notice in case some plugins have been paused due to errors. |
wp-admin/includes/ajax-actions.php: wp_ajax_health_check_get_sizes() |
Ajax handler for site health check to get directories and database sizes. |
wp-admin/includes/ajax-actions.php: wp_ajax_health_check_dotorg_communication() |
Ajax handler for site health checks on server communication. |
wp-admin/includes/ajax-actions.php: wp_ajax_health_check_background_updates() |
Ajax handler for site health checks on background updates. |
wp-admin/includes/ajax-actions.php: wp_ajax_health_check_loopback_requests() |
Ajax handler for site health checks on loopback requests. |
wp-admin/includes/ajax-actions.php: wp_ajax_health_check_site_status_result() |
Ajax handler for site health check to update the result status. |
wp-includes/rest-api/endpoints/class-wp-rest-blocks-controller.php: WP_REST_Blocks_Controller::check_read_permission() |
Checks if a block can be read. |
wp-includes/rest-api/endpoints/class-wp-rest-themes-controller.php: WP_REST_Themes_Controller::get_items_permissions_check() |
Checks if a given request has access to read the theme. |
wp-includes/rest-api/endpoints/class-wp-rest-autosaves-controller.php: WP_REST_Autosaves_Controller::get_items_permissions_check() |
Checks if a given request has access to get autosaves. |
wp-includes/rest-api/endpoints/class-wp-rest-block-renderer-controller.php: WP_REST_Block_Renderer_Controller::get_item_permissions_check() |
Checks if a given request has access to read blocks. |
wp-includes/general-template.php: wp_get_code_editor_settings() |
Generate and return code editor settings. |
wp-admin/includes/template.php: do_block_editor_incompatible_meta_box() |
Function that renders a “fake” meta box with an information message, shown on the block editor, when an incompatible meta box is found. |
wp-admin/includes/meta-boxes.php: register_and_do_post_meta_boxes() |
Registers the default post meta boxes, and runs the |
wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php: WP_REST_Posts_Controller::get_available_actions() |
Get the link relations available for the post and current user. |
wp-admin/includes/class-wp-privacy-policy-content.php: WP_Privacy_Policy_Content::notice() |
Add a notice with a link to the guide when editing the privacy policy page. |
wp-admin/includes/class-wp-privacy-policy-content.php: WP_Privacy_Policy_Content::text_change_check() |
Quick check if any privacy info has changed. |
wp-admin/includes/ajax-actions.php: wp_ajax_wp_privacy_export_personal_data() |
Ajax handler for exporting a user’s personal data. |
wp-admin/includes/ajax-actions.php: wp_ajax_wp_privacy_erase_personal_data() |
Ajax handler for erasing personal data. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::get_term_custom_fields() |
Retrieve custom fields for a term. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::set_term_custom_fields() |
Set custom fields for a term. |
wp-includes/class-wp-customize-manager.php: WP_Customize_Manager::handle_load_themes_request() |
Load themes into the theme browsing/installation UI. |
wp-includes/class-wp-customize-manager.php: WP_Customize_Manager::check_changeset_lock_with_heartbeat() |
Check locked changeset with heartbeat API. |
wp-includes/class-wp-customize-manager.php: WP_Customize_Manager::handle_override_changeset_lock_request() |
Removes changeset lock when take over request is sent via Ajax. |
wp-includes/class-wp-customize-manager.php: WP_Customize_Manager::handle_dismiss_autosave_or_lock_request() |
Delete a given auto-draft changeset or the autosave revision for a given changeset or delete changeset lock. |
wp-includes/class-wp-customize-manager.php: WP_Customize_Manager::handle_changeset_trash_request() |
Handle request to trash a changeset. |
wp-includes/general-template.php: wp_enqueue_code_editor() |
Enqueue assets needed by the code editor for the given settings. |
wp-includes/widgets/class-wp-widget-custom-html.php: WP_Widget_Custom_HTML::update() |
Handles updating settings for the current Custom HTML widget instance. |
wp-includes/widgets/class-wp-widget-custom-html.php: WP_Widget_Custom_HTML::render_control_template_scripts() |
Render form template scripts. |
wp-includes/customize/class-wp-customize-themes-panel.php: WP_Customize_Themes_Panel::content_template() |
An Underscore (JS) template for this panel’s content (but not its container). |
wp-includes/customize/class-wp-customize-themes-panel.php: WP_Customize_Themes_Panel::render_template() |
An Underscore (JS) template for rendering this panel’s container. |
wp-includes/customize/class-wp-customize-themes-section.php: WP_Customize_Themes_Section::render_template() |
Render a themes section as a JS template. |
wp-admin/press-this.php: wp_load_press_this() | |
wp-admin/includes/file.php: wp_edit_theme_plugin_file() |
Attempts to edit a file for a theme or plugin. |
wp-includes/class-wp-oembed-controller.php: WP_oEmbed_Controller::get_proxy_item_permissions_check() |
Checks if current user can make a proxy oEmbed request. |
wp-includes/rest-api/fields/class-wp-rest-meta-fields.php: WP_REST_Meta_Fields::delete_meta_value() |
Deletes a meta value for an object. |
wp-includes/rest-api/fields/class-wp-rest-meta-fields.php: WP_REST_Meta_Fields::update_multi_meta_value() |
Updates multiple meta values for an object. |
wp-includes/rest-api/fields/class-wp-rest-meta-fields.php: WP_REST_Meta_Fields::update_meta_value() |
Updates a meta value for an object. |
wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php: WP_REST_Users_Controller::check_role_update() |
Determines if the current user is allowed to make the desired roles change. |
wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php: WP_REST_Users_Controller::delete_item_permissions_check() |
Checks if a given request has access delete a user. |
wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php: WP_REST_Users_Controller::create_item_permissions_check() |
Checks if a given request has access create users. |
wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php: WP_REST_Users_Controller::update_item_permissions_check() |
Checks if a given request has access to update a user. |
wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php: WP_REST_Users_Controller::get_items_permissions_check() |
Permissions check for getting all users. |
wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php: WP_REST_Users_Controller::get_items() |
Retrieves all users. |
wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php: WP_REST_Users_Controller::get_item_permissions_check() |
Checks if a given request has access to read a user. |
wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php: WP_REST_Revisions_Controller::delete_item_permissions_check() |
Checks if a given request has access to delete a revision. |
wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php: WP_REST_Revisions_Controller::get_items_permissions_check() |
Checks if a given request has access to get revisions. |
wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php: WP_REST_Attachments_Controller::create_item_permissions_check() |
Checks if a given request has access to create an attachment. |
wp-includes/rest-api/endpoints/class-wp-rest-post-statuses-controller.php: WP_REST_Post_Statuses_Controller::check_read_permission() |
Checks whether a given post status should be visible. |
wp-includes/rest-api/endpoints/class-wp-rest-post-statuses-controller.php: WP_REST_Post_Statuses_Controller::get_items_permissions_check() |
Checks whether a given request has permission to read post statuses. |
wp-includes/rest-api/endpoints/class-wp-rest-settings-controller.php: WP_REST_Settings_Controller::get_item_permissions_check() |
Checks if a given request has access to read and manage settings. |
wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php: WP_REST_Terms_Controller::create_item_permissions_check() |
Checks if a request has access to create a term. |
wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php: WP_REST_Terms_Controller::update_item_permissions_check() |
Checks if a request has access to update the specified term. |
wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php: WP_REST_Terms_Controller::delete_item_permissions_check() |
Checks if a request has access to delete the specified term. |
wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php: WP_REST_Terms_Controller::get_items_permissions_check() |
Checks if a request has access to read terms in the specified taxonomy. |
wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php: WP_REST_Terms_Controller::get_item_permissions_check() |
Checks if a request has access to read or edit the specified term. |
wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php: WP_REST_Posts_Controller::sanitize_post_statuses() |
Sanitizes and validates the list of post statuses, including whether the user can query private statuses. |
wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php: WP_REST_Posts_Controller::check_read_permission() |
Checks if a post can be read. |
wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php: WP_REST_Posts_Controller::check_update_permission() |
Checks if a post can be edited. |
wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php: WP_REST_Posts_Controller::check_create_permission() |
Checks if a post can be created. |
wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php: WP_REST_Posts_Controller::check_delete_permission() |
Checks if a post can be deleted. |
wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php: WP_REST_Posts_Controller::handle_status_param() |
Determines validity and normalizes the given status parameter. |
wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php: WP_REST_Posts_Controller::check_assign_terms_permission() |
Checks whether current user can assign all terms sent with the current request. |
wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php: WP_REST_Posts_Controller::update_item_permissions_check() |
Checks if a given request has access to update a post. |
wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php: WP_REST_Posts_Controller::create_item_permissions_check() |
Checks if a given request has access to create a post. |
wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php: WP_REST_Posts_Controller::get_items_permissions_check() |
Checks if a given request has access to read posts. |
wp-includes/rest-api/endpoints/class-wp-rest-taxonomies-controller.php: WP_REST_Taxonomies_Controller::get_item_permissions_check() |
Checks if a given request has access to a taxonomy. |
wp-includes/rest-api/endpoints/class-wp-rest-taxonomies-controller.php: WP_REST_Taxonomies_Controller::get_items_permissions_check() |
Checks whether a given request has permission to read taxonomies. |
wp-includes/rest-api/endpoints/class-wp-rest-taxonomies-controller.php: WP_REST_Taxonomies_Controller::get_items() |
Retrieves all public taxonomies. |
wp-includes/rest-api/endpoints/class-wp-rest-post-types-controller.php: WP_REST_Post_Types_Controller::get_items_permissions_check() |
Checks whether a given request has permission to read types. |
wp-includes/rest-api/endpoints/class-wp-rest-post-types-controller.php: WP_REST_Post_Types_Controller::get_items() |
Retrieves all public post types. |
wp-includes/rest-api/endpoints/class-wp-rest-post-types-controller.php: WP_REST_Post_Types_Controller::get_item() |
Retrieves a specific post type. |
wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php: WP_REST_Comments_Controller::check_edit_permission() |
Checks if a comment can be edited or deleted. |
wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php: WP_REST_Comments_Controller::check_read_post_permission() |
Checks if the post can be read. |
wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php: WP_REST_Comments_Controller::check_read_permission() |
Checks if the comment can be read. |
wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php: WP_REST_Comments_Controller::prepare_item_for_database() |
Prepares a single comment to be inserted into the database. |
wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php: WP_REST_Comments_Controller::get_item_permissions_check() |
Checks if a given request has access to read the comment. |
wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php: WP_REST_Comments_Controller::create_item_permissions_check() |
Checks if a given request has access to create a comment. |
wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php: WP_REST_Comments_Controller::create_item() |
Creates a comment. |
wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php: WP_REST_Comments_Controller::get_items_permissions_check() |
Checks if a given request has access to read comments. |
wp-includes/comment.php: wp_check_comment_flood() |
Checks whether comment flooding is occurring. |
wp-includes/class-wp-customize-nav-menus.php: WP_Customize_Nav_Menus::print_post_type_container() |
Print the markup for new menu items. |
wp-includes/class-wp-customize-nav-menus.php: WP_Customize_Nav_Menus::sanitize_nav_menus_created_posts() |
Sanitize post IDs for posts created for nav menu items to be published. |
wp-includes/class-wp-customize-nav-menus.php: WP_Customize_Nav_Menus::ajax_insert_auto_draft_post() |
Ajax handler for adding a new auto-draft post. |
wp-includes/class-wp-customize-manager.php: WP_Customize_Manager::validate_setting_values() |
Validates setting values. |
wp-admin/includes/ms.php: network_edit_site_nav() |
Outputs the HTML for a network’s “Edit Site” tabular interface. |
wp-admin/includes/ajax-actions.php: wp_ajax_delete_plugin() |
Ajax handler for deleting a plugin. |
wp-admin/includes/ajax-actions.php: wp_ajax_install_theme() |
Ajax handler for installing a theme. |
wp-admin/includes/ajax-actions.php: wp_ajax_update_theme() |
Ajax handler for updating a theme. |
wp-admin/includes/ajax-actions.php: wp_ajax_delete_theme() |
Ajax handler for deleting a theme. |
wp-admin/includes/ajax-actions.php: wp_ajax_install_plugin() |
Ajax handler for installing a plugin. |
wp-admin/includes/ajax-actions.php: wp_ajax_get_post_thumbnail_html() |
Ajax handler for retrieving HTML for the featured image. |
wp-includes/customize/class-wp-customize-partial.php: WP_Customize_Partial::check_capabilities() |
Checks if the user can refresh this partial. |
wp-includes/class-wp-customize-manager.php: WP_Customize_Manager::customize_pane_settings() |
Print JavaScript settings for parent window. |
wp-includes/comment.php: wp_handle_comment_submission() |
Handles the submission of a comment, usually posted to wp-comments-post.php via a comment form. |
wp-admin/includes/class-wp-screen.php: WP_Screen::render_meta_boxes_preferences() |
Render the meta boxes preferences. |
wp-admin/includes/ajax-actions.php: wp_ajax_save_wporg_username() |
Ajax handler for saving the user’s WordPress.org username. |
wp-admin/includes/ajax-actions.php: wp_ajax_delete_inactive_widgets() |
Ajax handler for removing inactive widgets. |
wp-includes/admin-bar.php: wp_admin_bar_customize_menu() |
Adds the “Customize” link to the Toolbar. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::_toggle_sticky() |
Encapsulate the logic for sticking a post and determining if the user has permission to do so |
wp-includes/class-wp-customize-nav-menus.php: WP_Customize_Nav_Menus::__construct() |
Constructor. |
wp-includes/class-wp-customize-nav-menus.php: WP_Customize_Nav_Menus::ajax_load_available_items() |
Ajax handler for loading available menu items. |
wp-includes/class-wp-customize-nav-menus.php: WP_Customize_Nav_Menus::ajax_search_available_items() |
Ajax handler for searching available menu items. |
wp-admin/includes/class-wp-posts-list-table.php: WP_Posts_List_Table::handle_row_actions() |
Generates and displays row action links. |
wp-admin/includes/class-wp-posts-list-table.php: WP_Posts_List_Table::column_cb() |
Handles the checkbox column output. |
wp-admin/includes/class-wp-posts-list-table.php: WP_Posts_List_Table::column_title() |
Handles the title column output. |
wp-admin/includes/class-wp-ms-themes-list-table.php: WP_MS_Themes_List_Table::column_name() |
Handles the name column output. |
wp-admin/includes/ajax-actions.php: wp_ajax_crop_image() |
Ajax handler for cropping an image. |
wp-admin/includes/class-wp-ms-sites-list-table.php: WP_MS_Sites_List_Table::handle_row_actions() |
Generates and displays row action links. |
wp-admin/includes/class-wp-terms-list-table.php: WP_Terms_List_Table::handle_row_actions() |
Generates and displays row action links. |
wp-admin/includes/class-wp-ms-users-list-table.php: WP_MS_Users_List_Table::handle_row_actions() |
Generates and displays row action links. |
wp-admin/includes/class-wp-ms-users-list-table.php: WP_MS_Users_List_Table::column_username() |
Handles the username column output. |
wp-admin/includes/class-wp-media-list-table.php: WP_Media_List_Table::column_parent() |
Handles the parent column output. |
wp-admin/includes/class-wp-media-list-table.php: WP_Media_List_Table::column_cb() |
Handles the checkbox column output. |
wp-admin/includes/class-wp-media-list-table.php: WP_Media_List_Table::column_title() |
Handles the title column output. |
wp-includes/class-wp-customize-manager.php: WP_Customize_Manager::unsanitized_post_values() |
Get dirty pre-sanitized setting values in the current customized state. |
wp-includes/customize/class-wp-customize-theme-control.php: WP_Customize_Theme_Control::content_template() |
Render a JS template for theme display. |
wp-includes/customize/class-wp-customize-media-control.php: WP_Customize_Media_Control::to_json() |
Refresh the parameters passed to the JavaScript via JSON. |
wp-admin/includes/theme.php: customize_themes_print_templates() |
Print JS templates for the theme-browsing UI in the Customizer. |
wp-admin/includes/ajax-actions.php: wp_ajax_update_plugin() |
Ajax handler for updating a plugin. |
wp-admin/includes/media.php: wp_media_attach_action() |
Encapsulates the logic for Attach/Detach actions. |
wp-admin/includes/post.php: wp_edit_attachments_query_vars() |
Get the query variables for the current attachments request. |
wp-admin/includes/ajax-actions.php: wp_ajax_destroy_sessions() |
Ajax handler for destroying multiple open sessions for a user. |
wp-admin/includes/class-custom-background.php: Custom_Background::ajax_background_add() |
Ajax handler for adding custom background context to an attachment. |
wp-includes/class-wp-customize-panel.php: WP_Customize_Panel::check_capabilities() |
Checks required user capabilities and whether the theme has the feature support required by the panel. |
wp-admin/includes/ajax-actions.php: wp_ajax_parse_embed() |
Apply [embed] Ajax handlers to a string. |
wp-admin/includes/ajax-actions.php: wp_ajax_parse_media_shortcode() | |
wp-admin/includes/ajax-actions.php: wp_ajax_set_attachment_thumbnail() |
Ajax handler for setting the featured image for an attachment. |
wp-admin/includes/file.php: _wp_handle_upload() |
Handles PHP uploads in WordPress. |
wp-admin/includes/class-wp-ms-users-list-table.php: 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/theme.php: wp_prepare_themes_for_js() |
Prepare themes for JavaScript. |
wp-admin/includes/theme.php: get_theme_update_available() |
Retrieve the update link if there is a theme update available. |
wp-admin/includes/theme.php: get_theme_feature_list() |
Retrieve list of WordPress theme features (aka theme tags). |
wp-admin/includes/class-wp-plugins-list-table.php: 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() |
Constructor. |
wp-admin/includes/class-wp-plugins-list-table.php: 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-links-list-table.php: WP_Links_List_Table::ajax_user_can() | |
wp-admin/includes/class-theme-upgrader-skin.php: Theme_Upgrader_Skin::after() |
Action to perform following a single theme update. |
wp-admin/includes/class-theme-installer-skin.php: Theme_Installer_Skin::after() |
Action to perform following a single theme install. |
wp-admin/includes/class-plugin-installer-skin.php: Plugin_Installer_Skin::after() |
Action to perform following a plugin install. |
wp-admin/includes/class-bulk-theme-upgrader-skin.php: Bulk_Theme_Upgrader_Skin::bulk_footer() | |
wp-admin/includes/class-bulk-plugin-upgrader-skin.php: Bulk_Plugin_Upgrader_Skin::bulk_footer() | |
wp-admin/includes/class-plugin-upgrader-skin.php: Plugin_Upgrader_Skin::after() |
Action to perform following a single plugin update. |
wp-admin/includes/ms.php: check_import_new_users() |
Checks if the current user has permissions to import new users. |
wp-admin/includes/ms.php: site_admin_notice() |
Displays an admin notice to upgrade all sites after a core upgrade. |
wp-admin/includes/class-wp-ms-themes-list-table.php: WP_MS_Themes_List_Table::get_bulk_actions() | |
wp-admin/includes/class-wp-ms-themes-list-table.php: WP_MS_Themes_List_Table::__construct() |
Constructor. |
wp-admin/includes/class-wp-ms-themes-list-table.php: 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/misc.php: wp_check_locked_posts() |
Check lock status for posts displayed on the Posts screen |
wp-admin/includes/misc.php: wp_refresh_post_lock() |
Check lock status on the New/Edit Post screen and refresh the lock |
wp-admin/includes/misc.php: wp_refresh_post_nonces() |
Check nonce expiration on the New/Edit Post screen and refresh if needed |
wp-admin/includes/class-wp-theme-install-list-table.php: WP_Theme_Install_List_Table::ajax_user_can() | |
wp-admin/includes/update.php: maintenance_nag() | |
wp-admin/includes/update.php: core_update_footer() | |
wp-admin/includes/update.php: update_nag() | |
wp-admin/includes/update.php: update_right_now_message() |
Displays WordPress version and active theme in the ‘At a Glance’ dashboard widget. |
wp-admin/includes/update.php: wp_plugin_update_rows() | |
wp-admin/includes/update.php: wp_plugin_update_row() |
Displays update information for a plugin. |
wp-admin/includes/update.php: wp_theme_update_rows() | |
wp-admin/includes/update.php: wp_theme_update_row() |
Displays update information for a theme. |
wp-admin/includes/plugin-install.php: install_plugin_install_status() |
Determine the status we can perform on a plugin. |
wp-admin/includes/plugin-install.php: install_plugin_information() |
Display plugin information in dialog box form. |
wp-admin/includes/dashboard.php: wp_welcome_panel() |
Displays a welcome panel to introduce users to WordPress. |
wp-admin/includes/dashboard.php: wp_dashboard_recent_posts() |
Generates Publishing Soon and Recently Published sections. |
wp-admin/includes/dashboard.php: wp_dashboard_recent_comments() |
Show Comments section. |
wp-admin/includes/dashboard.php: wp_dashboard_quota() |
Displays file upload quota on dashboard. |
wp-admin/includes/dashboard.php: wp_add_dashboard_widget() |
Adds a new dashboard widget. |
wp-admin/includes/dashboard.php: wp_dashboard_right_now() |
Dashboard widget that displays some basic stats about the site. |
wp-admin/includes/dashboard.php: wp_network_dashboard_right_now() | |
wp-admin/includes/dashboard.php: wp_dashboard_quick_press() |
The Quick Draft widget display and creation of drafts. |
wp-admin/includes/dashboard.php: _wp_dashboard_recent_comments_row() |
Outputs a row for the Recent Comments widget. |
wp-admin/includes/dashboard.php: wp_dashboard_setup() |
Registers dashboard widgets. |
wp-admin/includes/plugin.php: user_can_access_admin_page() |
Determines whether the current user can access the current admin page. |
wp-admin/includes/plugin.php: add_menu_page() |
Add a top-level menu page. |
wp-admin/includes/plugin.php: add_submenu_page() |
Add a submenu page. |
wp-admin/includes/plugin.php: add_users_page() |
Add submenu page to the Users/Profile main menu. |
wp-admin/includes/plugin.php: validate_active_plugins() |
Validate active plugins |
wp-admin/includes/class-wp-plugin-install-list-table.php: WP_Plugin_Install_List_Table::display_rows() | |
wp-admin/includes/user.php: edit_user() |
Edit user settings based on contents of $_POST |
wp-admin/includes/class-wp-plugin-install-list-table.php: 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-internal-pointers.php: WP_Internal_Pointers::enqueue_scripts() |
Initializes the new feature pointers. |
wp-admin/includes/template.php: get_inline_data() |
Adds hidden fields with the data for use in the inline editor for posts and pages. |
wp-admin/includes/template.php: wp_comment_reply() |
Outputs the in-line comment reply-to form in the Comments list table. |
wp-admin/includes/template.php: meta_form() |
Prints the form in the Custom Fields meta box. |
wp-admin/includes/class-wp-themes-list-table.php: 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/template.php: wp_terms_checklist() |
Output an unordered list of checkbox input elements labelled with term names. |
wp-admin/includes/template.php: wp_popular_terms_checklist() |
Retrieve a list of the most popular terms from the specified taxonomy. |
wp-admin/includes/class-wp-ms-sites-list-table.php: 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-users-list-table.php: WP_Users_List_Table::single_row() |
Generate HTML for a single row on the users.php admin panel. |
wp-admin/includes/class-wp-users-list-table.php: WP_Users_List_Table::ajax_user_can() |
Check the current user’s permissions. |
wp-admin/includes/class-wp-users-list-table.php: WP_Users_List_Table::get_bulk_actions() |
Retrieve an associative array of bulk actions available on this table. |
wp-admin/includes/class-wp-users-list-table.php: WP_Users_List_Table::extra_tablenav() |
Output the controls to allow user roles to be changed in bulk. |
wp-admin/includes/media.php: media_upload_max_image_resize() |
Displays the checkbox to scale images. |
wp-admin/includes/media.php: get_media_item() |
Retrieve HTML form for modifying the image attachment. |
wp-admin/includes/media.php: get_compat_media_markup() | |
wp-admin/includes/media.php: media_upload_form_handler() |
Handles form submissions for the legacy media uploader. |
wp-admin/includes/post.php: get_sample_permalink_html() |
Returns the HTML of the sample permalink slug editor. |
wp-admin/includes/post.php: post_preview() |
Saves a draft or manually autosaves for the purpose of showing a post preview. |
wp-admin/includes/post.php: wp_autosave() |
Save a post submitted with XHR |
wp-admin/includes/post.php: wp_write_post() |
Creates a new post from the “Write Post” form using $_POST information. |
wp-admin/includes/post.php: add_meta() |
Add post meta data defined in $_POST superglobal for post with given ID. |
wp-admin/includes/ajax-actions.php: wp_ajax_save_attachment_order() |
Ajax handler for saving the attachment order. |
wp-admin/includes/ajax-actions.php: wp_ajax_send_attachment_to_editor() |
Ajax handler for sending an attachment to the editor. |
wp-admin/includes/ajax-actions.php: wp_ajax_get_revision_diffs() |
Ajax handler for getting revision diffs. |
wp-admin/includes/ajax-actions.php: wp_ajax_query_themes() |
Ajax handler for getting themes from themes_api(). |
wp-admin/includes/post.php: _wp_translate_postdata() |
Rename $_POST data from form names to DB post columns. |
wp-admin/includes/post.php: edit_post() |
Update an existing post with values provided in $_POST. |
wp-admin/includes/post.php: bulk_edit_posts() |
Process the post data for the bulk editing of posts. |
wp-admin/includes/ajax-actions.php: wp_ajax_save_widget() |
Ajax handler for saving a widget. |
wp-admin/includes/ajax-actions.php: wp_ajax_upload_attachment() |
Ajax handler for uploading attachments |
wp-admin/includes/ajax-actions.php: wp_ajax_image_editor() |
Ajax handler for image editing. |
wp-admin/includes/ajax-actions.php: wp_ajax_set_post_thumbnail() |
Ajax handler for setting the featured image. |
wp-admin/includes/ajax-actions.php: wp_ajax_wp_remove_post_lock() |
Ajax handler for removing a post lock. |
wp-admin/includes/ajax-actions.php: wp_ajax_get_attachment() |
Ajax handler for getting an attachment. |
wp-admin/includes/ajax-actions.php: wp_ajax_query_attachments() |
Ajax handler for querying attachments. |
wp-admin/includes/ajax-actions.php: wp_ajax_save_attachment() |
Ajax handler for updating attachment attributes. |
wp-admin/includes/ajax-actions.php: wp_ajax_save_attachment_compat() |
Ajax handler for saving backward compatible attachment attributes. |
wp-admin/includes/ajax-actions.php: wp_ajax_add_menu_item() |
Ajax handler for adding a menu item. |
wp-admin/includes/ajax-actions.php: wp_ajax_add_meta() |
Ajax handler for adding meta. |
wp-admin/includes/ajax-actions.php: wp_ajax_add_user() |
Ajax handler for adding a user. |
wp-admin/includes/ajax-actions.php: wp_ajax_update_welcome_panel() |
Ajax handler for updating whether to display the welcome panel. |
wp-admin/includes/ajax-actions.php: wp_ajax_menu_get_metabox() |
Ajax handler for retrieving menu meta boxes. |
wp-admin/includes/ajax-actions.php: wp_ajax_menu_locations_save() |
Ajax handler for menu locations save. |
wp-admin/includes/ajax-actions.php: wp_ajax_menu_quick_search() |
Ajax handler for menu quick searching. |
wp-admin/includes/ajax-actions.php: wp_ajax_inline_save() |
Ajax handler for Quick Edit saving a post from a list table. |
wp-admin/includes/ajax-actions.php: wp_ajax_inline_save_tax() |
Ajax handler for quick edit saving for a term. |
wp-admin/includes/ajax-actions.php: wp_ajax_widgets_order() |
Ajax handler for saving the widgets order. |
wp-admin/includes/ajax-actions.php: _wp_ajax_add_hierarchical_term() |
Ajax handler for adding a hierarchical term. |
wp-admin/includes/ajax-actions.php: wp_ajax_delete_comment() |
Ajax handler for deleting a comment. |
wp-admin/includes/ajax-actions.php: wp_ajax_delete_tag() |
Ajax handler for deleting a tag. |
wp-admin/includes/ajax-actions.php: wp_ajax_delete_link() |
Ajax handler for deleting a link. |
wp-admin/includes/ajax-actions.php: wp_ajax_delete_meta() |
Ajax handler for deleting meta. |
wp-admin/includes/ajax-actions.php: wp_ajax_delete_post() |
Ajax handler for deleting a post. |
wp-admin/includes/ajax-actions.php: wp_ajax_trash_post() |
Ajax handler for sending a post to the Trash. |
wp-admin/includes/ajax-actions.php: wp_ajax_delete_page() |
Ajax handler to delete a page. |
wp-admin/includes/ajax-actions.php: wp_ajax_dim_comment() |
Ajax handler to dim a comment. |
wp-admin/includes/ajax-actions.php: wp_ajax_add_link_category() |
Ajax handler for adding a link category. |
wp-admin/includes/ajax-actions.php: wp_ajax_add_tag() |
Ajax handler to add a tag. |
wp-admin/includes/ajax-actions.php: wp_ajax_get_tagcloud() |
Ajax handler for getting a tagcloud. |
wp-admin/includes/ajax-actions.php: wp_ajax_get_comments() |
Ajax handler for getting comments. |
wp-admin/includes/ajax-actions.php: wp_ajax_replyto_comment() |
Ajax handler for replying to a comment. |
wp-admin/includes/ajax-actions.php: wp_ajax_edit_comment() |
Ajax handler for editing a comment. |
wp-admin/includes/ajax-actions.php: wp_ajax_ajax_tag_search() |
Ajax handler for tag search. |
wp-admin/includes/ajax-actions.php: wp_ajax_wp_compression_test() |
Ajax handler for compression testing. |
wp-admin/includes/ajax-actions.php: wp_ajax_imgedit_preview() |
Ajax handler for image editor previews. |
wp-admin/includes/ajax-actions.php: wp_ajax_autocomplete_user() |
Ajax handler for user autocomplete. |
wp-admin/includes/revision.php: wp_prepare_revisions_for_js() |
Prepare revisions for JavaScript. |
wp-admin/includes/meta-boxes.php: post_custom_meta_box() |
Display custom fields form fields. |
wp-admin/includes/meta-boxes.php: link_submit_meta_box() |
Display link create form fields. |
wp-admin/includes/bookmark.php: wp_link_manager_disabled_message() |
Outputs the ‘disabled’ message for the WordPress Link Manager. |
wp-admin/includes/meta-boxes.php: post_submit_meta_box() |
Displays post submit form fields. |
wp-admin/includes/meta-boxes.php: attachment_submit_meta_box() |
Display attachment submit form fields. |
wp-admin/includes/meta-boxes.php: post_tags_meta_box() |
Display post tags form fields. |
wp-admin/includes/meta-boxes.php: post_categories_meta_box() |
Display post categories form fields. |
wp-admin/includes/bookmark.php: edit_link() |
Updates or inserts a link using values provided in $_POST. |
wp-admin/includes/class-wp-media-list-table.php: 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-comments-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_Comments_List_Table::ajax_user_can() | |
wp-admin/includes/class-wp-terms-list-table.php: WP_Terms_List_Table::inline_edit() |
Outputs the hidden row displayed when inline editing |
wp-admin/includes/class-wp-terms-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-posts-list-table.php: WP_Posts_List_Table::inline_edit() |
Outputs the hidden row displayed when inline editing |
wp-admin/includes/class-wp-posts-list-table.php: 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() |
Constructor. |
wp-admin/includes/class-wp-posts-list-table.php: WP_Posts_List_Table::ajax_user_can() | |
wp-admin/includes/comment.php: edit_comment() |
Update a comment with values provided in $_POST. |
wp-admin/includes/class-custom-image-header.php: Custom_Image_Header::ajax_header_crop() |
Gets attachment uploaded by Media Manager, crops it, then saves it as a new object. Returns JSON-encoded object details. |
wp-admin/includes/class-custom-image-header.php: Custom_Image_Header::ajax_header_add() |
Given an attachment ID for a header image, updates its “last used” timestamp to now. |
wp-admin/includes/class-custom-image-header.php: Custom_Image_Header::ajax_header_remove() |
Given an attachment ID for a header image, unsets it as a user-uploaded header image for the current theme. |
wp-admin/includes/class-custom-image-header.php: Custom_Image_Header::step_1() |
Display first step of custom header image page. |
wp-admin/includes/class-custom-image-header.php: Custom_Image_Header::admin_page() |
Display the page based on the current step. |
wp-admin/includes/class-custom-image-header.php: Custom_Image_Header::take_action() |
Execute custom header modification. |
wp-admin/includes/ms.php: confirm_delete_users() | |
wp-admin/update-core.php: list_plugin_updates() |
Display the upgrade plugins form. |
wp-admin/update-core.php: list_theme_updates() |
Display the upgrade themes form. |
wp-admin/includes/class-custom-background.php: Custom_Background::wp_set_background_image() | |
wp-admin/includes/class-custom-background.php: Custom_Background::admin_page() |
Display the custom background page. |
wp-admin/menu-header.php: _wp_menu_output() |
Display menu. |
wp-includes/class-wp-customize-manager.php: WP_Customize_Manager::enqueue_control_scripts() |
Enqueue scripts for customize controls. |
wp-includes/class-wp-customize-manager.php: WP_Customize_Manager::customize_preview_init() |
Print JavaScript settings. |
wp-includes/class-wp-customize-manager.php: WP_Customize_Manager::customize_preview_settings() |
Print JavaScript settings for preview frame. |
wp-includes/class-wp-customize-manager.php: WP_Customize_Manager::save() |
Handle customize_save WP Ajax request to save/update a changeset. |
wp-includes/class-wp-customize-manager.php: WP_Customize_Manager::setup_theme() |
Start preview and customize theme. |
wp-includes/class-wp-customize-manager.php: WP_Customize_Manager::__construct() |
Constructor. |
wp-includes/general-template.php: wp_register() |
Display the Registration or Admin link. |
wp-includes/kses.php: kses_init_filters() |
Adds all KSES input form content filters. |
wp-includes/kses.php: kses_init() |
Sets up most of the KSES filters for input form content. |
wp-includes/class-wp-query.php: WP_Query::get_posts() |
Retrieves an array of posts based on query variables. |
wp-includes/functions.php: wp_upload_bits() |
Create a file in the upload folder with given content. |
wp-includes/functions.php: get_allowed_mime_types() |
Retrieve list of allowed mime types and file extensions. |
wp-includes/widgets/class-wp-widget-text.php: WP_Widget_Text::update() |
Handles updating settings for the current Text widget instance. |
wp-includes/widgets.php: wp_widget_rss_output() |
Display the RSS entries in a list. |
wp-includes/class-wp-customize-section.php: WP_Customize_Section::check_capabilities() |
Checks required user capabilities and whether the theme has the feature support required by the section. |
wp-includes/link-template.php: get_edit_user_link() |
Retrieves the edit user link. |
wp-includes/link-template.php: get_adjacent_post() |
Retrieves the adjacent post. |
wp-includes/link-template.php: get_edit_post_link() |
Retrieves the edit post link for post. |
wp-includes/link-template.php: get_delete_post_link() |
Retrieves the delete posts link for post. |
wp-includes/link-template.php: get_edit_comment_link() |
Retrieves the edit comment link. |
wp-includes/link-template.php: edit_comment_link() |
Displays the edit comment link with formatting. |
wp-includes/link-template.php: get_edit_bookmark_link() |
Displays the edit bookmark link. |
wp-includes/link-template.php: edit_bookmark_link() |
Displays the edit bookmark link anchor content. |
wp-includes/link-template.php: get_edit_term_link() |
Retrieves the URL for editing a given term. |
wp-includes/link-template.php: edit_term_link() |
Displays or retrieves the edit term link with formatting. |
wp-includes/update.php: wp_get_update_data() |
Collect counts and UI strings for available updates |
wp-includes/admin-bar.php: wp_admin_bar_wp_menu() |
Add the WordPress logo menu. |
wp-includes/admin-bar.php: wp_admin_bar_my_account_item() |
Add the “My Account” item. |
wp-includes/admin-bar.php: wp_admin_bar_my_account_menu() |
Add the “My Account” submenu items. |
wp-includes/admin-bar.php: wp_admin_bar_site_menu() |
Add the “Site Name” menu. |
wp-includes/admin-bar.php: wp_admin_bar_my_sites_menu() |
Add the “My Sites/[Site Name]” menu and all submenus. |
wp-includes/admin-bar.php: wp_admin_bar_edit_menu() |
Provide an edit link for posts and terms. |
wp-includes/admin-bar.php: wp_admin_bar_new_content_menu() |
Add “Add New” menu. |
wp-includes/admin-bar.php: wp_admin_bar_comments_menu() |
Add edit comments link with awaiting moderation count bubble. |
wp-includes/admin-bar.php: wp_admin_bar_appearance_menu() |
Add appearance submenu items to the “Site Name” menu. |
wp-includes/class-wp-customize-setting.php: WP_Customize_Setting::check_capabilities() |
Validate user capabilities whether the theme supports the setting. |
wp-includes/post-template.php: wp_post_revision_title() |
Retrieve formatted date timestamp of a revision (linked to that revisions’s page). |
wp-includes/post-template.php: wp_post_revision_title_expanded() |
Retrieve formatted date timestamp of a revision (linked to that revisions’s page). |
wp-includes/post-template.php: wp_list_post_revisions() |
Display a list of a post’s revisions. |
wp-includes/media.php: wp_prepare_attachment_for_js() |
Prepares an attachment post object for JS, where it is expected to be JSON-encoded and fit into an Attachment model. |
wp-includes/post.php: get_posts_by_author_sql() |
Retrieve the post SQL based on capability, author, and type. |
wp-includes/post.php: wp_insert_post() |
Insert or update a post. |
wp-includes/post.php: _count_posts_cache_key() |
Return the cache key for wp_count_posts() based on the passed arguments. |
wp-includes/post.php: wp_count_posts() |
Count number of posts of a post type and if user has permissions to view. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::mt_getPostCategories() |
Retrieve post categories. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::mt_setPostCategories() |
Sets categories for a post. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::mt_publishPost() |
Sets a post’s publish status to ‘publish’. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::mw_editPost() |
Edit a post. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::mw_getPost() |
Retrieve post. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::mw_getRecentPosts() |
Retrieve list of recent posts. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::mw_getCategories() |
Retrieve the list of categories on a given blog. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::mw_newMediaObject() |
Uploads a file, following your settings. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::mt_getRecentPostTitles() |
Retrieve the post titles of recent posts. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::mt_getCategoryList() |
Retrieve list of all categories on blog. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::blogger_getUserInfo() |
Retrieve user’s data. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::blogger_getPost() |
Retrieve post. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::blogger_getRecentPosts() |
Retrieve list of recent posts. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::blogger_newPost() |
Creates new post. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::blogger_editPost() |
Edit a post. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::blogger_deletePost() |
Remove a post. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::mw_newPost() |
Create a new post. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::_getOptions() |
Retrieve blog options value from list. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_setOptions() |
Update blog options. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_getMediaItem() |
Retrieve a media item by ID |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_getPostFormats() |
Retrieves a list of post formats used by the site. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_getPostType() |
Retrieves a post type |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_getPostTypes() |
Retrieves a post types |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_getRevisions() |
Retrieve revisions for a specific post. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_restoreRevision() |
Restore a post revision |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::blogger_getUsersBlogs() |
Retrieve blogs that user owns. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_getMediaLibrary() |
Retrieves a collection of media library items (or attachments) |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_getComments() |
Retrieve comments. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_deleteComment() |
Delete a comment. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_editComment() |
Edit comment. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_newComment() |
Create new comment. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_getCommentStatusList() |
Retrieve all of the comment status. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_getCommentCount() |
Retrieve comment count. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_getPostStatusList() |
Retrieve post statuses. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_getPageStatusList() |
Retrieve page statuses. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_getPageTemplates() |
Retrieve page templates. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_getPages() |
Retrieve Pages. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_deletePage() |
Delete page. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_editPage() |
Edit page. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_getPageList() |
Retrieve page list. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_getAuthors() |
Retrieve authors list. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_getTags() |
Get list of all tags |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_newCategory() |
Create new category. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_deleteCategory() |
Remove category. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_suggestCategories() |
Retrieve category list. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_getComment() |
Retrieve comment. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_getPosts() |
Retrieve posts. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_newTerm() |
Create a new term. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_editTerm() |
Edit a term. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_deleteTerm() |
Delete a term. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_getTerm() |
Retrieve a term. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_getTerms() |
Retrieve all terms for a taxonomy. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_getTaxonomy() |
Retrieve a taxonomy. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_getTaxonomies() |
Retrieve all taxonomies. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_getUser() |
Retrieve a user. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_getUsers() |
Retrieve users. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_getProfile() |
Retrieve information about the requesting user. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_editProfile() |
Edit user’s profile. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_getPage() |
Retrieve page. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::_insert_post() |
Helper method for wp_newPost() and wp_editPost(), containing shared logic. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_deletePost() |
Delete a post for any registered post type. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_getPost() |
Retrieve a post. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_getUsersBlogs() |
Retrieve the blogs of the user. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::get_custom_fields() |
Retrieve custom fields for post. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::set_custom_fields() |
Set custom fields for post. |
wp-includes/customize/class-wp-customize-header-image-control.php: WP_Customize_Header_Image_Control::render_content() | |
wp-includes/class-wp-customize-control.php: WP_Customize_Control::check_capabilities() |
Checks if the user can use this control. |
wp-includes/class-wp-customize-control.php: WP_Customize_Control::render_content() |
Render the control’s content. |
wp-includes/comment-template.php: wp_comment_form_unfiltered_html_nonce() |
Displays form token for unfiltered comments. |
wp-includes/class-wp-customize-widgets.php: WP_Customize_Widgets::wp_ajax_update_widget() |
Updates widget settings asynchronously. |
wp-includes/class-wp-customize-widgets.php: WP_Customize_Widgets::__construct() |
Initial loader. |
wp-includes/class-wp-editor.php: _WP_Editors::editor() |
Outputs the HTML for a single instance of the editor. |
Changelog #Changelog
Version | Description |
---|---|
5.3.0 | Formalized the existing and already documented ...$args parameter by adding it to the function signature. |
2.0.0 | Introduced. |
User Contributed Notes #User Contributed Notes
You must log in before being able to contribute a note or feedback.
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.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:
Check if the current user can edit the post with a specific post ID:
Reference: List of all Roles and Capabilities
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.
Feedback
@Andrija Naglic You’re right. The function accepts only one parameter, but the parameters are get by func_get_args and therefore the function definition is bypassed. Also this is done in the WP_User class for calling map_meta_cap. — By mumbomedia —
This second parameter you can see being fetched in line 646
$args = array_slice( func_get_args(), 1 );
— By leogermani —