What is gb-small-skeleton plugin?
This tool meant to help you start your own plugin.
the functionality is basic for saving data from the admin page. you can add more fields by coping the one existed and changing the name & id’s.
How to transform “gb-small-skeleton” to your own plugin
- Change the folder name “gb-small-skeleton” to your plugin name.
- Change the file name “gb-small-skeleton.php” to your {plugin-name}.php
- In file “gb-small-skeleton.php” line 3 “Plugin Name: GB-Plugins skeleton plugin” change “Plugin Name: {your plugin name}”
- In file “gb-small-skeleton.php” line 5 “Description: a skeleton plugin to transform to your plugin” change “Description: {your plugin description}”
- In file “gb-small-skeleton.php” line 9 “Text Domain: gbs” change “Text Domain: {your plugin prefix}”
- In file “gb-small-skeleton.php” line 23 “define(‘GBSFIX’, ‘gbs’)” change ‘gbs’ to your prefix
- in file “core/class/class-start.php” replace “gbs” with your class prefix
- in file “core/class/class-start.php” on function “GetGBSettings” change “admin_page” array to set your plugin admin page.
Front-end implementation
there is no implementation except the shortcode example:
//An example of a way to output the data in a shortcode form
//[gb_small_skeleton]
add_shortcode('gb_small_skeleton',function(){
$gbs = gbs();
$out = "<div class='gb-small-skeleton-wrap'><p class='gb-small-skeleton'>";
$out .= $gbs->get_data(GBSFIX.'_first_input');
$out .= "</p></div>";
return $out;
});