Adds a new sidebar to the block editor for post types that support wporg-internal-notes
. Editors can leave notes about the current post that other editors can read, but the notes are not visible on the front end.
To enable internal notes for a particular post type, add this line to an mu-plugin or somewhere in the plugin that registers the post type:
add_post_type_support( '[post type slug here]', 'wporg-internal-notes' );
To enable log entries for changes to posts, which will appear in the same stream with internal notes, add this line:
add_post_type_support( '[post type slug here]', 'wporg-log-notes' );
You can also specify only certain change events to log. See logging_enabled()
for a list of available events.
add_post_type_support( '[post type slug here]', 'wporg-log-notes', array( 'status-change' => true ) );
- Docker
- Node/npm
- Yarn
- Composer
- Set up repo dependencies:
yarn run initial-setup
- Start up and provision the environment:
yarn run env
- Build the assets:
yarn workspaces run build
. The plugin won't function until this step is done. - Visit site at
localhost:8888
- Log in with username
admin
and passwordpassword
These must be run in the project's root folder, not in theme/plugin subfolders.
- Stop the environment:
yarn run env:stop
oryarn run wp-env stop
- Restart the environment:
yarn run env
oryarn run wp-env start
- Build all assets once:
yarn workspaces run build
- Rebuild all assets on change:
yarn workspaces run start