This file contains 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 book_introduce_block_type_variations( $variations, $block_type ) { | |
if ( 'core/heading' === $block_type->name ) { | |
$variations[] = array( | |
'name' => 'book-title', | |
'title' => 'Book Title', | |
'attributes' => array( | |
'metadata' => array( | |
'bindings' => array( | |
'content' => array( | |
'source' => 'acf/field', |
This file contains 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
document.addEventListener('DOMContentLoaded', function(){ | |
// タブに対してクリックイベントを適用 | |
const tabs = document.getElementsByClassName('tab-item'); | |
for(let i = 0; i < tabs.length; i++) { | |
tabs[i].addEventListener('click', tabSwitch, false); | |
} | |
// タブをクリックすると実行する関数 | |
function tabSwitch(){ | |
// タブのclassの値を変更 |
This file contains 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
window.onload = function() { | |
const htmlFileName = window.location.href.split( '/' ).pop(); | |
const fileSlugName = htmlFileName.split( '.' ).shift(); | |
console.log(fileSlugName); | |
regex = new RegExp( fileSlugName ); | |
const targetElement = document.getElementById( 'column-navigation-content' ); | |
const linkElement = targetElement.getElementsByTagName( 'a' ); | |
const linkElements = Array.from( linkElement ); |
This file contains 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": "test", | |
"version": "1.0.0", | |
"description": "", | |
"main": "index.js", | |
"scripts": { | |
"message": "echo changed", | |
"compile:css:sass": "sass src/sass:dest/css --style=expanded --no-source-map", | |
"compile:css:postcss": "postcss dest/css/*.css -r", | |
"compile:css": "run-s compile:css:sass compile:css:postcss", |
This file contains 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: Deploy via Github Actions to Production | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- '[0-9]+.[0-9]+.[0-9]*' | |
jobs: | |
test: |
This file contains 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
/** | |
* カスタム投稿タイプのアーカイブページにAFC情報を掲載する | |
*/ | |
add_filter( | |
'snow_monkey_template_part_render_template-parts/loop/entry-summary/content/content', | |
function( $html ) { | |
if ( is_post_type_archive( 'custom_post_type' ) ) { | |
$match_date = get_field( 'match_date' ); | |
$match_score = get_field( 'match_score' ); | |
$match_result = get_field( 'match_result' ); |
This file contains 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
/** | |
* 編集画面でカスタムタクソノミーを一覧表示(チェックボックス)させる | |
*/ | |
add_action( | |
'init', | |
function() { | |
$tag_slug_args = get_taxonomy('jobs_skill'); | |
$tag_slug_args->hierarchical = true; | |
$tag_slug_args->meta_box_cb = 'post_categories_meta_box'; | |
register_taxonomy('jobs_skill', 'jobs', (array) $tag_slug_args); |
This file contains 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 | |
/** | |
* Editor style | |
*/ | |
function oleindesign_editor_style_register() | |
{ | |
wp_enqueue_style('oleindesign-editor-style', plugins_url('editor-style.css', __FILE__)); | |
} | |
add_action('enqueue_block_editor_assets', 'oleindesign_editor_style_register'); |
This file contains 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 | |
/** | |
* オリジナルCSS読み込み | |
*/ | |
function od_enqueue_scripts() | |
{ | |
wp_enqueue_style('od_styles', plugins_url('style.css', __FILE__)); | |
} | |
add_action('wp_enqueue_scripts', 'od_enqueue_scripts'); |
This file contains 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
/* 見出し全体 | |
------------------------------*/ | |
h2, | |
h3, | |
h4, | |
h5, | |
h6 { | |
} |
NewerOlder