- Install:
- jest:
npm install --save-dev jest - ts-jest:
npm install --save-dev ts-jest @types/jest
- Modify package.json
"jest": {
"transform": {
"^.+\\.tsx?$": "ts-jest"
| <?php | |
| function mytheme_block_templates( $args, $post_type ) { | |
| // Only add template to 'post' post type | |
| // Change for your post type: eg 'page', 'event', 'product' | |
| if ( 'post' == $post_type ) { | |
| // Optionally lock templates from further changes | |
| // Change to 'insert' to allow adding other blocks, but lock defined blocks |