Remove html id and pass arguments to React components.
See original version for more information.
/** | |
* Even though some module is not included in WordPress core, `wp-scripts` treats it as an external module. | |
* | |
* The following code will cause an error like: `Uncaught TypeError: Cannot read properties of undefined (reading 'I18nProvider')`. | |
* ```js | |
* import { I18nProvider } from '@wordpress/react-i18n'; | |
* ``` | |
*/ | |
const defaultConfig = require('@wordpress/scripts/config/webpack.config'); | |
const DependencyExtractionWebpackPlugin = require('@wordpress/dependency-extraction-webpack-plugin'); |
<?php | |
const POST_TYPE_NAME = 'YOUR_TYPE'; | |
/** | |
* Use Classic Editor for this post type. | |
*/ | |
add_filter( 'use_block_editor_for_post_type', fn( $result, $post_type_name ) => POST_TYPE_NAME === $post_type_name ? false : $result, 10, 2 ); |
Remove html id and pass arguments to React components.
See original version for more information.
Add apache setting.
HOST="your-host.example.com"; FORWARD_URL="http://127.0.0.1:10080/"
sudo tee -a /etc/apache2/sites-enabled/$HOST.conf <<EOT
<VirtualHost *:80>
ProxyPreserveHost On
ProxyPass / $FORWARD_URL
ProxyPassReverse / $FORWARD_URL
import collections | |
import pathlib | |
def common_prefix(*paths): | |
"""Common prefix of given paths""" | |
counter = collections.Counter() | |
for path in paths: | |
assert isinstance(path, pathlib.Path) | |
counter.update([path]) |
sudo tee /lib/systemd/system/vpnserver.service << END | |
[Unit] | |
Description=SoftEther VPN Server | |
After=network.target | |
[Service] | |
Type=forking | |
Environment="TAP=tap_vpn" | |
Environment="BR=br0" | |
ExecStartPre=ip tuntap add \$TAP mode tap | |
ExecStartPre=ip link set \$TAP up |
<?php | |
/** | |
* Spoofing host and port for WordPress environment. | |
* To use this, include from your "wp-config.php" file. | |
* Note that this functions is not intended to be used in production. | |
* | |
* @see \is_ssl() | |
* @link https://ngrok.com/docs/using-ngrok-with/wordpress/ | |
*/ |
#!python3 | |
"""OpenSSL enc compatible script by Python. | |
""" | |
import sys | |
import os | |
import io | |
import hashlib | |
import binascii | |
import argparse | |
import logging |
<?php | |
/** | |
* Plugin Name: CMB2 option test | |
* Author: chrono-meter@gmx.net | |
* Version: 20211223 | |
* | |
* @link https://github.com/CMB2/CMB2-Snippet-Library/search?q=object_types&unscoped_q=object_types | |
* @see add_menu_page() | |
* | |
* to get variables: cmb2_get_option('myprefix_network_options', 'key', 'default') |
#!/usr/bin/env python3 | |
from xml.etree import ElementTree | |
from pathlib import Path | |
import io | |
import datetime | |
import email.utils | |
__author__ = 'chrono-meter@gmx.net' | |
__version__ = '1.0.0' | |
__license__ = 'Python Software Foundation License' |