- 下のような指定を
:rootに指定しておく。
:where(:root) {
overflow-wrap: anywhere; /* 収まらない場合に折り返す */
/* word-break: initial; 単語の分割はデフォルトに依存(初期値のため指定しなくて良い) */| #! /usr/bin/env bash | |
| # see https://otti.xyz/2021/05/how-to-fix-wp-env-mysqlcheck-error.html | |
| LINE=$( docker ps | grep tests-wordpress- ) | |
| HERE=$(pwd) | |
| LINE=${LINE##* } | |
| LINE=${LINE%%-*} | |
| echo "Restore container: $LINE" |
| import { Fragment, useCallback } from '@wordpress/element'; | |
| import { useDispatch, useSelect } from '@wordpress/data'; | |
| const useMeta = ( key ) => { | |
| const meta = useSelect( ( select ) => { | |
| const { getEditedPostAttribute } = select( 'core/editor' ); | |
| const values = getEditedPostAttribute( 'meta' ) || {}; | |
| return values[ key ] || ''; | |
| }, [] ); |
This is a basic custom Gutenberg block. Files explained below.
block.js — We register Custom Gutenberg block here.editor.css _ Block CSS for the editor.style.css — Block CSS for the front end.index.php — Enqueue block's assets for editor and the front end.| { | |
| "name": "task-runner-for-wordpress-theme", | |
| "version": "1.1.0", | |
| "description": "new task runner for hibou build themes :)", | |
| "scripts": { | |
| "lint": "eslint ./js || true", | |
| "scss": "node-sass --output-style expanded --indent-type tab --indent-width 2 -o ./ ./sass/style.scss", | |
| "autoprefixer": "postcss -u autoprefixer --autoprefixer.browsers '> 5%, ie 9' -r ./style.css", | |
| "imagemin": "imagemin ../../../../dist/* -o ./common/img", | |
| "icons": "svgo -f ./common/img && mkdir -p ./common/img && svg-sprite-generate -d ../../../../dist/ -o ./common/img/icons.svg", |
| <?php | |
| /** | |
| * Adds styles from customizer to head of TinyMCE iframe. | |
| * These styles are added before all other TinyMCE stylesheets. | |
| * h/t Otto. | |
| */ | |
| function kwh_add_editor_style( $mceInit ) { | |
| // This example works with Twenty Sixteen. | |
| $background_color = get_theme_mod( 'background_color' ); | |
| $styles = '.mce-content-body { background-color: #' . $background_color . '; }'; |
| diff --git a/src/wp-content/plugins/mw-wp-form/classes/controllers/class.chart.php b/src/wp-content/plugins/mw-wp-form/classes/controllers/class.chart.php | |
| index 65dd853..72e091d 100644 | |
| --- a/src/wp-content/plugins/mw-wp-form/classes/controllers/class.chart.php | |
| +++ b/src/wp-content/plugins/mw-wp-form/classes/controllers/class.chart.php | |
| @@ -91,6 +91,27 @@ class MW_WP_Form_Chart_Controller extends MW_WP_Form_Controller { | |
| } | |
| /** | |
| + * データ件数を取得 | |
| + * |
| <?php | |
| add_action( 'shutdown', 'my_shutdown_callback' ); | |
| function my_shutdown_callback() { | |
| do_action( 'custom_shutdown_hook' ); | |
| } | |
| add_action( 'save_post', 'my_save_post_callback' ); |
| <?php | |
| Class Admin_Column_Custom_Field { | |
| /** @var string */ | |
| private $field_key; | |
| /** @var string */ | |
| private $field_label; |
| /*global module:false*/ | |
| module.exports = function(grunt) { | |
| grunt.initConfig({ | |
| //ここから下に機能を分けて書くよ | |
| // ベンダープレフィックスをつける機能 autoprefixer ------------------------- | |
| autoprefixer: { | |
| options: { | |
| }, | |
| concat: { |