PHP 클래스 EP_Modules

파일 보기 프로젝트 열기: 10up/elasticpress 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$registered_modules array Stores all modules that have been properly included (both active and inactive)

공개 메소드들

메소드 설명
activate_module ( string $slug ) A convenient function to programmatically activate a module
factory ( ) : object Return singleton instance of class
get_active_modules ( ) : array Returns all active modules
register_module ( string $slug, array $module_args ) : boolean [ep_register_module description]
setup ( ) Initiate class actions
setup_modules ( ) Set up all active modules that are stored in options

메소드 상세

activate_module() 공개 메소드

A convenient function to programmatically activate a module
부터: 2.1
public activate_module ( string $slug )
$slug string

factory() 공개 정적인 메소드

Return singleton instance of class
부터: 2.1
public static factory ( ) : object
리턴 object

get_active_modules() 공개 메소드

Returns all active modules
부터: 2.1
public get_active_modules ( ) : array
리턴 array Array of slugs mapped to EP_Module objects

register_module() 공개 메소드

[ep_register_module description]
public register_module ( string $slug, array $module_args ) : boolean
$slug string
$module_args array Supported array parameters: "title" (string) - Pretty title for module "requires_install_reindex" (boolean) - Setting to true will force a reindex after the module is activated "setup_cb" (callback) - Callback to a function to be called on each page load when the module is activated "post_activation_cb" (callback) - Callback to a function to be called after a module is first activated "module_box_summary_cb" (callback) - Callback to a function that outputs HTML module box summary (short description of module) "module_box_long_cb" (callback) - Callback to a function that outputs HTML module box full description "dependencies_met_cb" (callback) - Callback to a function that determines if the modules dependencies are met. True means yes, WP_Error means no. If no, WP_Error message will be printed to the screen.
리턴 boolean

setup() 공개 메소드

Initiate class actions
부터: 2.1
public setup ( )

setup_modules() 공개 메소드

Set up all active modules that are stored in options
부터: 2.1
public setup_modules ( )

프로퍼티 상세

$registered_modules 공개적으로 프로퍼티

Stores all modules that have been properly included (both active and inactive)
부터: 2.1
public array $registered_modules
리턴 array