Plugin Directory

Changeset 2911781


Ignore:
Timestamp:
05/12/2023 08:06:25 PM (3 years ago)
Author:
mediumraredev
Message:

Update to version 1.2.0 from GitHub

Location:
environment-debug-admin-toolbar
Files:
8 edited
1 copied

Legend:

Unmodified
Added
Removed
  • environment-debug-admin-toolbar/tags/1.2.0/changelog.txt

    r2909223 r2911781  
     12023.05.12 - version 1.2.0
     2 * Added bar to the frontend behind a filter.
     3
    142023.05.08 - version 1.1.1
    25 * Fixed the name of a filter.
  • environment-debug-admin-toolbar/tags/1.2.0/environment-debug-admin-toolbar.php

    r2909223 r2911781  
    11<?php
    22/**
    3  * Environment Debug Admin Toolbar
     3 * Environment & Debug Bar
    44 *
    55 * Display your environment and debug info in the toolbar.
     
    1212 *
    1313 * @wordpress-plugin
    14  * Plugin Name:       Environment Debug Admin Toolbar
     14 * Plugin Name:       Environment & Debug Bar
    1515 * Description:       Display your environment and debug info in the toolbar.
    16  * Version:           1.1.1
     16 * Version:           1.2.0
    1717 * Requires at least: 5.5
    1818 * Requires PHP:      7.4
     
    3030define( 'EDT_BASENAME', plugin_basename( EDT_FILE ) );
    3131
    32 define( 'EDT_VERSION', '1.1.1' );
     32define( 'EDT_VERSION', '1.2.0' );
    3333
    3434/**
     
    187187
    188188    /**
     189     * Register_frontend_styles
     190     *
     191     * @return void
     192     */
     193    public function register_frontend_styles() {
     194        // Abort unless filter returns true.
     195        if ( ! apply_filters( 'edt_show_on_frontend', false ) ) {
     196            return;
     197        }
     198        // Register.
     199        wp_register_style(
     200            'edt-frontend-css', // Name.
     201            plugin_dir_url( EDT_FILE ) . 'assets/edt.min.css', // URL.
     202            array(), // Deps.
     203            EDT_VERSION, // Version.
     204            'all' // Media.
     205        );
     206        // Enqueue.
     207        wp_enqueue_style( 'edt-frontend-css' );
     208    }
     209
     210    /**
    189211     * Register_translations
    190212     *
     
    204226     */
    205227    public function register_toolbar( $wp_admin_bar ) {
    206         if ( ! is_admin() || ! current_user_can( apply_filters( 'edt_capability_check', 'manage_options' ) ) ) {
     228        // Abort on the frontend unless filter returns true.
     229        if ( ! is_admin() && ! apply_filters( 'edt_show_on_frontend', false ) ) {
     230            return;
     231        }
     232        // Abort if the current user does not meet the capability.
     233        if ( ! current_user_can( apply_filters( 'edt_capability_check', 'manage_options' ) ) ) {
    207234            return;
    208235        }
     
    292319        // Register backend styles.
    293320        add_action( 'admin_enqueue_scripts', array( $this, 'register_backend_styles' ) );
     321        // Register frontend styles.
     322        add_action( 'wp_enqueue_scripts', array( $this, 'register_frontend_styles' ) );
    294323        // Register tranlations.
    295324        add_action( 'init', array( $this, 'register_translations' ) );
  • environment-debug-admin-toolbar/tags/1.2.0/languages/environment-debug-admin-toolbar.pot

    r2909223 r2911781  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Environment Debug Admin Toolbar 1.1.1\n"
     5"Project-Id-Version: Environment & Debug Bar 1.2.0\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/environment-debug-admin-toolbar\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2023-05-08T02:26:08+00:00\n"
     12"POT-Creation-Date: 2023-05-12T19:58:56+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    14 "X-Generator: WP-CLI 2.7.1\n"
     14"X-Generator: WP-CLI 2.8.0-alpha-04d5fdd\n"
    1515"X-Domain: environment-debug-toolbar\n"
    1616
    1717#. Plugin Name of the plugin
    18 msgid "Environment Debug Admin Toolbar"
     18msgid "Environment & Debug Bar"
    1919msgstr ""
    2020
     
    5151msgstr ""
    5252
    53 #: environment-debug-admin-toolbar.php:226
     53#: environment-debug-admin-toolbar.php:253
    5454msgid "Your env is set to:"
    5555msgstr ""
  • environment-debug-admin-toolbar/tags/1.2.0/readme.txt

    r2909223 r2911781  
    1 === Environment Debug Admin Toolbar ===
     1=== Environment & Debug Bar ===
    22Contributors: mediumraredev, brugman
    33Tags: environment, env, debug, staging, production
    44Requires at least: 5.5
    55Tested up to: 6.2
    6 Stable tag: 1.1.1
     6Stable tag: 1.2.0
    77License: GPLv3
    88
     
    3434
    3535`add_filter( 'edt_capability_check', function ( $capability ) {
    36     return 'edit_posts';
     36    return 'edit_pages';
    3737});`
    3838
     
    6868Perhaps, if you can convince us. Please create a GitHub issue, so we can discuss your use-case.
    6969
     70= Can I show the toolbar on the frontend as well? =
     71
     72You can, with the snippet below.
     73
     74Keep in mind that if you have a site where the end users are logged in, and see the toolbar on the frontend, you probably don't want to bother them by showing the environment info.
     75
     76`add_filter( 'edt_show_on_frontend', '__return_true' );`
     77
    7078= Can I set my own colors? =
    7179
     
    8391
    8492== Changelog ==
     93
     94= 1.2.0 =
     95* Added bar to the frontend behind a filter.
    8596
    8697= 1.1.1 =
  • environment-debug-admin-toolbar/trunk/changelog.txt

    r2909223 r2911781  
     12023.05.12 - version 1.2.0
     2 * Added bar to the frontend behind a filter.
     3
    142023.05.08 - version 1.1.1
    25 * Fixed the name of a filter.
  • environment-debug-admin-toolbar/trunk/environment-debug-admin-toolbar.php

    r2909223 r2911781  
    11<?php
    22/**
    3  * Environment Debug Admin Toolbar
     3 * Environment & Debug Bar
    44 *
    55 * Display your environment and debug info in the toolbar.
     
    1212 *
    1313 * @wordpress-plugin
    14  * Plugin Name:       Environment Debug Admin Toolbar
     14 * Plugin Name:       Environment & Debug Bar
    1515 * Description:       Display your environment and debug info in the toolbar.
    16  * Version:           1.1.1
     16 * Version:           1.2.0
    1717 * Requires at least: 5.5
    1818 * Requires PHP:      7.4
     
    3030define( 'EDT_BASENAME', plugin_basename( EDT_FILE ) );
    3131
    32 define( 'EDT_VERSION', '1.1.1' );
     32define( 'EDT_VERSION', '1.2.0' );
    3333
    3434/**
     
    187187
    188188    /**
     189     * Register_frontend_styles
     190     *
     191     * @return void
     192     */
     193    public function register_frontend_styles() {
     194        // Abort unless filter returns true.
     195        if ( ! apply_filters( 'edt_show_on_frontend', false ) ) {
     196            return;
     197        }
     198        // Register.
     199        wp_register_style(
     200            'edt-frontend-css', // Name.
     201            plugin_dir_url( EDT_FILE ) . 'assets/edt.min.css', // URL.
     202            array(), // Deps.
     203            EDT_VERSION, // Version.
     204            'all' // Media.
     205        );
     206        // Enqueue.
     207        wp_enqueue_style( 'edt-frontend-css' );
     208    }
     209
     210    /**
    189211     * Register_translations
    190212     *
     
    204226     */
    205227    public function register_toolbar( $wp_admin_bar ) {
    206         if ( ! is_admin() || ! current_user_can( apply_filters( 'edt_capability_check', 'manage_options' ) ) ) {
     228        // Abort on the frontend unless filter returns true.
     229        if ( ! is_admin() && ! apply_filters( 'edt_show_on_frontend', false ) ) {
     230            return;
     231        }
     232        // Abort if the current user does not meet the capability.
     233        if ( ! current_user_can( apply_filters( 'edt_capability_check', 'manage_options' ) ) ) {
    207234            return;
    208235        }
     
    292319        // Register backend styles.
    293320        add_action( 'admin_enqueue_scripts', array( $this, 'register_backend_styles' ) );
     321        // Register frontend styles.
     322        add_action( 'wp_enqueue_scripts', array( $this, 'register_frontend_styles' ) );
    294323        // Register tranlations.
    295324        add_action( 'init', array( $this, 'register_translations' ) );
  • environment-debug-admin-toolbar/trunk/languages/environment-debug-admin-toolbar.pot

    r2909223 r2911781  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Environment Debug Admin Toolbar 1.1.1\n"
     5"Project-Id-Version: Environment & Debug Bar 1.2.0\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/environment-debug-admin-toolbar\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2023-05-08T02:26:08+00:00\n"
     12"POT-Creation-Date: 2023-05-12T19:58:56+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    14 "X-Generator: WP-CLI 2.7.1\n"
     14"X-Generator: WP-CLI 2.8.0-alpha-04d5fdd\n"
    1515"X-Domain: environment-debug-toolbar\n"
    1616
    1717#. Plugin Name of the plugin
    18 msgid "Environment Debug Admin Toolbar"
     18msgid "Environment & Debug Bar"
    1919msgstr ""
    2020
     
    5151msgstr ""
    5252
    53 #: environment-debug-admin-toolbar.php:226
     53#: environment-debug-admin-toolbar.php:253
    5454msgid "Your env is set to:"
    5555msgstr ""
  • environment-debug-admin-toolbar/trunk/readme.txt

    r2909223 r2911781  
    1 === Environment Debug Admin Toolbar ===
     1=== Environment & Debug Bar ===
    22Contributors: mediumraredev, brugman
    33Tags: environment, env, debug, staging, production
    44Requires at least: 5.5
    55Tested up to: 6.2
    6 Stable tag: 1.1.1
     6Stable tag: 1.2.0
    77License: GPLv3
    88
     
    3434
    3535`add_filter( 'edt_capability_check', function ( $capability ) {
    36     return 'edit_posts';
     36    return 'edit_pages';
    3737});`
    3838
     
    6868Perhaps, if you can convince us. Please create a GitHub issue, so we can discuss your use-case.
    6969
     70= Can I show the toolbar on the frontend as well? =
     71
     72You can, with the snippet below.
     73
     74Keep in mind that if you have a site where the end users are logged in, and see the toolbar on the frontend, you probably don't want to bother them by showing the environment info.
     75
     76`add_filter( 'edt_show_on_frontend', '__return_true' );`
     77
    7078= Can I set my own colors? =
    7179
     
    8391
    8492== Changelog ==
     93
     94= 1.2.0 =
     95* Added bar to the frontend behind a filter.
    8596
    8697= 1.1.1 =
Note: See TracChangeset for help on using the changeset viewer.