Title: Set the Stage
Author: Ivaylo Draganov
Published: <strong>22. desember, 2021</strong>
Last modified: 16. august, 2023

---

Søk i utvidelser

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

Denne utvidelsen **har ikke blitt testet mot noen av de siste 3 hovedutgivelsene
av WordPress**. Den er kanskje ikke lenger holdt vedlike eller støttet, og den kan
ha kompatibilitetsproblemer med nyeste versjoner av WordPress.

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

# Set the Stage

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

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

 * [Detaljer](https://nb.wordpress.org/plugins/set-the-stage/#description)
 * [Omtaler](https://nb.wordpress.org/plugins/set-the-stage/#reviews)
 *  [Installering](https://nb.wordpress.org/plugins/set-the-stage/#installation)
 * [Utvikling](https://nb.wordpress.org/plugins/set-the-stage/#developers)

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

## Beskrivelse

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.

## Skjermbilder

[⌊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

## Installasjon

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

## Vurderinger

![](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. januar, 2023

Simple but very effective plugin. Thanks a lot!

 [ Les 1 vurdering ](https://wordpress.org/support/plugin/set-the-stage/reviews/)

## Bidragsytere og utviklere

«Set the Stage» er programvare med åpen kildekode. Følgende personer har bidratt
til denne utvidelsen:

Bidragsytere

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

[Oversett «Set the Stage» til ditt språk.](https://translate.wordpress.org/projects/wp-plugins/set-the-stage)

### Interessert i utvikling?

[Bla gjennom koden](https://plugins.trac.wordpress.org/browser/set-the-stage/), 
sjekk ut [SVN-repositoriet](https://plugins.svn.wordpress.org/set-the-stage/), eller
abonner på [utviklingsloggen](https://plugins.trac.wordpress.org/log/set-the-stage/)
med [RSS](https://plugins.trac.wordpress.org/log/set-the-stage/?limit=100&mode=stop_on_copy&format=rss).

## Endringslogg

#### 1.0.1

**Fixed**
 – Fix default environment reset button

#### 1.0.0

 * Initial release.

## Meta

 *  Versjon **1.0.1**
 *  Sist oppdatert **3 år siden**
 *  Aktive installasjoner **10+**
 *  WordPress-versjon ** 4.7 eller nyere **
 *  Testet opp til **6.3.13**
 *  PHP-versjon ** 7.4 eller nyere **
 *  Språk
 * [English (US)](https://wordpress.org/plugins/set-the-stage/)
 * Stikkord
 * [environment](https://nb.wordpress.org/plugins/tags/environment/)[menu](https://nb.wordpress.org/plugins/tags/menu/)
   [stage](https://nb.wordpress.org/plugins/tags/stage/)[switcher](https://nb.wordpress.org/plugins/tags/switcher/)
 *  [Avansert visning](https://nb.wordpress.org/plugins/set-the-stage/advanced/)

## Vurderinger

 5 av 5 stjerner.

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

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

[Se alle omtalene](https://wordpress.org/support/plugin/set-the-stage/reviews/)

## Bidragsytere

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

## Brukerstøtte

Har du noe å si? Trenger du hjelp?

 [Vis brukerstøtteforumet](https://wordpress.org/support/plugin/set-the-stage/)