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


PHP pmpro_getClassForField函数代码示例

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


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

示例1: esc_attr

            ?>
</label>
								<input class="input" id="CVV"
								       <?php 
            if ($gateway != "stripe" && $gateway != "braintree") {
                ?>
name="CVV"<?php 
            }
            ?>
								       type="text" size="4" value="<?php 
            if (!empty($_REQUEST['CVV'])) {
                echo esc_attr($_REQUEST['CVV']);
            }
            ?>
" class=" <?php 
            echo pmpro_getClassForField("CVV");
            ?>
"
								       <?php 
            if ($gateway == "braintree") {
                ?>
data-encrypted-name="cvv"<?php 
            }
            ?>
 />
								<small>(<a href="javascript:void(0);"
								           onclick="javascript:window.open('<?php 
            echo pmpro_https_filter(PMPRO_URL);
            ?>
/pages/popup-cvv.html','cvv','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=600, height=475');"><?php 
            _ex("what's this?", 'link to CVV help', 'vibe');
开发者ID:inetbiz,项目名称:wordpress-lms,代码行数:31,代码来源:billing.php

示例2: _e

</a>)</small>
					</div>
					<?php 
    }
    ?>

					<?php 
    if ($pmpro_show_discount_code) {
        ?>
					<div class="pmpro_payment-discount-code">
						<label for="discount_code"><?php 
        _e('Discount Code', 'pmpro');
        ?>
</label>
						<input class="input <?php 
        echo pmpro_getClassForField("discount_code");
        ?>
" id="discount_code" name="discount_code" type="text" size="20" value="<?php 
        echo esc_attr($discount_code);
        ?>
" />
						<input type="button" id="discount_code_button" name="discount_code_button" value="<?php 
        _e('Apply', 'pmpro');
        ?>
" />
						<p id="discount_code_message" class="pmpro_message" style="display: none;"></p>
					</div>
					<?php 
    }
    ?>
开发者ID:mathieuhays,项目名称:paid-memberships-pro,代码行数:30,代码来源:checkout.php

示例3: displayAtCheckout

    function displayAtCheckout()
    {
        global $current_user;
        //value passed yet?
        if (isset($_REQUEST[$this->name])) {
            $value = $_REQUEST[$this->name];
        } elseif (isset($_SESSION[$this->name])) {
            //file or value?
            if (is_array($_SESSION[$this->name])) {
                $_FILES[$this->name] = $_SESSION[$this->name];
                $this->file = $_SESSION[$this->name]['name'];
                $value = $_SESSION[$this->name]['name'];
            } else {
                $value = $_SESSION[$this->name];
            }
        } elseif (!empty($current_user->ID) && metadata_exists("user", $current_user->ID, $this->name)) {
            $meta = get_user_meta($current_user->ID, $this->name, true);
            if (is_array($meta) && !empty($meta['filename'])) {
                $this->file = get_user_meta($current_user->ID, $this->name, true);
                $value = $this->file['filename'];
            } else {
                $value = $meta;
            }
        } elseif (!empty($this->value)) {
            $value = $this->value;
        } else {
            $value = "";
        }
        //update class value
        $this->class .= " " . pmpro_getClassForField($this->name);
        ?>
			<div id="<?php 
        echo $this->id;
        ?>
_div" <?php 
        if (!empty($this->divclass)) {
            echo 'class="' . $this->divclass . '"';
        }
        ?>
>
				<?php 
        if (!empty($this->showmainlabel)) {
            ?>
					<label for="<?php 
            echo esc_attr($this->name);
            ?>
"><?php 
            echo $this->label;
            ?>
</label>
					<?php 
            if (!empty($this->required) && !empty($this->showrequired) && $this->showrequired === 'label') {
                ?>
<span class="pmpro_asterisk"> *</span><?php 
            }
            ?>
					<?php 
            $this->display($value);
            ?>
				<?php 
        } else {
            ?>
					<div class="leftmar">
						<?php 
            $this->display($value);
            ?>
					</div>
				<?php 
        }
        ?>
				
				<?php 
        if (!empty($this->hint)) {
            ?>
					<div class="leftmar"><small class="lite"><?php 
            echo $this->hint;
            ?>
</small></div>
				<?php 
        }
        ?>
			</div>	
			<?php 
        $this->getDependenciesJS();
    }
开发者ID:audiblePi,项目名称:fccTest,代码行数:85,代码来源:class.field.php

示例4: pmpro_include_payment_information_fields

    /**
     * Use our own payment fields at checkout. (Remove the name attributes and set some data-encrypted-name attributes.)
     * @since 1.8
     */
    static function pmpro_include_payment_information_fields($include)
    {
        //global vars
        global $pmpro_requirebilling, $pmpro_show_discount_code, $discount_code, $CardType, $AccountNumber, $ExpirationMonth, $ExpirationYear;
        //get accepted credit cards
        $pmpro_accepted_credit_cards = pmpro_getOption("accepted_credit_cards");
        $pmpro_accepted_credit_cards = explode(",", $pmpro_accepted_credit_cards);
        $pmpro_accepted_credit_cards_string = pmpro_implodeToEnglish($pmpro_accepted_credit_cards);
        //include ours
        ?>
			<table id="pmpro_payment_information_fields" class="pmpro_checkout top1em" width="100%" cellpadding="0" cellspacing="0" border="0" <?php 
        if (!$pmpro_requirebilling || apply_filters("pmpro_hide_payment_information_fields", false)) {
            ?>
style="display: none;"<?php 
        }
        ?>
>
			<thead>
				<tr>
					<th>
						<span class="pmpro_thead-name"><?php 
        _e('Payment Information', 'pmpro');
        ?>
</span>
						<span class="pmpro_thead-msg"><?php 
        printf(__('We Accept %s', 'pmpro'), $pmpro_accepted_credit_cards_string);
        ?>
</span>
					</th>
				</tr>
			</thead>
			<tbody>                    
				<tr valign="top">		
					<td>	
						<?php 
        $sslseal = pmpro_getOption("sslseal");
        if ($sslseal) {
            ?>
								<div class="pmpro_sslseal"><?php 
            echo stripslashes($sslseal);
            ?>
</div>
							<?php 
        }
        ?>
						<?php 
        $pmpro_include_cardtype_field = apply_filters('pmpro_include_cardtype_field', true);
        if ($pmpro_include_cardtype_field) {
            ?>
							<div class="pmpro_payment-card-type">
								<label for="CardType"><?php 
            _e('Card Type', 'pmpro');
            ?>
</label>
								<select id="CardType" name="CardType" class=" <?php 
            echo pmpro_getClassForField("CardType");
            ?>
">
									<?php 
            foreach ($pmpro_accepted_credit_cards as $cc) {
                ?>
										<option value="<?php 
                echo $cc;
                ?>
" <?php 
                if ($CardType == $cc) {
                    ?>
selected="selected"<?php 
                }
                ?>
><?php 
                echo $cc;
                ?>
</option>
									<?php 
            }
            ?>
												
								</select> 
							</div>
						<?php 
        }
        ?>
					
						<div class="pmpro_payment-account-number">
							<label for="AccountNumber"><?php 
        _e('Card Number', 'pmpro');
        ?>
</label>
							<input id="AccountNumber" name="AccountNumber" class="input <?php 
        echo pmpro_getClassForField("AccountNumber");
        ?>
" type="text" size="25" value="<?php 
        echo esc_attr($AccountNumber);
        ?>
" data-encrypted-name="number" autocomplete="off" /> 
//.........这里部分代码省略.........
开发者ID:uwmadisoncals,项目名称:Cluster-Plugins,代码行数:101,代码来源:class.pmprogateway_braintree.php

示例5: pmpro_include_payment_information_fields

    /**
     * Use our own payment fields at checkout. (Remove the name attributes.)		
     * @since 1.8
     */
    static function pmpro_include_payment_information_fields($include)
    {
        //global vars
        global $pmpro_requirebilling, $pmpro_show_discount_code, $discount_code, $CardType, $AccountNumber, $ExpirationMonth, $ExpirationYear;
        //get accepted credit cards
        $pmpro_accepted_credit_cards = pmpro_getOption("accepted_credit_cards");
        $pmpro_accepted_credit_cards = explode(",", $pmpro_accepted_credit_cards);
        $pmpro_accepted_credit_cards_string = pmpro_implodeToEnglish($pmpro_accepted_credit_cards);
        //include ours
        ?>
			<table id="pmpro_payment_information_fields" class="pmpro_checkout top1em" width="100%" cellpadding="0" cellspacing="0" border="0" <?php 
        if (!$pmpro_requirebilling || apply_filters("pmpro_hide_payment_information_fields", false)) {
            ?>
style="display: none;"<?php 
        }
        ?>
>
			<thead>
				<tr>
					<th><span class="pmpro_thead-msg"><?php 
        printf(__('We Accept %s', 'pmpro'), $pmpro_accepted_credit_cards_string);
        ?>
</span><?php 
        _e('Payment Information', 'pmpro');
        ?>
</th>
				</tr>
			</thead>
			<tbody>
				<tr valign="top">
					<td>
						<?php 
        $sslseal = pmpro_getOption("sslseal");
        if ($sslseal) {
            ?>
								<div class="pmpro_sslseal"><?php 
            echo stripslashes($sslseal);
            ?>
</div>
							<?php 
        }
        ?>
						<?php 
        $pmpro_include_cardtype_field = apply_filters('pmpro_include_cardtype_field', false);
        if ($pmpro_include_cardtype_field) {
            ?>
							<div class="pmpro_payment-card-type">
								<label for="CardType"><?php 
            _e('Card Type', 'pmpro');
            ?>
</label>
								<select id="CardType" class=" <?php 
            echo pmpro_getClassForField("CardType");
            ?>
">
									<?php 
            foreach ($pmpro_accepted_credit_cards as $cc) {
                ?>
										<option value="<?php 
                echo $cc;
                ?>
" <?php 
                if ($CardType == $cc) {
                    ?>
selected="selected"<?php 
                }
                ?>
><?php 
                echo $cc;
                ?>
</option>
									<?php 
            }
            ?>
								</select>
							</div>
						<?php 
        } else {
            ?>
							<input type="hidden" id="CardType" name="CardType" value="<?php 
            echo esc_attr($CardType);
            ?>
" />
							<script>
								<!--
								jQuery(document).ready(function() {
										jQuery('#AccountNumber').validateCreditCard(function(result) {
											var cardtypenames = {
												"amex":"American Express",
												"diners_club_carte_blanche":"Diners Club Carte Blanche",
												"diners_club_international":"Diners Club International",
												"discover":"Discover",
												"jcb":"JCB",
												"laser":"Laser",
												"maestro":"Maestro",
												"mastercard":"Mastercard",
//.........这里部分代码省略.........
开发者ID:TakenCdosG,项目名称:admissionsrevolution_new,代码行数:101,代码来源:class.pmprogateway_stripe.php

示例6: pmproan2c_pmpro_checkout_after_email

function pmproan2c_pmpro_checkout_after_email()
{
    global $pmpro_required_user_fields;
    $pmpro_required_user_fields["first_name"] = "";
    $pmpro_required_user_fields["last_name"] = "";
    $pmpro_required_user_fields["country"] = "";
    $pmpro_required_user_fields["state"] = "";
    $pmpro_required_user_fields["city"] = "";
    $pmpro_required_user_fields["address"] = "";
    $pmpro_required_user_fields["zipcode"] = "";
    $pmpro_required_user_fields["phone"] = "";
    $first_name = get_field_value("first_name");
    $last_name = get_field_value("last_name");
    $country = get_field_value("country");
    $state = get_field_value("state");
    $city = get_field_value("city");
    $address = get_field_value("address");
    $zipcode = get_field_value("zipcode");
    $phone = get_field_value("phone");
    $country_code = get_field_value("country_code");
    if ($phone) {
        $phoneUtil = \libphonenumber\PhoneNumberUtil::getInstance();
        try {
            $numberProto = $phoneUtil->parse($phone, strtoupper($country_code));
            $phone = $phoneUtil->format($numberProto, \libphonenumber\PhoneNumberFormat::INTERNATIONAL);
        } catch (\libphonenumber\NumberParseException $e) {
            //var_dump($e);
        }
    }
    ?>

	<div>
		<label for="first_name">First Name</label>
		<input
			id="first_name"
			name="first_name"
			type="text"
			class="input pmpro_required <?php 
    echo pmpro_getClassForField('first_name');
    ?>
"
			size="30"
			value="<?php 
    echo $first_name;
    ?>
" />
	</div>

	<div>
		<label for="last_name">Last Name</label>
		<input
			id="last_name"
			name="last_name"
			type="text"
			class="input pmpro_required <?php 
    echo pmpro_getClassForField('last_name');
    ?>
"
			size="30"
			value="<?php 
    echo $last_name;
    ?>
" />
	</div>

	<div>
		<label for="country">Country</label>
		<select
			id="country"
			name="country"
			class="input pmpro_required <?php 
    echo pmpro_getClassForField('country');
    ?>
">
			<?php 
    echo get_countries($country);
    ?>
		</select>
	</div>

	<div>
		<label for="state">State</label>
		<input
			id="state"
			name="state"
			type="text"
			class="input pmpro_required <?php 
    echo pmpro_getClassForField('state');
    ?>
"
			size="30"
			value="<?php 
    echo $state;
    ?>
" />
	</div>

	<div>
		<label for="city">City</label>
		<input
//.........这里部分代码省略.........
开发者ID:aaronfrey,项目名称:PepperLillie-TAT,代码行数:101,代码来源:pmpro-add-extra-fields-to-checkout.php

示例7: apply_filters

					$pmpro_show_cvv = apply_filters("pmpro_show_cvv", true);
					if($pmpro_show_cvv)
					{
				?>
				<div>
					<label for="CVV">CVV</label>
					<input class="input" id="CVV" <?php if($gateway != "stripe" && $gateway != "braintree") { ?>name="CVV"<?php } ?> type="text" size="4" value="<?php if(!empty($_REQUEST['CVV'])) { echo esc_attr($_REQUEST['CVV']); }?>" class=" <?php echo pmpro_getClassForField("CVV");?>" <?php if($gateway == "braintree") { ?>data-encrypted-name="cvv"<?php } ?> />  <small>(<a href="javascript:void(0);" onclick="javascript:window.open('<?php echo pmpro_https_filter(PMPRO_URL)?>/pages/popup-cvv.html','cvv','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=600, height=475');">what's this?</a>)</small>
				</div>
				<?php
					}
				?>
				
				<?php if($pmpro_show_discount_code) { ?>
				<div>
					<label for="discount_code">Discount Code</label>
					<input class="input <?php echo pmpro_getClassForField("discount_code");?>" id="discount_code" name="discount_code" type="text" size="20" value="<?php echo esc_attr($discount_code)?>" />
					<input type="button" id="discount_code_button" name="discount_code_button" value="Apply" />
					<p id="discount_code_message" class="pmpro_message" style="display: none;"></p>
				</div>
				<?php } ?>
				
			</td>			
		</tr>
	</tbody>
	</table>	
	<script>
		//checking a discount code
		jQuery('#discount_code_button').click(function() {
			var code = jQuery('#discount_code').val();
			var level_id = jQuery('#level').val();
												
开发者ID:Jtgadbois,项目名称:Pedadida,代码行数:30,代码来源:checkout.php

示例8: _e

					<?php 
if (pmpro_getCurrencyPosition() == "right") {
    echo $pmpro_currency_symbol;
}
?>
				</td>
			</tr>						
			
			<tr>
				<th scope="row" valign="top"><label for="order_notes"><?php 
_e('Order Notes', 'pmpro');
?>
:</label></th>
				<td>
					<textarea name="order_notes" id="order_notes" rows="5" cols="80" class="<?php 
echo pmpro_getClassForField("order_notes");
?>
"><?php 
echo esc_textarea($order_notes);
?>
</textarea>
				</td>
			</tr>			
		</tbody>
		</table>
		<div>
			<input type="hidden" name="action" value="add_member" />
			<?php 
submit_button('Add Member');
?>
		</div>
开发者ID:hbrock25,项目名称:pmpro-add-member-admin,代码行数:31,代码来源:addmember.php

示例9: pmprorh_register_form_shortcode

function pmprorh_register_form_shortcode($atts, $content = null, $code = "")
{
    // $atts    ::= array of attributes
    // $content ::= text within enclosing form of shortcode element
    // $code    ::= the shortcode found, when == callback name
    // examples: [pmprorh_register_form]
    /*
    extract(shortcode_atts(array(
    	'level' => NULL
    ), $atts));
    */
    if (!empty($_REQUEST['wp-submit'])) {
        $user_login = $_REQUEST['user_login'];
        $user_email = $_REQUEST['user_email'];
    } else {
        $user_login = "";
        $user_email = "";
    }
    global $current_user, $pmpro_msg, $pmpro_msgt, $pmprorh_options;
    ob_start();
    ?>
	
<form name="registerform" id="registerform" action="" method="post">
	<?php 
    if ($pmpro_msg) {
        ?>
		<div id="pmpro_message" class="pmpro_message <?php 
        echo $pmpro_msgt;
        ?>
"><?php 
        echo $pmpro_msg;
        ?>
</div>
	<?php 
    } else {
        ?>
		<div id="pmpro_message" class="pmpro_message" style="display: none;"></div>
	<?php 
    }
    ?>
	
	<?php 
    if (empty($pmprorh_options['use_email_for_login'])) {
        ?>
	<div id="div_user_login">
		<label>Username</label>
		<input type="text" name="user_login" id="user_login" class="input" value="<?php 
        echo esc_attr($user_login);
        ?>
" size="25" /> <span class="required">* Required</span>
	</div>
	<?php 
    }
    ?>
	<div id="div_user_email">
		<label>E-mail</label>
		<input type="text" name="user_email" id="user_email" class="input" value="<?php 
    echo esc_attr($user_email);
    ?>
" size="25" /> <span class="required">* Required</span>
	</div>
	<?php 
    do_action("pmprorh_after_email");
    ?>
	<div class="pmpro_hidden">
        	<label for="fullname"><?php 
    _e('Full Name', 'pmpro');
    ?>
</label>
        	<input id="fullname" name="fullname" type="text" class="input <?php 
    echo pmpro_getClassForField("fullname");
    ?>
" size="30" value="" /> <strong><?php 
    _e('LEAVE THIS BLANK', 'pmpro');
    ?>
</strong>
    	</div>
	<div id="div_pass1">
		<label>Password</label>
		<input autocomplete="off" name="pass1" id="pass1" size="25" class="input" value="" type="password" /> <span class="required">* Required</span>
	</div>
	<?php 
    $pmpro_checkout_confirm_password = apply_filters("pmpro_checkout_confirm_password", true);
    if ($pmpro_checkout_confirm_password) {
        ?>
		<div id="div_pass2">
			<label>Confirm Password</label>
			<input autocomplete="off" name="pass2" id="pass2" size="25" class="input" value="" type="password" /> <span class="required">* Required</span>
		</div>   
		<?php 
    }
    ?>
	
	<?php 
    do_action("pmprorh_after_password");
    ?>
    
    <?php 
    do_action("pmprorh_register_form");
    ?>
//.........这里部分代码省略.........
开发者ID:srinivasulurao,项目名称:transcharity,代码行数:101,代码来源:register-form.php

示例10: pmproio_pmpro_checkout_boxes

function pmproio_pmpro_checkout_boxes()
{
    global $pmpro_level, $current_user, $pmpro_review;
    if (pmproio_isInviteLevel($pmpro_level->id)) {
        if (!empty($_REQUEST['invite_code'])) {
            $invite_code = $_REQUEST['invite_code'];
        } elseif (!empty($_SESSION['invite_code'])) {
            $invite_code = $_SESSION['invite_code'];
        } elseif (is_user_logged_in()) {
            $invite_code = $current_user->pmpro_invite_code_at_signup;
        } else {
            $invite_code = "";
        }
        if (empty($pmpro_review)) {
            ?>
		<table class="pmpro_checkout top1em" width="100%" cellpadding="0" cellspacing="0" border="0">
			<thead>
				<tr>
					<th><?php 
            _e('Invite Code', 'pmpro');
            ?>
</th>
				</tr>
			</thead>
			<tbody>
				<tr>
					<td>
						<label for="invite_code"><?php 
            _e('Invite Code', 'pmpro');
            ?>
</label>
						<input id="invite_code" name="invite_code" type="text" class="input <?php 
            echo pmpro_getClassForField("invite_code");
            ?>
" size="20" value="<?php 
            echo esc_attr($invite_code);
            ?>
" />
						<span class="pmpro_asterisk"> *</span>
					</td>
				</tr>
			</tbody>
		</table>
		<?php 
        }
    }
}
开发者ID:eighty20results,项目名称:pmpro-invite-only,代码行数:47,代码来源:pmpro-invite-only.php


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