Closed fireproofsocks closed 9 years ago
A short code is registered exactly like any other short code in WordPress.
The purpose of this extension is mostly to show how to build a good EDD extension, not how to build a standard WP plugin. For that reason, I do not see a need to show a sample short code.
I would ask you to reconsider: I have never heard anyone say "this code sample is too clear" or "there are too many examples of how to do what I'm trying to do." Per your own goal, you should demonstrate how to register an example shortcode using the appropriate classnames or namespaces. It would only help developers using this boiler plate to include an example of what might sensibly belong in that file, e.g.
add_shortcode('my_shortcode', 'EDD_MyClassname::my_shortcode');
An example is better than documentation.
Fair enough. Since this is @ghost1227's pet project, I'll let him make the final decision.
I'm going to side with @pippinsplugins on this one. The purpose of the extension boilerplate was to standardize the basic framework used in EDD extension development, not document overall WordPress development best practices.
The boilerplate would be more thorough if some sample shortcodes were included, even if they were commented out -- seeing the syntax is important.