PHP Class Pressbooks\Pressbooks

显示文件 Open project: pressbooks/pressbooks

Public Methods

Method Description
__construct ( ) Constructor.
allowedBookThemes ( array $themes ) : array Used by add_filter( 'allowed_themes' ) Will hide any theme not in ./themes-book/* with exceptions for the PB_BOOK_THEME constant, and $GLOBALS['PB_SECRET_SAUCE']['BOOK_THEMES'][]
allowedRootThemes ( array $themes ) : array Used by add_filter( 'allowed_themes' ) Will hide any theme not in ./themes-root/* with exceptions for 'pressbooks-root', the PB_ROOT_THEME constant, and $GLOBALS['PB_SECRET_SAUCE']['ROOT_THEMES'][]
registerThemeDirectories ( ) Register theme directories, set a filter that hides themes under certain conditions

Method Details

__construct() public method

Constructor.
public __construct ( )

allowedBookThemes() public method

Used by add_filter( 'allowed_themes' ) Will hide any theme not in ./themes-book/* with exceptions for the PB_BOOK_THEME constant, and $GLOBALS['PB_SECRET_SAUCE']['BOOK_THEMES'][]
public allowedBookThemes ( array $themes ) : array
$themes array
return array

allowedRootThemes() public method

Used by add_filter( 'allowed_themes' ) Will hide any theme not in ./themes-root/* with exceptions for 'pressbooks-root', the PB_ROOT_THEME constant, and $GLOBALS['PB_SECRET_SAUCE']['ROOT_THEMES'][]
public allowedRootThemes ( array $themes ) : array
$themes array
return array

registerThemeDirectories() public method

Register theme directories, set a filter that hides themes under certain conditions