WordPress をいじっていると、ここにちょっとした表示をしたいと思うことがある。
慣れている人なら簡単かもしれないがそうでない場合、狙った場所に表示などを行うにはどのアクションフックを使えばよいのかがピンと来ない事もある。
そんな時に自分がよく使う手法。次の画像のように管理者でログインしている時だけ、各アクションフックを使用した場合にページのどこに表示されるのかを視覚的に見れるようにして目的の場所をわかりやすくする。
紫の部分は WordPress のアクションフック。緑の部分はテーマ固有のアクションフックになる。
画像でのテーマは「Arkhe(アルケー)」の日本語無料版を使用している。
また、アクションフックによっては色々なページで使いまわされている場合もあるので「check flags」ボタンを押すとアクションが実行された際の is_xxxx フラグの状態をアサートやコンソールログで見れるようにしてあるので、目的のページだけに表示したい場合などの手助けになる。
やり方
※functions.php をいじるので、ローカル環境や、バックアップして何かあった場合にも戻せるようにしてから行う事。
functions.php へ「 共通部分 」「 WordPress用 」のソースを追加する。「 参考用:テーマ固有 」の部分はテーマごとに違うため使う場合はテーマに合わせて修正する。
環境や表示するページによってはエラーになるアクションもあるのでその場合は対象の「add_action()」の行をコメントアウトする。
共通部分
// ************************************************************************************************************
// 共通
function debug_flags_string() {
$foo = '[アクション実行時の true flag 一覧]\n';
if(is_404 ()) { $foo .= 'is_404 \n'; }
if(is_admin ()) { $foo .= 'is_admin \n'; }
if(is_admin_bar_showing ()) { $foo .= 'is_admin_bar_showing \n'; }
if(is_archive ()) { $foo .= 'is_archive \n'; }
if(is_attachment ()) { $foo .= 'is_attachment \n'; }
if(is_author ()) { $foo .= 'is_author \n'; }
if(is_category ()) { $foo .= 'is_category \n'; }
if(is_comments_popup ()) { $foo .= 'is_comments_popup \n'; }
if(is_date ()) { $foo .= 'is_date \n'; }
if(is_day ()) { $foo .= 'is_day \n'; }
if(is_feed ()) { $foo .= 'is_feed \n'; }
if(is_front_page ()) { $foo .= 'is_front_page \n'; }
if(is_home ()) { $foo .= 'is_home \n'; }
//if(is_local_attachment ()) { $foo .= 'is_local_attachment \n'; }
if(is_main_query ()) { $foo .= 'is_main_query \n'; }
if(is_multi_author ()) { $foo .= 'is_multi_author \n'; }
if(is_month ()) { $foo .= 'is_month \n'; }
if(is_new_day ()) { $foo .= 'is_new_day \n'; }
if(is_page ()) { $foo .= 'is_page \n'; }
if(is_page_template ()) { $foo .= 'is_page_template \n'; }
if(is_paged ()) { $foo .= 'is_paged \n'; }
//if(is_plugin_active ()) { $foo .= 'is_plugin_active \n'; }
//if(is_plugin_active_for_network()) { $foo .= 'is_plugin_active_for_network\n'; }
//if(is_plugin_inactive ()) { $foo .= 'is_plugin_inactive \n'; }
if(is_plugin_page ()) { $foo .= 'is_plugin_page \n'; }
if(is_post_type_archive ()) { $foo .= 'is_post_type_archive \n'; }
if(is_preview ()) { $foo .= 'is_preview \n'; }
if(is_search ()) { $foo .= 'is_search \n'; }
if(is_single ()) { $foo .= 'is_single \n'; }
if(is_singular ()) { $foo .= 'is_singular \n'; }
if(is_sticky ()) { $foo .= 'is_sticky \n'; }
if(is_tag ()) { $foo .= 'is_tag \n'; }
if(is_tax ()) { $foo .= 'is_tax \n'; }
//if(is_taxonomy_hierarchical ()) { $foo .= 'is_taxonomy_hierarchical \n'; }
if(is_time ()) { $foo .= 'is_time \n'; }
if(is_trackback ()) { $foo .= 'is_trackback \n'; }
if(is_year ()) { $foo .= 'is_year \n'; }
//if(is_active_sidebar ()) { $foo .= 'is_active_sidebar \n'; }
if(is_active_widget ()) { $foo .= 'is_active_widget \n'; }
if(is_blog_installed ()) { $foo .= 'is_blog_installed \n'; }
if(is_rtl ()) { $foo .= 'is_rtl \n'; }
if(is_dynamic_sidebar ()) { $foo .= 'is_dynamic_sidebar \n'; }
if(is_user_logged_in ()) { $foo .= 'is_user_logged_in \n'; }
if(has_excerpt ()) { $foo .= 'has_excerpt \n'; }
if(has_post_thumbnail ()) { $foo .= 'has_post_thumbnail \n'; }
if(has_tag ()) { $foo .= 'has_tag \n'; }
//if(pings_open ()) { $foo .= 'pings_open \n'; }
//if(email_exists ()) { $foo .= 'email_exists \n'; }
//if(post_type_exists ()) { $foo .= 'post_type_exists \n'; }
//if(taxonomy_exists ()) { $foo .= 'taxonomy_exists \n'; }
//if(term_exists ()) { $foo .= 'term_exists \n'; }
//if(username_exists ()) { $foo .= 'username_exists \n'; }
if(wp_attachment_is_image ()) { $foo .= 'wp_attachment_is_image \n'; }
//if(wp_script_is ()) { $foo .= 'wp_script_is \n'; }
return $foo;
}
WordPress用
// ************************************************************************************************************
// WordPress
function debug_action_disp($action_name, $debug_button = false) {
if ( current_user_can( 'manage_options' ) ) {
//管理者でログイン中だけ
echo "<div style=\"background-color:rgb(192, 192, 255); border: 2px solid rgba(255, 128, 0, 1.0); width=100%; margin: 2px; padding: 4px; text-align: center; font-family: \"MS ゴシック\";\">\n";
echo $action_name;
if($debug_button)
{
$foo = debug_flags_string();
?>
<script>
let bar = '<?php echo $foo; ?>';
function showAlert()
{
console.log(bar);
alert(bar);
}
</script>
<input type='button' value='check flags' onclick='showAlert();'>
<?php
}
echo "</div>\n";
}
}
//add_action( 'load_textdomain' , function() { debug_action_disp('load_textdomain' ); }, 0); // 複数
//add_action( 'after_setup_theme' , function() { debug_action_disp('after_setup_theme' ); }, 0);
//add_action( 'registered_post_type' , function() { debug_action_disp('registered_post_type' ); }, 0); // 複数
//add_action( 'registered_taxonomy' , function() { debug_action_disp('registered_taxonomy' ); }, 0); // 複数
//add_action( 'init' , function() { debug_action_disp('init' ); }, 0);
//add_action( 'widgets_init' , function() { debug_action_disp('widgets_init' ); }, 0);
//add_action( 'register_sidebar' , function() { debug_action_disp('register_sidebar' ); }, 0); // 複数
//add_action( 'wp_register_sidebar_widget', function() { debug_action_disp('wp_register_sidebar_widget'); }, 0); // 複数
//add_action( 'wp_default_scripts' , function() { debug_action_disp('wp_default_scripts' ); }, 0);
//add_action( 'wp_loaded' , function() { debug_action_disp('wp_loaded' ); }, 0);
//add_action( 'parse_request' , function() { debug_action_disp('parse_request' ); }, 0);
//add_action( 'auth_cookie_valid' , function() { debug_action_disp('auth_cookie_valid' ); }, 0); // error
//add_action( 'auth_cookie_malformed' , function() { debug_action_disp('auth_cookie_malformed' ); }, 0); // error
//add_action( 'wp_default_styles' , function() { debug_action_disp('wp_default_styles' ); }, 0);
//add_action( 'admin_bar_init' , function() { debug_action_disp('admin_bar_init' ); }, 0);
//add_action( 'add_admin_bar_menus' , function() { debug_action_disp('add_admin_bar_menus' ); }, 0);
//add_action( 'wp_print_scripts' , function() { debug_action_disp('wp_print_scripts' ); }, 0);
//add_action( 'set_current_user' , function() { debug_action_disp('set_current_user' ); }, 0);
//add_action( 'send_headers' , function() { debug_action_disp('send_headers' ); }, 0);
//add_action( 'wp' , function() { debug_action_disp('wp' ); }, 0);
//add_action( 'template_redirect' , function() { debug_action_disp('template_redirect' ); }, 0);
add_action( 'wp_head' , function() { debug_action_disp('wp_head' ); }, 0);
add_action( 'wp_enqueue_scripts' , function() { debug_action_disp('wp_enqueue_scripts' ); }, 0);
add_action( 'wp_print_styles' , function() { debug_action_disp('wp_print_styles' ); }, 0);
add_action( 'admin_bar_menu' , function() { debug_action_disp('admin_bar_menu' , true); }, 0);
add_action( 'wp_before_admin_bar_render', function() { debug_action_disp('wp_before_admin_bar_render'); }, 0);
add_action( 'wp_after_admin_bar_render' , function() { debug_action_disp('wp_after_admin_bar_render' ); }, 0);
add_action( 'wp_body_open' , function() { debug_action_disp('wp_body_open' , true); }, 0);
add_action( 'wp_footer' , function() { debug_action_disp('wp_footer' ); }, 0);
add_action( 'wp_print_footer_scripts' , function() { debug_action_disp('wp_print_footer_scripts' ); }, 0);
add_action( 'shutdown' , function() { debug_action_disp('shutdown' ); }, 0);
//add_action( 'wp_meta' , function() { debug_action_disp('wp_meta' ); }, 0);
//add_action( 'muplugins_loaded' , function() { debug_action_disp('muplugins_loaded' ); }, 0);
//add_action( 'plugins_loaded' , function() { debug_action_disp('plugins_loaded' ); }, 0);
//add_action( 'sanitize_comment_cookies' , function() { debug_action_disp('sanitize_comment_cookies' ); }, 0);
//add_action( 'setup_theme' , function() { debug_action_disp('setup_theme' ); }, 0);
add_action( 'get_header' , function() { debug_action_disp('get_header' ); }, 0);
add_action( 'get_search_form' , function() { debug_action_disp('get_search_form' ); }, 0);
add_action( 'get_template_part_content' , function() { debug_action_disp('get_template_part_content' ); }, 0);
add_action( 'get_search_form' , function() { debug_action_disp('get_search_form' ); }, 0);
//add_action( 'get_footer' , function() { debug_action_disp('get_footer' ); }, 0);
//add_action( 'get_sidebar' , function() { debug_action_disp('get_sidebar' ); }, 0);
add_action( 'loop_start' , function() { debug_action_disp('loop_start' ); }, 0);
add_action( 'loop_end' , function() { debug_action_disp('loop_end' ); }, 0);
add_action( 'parse_query' , function() { debug_action_disp('parse_query' ); }, 0);
add_action( 'pre_get_posts' , function() { debug_action_disp('pre_get_posts' ); }, 0);
add_action( 'pre_get_comments' , function() { debug_action_disp('pre_get_comments' ); }, 0);
add_action( 'posts_selection' , function() { debug_action_disp('posts_selection' ); }, 0);
add_action( 'the_post' , function() { debug_action_disp('the_post' ); }, 0);
add_action( 'dynamic_sidebar' , function() { debug_action_disp('dynamic_sidebar' ); }, 0);
参考用:テーマ固有(「Arkhe(アルケー)」の日本語無料版)
// ************************************************************************************************************
// テーマ固有
function debug_arkhe_action_disp($action_name, $debug_button = false) {
if ( current_user_can( 'manage_options' ) ) {
//管理者でログイン中だけ
echo "<div style=\"background-color:rgb(192, 255, 192); border: 2px solid rgba(255, 128, 0, 1.0); width=100%; margin: 2px; padding: 4px; text-align: center; font-family: \"MS ゴシック\";\">\n";
echo $action_name;
if($debug_button)
{
$foo = debug_flags_string();
?>
<script>
let bar = '<?php echo $foo; ?>';
function showAlert()
{
console.log(bar);
alert(bar);
}
</script>
<input type='button' value='check flags' onclick='showAlert();'>
<?php
}
echo "</div>\n";
}
}
add_action( 'arkhe_before_header' , function() { debug_arkhe_action_disp('arkhe_before_header' ); }, 0);
add_action( 'arkhe_after_header' , function() { debug_arkhe_action_disp('arkhe_after_header' ); }, 0);
add_action( 'arkhe_header_bar_content' , function() { debug_arkhe_action_disp('arkhe_header_bar_content' ); }, 0);
add_action( 'arkhe_header_left_content' , function() { debug_arkhe_action_disp('arkhe_header_left_content' ); }, 0);
add_action( 'arkhe_header_right_content' , function() { debug_arkhe_action_disp('arkhe_header_right_content' ); }, 0);
add_action( 'arkhe_start_drawer_body' , function() { debug_arkhe_action_disp('arkhe_start_drawer_body' ); }, 0);
add_action( 'arkhe_after_drawer_nav' , function() { debug_arkhe_action_disp('arkhe_after_drawer_nav' ); }, 0);
add_action( 'arkhe_end_drawer_body' , function() { debug_arkhe_action_disp('arkhe_end_drawer_body' ); }, 0);
add_action( 'arkhe_start_sidebar' , function() { debug_arkhe_action_disp('arkhe_start_sidebar' ); }, 0);
add_action( 'arkhe_end_sidebar' , function() { debug_arkhe_action_disp('arkhe_end_sidebar' ); }, 0);
add_action( 'arkhe_before_footer' , function() { debug_arkhe_action_disp('arkhe_before_footer' ); }, 0);
add_action( 'arkhe_start_footer_inner' , function() { debug_arkhe_action_disp('arkhe_start_footer_inner' ); }, 0);
add_action( 'arkhe_start_footer_foot_content', function() { debug_arkhe_action_disp('arkhe_start_footer_foot_content'); }, 0);
add_action( 'arkhe_before_copyright' , function() { debug_arkhe_action_disp('arkhe_before_copyright' ); }, 0);
add_action( 'arkhe_after_copyright' , function() { debug_arkhe_action_disp('arkhe_after_copyright' ); }, 0);
add_action( 'arkhe_after_footer' , function() { debug_arkhe_action_disp('arkhe_after_footer' ); }, 0);
add_action( 'arkhe_start_content' , function() { debug_arkhe_action_disp('arkhe_start_content' ); }, 0);
add_action( 'arkhe_end_content' , function() { debug_arkhe_action_disp('arkhe_end_content' ); }, 0);
add_action( 'arkhe_start_front_main' , function() { debug_arkhe_action_disp('arkhe_start_front_main' ); }, 0);
add_action( 'arkhe_end_front_main' , function() { debug_arkhe_action_disp('arkhe_end_front_main' ); }, 0);
add_action( 'arkhe_before_front_content' , function() { debug_arkhe_action_disp('arkhe_before_front_content' ); }, 0);
add_action( 'arkhe_start_home_main' , function() { debug_arkhe_action_disp('arkhe_start_home_main' ); }, 0);
add_action( 'arkhe_end_home_main' , function() { debug_arkhe_action_disp('arkhe_end_home_main' ); }, 0);
add_action( 'arkhe_after_front_content' , function() { debug_arkhe_action_disp('arkhe_after_front_content' ); }, 0);
add_action( 'arkhe_before_home_content' , function() { debug_arkhe_action_disp('arkhe_before_home_content' ); }, 0);
add_action( 'arkhe_after_home_content' , function() { debug_arkhe_action_disp('arkhe_after_home_content' ); }, 0);
add_action( 'arkhe_start_page_main' , function() { debug_arkhe_action_disp('arkhe_start_page_main' ); }, 0);
add_action( 'arkhe_end_page_main' , function() { debug_arkhe_action_disp('arkhe_end_page_main' ); }, 0);
add_action( 'arkhe_before_page_content' , function() { debug_arkhe_action_disp('arkhe_before_page_content' ); }, 0);
add_action( 'arkhe_after_page_content' , function() { debug_arkhe_action_disp('arkhe_after_page_content' ); }, 0);
add_action( 'arkhe_start_entry_main' , function() { debug_arkhe_action_disp('arkhe_start_entry_main' ); }, 0);
add_action( 'arkhe_end_entry_main' , function() { debug_arkhe_action_disp('arkhe_end_entry_main' ); }, 0);
add_action( 'arkhe_before_entry_content' , function() { debug_arkhe_action_disp('arkhe_before_entry_content' ); }, 0);
add_action( 'arkhe_after_entry_content' , function() { debug_arkhe_action_disp('arkhe_after_entry_content' ); }, 0);
add_action( 'arkhe_start_entry_foot' , function() { debug_arkhe_action_disp('arkhe_start_entry_foot' ); }, 0);
add_action( 'arkhe_end_entry_foot' , function() { debug_arkhe_action_disp('arkhe_end_entry_foot' ); }, 0);
add_action( 'arkhe_start_archive_main' , function() { debug_arkhe_action_disp('arkhe_start_archive_main' ); }, 0);
add_action( 'arkhe_end_archive_main' , function() { debug_arkhe_action_disp('arkhe_end_archive_main' ); }, 0);
add_action( 'arkhe_before_term_post_list' , function() { debug_arkhe_action_disp('arkhe_before_term_post_list' ); }, 0);
add_action( 'arkhe_before_term_post_list' , function() { debug_arkhe_action_disp('arkhe_before_term_post_list' ); }, 0);
add_action( 'arkhe_start_author_main' , function() { debug_arkhe_action_disp('arkhe_start_author_main' ); }, 0);
add_action( 'arkhe_end_author_main' , function() { debug_arkhe_action_disp('arkhe_end_author_main' ); }, 0);
add_action( 'arkhe_before_author_post_list' , function() { debug_arkhe_action_disp('arkhe_before_author_post_list' ); }, 0);
add_action( 'arkhe_start_search_main' , function() { debug_arkhe_action_disp('arkhe_start_search_main' ); }, 0);
add_action( 'arkhe_end_search_main' , function() { debug_arkhe_action_disp('arkhe_end_search_main' ); }, 0);
add_action( 'arkhe_before_search_post_list' , function() { debug_arkhe_action_disp('arkhe_before_search_post_list' ); }, 0);
add_action( 'arkhe_start_404_main' , function() { debug_arkhe_action_disp('arkhe_start_404_main' ); }, 0);
add_action( 'arkhe_end_404_main' , function() { debug_arkhe_action_disp('arkhe_end_404_main' ); }, 0);
add_action( 'arkhe_before_404_content' , function() { debug_arkhe_action_disp('arkhe_before_404_content' ); }, 0);
add_action( 'arkhe_after_404_content' , function() { debug_arkhe_action_disp('arkhe_after_404_content' ); }, 0);
add_action( 'arkhe_after_author_name' , function() { debug_arkhe_action_disp('arkhe_after_author_name' ); }, 0);
add_action( 'arkhe_author_links' , function() { debug_arkhe_action_disp('arkhe_author_links' ); }, 0);
//add_action( 'ark_get__head_logo_img' , function() { debug_arkhe_action_disp('ark_get__head_logo_img' ); }, 0);
//add_action( 'ark_the__thumbnail' , function() { debug_arkhe_action_disp('ark_the__thumbnail' ); }, 0);
//add_action( 'ark_the__postdate' , function() { debug_arkhe_action_disp('ark_the__postdate' ); }, 0);
//add_action( 'ark_the__pnlink' , function() { debug_arkhe_action_disp('ark_the__pnlink' ); }, 0);
//add_action( 'arkhe_logo_tag' , function() { debug_arkhe_action_disp('arkhe_logo_tag' ); }, 0);
//add_action( 'arkge_head_logo_sizes' , function() { debug_arkhe_action_disp('arkge_head_logo_sizes' ); }, 0);
//add_action( 'ark_get__head_logo_img' , function() { debug_arkhe_action_disp('ark_get__head_logo_img' ); }, 0);
//add_action( 'arkhe_gnav_location_name' , function() { debug_arkhe_action_disp('arkhe_gnav_location_name' ); }, 0);
//add_action( 'arkhe_ttlbg_img_id' , function() { debug_arkhe_action_disp('arkhe_ttlbg_img_id' ); }, 0);
//add_action( 'arkhe_page_subtitle' , function() { debug_arkhe_action_disp('arkhe_page_subtitle' ); }, 0);
//add_action( 'arkhe_top_area_excerpt' , function() { debug_arkhe_action_disp('arkhe_top_area_excerpt' ); }, 0);
//add_action( 'arkhe_list_type_on_home' , function() { debug_arkhe_action_disp('arkhe_list_type_on_home' ); }, 0);
//add_action( 'arkhe_list_type_on_term' , function() { debug_arkhe_action_disp('arkhe_list_type_on_term' ); }, 0);
//add_action( 'arkhe_list_type_on_author' , function() { debug_arkhe_action_disp('arkhe_list_type_on_author' ); }, 0);
//add_action( 'arkhe_list_type_on_archive' , function() { debug_arkhe_action_disp('arkhe_list_type_on_archive' ); }, 0);
//add_action( 'arkhe_list_type_on_search' , function() { debug_arkhe_action_disp('arkhe_list_type_on_search' ); }, 0);
//add_action( 'arkhe_page_subtitle' , function() { debug_arkhe_action_disp('arkhe_page_subtitle' ); }, 0);
//add_action( 'arkhe_list_type_on_home' , function() { debug_arkhe_action_disp('arkhe_list_type_on_home' ); }, 0);
//add_action( 'arkhe_show_show_foot_terms' , function() { debug_arkhe_action_disp('arkhe_show_show_foot_terms' ); }, 0);
//add_action( 'arkhe_show_show_prev_next_link' , function() { debug_arkhe_action_disp('arkhe_show_show_prev_next_link' ); }, 0);
//add_action( 'arkhe_show_author_box' , function() { debug_arkhe_action_disp('arkhe_show_author_box' ); }, 0);
//add_action( 'arkhe_show_related_posts' , function() { debug_arkhe_action_disp('arkhe_show_related_posts' ); }, 0);
//add_action( 'arkhe_show_entry_comments' , function() { debug_arkhe_action_disp('arkhe_show_entry_comments' ); }, 0);
//add_action( 'arkhe_author_area_title' , function() { debug_arkhe_action_disp('arkhe_author_area_title' ); }, 0);
//add_action( 'arkhe_related_area_title' , function() { debug_arkhe_action_disp('arkhe_related_area_title' ); }, 0);
//add_action( 'arkhe_related_posts_args' , function() { debug_arkhe_action_disp('arkhe_related_posts_args' ); }, 0);
//add_action( 'arkhe_search_title' , function() { debug_arkhe_action_disp('arkhe_search_title' ); }, 0);
//add_action( 'arkhe_404_title' , function() { debug_arkhe_action_disp('arkhe_404_title' ); }, 0);
//add_action( 'arkhe_404_content' , function() { debug_arkhe_action_disp('arkhe_404_content' ); }, 0);
//add_action( 'arkhe_content_width' , function() { debug_arkhe_action_disp('arkhe_content_width' ); }, 0);
//add_action( 'arkhe_root_attrs' , function() { debug_arkhe_action_disp('arkhe_root_attrs' ); }, 0);
//add_action( 'arkhe_header_attrs' , function() { debug_arkhe_action_disp('arkhe_header_attrs' ); }, 0);
//add_action( 'arkhe_main_class' , function() { debug_arkhe_action_disp('arkhe_main_class' ); }, 0);
//add_action( 'arkhe_main_body_class' , function() { debug_arkhe_action_disp('arkhe_main_body_class' ); }, 0);
//add_action( 'arkhe_post_content_class' , function() { debug_arkhe_action_disp('arkhe_post_content_class' ); }, 0);
//add_action( 'arkhe_is_show_sidebar' , function() { debug_arkhe_action_disp('arkhe_is_show_sidebar' ); }, 0);
//add_action( 'arkhe_is_show_ttltop' , function() { debug_arkhe_action_disp('arkhe_is_show_ttltop' ); }, 0);
//add_action( 'arkhe_is_header_overlay' , function() { debug_arkhe_action_disp('arkhe_is_header_overlay' ); }, 0);
//add_action( 'arkhe_breadcrumbs_position' , function() { debug_arkhe_action_disp('arkhe_breadcrumbs_position' ); }, 0);
//add_action( 'arkhe_breadcrumbs_data' , function() { debug_arkhe_action_disp('arkhe_breadcrumbs_data' ); }, 0);
//add_action( 'arkhe_alignwide_plus_width' , function() { debug_arkhe_action_disp('arkhe_alignwide_plus_width' ); }, 0);
//add_action( 'arkhe_alignwide_pad_width' , function() { debug_arkhe_action_disp('arkhe_alignwide_pad_width' ); }, 0);
各アクションの優先度はすべて0(一番先)にしているので優先度を変えると場所が変わるのかなども見れる。
最後に
アクションフックを使えば、子テーマから親テーマに手を加えることなくカスタマイズできるのでそういう意味ではよい機能だと思う。また、視覚的に見ることでアクションの実行順などが分かりやすく勉強になった。