awesomemotive / EDD-Extension-Boilerplate

A foundation for EDD extension development that aims to provide a standardized guide for building extensions.
49 stars 16 forks source link

Enhancement: sample shortcodes #11

Closed fireproofsocks closed 9 years ago

fireproofsocks commented 9 years ago

The boilerplate would be more thorough if some sample shortcodes were included, even if they were commented out -- seeing the syntax is important.

pippinsplugins commented 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.

fireproofsocks commented 9 years ago

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.

pippinsplugins commented 9 years ago

Fair enough. Since this is @ghost1227's pet project, I'll let him make the final decision.

evertiro commented 9 years ago

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.