Skip to content

Commit

Permalink
fixing autoload handling class maps
Browse files Browse the repository at this point in the history
  • Loading branch information
= committed Dec 11, 2013
1 parent 5869b79 commit 3d1e731
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions admin/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
class O2O_Admin {

public static function init() {
if ( !class_exists( 'Post_Selection_UI', false ) ) {
if ( ! class_exists( 'Post_Selection_UI' ) ) {
@include_once(__DIR__ . '/post-selection-ui/post-selection-ui.php');
Post_Selection_UI::init();
}
Post_Selection_UI::init();
add_action( 'add_meta_boxes', array( __CLASS__, '__action_add_meta_box' ), 10, 2 );
add_action( 'save_post', array( __CLASS__, '__action_save_post' ) );
}
Expand Down
10 changes: 5 additions & 5 deletions objects-to-objects.php
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<?php
if( ! class_exists( 'O2O', false ) ) {
if( ! class_exists( 'O2O' ) ) {
require_once ( __DIR__ . '/src/o2o.php' );
}

if( ! class_exists( 'O2O_Connection_Factory', false ) ) {
if( ! class_exists( 'O2O_Connection_Factory' ) ) {
require_once ( __DIR__ . '/src/factory.php' );
}

if( ! class_exists( 'O2O_Query', false ) ) {
if( ! class_exists( 'O2O_Query' ) ) {
require_once ( __DIR__ . '/src/query.php' );
}

if( ! class_exists( 'O2O_Rewrites', false ) ) {
require_once ( __DIR__ . '/src/rewrites.php' );
if( ! class_exists( 'O2O_Rewrites' ) ) {
require_once ( __DIR__ . '/src/rewrites.php' );
}

add_action( 'init', array( 'O2O', 'init' ), 20 );
2 changes: 1 addition & 1 deletion src/connection-types/taxonomy/taxonomy.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
if( ! class_exists( 'O2O_Query_Modifier_Taxonomy', false ) ) {
if( ! class_exists( 'O2O_Query_Modifier_Taxonomy' ) ) {
require_once ( __DIR__ . '/query_modifier.php' );
}

Expand Down
2 changes: 1 addition & 1 deletion src/o2o.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public static function init() {
}

if ( is_admin() ) {
if ( ! class_exists( 'O2O_Admin', false ) ) {
if ( ! class_exists( 'O2O_Admin' ) ) {
require_once( dirname( __DIR__ ) . '/admin/admin.php' );
}
O2O_Admin::init();
Expand Down

0 comments on commit 3d1e731

Please sign in to comment.