PHP code example of humanmade / see-in-rest-api

1. Go to this page and download the library: Download humanmade/see-in-rest-api library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

humanmade / see-in-rest-api example snippets


// Show the See in REST API admin bar node for administrators only.
add_filter( 'see_in_rest_api.rest_url', function ( string $rest_url ): string {

	return current_user_can( 'manage_options' ) ? $rest_url : '';
} );