Last active
July 30, 2022 22:04
-
-
Save gatespace/4482529 to your computer and use it in GitHub Desktop.
Revisions
-
gatespace revised this gist
May 23, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -13,7 +13,7 @@ function view_template_files() { $style_top = ( is_admin_bar_showing() ) ? "35px" : "0px"; echo '<code style="position: fixed; top: ' . $style_top . '; right: 10px; z-index: 9999; background-color: rgba(255, 255, 255, 0.5); padding: 10px; color: #000000; border: solid 2px #000000; ">'; echo "テーマのディレクトリ名:" . $template_dir; echo " テンプレートファイル名:" . $template_name; echo "</code>\n"; } } -
gatespace revised this gist
Jan 22, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -6,7 +6,7 @@ add_action('wp_footer', 'view_template_files'); if ( !function_exists( 'view_template_files' ) ): function view_template_files() { if ( defined('WP_DEBUG') && WP_DEBUG ) { global $template; $template_name = basename( $template, '.php' ); $template_dir = basename ( dirname( $template ) ); -
gatespace revised this gist
Jan 17, 2013 . 1 changed file with 0 additions and 8 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,14 +1,6 @@ /* WordPressのテーマにおいて、テンプレート階層に基づきどのテンプレートファイルが使われているか書き出すコード。 ただし、header.php や get_template_part などでインクルードされているファイルを除く。 */ add_action('wp_footer', 'view_template_files'); -
gatespace revised this gist
Jan 17, 2013 . No changes.There are no files selected for viewing
-
gatespace revised this gist
Jan 17, 2013 . 1 changed file with 11 additions and 3 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -2,19 +2,27 @@ WordPressのテーマにおいて、テンプレート階層に基づきどのテンプレートファイルが使われているか書き出すコード。 ただし、header.php や get_template_part などでインクルードされているファイルを除く。 header.php あたりに do_action( 'before' );があること前提 2013.1.16 @wokamoto さんのコードを元に、テンプレートファイル名とテーマフォルダを分かりやすく表記するようにしました。 https://gist.github.com/4553528 https://gist.github.com/4553584 @tekapo さんのコードを元にwp_footer にフックする用に変更しました。 https://gist.github.com/4529793 スタイルシート周りを調整しました。 */ add_action('wp_footer', 'view_template_files'); if ( !function_exists( 'view_template_files' ) ): function view_template_files() { if ( WP_DEBUG ) { global $template; $template_name = basename( $template, '.php' ); $template_dir = basename ( dirname( $template ) ); $style_top = ( is_admin_bar_showing() ) ? "35px" : "0px"; echo '<code style="position: fixed; top: ' . $style_top . '; right: 10px; z-index: 9999; background-color: rgba(255, 255, 255, 0.5); padding: 10px; color: #000000; border: solid 2px #000000; ">'; echo "テーマのディレクトリ名:" . $template_dir; echo " テンプレートファイル名:" . $template_name . "</code>"; echo "</code>\n"; } } endif; -
gatespace revised this gist
Jan 17, 2013 . 1 changed file with 8 additions and 3 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -2,14 +2,19 @@ WordPressのテーマにおいて、テンプレート階層に基づきどのテンプレートファイルが使われているか書き出すコード。 ただし、header.php や get_template_part などでインクルードされているファイルを除く。 header.php あたりに do_action( 'before' );があること前提 2013.1.16 @wokamoto さんのコードを元に、テンプレートファイル名とテーマフォルダを分かりやすく表記するようにしました。 https://gist.github.com/4553528 https://gist.github.com/4553584 */ add_action('before', 'view_template_files'); if ( !function_exists( 'view_template_files' ) ): function view_template_files() { if ( WP_DEBUG ) { global $template; $template_name = basename( $template, '.php' ); $template_dir = basename ( dirname( $template ) ); echo '<code style="position: absolute; top: 35px; right: 0; z-index: 9999;">テーマのディレクトリ名:' . $template_dir. " テンプレートファイル名:" . $template_name . "</code>"; } } endif; -
gatespace created this gist
Jan 8, 2013 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ /* WordPressのテーマにおいて、テンプレート階層に基づきどのテンプレートファイルが使われているか書き出すコード。 ただし、header.php や get_template_part などでインクルードされているファイルを除く。 header.php あたりに do_action( 'before' );があること前提 */ if ( !function_exists( 'view_template_files' ) ): function view_template_files() { if (WP_DEBUG) { global $template; echo '<code style="position: absolute; top: 30px; right: 0; z-index: 9999;">'.$template."</code>"; } } endif; add_action('before', 'view_template_files');