Exemple #1
0
/**
 * Loads BP Reply By Email only if BuddyPress is activated
 */
function bp_rbe_init()
{
    global $bp_rbe;
    require BP_RBE_DIR . '/bp-rbe-core.php';
    // initialize!
    $bp_rbe = new BP_Reply_By_Email();
    $bp_rbe->init();
    // admin area
    if (is_admin()) {
        require BP_RBE_DIR . '/includes/bp-rbe-admin.php';
        new BP_Reply_By_Email_Admin();
    }
}
 /**
  * Get an array of available inbound providers.
  *
  * @since 1.0-RC3
  *
  * @return array Key/value pairs (provider internal name => provider display name)
  */
 protected function get_inbound_providers()
 {
     $retval = array();
     foreach (BP_Reply_By_Email::get_inbound_providers() as $provider => $class) {
         $prop = new ReflectionProperty($class, 'name');
         if ($prop->isStatic()) {
             $retval[$provider] = $class::$name;
         } else {
             $retval[$provider] = ucfirst($provider);
         }
     }
     unset($prop, $provider, $class);
     return $retval;
 }