Tag Info

Hot answers tagged

6

I don't think there is a universal URL hook. There are a lot of hooks and I may have missed it, but I don't think there is one. You can look through the hooks at adambrown.info. There are a lot of URL hooks, but not a universal one. If I may suggest another solution: Log the errors to a files. /** * This will log all errors notices and warnings to a file ...


5

There are multiple tools and possibilities, and shure it would be nice to have something quick at hand. I know plugin authors who do offer debug flags so you can analyze what's going on quite easy. As for plugins, I have not tested it but looked at some screenshots and it is at least informative: Debug Bar (Wordpress Plugin) and the BlackBox Debug Bar ...


4

I don’t know how to move the notices to the bottom or if that’s possible at all. To disable the debug mode in wp-admin write in wp-config.php: define( 'WP_DEBUG', FALSE === strpos( $_SERVER['REQUEST_URI'], '/wp-admin/' ) ); Untested: You could try to enable warnings in admin with: // happens early in wp-admin/admin.php add_filter( ...


3

Even though my first approach was for the garbage bin and s_ha_dums answer is a clean, and probably the best, way of going about it, let me offer one more working scenario, for the sake of completeness: functions.php: function zs_admin_debug( $user_login, $user ) { if ( in_array( 'administrator', $user->roles ) ) { setcookie( 'wp_debug', ...


2

I've used Theme Check in the past and found it very good. If I recall correctly, it checks against deprecated functions but most of all it suggests better functions to future-proof your theme, and alerts you when you're forgetting to implement features which WordPress' users have learnt to rely on.


2

You have several tools at your disposal when working with native WordPress debugging. PHP Debugging - WP_DEBUG is the native WordPress PHP constant for debugging WordPress errors. It sets PHP's error reporting to to E_ALL for warnings when deprecated functions are used and if none are found it sets it to E_ALL ^ E_NOTICE ^ E_USER_NOTICE. So most of the ...


2

WordPress logic forces WP_DEBUG to be defined to something, even if it's omitted it will be set to false in wp_initial_constants() during load. However "background" (that is not when it is checked explicitly) function of WP_DEBUG is to be a flag for how PHP error reporting should be configured on runtime. That configuration is performed by wp_debug_mode() ...


2

It is not possible to turn on WP_DEBUG because it's defined in wp-config.php by default, redefinition of defined constants is not possible in PHP. If you want to keep them out of wp-config.php ask them to add to the top something like: if ( file_exists( 'safe-wp-config.php' ) ) { /* this will contains WP_DEBUG */ include 'safe-wp-config.php'; } ...


1

What you're looking for is the Log Deprecated Notices plugin. (Don't run it on a production site, as it is a direct-to-database log.) What it'll do is convert those cryptic messages that are likely to reference has_cap() or some line in functions.php, to what's actually going on. The Debug Bar plugin is also nice. It tracks notices of that pageload, using ...


1

The quickest way to do this is just using grep for the function name in it's theme/plugin folder. If your on windows you can use grepWin or agent ransack/powershell, etc. Also install debug-bar, it's a lot nicer to look at.


1

I can only recommend the Krumo php class that can be added within 10 sec to any installation and doesn't depend on any local setup. So even if you're out and away of your office you got a debug tool with you. Just be sure to load it after any other files and load it with if ( current_user_can('manage_options') ) krumo::enable(); so no guest or other user ...


1

XHProf (open source, part of Facebook stack for their performance monitoring) is pain to setup (at least for Windows person like me), but it's very thorough and convenient performance profiler tool for PHP. I wish it had win version for my local test stack. :(


1

You don't indicate what your server arrangement is. If you are in a shared hosting environment you have limited options. If it's your own server, then you can install various profiling tools to get the Big Picture. Look at this thread over on SO for some options. Also, slowness of the delivered page can be the result of a lot of things, only a few of which ...



Only top voted, non community-wiki answers of a minimum length are eligible