PHP 클래스 Pressbooks\Activation

파일 보기 프로젝트 열기: pressbooks/pressbooks

공개 메소드들

메소드 설명
__construct ( ) Constructor
forcePbColors ( integer $id, object $user = null ) Never let a user change [ Your Profile > Admin Color Scheme ]
registerActivationHook ( ) Activation hook
wpmuNewBlog ( integer $blog_id, integer $user_id ) Runs activation function and sets up default WP options for new blog, a.k.a. when a registered user creates a new blog

비공개 메소드들

메소드 설명
isBookSetup ( ) : boolean Determine if book is set up or not to avoid duplication (i.e. if activation functions have run and default options set)
wpmuActivate ( ) Set up default terms for Front Matter and Back Matter Insert default part, chapter, front matter, and back matter Insert default pages (Authors, Cover, TOC, About, Buy, and Access Denied) Remove content generated by wp_install_defaults Anything which needs to run on blog activation must go in this function

메소드 상세

__construct() 공개 메소드

Constructor
public __construct ( )

forcePbColors() 정적인 공개 메소드

Never let a user change [ Your Profile > Admin Color Scheme ]
static public forcePbColors ( integer $id, object $user = null )
$id integer
$user object (optional)

registerActivationHook() 공개 메소드

Activation hook
또한 보기: register_activation_hook()

wpmuNewBlog() 공개 메소드

Runs activation function and sets up default WP options for new blog, a.k.a. when a registered user creates a new blog
public wpmuNewBlog ( integer $blog_id, integer $user_id )
$blog_id integer
$user_id integer