PHP code example of 10up / 10up-experience
1. Go to this page and download the library: Download 10up/10up-experience 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/ */
10up / 10up-experience example snippets
add_filter( 'tenup_experience_rest_api_allowlist', function( $allowed_routes ) {
$allowed_routes[] = '/wp/v2/posts';
return $allowed_routes;
} );
add_filter( 'tenup_experience_rest_api_allowlist', function( $allowed_routes ) {
return array_merge( $allowed_routes, [
'/wp/v2/posts',
'/wp/v2/pages',
'/my-plugin/v1/public-endpoint',
] );
} );