Changeset 2911781
- Timestamp:
- 05/12/2023 08:06:25 PM (3 years ago)
- Location:
- environment-debug-admin-toolbar
- Files:
-
- 8 edited
- 1 copied
-
tags/1.2.0 (copied) (copied from environment-debug-admin-toolbar/trunk)
-
tags/1.2.0/changelog.txt (modified) (1 diff)
-
tags/1.2.0/environment-debug-admin-toolbar.php (modified) (6 diffs)
-
tags/1.2.0/languages/environment-debug-admin-toolbar.pot (modified) (3 diffs)
-
tags/1.2.0/readme.txt (modified) (4 diffs)
-
trunk/changelog.txt (modified) (1 diff)
-
trunk/environment-debug-admin-toolbar.php (modified) (6 diffs)
-
trunk/languages/environment-debug-admin-toolbar.pot (modified) (3 diffs)
-
trunk/readme.txt (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
environment-debug-admin-toolbar/tags/1.2.0/changelog.txt
r2909223 r2911781 1 2023.05.12 - version 1.2.0 2 * Added bar to the frontend behind a filter. 3 1 4 2023.05.08 - version 1.1.1 2 5 * Fixed the name of a filter. -
environment-debug-admin-toolbar/tags/1.2.0/environment-debug-admin-toolbar.php
r2909223 r2911781 1 1 <?php 2 2 /** 3 * Environment Debug Admin Toolbar3 * Environment & Debug Bar 4 4 * 5 5 * Display your environment and debug info in the toolbar. … … 12 12 * 13 13 * @wordpress-plugin 14 * Plugin Name: Environment Debug Admin Toolbar14 * Plugin Name: Environment & Debug Bar 15 15 * Description: Display your environment and debug info in the toolbar. 16 * Version: 1. 1.116 * Version: 1.2.0 17 17 * Requires at least: 5.5 18 18 * Requires PHP: 7.4 … … 30 30 define( 'EDT_BASENAME', plugin_basename( EDT_FILE ) ); 31 31 32 define( 'EDT_VERSION', '1. 1.1' );32 define( 'EDT_VERSION', '1.2.0' ); 33 33 34 34 /** … … 187 187 188 188 /** 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 /** 189 211 * Register_translations 190 212 * … … 204 226 */ 205 227 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' ) ) ) { 207 234 return; 208 235 } … … 292 319 // Register backend styles. 293 320 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' ) ); 294 323 // Register tranlations. 295 324 add_action( 'init', array( $this, 'register_translations' ) ); -
environment-debug-admin-toolbar/tags/1.2.0/languages/environment-debug-admin-toolbar.pot
r2909223 r2911781 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Environment Debug Admin Toolbar 1.1.1\n"5 "Project-Id-Version: Environment & Debug Bar 1.2.0\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/environment-debug-admin-toolbar\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "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" 13 13 "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" 15 15 "X-Domain: environment-debug-toolbar\n" 16 16 17 17 #. Plugin Name of the plugin 18 msgid "Environment Debug Admin Toolbar"18 msgid "Environment & Debug Bar" 19 19 msgstr "" 20 20 … … 51 51 msgstr "" 52 52 53 #: environment-debug-admin-toolbar.php:2 2653 #: environment-debug-admin-toolbar.php:253 54 54 msgid "Your env is set to:" 55 55 msgstr "" -
environment-debug-admin-toolbar/tags/1.2.0/readme.txt
r2909223 r2911781 1 === Environment Debug Admin Toolbar ===1 === Environment & Debug Bar === 2 2 Contributors: mediumraredev, brugman 3 3 Tags: environment, env, debug, staging, production 4 4 Requires at least: 5.5 5 5 Tested up to: 6.2 6 Stable tag: 1. 1.16 Stable tag: 1.2.0 7 7 License: GPLv3 8 8 … … 34 34 35 35 `add_filter( 'edt_capability_check', function ( $capability ) { 36 return 'edit_p osts';36 return 'edit_pages'; 37 37 });` 38 38 … … 68 68 Perhaps, if you can convince us. Please create a GitHub issue, so we can discuss your use-case. 69 69 70 = Can I show the toolbar on the frontend as well? = 71 72 You can, with the snippet below. 73 74 Keep 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 70 78 = Can I set my own colors? = 71 79 … … 83 91 84 92 == Changelog == 93 94 = 1.2.0 = 95 * Added bar to the frontend behind a filter. 85 96 86 97 = 1.1.1 = -
environment-debug-admin-toolbar/trunk/changelog.txt
r2909223 r2911781 1 2023.05.12 - version 1.2.0 2 * Added bar to the frontend behind a filter. 3 1 4 2023.05.08 - version 1.1.1 2 5 * Fixed the name of a filter. -
environment-debug-admin-toolbar/trunk/environment-debug-admin-toolbar.php
r2909223 r2911781 1 1 <?php 2 2 /** 3 * Environment Debug Admin Toolbar3 * Environment & Debug Bar 4 4 * 5 5 * Display your environment and debug info in the toolbar. … … 12 12 * 13 13 * @wordpress-plugin 14 * Plugin Name: Environment Debug Admin Toolbar14 * Plugin Name: Environment & Debug Bar 15 15 * Description: Display your environment and debug info in the toolbar. 16 * Version: 1. 1.116 * Version: 1.2.0 17 17 * Requires at least: 5.5 18 18 * Requires PHP: 7.4 … … 30 30 define( 'EDT_BASENAME', plugin_basename( EDT_FILE ) ); 31 31 32 define( 'EDT_VERSION', '1. 1.1' );32 define( 'EDT_VERSION', '1.2.0' ); 33 33 34 34 /** … … 187 187 188 188 /** 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 /** 189 211 * Register_translations 190 212 * … … 204 226 */ 205 227 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' ) ) ) { 207 234 return; 208 235 } … … 292 319 // Register backend styles. 293 320 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' ) ); 294 323 // Register tranlations. 295 324 add_action( 'init', array( $this, 'register_translations' ) ); -
environment-debug-admin-toolbar/trunk/languages/environment-debug-admin-toolbar.pot
r2909223 r2911781 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Environment Debug Admin Toolbar 1.1.1\n"5 "Project-Id-Version: Environment & Debug Bar 1.2.0\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/environment-debug-admin-toolbar\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "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" 13 13 "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" 15 15 "X-Domain: environment-debug-toolbar\n" 16 16 17 17 #. Plugin Name of the plugin 18 msgid "Environment Debug Admin Toolbar"18 msgid "Environment & Debug Bar" 19 19 msgstr "" 20 20 … … 51 51 msgstr "" 52 52 53 #: environment-debug-admin-toolbar.php:2 2653 #: environment-debug-admin-toolbar.php:253 54 54 msgid "Your env is set to:" 55 55 msgstr "" -
environment-debug-admin-toolbar/trunk/readme.txt
r2909223 r2911781 1 === Environment Debug Admin Toolbar ===1 === Environment & Debug Bar === 2 2 Contributors: mediumraredev, brugman 3 3 Tags: environment, env, debug, staging, production 4 4 Requires at least: 5.5 5 5 Tested up to: 6.2 6 Stable tag: 1. 1.16 Stable tag: 1.2.0 7 7 License: GPLv3 8 8 … … 34 34 35 35 `add_filter( 'edt_capability_check', function ( $capability ) { 36 return 'edit_p osts';36 return 'edit_pages'; 37 37 });` 38 38 … … 68 68 Perhaps, if you can convince us. Please create a GitHub issue, so we can discuss your use-case. 69 69 70 = Can I show the toolbar on the frontend as well? = 71 72 You can, with the snippet below. 73 74 Keep 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 70 78 = Can I set my own colors? = 71 79 … … 83 91 84 92 == Changelog == 93 94 = 1.2.0 = 95 * Added bar to the frontend behind a filter. 85 96 86 97 = 1.1.1 =
Note: See TracChangeset
for help on using the changeset viewer.