Version Description
- UPDATED: Make the file list scrollable.
- UPDATED: Change css to sass.
Download this release
Release Info
Developer | tai |
Plugin | Show Current Template |
Version | 0.3.0 |
Comparing to | |
See all releases |
Code changes from version 0.2.2 to 0.3.0
- css/style-old.css +25 -0
- css/style-old.css.map +7 -0
- css/style.css +32 -0
- css/style.css.map +7 -0
- readme.txt +6 -2
- sass/style-old.scss +37 -0
- sass/style.scss +47 -0
- show-current-template.php +23 -20
- style-old.css +0 -33
- style.css +0 -37
css/style-old.css
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
Document : style.css
|
3 |
+
Created on : 2013/01/21, 16:04:46
|
4 |
+
Updated on : 2014/01/26, 22:28
|
5 |
+
Author : tai
|
6 |
+
Description:
|
7 |
+
The stylesheet for the plugin.
|
8 |
+
*/
|
9 |
+
#wpadminbar .show-template-name, #wpadminbar .hover .show-template-name {
|
10 |
+
font-family: monospace;
|
11 |
+
text-shadow: none; }
|
12 |
+
#wpadminbar #wp-admin-bar-included_files_path .ab-item {
|
13 |
+
height: auto; }
|
14 |
+
#wpadminbar #wp-admin-bar-included_files_path .ab-item div {
|
15 |
+
font-family: monospace;
|
16 |
+
text-shadow: none; }
|
17 |
+
#wpadminbar .show-template-name {
|
18 |
+
color: #ccc; }
|
19 |
+
#wpadminbar #included-files-list li, #wpadminbar .menupop.hover .show-template-name {
|
20 |
+
color: #333; }
|
21 |
+
#wpadminbar #included-files-list li {
|
22 |
+
margin-left: 20px;
|
23 |
+
text-shadow: none; }
|
24 |
+
|
25 |
+
/*# sourceMappingURL=style-old.css.map */
|
css/style-old.css.map
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"version": 3,
|
3 |
+
"mappings": ";;;;;;;;AAUE,uEAAgD;EAC9C,WAAW,EAAE,SAAS;EACtB,WAAW,EAAE,IAAI;AAGnB,sDAA2C;EAMzC,MAAM,EAAE,IAAI;EALZ,0DAAI;IACF,WAAW,EAAE,SAAS;IACtB,WAAW,EAAE,IAAI;AAMrB,+BAAoB;EAClB,KAAK,EAAE,IAAI;AAGb,mFAA4D;EAC1D,KAAK,EAAE,IAAI;AAGb,mCAAwB;EACtB,WAAW,EAAE,IAAI;EACjB,WAAW,EAAE,IAAI",
|
4 |
+
"sources": ["../sass/style-old.scss"],
|
5 |
+
"names": [],
|
6 |
+
"file": "style-old.css"
|
7 |
+
}
|
css/style.css
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
Document : style.css
|
3 |
+
Created on : 2013/01/21, 16:04:46
|
4 |
+
Updated on : 2016/10/17, 18:42
|
5 |
+
Author : tai
|
6 |
+
Description:
|
7 |
+
The stylesheet for the plugin.
|
8 |
+
*/
|
9 |
+
#wpadminbar .show-template-name, #wpadminbar .hover .show-template-name {
|
10 |
+
font-family: monospace;
|
11 |
+
text-shadow: none; }
|
12 |
+
#wpadminbar #wp-admin-bar-included_files_path .ab-item {
|
13 |
+
height: auto;
|
14 |
+
padding-bottom: 1rem; }
|
15 |
+
#wpadminbar #wp-admin-bar-included_files_path .ab-item div {
|
16 |
+
font-family: monospace;
|
17 |
+
text-shadow: none;
|
18 |
+
color: #fff; }
|
19 |
+
#wpadminbar .hover .show-template-name:hover {
|
20 |
+
color: #2ea2cc; }
|
21 |
+
#wpadminbar #wp-admin-bar-included_files_path .ab-item #included-files-list li {
|
22 |
+
line-height: 1.5; }
|
23 |
+
#wpadminbar #wp-admin-bar-included_files_path .ab-item #included-files-list li:hover {
|
24 |
+
color: #2ea2cc; }
|
25 |
+
#wpadminbar #included-files-list {
|
26 |
+
margin-left: 20px; }
|
27 |
+
|
28 |
+
#wp-admin-bar-show_template_file_name_on_top-default {
|
29 |
+
max-height: 90vh;
|
30 |
+
overflow-x: hidden; }
|
31 |
+
|
32 |
+
/*# sourceMappingURL=style.css.map */
|
css/style.css.map
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"version": 3,
|
3 |
+
"mappings": "AAAA;;;;;;;EAOE;AAGA,uEAAgD;EAC9C,WAAW,EAAE,SAAS;EACtB,WAAW,EAAE,IAAI;AAGnB,sDAA2C;EAOzC,MAAM,EAAE,IAAI;EACZ,cAAc,EAAE,IAAI;EAPpB,0DAAI;IACF,WAAW,EAAE,SAAS;IACtB,WAAW,EAAE,IAAI;IACjB,KAAK,EAAE,IAAI;AAOf,4CAAiC;EAC/B,KAAK,EAAE,OAAO;AAGhB,8EAAmE;EAKjE,WAAW,EAAE,GAAG;EAJhB,oFAAQ;IACN,KAAK,EAAE,OAAO;AAMlB,gCAAqB;EACnB,WAAW,EAAE,IAAI;;AAIrB,oDAAqD;EACjD,UAAU,EAAE,IAAI;EAChB,UAAU,EAAE,MAAM",
|
4 |
+
"sources": ["../sass/style.scss"],
|
5 |
+
"names": [],
|
6 |
+
"file": "style.css"
|
7 |
+
}
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: tai
|
|
3 |
Donate link:
|
4 |
Tags: template, toolbar
|
5 |
Requires at least: 3.5
|
6 |
-
Tested up to: 4.
|
7 |
-
Stable tag: 0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -45,6 +45,10 @@ None so far.
|
|
45 |
|
46 |
== Changelog ==
|
47 |
|
|
|
|
|
|
|
|
|
48 |
= 0.2.2 =
|
49 |
* Oops, too short.
|
50 |
|
3 |
Donate link:
|
4 |
Tags: template, toolbar
|
5 |
Requires at least: 3.5
|
6 |
+
Tested up to: 4.9.1
|
7 |
+
Stable tag: 0.3.0
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
45 |
|
46 |
== Changelog ==
|
47 |
|
48 |
+
= 0.3.0 =
|
49 |
+
* UPDATED: Make the file list scrollable.
|
50 |
+
* UPDATED: Change css to sass.
|
51 |
+
|
52 |
= 0.2.2 =
|
53 |
* Oops, too short.
|
54 |
|
sass/style-old.scss
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
Document : style.css
|
3 |
+
Created on : 2013/01/21, 16:04:46
|
4 |
+
Updated on : 2014/01/26, 22:28
|
5 |
+
Author : tai
|
6 |
+
Description:
|
7 |
+
The stylesheet for the plugin.
|
8 |
+
*/
|
9 |
+
|
10 |
+
#wpadminbar {
|
11 |
+
.show-template-name, .hover .show-template-name {
|
12 |
+
font-family: monospace;
|
13 |
+
text-shadow: none;
|
14 |
+
}
|
15 |
+
|
16 |
+
#wp-admin-bar-included_files_path .ab-item {
|
17 |
+
div {
|
18 |
+
font-family: monospace;
|
19 |
+
text-shadow: none;
|
20 |
+
}
|
21 |
+
|
22 |
+
height: auto;
|
23 |
+
}
|
24 |
+
|
25 |
+
.show-template-name {
|
26 |
+
color: #ccc;
|
27 |
+
}
|
28 |
+
|
29 |
+
#included-files-list li, .menupop.hover .show-template-name {
|
30 |
+
color: #333;
|
31 |
+
}
|
32 |
+
|
33 |
+
#included-files-list li {
|
34 |
+
margin-left: 20px;
|
35 |
+
text-shadow: none;
|
36 |
+
}
|
37 |
+
}
|
sass/style.scss
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
Document : style.css
|
3 |
+
Created on : 2013/01/21, 16:04:46
|
4 |
+
Updated on : 2016/10/17, 18:42
|
5 |
+
Author : tai
|
6 |
+
Description:
|
7 |
+
The stylesheet for the plugin.
|
8 |
+
*/
|
9 |
+
|
10 |
+
#wpadminbar {
|
11 |
+
.show-template-name, .hover .show-template-name {
|
12 |
+
font-family: monospace;
|
13 |
+
text-shadow: none;
|
14 |
+
}
|
15 |
+
|
16 |
+
#wp-admin-bar-included_files_path .ab-item {
|
17 |
+
div {
|
18 |
+
font-family: monospace;
|
19 |
+
text-shadow: none;
|
20 |
+
color: #fff;
|
21 |
+
}
|
22 |
+
|
23 |
+
height: auto;
|
24 |
+
padding-bottom: 1rem;
|
25 |
+
}
|
26 |
+
|
27 |
+
.hover .show-template-name:hover {
|
28 |
+
color: #2ea2cc;
|
29 |
+
}
|
30 |
+
|
31 |
+
#wp-admin-bar-included_files_path .ab-item #included-files-list li {
|
32 |
+
&:hover {
|
33 |
+
color: #2ea2cc;
|
34 |
+
}
|
35 |
+
|
36 |
+
line-height: 1.5;
|
37 |
+
}
|
38 |
+
|
39 |
+
#included-files-list {
|
40 |
+
margin-left: 20px;
|
41 |
+
}
|
42 |
+
}
|
43 |
+
|
44 |
+
#wp-admin-bar-show_template_file_name_on_top-default {
|
45 |
+
max-height: 90vh;
|
46 |
+
overflow-x: hidden;
|
47 |
+
}
|
show-current-template.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
Plugin URI: http://wp.tekapo.com/
|
6 |
Description: Show the current template file name in the tool bar.
|
7 |
Author: JOTAKI Taisuke
|
8 |
-
Version: 0.
|
9 |
Author URI: http://tekapo.com/
|
10 |
Text Domain: show-current-template
|
11 |
Domain Path: /languages/
|
@@ -31,14 +31,12 @@
|
|
31 |
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
32 |
*/
|
33 |
|
34 |
-
load_plugin_textdomain(
|
35 |
|
36 |
new Show_Template_File_Name();
|
37 |
|
38 |
class Show_Template_File_Name {
|
39 |
|
40 |
-
const TEXT_DOMAIN = 'show-current-template';
|
41 |
-
|
42 |
function __construct() {
|
43 |
add_action( "admin_bar_menu", array( &$this, "show_template_file_name_on_top" ), 9999 );
|
44 |
add_action( 'wp_enqueue_scripts', array( &$this, "add_current_template_stylesheet" ), 9999 );
|
@@ -46,8 +44,9 @@ class Show_Template_File_Name {
|
|
46 |
|
47 |
public function show_template_file_name_on_top( $wp_admin_bar ) {
|
48 |
|
49 |
-
if ( is_admin() or !is_super_admin() )
|
50 |
return;
|
|
|
51 |
|
52 |
global $template;
|
53 |
|
@@ -59,14 +58,15 @@ class Show_Template_File_Name {
|
|
59 |
$parent_theme_name = '';
|
60 |
|
61 |
if ( is_child_theme() ) {
|
62 |
-
$child_theme_name = __( 'Theme name: ',
|
63 |
. $current_theme_name;
|
64 |
$parent_theme_name = $current_theme->parent()->Name;
|
65 |
-
$parent_theme_name = ' (' . $parent_theme_name
|
|
|
66 |
$parent_or_child = $child_theme_name . $parent_theme_name;
|
67 |
} else {
|
68 |
-
$parent_or_child = __( 'Theme name: ',
|
69 |
-
. $current_theme_name . ' (' . __( 'NOT a child theme',
|
70 |
}
|
71 |
|
72 |
$included_files = get_included_files();
|
@@ -87,7 +87,7 @@ class Show_Template_File_Name {
|
|
87 |
global $wp_admin_bar;
|
88 |
$args = array(
|
89 |
'id' => 'show_template_file_name_on_top',
|
90 |
-
'title' => __( 'Template:',
|
91 |
. '<span class="show-template-name"> ' . $template_file_name . '</span>',
|
92 |
);
|
93 |
|
@@ -96,7 +96,7 @@ class Show_Template_File_Name {
|
|
96 |
$wp_admin_bar->add_menu( array(
|
97 |
'parent' => 'show_template_file_name_on_top',
|
98 |
'id' => 'template_relative_path',
|
99 |
-
'title' => __( 'Template relative path:',
|
100 |
. '<span class="show-template-name"> ' . $template_relative_path . '</span>',
|
101 |
) );
|
102 |
|
@@ -109,27 +109,30 @@ class Show_Template_File_Name {
|
|
109 |
$wp_admin_bar->add_menu( array(
|
110 |
'parent' => 'show_template_file_name_on_top',
|
111 |
'id' => 'included_files_path',
|
112 |
-
'title' => __( 'Also, below template files are included:',
|
113 |
-
|
114 |
-
. $included_files_list
|
|
|
115 |
) );
|
116 |
}
|
117 |
|
118 |
public function add_current_template_stylesheet() {
|
119 |
|
120 |
-
if ( is_admin() or !is_super_admin() ) {
|
121 |
return;
|
122 |
}
|
123 |
|
124 |
$wp_version = get_bloginfo( 'version' );
|
125 |
|
126 |
if ( $wp_version >= '3.8' ) {
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
wp_register_style( 'current-template-style', plugins_url( 'style-old.css', __FILE__ ) );
|
131 |
-
wp_enqueue_style( 'current-template-style' );
|
132 |
}
|
|
|
|
|
|
|
|
|
133 |
}
|
134 |
|
135 |
}
|
5 |
Plugin URI: http://wp.tekapo.com/
|
6 |
Description: Show the current template file name in the tool bar.
|
7 |
Author: JOTAKI Taisuke
|
8 |
+
Version: 0.3.0
|
9 |
Author URI: http://tekapo.com/
|
10 |
Text Domain: show-current-template
|
11 |
Domain Path: /languages/
|
31 |
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
32 |
*/
|
33 |
|
34 |
+
load_plugin_textdomain( 'show-current-template', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
|
35 |
|
36 |
new Show_Template_File_Name();
|
37 |
|
38 |
class Show_Template_File_Name {
|
39 |
|
|
|
|
|
40 |
function __construct() {
|
41 |
add_action( "admin_bar_menu", array( &$this, "show_template_file_name_on_top" ), 9999 );
|
42 |
add_action( 'wp_enqueue_scripts', array( &$this, "add_current_template_stylesheet" ), 9999 );
|
44 |
|
45 |
public function show_template_file_name_on_top( $wp_admin_bar ) {
|
46 |
|
47 |
+
if ( is_admin() or ! is_super_admin() ) {
|
48 |
return;
|
49 |
+
}
|
50 |
|
51 |
global $template;
|
52 |
|
58 |
$parent_theme_name = '';
|
59 |
|
60 |
if ( is_child_theme() ) {
|
61 |
+
$child_theme_name = __( 'Theme name: ', 'show-current-template' )
|
62 |
. $current_theme_name;
|
63 |
$parent_theme_name = $current_theme->parent()->Name;
|
64 |
+
$parent_theme_name = ' (' . $parent_theme_name
|
65 |
+
. __( "'s child", 'show-current-template' ) . ")";
|
66 |
$parent_or_child = $child_theme_name . $parent_theme_name;
|
67 |
} else {
|
68 |
+
$parent_or_child = __( 'Theme name: ', 'show-current-template' )
|
69 |
+
. $current_theme_name . ' (' . __( 'NOT a child theme', 'show-current-template' ) . ')';
|
70 |
}
|
71 |
|
72 |
$included_files = get_included_files();
|
87 |
global $wp_admin_bar;
|
88 |
$args = array(
|
89 |
'id' => 'show_template_file_name_on_top',
|
90 |
+
'title' => __( 'Template:', 'show-current-template' )
|
91 |
. '<span class="show-template-name"> ' . $template_file_name . '</span>',
|
92 |
);
|
93 |
|
96 |
$wp_admin_bar->add_menu( array(
|
97 |
'parent' => 'show_template_file_name_on_top',
|
98 |
'id' => 'template_relative_path',
|
99 |
+
'title' => __( 'Template relative path:', 'show-current-template' )
|
100 |
. '<span class="show-template-name"> ' . $template_relative_path . '</span>',
|
101 |
) );
|
102 |
|
109 |
$wp_admin_bar->add_menu( array(
|
110 |
'parent' => 'show_template_file_name_on_top',
|
111 |
'id' => 'included_files_path',
|
112 |
+
'title' => __( 'Also, below template files are included:', 'show-current-template' )
|
113 |
+
. '<br /><ul id="included-files-list">'
|
114 |
+
. $included_files_list
|
115 |
+
. '</ul>',
|
116 |
) );
|
117 |
}
|
118 |
|
119 |
public function add_current_template_stylesheet() {
|
120 |
|
121 |
+
if ( is_admin() or ! is_super_admin() ) {
|
122 |
return;
|
123 |
}
|
124 |
|
125 |
$wp_version = get_bloginfo( 'version' );
|
126 |
|
127 |
if ( $wp_version >= '3.8' ) {
|
128 |
+
$is_older_than_3_8 = '';
|
129 |
+
} else {
|
130 |
+
$is_older_than_3_8 = '-old';
|
|
|
|
|
131 |
}
|
132 |
+
|
133 |
+
$stylesheet_path = plugins_url( 'css/style' . $is_older_than_3_8 . '.css', __FILE__ );
|
134 |
+
wp_register_style( 'current-template-style', $stylesheet_path );
|
135 |
+
wp_enqueue_style( 'current-template-style' );
|
136 |
}
|
137 |
|
138 |
}
|
style-old.css
DELETED
@@ -1,33 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
Document : style.css
|
3 |
-
Created on : 2013/01/21, 16:04:46
|
4 |
-
Updated on : 2014/01/26, 22:28
|
5 |
-
Author : tai
|
6 |
-
Description:
|
7 |
-
The stylesheet for the plugin.
|
8 |
-
*/
|
9 |
-
|
10 |
-
#wpadminbar .show-template-name,
|
11 |
-
#wpadminbar .hover .show-template-name,
|
12 |
-
#wpadminbar #wp-admin-bar-included_files_path .ab-item div {
|
13 |
-
font-family: monospace;
|
14 |
-
text-shadow: none;
|
15 |
-
}
|
16 |
-
|
17 |
-
#wpadminbar #wp-admin-bar-included_files_path .ab-item {
|
18 |
-
height: auto;
|
19 |
-
}
|
20 |
-
|
21 |
-
#wpadminbar .show-template-name {
|
22 |
-
color: #ccc;
|
23 |
-
}
|
24 |
-
|
25 |
-
#wpadminbar #included-files-list li,
|
26 |
-
#wpadminbar .menupop.hover .show-template-name {
|
27 |
-
color: #333;
|
28 |
-
}
|
29 |
-
|
30 |
-
#wpadminbar #included-files-list li {
|
31 |
-
margin-left: 20px;
|
32 |
-
text-shadow: none;
|
33 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
style.css
DELETED
@@ -1,37 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
Document : style.css
|
3 |
-
Created on : 2013/01/21, 16:04:46
|
4 |
-
Updated on : 2015/11/29, 9:45
|
5 |
-
Author : tai
|
6 |
-
Description:
|
7 |
-
The stylesheet for the plugin.
|
8 |
-
*/
|
9 |
-
|
10 |
-
#wpadminbar .show-template-name,
|
11 |
-
#wpadminbar .hover .show-template-name,
|
12 |
-
#wpadminbar #wp-admin-bar-included_files_path .ab-item div {
|
13 |
-
font-family: monospace;
|
14 |
-
text-shadow: none;
|
15 |
-
}
|
16 |
-
|
17 |
-
#wpadminbar #wp-admin-bar-included_files_path .ab-item {
|
18 |
-
height: auto;
|
19 |
-
padding-bottom: 1rem;
|
20 |
-
}
|
21 |
-
|
22 |
-
#wpadminbar #wp-admin-bar-included_files_path .ab-item div {
|
23 |
-
color: #fff;
|
24 |
-
}
|
25 |
-
|
26 |
-
#wpadminbar .hover .show-template-name:hover,
|
27 |
-
#wpadminbar #wp-admin-bar-included_files_path .ab-item #included-files-list li:hover {
|
28 |
-
color: #2ea2cc;
|
29 |
-
}
|
30 |
-
|
31 |
-
#wpadminbar #wp-admin-bar-included_files_path .ab-item #included-files-list li {
|
32 |
-
line-height: 1.5;
|
33 |
-
}
|
34 |
-
|
35 |
-
#wpadminbar #included-files-list {
|
36 |
-
margin-left: 20px;
|
37 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|