https://github.com/webdeveric/what-template-am-i-using
Show detailed information about your active WordPress theme
https://github.com/webdeveric/what-template-am-i-using
template theme wordpress wordpress-plugin
Last synced: about 1 month ago
JSON representation
Show detailed information about your active WordPress theme
- Host: GitHub
- URL: https://github.com/webdeveric/what-template-am-i-using
- Owner: webdeveric
- Created: 2014-09-15T02:50:43.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2024-03-10T17:57:01.000Z (over 2 years ago)
- Last Synced: 2025-01-12T09:12:41.055Z (over 1 year ago)
- Topics: template, theme, wordpress, wordpress-plugin
- Language: PHP
- Homepage: https://wordpress.org/plugins/what-template-am-i-using/
- Size: 327 KB
- Stars: 1
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# What Template Am I Using #
This WordPress plugin is intended for theme developers to use.
It shows the current template being used to render the page, current post type, and much more.
## Installation ##
### `composer`
`composer require wpackagist-plugin/what-template-am-i-using`
### WP Admin ###
Since this plugin is in the [WordPress plugin directory](https://wordpress.org/plugins/what-template-am-i-using/), it can be installed through the plugin search in the WP admin.
WordPress Admin > Plugins > Add New > Search: What Template Am I Using
### WP CLI ###
This will install the version that is in the WordPress plugin directory.
`wp plugin install what-template-am-i-using --activate`
## Add your own panels ##
If you don't see what you're looking for in the panels I've provided, its easy to add your own.
1. Create a class that extends `WTAIU_Panel`. Take a look at [inc/core-panels.php](inc/core-panels.php) for examples.
1. Add it to the sidebar with the `wtaiu_setup_panels` action. See [`setup_wtaiu_panels()`](what-template-am-i-using.php#L327) for example.
## Filters ##
### Handle text ###
```php
add_filter('wtaiu_handle_text', function( $text ) {
return 'Your Custom Text Here';
} );
```
### Show/hide panels ###
```php
function wtaiu_can_show( $can_show, WTAIU_Panel $panel ) {
if ( is_a( $panel, 'WTAIU_Theme_Panel') )
return false;
return $can_show;
}
add_filter('wtaiu_panel_can_show', 'wtaiu_can_show', 10, 2 );
```
### Public IP address ###
To find the public IP address of your server, a request is made to an external website that echos back the IP.
You can easily change the URL that is used.
```php
add_filter('wtaiu_find_public_ip_url', function( $url ) {
return 'http://example.com/';
} );
```