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


PHP pmpro_implodeToEnglish函数代码示例

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


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

示例1: 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

示例2: pmpro_getOption

						<?php 
            }
            ?>
    
					</td>						
				</tr>											
			</tbody>
			</table>                   
			<?php 
        }
        ?>
			
			<?php 
        $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);
        ?>
			
			<table id="pmpro_payment_information_fields" class="pmpro_checkout top1em" width="100%" cellpadding="0" cellspacing="0" border="0">
			<thead>
				<tr>
					<th colspan="2"><span class="pmpro_thead-msg"><?php 
        printf(__('We accept %s', 'pmpro'), $pmpro_accepted_credit_cards_string);
        ?>
</span><?php 
        _e('Credit Card Information', 'pmpro');
        ?>
</th>
				</tr>
			</thead>
			<tbody>                    
开发者ID:6226,项目名称:wp,代码行数:31,代码来源:billing.php

示例3: _e

?>
	<?php 
if (!$pmpro_confirm) {
    if ($old_level_ids) {
        if (!is_array($old_level_ids) && $old_level_ids == "all") {
            ?>
					<p><?php 
            _e('Are you sure you want to cancel your membership?', 'pmpro');
            ?>
</p>
					<?php 
        } else {
            $level_names = $wpdb->get_col("SELECT name FROM {$wpdb->pmpro_membership_levels} WHERE id IN('" . implode("','", $old_level_ids) . "')");
            ?>
					<p><?php 
            printf(_n('Are you sure you want to cancel your %s membership?', 'Are you sure you want to cancel your %s memberships?', count($level_names), 'pmpro'), pmpro_implodeToEnglish($level_names));
            ?>
</p>
					<?php 
        }
        ?>
			
			<div class="pmpro_actionlinks">
				<a class="pmpro_btn pmpro_yeslink yeslink" href="<?php 
        echo pmpro_url("cancel", "?levelstocancel=" . esc_attr($_REQUEST['levelstocancel']) . "&confirm=true");
        ?>
"><?php 
        _e('Yes, cancel this membership', 'pmpro');
        ?>
</a>
				<a class="pmpro_btn pmpro_cancel pmpro_nolink nolink" href="<?php 
开发者ID:uwmadisoncals,项目名称:Cluster-Plugins,代码行数:31,代码来源:cancel.php

示例4: pmpro_membership_content_filter

function pmpro_membership_content_filter($content, $skipcheck = false)
{
    global $post, $current_user;
    if (!$skipcheck) {
        $hasaccess = pmpro_has_membership_access(NULL, NULL, true);
        if (is_array($hasaccess)) {
            //returned an array to give us the membership level values
            $post_membership_levels_ids = $hasaccess[1];
            $post_membership_levels_names = $hasaccess[2];
            $hasaccess = $hasaccess[0];
        }
    }
    if ($hasaccess) {
        //all good, return content
        return $content;
    } else {
        //if show excerpts is set, return just the excerpt
        if (pmpro_getOption("showexcerpts")) {
            //show excerpt
            global $post;
            if ($post->post_excerpt) {
                //defined exerpt
                $content = wpautop($post->post_excerpt);
            } elseif (strpos($content, "<span id=\"more-" . $post->ID . "\"></span>") !== false) {
                //more tag
                $pos = strpos($content, "<span id=\"more-" . $post->ID . "\"></span>");
                $content = wpautop(substr($content, 0, $pos));
            } elseif (strpos($content, 'class="more-link">') !== false) {
                //more link
                $content = preg_replace("/\\<a.*class\\=\"more\\-link\".*\\>.*\\<\\/a\\>/", "", $content);
            } else {
                //auto generated excerpt. pulled from wp_trim_excerpt
                $content = strip_shortcodes($content);
                $content = str_replace(']]>', ']]&gt;', $content);
                $content = strip_tags($content);
                $excerpt_length = apply_filters('excerpt_length', 55);
                $words = preg_split("/[\n\r\t ]+/", $content, $excerpt_length + 1, PREG_SPLIT_NO_EMPTY);
                if (count($words) > $excerpt_length) {
                    array_pop($words);
                    $content = implode(' ', $words);
                    $content = $content . "... ";
                } else {
                    $content = implode(' ', $words) . "... ";
                }
                $content = wpautop($content);
            }
        } else {
            //else hide everything
            $content = "";
        }
        if (empty($post_membership_levels_ids)) {
            $post_membership_levels_ids = array();
        }
        if (empty($post_membership_levels_names)) {
            $post_membership_levels_names = array();
        }
        //hide levels which don't allow signups by default
        if (!apply_filters("pmpro_membership_content_filter_disallowed_levels", false, $post_membership_levels_ids, $post_membership_levels_names)) {
            foreach ($post_membership_levels_ids as $key => $id) {
                //does this level allow registrations?
                $level_obj = pmpro_getLevel($id);
                if (!$level_obj->allow_signups) {
                    unset($post_membership_levels_ids[$key]);
                    unset($post_membership_levels_names[$key]);
                }
            }
        }
        $pmpro_content_message_pre = '<div class="pmpro_content_message">';
        $pmpro_content_message_post = '</div>';
        $sr_search = array("!!levels!!", "!!referrer!!");
        $sr_replace = array(pmpro_implodeToEnglish($post_membership_levels_names), urlencode(site_url($_SERVER['REQUEST_URI'])));
        //get the correct message to show at the bottom
        if (is_feed()) {
            $newcontent = apply_filters("pmpro_rss_text_filter", stripslashes(pmpro_getOption("rsstext")));
            $content .= $pmpro_content_message_pre . str_replace($sr_search, $sr_replace, $newcontent) . $pmpro_content_message_post;
        } elseif ($current_user->ID) {
            //not a member
            $newcontent = apply_filters("pmpro_non_member_text_filter", stripslashes(pmpro_getOption("nonmembertext")));
            $content .= $pmpro_content_message_pre . str_replace($sr_search, $sr_replace, $newcontent) . $pmpro_content_message_post;
        } else {
            //not logged in!
            $newcontent = apply_filters("pmpro_not_logged_in_text_filter", stripslashes(pmpro_getOption("notloggedintext")));
            $content .= $pmpro_content_message_pre . str_replace($sr_search, $sr_replace, $newcontent) . $pmpro_content_message_post;
        }
    }
    return $content;
}
开发者ID:MediaPreneur,项目名称:paid-memberships-pro,代码行数:87,代码来源:content.php

示例5: 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

示例6: pmpro_include_payment_information_fields

    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 
        /*this section is for if any discount code exists*/
        //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 
        //}
        ?>

					</td>
				</tr>
			</tbody>
			</table>
			<?php 
        //don't include the default
        return false;
    }
开发者ID:Madu-rosh,项目名称:MIGS-for-paid-membership-pro,代码行数:79,代码来源:class.pmprogateway_migs.php

示例7: pmproap_pmpro_text_filter

function pmproap_pmpro_text_filter($text)
{
    global $wpdb, $current_user, $post, $pmpro_currency_symbol;
    if (!empty($post)) {
        if (pmproap_isPostLocked($post->ID) && !pmproap_hasAccess($current_user->ID, $post->ID)) {
            //which level to use for checkout link?
            $text_level_id = pmproap_getLevelIDForCheckoutLink($post->ID, $current_user->ID);
            if (empty($text_level_id)) {
                $text = "<p>" . __("You must first purchase a membership level before purchasing this content. ", "pmproap") . "</p>";
                $text .= "<p><a href=\"" . pmpro_url("levels") . "\">" . __("Click here to choose a membership level.", "pmproap") . "</a></p>";
            } else {
                //what's the price
                $pmproap_price = get_post_meta($post->ID, "_pmproap_price", true);
                //check for all access levels
                $all_access_levels = apply_filters("pmproap_all_access_levels", array(), $current_user->ID, $post->ID);
                //update text
                if (!empty($all_access_levels)) {
                    $level_names = array();
                    foreach ($all_access_levels as $level_id) {
                        $level = pmpro_getLevel($level_id);
                        $level_names[] = $level->name;
                    }
                    $text = "<p>" . __("This content requires that you purchase additional access. The price is %s or free for our %s members.", pmpro_formatPrice($pmproap_price), pmpro_implodeToEnglish($level_names)) . "</p>";
                    $text .= "<p><a href=\"" . pmpro_url("checkout", "?level=" . $text_level_id . "&ap=" . $post->ID) . "\">" . sprintf(__("Purchase this Content (%s)", 'pmproap'), pmpro_formatPrice($pmproap_price)) . "</a> <a href=\"" . pmpro_url("levels") . "\">" . __("Choose a Membership Level", "pmproap") . "</a></p>";
                } else {
                    $text = "<p>" . sprintf(__("This content requires that you purchase additional access. The price is %s.", "pmproap"), pmpro_formatPrice($pmproap_price)) . "</p>";
                    $text .= "<p><a href=\"" . pmpro_url("checkout", "?level=" . $text_level_id . "&ap=" . $post->ID) . "\">" . __("Click here to checkout", "pmproap") . "</a></p>";
                }
            }
        }
    }
    return $text;
}
开发者ID:greathmaster,项目名称:pmpro-addon-packages,代码行数:33,代码来源:pmpro-addon-packages.php

示例8: sendCancelAdminEmail

 function sendCancelAdminEmail($user = NULL, $old_level_id = NULL)
 {
     global $wpdb, $current_user;
     if (!$user) {
         $user = $current_user;
     }
     if (!$user) {
         return false;
     }
     //check settings
     $send = pmpro_getOption("email_admin_cancels");
     if (empty($send)) {
         return true;
     }
     //didn't send, but we also don't want to indicate failure because the settings say to not send
     $this->email = get_bloginfo("admin_email");
     $this->subject = sprintf(__("Membership for %s at %s has been CANCELLED", "pmpro"), $user->user_login, get_option("blogname"));
     $this->template = "cancel_admin";
     $this->data = array("user_login" => $user->user_login, "user_email" => $user->user_email, "display_name" => $user->display_name, "sitename" => get_option("blogname"), "siteemail" => pmpro_getOption("from_email"), "login_link" => wp_login_url());
     if (!empty($old_level_id)) {
         if (!is_array($old_level_id)) {
             $old_level_id = array($old_level_id);
         }
         $this->data['membership_id'] = $old_level_id[0];
         //pass just the first as the level id
         $this->data['membership_level_name'] = pmpro_implodeToEnglish($wpdb->get_col("SELECT name FROM {$wpdb->pmpro_membership_levels} WHERE id IN('" . implode("','", $old_level_id) . "')"));
         //start and end date
         $startdate = $wpdb->get_var("SELECT UNIX_TIMESTAMP(startdate) as startdate FROM {$wpdb->pmpro_memberships_users} WHERE user_id = '" . $user->ID . "' AND membership_id = '" . $old_level_id[0] . "' AND status IN('inactive', 'cancelled', 'admin_cancelled') ORDER BY id DESC");
         if (!empty($startdate)) {
             $this->data['startdate'] = date_i18n(get_option('date_format'), $startdate);
         } else {
             $this->data['startdate'] = "";
         }
         $enddate = $wpdb->get_var("SELECT UNIX_TIMESTAMP(enddate) as enddate FROM {$wpdb->pmpro_memberships_users} WHERE user_id = '" . $user->ID . "' AND membership_id = '" . $old_level_id[0] . "' AND status IN('inactive', 'cancelled', 'admin_cancelled') ORDER BY id DESC");
         if (!empty($enddate)) {
             $this->data['enddate'] = date_i18n(get_option('date_format'), $enddate);
         } else {
             $this->data['enddate'] = "";
         }
     } else {
         $this->data['membership_id'] = '';
         $this->data['membership_level_name'] = __('All Levels', 'pmpro');
         $this->data['startdate'] = '';
         $this->data['enddate'] = '';
     }
     return $this->sendEmail();
 }
开发者ID:uwmadisoncals,项目名称:Cluster-Plugins,代码行数:47,代码来源:class.pmproemail.php

示例9: pmprodlm_dlm_no_access_after_message

function pmprodlm_dlm_no_access_after_message($download)
{
    global $current_user;
    if (function_exists('pmpro_hasMembershipLevel')) {
        if (!pmpro_has_membership_access($download->id)) {
            $hasaccess = pmpro_has_membership_access($download->id, NULL, true);
            if (is_array($hasaccess)) {
                //returned an array to give us the membership level values
                $post_membership_levels_ids = $hasaccess[1];
                $post_membership_levels_names = $hasaccess[2];
                $hasaccess = $hasaccess[0];
            }
            if (empty($post_membership_levels_ids)) {
                $post_membership_levels_ids = array();
            }
            if (empty($post_membership_levels_names)) {
                $post_membership_levels_names = array();
            }
            //hide levels which don't allow signups by default
            if (!apply_filters("pmpro_membership_content_filter_disallowed_levels", false, $post_membership_levels_ids, $post_membership_levels_names)) {
                foreach ($post_membership_levels_ids as $key => $id) {
                    //does this level allow registrations?
                    $level_obj = pmpro_getLevel($id);
                    if (!$level_obj->allow_signups) {
                        unset($post_membership_levels_ids[$key]);
                        unset($post_membership_levels_names[$key]);
                    }
                }
            }
            $pmpro_content_message_pre = '<div class="pmpro_content_message">';
            $pmpro_content_message_post = '</div>';
            $content = '';
            $sr_search = array("!!levels!!", "!!referrer!!");
            $sr_replace = array(pmpro_implodeToEnglish($post_membership_levels_names), urlencode(site_url($_SERVER['REQUEST_URI'])));
            //get the correct message to show at the bottom
            if ($current_user->ID) {
                //not a member
                $newcontent = apply_filters("pmpro_non_member_text_filter", stripslashes(pmpro_getOption("nonmembertext")));
                $content .= $pmpro_content_message_pre . str_replace($sr_search, $sr_replace, $newcontent) . $pmpro_content_message_post;
            } else {
                //not logged in!
                $newcontent = apply_filters("pmpro_not_logged_in_text_filter", stripslashes(pmpro_getOption("notloggedintext")));
                $content .= $pmpro_content_message_pre . str_replace($sr_search, $sr_replace, $newcontent) . $pmpro_content_message_post;
            }
        }
    }
    echo $content;
}
开发者ID:strangerstudios,项目名称:pmpro-download-monitor,代码行数:48,代码来源:pmpro-download-monitor.php


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