本文整理汇总了PHP中SwpmUtils类的典型用法代码示例。如果您正苦于以下问题:PHP SwpmUtils类的具体用法?PHP SwpmUtils怎么用?PHP SwpmUtils使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了SwpmUtils类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: edit_level
public function edit_level($id)
{
//Check we are on the admin end and user has management permission
SwpmMiscUtils::check_user_permission_and_is_admin('membership level edit');
//Check nonce
if (!isset($_POST['_wpnonce_edit_swpmlevel_admin_end']) || !wp_verify_nonce($_POST['_wpnonce_edit_swpmlevel_admin_end'], 'edit_swpmlevel_admin_end')) {
//Nonce check failed.
wp_die(SwpmUtils::_("Error! Nonce verification failed for membership level edit from admin end."));
}
global $wpdb;
$query = $wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "swpm_membership_tbl WHERE id = %d", $id);
$level = $wpdb->get_row($query, ARRAY_A);
$form = new SwpmLevelForm($level);
if ($form->is_valid()) {
$wpdb->update($wpdb->prefix . "swpm_membership_tbl", $form->get_sanitized(), array('id' => $id));
//@todo meta table and collect all relevant info and pass as argument
$custom = apply_filters('swpm_admin_edit_membership_level', array(), $id);
$this->save_custom_fields($id, $custom);
$message = array('succeeded' => true, 'message' => '<p>' . SwpmUtils::_('Membership Level Updated Successfully.') . '</p>');
SwpmTransfer::get_instance()->set('status', $message);
wp_redirect('admin.php?page=simple_wp_membership_levels');
exit(0);
}
$message = array('succeeded' => false, 'message' => SwpmUtils::_('Please correct the following:'), 'extra' => $form->get_errors());
SwpmTransfer::get_instance()->set('status', $message);
}
开发者ID:jesusmarket,项目名称:jesusmarket,代码行数:26,代码来源:class.swpm-membership-level.php
示例2: swpm_ty_page_rego_sc
public function swpm_ty_page_rego_sc($args)
{
$output = '';
$settings = SwpmSettings::get_instance();
//If user is logged in then the purchase will be applied to the existing profile
if (SwpmMemberUtils::is_member_logged_in()) {
$username = SwpmMemberUtils::get_logged_in_members_username();
$output .= '<div class="swpm-ty-page-registration-logged-in swpm-yellow-box">';
$output .= '<p>' . SwpmUtils::_('Your membership profile will be updated to reflect the payment.') . '</p>';
$output .= SwpmUtils::_('Your profile username: ') . $username;
$output .= '</div>';
return $output;
}
$output .= '<div class="swpm-ty-page-registration">';
$member_data = SwpmUtils::get_incomplete_paid_member_info_by_ip();
if ($member_data) {
//Found a member profile record for this IP that needs to be completed
$reg_page_url = $settings->get_value('registration-page-url');
$rego_complete_url = add_query_arg(array('member_id' => $member_data->member_id, 'code' => $member_data->reg_code), $reg_page_url);
$output .= '<div class="swpm-ty-page-registration-link swpm-yellow-box">';
$output .= '<p>' . SwpmUtils::_('Click on the following link to complete the registration.') . '</p>';
$output .= '<p><a href="' . $rego_complete_url . '">' . SwpmUtils::_('Click here to complete your paid registration') . '</a></p>';
$output .= '</div>';
} else {
//Nothing found. Check again later.
$output .= '<div class="swpm-ty-page-registration-link swpm-yellow-box">';
$output .= SwpmUtils::_('If you have just made a membership payment then your payment is yet to be processed. Please check back in a few minutes. An email will be sent to you with the details shortly.');
$output .= '</div>';
}
$output .= '</div>';
//end of .swpm-ty-page-registration
return $output;
}
开发者ID:AndroidScriptAS,项目名称:bismarck_smv,代码行数:33,代码来源:class.swpm-shortcodes-handler.php
示例3: get_logged_in_members_level_name
public static function get_logged_in_members_level_name()
{
$auth = SwpmAuth::get_instance();
if ($auth->is_logged_in()) {
return $auth->get('alias');
}
return SwpmUtils::_("User is not logged in.");
}
开发者ID:andrewfieldwmg,项目名称:greenschoolsproject,代码行数:8,代码来源:class.swpm-utils-member.php
示例4: validate_user_name_ajax
public static function validate_user_name_ajax()
{
global $wpdb;
$field_value = filter_input(INPUT_GET, 'fieldValue');
$field_id = filter_input(INPUT_GET, 'fieldId');
$table = $wpdb->prefix . "swpm_members_tbl";
$query = $wpdb->prepare("SELECT COUNT(*) FROM {$table} WHERE user_name = %s", $field_value);
$exists = $wpdb->get_var($query) > 0;
echo '[ "' . $field_id . ($exists ? '",false,"χ ' . SwpmUtils::_('Aready taken') . '"]' : '",true,"√ ' . SwpmUtils::_('Available') . '"]');
exit;
}
开发者ID:AndroidScriptAS,项目名称:bismarck_smv,代码行数:11,代码来源:class.swpm-ajax.php
示例5: process_delete_action
function process_delete_action()
{
if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'delete_payment_btn') {
//Delete link was clicked for a row in list table
$record_id = strip_tags($_REQUEST['button_id']);
wp_delete_post($record_id);
$success_msg = '<div id="message" class="updated"><p>';
$success_msg .= SwpmUtils::_('The selected entry was deleted!');
$success_msg .= '</p></div>';
echo $success_msg;
}
}
开发者ID:kevinotsuka,项目名称:coffeecircle,代码行数:12,代码来源:class.swpm-payment-buttons-list-table.php
示例6: swpm_show_expiry_date_sc
public function swpm_show_expiry_date_sc($args)
{
$output = '<div class="swpm-show-expiry-date">';
if (SwpmMemberUtils::is_member_logged_in()) {
$auth = SwpmAuth::get_instance();
$expiry_date = $auth->get_expire_date();
$output .= SwpmUtils::_('Expiry: ') . $expiry_date;
} else {
$output .= SwpmUtils::_('You are not logged-in as a member');
}
$output .= '</div>';
return $output;
}
开发者ID:kevinotsuka,项目名称:coffeecircle,代码行数:13,代码来源:class.swpm-shortcodes-handler.php
示例7: edit
public function edit($id)
{
global $wpdb;
$query = $wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "swpm_membership_tbl WHERE id = %d", $id);
$level = $wpdb->get_row($query, ARRAY_A);
$form = new SwpmLevelForm($level);
if ($form->is_valid()) {
$wpdb->update($wpdb->prefix . "swpm_membership_tbl", $form->get_sanitized(), array('id' => $id));
//@todo meta table and collect all relevant info and pass as argument
$custom = apply_filters('swpm_admin_edit_membership_level', array(), $id);
$this->save_custom_fields($id, $custom);
$message = array('succeeded' => true, 'message' => '<p>' . SwpmUtils::_('Updated Successfully.') . '</p>');
SwpmTransfer::get_instance()->set('status', $message);
wp_redirect('admin.php?page=simple_wp_membership_levels');
exit(0);
}
$message = array('succeeded' => false, 'message' => SwpmUtils::_('Please correct the following:'), 'extra' => $form->get_errors());
SwpmTransfer::get_instance()->set('status', $message);
}
开发者ID:kevinotsuka,项目名称:coffeecircle,代码行数:19,代码来源:class.swpm-membership-level.php
示例8: check_and_restrict_comment_posting_to_members
public static function check_and_restrict_comment_posting_to_members()
{
$allow_comments = SwpmSettings::get_instance()->get_value('members-login-to-comment');
if (empty($allow_comments)) {
return;
}
if (is_admin()) {
return;
}
if (SwpmAuth::get_instance()->is_logged_in()) {
return;
}
$comment_id = filter_input(INPUT_POST, 'comment_post_ID');
if (empty($comment_id)) {
return;
}
//Stop this request -> 1)we are on the front-side. 2) Comment posted by a not logged in member. 3) comment_post_ID missing.
$_POST = array();
wp_die(SwpmUtils::_('Comments not allowed by a non-member.'));
}
开发者ID:jesusmarket,项目名称:jesusmarket,代码行数:20,代码来源:class.swpm-comment-form-related.php
示例9: update_account_status
public function update_account_status()
{
global $wpdb;
for ($counter = 0;; $counter += 100) {
$query = $wpdb->prepare("SELECT member_id, membership_level, subscription_starts, account_state\n FROM {$wpdb->prefix}swpm_members_tbl LIMIT %d, 100", $counter);
$results = $wpdb->get_results($query);
if (empty($results)) {
break;
}
$expired = array();
foreach ($results as $result) {
$timestamp = SwpmUtils::get_expiration_timestamp($result);
if ($timestamp < time() && $result->account_state == 'active') {
$expired[] = $result->member_id;
}
}
if (count($expired) > 0) {
$query = "UPDATE {$wpdb->prefix}swpm_members_tbl \n SET account_state='expired' WHERE member_id IN (" . implode(',', $expired) . ")";
$wpdb->query($query);
}
}
}
开发者ID:jesusmarket,项目名称:jesusmarket,代码行数:22,代码来源:class.swpm-cronjob.php
示例10: subscription_period
protected function subscription_period()
{
$subscript_duration_type = filter_input(INPUT_POST, 'subscription_duration_type');
if ($subscript_duration_type == SwpmMembershipLevel::NO_EXPIRY) {
$this->sanitized['subscription_period'] = "";
return;
}
$subscription_period = filter_input(INPUT_POST, 'subscription_period_' . $subscript_duration_type);
if ($subscript_duration_type == SwpmMembershipLevel::FIXED_DATE) {
$dateinfo = date_parse($subscription_period);
if ($dateinfo['warning_count'] || $dateinfo['error_count']) {
$this->errors['subscription_period'] = SwpmUtils::_("Date format is not valid.");
return;
}
$this->sanitized['subscription_period'] = sanitize_text_field($subscription_period);
return;
}
if (!is_numeric($subscription_period)) {
$this->errors['subscription_period'] = SwpmUtils::_("Access duration must be > 0.");
return;
}
$this->sanitized['subscription_period'] = sanitize_text_field($subscription_period);
}
开发者ID:jesusmarket,项目名称:jesusmarket,代码行数:23,代码来源:class.swpm-level-form.php
示例11: swpm_load_template
public static function swpm_load_template($template_name, $require_once = true)
{
//List of file paths (in order of priority) where the plugin should check for the template.
$template_files = array(get_stylesheet_directory() . '/' . SIMPLE_WP_MEMBERSHIP_TEMPLATE_PATH . '/' . $template_name, get_template_directory() . '/' . SIMPLE_WP_MEMBERSHIP_TEMPLATE_PATH . '/' . $template_name, SIMPLE_WP_MEMBERSHIP_PATH . 'views/' . $template_name);
//Filter hook to allow overriding of the template file path
$template_files = apply_filters('swpm_load_template_files', $template_files, $template_name);
foreach ($template_files as $file) {
if (file_exists($file)) {
$template_to_load = $file;
break;
}
}
//Lets load this template
if ($template_to_load) {
if ($require_once) {
require_once $template_to_load;
} else {
require $template_to_load;
}
} else {
wp_die(SwpmUtils::_('Error! Failed to find a template path for the specified template: ' . $template_name));
}
}
开发者ID:jesusmarket,项目名称:jesusmarket,代码行数:23,代码来源:class.swpm-utils-template.php
示例12: 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 -->
//.........这里部分代码省略.........
开发者ID:jesusmarket,项目名称:jesusmarket,代码行数:101,代码来源:class.swpm-payments-admin-menu.php
示例13: swpm_render_pp_subscription_button_sc_output
function swpm_render_pp_subscription_button_sc_output($button_code, $args)
{
$button_id = isset($args['id']) ? $args['id'] : '';
if (empty($button_id)) {
return '<p style="color: red;">Error! swpm_render_pp_subscription_button_sc_output() function requires the button ID value to be passed to it.</p>';
}
//Check new_window parameter
$window_target = isset($args['new_window']) ? 'target="_blank"' : '';
$settings = SwpmSettings::get_instance();
$button_cpt = get_post($button_id);
//Retrieve the CPT for this button
$membership_level_id = get_post_meta($button_id, 'membership_level_id', true);
$paypal_email = get_post_meta($button_id, 'paypal_email', true);
$payment_currency = get_post_meta($button_id, 'payment_currency', true);
//Subscription payment details
$billing_amount = get_post_meta($button_id, 'billing_amount', true);
if (!is_numeric($billing_amount)) {
return '<p style="color: red;">Error! The billing amount value of the button must be a numeric number. Example: 49.50 </p>';
}
$billing_amount = round($billing_amount, 2);
//round the amount to 2 decimal place.
$billing_cycle = get_post_meta($button_id, 'billing_cycle', true);
$billing_cycle_term = get_post_meta($button_id, 'billing_cycle_term', true);
$billing_cycle_count = get_post_meta($button_id, 'billing_cycle_count', true);
$billing_reattempt = get_post_meta($button_id, 'billing_reattempt', true);
//Trial billing details
$trial_billing_amount = get_post_meta($button_id, 'trial_billing_amount', true);
if (!empty($trial_billing_amount)) {
if (!is_numeric($trial_billing_amount)) {
return '<p style="color: red;">Error! The trial billing amount value of the button must be a numeric number. Example: 19.50 </p>';
}
}
$trial_billing_cycle = get_post_meta($button_id, 'trial_billing_cycle', true);
$trial_billing_cycle_term = get_post_meta($button_id, 'trial_billing_cycle_term', true);
$sandbox_enabled = $settings->get_value('enable-sandbox-testing');
$notify_url = SIMPLE_WP_MEMBERSHIP_SITE_HOME_URL . '/?swpm_process_ipn=1';
$return_url = get_post_meta($button_id, 'return_url', true);
if (empty($return_url)) {
$return_url = SIMPLE_WP_MEMBERSHIP_SITE_HOME_URL;
}
$cancel_url = SIMPLE_WP_MEMBERSHIP_SITE_HOME_URL;
$user_ip = SwpmUtils::get_user_ip_address();
$_SESSION['swpm_payment_button_interaction'] = $user_ip;
//Custom field data
$custom_field_value = 'subsc_ref=' . $membership_level_id;
$custom_field_value .= '&user_ip=' . $user_ip;
if (SwpmMemberUtils::is_member_logged_in()) {
$custom_field_value .= '&swpm_id=' . SwpmMemberUtils::get_logged_in_members_id();
}
$custom_field_value = apply_filters('swpm_custom_field_value_filter', $custom_field_value);
/* === PayPal Subscription Button Form === */
$output = '';
$output .= '<div class="swpm-button-wrapper swpm-pp-subscription-wrapper">';
if ($sandbox_enabled) {
$output .= '<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" ' . $window_target . '>';
} else {
$output .= '<form action="https://www.paypal.com/cgi-bin/webscr" method="post" ' . $window_target . '>';
}
$output .= '<input type="hidden" name="cmd" value="_xclick-subscriptions" />';
$output .= '<input type="hidden" name="charset" value="utf-8" />';
$output .= '<input type="hidden" name="bn" value="TipsandTricks_SP" />';
$output .= '<input type="hidden" name="business" value="' . $paypal_email . '" />';
$output .= '<input type="hidden" name="currency_code" value="' . $payment_currency . '" />';
$output .= '<input type="hidden" name="item_number" value="' . $button_id . '" />';
$output .= '<input type="hidden" name="item_name" value="' . htmlspecialchars($button_cpt->post_title) . '" />';
//Check trial billing
if (!empty($trial_billing_cycle)) {
$output .= '<input type="hidden" name="a1" value="' . $trial_billing_amount . '" /><input type="hidden" name="p1" value="' . $trial_billing_cycle . '" /><input type="hidden" name="t1" value="' . $trial_billing_cycle_term . '" />';
}
//Main subscription billing
if (!empty($billing_cycle)) {
$output .= '<input type="hidden" name="a3" value="' . $billing_amount . '" /><input type="hidden" name="p3" value="' . $billing_cycle . '" /><input type="hidden" name="t3" value="' . $billing_cycle_term . '" />';
}
//Re-attempt on failure
if ($billing_reattempt != '') {
$output .= '<input type="hidden" name="sra" value="1" />';
}
//Reccurring times
if ($billing_cycle_count > 1) {
//do not include srt value if billing cycle count set to 1 or a negetive number.
$output .= '<input type="hidden" name="src" value="1" /><input type="hidden" name="srt" value="' . $billing_cycle_count . '" />';
} else {
if (empty($billing_cycle_count)) {
$output .= '<input type="hidden" name="src" value="1" />';
}
}
//Other required data
$output .= '<input type="hidden" name="no_shipping" value="1" />';
//Do not prompt for an address
$output .= '<input type="hidden" name="notify_url" value="' . $notify_url . '" />';
$output .= '<input type="hidden" name="return" value="' . $return_url . '" />';
$output .= '<input type="hidden" name="cancel_return" value="' . $cancel_url . '" />';
$output .= '<input type="hidden" name="custom" value="' . $custom_field_value . '" />';
//Filter to add additional payment input fields to the form (example: langauge code or country code etc).
$output .= apply_filters('swpm_pp_payment_form_additional_fields', '');
//Submit button
$button_image_url = get_post_meta($button_id, 'button_image_url', true);
if (!empty($button_image_url)) {
$output .= '<input type="image" src="' . $button_image_url . '" class="swpm-subscription-button-submit" alt="' . SwpmUtils::_('Subscribe Now') . '"/>';
} else {
//.........这里部分代码省略.........
开发者ID:kevinotsuka,项目名称:coffeecircle,代码行数:101,代码来源:paypal_button_shortcode_view.php
示例14: array
<?php
$output = '';
echo '<link type="text/css" rel="stylesheet" href="' . SIMPLE_WP_MEMBERSHIP_URL . '/css/swpm.addons.listing.css" />' . "\n";
?>
<h1><?php
echo SwpmUtils::_('Simple WP Membership::Add-ons');
?>
</h1>
<div class="wrap">
<?php
$addons_data = array();
$addon_1 = array('name' => 'After Login Redirection', 'thumbnail' => SIMPLE_WP_MEMBERSHIP_URL . '/images/addons/swpm-login-redirection.png', 'description' => 'Allows you to configure after login redirection to a specific page based on the member\'s level', 'page_url' => 'https://simple-membership-plugin.com/configure-login-redirection-members/');
array_push($addons_data, $addon_1);
$addon_2 = array('name' => 'MailChimp Integration', 'thumbnail' => SIMPLE_WP_MEMBERSHIP_URL . '/images/addons/mailchimp-integration.png', 'description' => 'Allows you to signup the member to your MailChimp list after registration', 'page_url' => 'https://simple-membership-plugin.com/signup-members-mailchimp-list/');
array_push($addons_data, $addon_2);
$addon_3 = array('name' => 'Form Shortcode', 'thumbnail' => SIMPLE_WP_MEMBERSHIP_URL . '/images/addons/form-shortcode-generator.png', 'description' => 'Simple Membership Addon to generate form shortcode for specific membership level.', 'page_url' => 'https://simple-membership-plugin.com/simple-membership-registration-form-shortcode-generator/');
array_push($addons_data, $addon_3);
$addon_4 = array('name' => 'WP User Import', 'thumbnail' => SIMPLE_WP_MEMBERSHIP_URL . '/images/addons/wp-user-import.png', 'description' => 'Addon for importing existing Wordpress users to Simple Membership plugin', 'page_url' => 'https://simple-membership-plugin.com/import-existing-wordpress-users-simple-membership-plugin/');
array_push($addons_data, $addon_4);
$addon_5 = array('name' => 'Form Builder', 'thumbnail' => SIMPLE_WP_MEMBERSHIP_URL . '/images/addons/swpm-form-builder.png', 'description' => 'Allows you to fully customize the fields that appear on the registration and edit profile forms of your membership site', 'page_url' => 'https://simple-membership-plugin.com/simple-membership-form-builder-addon/');
array_push($addons_data, $addon_5);
$addon_6 = array('name' => 'Custom Messages', 'thumbnail' => SIMPLE_WP_MEMBERSHIP_URL . '/images/addons/swpm-custom-messages.png', 'description' => 'Custom Messages addon allows you to customize the content protection message that gets output from the membership plugin', 'page_url' => 'https://simple-membership-plugin.com/simple-membership-custom-messages-addon/');
array_push($addons_data, $addon_6);
$addon_7 = array('name' => 'Protect Older Posts', 'thumbnail' => SIMPLE_WP_MEMBERSHIP_URL . '/images/addons/swpm-older-posts-protection.png', 'description' => 'The protect older posts addon allows you to control protection of posts that were published before a member\'s access start date.', 'page_url' => 'https://simple-membership-plugin.com/simple-membership-protect-older-posts-addon/');
array_push($addons_data, $addon_7);
foreach ($addons_data as $addon) {
$output .= '<div class="swpm_addon_item_canvas">';
$output .= '<div class="swpm_addon_item_thumb">';
开发者ID:baperrou,项目名称:beth-PHE5771,代码行数:31,代码来源:admin_add_ons_page.php
示例15: submit_button
echo SwpmUtils::account_state_dropdown('active');
?>
</select>
</td>
</tr>
<?php
include 'admin_member_form_common_part.php';
?>
</tbody>
</table>
<?php
include 'admin_member_form_common_js.php';
?>
<?php
submit_button(SwpmUtils::_('Add New Member '), 'primary', 'createswpmuser', true, array('id' => 'createswpmusersub'));
?>
</form>
</div>
<script>
jQuery(document).ready(function($){
$.validationEngineLanguage.allRules['ajaxUserCall']['url']= '<?php
echo admin_url('admin-ajax.php');
?>
';
$.validationEngineLanguage.allRules['ajaxEmailCall']['url']= '<?php
echo admin_url('admin-ajax.php');
?>
';
$("#swpm-create-user").validationEngine('attach');
});
开发者ID:AndroidScriptAS,项目名称:bismarck_smv,代码行数:31,代码来源:admin_add.php
示例16: get_bulk_actions
function get_bulk_actions()
{
$actions = array('delete' => SwpmUtils::_('Delete'));
return $actions;
}
开发者ID:AndroidScriptAS,项目名称:bismarck_smv,代码行数:5,代码来源:class.swpm-payments-list-table.php
示例17: apply_filters
<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 -->
<?php
} else {
//Button type has been selected. Show the payment button configuration option.
//Fire the action hook. The addons can render the payment button configuration option as appropriate.
$button_type = strip_tags($_REQUEST['button_type']);
do_action('swpm_create_new_button_for_' . $button_type);
//The payment addons will create the button from then redirect to the "edit" interface of that button after save.
}
开发者ID:kevinotsuka,项目名称:coffeecircle,代码行数:31,代码来源:admin_create_payment_buttons.php
示例18: delete_account_button
public static function delete_account_button()
{
$allow_account_deletion = SwpmSettings::get_instance()->get_value('allow-account-deletion');
if (empty($allow_account_deletion)) {
return "";
}
return '<a href="/?delete_account=1"><div class="swpm-account-delete-button">' . SwpmUtils::_("Delete Account") . '</div></a>';
}
开发者ID:baperrou,项目名称:beth-PHE5771,代码行数:8,代码来源:class.swpm-utils.php
示例19: get_template_directory
<?php
//wp_enqueue_script('jquery.data-tables', SIMPLE_WP_MEMBERSHIP_URL . '/js/data-tables.js');
//wp_enqueue_style('style.data-tables', SIMPLE_WP_MEMBERSHIP_URL . '/css/data-tables.css');
//wp_enqueue_script('downloaders', SIMPLE_WP_MEMBERSHIP_URL . '/downloaders/js/downloaders.js');
include_once SIMPLE_WP_MEMBERSHIP_PATH . 'materials/classes/Class_SWPM_Materials.php';
include get_template_directory() . '/page-templates/members-area/classes/Class_MembersArea.php';
$class_materials = new SWPMMaterials();
$class_members = new MembersArea();
$swpm = new SimpleWpMembership();
$auth = SwpmAuth::get_instance();
$get_membership_levels = SwpmUtils::get_all_membership_levels();
$course_array = $class_members->getCourseMaterialsFromDB();
$relative_plugin_url = str_replace($_SERVER['DOCUMENT_ROOT'], "", SIMPLE_WP_MEMBERSHIP_PATH);
include_once SIMPLE_WP_MEMBERSHIP_PATH . 'materials/views/view.php';
开发者ID:andrewfieldwmg,项目名称:greenschoolsproject,代码行数:15,代码来源:controller.php
示例20: esc_attr
<tr>
<th scope="row"><label for="country"><?php
echo SwpmUtils::_('Country');
?>
</label></th>
<td><input class="regular-text" name="country" type="text" id="country" value="<?php
echo esc_attr($country);
?>
" /></td>
</tr>
<tr>
<th scope="row"><label for="company_name"><?php
echo SwpmUtils::_('Company');
?>
</label></th>
<td><input name="company_name" type="text" id="company_name" class="regular-text" value="<?php
echo esc_attr($company_name);
?>
" /></td>
</tr>
<tr>
<th scope="row"><label for="member_since"><?php
echo SwpmUtils::_('Member Since');
?>
</label></th>
<td><input class="regular-text" name="member_since" type="text" id="member_since" value="<?php
echo esc_attr($member_since);
?>
" /></td>
</tr>
开发者ID:jesusmarket,项目名称:jesusmarket,代码行数:30,代码来源:admin_member_form_common_part.php
注:本文中的SwpmUtils类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论