-
Notifications
You must be signed in to change notification settings - Fork 0
/
paths.html
49 lines (44 loc) · 1.89 KB
/
paths.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<div class="wrap">
<?php
/**
* At some point, rewrite to lay out as a table:
* Name, value, doc link, source link.
* Have each set of functions as an array, then
* pass it to the table layout.
* http://codex.wordpress.org/Function_Reference/get_template_directory_uri
*/
?>
<h2>Demo Plugin Paths</h2>
<h3>WordPress Theme functions (<a href="http://core.trac.wordpress.org/browser/tags/3.2.1/wp-includes/theme.php">src</a>)</h3>
<p>For child theme</p>
<ol>
<li><?php echo 'get_stylesheet(): ' . get_stylesheet(); ?></li>
<li><?php echo 'get_stylesheet_uri(): ' . get_stylesheet_uri(); ?></li>
<li><?php echo 'get_theme_root_uri(): ' . get_theme_root_uri(); ?></li>
<li><?php echo 'get_stylesheet_directory(): ' . get_stylesheet_directory(); ?></li>
<li><?php echo 'get_stylesheet_directory_uri(): ' . get_stylesheet_directory_uri(); ?></li>
</ol>
<p>For parent theme</p>
<ol>
<li><?php echo 'get_template(): ' . get_template(); ?></li>
<li><?php echo 'get_template_directory(): ' . get_template_directory(); ?></li>
<li><?php echo 'get_template_directory_uri(): ' . get_template_directory_uri(); ?></li>
</ol>
<h3>WordPress defined</h3>
<ol>
<li><?php echo 'ABSPATH: '.ABSPATH ?></li>
<li><?php echo "WP_CONTENT_DIR: ".WP_CONTENT_DIR ?></li>
<li><?php echo "WP_CONTENT_URL: ".WP_CONTENT_URL ?></li>
<li><?php echo "WP_PLUGIN_DIR: ".WP_PLUGIN_DIR ?></li>
<li><?php echo "WP_PLUGIN_URL: ".WP_PLUGIN_URL ?></li>
<li><?php echo "TEMPLATEPATH: ".TEMPLATEPATH ?></li>
<li><?php echo "STYLESHEETPATH: ".STYLESHEETPATH ?></li>
<li><?php echo "CHILDPATH: ".CHILDPATH ?></li>
</ol>
<h3>PHP defined</h3>
<ol>
<li><?php echo "__FILE__: ".__FILE__ ?></li>
<li><?php echo "dirname(__FILE__): ".dirname(__FILE__) ?></li>
<li><?php echo "basename(__FILE__, php): ".basename(__FILE__, ".php") ?></li>
</ol>
</div>