Last active
August 29, 2015 14:08
-
-
Save michaeluno/d0eca4c0c02af911aabd to your computer and use it in GitHub Desktop.
This is a test plugin that tests if a image field type in a custom post meta box of Admin Page Framework causes a conflict with the featured image's image uploader.
This file contains 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: Admin Page Framework Test - Featured Image Conflict */ | |
if ( ! class_exists( 'AdminPageFramework' ) ) { | |
$_sFrameworkPath = defined( 'WP_DEBUG' ) && WP_DEBUG | |
? dirname( dirname( __FILE__ ) ) . '/admin-page-framework/development/admin-page-framework.php' | |
: dirname( dirname( __FILE__ ) ) . '/admin-page-framework/library/admin-page-framework.min.php'; | |
if ( file_exists( $_sFrameworkPath ) ) { | |
include( $_sFrameworkPath ); | |
} else { | |
trigger_error( 'Admin Page Framework: The framework path could not be located.', E_USER_NOTICE ); | |
return; | |
} | |
} | |
class APFTest_FeaturedImageConflict extends AdminPageFramework_MetaBox { | |
public function setUp() { | |
$this->addSettingFields( | |
array( | |
'field_id' => 'image_test', | |
'type' => 'image', | |
'title' => 'testing', | |
) | |
); | |
} | |
} | |
new APFTest_FeaturedImageConflict( | |
null, // id - null to auto-generate | |
'Test - Featured Image Conflict', // title | |
array( 'post' ), // post, page, etc. | |
'normal', | |
'high' | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment