AnsPress_REST_API::get_answers( WP_REST_Request $request )

Description #

Generate results for the /wp-json/myplugin/v1/foo route.

Parameters #

  • $request
    WP_REST_Request (Required) Full details about the request.

Source #

File: includes/wp-api.php

	public function get_answers( WP_REST_Request $request ) {
		print_r( $request );
		/*if ( empty( $posts ) ) {
			return new WP_Error( 'awesome_no_author', 'Invalid author', array( 'status' => 404 ) );
		}*/

		$data = array();

		return $data;
	}

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Add your comment