Version Description
- Fix showing included files at bottom when the logged in user's roles other than admin.
Download this release
Release Info
Developer | tai |
Plugin | Show Current Template |
Version | 0.4.2 |
Comparing to | |
See all releases |
Code changes from version 0.4.1 to 0.4.2
- readme.txt +4 -1
- show-current-template.php +6 -6
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://wp.tekapo.com/is-my-plugin-useful/
|
|
4 |
Tags: template, toolbar
|
5 |
Requires at least: 3.5
|
6 |
Tested up to: 5.6
|
7 |
-
Stable tag: 0.4.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -50,6 +50,9 @@ None so far.
|
|
50 |
|
51 |
== Changelog ==
|
52 |
|
|
|
|
|
|
|
53 |
= 0.4.1 =
|
54 |
* Fix showing included files at bottom when visitor visits the site. This issue was reported by @tsato. Thank you very much!
|
55 |
|
4 |
Tags: template, toolbar
|
5 |
Requires at least: 3.5
|
6 |
Tested up to: 5.6
|
7 |
+
Stable tag: 0.4.2
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
50 |
|
51 |
== Changelog ==
|
52 |
|
53 |
+
= 0.4.2 =
|
54 |
+
* Fix showing included files at bottom when the logged in user's roles other than admin.
|
55 |
+
|
56 |
= 0.4.1 =
|
57 |
* Fix showing included files at bottom when visitor visits the site. This issue was reported by @tsato. Thank you very much!
|
58 |
|
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.
|
8 |
Author URI: https://tekapo.com/
|
9 |
Text Domain: show-current-template
|
10 |
Domain Path: /languages/
|
@@ -30,7 +30,7 @@ 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.
|
34 |
|
35 |
load_plugin_textdomain( 'show-current-template', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
|
36 |
|
@@ -127,11 +127,11 @@ class Show_Template_File_Name {
|
|
127 |
}
|
128 |
|
129 |
public function get_included_files_at_footr() {
|
130 |
-
|
131 |
-
if ( ! is_user_logged_in() ) {
|
132 |
return;
|
133 |
}
|
134 |
-
|
135 |
$included_files = get_included_files();
|
136 |
global $template;
|
137 |
|
@@ -152,7 +152,7 @@ class Show_Template_File_Name {
|
|
152 |
$included_files_format = '<ol id="included-files-fie-on-wp-footer">'
|
153 |
. '%s'
|
154 |
. '</ol>';
|
155 |
-
$included_files_html
|
156 |
echo wp_kses_post( $included_files_html );
|
157 |
}
|
158 |
|
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.2
|
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.2' );
|
34 |
|
35 |
load_plugin_textdomain( 'show-current-template', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
|
36 |
|
127 |
}
|
128 |
|
129 |
public function get_included_files_at_footr() {
|
130 |
+
|
131 |
+
if ( ! is_user_logged_in() || ! current_user_can( 'administrator' ) ) {
|
132 |
return;
|
133 |
}
|
134 |
+
|
135 |
$included_files = get_included_files();
|
136 |
global $template;
|
137 |
|
152 |
$included_files_format = '<ol id="included-files-fie-on-wp-footer">'
|
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 |
|