Show Current Template - Version 0.4.4-alpha

Version Description

None so far.

Download this release

Release Info

Developer tai
Plugin Icon Show Current Template
Version 0.4.4-alpha
Comparing to
See all releases

Code changes from version 0.4.3 to 0.4.4-alpha

Files changed (1) hide show
  1. show-current-template.php +37 -3
show-current-template.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Show Current Template
4
  Plugin URI: https://wp.tekapo.com/
5
  Description: Show the current template file name in the tool bar. <a href="https://wp.tekapo.com/is-my-plugin-useful/">Is this useful for you?</a>
6
  Author: JOTAKI Taisuke
7
- Version: 0.4.3
8
  Author URI: https://tekapo.com/
9
  Text Domain: show-current-template
10
  Domain Path: /languages/
@@ -30,13 +30,15 @@ along with this program; if not, write to the Free Software
30
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
31
  * */
32
 
33
- define( 'WPSCT_VERSION', '0.4.3' );
34
 
35
  load_plugin_textdomain( 'show-current-template', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
36
 
37
  new Show_Template_File_Name();
38
 
39
  class Show_Template_File_Name {
 
 
40
 
41
  public function __construct() {
42
  add_action( 'wp_footer', array( $this, 'get_included_files_at_footr' ) );
@@ -87,6 +89,20 @@ class Show_Template_File_Name {
87
  }
88
  }
89
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
90
 
91
  global $wp_admin_bar;
92
  $args = array(
@@ -153,7 +169,25 @@ class Show_Template_File_Name {
153
  . '%s'
154
  . '</ol>';
155
  $included_files_html = sprintf( $included_files_format, $included_files_list );
156
- echo wp_kses_post( $included_files_html );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
157
  }
158
 
159
  public function add_current_template_stylesheet() {
4
  Plugin URI: https://wp.tekapo.com/
5
  Description: Show the current template file name in the tool bar. <a href="https://wp.tekapo.com/is-my-plugin-useful/">Is this useful for you?</a>
6
  Author: JOTAKI Taisuke
7
+ Version: 0.4.4-alpha
8
  Author URI: https://tekapo.com/
9
  Text Domain: show-current-template
10
  Domain Path: /languages/
30
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
31
  * */
32
 
33
+ define( 'WPSCT_VERSION', '0.4.4-alpha' );
34
 
35
  load_plugin_textdomain( 'show-current-template', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
36
 
37
  new Show_Template_File_Name();
38
 
39
  class Show_Template_File_Name {
40
+
41
+ public $debug_info = [];
42
 
43
  public function __construct() {
44
  add_action( 'wp_footer', array( $this, 'get_included_files_at_footr' ) );
89
  }
90
  }
91
  }
92
+
93
+ $debug_info_1 = var_export( $included_files_list, true );
94
+ $comment_out_debug_info_format_1 = '
95
+ <!--
96
+ ::Debug info 1 start::
97
+
98
+ ##show_template_file_name_on_top##
99
+
100
+ %s
101
+
102
+ ::Debug info 1 end::
103
+ -->
104
+ ';
105
+ $this->debug_info[1] = sprintf( $comment_out_debug_info_format_1, $debug_info_1 );
106
 
107
  global $wp_admin_bar;
108
  $args = array(
169
  . '%s'
170
  . '</ol>';
171
  $included_files_html = sprintf( $included_files_format, $included_files_list );
172
+
173
+ $debug_info_2 = var_export( $included_files, true );
174
+ $comment_out_debug_info_format_2 = '
175
+ <!--
176
+ ::Debug info 2 start::
177
+
178
+ ##get_included_files_at_footr##
179
+
180
+ %s
181
+
182
+ ::Debug info 2 end::
183
+ -->
184
+ ';
185
+ $this->debug_info[2] = sprintf( $comment_out_debug_info_format_2, $debug_info_2 );
186
+
187
+ echo $this->debug_info[1];
188
+ echo $this->debug_info[2];
189
+ // echo wp_kses_post( $included_files_html );
190
+ echo $included_files_html;
191
  }
192
 
193
  public function add_current_template_stylesheet() {