Plugin Directory

Changeset 3267781


Ignore:
Timestamp:
04/07/2025 10:41:07 AM (11 months ago)
Author:
sdobreff
Message:

Adding the first version of my plugin

Location:
display-environment-type
Files:
8 edited
1 copied

Legend:

Unmodified
Added
Removed
  • display-environment-type/tags/1.4.0/classes/class-display-environment-type.php

    r3266750 r3267781  
    9191             * @param string $env_type The environment type key.
    9292             */
    93             return apply_filters( 'display_environment_type_name', $name, $env_type );
     93            return \apply_filters( 'display_environment_type_name', $name, $env_type );
    9494        }
    9595
     
    108108
    109109            if ( ! empty( $env_type ) ) {
    110                 $items[] = '<span class="' . \esc_attr( 'det-env-type det-' . $env_type ) . '" title="' . esc_attr__( 'Environment Type', 'display-environment-type' ) . '">' . \esc_html( $env_type_name ) . '</span>';
     110                $items[] = '<span class="' . \esc_attr( 'det-env-type det-' . $env_type ) . '" title="' . \esc_attr__( 'Environment Type', 'display-environment-type' ) . '">' . \esc_html( $env_type_name ) . '</span>';
    111111            }
    112112
     
    132132                        'id'     => 'det_env_type',
    133133                        'parent' => 'top-secondary',
    134                         'title'  => '<span class="ab-icon" aria-hidden="true"></span><span class="ab-label">' . esc_html( $env_type_name ) . '</span>',
     134                        'title'  => '<span class="ab-icon" aria-hidden="true"></span><span class="ab-label">' . \esc_html( $env_type_name ) . '</span>',
    135135                        'meta'   => array(
    136136                            'class' => 'det-' . \sanitize_title( $env_type ),
     
    201201                $admin_bar->add_node(
    202202                    array(
     203                        'id'     => 'det-wp',
     204                        'title'  => self::show_label_value( 'WP', \get_bloginfo( 'version', 'display' ) ),
     205                        'parent' => 'det_env_type',
     206                    )
     207                );
     208
     209                $admin_bar->add_node(
     210                    array(
    203211                        'id'     => 'det-php',
    204212                        'title'  => self::show_label_value( 'PHP', phpversion() ),
  • display-environment-type/tags/1.4.0/css/admin.css

    r3266743 r3267781  
    5050}
    5151
     52/* PRODUCTION */
    5253#wpadminbar ul li#wp-admin-bar-det_env_type.det-production {
    5354    background-color: #b92a2a;
    5455}
    5556
     57#dashboard_right_now li>span.det-env-type.det-production, #dashboard_right_now li>span.det-env-type.det-production::before {
     58    color: #b92a2a;
     59}
     60
     61/* STAGING */
    5662#wpadminbar ul li#wp-admin-bar-det_env_type.det-staging {
    5763    background-color: #d79d00;
     
    5965}
    6066
     67#dashboard_right_now li>span.det-env-type.det-staging, #dashboard_right_now li>span.det-env-type.det-staging::before {
     68    color: #d79d00;
     69}
     70
     71/* DEVELOPMENT */
    6172#wpadminbar ul li#wp-admin-bar-det_env_type.det-development {
    6273    background-color: #34863b;
     74}
     75
     76#dashboard_right_now li>span.det-env-type.det-development, #dashboard_right_now li>span.det-env-type.det-development::before {
     77    color: #34863b;
    6378}
    6479
     
    85100    top: 2px;
    86101}
     102
     103@media screen and (max-width: 782px) {
     104    #wpadminbar li#wp-admin-bar-det_env_type {
     105        display: block;
     106        position: static;
     107    }
     108}
  • display-environment-type/tags/1.4.0/display-environment-type.php

    r3266743 r3267781  
    44 * Plugin URI:        https://roytanck.com/2020/08/21/new-wordpress-plugin-display-environment-type/
    55 * Description:       Display the site's environment type in wp-admin.
    6  * Version:           1.3.5
     6 * Version:           1.4.0
    77 * Requires at least: 5.5
    88 * Requires PHP:      7.4
     
    1818defined( 'ABSPATH' ) || exit;
    1919
    20 define( 'DET_VERSION', '1.3.5' );
     20define( 'DET_VERSION', '1.4.0' );
    2121define( 'DET_TEXTDOMAIN', 'display-environment-type' );
    2222define( 'DET_NAME', 'Display Environment Type' );
     
    3333        'admin_init',
    3434        static function () {
    35             deactivate_plugins( plugin_basename( __FILE__ ) );
     35            deactivate_plugins( DET_PLUGIN_BASENAME );
    3636        }
    3737    );
  • display-environment-type/tags/1.4.0/readme.txt

    r3266743 r3267781  
    33Tags: environment, dtap, production, staging, development
    44Requires at least: 5.5
    5 Tested up to: 6.7
    6 Requires PHP: 5.6
    7 Stable tag: 1.3.5
     5Tested up to: 6.7.2
     6Requires PHP: 7.4
     7Stable tag: 1.4.0
    88License: GPLv3
    99
     
    5252== Changelog ==
    5353
    54 = 1.3.5 (2024-12-20) =
     54= 1.4.0 (2024-03-07) =
     55* Code improvements and UI fixes - showing icon on mobile, and set colors on At a Glance. Added WP version in drop-down menu.
     56
     57= 1.3.5 (2025-03-04) =
    5558* Added a drop-down submenu with WP constants and their values (enabled / disabled).
    5659
  • display-environment-type/trunk/classes/class-display-environment-type.php

    r3266750 r3267781  
    9191             * @param string $env_type The environment type key.
    9292             */
    93             return apply_filters( 'display_environment_type_name', $name, $env_type );
     93            return \apply_filters( 'display_environment_type_name', $name, $env_type );
    9494        }
    9595
     
    108108
    109109            if ( ! empty( $env_type ) ) {
    110                 $items[] = '<span class="' . \esc_attr( 'det-env-type det-' . $env_type ) . '" title="' . esc_attr__( 'Environment Type', 'display-environment-type' ) . '">' . \esc_html( $env_type_name ) . '</span>';
     110                $items[] = '<span class="' . \esc_attr( 'det-env-type det-' . $env_type ) . '" title="' . \esc_attr__( 'Environment Type', 'display-environment-type' ) . '">' . \esc_html( $env_type_name ) . '</span>';
    111111            }
    112112
     
    132132                        'id'     => 'det_env_type',
    133133                        'parent' => 'top-secondary',
    134                         'title'  => '<span class="ab-icon" aria-hidden="true"></span><span class="ab-label">' . esc_html( $env_type_name ) . '</span>',
     134                        'title'  => '<span class="ab-icon" aria-hidden="true"></span><span class="ab-label">' . \esc_html( $env_type_name ) . '</span>',
    135135                        'meta'   => array(
    136136                            'class' => 'det-' . \sanitize_title( $env_type ),
     
    201201                $admin_bar->add_node(
    202202                    array(
     203                        'id'     => 'det-wp',
     204                        'title'  => self::show_label_value( 'WP', \get_bloginfo( 'version', 'display' ) ),
     205                        'parent' => 'det_env_type',
     206                    )
     207                );
     208
     209                $admin_bar->add_node(
     210                    array(
    203211                        'id'     => 'det-php',
    204212                        'title'  => self::show_label_value( 'PHP', phpversion() ),
  • display-environment-type/trunk/css/admin.css

    r3266743 r3267781  
    5050}
    5151
     52/* PRODUCTION */
    5253#wpadminbar ul li#wp-admin-bar-det_env_type.det-production {
    5354    background-color: #b92a2a;
    5455}
    5556
     57#dashboard_right_now li>span.det-env-type.det-production, #dashboard_right_now li>span.det-env-type.det-production::before {
     58    color: #b92a2a;
     59}
     60
     61/* STAGING */
    5662#wpadminbar ul li#wp-admin-bar-det_env_type.det-staging {
    5763    background-color: #d79d00;
     
    5965}
    6066
     67#dashboard_right_now li>span.det-env-type.det-staging, #dashboard_right_now li>span.det-env-type.det-staging::before {
     68    color: #d79d00;
     69}
     70
     71/* DEVELOPMENT */
    6172#wpadminbar ul li#wp-admin-bar-det_env_type.det-development {
    6273    background-color: #34863b;
     74}
     75
     76#dashboard_right_now li>span.det-env-type.det-development, #dashboard_right_now li>span.det-env-type.det-development::before {
     77    color: #34863b;
    6378}
    6479
     
    85100    top: 2px;
    86101}
     102
     103@media screen and (max-width: 782px) {
     104    #wpadminbar li#wp-admin-bar-det_env_type {
     105        display: block;
     106        position: static;
     107    }
     108}
  • display-environment-type/trunk/display-environment-type.php

    r3266743 r3267781  
    44 * Plugin URI:        https://roytanck.com/2020/08/21/new-wordpress-plugin-display-environment-type/
    55 * Description:       Display the site's environment type in wp-admin.
    6  * Version:           1.3.5
     6 * Version:           1.4.0
    77 * Requires at least: 5.5
    88 * Requires PHP:      7.4
     
    1818defined( 'ABSPATH' ) || exit;
    1919
    20 define( 'DET_VERSION', '1.3.5' );
     20define( 'DET_VERSION', '1.4.0' );
    2121define( 'DET_TEXTDOMAIN', 'display-environment-type' );
    2222define( 'DET_NAME', 'Display Environment Type' );
     
    3333        'admin_init',
    3434        static function () {
    35             deactivate_plugins( plugin_basename( __FILE__ ) );
     35            deactivate_plugins( DET_PLUGIN_BASENAME );
    3636        }
    3737    );
  • display-environment-type/trunk/readme.txt

    r3266743 r3267781  
    33Tags: environment, dtap, production, staging, development
    44Requires at least: 5.5
    5 Tested up to: 6.7
    6 Requires PHP: 5.6
    7 Stable tag: 1.3.5
     5Tested up to: 6.7.2
     6Requires PHP: 7.4
     7Stable tag: 1.4.0
    88License: GPLv3
    99
     
    5252== Changelog ==
    5353
    54 = 1.3.5 (2024-12-20) =
     54= 1.4.0 (2024-03-07) =
     55* Code improvements and UI fixes - showing icon on mobile, and set colors on At a Glance. Added WP version in drop-down menu.
     56
     57= 1.3.5 (2025-03-04) =
    5558* Added a drop-down submenu with WP constants and their values (enabled / disabled).
    5659
Note: See TracChangeset for help on using the changeset viewer.