mimosafa/wp-theme-exchanger

Simple WordPress theme exchanger

Installs: 9

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/mimosafa/wp-theme-exchanger

1.0.0 2018-11-24 12:44 UTC

This package is auto-updated.

Last update: 2025-09-25 10:23:22 UTC


README

Build Status

Simple WordPress theme exchanger.

Installation

composer require mimosafa\wp-theme-exchanger

Example

Note: This library will not work after the setup_theme action.

<?php

// In your plugin file

require_once( 'path/to/vendor/autoload.php' );

add_action( 'plugins_loaded', function() {

    /**
     * Theme slug
     *
     * @var string $extra_theme
     */
    $extra_theme = 'awesome-theme';
    $exchanger = new WP_Theme_Exchanger\Exchanger( $extra_theme );

    if ( $_SERVER['REQUEST_URI'] === '/awesome' ) {
        $exchanger->on();
    }

} );