Created
February 19, 2015 12:57
-
-
Save strangerstudios/2a9f1922ff8cafd0222b to your computer and use it in GitHub Desktop.
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 | |
/* | |
PMPro Reports Extras | |
Title: pmpro_reports_extras | |
Slug: pmpro_reports_extras | |
For each report, add a line like: | |
global $pmpro_reports; | |
$pmpro_reports['slug'] = 'Title'; | |
For each report, also write two functions: | |
* pmpro_report_{slug}_widget() to show up on the report homepage. | |
* pmpro_report_{slug}_page() to show up when users click on the report page widget. | |
*/ | |
global $pmpro_reports; | |
$pmpro_reports['sample'] = __('My Sample Report', 'pmpro-reports-extras'); | |
function pmpro_report_sample_widget() | |
{ | |
?> | |
<p>Hi! I'm a sample report!</p> | |
<?php | |
} | |
function pmpro_report_sample_page() | |
{ | |
?> | |
<h2> | |
<?php _e('This is a Sample', 'pmpro-reports-extras');?> | |
</h2> | |
<p>This report demonstrates how to add a custom report to PMPro. Enjoy!.</p> | |
<hr /> | |
<?php | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment