Exemplo n.º 1
0
 function do_subscriptionbutton_shortcode($atts, $content = null, $code = "")
 {
     global $wp_query, $M_options;
     $defaults = array("holder" => '', "holderclass" => '', "item" => '', "itemclass" => '', "postfix" => '', "prefix" => '', "wrapwith" => '', "wrapwithclass" => '', "subscription" => '', "color" => 'blue', 'buttontext' => __('Subscribe', 'membership'));
     extract(shortcode_atts($defaults, $atts));
     if (isset($M_options['formtype']) && $M_options['formtype'] == 'new') {
         // pop up form
         $link = admin_url('admin-ajax.php');
         $link .= '?action=buynow&subscription=' . (int) $subscription;
         $class = 'popover';
     } else {
         // original form
         $link = M_get_registration_permalink();
         $link .= '?action=registeruser&subscription=' . (int) $subscription;
         $class = '';
     }
     if (empty($content)) {
         $content = $buttontext;
     }
     $html = "<a href='" . $link . "' class='popover button " . $color . "'>" . $content . "</a>";
     //$html = do_shortcode("[button class='popover' link='{$link}']Buy Now[/button]");
     return $html;
 }
Exemplo n.º 2
0
function M_overrideBPSignupSlug($slug)
{
    $permalink = M_get_registration_permalink();
    if (!empty($permalink)) {
        return basename($permalink);
    } else {
        return $slug;
    }
}
 function complex_upgrade_button($pricing, $subscription, $user_id, $fromsub_id = false)
 {
     $form = '<a class="button" href="' . M_get_registration_permalink() . '?action=registeruser&subscription=' . $subscription->id . '">' . __('Upgrade', 'membership') . '</a>';
     echo $form;
 }
Exemplo n.º 4
0
function M_overrideBPSignupSlug($slug)
{
    $permalink = M_get_registration_permalink();
    return !empty($permalink) ? basename($permalink) : $slug;
}