function registerThemeDirectories() {

		/**
		 * Register additional theme directories.
		 *
		 * Additional theme directories (e.g. those within another plugin, or custom
		 * subdirectories of wp-content) may be registered via this action hook.
		 *
		 * @since 3.8.0
		 */
		do_action( 'pressbooks_register_theme_directory' );

		if ( is_admin() ) {
			if ( Book::isBook() ) {
				add_filter( 'allowed_themes', [ $this, 'allowedBookThemes' ] );
			} elseif ( ! is_network_admin() ) {
				add_filter( 'allowed_themes', [ $this, 'allowedRootThemes' ] );
			}
		}
	}
function registerThemeDirectories() {

		/**
		 * Register additional theme directories.
		 *
		 * Additional theme directories (e.g. those within another plugin, or custom
		 * subdirectories of wp-content) may be registered via this action hook.
		 *
		 * @since 3.8.0
		 */
		do_action( 'pressbooks_register_theme_directory' );

		if ( is_admin() ) {
			if ( Book::isBook() ) {
				add_filter( 'allowed_themes', [ $this, 'allowedBookThemes' ] );
			} elseif ( ! is_network_admin() ) {
				add_filter( 'allowed_themes', [ $this, 'allowedRootThemes' ] );
			}
		}
	}
function registerThemeDirectories ( ) { /**
		 * Register additional theme directories.
		 *
		 * Additional theme directories (e.g. those within another plugin, or custom
		 * subdirectories of wp-content) may be registered via this action hook.
		 *
		 * @since 3.8.0
		 */ do_action ( 'pressbooks_register_theme_directory' ) ; if ( is_admin ( ) ) { if ( Book :: isBook ( ) ) { add_filter ( 'allowed_themes' , [ $ this , 'allowedBookThemes' ] ) ; } elseif ( ! is_network_admin ( ) ) { add_filter ( 'allowed_themes' , [ $ this , 'allowedRootThemes' ] ) ; } } }
Register theme directories, set a filter that hides themes under certain conditions
Register theme directories set a filter that hides themes under certain conditions