Skip to content

Instantly share code, notes, and snippets.

@javistuff
Created March 16, 2018 01:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save javistuff/0c33096a207c4c173238d6931092b8d3 to your computer and use it in GitHub Desktop.
Save javistuff/0c33096a207c4c173238d6931092b8d3 to your computer and use it in GitHub Desktop.
function at_define_new_module_type( $types ) {
$types['your_module_slug'] = array(
'name' => esc_html__( 'Your New Module Title', 'quadro' ),
'slug' => 'your_module_slug',
'img' => 'your_module_slug', // this serves as name for the .png module icon
'img_path' => get_stylesheet_directory_uri() . '/path-inside-child-theme/'
'desc' => esc_html__( 'Module type description for hover card', 'quadro' ),
);
return $types;
}
add_filter( 'qi_filter_available_modules', 'at_define_new_module_type' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment