Developer’s Intro to MashShare
MashShare Share Buttons has been built with developers in mind, which means that all of the code is well laid out, organized, easy to read, and documented. The source code for MASHSB is also highly extensible, which makes it extremely easy for developers to hook in their own pieces of functionality, or modify existing parts.
If you are looking to do development on MASHSB , either by contributing to the core plugin or by creating extensions, there are a few things you should familiarize yourself with before you begin.
Github - Bug and Enhancement Tracking
The entire source for MashShare is available on Github, and this is also where all main bug / enhancement tracking takes place. If you have developer-specific questions, it is best to create an Issue. If you have an enhancement you would like to propose, Github is also the place to post it.
Organization
MASHSB's source code is organized into separate, meaningfully named files. For example, all functions that relate to shares are placed in a file called "sharecount -functions.php". If you plan to do development work on MASHSB, then you are expected to follow the organization and naming convention that is already in place.
Function and Class Naming
Organization is one of the most important, but an equally important key to remember is naming. All functions, without exception, are prefixed with mashsb_. This helps us ensure we do not create functions with conflicting names with other plugins or themes. For example, do not create a function named like this:
function get_custom_sharecount(){// do stuff here}
Do this instead:
function mashsb_get_custom_sharecount(){// do stuff here}
You should also take care to ensure you have named your function appropriately, and that a function does not already exist to do what you need.
Classes should follow the same rules.
Follow WordPress Standards
We work hard to make sure MASHSB follows the best coding standards, and we expect you to do the same. If you need assistance on learning some of the standards we expect of you, please consult the official WordPress Coding Standards codex.
Submitting Your Code
If you have written an add-on, contact Rene to discuss getting it listed and possibly selling it on the site. If you are making a contribution to the core source code, please submit a Pull Request on the plugin's Github page.