wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php
Lines:
1 to 55 of 55
<?php /** * REST API: WP_REST_Posts_Controller class * * @package WordPress * @subpackage REST_API * @since 4.7.0 */ /* class WP_REST_Posts_Controller */ /* function WP_REST_Posts_Controller::__construct() – Constructor. */ /* function WP_REST_Posts_Controller::register_routes() – Registers the routes for posts. */ /* function WP_REST_Posts_Controller::get_items_permissions_check() – Checks if a given request has access to read posts. */ /* function WP_REST_Posts_Controller::check_password_required() – Override the result of the post password check for REST requested posts. */ /* function WP_REST_Posts_Controller::get_items() – Retrieves a collection of posts. */ /* function WP_REST_Posts_Controller::get_post() – Get the post, if the ID is valid. */ /* function WP_REST_Posts_Controller::get_item_permissions_check() – Checks if a given request has access to read a post. */ /* function WP_REST_Posts_Controller::can_access_password_content() – Checks if the user can access password-protected content. */ /* function WP_REST_Posts_Controller::get_item() – Retrieves a single post. */ /* function WP_REST_Posts_Controller::create_item_permissions_check() – Checks if a given request has access to create a post. */ /* function WP_REST_Posts_Controller::create_item() – Creates a single post. */ /* function WP_REST_Posts_Controller::update_item_permissions_check() – Checks if a given request has access to update a post. */ /* function WP_REST_Posts_Controller::update_item() – Updates a single post. */ /* function WP_REST_Posts_Controller::delete_item_permissions_check() – Checks if a given request has access to delete a post. */ /* function WP_REST_Posts_Controller::delete_item() – Deletes a single post. */ /* function WP_REST_Posts_Controller::prepare_items_query() – Determines the allowed query_vars for a get_items() response and prepares them for WP_Query. */ /* function WP_REST_Posts_Controller::prepare_date_response() – Checks the post_date_gmt or modified_gmt and prepare any post or modified date for single post output. */ /* function WP_REST_Posts_Controller::prepare_item_for_database() – Prepares a single post for create or update. */ /* function WP_REST_Posts_Controller::check_status() – Checks whether the status is valid for the given post. */ /* function WP_REST_Posts_Controller::handle_status_param() – Determines validity and normalizes the given status parameter. */ /* function WP_REST_Posts_Controller::handle_featured_media() – Determines the featured media based on a request param. */ /* function WP_REST_Posts_Controller::check_template() – Check whether the template is valid for the given post. */ /* function WP_REST_Posts_Controller::handle_template() – Sets the template for a post. */ /* function WP_REST_Posts_Controller::handle_terms() – Updates the post’s terms from a REST request. */ /* function WP_REST_Posts_Controller::check_assign_terms_permission() – Checks whether current user can assign all terms sent with the current request. */ /* function WP_REST_Posts_Controller::check_is_post_type_allowed() – Checks if a given post type can be viewed or managed. */ /* function WP_REST_Posts_Controller::check_read_permission() – Checks if a post can be read. */ /* function WP_REST_Posts_Controller::check_update_permission() – Checks if a post can be edited. */ /* function WP_REST_Posts_Controller::check_create_permission() – Checks if a post can be created. */ /* function WP_REST_Posts_Controller::check_delete_permission() – Checks if a post can be deleted. */ /* function WP_REST_Posts_Controller::prepare_item_for_response() – Prepares a single post output for response. */ /* function WP_REST_Posts_Controller::protected_title_format() – Overwrites the default protected title format. */ /* function WP_REST_Posts_Controller::prepare_links() – Prepares links for the request. */ /* function WP_REST_Posts_Controller::get_available_actions() – Get the link relations available for the post and current user. */ /* function WP_REST_Posts_Controller::get_item_schema() – Retrieves the post’s schema, conforming to JSON Schema. */ /* function WP_REST_Posts_Controller::get_schema_links() – Retrieve Link Description Objects that should be added to the Schema for the posts collection. */ /* function WP_REST_Posts_Controller::get_collection_params() – Retrieves the query params for the posts collection. */ /* function WP_REST_Posts_Controller::sanitize_post_statuses() – Sanitizes and validates the list of post statuses, including whether the user can query private statuses. */ /* function WP_REST_Posts_Controller::prepare_tax_query() – Prepares the ‘tax_query’ for a collection of posts. */ /* function WP_REST_Posts_Controller::prepare_taxonomy_limit_schema() – Prepares the collection schema for including and excluding items by terms. */