Skip to content

Instantly share code, notes, and snippets.

View reslear's full-sized avatar
🎉

reslear

🎉
View GitHub Profile
// page: wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php
// Wrap the data in a response object.
$response = rest_ensure_response( $data );
// here!!!!! 여기 주석처리 중요
// $response->add_links( $this->prepare_links( $post ) );
// here!!!!!
@reslear
reslear / axios-catch-error.js
Created August 31, 2020 12:07 — forked from fgilio/axios-catch-error.js
Catch request errors with Axios
/*
* Handling Errors using async/await
* Has to be used inside an async function
*/
try {
const response = await axios.get('https://your.site/api/v1/bla/ble/bli');
// Success 🎉
console.log(response);
} catch (error) {
// Error 😨
@reslear
reslear / settings.json
Created May 12, 2024 22:32 — forked from jahirfiquitiva/settings.json
VS Code Settings
{
"breadcrumbs.enabled": false,
"editor.fontFamily": "'MonoLisa', 'Dank Mono', 'Operator Mono Lig', 'Operator Mono', Menlo, Monaco, 'Courier New', monospace",
"editor.fontWeight": "400",
"editor.cursorBlinking": "smooth",
"editor.cursorSmoothCaretAnimation": "explicit",
"editor.stickyScroll.enabled": true,
"explorer.sortOrder": "type",
"workbench.editor.enablePreview": false,
"workbench.editor.highlightModifiedTabs": true,