Skip to content

Instantly share code, notes, and snippets.

@strangerstudios
Created May 31, 2016 14:32
Show Gist options
  • Save strangerstudios/34c232e8285e490ed50b150d225b200d to your computer and use it in GitHub Desktop.
Save strangerstudios/34c232e8285e490ed50b150d225b200d to your computer and use it in GitHub Desktop.
PMPro phpDoc Examples
<?php
//phpDoc for new PMPro function
/**
* A description of what the function does.
*
* @param {array, string, int, objext} {$variable_name} {Short description}
* @return {array, string, int, mixed, object} {$variable_name} {Short description}
*
* {@internal Any To-Dos etc.}
*
* @since {next version of PMPro}
*/
function example_function($param1) {
if($param1 == 'test')
return true;
else
return false;
}
//phpDoc for new filter
/**
* Description of the filter.
*
* @param {array, string, int, objext} {$variable_name} {Short description}
* @param {array, string, int, objext} {$variable_name} {Short description}
*
* @since 1.8.5
*/
$r = apply_filters('pmpro_example_filter', $r, $param);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment