Title: Set the Stage
Author: Ivaylo Draganov
Published: <strong>22 Dicembre 2021</strong>
Last modified: 16 Agosto 2023

---

Ricerca i plugin

![](https://ps.w.org/set-the-stage/assets/banner-772x250.png?rev=2647750)

Questo plugin **non è stato testato con le ultime 3 versioni principali (major releases)
di WordPress**. Potrebbe non essere più mantenuto, o supportato, e potrebbe presentare
problemi di compatibilità se utilizzato con versioni più recenti di WordPress.

![](https://s.w.org/plugins/geopattern-icon/set-the-stage_dddfe1.svg)

# Set the Stage

 Di [Ivaylo Draganov](https://profiles.wordpress.org/dragunoff/)

[Scarica](https://downloads.wordpress.org/plugin/set-the-stage.1.0.1.zip)

 * [Dettagli](https://it.wordpress.org/plugins/set-the-stage/#description)
 * [Recensioni](https://it.wordpress.org/plugins/set-the-stage/#reviews)
 *  [Installazione](https://it.wordpress.org/plugins/set-the-stage/#installation)
 * [Sviluppo](https://it.wordpress.org/plugins/set-the-stage/#developers)

 [Supporto](https://wordpress.org/support/plugin/set-the-stage/)

## Descrizione

Adds a menu to the admin bar to quickly identify different environments for a site(
e.g. production and development) and easily switch to the same URL on other environments.
Multi-site compatible for both sub-domain and sub-directory installations.

### Configuration

The plugin has a convenient settings page but can also be configured programatically
via a filter hook.

#### Setting environments via the WordPress admin interface

Navigate to “Settings > Set the Stage” in the WordPress admin to review and edit
the configuration.

#### Setting environments via a WordPress filter hook

Hook to `drgnff_wp_stage_switcher__environments` and return an array with environments.
Here’s an example filter function:

    ```
    add_filter( 'drgnff_wp_stage_switcher__environments', function ($envs) {
        return [
            [
                'url' => 'https://example.com', // home url
                'title' => 'LIVE', // display name
                'color' => '#ffffff', // hex color (optional)
                'background_color' => '#ff0000', // hex color (optional)
            ],
            [
                'url' => 'https://example.com',
                'title' => 'DEVELOPMENT',
                'color' => '#ffffff',
                'background_color' => '#228b22',
            ],
        ];
    });
    ```

#### Controlling visibility of the switcher

By default the switcher menu is displayed to all logged in users. By hooking to `
drgnff_wp_stage_switcher__should_display_switcher` and returning a boolean you can
control whether the switcher should be displayed.

#### Overriding the default environment

The default environment is used for the current site if it’s not in the list of 
environments. By hooking to `drgnff_wp_stage_switcher__default_environment` you 
can control the title and colors for the default environment.

#### A few notes on configuration

 * Filters have a precedence over manual configuration made in the settings page.
   If filters are used then relevant sections on the settings page are rendered 
   as read-only.
 * For multi-site installations use the URLs of the main site.
 * The plugin initiates its logic on the `plugins_loaded` hook with priority `11`.
   Thus filter hooks that affect the plugin must be added before that.

## Screenshot

[⌊The admin bar menu in action⌉⌊The admin bar menu in action⌉[

The admin bar menu in action

[⌊The settings page⌉⌊The settings page⌉[

The settings page

[⌊Adding the current environment to the list⌉⌊Adding the current environment to 
the list⌉[

Adding the current environment to the list

## Installazione

 1. Activate from the plugins menu.
 2. Navigate to the plugin settings page or use a filter to set up your environments.

## Recensioni

![](https://secure.gravatar.com/avatar/05cb123d7962898785a6e4ad044f20f04ff70867ca07775ae9ae7e3a50e46bda?
s=60&d=retro&r=g)

### 󠀁[Excellent little plugin, simple to use](https://wordpress.org/support/topic/excellent-little-plugin-simple-to-use/)󠁿

 [djek](https://profiles.wordpress.org/djek/) 25 Gennaio 2023

Simple but very effective plugin. Thanks a lot!

 [ Leggi la recensione di 1 ](https://wordpress.org/support/plugin/set-the-stage/reviews/)

## Contributi e sviluppo

“Set the Stage” è un software open source. Le persone che hanno contribuito allo
sviluppo di questo plugin sono indicate di seguito.

Collaboratori

 *   [ Ivaylo Draganov ](https://profiles.wordpress.org/dragunoff/)

[Traduci “Set the Stage” nella tua lingua.](https://translate.wordpress.org/projects/wp-plugins/set-the-stage)

### Ti interessa lo sviluppo?

[Esplora il codice](https://plugins.trac.wordpress.org/browser/set-the-stage/) segui
il [repository SVN](https://plugins.svn.wordpress.org/set-the-stage/), segui il 
[log delle modifiche](https://plugins.trac.wordpress.org/log/set-the-stage/) tramite
[RSS](https://plugins.trac.wordpress.org/log/set-the-stage/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 1.0.1

**Fixed**
 – Fix default environment reset button

#### 1.0.0

 * Initial release.

## Meta

 *  Versione **1.0.1**
 *  Ultimo aggiornamento **3 anni fa**
 *  Installazioni attive **10+**
 *  Versione WordPress ** 4.7 o superiore **
 *  Testato fino alla versione **6.3.13**
 *  Versione PHP ** 7.4 o superiore **
 *  Lingua
 * [English (US)](https://wordpress.org/plugins/set-the-stage/)
 * Tag
 * [environment](https://it.wordpress.org/plugins/tags/environment/)[menu](https://it.wordpress.org/plugins/tags/menu/)
   [stage](https://it.wordpress.org/plugins/tags/stage/)[switcher](https://it.wordpress.org/plugins/tags/switcher/)
 *  [Visualizzazione avanzata](https://it.wordpress.org/plugins/set-the-stage/advanced/)

## Valutazioni

 5 su 5 stelle.

 *  [  1 5- recensioni a stelle     ](https://wordpress.org/support/plugin/set-the-stage/reviews/?filter=5)
 *  [  0 recensioni a 4-stelle     ](https://wordpress.org/support/plugin/set-the-stage/reviews/?filter=4)
 *  [  0 recensioni a 3-stelle     ](https://wordpress.org/support/plugin/set-the-stage/reviews/?filter=3)
 *  [  0 recensioni a 2-stelle     ](https://wordpress.org/support/plugin/set-the-stage/reviews/?filter=2)
 *  [  0 recensioni a 1-stelle     ](https://wordpress.org/support/plugin/set-the-stage/reviews/?filter=1)

[La tua recensione](https://wordpress.org/support/plugin/set-the-stage/reviews/#new-post)

[Vedi tutte le recensioni](https://wordpress.org/support/plugin/set-the-stage/reviews/)

## Collaboratori

 *   [ Ivaylo Draganov ](https://profiles.wordpress.org/dragunoff/)

## Supporto

Hai qualcosa da dire? Ti serve aiuto?

 [Chiedi nel forum di supporto](https://wordpress.org/support/plugin/set-the-stage/)