wphooks.info - rest_endpoints

rest_endpoints

(trunk - 5.1-alpha-44286)

The hook occurs in the following file:

wp-includes/rest-api/class-wp-rest-server.php:
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
		/**
		 * Filters the array of available endpoints.
		 *
		 * @since 4.4.0
		 *
		 * @param array $endpoints The available endpoints. An array of matching regex patterns, each mapped
		 *                         to an array of callbacks for the endpoint. These take the format
		 *                         `'/path/regex' => array( $callback, $bitmask )` or
		 *                         `'/path/regex' => array( array( $callback, $bitmask ).
		 */
		$endpoints = apply_filters( 'rest_endpoints', $this->endpoints );

		// Normalise the endpoints.
		$defaults = array(
			'methods'       => '',
			'accept_json'   => false,
			'accept_raw'    => false,
			'show_in_index' => true,
			'args'          => array(),
		);