This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* eslint-disable import/no-extraneous-dependencies, @wordpress/dependency-group */ | |
/** | |
* External dependencies | |
*/ | |
const { sync: globSync } = require('fast-glob'); | |
const MiniCSSExtractPlugin = require('mini-css-extract-plugin'); | |
const path = require('path'); | |
const BrowserSyncPlugin = require('browser-sync-webpack-plugin'); | |
const RemoveEmptyScriptsPlugin = require('webpack-remove-empty-scripts'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
declare( strict_types=1 ); | |
function wporg_register_my_custom_post_type() : void { | |
register_post_type( 'my_custom_post_type', [ | |
'label' => __( 'My Post Type', 'wporg' ), | |
'labels' => [ 'name' => _x( 'My custom post type', 'Post Type General Name', 'wporg' ) ], | |
'supports' => [ 'title', 'editor' ], | |
'hierarchical' => true, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
array ( | |
'^wp-json/?$' => 'index.php?rest_route=/', | |
'^wp-json/(.*)?' => 'index.php?rest_route=/$matches[1]', | |
'^index.php/wp-json/?$' => 'index.php?rest_route=/', | |
'^index.php/wp-json/(.*)?' => 'index.php?rest_route=/$matches[1]', | |
'^wp-sitemap\\.xml$' => 'index.php?sitemap=index', | |
'^wp-sitemap\\.xsl$' => 'index.php?sitemap-stylesheet=sitemap', | |
'^wp-sitemap-index\\.xsl$' => 'index.php?sitemap-stylesheet=index', | |
'^wp-sitemap-([a-z]+?)-([a-z\\d_-]+?)-(\\d+?)\\.xml$' => 'index.php?sitemap=$matches[1]&sitemap-subtype=$matches[2]&paged=$matches[3]', | |
'^wp-sitemap-([a-z]+?)-(\\d+?)\\.xml$' => 'index.php?sitemap=$matches[1]&paged=$matches[2]', |