예제 #1
0
파일: hooks.php 프로젝트: cumi/pressbooks
}
// -------------------------------------------------------------------------------------------------------------------
// Includes
// -------------------------------------------------------------------------------------------------------------------
require PB_PLUGIN_DIR . 'includes/admin/pb-branding.php';
require PB_PLUGIN_DIR . 'includes/pb-utility.php';
require PB_PLUGIN_DIR . 'includes/pb-image.php';
require PB_PLUGIN_DIR . 'includes/pb-l10n.php';
require PB_PLUGIN_DIR . 'includes/pb-postype.php';
require PB_PLUGIN_DIR . 'includes/pb-redirect.php';
require PB_PLUGIN_DIR . 'includes/pb-sanitize.php';
require PB_PLUGIN_DIR . 'includes/pb-taxonomy.php';
require PB_PLUGIN_DIR . 'includes/pb-media.php';
require PB_PLUGIN_DIR . 'includes/pb-editor.php';
require PB_PLUGIN_DIR . 'symbionts/pb-latex/pb-latex.php';
PressBooks\Utility\include_plugins();
// -------------------------------------------------------------------------------------------------------------------
// Initialize services
// -------------------------------------------------------------------------------------------------------------------
require PB_PLUGIN_DIR . 'symbionts/pimple/Container.php';
require PB_PLUGIN_DIR . 'symbionts/pimple/ServiceProviderInterface.php';
if (!empty($GLOBALS['PB_PIMPLE_OVERRIDE'])) {
    \PressBooks\Container::init($GLOBALS['PB_PIMPLE_OVERRIDE']);
} else {
    \PressBooks\Container::init();
}
// -------------------------------------------------------------------------------------------------------------------
// Login screen branding
// -------------------------------------------------------------------------------------------------------------------
add_action('login_head', '\\PressBooks\\Admin\\Branding\\custom_login_logo');
add_filter('login_headerurl', '\\PressBooks\\Admin\\Branding\\login_url');
예제 #2
0
 /**
  * @covers \PressBooks\Utility\include_plugins
  */
 public function test_include_plugins()
 {
     \PressBooks\Utility\include_plugins();
     $this->assertTrue(class_exists('custom_metadata_manager'));
 }