Last active
December 19, 2015 08:19
-
-
Save szbl/5924584 to your computer and use it in GitHub Desktop.
Example of an auto-included plugin "controller" script.
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 | |
if ( class_exists( 'Sizeable_Person' ) ) : | |
add_action( 'add_meta_boxes', 'szbl_mvc_example_add_meta_boxes' ); | |
function szbl_mvc_example_add_meta_boxes() | |
{ | |
add_meta_box( 'szbl-mvc-person-meta', 'Additional Information', 'szbl_mvc_example_meta_output', Sizeable_Person::POST_TYPE_SLUG, 'normal', 'high' ); | |
} | |
function szbl_mvc_example_meta_output() | |
{ | |
if ( file_exists( dirname( __FILE__ ) . '/views/meta.php' ) ) | |
include dirname( __FILE__ ) . '/views/meta.php'; | |
} | |
endif; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment