Changeset 3112987
- Timestamp:
- 07/05/2024 11:02:50 AM (5 weeks ago)
- Location:
- display-environment-type/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
display-environment-type/trunk/app/Plugin.php
r2993776 r3112987 42 42 43 43 // Add an admin bar item if in wp-admin. 44 add_action( 'admin_bar_menu', [ $class, 'add_toolbar_item' ] );44 add_action( 'admin_bar_menu', [ $class, 'add_toolbar_item' ] ); 45 45 46 46 // Add styling. 47 47 add_action( 'admin_enqueue_scripts', [ $class, 'enqueue_styles' ] ); 48 48 add_action( 'wp_enqueue_scripts', [ $class, 'enqueue_styles' ] ); 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 49 71 } 50 72 … … 58 80 public static function add_glance_item( $items ) { 59 81 $env_type = wp_get_environment_type(); 82 60 83 61 84 if ( !empty( $env_type ) ) { 62 $items[] = '<span class="' . esc_attr( 'det-env-type det-' . $env_type ) . '" title="' . esc_attr__( 'Environment Type', 'display-environment-type' ) . '">' . esc_html( ucfirst( $env_type )) . '</span>';85 $items[] = '<span class="' . esc_attr( 'det-env-type det-' . $env_type ) . '" title="' . esc_attr__( 'Environment Type', 'display-environment-type' ) . '">' . esc_html( ) . '</span>'; 63 86 } 64 87 … … 75 98 public static function add_toolbar_item( $admin_bar ) { 76 99 $env_type = wp_get_environment_type(); 100 77 101 78 102 if ( !empty( $env_type ) ) { … … 80 104 'id' => 'det_env_type', 81 105 'parent'=> 'top-secondary', 82 'title' => '<span class="ab-icon" aria-hidden="true"></span><span class="ab-label">' . esc_html( ucfirst( $env_type )) . '</span>',106 'title' => '<span class="ab-icon" aria-hidden="true"></span><span class="ab-label">' . esc_html( ) . '</span>', 83 107 'meta' => array( 84 108 'class' => 'det-' . sanitize_title( $env_type ), -
display-environment-type/trunk/display-environment-type.php
r2993776 r3112987 4 4 * Plugin URI: https://roytanck.com/2020/08/21/new-wordpress-plugin-display-environment-type/ 5 5 * Description: Display the site's environment type in wp-admin. 6 * Version: 1.3. 26 * Version: 1.3. 7 7 * Requires at least: 5.5 8 8 * Requires PHP: 5.6 -
display-environment-type/trunk/readme.txt
r3065386 r3112987 1 1 === Display Environment Type === 2 Contributors: roytanck, markjaquith, tflight, mrwweb 2 Contributors: roytanck, markjaquith, tflight, mrwweb 3 3 Tags: environment type, dtap, production, staging, development 4 4 Requires at least: 5.5 5 Tested up to: 6. 55 Tested up to: 6. 6 6 Requires PHP: 5.6 7 Stable tag: 1.3. 27 Stable tag: 1.3. 8 8 License: GPLv3 9 9 … … 52 52 == Changelog == 53 53 54 55 56 54 57 = 1.3.2 (2023-11-10) = 55 58 * Assessibility improvements by @mrwweb.
Note: See TracChangeset
for help on using the changeset viewer.