if(!function_exists('nd_jikan_request')){ function nd_jikan_request($endpoint=''){ $response = wp_remote_get('https://api.jikan.moe/v4/'.$endpoint,[ 'timeout'=>20, 'headers'=>['user-agent'=>'NewDev Jikan'] ]); if(is_wp_error($response)){ return []; } return json_decode(wp_remote_retrieve_body($response), true); }} if(!function_exists('nd_jikan_request')){ function nd_jikan_request($endpoint=''){ $response = wp_remote_get('https://api.jikan.moe/v4/'.$endpoint,[ 'timeout'=>20, 'headers'=>['user-agent'=>'NewDev Jikan'] ]); if(is_wp_error($response)){ return []; } return json_decode(wp_remote_retrieve_body($response), true); }} if(!function_exists('nd_jikan_request')){ function nd_jikan_request($endpoint=''){ $response = wp_remote_get('https://api.jikan.moe/v4/'.$endpoint,[ 'timeout'=>20, 'headers'=>['user-agent'=>'NewDev Jikan'] ]); if(is_wp_error($response)){ return []; } return json_decode(wp_remote_retrieve_body($response), true); }} if(!function_exists('nd_jikan_request')){ function nd_jikan_request($endpoint=''){ $response = wp_remote_get('https://api.jikan.moe/v4/'.$endpoint,[ 'timeout'=>20, 'headers'=>['user-agent'=>'NewDev Jikan'] ]); if(is_wp_error($response)){ return []; } return json_decode(wp_remote_retrieve_body($response), true); }}