当前位置: 首页>>代码示例>>PHP>>正文


PHP pmpro_getLevelExpiration函数代码示例

本文整理汇总了PHP中pmpro_getLevelExpiration函数的典型用法代码示例。如果您正苦于以下问题:PHP pmpro_getLevelExpiration函数的具体用法?PHP pmpro_getLevelExpiration怎么用?PHP pmpro_getLevelExpiration使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了pmpro_getLevelExpiration函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _x

    if (pmpro_isLevelTrial($level)) {
        if ($level->trial_amount == '0.00') {
            if ($level->trial_limit == '1') {
                echo ' ' . _x('After your initial payment, your first payment is Free.', 'Trial payment in cost text generation.', 'pmpro');
            } else {
                printf(' ' . _x('After your initial payment, your first %d payments are Free.', 'Trial payment in cost text generation.', 'pmpro'), $level->trial_limit);
            }
        } else {
            if ($level->trial_limit == '1') {
                printf(' ' . _x('After your initial payment, your first payment will cost %s.', 'Trial payment in cost text generation.', 'pmpro'), $pmpro_currency_symbol . $level->trial_amount);
            } else {
                printf(' ' . _x('After your initial payment, your first %d payments will cost %s.', 'Trial payment in cost text generation. E.g. ... first 2 payments will cost $5', 'pmpro'), $level->trial_limit, $pmpro_currency_symbol . $level->trial_amount);
            }
        }
    }
    $expiration_text = pmpro_getLevelExpiration($level);
    if ($expiration_text) {
        ?>
          <br /><span class="pmpro_level-expiration"><?php 
        echo $expiration_text;
        ?>
</span>
        <?php 
    }
    ?>
					
				<div class="pmpro-price">
					<p class="lead">
					<?php 
    if (pmpro_isLevelFree($level) || $level->initial_payment === "0.00") {
        ?>
开发者ID:6226,项目名称:wp,代码行数:31,代码来源:levels.php

示例2: printf

				<div id="pmpro_level_cost">
					<?php 
if ($discount_code && pmpro_checkDiscountCode($discount_code)) {
    ?>
						<?php 
    printf(__('<p class="pmpro_level_discount_applied">The <strong>%s</strong> code has been applied to your order.</p>', 'pmpro'), $discount_code);
    ?>
					<?php 
}
?>
					<?php 
echo wpautop(pmpro_getLevelCost($pmpro_level));
?>
					<?php 
echo wpautop(pmpro_getLevelExpiration($pmpro_level));
?>
				</div>

				<?php 
do_action("pmpro_checkout_after_level_cost");
?>

				<?php 
if ($pmpro_show_discount_code) {
    ?>

					<?php 
    if ($discount_code && !$pmpro_review) {
        ?>
						<p id="other_discount_code_p" class="pmpro_small"><a id="other_discount_code_a" href="#discount_code"><?php 
开发者ID:mathieuhays,项目名称:paid-memberships-pro,代码行数:30,代码来源:checkout.php

示例3: _e

_e('Click here to change your discount code', 'pmpro');
?>
</a>.');
		jQuery('#other_discount_code_p').show();
		
		jQuery('#other_discount_code_a').click(function() {
			jQuery('#other_discount_code_tr').show();
			jQuery('#other_discount_code_p').hide();			
		});
		
		jQuery('#pmpro_level_cost').html('<p><?php 
printf(__('The <strong>%s</strong> code has been applied to your order.', 'pmpro'), $discount_code);
?>
</p><p><?php 
echo pmpro_no_quotes(pmpro_getLevelCost($code_level), array('"', "'", "\n", "\r"));
echo pmpro_no_quotes(pmpro_getLevelExpiration($code_level), array('"', "'", "\n", "\r"));
?>
</p>');
		
		<?php 
//tell gateway javascripts whether or not to fire (e.g. no Stripe on free levels)
if (pmpro_isLevelFree($code_level)) {
    ?>
				pmpro_require_billing = false;
			<?php 
} else {
    ?>
				pmpro_require_billing = true;
			<?php 
}
//hide/show billing
开发者ID:AmpleTech,项目名称:paid-memberships-pro,代码行数:31,代码来源:applydiscountcode.php

示例4: memberlite_levels_shortcode


//.........这里部分代码省略.........
                if (!empty($level_page)) {
                    ?>
								<p><a href="<?php 
                    echo get_permalink($level_page->ID);
                    ?>
"><?php 
                    echo $more_button;
                    ?>
</a></p>
								<?php 
                }
                ?>
					</td>
					<?php 
                if (!empty($show_price)) {
                    ?>
					<td>
						<?php 
                    if ($price === 'full') {
                        echo memberlite_getLevelCost($level, true, false);
                    } else {
                        echo memberlite_getLevelCost($level, true, true);
                    }
                    ?>
					</td>
					<?php 
                }
                ?>
					<?php 
                if (!empty($expiration)) {
                    ?>
							<td>
							<?php 
                    $level_expiration = pmpro_getLevelExpiration($level);
                    if (empty($level_expiration)) {
                        _e('Membership Never Expires.', 'pmpro');
                    } else {
                        echo $level_expiration;
                    }
                    ?>
							</td>
							<?php 
                }
                ?>
					<td>
					<?php 
                if (empty($current_user->membership_level->ID)) {
                    ?>
						<a class="pmpro_btn pmpro_btn-select" href="<?php 
                    echo pmpro_url("checkout", "?level=" . $level->id, "https");
                    ?>
"><?php 
                    echo $checkout_button;
                    ?>
</a>
					<?php 
                } elseif (!$current_level) {
                    ?>
                	
						<a class="pmpro_btn pmpro_btn-select" href="<?php 
                    echo pmpro_url("checkout", "?level=" . $level->id, "https");
                    ?>
"><?php 
                    echo $checkout_button;
                    ?>
</a>
开发者ID:greathmaster,项目名称:memberlite,代码行数:67,代码来源:levels.php

示例5: getLevels

function getLevels()
{
    global $current_user;
    if ($current_user->ID) {
        $current_user->membership_level = pmpro_getMembershipLevelForUser($current_user->ID);
    }
    //is there a default level to redirect to?
    if (defined("PMPRO_DEFAULT_LEVEL")) {
        $default_level = intval(PMPRO_DEFAULT_LEVEL);
    } else {
        $default_level = false;
    }
    if ($default_level) {
        wp_redirect(pmpro_url("checkout", "?level=" . $default_level));
        exit;
    }
    global $wpdb, $pmpro_msg, $pmpro_msgt;
    if (isset($_REQUEST['msg'])) {
        if ($_REQUEST['msg'] == 1) {
            $pmpro_msg = __('Your membership status has been updated - Thank you!', 'pmpro');
        } else {
            $pmpro_msg = __('Sorry, your request could not be completed - please try again in a few moments.', 'pmpro');
            $pmpro_msgt = "pmpro_error";
        }
    } else {
        $pmpro_msg = false;
    }
    global $pmpro_levels;
    $pmpro_levels = pmpro_getAllLevels(false, true);
    $pmpro_levels = apply_filters("pmpro_levels_array", $pmpro_levels);
    if ($pmpro_msg) {
        ?>
        <div class="pmpro_message <?php 
        echo $pmpro_msgt;
        ?>
"><?php 
        echo $pmpro_msg;
        ?>
</div>
        <?php 
    }
    ?>

    <div id="main" class="site-main clr">
        <div id="membership-wrapper"> 
            <?php 
    $count = 0;
    $count_levels = count($pmpro_levels);
    $tmp = 0;
    foreach ($pmpro_levels as $level) {
        if (isset($current_user->membership_level->ID)) {
            $current_level = $current_user->membership_level->ID == $level->id;
        } else {
            $current_level = false;
        }
        ?>

                <?php 
        $last = $count_levels - $tmp;
        ?>
  
                <?php 
        $tmp = $tmp + 1;
        ?>

                <div class="box-level <?php 
        if ($count++ % 2 == 0) {
            ?>
odd<?php 
        } else {
            ?>
 even<?php 
        }
        if ($current_level == $level) {
            ?>
 active<?php 
        }
        if ($last == 2 || $last == 1) {
            ?>
 last-box<?php 
        }
        ?>
">
                    <h1><?php 
        echo $current_level ? "<strong>{$level->name}</strong>" : $level->name;
        ?>
</h1>
                    <div class="copy">
                        <?php 
        if (pmpro_isLevelFree($level)) {
            $cost_text = "<strong>Free</strong>";
        } else {
            $cost_text = pmpro_getLevelCost($level, true, true);
        }
        $expiration_text = pmpro_getLevelExpiration($level);
        if (!empty($cost_text) && !empty($expiration_text)) {
            echo $cost_text . "<br />" . $expiration_text;
        } elseif (!empty($cost_text)) {
            echo $cost_text;
        } elseif (!empty($expiration_text)) {
//.........这里部分代码省略.........
开发者ID:TakenCdosG,项目名称:admissionsrevolution_new,代码行数:101,代码来源:shortcode.php

示例6: apply_filters

	<tbody>                
		<tr>
			<td>				
				<p>You have selected the <strong><?php echo $pmpro_level->name?></strong> membership level.</p>
				
				<?php
					if(!empty($pmpro_level->description))
						echo apply_filters("the_content", stripslashes($pmpro_level->description));
				?>
				
				<p id="pmpro_level_cost">
					<?php if($discount_code && pmpro_checkDiscountCode($discount_code)) { ?>
						The <strong><?php echo $discount_code?></strong> code has been applied to your order.
					<?php } ?>
					<?php echo pmpro_getLevelCost($pmpro_level)?>
					<?php echo pmpro_getLevelExpiration($pmpro_level)?>
				</p>
				
				<?php do_action("pmpro_checkout_after_level_cost"); ?>				
				
				<?php if($pmpro_show_discount_code) { ?>
				
					<?php if($discount_code && !$pmpro_review) { ?>
						<p id="other_discount_code_p" class="pmpro_small"><a id="other_discount_code_a" href="#discount_code">Click here to change your discount code</a>.</p>
					<?php } elseif(!$pmpro_review) { ?>
						<p id="other_discount_code_p" class="pmpro_small">Do you have a discount code? <a id="other_discount_code_a" href="#discount_code">Click here to enter your discount code</a>.</p>
					<?php } elseif($pmpro_review && $discount_code) { ?>
						<p><strong>Discount Code:</strong> <?php echo $discount_code?></p>
					<?php } ?>
				
				<?php } ?>
开发者ID:Jtgadbois,项目名称:Pedadida,代码行数:31,代码来源:checkout.php


注:本文中的pmpro_getLevelExpiration函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。