本文整理汇总了PHP中SwpmUtils::e方法的典型用法代码示例。如果您正苦于以下问题:PHP SwpmUtils::e方法的具体用法?PHP SwpmUtils::e怎么用?PHP SwpmUtils::e使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SwpmUtils
的用法示例。
在下文中一共展示了SwpmUtils::e方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: regigstration_ui
public function regigstration_ui($level)
{
//Trigger the filter to override the registration form (the form builder addon uses this filter)
$form = apply_filters('swpm_registration_form_override', '', $level);
//The $level value could be empty also so the code handling the filter need to check for it.
if (!empty($form)) {
//An addon has overridden the registration form. So use that one.
return $form;
}
$settings_configs = SwpmSettings::get_instance();
$joinuspage_url = $settings_configs->get_value('join-us-page-url');
$membership_level = '';
global $wpdb;
if (SwpmUtils::is_paid_registration()) {
//Lets check if this is a registration for paid membership
$member = SwpmUtils::get_paid_member_info();
if (empty($member)) {
SwpmUtils::e('Error! Invalid Request. Could not find a match for the given security code and the user ID.');
} else {
$membership_level = $member->membership_level;
}
} else {
if (!empty($level)) {
//Membership level is specified in the shortcode (level specific registration form).
$member = SwpmTransfer::$default_fields;
$membership_level = absint($level);
}
}
//Check if free membership registration is disalbed on the site
if (empty($membership_level)) {
$joinuspage_link = '<a href="' . $joinuspage_url . '">Join us</a>';
$free_rego_disabled_msg = '<p>';
$free_rego_disabled_msg .= SwpmUtils::_('Free membership is disabled on this site. Please make a payment from the ' . $joinuspage_link . ' page to pay for a premium membership.');
$free_rego_disabled_msg .= '</p><p>';
$free_rego_disabled_msg .= SwpmUtils::_('You will receive a unique link via email after the payment. You will be able to use that link to complete the premium membership registration.');
$free_rego_disabled_msg .= '</p>';
return $free_rego_disabled_msg;
}
//Handle the registration form in core plugin
$mebership_info = SwpmPermission::get_instance($membership_level);
$membership_level = $mebership_info->get('id');
if (empty($membership_level)) {
return "Error! Failed to retrieve membership level ID from the membership info object.";
}
$level_identifier = md5($membership_level);
$membership_level_alias = $mebership_info->get('alias');
$swpm_registration_submit = filter_input(INPUT_POST, 'swpm_registration_submit');
if (!empty($swpm_registration_submit)) {
$member = array_map('sanitize_text_field', $_POST);
}
ob_start();
extract((array) $member, EXTR_SKIP);
include SIMPLE_WP_MEMBERSHIP_PATH . 'views/add.php';
return ob_get_clean();
}
示例2: regigstration_ui
public function regigstration_ui($level)
{
$form = apply_filters('swpm_registration_form_override', '', $level);
if (!empty($form)) {
return $form;
}
$settings_configs = SwpmSettings::get_instance();
$joinuspage_url = $settings_configs->get_value('join-us-page-url');
$membership_level = '';
global $wpdb;
if (SwpmUtils::is_paid_registration()) {
//Lets check if this is a registration for paid membership
$member = SwpmUtils::get_paid_member_info();
if (empty($member)) {
SwpmUtils::e('Error! Invalid Request. Could not find a match for the given security code and the user ID.');
} else {
$membership_level = $member->membership_level;
}
} else {
if (!empty($level)) {
$member = SwpmTransfer::$default_fields;
$membership_level = absint($level);
}
}
if (empty($membership_level)) {
$joinuspage_link = '<a href="' . $joinuspage_url . '">Join us</a>';
echo '<p>';
SwpmUtils::e('Free membership is disabled on this site. Please make a payment from the ' . $joinuspage_link . ' page to pay for a premium membership.');
echo '</p><p>';
SwpmUtils::e('You will receive a unique link via email after the payment. You will be able to use that link to complete the premium membership registration.');
echo '</p>';
return;
}
$mebership_info = SwpmPermission::get_instance($membership_level);
$membership_level = $mebership_info->get('id');
if (empty($membership_level)) {
return "Membership Level Not Found.";
}
$level_identifier = md5($membership_level);
$membership_level_alias = $mebership_info->get('alias');
$swpm_registration_submit = filter_input(INPUT_POST, 'swpm_registration_submit');
if (!empty($swpm_registration_submit)) {
$member = $_POST;
}
ob_start();
extract((array) $member, EXTR_SKIP);
include SIMPLE_WP_MEMBERSHIP_PATH . 'views/add.php';
return ob_get_clean();
}
示例3: handle_main_membership_level_admin_menu
function handle_main_membership_level_admin_menu()
{
do_action('swpm_membership_level_menu_start');
$level_action = filter_input(INPUT_GET, 'level_action');
$action = $level_action;
$selected = $action;
?>
<div class="wrap swpm-admin-menu-wrap"><!-- start wrap -->
<!-- page title -->
<h1><?php
echo SwpmUtils::_('Simple WP Membership::Membership Levels');
?>
</h1>
<!-- start nav menu tabs -->
<h2 class="nav-tab-wrapper">
<a class="nav-tab <?php
echo $selected == "" ? 'nav-tab-active' : '';
?>
" href="admin.php?page=simple_wp_membership_levels"><?php
echo SwpmUtils::_('Membership Levels');
?>
</a>
<a class="nav-tab <?php
echo $selected == "add" ? 'nav-tab-active' : '';
?>
" href="admin.php?page=simple_wp_membership_levels&level_action=add"><?php
echo SwpmUtils::_('Add Level');
?>
</a>
<a class="nav-tab <?php
echo $selected == "manage" ? 'nav-tab-active' : '';
?>
" href="admin.php?page=simple_wp_membership_levels&level_action=manage"><?php
echo SwpmUtils::_('Manage Content Production');
?>
</a>
<a class="nav-tab <?php
echo $selected == "category_list" ? 'nav-tab-active' : '';
?>
" href="admin.php?page=simple_wp_membership_levels&level_action=category_list"><?php
echo SwpmUtils::_('Category Protection');
?>
</a>
<?php
//Trigger hooks that allows an extension to add extra nav tabs in the membership levels menu.
do_action('swpm_membership_levels_menu_nav_tabs', $selected);
$menu_tabs = apply_filters('swpm_membership_levels_additional_menu_tabs_array', array());
foreach ($menu_tabs as $level_action => $title) {
?>
<a class="nav-tab <?php
echo $selected == $member_action ? 'nav-tab-active' : '';
?>
" href="admin.php?page=simple_wp_membership_levels&level_action=<?php
echo $level_action;
?>
" ><?php
SwpmUtils::e($title);
?>
</a>
<?php
}
?>
</h2>
<!-- end nav menu tabs -->
<?php
do_action('swpm_membership_level_menu_after_nav_tabs');
//Trigger hook so anyone listening for this particular action can handle the output.
do_action('swpm_membership_level_menu_body_' . $action);
//Allows an addon to completely override the body section of the membership level admin menu for a given action.
$output = apply_filters('swpm_membership_level_menu_body_override', '', $action);
if (!empty($output)) {
//An addon has overriden the body of this page for the given action. So no need to do anything in core.
echo $output;
echo '</div>';
//<!-- end of wrap -->
return;
}
//Switch case for the various different actions handled by the core plugin.
switch ($action) {
case 'add':
case 'edit':
$this->process_form_request();
break;
case 'manage':
$this->manage();
break;
case 'category_list':
$this->manage_categroy();
break;
case 'delete':
$this->delete_level();
default:
$this->show_levels();
break;
}
echo '</div>';
//.........这里部分代码省略.........
示例4: handle_main_payments_admin_menu
function handle_main_payments_admin_menu()
{
do_action('swpm_payments_menu_start');
$output = '';
$tab = isset($_GET['tab']) ? sanitize_text_field($_GET['tab']) : '';
$selected = $tab;
?>
<div class="wrap swpm-admin-menu-wrap"><!-- start wrap -->
<h1><?php
echo SwpmUtils::_('Simple Membership::Payments');
?>
</h1><!-- page title -->
<!-- start nav menu tabs -->
<h2 class="nav-tab-wrapper">
<a class="nav-tab <?php
echo $tab == '' ? 'nav-tab-active' : '';
?>
" href="admin.php?page=simple_wp_membership_payments"><?php
SwpmUtils::e('Transactions');
?>
</a>
<a class="nav-tab <?php
echo $tab == 'payment_buttons' ? 'nav-tab-active' : '';
?>
" href="admin.php?page=simple_wp_membership_payments&tab=payment_buttons"><?php
SwpmUtils::e('Manage Payment Buttons');
?>
</a>
<a class="nav-tab <?php
echo $tab == 'create_new_button' ? 'nav-tab-active' : '';
?>
" href="admin.php?page=simple_wp_membership_payments&tab=create_new_button"><?php
SwpmUtils::e('Create New Button');
?>
</a>
<?php
if ($tab == 'edit_button') {
//Only show the "edit button" tab when a button is being edited.
echo '<a class="nav-tab nav-tab-active" href="#">Edit Button</a>';
}
//Trigger hooks that allows an extension to add extra nav tabs in the payments menu.
do_action('swpm_payments_menu_nav_tabs', $selected);
$menu_tabs = apply_filters('swpm_payments_menu_additional_menu_tabs_array', array());
foreach ($menu_tabs as $menu_action => $title) {
?>
<a class="nav-tab <?php
echo $selected == $menu_action ? 'nav-tab-active' : '';
?>
" href="admin.php?page=simple_wp_membership_payments&tab=<?php
echo $menu_action;
?>
" ><?php
SwpmUtils::e($title);
?>
</a>
<?php
}
?>
</h2>
<!-- end nav menu tabs -->
<?php
do_action('swpm_payments_menu_after_nav_tabs');
//Allows an addon to completely override the body section of the payments admin menu for a given action.
$output = apply_filters('swpm_payments_menu_body_override', '', $tab);
if (!empty($output)) {
//An addon has overriden the body of this page for the given tab/action. So no need to do anything in core.
echo $output;
echo '</div>';
//<!-- end of wrap -->
return;
}
echo '<div id="poststuff"><div id="post-body">';
//TODO - move most of the following includes to functions of this class instead.
//Switch case for the various different tabs handled by the core plugin.
switch ($tab) {
case 'payment_buttons':
include_once SIMPLE_WP_MEMBERSHIP_PATH . '/views/payments/admin_payment_buttons.php';
break;
case 'create_new_button':
include_once SIMPLE_WP_MEMBERSHIP_PATH . '/views/payments/admin_create_payment_buttons.php';
break;
case 'edit_button':
include_once SIMPLE_WP_MEMBERSHIP_PATH . '/views/payments/admin_edit_payment_buttons.php';
break;
case 'all_txns':
include_once SIMPLE_WP_MEMBERSHIP_PATH . '/views/payments/admin_all_payment_transactions.php';
break;
default:
include_once SIMPLE_WP_MEMBERSHIP_PATH . '/views/payments/admin_all_payment_transactions.php';
break;
}
echo '</div></div>';
//<!-- end of post-body -->
echo '</div>';
//<!-- end of .wrap -->
//.........这里部分代码省略.........
示例5:
" href="admin.php?page=simple_wp_membership_payments"><?php
SwpmUtils::e('Transactions');
?>
</a>
<a class="nav-tab <?php
echo $tab == 'payment_buttons' ? 'nav-tab-active' : '';
?>
" href="admin.php?page=simple_wp_membership_payments&tab=payment_buttons"><?php
SwpmUtils::e('Manage Payment Buttons');
?>
</a>
<a class="nav-tab <?php
echo $tab == 'create_new_button' ? 'nav-tab-active' : '';
?>
" href="admin.php?page=simple_wp_membership_payments&tab=create_new_button"><?php
SwpmUtils::e('Create New Button');
?>
</a>
<?php
if ($tab == 'edit_button') {
//Only show the "edit button" tab when a button is being edited.
echo '<a class="nav-tab nav-tab-active" href="#">Edit Button</a>';
}
?>
</h2>
<?php
switch ($tab) {
case 'payment_buttons':
示例6:
if (!isset($_REQUEST['swpm_button_type_selected'])) {
//Button type hasn't been selected. Show the selection option.
?>
<div class="postbox">
<h3 class="hndle"><label for="title"><?php
echo SwpmUtils::_('Select Payment Button Type');
?>
</label></h3>
<div class="inside">
<form action="" method="post">
<input type="radio" name="button_type" value="pp_buy_now" checked><?php
SwpmUtils::e('PayPal Buy Now');
?>
<br />
<input type="radio" name="button_type" value="pp_subscription"><?php
SwpmUtils::e('PayPal Subscription');
?>
<br />
<?php
apply_filters('swpm_new_button_select_button_type', '');
?>
<br />
<input type="submit" name="swpm_button_type_selected" class="button-primary" value="<?php
echo SwpmUtils::_('Next');
?>
" />
</form>
</div>
</div><!-- end of .postbox -->
示例7: trim
<?php
global $wpdb;
if (isset($_POST['swpm_generate_adv_code'])) {
$paypal_ipn_url = SIMPLE_WP_MEMBERSHIP_SITE_HOME_URL . '/?swpm_process_ipn=1';
$mem_level = trim($_POST['swpm_paypal_adv_member_level']);
$query = $wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "swpm_membership_tbl WHERE id !=1 AND id =%d", $mem_level);
$membership_level_resultset = $wpdb->get_row($query);
if ($membership_level_resultset) {
$pp_av_code = 'notify_url=' . $paypal_ipn_url . '<br /> ' . 'custom=subsc_ref=' . $mem_level;
echo '<div id="message" class="updated fade"><p>';
echo '<strong>Paste the code below in the "Add advanced variables" field of your PayPal button for membership level ' . $mem_level . '</strong>';
echo '<br /><br /><code>' . $pp_av_code . '</code>';
echo '</p></div>';
} else {
echo '<div id="message" class="updated fade"><p><strong>';
SwpmUtils::e('Error! The membership level ID (' . $mem_level . ') you specified is incorrect. Please check this value again.');
echo '</strong></p></div>';
}
}
?>
<div class="postbox">
<h3><label for="title"><?php
echo SwpmUtils::_('PayPal Integration Settings');
?>
</label></h3>
<div class="inside">
<p><strong><?php
echo SwpmUtils::_('Generate the "Advanced Variables" Code for your PayPal button');
?>
</strong></p>
示例8: advanced_settings_callback
public function advanced_settings_callback()
{
SwpmUtils::e('This page allows you to configure some advanced features of the plugin.');
}
示例9:
<form method="post">
<p class="search-box">
<label class="screen-reader-text" for="search_id-search-input">
search:</label>
<input id="search_id-search-input" type="text" name="s" value="" />
<input id="search-submit" class="button" type="submit" name="" value="<?php
echo SwpmUtils::_('search');
?>
" />
<input type="hidden" name="page" value="simple_wp_membership" />
</p>
</form>
<?php
$this->prepare_items();
?>
<form method="post">
<?php
$this->display();
?>
</form>
<p>
<a href="admin.php?page=simple_wp_membership_levels&level_action=add" class="button-primary"><?php
SwpmUtils::e('Add New');
?>
</a>
</p>
</div><!-- end of .wrap -->
示例10: no_items
function no_items()
{
SwpmUtils::e('No membership levels found.');
}
示例11: jQuery
<label for="membership_level_id"><?php
SwpmUtils::e('Membership Level:');
?>
</label>
<select id="membership_level_id" name="membership_level_id">
<option <?php
echo $category_list->selected_level_id == 1 ? "selected" : "";
?>
value="1">General Protection</option>
<?php
echo SwpmUtils::membership_level_dropdown($category_list->selected_level_id);
?>
</select>
</p>
<p class="swpm-select-box-left"><input type="submit" class="button-primary" name="update_category_list" value="<?php
SwpmUtils::e('Update');
?>
"></p>
<?php
$category_list->prepare_items();
?>
<?php
$category_list->display();
?>
</form>
<script type="text/javascript">
jQuery(document).ready(function($) {
$('#membership_level_id').change(function() {
$('#category_list_form').submit();
示例12: apply_filters
echo $selected == "" ? 'nav-tab-active' : '';
?>
" href="admin.php?page=simple_wp_membership"><?php
echo SwpmUtils::_('Members');
?>
</a>
<a class="nav-tab <?php
echo $selected == "add" ? 'nav-tab-active' : '';
?>
" href="admin.php?page=simple_wp_membership&member_action=add"><?php
echo SwpmUtils::_('Add Member');
?>
</a>
<?php
$menu = apply_filters('swpm_admin_members_menu_hook', array());
foreach ($menu as $member_action => $title) {
?>
<a class="nav-tab <?php
echo $selected == $member_action ? 'nav-tab-active' : '';
?>
" href="admin.php?page=simple_wp_membership&member_action=<?php
echo $member_action;
?>
" ><?php
SwpmUtils::e($title);
?>
</a>
<?php
}
?>
</h2>
示例13:
</label></h3>
<div class="inside">
<p><strong><?php
echo SwpmUtils::_('You can manually generate a registration completion link here and give it to your customer if they have missed the email that was automatically sent out to them after the payment.');
?>
</strong></p>
<form action="" method="post">
<table>
<tr>
<?php
echo SwpmUtils::_('Generate Registration Completion Link');
?>
<br /><input type="radio" value="one" name="swpm_link_for" /><?php
SwpmUtils::e('For a Particular Member ID');
?>
<input type="text" name="member_id" size="5" value="" />
<br /><strong><?php
echo SwpmUtils::_('OR');
?>
</strong>
<br /><input type="radio" checked="checked" value="all" name="swpm_link_for" /> <?php
echo SwpmUtils::_('For All Incomplete Registrations');
?>
</tr>
<tr>
<td>
<div class="swpm-margin-top-10"></div>
<?php
echo SwpmUtils::_('Send Registration Reminder Email Too');
示例14:
<h3 class="hndle"><label for="title"><?php
echo SwpmUtils::_('Select Payment Button Type');
?>
</label></h3>
<div class="inside">
<form action="" method="post">
<input type="radio" name="button_type" value="pp_buy_now" checked><?php
SwpmUtils::e('PayPal Buy Now');
?>
<br />
<input type="radio" name="button_type" value="pp_subscription"><?php
SwpmUtils::e('PayPal Subscription');
?>
<br />
<input type="radio" name="button_type" value="stripe_buy_now"><?php
SwpmUtils::e('Stripe Buy Now');
?>
<br />
<?php
apply_filters('swpm_new_button_select_button_type', '');
?>
<br />
<input type="submit" name="swpm_button_type_selected" class="button-primary" value="<?php
echo SwpmUtils::_('Next');
?>
" />
</form>
</div>
</div><!-- end of .postbox -->
示例15: handle_main_members_admin_menu
function handle_main_members_admin_menu()
{
do_action('swpm_members_menu_start');
$action = filter_input(INPUT_GET, 'member_action');
$action = empty($action) ? filter_input(INPUT_POST, 'action') : $action;
$selected = $action;
?>
<div class="wrap swpm-admin-menu-wrap"><!-- start wrap -->
<h1><?php
echo SwpmUtils::_('Simple WP Membership::Members');
?>
<!-- page title -->
<a href="admin.php?page=simple_wp_membership&member_action=add" class="add-new-h2"><?php
echo SwpmUtils::_('Add New');
?>
</a>
</h1>
<h2 class="nav-tab-wrapper swpm-members-nav-tab-wrapper"><!-- start nav menu tabs -->
<a class="nav-tab <?php
echo $selected == "" ? 'nav-tab-active' : '';
?>
" href="admin.php?page=simple_wp_membership"><?php
echo SwpmUtils::_('Members');
?>
</a>
<a class="nav-tab <?php
echo $selected == "add" ? 'nav-tab-active' : '';
?>
" href="admin.php?page=simple_wp_membership&member_action=add"><?php
echo SwpmUtils::_('Add Member');
?>
</a>
<?php
if ($selected == 'edit') {
//Only show the "edit member" tab when a member profile is being edited from the admin side.
echo '<a class="nav-tab nav-tab-active" href="#">Edit Member</a>';
}
//Trigger hooks that allows an extension to add extra nav tabs in the members menu.
do_action('swpm_members_menu_nav_tabs', $selected);
$menu_tabs = apply_filters('swpm_members_additional_menu_tabs_array', array());
foreach ($menu_tabs as $member_action => $title) {
?>
<a class="nav-tab <?php
echo $selected == $member_action ? 'nav-tab-active' : '';
?>
" href="admin.php?page=simple_wp_membership&member_action=<?php
echo $member_action;
?>
" ><?php
SwpmUtils::e($title);
?>
</a>
<?php
}
?>
</h2><!-- end nav menu tabs -->
<?php
do_action('swpm_members_menu_after_nav_tabs');
//Trigger hook so anyone listening for this particular action can handle the output.
do_action('swpm_members_menu_body_' . $action);
//Allows an addon to completely override the body section of the members admin menu for a given action.
$output = apply_filters('swpm_members_menu_body_override', '', $action);
if (!empty($output)) {
//An addon has overriden the body of this page for the given action. So no need to do anything in core.
echo $output;
echo '</div>';
//<!-- end of wrap -->
return;
}
//Switch case for the various different actions handled by the core plugin.
switch ($action) {
case 'members_list':
//Show the members listing
echo $this->show_all_members();
break;
case 'add':
//Process member profile add
$this->process_form_request();
break;
case 'edit':
//Process member profile edit
$this->process_form_request();
break;
default:
//Show the members listing page by default.
echo $this->show_all_members();
break;
}
echo '</div>';
//<!-- end of wrap -->
}