Skip to content

Instantly share code, notes, and snippets.

@strangerstudios
Created May 7, 2014 21:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save strangerstudios/8232f9d167694f08b7e6 to your computer and use it in GitHub Desktop.
Save strangerstudios/8232f9d167694f08b7e6 to your computer and use it in GitHub Desktop.
Add our methods to the WordPress XMLRPC API. Each method points to a callback function to handle it.
<?php
/**
* Define the XMLRPC Methods We Add
* Since v2.0
*/
add_filter('xmlrpc_methods', 'pmpro_xmlrpc_methods');
function pmpro_xmlrpc_methods($methods)
{
$methods['pmpro.getMembershipLevelForUser'] = 'pmpro_xmlrpc_getMembershipLevelForUser';
$methods['pmpro.hasMembershipAccess'] = 'pmpro_xmlrpc_hasMembershipAccess';
return $methods;
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment