- フォントは Web サイトの印象に直結するため、一概にこれが良いとは言えない。
- 特にこれと言った指定がされていない場合は
font-family: sans-serifのみで良い。- Windows 11/10 では 2025 年のアップデートにより Noto Sans JP が標準搭載された。色々と問題があった游ゴシックの呪縛から解放されたのは大きい。
- Android はメーカーにより削除されている可能性はあるが、そうでない場合は原則的に Noto Sans CJK JP が適用される。
- Mac/iOS はヒラギノ角ゴ ProN が適用される。
- アップデートによるフォントの変更の懸念はあるものの、ディスレクシアの方々は UD デジタル教科書体などの読みやすいフォントを設定している可能性があるため、アクセシビリティの観点では
font-family: sans-serifの指定を推奨する。
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
| #! /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" |
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
| 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.
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
| { | |
| "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", |
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 | |
| /** | |
| * 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 . '; }'; |
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
| 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 { | |
| } | |
| /** | |
| + * データ件数を取得 | |
| + * |
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 | |
| add_action( 'shutdown', 'my_shutdown_callback' ); | |
| function my_shutdown_callback() { | |
| do_action( 'custom_shutdown_hook' ); | |
| } | |
| add_action( 'save_post', 'my_save_post_callback' ); |
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 | |
| Class Admin_Column_Custom_Field { | |
| /** @var string */ | |
| private $field_key; | |
| /** @var string */ | |
| private $field_label; |
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
| /*global module:false*/ | |
| module.exports = function(grunt) { | |
| grunt.initConfig({ | |
| //ここから下に機能を分けて書くよ | |
| // ベンダープレフィックスをつける機能 autoprefixer ------------------------- | |
| autoprefixer: { | |
| options: { | |
| }, | |
| concat: { |
NewerOlder