Search
 
SCRIPT & CODE EXAMPLE
 

PHP

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',
  ) );
} );
Comment

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',
  ) );
} );
Comment

PREVIOUS NEXT
Code Example
Php :: set nav link active on the basis of route laravel 
Php :: php array start with index 0 
Php :: php exec shell command 
Php :: php delay redirect 
Php :: array_unique 
Php :: php compare two dates 
Php :: php date loop 
Php :: php exception message 
Php :: remove phpmyadmin ubuntu 20.04 completely 
Php :: how to check the laravel version mac 
Php :: laravel seed specific file 
Php :: Root composer.json requires php ^7.2.5 but your php version (8.0.3) does not satisfy that require 
Php :: wp revisions 0 
Php :: group by codeigniter 3 
Php :: How to always use ignore-platform-reqs flag when running composer? 
Php :: get database name laravel 
Php :: php get hostname 
Php :: php get id from url 
Php :: php json_encode encode not escape forward slash 
Php :: read key value json php 
Php :: twig jsoncencode 
Php :: php artisan ui auth 
Php :: migrate symfony command 
Php :: php array get first x elements 
Php :: echo query in laravel 
Php :: laravel migration remove unique constraint 
Php :: SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes 
Php :: php get remote file last modified 
Php :: doument root phpp 
Php :: sleep function in php 
ADD CONTENT
Topic
Content
Source link
Name
1+8 =