Where to call add_shortcode function in WordPress Plugin Boilerplate?
If you look at the /includes/class-plugin-loader.php you will see the public function add_shortcode( $tag, $component, $callback, $priority = 10, $accepted_args = 2 ) { $this->shortcodes = $this->add( $this->shortcodes, $tag, $component, $callback, $priority, $accepted_args ); } That builds a list of shortcodes to be registered with WordPress. You use that via /includes/class-plugin.php within this function: /** … Read more