barrykooij / what-the-file Goto Github PK
View Code? Open in Web Editor NEWWordPress plugin: Find out what template file (PHP) is used on the current page. What The File will be visible in the Toolbar when viewing your website.
WordPress plugin: Find out what template file (PHP) is used on the current page. What The File will be visible in the Toolbar when viewing your website.
When you click on the template file that is being used, you should be redirected to the file editor for that particular file.
When using a child theme it still redirects to the main theme, instead of going to the child theme.
Line 174
$this->template_name = str_ireplace( get_template_directory() . '/', '', $template );
I am not sure why I get this error when What The File is activated with bbPress. I am running PHP 5.5 and WP 3.9.1
Notice: bbp_setup_current_user was called incorrectly. The current user is being initialized without using $wp->init(). Please see Debugging in WordPress for more information. (This message was added in version 2.3.) in /wp-includes/functions.php on line 3245
bbPress has this code
/**
* Setup the currently logged-in user
*
* @since bbPress (r2695)
* @uses did_action() To make sure the user isn't loaded out of order
* @uses do_action() Calls 'bbp_setup_current_user'
*/
function bbp_setup_current_user() {
// If the current user is being setup before the "init" action has fired,
// strange (and difficult to debug) role/capability issues will occur.
if ( ! did_action( 'after_setup_theme' ) ) {
_doing_it_wrong( __FUNCTION__, __( 'The current user is being initialized without using $wp->init().', 'bbpress' ), '2.3' );
}
do_action( 'bbp_setup_current_user' );
}
Why to wait till plugins_loaded
? Only init
and admin_init
is hooked.
https://github.com/barrykooij/what-the-file/blob/master/what-the-file.php#L372-L380
https://github.com/barrykooij/what-the-file/blob/master/what-the-file.php#L293
Please consider wp_add_inline_style( 'wp-admin', $css_string );
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.