Search
 
SCRIPT & CODE EXAMPLE
 

PHP

wp rest api remove _links

function devotees_rest_prepare_post($data, $post, $request)
{
    foreach($data->get_links() as $_linkKey => $_linkVal) 
    {
        $data->remove_link($_linkKey);
    }
    return $data;
}

add_filter('rest_prepare_post', 'devotees_rest_prepare_post', 1, 3);
// Custom Post Type: slug => imap
add_filter('rest_prepare_imap', 'devotees_rest_prepare_post', 1, 3);
Comment

PREVIOUS NEXT
Code Example
Php :: razorpay refund laravel 
Php :: laravel how to fetch user from user model based on id from post 
Php :: Laravel Dropzone Attachment Required is not working as expected 
Php :: vault deployment in production 
Php :: Movie Name -inurl:(htm|html|php|pls|txt) intitle:index.of "last modified" (mp4|wma|aac|avi) 
Php :: laravel add model to polymorphic relationships 
Php :: search and pagination in ci4 
Php :: Composer detected issues in your platform: Your Composer dependencies require a PHP version "= 7.4.0". 
Php :: how to disable laravel cors 
Php :: php run python script with arguments json 
Php :: laravel handle image validation 
Php :: How to use Live web server chrome extension with Laravel 
Php :: How to add watermark in FPDF PHP - Parte 1 
Php :: Comment créer automatiquement une méta description à partir de votre contenu dans WordPress 
Php :: developer polyglots 
Php :: php hide credit card middle numbers 
Php :: Laravel, return view with Request::old 
Php :: java script clear rectangle 
Php :: concat ternary operator 
Php :: $SERVER get cuurent directior PHP 
Php :: Separate A String Into Array Elements 
Php :: count same datetimes in foreach and group them php 
Php :: send parameter to function in php can null 
Php :: laravel dompdf barcode 
Php :: eloquent laravel 
Php :: laravel model query time 
Php :: dequeue recaptcha wordpress 
Php :: how to disable the plugins and theme editor 
Php :: Add laravel sail build as alias 
Php :: use compose with different php version debian linux 
ADD CONTENT
Topic
Content
Source link
Name
1+5 =