Skip to content

Instantly share code, notes, and snippets.

View Olein-jp's full-sized avatar
🏠
Working from home

Koji Kuno Olein-jp

🏠
Working from home
View GitHub Profile
@ndiego
ndiego / block-variations-frost
Last active March 11, 2024 18:12
block-variations-frost
/**
* Add the following to a theme's functions.php file.
*/
function example_enqueue_block_variations() {
wp_enqueue_script(
'frost-enqueue-block-variations',
get_template_directory_uri() . '/assets/js/variations.js',
array( 'wp-blocks', 'wp-dom-ready', 'wp-edit-post' )
);
/////////以下、function.phpへの追記箇所///////////
//出欠確認
add_filter('the_content', 'join_check');
function join_check($content){
//選択肢をここで設定
$key_select = array("参加","保留","不参加");
$ret="";