Skip to content

Commit b5ba97c

Browse files
author
Grant Kinney
committed
Adds conditional for loading WP_GitHub_Updater class
1 parent 2e9eba2 commit b5ba97c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

wp-template-controller.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Plugin Name: Template Controller
44
Plugin URI: https://github.com/creativecoder/wp-template-controller
55
Description: Separate data generation from presentation in your WordPress templates
6-
Version: 0.1
6+
Version: 0.1.1
77
Author: Grant Kinney
88
Author URI: https://github.com/creativecoder
99
License: GPL2
@@ -165,7 +165,9 @@ function tpl_data( $name ) {
165165
}
166166

167167
add_action( 'admin_init', function () {
168-
include_once( 'WordPress-GitHub-Plugin-Updater/updater.php' );
168+
if ( ! class_exists('WP_GitHub_Updater') ) {
169+
include_once( 'WordPress-GitHub-Plugin-Updater/updater.php' );
170+
}
169171

170172
define( 'WP_GITHUB_FORCE_UPDATE', true );
171173

0 commit comments

Comments
 (0)