curl https://loripsum.net/api/5/decorate/link/ul/ol/dl/bq/code/headers/prude/ | wp post generate --post_content --count=10
https://gist.github.com/konweb/6c53ae5db2f4ee8bb291b21c71e0ca33
Add the following to wp-config.php
define('DISABLE_WP_CRON', '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
| <?php | |
| /** | |
| * Disable display of Gutenberg Post Setting UI for a specific | |
| * taxonomy. While this isn't the official API for this need, | |
| * it works for now because only Gutenberg is dependent on the | |
| * REST API response. | |
| * @Dependencies: Categories Metabox Enhanced | |
| */ | |
| add_filter('rest_prepare_taxonomy', function ($response, $taxonomy) { | |
| if ('category' === $taxonomy->name) { |
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
| function action_wp_enqueue_scripts() { | |
| $style_path = '/assets/css/style.css'; | |
| wp_enqueue_style('style', get_template_directory_uri() . $style_path, [], date('YmdGis', filemtime(get_theme_file_path().$style_path))); | |
| } | |
| add_action('wp_enqueue_scripts', 'action_wp_enqueue_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 | |
| define('WPMS_ON', true); | |
| define('WPMS_MAILER', 'smtp'); | |
| define('WPMS_SMTP_HOST', 'smtp.gmail.com'); | |
| define('WPMS_SMTP_PORT', 465); | |
| define('WPMS_SSL', true); | |
| define('WPMS_SMTP_AUTH', true); | |
| define('WPMS_SMTP_USER', 'hoge@gmail.com'); | |
| define('WPMS_SMTP_PASS', 'password'); |
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 | |
| /** | |
| * Allow editors to insert iframe and svg tags | |
| */ | |
| function filter_map_meta_cap( $caps, $cap, $user_id ) { | |
| if ( 'unfiltered_html' === $cap && user_can( $user_id, 'editor' ) ) { | |
| $caps = array( 'unfiltered_html' ); | |
| } | |
| return $caps; |
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 | |
| // all | |
| add_filter( 'use_block_editor_for_post', '__return_false' ); | |
| // Specific post types | |
| add_filter( 'use_block_editor_for_post_type', 'disable_block_editor', 10, 2 ); | |
| function disable_block_editor( $use_block_editor, $post_type ) { | |
| if ( $post_type === 'page' ) { | |
| return false; | |
| } |
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
| // Set the value of the custom variable '--vh' to the root of the document | |
| document.documentElement.style.setProperty( | |
| '--vh', | |
| `${window.innerHeight * 0.01}px` | |
| ) |
list users
less /etc/group
add group user
gpasswd -a hogehoge apache