PHP Класс Pressbooks\Activation

Показать файл Открыть проект

Открытые методы

Метод Описание
__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