A plugin to display one or a list of your Giving Circles from the Pure Charity app.
IMPORTANT: At this time the plugin requires a name change after extracting from Github. After downloading the source code from Github unzip the files and rename the folder /purecharity-wp-givingcircles and compress as purecharity-wp-givingcircles.zip if you plan to use the Wordpress plugin installer via upload.
In order to install the plugin:
- Copy the
/purecharity-wp-givingcirles
folder to the/wp-content/plugins
on your WP install - Activate the plugin through the ‘Plugins’ menu in WordPress
- You’re done!
Function:
pc_giving_circles()
Returns:
A Giving Circle Object
Return Object Attributes:
name
- stringmembers_count
- stringprofile
- objectabout
- stringlives_impacted
- intcover
- string(image_url)avatar
- string(image_url)
total_donations
- stringslug
- string
Example (show a list of giving circles with name and members_count in a page):
<?php $gc_list = pc_giving_circles(); ?>
<ul>
<?php foreach($gc_list as $gc){ ?>
<li>
<?php echo $gc->name ?>
<small><?php echo $gc->members_count ?></small>
</li>
<?php } ?>
</ul>
Function:
pc_giving_circle($slug)
Parameters:
- $slug - The slug of the giving circle you want to fetch.
Returns:
A Giving Circle Object
Return Object Attributes:
name
- stringabout
- stringprofile
- objectabout
- stringlives_impacted
- intcover
- string(image url)avatar
- string(image url)
founder
- objectname
- stringprofile_url
- stringavatar
- string(image url)
organizers
- array of objectsname
- stringprofile_url
- stringavatar
- string(image url)
membership_status
- stringminimum_monthly_donation
- stringbacked_causes
- array of objectsname
- stringurl
- stringamount_donated
- stringlocation
- stringavatar
- string(image_url)
total_donations
- stringmembers
- array of objectsname
- stringprofile_url
- stringavatar
- string(image url)
join_url
- string
Example (show a giving circle's name and members_count in a page):
<?php $gc = pc_giving_circle('my-giving-circle'); ?>
<h1>
<?php echo $gc->name ?>
<small><?php echo count($gc->members) ?></small>
</h1>
[giving_circles members_limit=10 backed_limit=10]
Possible parameters:
members_limit
- (optional) Defaults to infinite. The number of members to showbacked_limit
- (optional) Defaults to infinite. The number of backed causes to show
[giving_circle_info slug=my-gc type=info_type]
Available Types:
members_count
- Stringamount_donated
- Money formatted Stringmember_avatars
- Unordered list with the avatars of all the giving circle members
The Pure Charity Giving Circles includes the following files:
.gitignore
. Used to exclude certain files from the repository.ChangeLog.md
. The list of changes to the core project.README.md
. The file that you’re currently reading.- A
purecharity-wp-givingcircles
subdirectory that contains the source code - a fully executable WordPress plugin.
- The Plugin is based on the Plugin API, Coding Standards, and Documentation Standards.
The Giving Circles plugin requires the Pure Charity Base Plugin
TODO.
TODO.