Last active
October 23, 2019 12:09
-
-
Save badabingbreda/47afa25da2052e3359cd2f31c1052433 to your computer and use it in GitHub Desktop.
Toolbox Docs: Plugin Development Alias Module by inclusion using file_get_contents
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 2: this will copy the file's content into the timber templates as a starter template. If there are no | |
// dependecies on plugin files THIS plugin can be deactivated and/or uninstalled. Updates to the twig file | |
// will not propagate to existing instances of the Alias Module, but WILL be used for new instances. | |
// | |
'timber_template' => file_get_contents( TOOLBOXSTARTER_DIR . 'twig_templates/starter_user_info.twig' ), | |
), | |
) ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment