How do I issue a warning in a wordpress plugin?
Simple, wherever you’re working on data that’s output, just use var_dump($whatever_variable). You can also use print_r($a_variable)
Simple, wherever you’re working on data that’s output, just use var_dump($whatever_variable). You can also use print_r($a_variable)
the use of function_exists is like that function_exists(“register_sidebar”)
I think, while saving the post, you won’t be able to display this result. You can try below instead – Log the output in the database. e.g. update_option(‘some_option’, wp_login_url($redirect)); And then print get_option(‘some_option’) directly somewhere outside this save_post hook callback (e.g. on wp_footer hook). You may need to refresh the page after save post to … Read more
Thx to the comments I found the plugin: Debug MO Translations It returns a list of all searched and loaded MO files. The source code is provided on github: https://github.com/closemarketing/debug-mo-translations
Can’t show debug even after modifying wp-config
There are two aspects to WP_DEBUG: It configures PHP runtime to desired state, this is handled once in wp_debug_mode(). It is used as a state flag, that can be arbitrarily checked by code. Widely done both in core and more so in third party code. It is hard to make a guess how either of … Read more
Unnessary character on post after restore
Thanks for the helpful comments, turned out it was the CiviCRM 4.7 plugin that was using a ‘base page’ and always calling page.php as the default theme template. BUT our Theme was not implementing page.php so no <html> or <head> content was being injected. Debugged by installing XDebug on the server running on port 9000 … Read more
You are possibly in a secondary loop within a page, in which case you would do well to pass the ID of the post excerpt that you’re trying to get. if ( get_the_excerpt($real_id_of_post_you_want_the_excerpt_for) ) { the_excerpt( $real_id_of_post_you_want_the_excerpt_for ); }
Unable to load Posts list & Getting error 500 error