This files gives the basic structure to start a new WordPress plugin from scratch.
- Change the name of
mg-bp-wp-plugin.php
file to the name of the plugin you want to create. - Modify the comments in the
mg-bp-wp-plugin.php
file. - Set the constant
'MGBPWPPLUGIN_TEXTDOMAIN'
with your text domain.
If you need to create Custom Post Types for your plugin you can find a template in the folder inc/cpts/template.txt
. Copy, paste it in the same directory and change its extension from .txt
to .php
.
Just drop all your Custom Post Type files in that folder and they will be loaded automatically.
In the template file you will only need to change the values for theses variables:
$cpt_name
: the name of the Custom Post Type$singular_name
: the singular name for the new entity$plural_name
: the singular name for the new entity$supports
: wich features will your Custom Post Type supports? Default: array( 'title', 'editor', 'thumbnail' ).$menu_icon
: Set the specific icon for the Custom Post Type => https://developer.wordpress.org/resource/dashicons/#products