Plugin Directory

Changeset 3320829


Ignore:
Timestamp:
07/01/2025 08:27:43 PM (7 months ago)
Author:
sdobreff
Message:

Adding the first version of my plugin

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

Legend:

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

    r3267781 r3320829  
    147147                );
    148148
    149                 if ( WP_DEBUG ) {
     149                $admin_bar->add_node(
     150                    array(
     151                        'id'     => 'det-wp-debug-log',
     152                        'title'  => self::show_label_value( 'WP_DEBUG_LOG', ( WP_DEBUG_LOG ? 'true' : 'false' ) ),
     153                        'parent' => 'det_env_type',
     154                        'meta'   => array(
     155                            'title' => WP_DEBUG_LOG,
     156                        ),
     157                    )
     158                );
     159
     160                $admin_bar->add_node(
     161                    array(
     162                        'id'     => 'det-wp-debug-display',
     163                        'title'  => self::show_label_value( 'WP_DEBUG_DISPLAY', ( WP_DEBUG_DISPLAY ? 'true' : 'false' ) ),
     164                        'parent' => 'det_env_type',
     165                    )
     166                );
     167
     168                $wp_development_mode = ( function_exists( 'wp_get_development_mode' ) ? \wp_get_development_mode() : null );
     169
     170                if ( null !== $wp_development_mode ) {
     171                    if ( empty( $wp_development_mode ) ) {
     172                        $wp_development_mode = 'false';
     173                    }
    150174                    $admin_bar->add_node(
    151175                        array(
    152                             'id'     => 'det-wp-debug-log',
    153                             'title'  => self::show_label_value( 'WP_DEBUG_LOG', ( WP_DEBUG_LOG ? 'true' : 'false' ) ),
    154                             'parent' => 'det_env_type',
    155                             'meta'   => array(
    156                                 'title' => WP_DEBUG_LOG,
    157                             ),
    158                         )
    159                     );
    160 
    161                     $admin_bar->add_node(
    162                         array(
    163                             'id'     => 'det-wp-debug-display',
    164                             'title'  => self::show_label_value( 'WP_DEBUG_DISPLAY', ( WP_DEBUG_DISPLAY ? 'true' : 'false' ) ),
    165                             'parent' => 'det_env_type',
    166                         )
    167                     );
    168 
    169                     $wp_development_mode = ( function_exists( 'wp_get_development_mode' ) ? \wp_get_development_mode() : null );
    170 
    171                     if ( null !== $wp_development_mode ) {
    172                         if ( empty( $wp_development_mode ) ) {
    173                             $wp_development_mode = 'false';
    174                         }
    175                         $admin_bar->add_node(
    176                             array(
    177                                 'id'     => 'det-wp-development-mode',
    178                                 'title'  => self::show_label_value( 'WP_DEVELOPMENT_MODE', $wp_development_mode ),
    179                                 'parent' => 'det_env_type',
    180                             )
    181                         );
    182                     }
    183 
    184                     $admin_bar->add_node(
    185                         array(
    186                             'id'     => 'det-script-display',
    187                             'title'  => self::show_label_value( 'SCRIPT_DEBUG', ( SCRIPT_DEBUG ? 'true' : 'false' ) ),
    188                             'parent' => 'det_env_type',
    189                         )
    190                     );
    191 
    192                     $admin_bar->add_node(
    193                         array(
    194                             'id'     => 'det-savequeries',
    195                             'title'  => self::show_label_value( 'SAVEQUERIES', ( defined( 'SAVEQUERIES' ) && SAVEQUERIES ? 'true' : 'false' ) ),
     176                            'id'     => 'det-wp-development-mode',
     177                            'title'  => self::show_label_value( 'WP_DEVELOPMENT_MODE', $wp_development_mode ),
    196178                            'parent' => 'det_env_type',
    197179                        )
    198180                    );
    199181                }
     182
     183                $admin_bar->add_node(
     184                    array(
     185                        'id'     => 'det-script-display',
     186                        'title'  => self::show_label_value( 'SCRIPT_DEBUG', ( SCRIPT_DEBUG ? 'true' : 'false' ) ),
     187                        'parent' => 'det_env_type',
     188                    )
     189                );
     190
     191                $admin_bar->add_node(
     192                    array(
     193                        'id'     => 'det-savequeries',
     194                        'title'  => self::show_label_value( 'SAVEQUERIES', ( defined( 'SAVEQUERIES' ) && \SAVEQUERIES ? 'true' : 'false' ) ),
     195                        'parent' => 'det_env_type',
     196                    )
     197                );
    200198
    201199                $admin_bar->add_node(
     
    289287            \wp_enqueue_style(
    290288                self::STYLESHEET_HANDLE,
    291                 DET_PLUGIN_ROOT_URL . 'css/admin.css',
     289                \DET_PLUGIN_ROOT_URL . 'css/admin.css',
    292290                array(),
    293                 DET_VERSION
     291                \DET_VERSION
    294292            );
    295293        }
  • display-environment-type/tags/1.5.0/display-environment-type.php

    r3269979 r3320829  
    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.4.1
     6 * Version:           1.5.0
    77 * Requires at least: 5.5
    88 * Requires PHP:      7.4
     
    1818defined( 'ABSPATH' ) || exit;
    1919
    20 define( 'DET_VERSION', '1.4.1' );
     20define( 'DET_VERSION', '1.5.0' );
    2121define( 'DET_TEXTDOMAIN', 'display-environment-type' );
    2222define( 'DET_NAME', 'Display Environment Type' );
  • display-environment-type/tags/1.5.0/readme.txt

    r3269979 r3320829  
    11=== Display Environment Type ===
    2 Contributors: roytanck, markjaquith, tflight, mrwweb, tekapo, sdobreff
     2Contributors: sdobreff, roytanck, markjaquith, tflight, mrwweb, tekapo
    33Tags: environment, dtap, production, staging, development
    44Requires at least: 5.5
    5 Tested up to: 6.7.2
     5Tested up to: 6.8.1
    66Requires PHP: 7.4
    7 Stable tag: 1.4.1
     7Stable tag: 1.5.0
    88License: GPLv3
    99
     
    1515
    1616[More info about the new feature](https://make.wordpress.org/core/2020/07/24/new-wp_get_environment_type-function-in-wordpress-5-5/)
     17
     18To gain more control, and setting environment and other values directly from the WP admin (if wp-config.php is writable), install our plugin **[WP Control](https://wordpress.org/plugins/0-day-analytics/)**
    1719 
    1820== Installation ==
    1921
    20221. Install and activate using the 'Plugins' menu in WordPress.
     23
     24= Recommended Plugins =
     25* [WP Control](https://wordpress.org/plugins/0-day-analytics/) - is a powerful plugin designed for WordPress sites with extensive error logs. It allows administrators to check what is going on on their WP sites. It also has built-in: Cron manager, Transient manager (DB based) and Plugins Version Switcher directly from the plugins page.
    2126
    2227== Frequently Asked Questions ==
     
    5257== Changelog ==
    5358
    54 = 1.4.1 (2024-04-09) =
    55 * Fixed UI problem with staging and drop-down menu becomes unreadable (thanks @ericsackett).
     59= 1.5.0 (2024-07-01) =
     60* Code improvements, shows the constants value regardless of the WP_DEBUG constant value. WP Control plugin introduced
    5661
    5762= 1.4.0 (2024-04-07) =
  • display-environment-type/trunk/classes/class-display-environment-type.php

    r3267781 r3320829  
    147147                );
    148148
    149                 if ( WP_DEBUG ) {
     149                $admin_bar->add_node(
     150                    array(
     151                        'id'     => 'det-wp-debug-log',
     152                        'title'  => self::show_label_value( 'WP_DEBUG_LOG', ( WP_DEBUG_LOG ? 'true' : 'false' ) ),
     153                        'parent' => 'det_env_type',
     154                        'meta'   => array(
     155                            'title' => WP_DEBUG_LOG,
     156                        ),
     157                    )
     158                );
     159
     160                $admin_bar->add_node(
     161                    array(
     162                        'id'     => 'det-wp-debug-display',
     163                        'title'  => self::show_label_value( 'WP_DEBUG_DISPLAY', ( WP_DEBUG_DISPLAY ? 'true' : 'false' ) ),
     164                        'parent' => 'det_env_type',
     165                    )
     166                );
     167
     168                $wp_development_mode = ( function_exists( 'wp_get_development_mode' ) ? \wp_get_development_mode() : null );
     169
     170                if ( null !== $wp_development_mode ) {
     171                    if ( empty( $wp_development_mode ) ) {
     172                        $wp_development_mode = 'false';
     173                    }
    150174                    $admin_bar->add_node(
    151175                        array(
    152                             'id'     => 'det-wp-debug-log',
    153                             'title'  => self::show_label_value( 'WP_DEBUG_LOG', ( WP_DEBUG_LOG ? 'true' : 'false' ) ),
    154                             'parent' => 'det_env_type',
    155                             'meta'   => array(
    156                                 'title' => WP_DEBUG_LOG,
    157                             ),
    158                         )
    159                     );
    160 
    161                     $admin_bar->add_node(
    162                         array(
    163                             'id'     => 'det-wp-debug-display',
    164                             'title'  => self::show_label_value( 'WP_DEBUG_DISPLAY', ( WP_DEBUG_DISPLAY ? 'true' : 'false' ) ),
    165                             'parent' => 'det_env_type',
    166                         )
    167                     );
    168 
    169                     $wp_development_mode = ( function_exists( 'wp_get_development_mode' ) ? \wp_get_development_mode() : null );
    170 
    171                     if ( null !== $wp_development_mode ) {
    172                         if ( empty( $wp_development_mode ) ) {
    173                             $wp_development_mode = 'false';
    174                         }
    175                         $admin_bar->add_node(
    176                             array(
    177                                 'id'     => 'det-wp-development-mode',
    178                                 'title'  => self::show_label_value( 'WP_DEVELOPMENT_MODE', $wp_development_mode ),
    179                                 'parent' => 'det_env_type',
    180                             )
    181                         );
    182                     }
    183 
    184                     $admin_bar->add_node(
    185                         array(
    186                             'id'     => 'det-script-display',
    187                             'title'  => self::show_label_value( 'SCRIPT_DEBUG', ( SCRIPT_DEBUG ? 'true' : 'false' ) ),
    188                             'parent' => 'det_env_type',
    189                         )
    190                     );
    191 
    192                     $admin_bar->add_node(
    193                         array(
    194                             'id'     => 'det-savequeries',
    195                             'title'  => self::show_label_value( 'SAVEQUERIES', ( defined( 'SAVEQUERIES' ) && SAVEQUERIES ? 'true' : 'false' ) ),
     176                            'id'     => 'det-wp-development-mode',
     177                            'title'  => self::show_label_value( 'WP_DEVELOPMENT_MODE', $wp_development_mode ),
    196178                            'parent' => 'det_env_type',
    197179                        )
    198180                    );
    199181                }
     182
     183                $admin_bar->add_node(
     184                    array(
     185                        'id'     => 'det-script-display',
     186                        'title'  => self::show_label_value( 'SCRIPT_DEBUG', ( SCRIPT_DEBUG ? 'true' : 'false' ) ),
     187                        'parent' => 'det_env_type',
     188                    )
     189                );
     190
     191                $admin_bar->add_node(
     192                    array(
     193                        'id'     => 'det-savequeries',
     194                        'title'  => self::show_label_value( 'SAVEQUERIES', ( defined( 'SAVEQUERIES' ) && \SAVEQUERIES ? 'true' : 'false' ) ),
     195                        'parent' => 'det_env_type',
     196                    )
     197                );
    200198
    201199                $admin_bar->add_node(
     
    289287            \wp_enqueue_style(
    290288                self::STYLESHEET_HANDLE,
    291                 DET_PLUGIN_ROOT_URL . 'css/admin.css',
     289                \DET_PLUGIN_ROOT_URL . 'css/admin.css',
    292290                array(),
    293                 DET_VERSION
     291                \DET_VERSION
    294292            );
    295293        }
  • display-environment-type/trunk/display-environment-type.php

    r3269979 r3320829  
    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.4.1
     6 * Version:           1.5.0
    77 * Requires at least: 5.5
    88 * Requires PHP:      7.4
     
    1818defined( 'ABSPATH' ) || exit;
    1919
    20 define( 'DET_VERSION', '1.4.1' );
     20define( 'DET_VERSION', '1.5.0' );
    2121define( 'DET_TEXTDOMAIN', 'display-environment-type' );
    2222define( 'DET_NAME', 'Display Environment Type' );
  • display-environment-type/trunk/readme.txt

    r3269979 r3320829  
    11=== Display Environment Type ===
    2 Contributors: roytanck, markjaquith, tflight, mrwweb, tekapo, sdobreff
     2Contributors: sdobreff, roytanck, markjaquith, tflight, mrwweb, tekapo
    33Tags: environment, dtap, production, staging, development
    44Requires at least: 5.5
    5 Tested up to: 6.7.2
     5Tested up to: 6.8.1
    66Requires PHP: 7.4
    7 Stable tag: 1.4.1
     7Stable tag: 1.5.0
    88License: GPLv3
    99
     
    1515
    1616[More info about the new feature](https://make.wordpress.org/core/2020/07/24/new-wp_get_environment_type-function-in-wordpress-5-5/)
     17
     18To gain more control, and setting environment and other values directly from the WP admin (if wp-config.php is writable), install our plugin **[WP Control](https://wordpress.org/plugins/0-day-analytics/)**
    1719 
    1820== Installation ==
    1921
    20221. Install and activate using the 'Plugins' menu in WordPress.
     23
     24= Recommended Plugins =
     25* [WP Control](https://wordpress.org/plugins/0-day-analytics/) - is a powerful plugin designed for WordPress sites with extensive error logs. It allows administrators to check what is going on on their WP sites. It also has built-in: Cron manager, Transient manager (DB based) and Plugins Version Switcher directly from the plugins page.
    2126
    2227== Frequently Asked Questions ==
     
    5257== Changelog ==
    5358
    54 = 1.4.1 (2024-04-09) =
    55 * Fixed UI problem with staging and drop-down menu becomes unreadable (thanks @ericsackett).
     59= 1.5.0 (2024-07-01) =
     60* Code improvements, shows the constants value regardless of the WP_DEBUG constant value. WP Control plugin introduced
    5661
    5762= 1.4.0 (2024-04-07) =
Note: See TracChangeset for help on using the changeset viewer.