Last active
July 20, 2024 13:21
-
-
Save ianpegg/fedff025099e5db13e618c5bc6c0c597 to your computer and use it in GitHub Desktop.
Registers a custom theme directory as an alternative to the default WP theme directory.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Plugin Name: EggMUP: Register Custom Theme Directory | |
| * Plugin URI: https://gist.github.com/ianpegg/fedff025099e5db13e618c5bc6c0c597 | |
| * Description: Register an alternative theme directory. | |
| * Version: 1.0.0 | |
| * Author: Ian Pegg | |
| * Author URI: https://eggcupwebdesign.com | |
| * php version 7.4.15 | |
| * | |
| * @category Must_Use_Plugin | |
| * @package WordPress_Plugin | |
| * @author Ian Pegg <[email protected]> | |
| * @license GNU/GPLv3 https://www.gnu.org/licenses/gpl-3.0.txt | |
| * @link https://eggcupwebdesign.com | |
| */ | |
| namespace EggCup\MUP\CustomThemeDir; | |
| if (!defined('ABSPATH')) { | |
| exit; | |
| } | |
| if (defined('WP_CONTENT_DIR')) { | |
| register_theme_directory(constant('WP_CONTENT_DIR') . '/skin'); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment