-
-
Save pbrocks/b0e7a725a8e36d83f69cd9e11cab01ed to your computer and use it in GitHub Desktop.
PMPro phpDoc Examples
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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