Registers the given module.
public register_module ( |
||
$module | Module object. | |
Результат | boolean | Whether or not the module is active. |
/** * Registers the module at the module manager. * * @since 3.0.0 * * @param ModuleManager $module_manager Module manager object. * * @return bool Whether or not the module was registerd successfully AND has been activated. */ public function register_module(ModuleManager $module_manager) { global $wp_version; if (version_compare($wp_version, '4.7.0', '>=')) { return false; } return $module_manager->register_module(new Module('user_admin_language', ['description' => __('Let each user choose a preferred language for the back end of all connected sites. This does not affect the front end.', 'multilingual-press'), 'name' => __('User Admin Language', 'multilingual-press'), 'active' => false])); }
/** * Registers the module at the module manager. * * @since 3.0.0 * * @param ModuleManager $module_manager Module manager object. * * @return bool Whether or not the module was registerd successfully AND has been activated. */ public function register_module(ModuleManager $module_manager) { return $module_manager->register_module(new Module('trasher', ['description' => __('This module provides a new post meta and checkbox to trash the posts. If you enable the checkbox and move a post to the trash MultilingualPress also will trash the linked posts.', 'multilingual-press'), 'name' => __('Trasher', 'multilingual-press'), 'active' => false])); }
/** * Registers the module. * * @return bool */ private function register_setting() { return $this->module_manager->register_module(new Module('quicklinks', ['description' => __('Show link to translations in post content.', 'multilingual-press'), 'name' => __('Quicklinks', 'multilingual-press'), 'active' => false])); }
/** * Register the feature. * * @return bool Feature is active or not. */ public function setup() { return $this->module_manager->register_module(new Module('redirect', ['description' => __('Redirect visitors according to browser language settings.', 'multilingual-press'), 'name' => __('HTTP Redirect', 'multilingual-press'), 'active' => false])); }
/** * Registers the module at the module manager. * * @since 3.0.0 * * @param ModuleManager $module_manager Module manager object. * * @return bool Whether or not the module was registerd successfully AND has been activated. */ public function register_module(ModuleManager $module_manager) { return $module_manager->register_module(new Module('custom_post_type_support', ['description' => __('Enable translation of custom post types. Creates a second settings box below this. The post types must be activated for the whole network or on the main site.', 'multilingual-press'), 'name' => __('Custom Post Type Support', 'multilingual-press'), 'active' => false])); }
/** * Registers the module at the module manager. * * @since 3.0.0 * * @param ModuleManager $module_manager Module manager object. * * @return bool Whether or not the module was registerd successfully AND has been activated. */ public function register_module(ModuleManager $module_manager) { return $module_manager->register_module(new Module('alternative_language_title', ['description' => __('Show sites with their alternative language title in the admin bar.', 'multilingual-press'), 'name' => __('Alternative Language Title', 'multilingual-press'), 'active' => false])); }