Last active
October 23, 2019 12:08
-
-
Save badabingbreda/f1b3f65eb426f49e1f78e082cd8f22f6 to your computer and use it in GitHub Desktop.
Toolbox Docs: Plugin Development Alias Module by inclusion as a seperate twig template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Starter Plugin User Info Alias Module | |
* USER INFO | |
* @since 1.0 | |
*/ | |
\FLBuilder::register_module_alias( 'starter-user-info', array( | |
'module' => 'acftimber', | |
'name' => __( 'User Info', 'textdomain' ), | |
'description' => __( 'Starter User Info', 'textdomain' ), | |
'group' => __( 'Starter Plugin', 'textdomain' ), | |
'category' => __('User', 'textdomain'), | |
// path to a custom svg icon (20x20 pixels) | |
'icon' => TOOLBOXSTARTER_DIR . 'modules/user_info.svg', | |
'enabled' => true, | |
'settings' => array( | |
// Method 1: include the twig template using twig include, useful for future updates where all instances | |
// of this Alias Module require the same update. Plugin needs to remain installed and active. | |
'timber_template' => "{% include 'starter_user_info.twig' %}", | |
// OPTIONAL: settings_form_name. If your Module takes settings you can refer to the settings_form here. The form | |
// needs to be registered seperately. | |
'settings_form_name' => 'toolbox_starter_user_info_settings', | |
), | |
) ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment