Answers for "wordpress create api"

PHP
0

wp custom rest endpoint

<?php
add_action( 'rest_api_init', function () {
  register_rest_route( 'myplugin/v1', '/author/(?P<id>\d+)', array(
    'methods' => 'GET',
    'callback' => 'my_awesome_func',
  ) );
} );
Posted by: Guest on January-13-2021

Code answers related to "wordpress create api"

Browse Popular Code Answers by Language