Plugin Directory

Changeset 2355200


Ignore:
Timestamp:
08/08/2020 12:47:44 PM (5 years ago)
Author:
manzwebdesigns
Message:

Update to version 1.0.2 from GitHub

Location:
debug-bar-timber
Files:
2 edited
1 copied

Legend:

Unmodified
Added
Removed
  • debug-bar-timber/tags/1.0.2/debug-bar-timber.php

    r2355134 r2355200  
    55    Description: Adds Timber render to the debug bar. Requires the debug bar plugin.
    66    Author: Jared Nova + Upstatement
    7     Version: 0.3.1
     7    Version: 1.0.2
    88    Author URI: https://upstatement.com/
    9     */
     9*/
    1010
    11     add_filter('debug_bar_panels', static function($panels){
    12         require_once('class-debug-bar-timber.php');
    13         $panels[] = new Debug_Bar_Timber();
    14         return $panels;
    15     });
     11add_filter('debug_bar_panels', static function($panels) {
     12    require_once('class-debug-bar-timber.php');
     13    $panels[] = new Debug_Bar_Timber();
     14    return $panels;
     15});
    1616
    17     add_action('init', static function(){
    18         if ( !class_exists('Debug_Bar') ) {
    19             $class = 'error';
     17add_action('init', static function() {
     18    if ( !class_exists('Debug_Bar') ) {
     19        $class = 'error';
    2020
    21             $url = admin_url('plugin-install.php?tab=plugin-information&plugin=debug-bar&TB_iframe=true&width=772&height=300');
     21        $url = admin_url('plugin-install.php?tab=plugin-information&plugin=debug-bar&TB_iframe=true&width=772&height=300');
    2222
    23             $text = "In order to use the Timber Debug Bar, you need to install and activate the <a href='$url' class='thickbox'>WordPress Debug Bar</a> Plugin";
     23        $text = "In order to use the Timber Debug Bar, you need to install and activate the <a href='$url' class='thickbox'>WordPress Debug Bar</a> Plugin";
    2424
    25             add_action( 'admin_notices', static function() use ( $text, $class ) {
    26                     echo '<div class="'.$class.'"><p>'.$text.'</p></div>';
    27                 }, 1 );
    28         }
    29     });
     25        add_action( 'admin_notices', static function() use ( $text, $class ) {
     26            echo '<div class="'.$class.'"><p>'.$text.'</p></div>';
     27        }, 1 );
     28    }
     29});
    3030
    31     function tdb_enqueue_styles() {
    32         wp_enqueue_style( 'dbt', plugins_url( "timber-debug-bar.css", __FILE__ ), [], '20200710' );
    33     }
    34     add_action( 'wp_enqueue_scripts', 'tdb_enqueue_styles', 99 );
     31function tdb_enqueue_styles() {
     32    wp_enqueue_style( 'dbt', plugins_url( "timber-debug-bar.css", __FILE__ ), [], '20200710' );
     33}
     34add_action( 'wp_enqueue_scripts', 'tdb_enqueue_styles', 99 );
  • debug-bar-timber/trunk/debug-bar-timber.php

    r2355134 r2355200  
    55    Description: Adds Timber render to the debug bar. Requires the debug bar plugin.
    66    Author: Jared Nova + Upstatement
    7     Version: 0.3.1
     7    Version: 1.0.2
    88    Author URI: https://upstatement.com/
    9     */
     9*/
    1010
    11     add_filter('debug_bar_panels', static function($panels){
    12         require_once('class-debug-bar-timber.php');
    13         $panels[] = new Debug_Bar_Timber();
    14         return $panels;
    15     });
     11add_filter('debug_bar_panels', static function($panels) {
     12    require_once('class-debug-bar-timber.php');
     13    $panels[] = new Debug_Bar_Timber();
     14    return $panels;
     15});
    1616
    17     add_action('init', static function(){
    18         if ( !class_exists('Debug_Bar') ) {
    19             $class = 'error';
     17add_action('init', static function() {
     18    if ( !class_exists('Debug_Bar') ) {
     19        $class = 'error';
    2020
    21             $url = admin_url('plugin-install.php?tab=plugin-information&amp;plugin=debug-bar&amp;TB_iframe=true&amp;width=772&amp;height=300');
     21        $url = admin_url('plugin-install.php?tab=plugin-information&amp;plugin=debug-bar&amp;TB_iframe=true&amp;width=772&amp;height=300');
    2222
    23             $text = "In order to use the Timber Debug Bar, you need to install and activate the <a href='$url' class='thickbox'>WordPress Debug Bar</a> Plugin";
     23        $text = "In order to use the Timber Debug Bar, you need to install and activate the <a href='$url' class='thickbox'>WordPress Debug Bar</a> Plugin";
    2424
    25             add_action( 'admin_notices', static function() use ( $text, $class ) {
    26                     echo '<div class="'.$class.'"><p>'.$text.'</p></div>';
    27                 }, 1 );
    28         }
    29     });
     25        add_action( 'admin_notices', static function() use ( $text, $class ) {
     26            echo '<div class="'.$class.'"><p>'.$text.'</p></div>';
     27        }, 1 );
     28    }
     29});
    3030
    31     function tdb_enqueue_styles() {
    32         wp_enqueue_style( 'dbt', plugins_url( "timber-debug-bar.css", __FILE__ ), [], '20200710' );
    33     }
    34     add_action( 'wp_enqueue_scripts', 'tdb_enqueue_styles', 99 );
     31function tdb_enqueue_styles() {
     32    wp_enqueue_style( 'dbt', plugins_url( "timber-debug-bar.css", __FILE__ ), [], '20200710' );
     33}
     34add_action( 'wp_enqueue_scripts', 'tdb_enqueue_styles', 99 );
Note: See TracChangeset for help on using the changeset viewer.