Skip to content

Instantly share code, notes, and snippets.

import { NextApiHandler, NextApiRequest } from "next";
import formidable from "formidable";
import path from "path";
import fs from "fs/promises";
export const config = {
api: {
bodyParser: false,
},
};
@justintadlock
justintadlock / register-post-type.php
Last active June 3, 2024 13:31
Help file when registering post types.
<?php
# Register custom post types on the 'init' hook.
add_action( 'init', 'my_register_post_types' );
/**
* Registers post types needed by the plugin.
*
* @since 1.0.0
* @access public