{"id":16934,"date":"2012-02-15T15:17:35","date_gmt":"2012-02-15T15:17:35","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/kint-debugger\/"},"modified":"2019-01-18T15:21:28","modified_gmt":"2019-01-18T15:21:28","slug":"kint-debugger","status":"closed","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/kint-debugger\/","author":13171256,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.2","stable_tag":"1.2","tested":"5.0.25","requires":"2.5","requires_php":"","requires_plugins":"","header_name":"Kint Debugger","header_author":"Brian Fegter, Chris Dillon","header_description":"","assets_banners_color":"badbec","last_updated":"2019-01-18 15:21:28","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/strongplugins.com\/","header_author_uri":"https:\/\/strongplugins.com","rating":4.8,"author_block_rating":0,"active_installs":800,"downloads":32108,"num_ratings":0,"support_threads":1,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":{"":"<p>Fix bug when Query Monitor is installed but Debug Bar is not.<\/p>"},"ratings":{"1":0,"2":"1","3":0,"4":0,"5":"13"},"assets_icons":{"icon-256x256.png":{"filename":"icon-256x256.png","revision":"1562765","resolution":"256x256","location":"assets"}},"assets_banners":{"banner-772x250.png":{"filename":"banner-772x250.png","revision":"1562765","resolution":"772x250","location":"assets"}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.1.1","1.2"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":"1562765","resolution":"1","location":"assets"},"screenshot-2.png":{"filename":"screenshot-2.png","revision":"1562766","resolution":"2","location":"assets"},"screenshot-3.png":{"filename":"screenshot-3.png","revision":"1562766","resolution":"3","location":"assets"},"screenshot-4.png":{"filename":"screenshot-4.png","revision":"1562765","resolution":"4","location":"assets"}},"screenshots":{"1":"Kint debugging output is informative, organized, and collapsible.","2":"Kint includes a backtrace.","3":"Any section can be isolated in a new tab.","4":"Kint integrates with Debug Bar."}},"plugin_section":[],"plugin_tags":[94,22216,48478,23054,23055],"plugin_category":[59],"plugin_contributors":[81127,80783],"plugin_business_model":[],"class_list":["post-16934","plugin","type-plugin","status-closed","hentry","plugin_tags-debug","plugin_tags-debugger","plugin_tags-kint","plugin_tags-print_r","plugin_tags-var_dump","plugin_category-utilities-and-tools","plugin_contributors-chriswallace","plugin_contributors-misternifty"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/kint-debugger_badbec.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/kint-debugger\/assets\/screenshot-1.png?rev=1562765","caption":"Kint debugging output is informative, organized, and collapsible."},{"src":"https:\/\/ps.w.org\/kint-debugger\/assets\/screenshot-2.png?rev=1562766","caption":"Kint includes a backtrace."},{"src":"https:\/\/ps.w.org\/kint-debugger\/assets\/screenshot-3.png?rev=1562766","caption":"Any section can be isolated in a new tab."},{"src":"https:\/\/ps.w.org\/kint-debugger\/assets\/screenshot-4.png?rev=1562765","caption":"Kint integrates with Debug Bar."}],"raw_content":"<!--section=description-->\n<blockquote>\n  <p>This plugin is up for adoption.<\/p>\n<\/blockquote>\n\n<p><strong>Kint Debugger<\/strong> is a simple wrapper for <a href=\"https:\/\/github.com\/raveren\/kint\">Kint<\/a>, a debugging tool to output information about variables and traces in a styled, collapsible format that makes understanding deep arrays and objects easier.<\/p>\n\n<p><em>No more adding PRE tags before print_r or var_dump!<\/em><\/p>\n\n<p>Kint Debugger works well with the <a href=\"https:\/\/wordpress.org\/plugins\/debug-bar\/\">Debug Bar<\/a> plugin by creating its own panel to display your debug results.<\/p>\n\n<h4>Basic Usage<\/h4>\n\n<pre><code>&lt;?php d( $var ); ?&gt;\n<\/code><\/pre>\n\n<p>Examples:<\/p>\n\n\n\n<pre><code>&lt;?php\n    global $post;\n    $term_list = wp_get_post_terms( $post-&gt;ID, 'my_taxonomy', array( 'fields' =&gt; 'all' ) );\n    d( $term_list );\n?&gt;\n<\/code><\/pre>\n\n<p>Kint Debugger also provides some helper functions for dumping variables that are frequently needed.<\/p>\n\n<ul>\n<li><code>dump_wp_query()<\/code><\/li>\n<li><code>dump_wp()<\/code><\/li>\n<li><code>dump_post()<\/code><\/li>\n<li><code>dump_this( $var, $inline = false )<\/code> - explained below<\/li>\n<\/ul>\n\n<p>Examples:<\/p>\n\n<pre><code>&lt;?php dump_post(); ?&gt;\n\n&lt;?php add_action( 'wp_head', 'dump_post' ); ?&gt;\n<\/code><\/pre>\n\n<p>Obviously, if this plugin is not active, calls to the helper functions will cause errors.<\/p>\n\n<h4>Your Own Functions<\/h4>\n\n<p>If you are dumping the same information in different places, consider writing your own helper functions in your theme's functions file or an mu-plugin. For example:<\/p>\n\n<pre><code>&lt;?php\nfunction my_dump_terms() {\n     global $post;\n     $term_list = wp_get_post_terms( $post-&gt;ID, 'my_taxonomy', array( 'fields' =&gt; 'all' ) );\n     d( $term_list  );\n}\n?&gt;\n<\/code><\/pre>\n\n<p>Then at strategic points in your theme or plugin:<\/p>\n\n<pre><code>&lt;?php my_dump_terms(); ?&gt;\n<\/code><\/pre>\n\n<h4>With Debug Bar<\/h4>\n\n<p>By default, when <a href=\"https:\/\/wordpress.org\/plugins\/debug-bar\/\">Debug Bar<\/a> is installed and active, Kint Debugger will send d() output to its Debug Bar panel.<\/p>\n\n<p>To print debug output inline instead, as if Debug Bar was not active, declare the constant KINT_TO_DEBUG_BAR in your config.php (or really anywhere before your d() call):<\/p>\n\n<pre><code>define( 'KINT_TO_DEBUG_BAR', false );\n<\/code><\/pre>\n\n<p>Or to print a specific dump inline, use a helper function with the parameter <code>$inline<\/code>. The generic <code>dump_this()<\/code> takes <code>$inline<\/code> as the second parameter.<\/p>\n\n<p>Examples:<\/p>\n\n<pre><code>&lt;?php dump_post( true ); ?&gt;\n\n&lt;?php\n    global $post;\n    $term_list = wp_get_post_terms( $post-&gt;ID, 'my_taxonomy', array( 'fields' =&gt; 'all' ) );\n    dump_this( $term_list , true );\n?&gt;\n<\/code><\/pre>\n\n<p>Kint Debugger overrides Kint's d() function in order to buffer its output for Debug Bar. If you already have a modified d() function, you need to prevent the override in one of two ways.<\/p>\n\n<ol>\n<li>Move your modified d() function to an mu-plugin. Kint Debugger checks if the function exists before declaring it so putting yours in an mu-plugin is the only way to ensure it exists first.<\/li>\n<li>Declare KINT_TO_DEBUG_BAR as described above.<\/li>\n<\/ol>\n\n<h4>Restricting Output<\/h4>\n\n<p>To restrict visibility, use the <code>kint_debug_display<\/code> filter. For example, to prevent non-admins from seeing the debug output:<\/p>\n\n<pre><code>add_filter( 'kint_debug_display', function( $allow ) { return is_super_admin(); } );\n<\/code><\/pre>\n\n<h4>Try these plugins too<\/h4>\n\n<ul>\n<li><a href=\"https:\/\/wordpress.org\/plugins\/what-the-file\/\">What The File<\/a> - Identify template files without fail.<\/li>\n<li><a href=\"https:\/\/wordpress.org\/plugins\/debug-this\/\">Debug This<\/a> - Peek under the hood with sixty debugging reports just one click away.<\/li>\n<\/ul>\n\n<!--section=installation-->\n<ol>\n<li>Go to Plugins &gt; Add New.<\/li>\n<li>Search for \"kint debugger\".<\/li>\n<li>Click \"Install Now\".<\/li>\n<\/ol>\n\n<p>OR<\/p>\n\n<ol>\n<li>Download the zip file.<\/li>\n<li>Upload the zip file via Plugins &gt; Add New &gt; Upload.<\/li>\n<\/ol>\n\n<p>Activate the plugin and start debugging!<\/p>\n\n<!--section=faq-->\n<dl>\n<dt>I have called a debug function, but I can't find the output.<\/dt>\n<dd><p>If Debug Bar is installed and active, your debug results will be displayed on the \"Kint Debugger\" panel.<\/p>\n\n<p>Otherwise, your debug results will be inserted into the current page's HTML.<\/p><\/dd>\n<dt>Can I change the style of the output?<\/dt>\n<dd><p>Currently, the Kint library includes some themes and a config file. Feel free to configure as you see fit. In order to leave the Kint library intact, the plugin does not provide additional configuration.<\/p>\n\n<p>Fortunately, the developers of Kint are working on version 2 which will make it easier to configure and extend it.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.2<\/h4>\n\n<ul>\n<li>Fix bug when adding Debug Bar panel.<\/li>\n<\/ul>\n\n<h4>1.1.1<\/h4>\n\n<ul>\n<li>Fix bug when Query Monitor is installed but Debug Bar is not.<\/li>\n<\/ul>\n\n<h4>1.1<\/h4>\n\n<ul>\n<li>Fix integration with Debug Bar<\/li>\n<li>Add new helper function <code>dump_this()<\/code><\/li>\n<li>Add <code>KINT_TO_DEBUG_BAR<\/code> check<\/li>\n<li>Add <code>kint_debug_display<\/code> filter<\/li>\n<\/ul>\n\n<h4>1.0<\/h4>\n\n<ul>\n<li>Upgrade Kint library<\/li>\n<li>Move Kint to vendor folder<\/li>\n<\/ul>\n\n<h4>0.2<\/h4>\n\n<ul>\n<li>Add Debug Bar support<\/li>\n<\/ul>\n\n<h4>0.1<\/h4>\n\n<ul>\n<li>Add Kint 0.3.2 and create dump_wp_query(), dump_wp(), and dump_post() functions<\/li>\n<\/ul>","raw_excerpt":"Dump variables and traces in an organized and interactive display. Integrates seamlessly with Debug Bar.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/16934","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=16934"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/anonymized-13171256"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=16934"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=16934"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=16934"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=16934"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=16934"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=16934"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}