Version Description
Download this release
Release Info
Developer | sohelamin |
Plugin | WP User Frontend – Membership, Profile, Registration & Post Submission Plugin for WordPress |
Version | 2.4.1 |
Comparing to | |
See all releases |
Code changes from version 2.4 to 2.4.1
- .gitignore +0 -11
- admin/form.php +15 -15
- admin/html/modal.php +3 -3
- admin/posting.php +1 -1
- admin/subscription.php +23 -24
- admin/template-post.php +1 -1
- admin/transaction.php +1 -1
- assets/js/frontend-form.js +5 -4
- assets/js/frontend-form.min.js +1 -1
- class/frontend-form-post.php +10 -7
- class/payment.php +24 -7
- class/render-form.php +16 -7
- class/subscription.php +79 -38
- includes/countries-formated.php +978 -0
- includes/free/edit-profile.php +13 -13
- includes/free/edit-user.php +10 -9
- languages/wpuf.pot +131 -131
- lib/gateway/paypal.php +22 -18
- readme.txt +59 -6
- templates/login-form.php +2 -2
- templates/lost-pass-form.php +2 -2
- templates/reset-pass-form.php +3 -3
- wpuf-functions.php +21 -1
- wpuf.php +6 -4
.gitignore
DELETED
@@ -1,11 +0,0 @@
|
|
1 |
-
.DS_Store
|
2 |
-
plugin-deploy.sh
|
3 |
-
config.codekit
|
4 |
-
export.sh
|
5 |
-
.idea
|
6 |
-
/.DS_Store
|
7 |
-
nbproject
|
8 |
-
node_modules
|
9 |
-
includes/pro
|
10 |
-
build
|
11 |
-
secret.json
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/form.php
CHANGED
@@ -447,7 +447,7 @@ class WPUF_Admin_Form {
|
|
447 |
|
448 |
$post_types = get_post_types( array('public' => true) );
|
449 |
foreach ($post_types as $post_type) {
|
450 |
-
add_meta_box( 'wpuf-select-form', __('WPUF Form'), array($this, 'form_selection_metabox'), $post_type, 'side', 'high' );
|
451 |
}
|
452 |
}
|
453 |
|
@@ -545,22 +545,22 @@ class WPUF_Admin_Form {
|
|
545 |
if ( $can_publish ) :
|
546 |
if ( !empty( $post->post_date_gmt ) && time() < strtotime( $post->post_date_gmt . ' +0000' ) ) :
|
547 |
?>
|
548 |
-
<input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e( 'Schedule' ) ?>" />
|
549 |
-
<?php submit_button( __( 'Schedule' ), 'primary button-large', 'publish', false, array('accesskey' => 'p') ); ?>
|
550 |
<?php else : ?>
|
551 |
-
<input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e( 'Publish' ) ?>" />
|
552 |
-
<?php submit_button( __( 'Publish' ), 'primary button-large', 'publish', false, array('accesskey' => 'p') ); ?>
|
553 |
<?php endif;
|
554 |
else :
|
555 |
?>
|
556 |
-
<input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e( 'Submit for Review' ) ?>" />
|
557 |
-
<?php submit_button( __( 'Submit for Review' ), 'primary button-large', 'publish', false, array('accesskey' => 'p') ); ?>
|
558 |
<?php
|
559 |
endif;
|
560 |
} else {
|
561 |
?>
|
562 |
-
<input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e( 'Update' ) ?>" />
|
563 |
-
<input name="save" type="submit" class="button button-primary button-large" id="publish" accesskey="p" value="<?php esc_attr_e( 'Update' ) ?>" />
|
564 |
<?php }
|
565 |
?>
|
566 |
</div>
|
@@ -641,8 +641,8 @@ class WPUF_Admin_Form {
|
|
641 |
|
642 |
$guest_post = isset( $form_settings['guest_post'] ) ? $form_settings['guest_post'] : 'false';
|
643 |
$guest_details = isset( $form_settings['guest_details'] ) ? $form_settings['guest_details'] : 'true';
|
644 |
-
$name_label = isset( $form_settings['name_label'] ) ? $form_settings['name_label'] : __( 'Name' );
|
645 |
-
$email_label = isset( $form_settings['email_label'] ) ? $form_settings['email_label'] : __( 'Email' );
|
646 |
$message_restrict = isset( $form_settings['message_restrict'] ) ? $form_settings['message_restrict'] : $restrict_message;
|
647 |
|
648 |
$redirect_to = isset( $form_settings['redirect_to'] ) ? $form_settings['redirect_to'] : 'post';
|
@@ -812,7 +812,7 @@ class WPUF_Admin_Form {
|
|
812 |
?>
|
813 |
</select>
|
814 |
<p class="description">
|
815 |
-
<?php _e( 'After successfull submit, where the page will redirect to',
|
816 |
</p>
|
817 |
</td>
|
818 |
</tr>
|
@@ -851,8 +851,8 @@ class WPUF_Admin_Form {
|
|
851 |
<th><?php _e( 'Comment Status', 'wpuf' ); ?></th>
|
852 |
<td>
|
853 |
<select name="wpuf_settings[comment_status]">
|
854 |
-
<option value="open" <?php selected( $comment_status, 'open'); ?>><?php _e('Open'); ?></option>
|
855 |
-
<option value="closed" <?php selected( $comment_status, 'closed'); ?>><?php _e('Closed'); ?></option>
|
856 |
</select>
|
857 |
</td>
|
858 |
</tr>
|
@@ -971,7 +971,7 @@ class WPUF_Admin_Form {
|
|
971 |
</tr>
|
972 |
|
973 |
<tr class="wpuf-subscription-pack" style="display: none;">
|
974 |
-
<th><?php _e( 'Subscription Title'); ?></th>
|
975 |
<td>
|
976 |
<select id="wpuf-subscription-list" name="wpuf_settings[subscription]">
|
977 |
<?php $this->subscription_dropdown( $subscription ); ?>
|
447 |
|
448 |
$post_types = get_post_types( array('public' => true) );
|
449 |
foreach ($post_types as $post_type) {
|
450 |
+
add_meta_box( 'wpuf-select-form', __('WPUF Form', 'wpuf'), array($this, 'form_selection_metabox'), $post_type, 'side', 'high' );
|
451 |
}
|
452 |
}
|
453 |
|
545 |
if ( $can_publish ) :
|
546 |
if ( !empty( $post->post_date_gmt ) && time() < strtotime( $post->post_date_gmt . ' +0000' ) ) :
|
547 |
?>
|
548 |
+
<input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e( 'Schedule', 'wpuf' ) ?>" />
|
549 |
+
<?php submit_button( __( 'Schedule', 'wpuf' ), 'primary button-large', 'publish', false, array('accesskey' => 'p') ); ?>
|
550 |
<?php else : ?>
|
551 |
+
<input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e( 'Publish', 'wpuf' ) ?>" />
|
552 |
+
<?php submit_button( __( 'Publish', 'wpuf' ), 'primary button-large', 'publish', false, array('accesskey' => 'p') ); ?>
|
553 |
<?php endif;
|
554 |
else :
|
555 |
?>
|
556 |
+
<input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e( 'Submit for Review', 'wpuf' ) ?>" />
|
557 |
+
<?php submit_button( __( 'Submit for Review', 'wpuf' ), 'primary button-large', 'publish', false, array('accesskey' => 'p') ); ?>
|
558 |
<?php
|
559 |
endif;
|
560 |
} else {
|
561 |
?>
|
562 |
+
<input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e( 'Update', 'wpuf' ) ?>" />
|
563 |
+
<input name="save" type="submit" class="button button-primary button-large" id="publish" accesskey="p" value="<?php esc_attr_e( 'Update', 'wpuf' ) ?>" />
|
564 |
<?php }
|
565 |
?>
|
566 |
</div>
|
641 |
|
642 |
$guest_post = isset( $form_settings['guest_post'] ) ? $form_settings['guest_post'] : 'false';
|
643 |
$guest_details = isset( $form_settings['guest_details'] ) ? $form_settings['guest_details'] : 'true';
|
644 |
+
$name_label = isset( $form_settings['name_label'] ) ? $form_settings['name_label'] : __( 'Name', 'wpuf' );
|
645 |
+
$email_label = isset( $form_settings['email_label'] ) ? $form_settings['email_label'] : __( 'Email', 'wpuf' );
|
646 |
$message_restrict = isset( $form_settings['message_restrict'] ) ? $form_settings['message_restrict'] : $restrict_message;
|
647 |
|
648 |
$redirect_to = isset( $form_settings['redirect_to'] ) ? $form_settings['redirect_to'] : 'post';
|
812 |
?>
|
813 |
</select>
|
814 |
<p class="description">
|
815 |
+
<?php _e( 'After successfull submit, where the page will redirect to', 'wpuf' ) ?>
|
816 |
</p>
|
817 |
</td>
|
818 |
</tr>
|
851 |
<th><?php _e( 'Comment Status', 'wpuf' ); ?></th>
|
852 |
<td>
|
853 |
<select name="wpuf_settings[comment_status]">
|
854 |
+
<option value="open" <?php selected( $comment_status, 'open'); ?>><?php _e( 'Open', 'wpuf' ); ?></option>
|
855 |
+
<option value="closed" <?php selected( $comment_status, 'closed'); ?>><?php _e( 'Closed', 'wpuf' ); ?></option>
|
856 |
</select>
|
857 |
</td>
|
858 |
</tr>
|
971 |
</tr>
|
972 |
|
973 |
<tr class="wpuf-subscription-pack" style="display: none;">
|
974 |
+
<th><?php _e( 'Subscription Title', 'wpuf'); ?></th>
|
975 |
<td>
|
976 |
<select id="wpuf-subscription-list" name="wpuf_settings[subscription]">
|
977 |
<?php $this->subscription_dropdown( $subscription ); ?>
|
admin/html/modal.php
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
<div id="wpuf-form-template-modal">
|
2 |
<div class="wpuf-form-template-modal">
|
3 |
|
4 |
-
<span id="modal-label" class="screen-reader-text"><?php _e( 'Modal window. Press escape to close.',
|
5 |
-
<a href="#" class="close">× <span class="screen-reader-text"><?php _e( 'Close modal window',
|
6 |
|
7 |
<header class="modal-header">
|
8 |
<h2>
|
@@ -57,7 +57,7 @@
|
|
57 |
|
58 |
<footer>
|
59 |
<?php printf( __( 'List of available templates can be found <a href="%s" target="_blank">here</a>.', 'wpuf' ), 'http://docs.wedevs.com/?p=3718' ); ?>
|
60 |
-
<?php printf( __( 'Want a new integration? <a href="%s" target="_blank">Let us know</a>.'), 'mailto:support@wedevs.com?subject=WPUF Custom Post Template Integration Request' ); ?>
|
61 |
</footer>
|
62 |
</div>
|
63 |
<div class="wpuf-form-template-modal-backdrop"></div>
|
1 |
<div id="wpuf-form-template-modal">
|
2 |
<div class="wpuf-form-template-modal">
|
3 |
|
4 |
+
<span id="modal-label" class="screen-reader-text"><?php _e( 'Modal window. Press escape to close.', 'wpuf' ); ?></span>
|
5 |
+
<a href="#" class="close">× <span class="screen-reader-text"><?php _e( 'Close modal window', 'wpuf' ); ?></span></a>
|
6 |
|
7 |
<header class="modal-header">
|
8 |
<h2>
|
57 |
|
58 |
<footer>
|
59 |
<?php printf( __( 'List of available templates can be found <a href="%s" target="_blank">here</a>.', 'wpuf' ), 'http://docs.wedevs.com/?p=3718' ); ?>
|
60 |
+
<?php printf( __( 'Want a new integration? <a href="%s" target="_blank">Let us know</a>.', 'wpuf'), 'mailto:support@wedevs.com?subject=WPUF Custom Post Template Integration Request' ); ?>
|
61 |
</footer>
|
62 |
</div>
|
63 |
<div class="wpuf-form-template-modal-backdrop"></div>
|
admin/posting.php
CHANGED
@@ -55,7 +55,7 @@ class WPUF_Admin_Posting extends WPUF_Render_Form {
|
|
55 |
'plupload' => array(
|
56 |
'url' => admin_url( 'admin-ajax.php' ) . '?nonce=' . wp_create_nonce( 'wpuf-upload-nonce' ),
|
57 |
'flash_swf_url' => includes_url( 'js/plupload/plupload.flash.swf' ),
|
58 |
-
'filters' => array(array('title' => __( 'Allowed Files' ), 'extensions' => '*')),
|
59 |
'multipart' => true,
|
60 |
'urlstream_upload' => true,
|
61 |
'warning' => __( 'Maximum number of files reached!', 'wpuf' ),
|
55 |
'plupload' => array(
|
56 |
'url' => admin_url( 'admin-ajax.php' ) . '?nonce=' . wp_create_nonce( 'wpuf-upload-nonce' ),
|
57 |
'flash_swf_url' => includes_url( 'js/plupload/plupload.flash.swf' ),
|
58 |
+
'filters' => array(array('title' => __( 'Allowed Files', 'wpuf' ), 'extensions' => '*')),
|
59 |
'multipart' => true,
|
60 |
'urlstream_upload' => true,
|
61 |
'warning' => __( 'Maximum number of files reached!', 'wpuf' ),
|
admin/subscription.php
CHANGED
@@ -48,17 +48,17 @@ class WPUF_Admin_Subscription {
|
|
48 |
*/
|
49 |
function form_updated_message( $messages ) {
|
50 |
$message = array(
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
10 => __('Subscription pack draft updated.'),
|
62 |
);
|
63 |
|
64 |
$messages['wpuf_subscription'] = $message;
|
@@ -443,22 +443,22 @@ class WPUF_Admin_Subscription {
|
|
443 |
}
|
444 |
$userdata = get_userdata( $profileuser->ID ); //wp 3.3 fix
|
445 |
|
446 |
-
$packs
|
447 |
$user_sub = WPUF_Subscription::get_user_pack( $userdata->ID );
|
448 |
-
$pack_id
|
449 |
?>
|
450 |
<div class="wpuf-user-subscription">
|
451 |
<h3><?php _e( 'WPUF Subscription', 'wpuf' ); ?></h3>
|
452 |
<?php
|
453 |
|
454 |
-
|
455 |
if ( isset( $user_sub['pack_id'] ) ) :
|
456 |
|
457 |
-
$pack
|
458 |
$details_meta = WPUF_Subscription::init()->get_details_meta_value();
|
459 |
|
460 |
-
$billing_amount = ( intval( $pack->meta_value['billing_amount'] ) > 0 ) ? $details_meta['symbol'] . $pack->meta_value['billing_amount'] : __( 'Free', 'wpuf' );
|
461 |
-
|
|
|
462 |
$recurring_des = sprintf( 'For each %s %s', $pack->meta_value['billing_cycle_number'], $pack->meta_value['cycle_period'], $pack->meta_value['trial_duration_type'] );
|
463 |
$recurring_des .= !empty( $pack->meta_value['billing_limit'] ) ? sprintf( ', for %s installments', $pack->meta_value['billing_limit'] ) : '';
|
464 |
$recurring_des = $recurring_des;
|
@@ -477,19 +477,18 @@ class WPUF_Admin_Subscription {
|
|
477 |
<?php
|
478 |
} ?>
|
479 |
<div class="wpuf-text">
|
480 |
-
<div><strong><?php _e( 'Subcription Name: ','wpuf' ); ?></strong><?php echo $pack->post_title; ?></div>
|
481 |
<div>
|
482 |
-
<strong><?php _e( 'Package billing details: '); ?></strong>
|
483 |
<div class="wpuf-pricing-wrap">
|
484 |
<div class="wpuf-sub-amount">
|
485 |
<?php echo $billing_amount; ?>
|
486 |
<?php echo $recurring_des; ?>
|
487 |
-
|
488 |
-
</div>
|
489 |
</div>
|
490 |
</div>
|
491 |
|
492 |
-
<strong><?php _e( 'Remaining post: ',
|
493 |
<table class="form-table">
|
494 |
|
495 |
<?php
|
@@ -511,7 +510,7 @@ class WPUF_Admin_Subscription {
|
|
511 |
|
512 |
?>
|
513 |
<tr>
|
514 |
-
<th><label><?php echo _e('Expire date:'); ?></label></th>
|
515 |
<td><input type="text" class="wpuf-date-picker" name="expire" value="<?php echo wpuf_get_date( $expire ); ?>"></td>
|
516 |
</tr>
|
517 |
<?php
|
@@ -525,7 +524,7 @@ class WPUF_Admin_Subscription {
|
|
525 |
$time_type = isset($_post_expiration_time[1]) && !empty($_post_expiration_time[1])?$_post_expiration_time[1]:'day';
|
526 |
?>
|
527 |
<tr>
|
528 |
-
<th><label><?php echo _e('Post Expiration Enabled'); ?></label></th>
|
529 |
<td><input type="checkbox" name="is_post_expiration_enabled" value="on" <?php echo $is_post_exp_selected;?>></td>
|
530 |
</tr>
|
531 |
<tr>
|
48 |
*/
|
49 |
function form_updated_message( $messages ) {
|
50 |
$message = array(
|
51 |
+
0 => '',
|
52 |
+
1 => __( 'Subscription pack updated.', 'wpuf' ),
|
53 |
+
2 => __( 'Custom field updated.', 'wpuf' ),
|
54 |
+
3 => __( 'Custom field deleted.', 'wpuf' ),
|
55 |
+
4 => __( 'Subscription pack updated.', 'wpuf' ),
|
56 |
+
5 => isset( $_GET['revision'] ) ? sprintf( __( 'Subscription pack restored to revision from %s', 'wpuf' ), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false,
|
57 |
+
6 => __( 'Subscription pack published.', 'wpuf' ),
|
58 |
+
7 => __( 'Subscription pack saved.', 'wpuf' ),
|
59 |
+
8 => __( 'Subscription pack submitted.', 'wpuf' ),
|
60 |
+
9 => '',
|
61 |
+
10 => __( 'Subscription pack draft updated.', 'wpuf' ),
|
62 |
);
|
63 |
|
64 |
$messages['wpuf_subscription'] = $message;
|
443 |
}
|
444 |
$userdata = get_userdata( $profileuser->ID ); //wp 3.3 fix
|
445 |
|
446 |
+
$packs = WPUF_Subscription::init()->get_subscriptions();
|
447 |
$user_sub = WPUF_Subscription::get_user_pack( $userdata->ID );
|
448 |
+
$pack_id = isset( $user_sub['pack_id'] ) ? $user_sub['pack_id'] : '';
|
449 |
?>
|
450 |
<div class="wpuf-user-subscription">
|
451 |
<h3><?php _e( 'WPUF Subscription', 'wpuf' ); ?></h3>
|
452 |
<?php
|
453 |
|
|
|
454 |
if ( isset( $user_sub['pack_id'] ) ) :
|
455 |
|
456 |
+
$pack = WPUF_Subscription::get_subscription( $user_sub['pack_id'] );
|
457 |
$details_meta = WPUF_Subscription::init()->get_details_meta_value();
|
458 |
|
459 |
+
$billing_amount = ( isset( $pack->meta_value['billing_amount'] ) && intval( $pack->meta_value['billing_amount'] ) > 0 ) ? $details_meta['symbol'] . $pack->meta_value['billing_amount'] : __( 'Free', 'wpuf' );
|
460 |
+
$recurring_pay = ( isset( $pack->meta_value['recurring_pay'] ) && $pack->meta_value['recurring_pay'] == 'yes' ) ? true : false;
|
461 |
+
if ( $billing_amount && $recurring_pay ) {
|
462 |
$recurring_des = sprintf( 'For each %s %s', $pack->meta_value['billing_cycle_number'], $pack->meta_value['cycle_period'], $pack->meta_value['trial_duration_type'] );
|
463 |
$recurring_des .= !empty( $pack->meta_value['billing_limit'] ) ? sprintf( ', for %s installments', $pack->meta_value['billing_limit'] ) : '';
|
464 |
$recurring_des = $recurring_des;
|
477 |
<?php
|
478 |
} ?>
|
479 |
<div class="wpuf-text">
|
480 |
+
<div><strong><?php _e( 'Subcription Name: ','wpuf' ); ?></strong><?php echo isset( $pack->post_title ) ? $pack->post_title : ''; ?></div>
|
481 |
<div>
|
482 |
+
<strong><?php _e( 'Package billing details: ', 'wpuf'); ?></strong>
|
483 |
<div class="wpuf-pricing-wrap">
|
484 |
<div class="wpuf-sub-amount">
|
485 |
<?php echo $billing_amount; ?>
|
486 |
<?php echo $recurring_des; ?>
|
487 |
+
</div
|
|
|
488 |
</div>
|
489 |
</div>
|
490 |
|
491 |
+
<strong><?php _e( 'Remaining post: ','wpuf'); ?></strong>
|
492 |
<table class="form-table">
|
493 |
|
494 |
<?php
|
510 |
|
511 |
?>
|
512 |
<tr>
|
513 |
+
<th><label><?php echo _e('Expire date:' , 'wpuf'); ?></label></th>
|
514 |
<td><input type="text" class="wpuf-date-picker" name="expire" value="<?php echo wpuf_get_date( $expire ); ?>"></td>
|
515 |
</tr>
|
516 |
<?php
|
524 |
$time_type = isset($_post_expiration_time[1]) && !empty($_post_expiration_time[1])?$_post_expiration_time[1]:'day';
|
525 |
?>
|
526 |
<tr>
|
527 |
+
<th><label><?php echo _e('Post Expiration Enabled', 'wpuf'); ?></label></th>
|
528 |
<td><input type="checkbox" name="is_post_expiration_enabled" value="on" <?php echo $is_post_exp_selected;?>></td>
|
529 |
</tr>
|
530 |
<tr>
|
admin/template-post.php
CHANGED
@@ -283,7 +283,7 @@ class WPUF_Admin_Template_Post extends WPUF_Admin_Template {
|
|
283 |
var hide_field_value = JSON.parse('<?php echo json_encode($param['names_to_hide']['value']);?>');
|
284 |
var show_field_name = '<?php echo $param['names_to_show']['name'];?>';
|
285 |
var show_field_value = JSON.parse('<?php echo json_encode($param['names_to_show']['value']);?>');
|
286 |
-
var countries = <?php echo
|
287 |
var hide_field_option_string = '';
|
288 |
var show_field_option_string = '';
|
289 |
|
283 |
var hide_field_value = JSON.parse('<?php echo json_encode($param['names_to_hide']['value']);?>');
|
284 |
var show_field_name = '<?php echo $param['names_to_show']['name'];?>';
|
285 |
var show_field_value = JSON.parse('<?php echo json_encode($param['names_to_show']['value']);?>');
|
286 |
+
var countries = <?php echo wpuf_get_countries( 'json' ); ?>;
|
287 |
var hide_field_option_string = '';
|
288 |
var show_field_option_string = '';
|
289 |
|
admin/transaction.php
CHANGED
@@ -197,7 +197,7 @@ $transactions = $wpdb->get_results( "SELECT * FROM {$wpdb->prefix}wpuf_transacti
|
|
197 |
?>
|
198 |
<tr valign="top" <?php echo ( ($count % 2) == 0) ? 'class="alternate"' : ''; ?>>
|
199 |
<td>#<?php echo $order->ID; ?></td>
|
200 |
-
<td><?php printf('<a href="%s">[%d] %s %s</a>', admin_url( 'edit
|
201 |
<td><?php echo ucfirst( $data['type'] ); ?></td>
|
202 |
<td><?php echo $data['price'] . ' ' . $data['currency']; ?></td>
|
203 |
<td><?php echo $data['item_name']; ?></td>
|
197 |
?>
|
198 |
<tr valign="top" <?php echo ( ($count % 2) == 0) ? 'class="alternate"' : ''; ?>>
|
199 |
<td>#<?php echo $order->ID; ?></td>
|
200 |
+
<td><?php printf('<a href="%s">[%d] %s %s</a>', admin_url( 'user-edit.php?user_id=' . $data['user_info']['id'] ), $data['user_info']['id'], $data['user_info']['first_name'], $data['user_info']['last_name'] ); ?></td>
|
201 |
<td><?php echo ucfirst( $data['type'] ); ?></td>
|
202 |
<td><?php echo $data['price'] . ' ' . $data['currency']; ?></td>
|
203 |
<td><?php echo $data['item_name']; ?></td>
|
assets/js/frontend-form.js
CHANGED
@@ -89,8 +89,8 @@
|
|
89 |
|
90 |
// first fieldset doesn't have prev button,
|
91 |
// last fieldset doesn't have next button
|
92 |
-
$('fieldset
|
93 |
-
$('fieldset
|
94 |
|
95 |
// at first first fieldset will be shown, and others will be hidden
|
96 |
$('.wpuf-form fieldset').removeClass('field-active').first().addClass('field-active');
|
@@ -139,7 +139,7 @@
|
|
139 |
|
140 |
// js_obj.formSubmit();
|
141 |
if ( $(this).hasClass('wpuf-multistep-next-btn') ) {
|
142 |
-
var result = js_obj.formStepCheck( '', $(this).
|
143 |
|
144 |
if ( result != false ) {
|
145 |
o.change_fieldset(++step_number,progressbar_type);
|
@@ -311,7 +311,8 @@
|
|
311 |
var form = fieldset,
|
312 |
submitButton = form.find('input[type=submit]');
|
313 |
form_data = WP_User_Frontend.validateForm(form);
|
314 |
-
|
|
|
315 |
WP_User_Frontend.addErrorNotice( self, 'bottom' );
|
316 |
}
|
317 |
return form_data;
|
89 |
|
90 |
// first fieldset doesn't have prev button,
|
91 |
// last fieldset doesn't have next button
|
92 |
+
$('fieldset.wpuf-multistep-fieldset').find('.wpuf-multistep-prev-btn').first().remove();
|
93 |
+
$('fieldset.wpuf-multistep-fieldset').find('.wpuf-multistep-next-btn').last().remove();
|
94 |
|
95 |
// at first first fieldset will be shown, and others will be hidden
|
96 |
$('.wpuf-form fieldset').removeClass('field-active').first().addClass('field-active');
|
139 |
|
140 |
// js_obj.formSubmit();
|
141 |
if ( $(this).hasClass('wpuf-multistep-next-btn') ) {
|
142 |
+
var result = js_obj.formStepCheck( '', $(this).closest('fieldset') );
|
143 |
|
144 |
if ( result != false ) {
|
145 |
o.change_fieldset(++step_number,progressbar_type);
|
311 |
var form = fieldset,
|
312 |
submitButton = form.find('input[type=submit]');
|
313 |
form_data = WP_User_Frontend.validateForm(form);
|
314 |
+
|
315 |
+
if ( form_data == false ) {
|
316 |
WP_User_Frontend.addErrorNotice( self, 'bottom' );
|
317 |
}
|
318 |
return form_data;
|
assets/js/frontend-form.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
(function(e){var t={init:function(){e(".wpuf-form").on("click","img.wpuf-clone-field",this.cloneField);e(".wpuf-form").on("click","img.wpuf-remove-field",this.removeField);e(".wpuf-form").on("click","a.wpuf-delete-avatar",this.deleteAvatar);e(".wpuf-form").on("click","a#wpuf-post-draft",this.draftPost);e(".wpuf-form-add").on("submit",this.formSubmit);e("form#post").on("submit",this.adminPostSubmit)},cloneField:function(t){t.preventDefault();var n=e(this).closest("tr"),r=n.clone();r.find("input").val("");r.find(":checked").attr("checked","");n.after(r)},removeField:function(){var t=e(this).closest("tr"),n=t.siblings().andSelf().length;n>1&&t.remove()},adminPostSubmit:function(n){n.preventDefault();var r=e(this),i=t.validateForm(r);if(i)return!0},draftPost:function(t){t.preventDefault();var n=e(this),r=e(this).closest("form"),i=r.serialize()+"&action=wpuf_draft_post",s=r.find('input[type="hidden"][name="post_id"]').val(),o=[],u,a;e(".wpuf-rich-validation").each(function(t,n){u=e(n).data("id");a=e.trim(tinyMCE.get(u).getContent());o.push(u+"="+encodeURIComponent(a))});i=i+"&"+o.join("&");n.after(' <span class="wpuf-loading"></span>');e.post(wpuf_frontend.ajaxurl,i,function(t){if(typeof s=="undefined"){var i='<input type="hidden" name="post_id" value="'+t.post_id+'">';i+='<input type="hidden" name="post_date" value="'+t.date+'">';i+='<input type="hidden" name="post_author" value="'+t.post_author+'">';i+='<input type="hidden" name="comment_status" value="'+t.comment_status+'">';r.append(i)}n.next("span.wpuf-loading").remove();n.after('<span class="wpuf-draft-saved"> Post Saved</span>');e(".wpuf-draft-saved").delay(2500).fadeOut("fast",function(){e(this).remove()})})},formSubmit:function(n){n.preventDefault();var r=e(this),i=r.find("input[type=submit]");form_data=t.validateForm(r);if(form_data){r.find("li.wpuf-submit").append('<span class="wpuf-loading"></span>');i.attr("disabled","disabled").addClass("button-primary-disabled");e.post(wpuf_frontend.ajaxurl,form_data,function(t){if(t.success)if(t.show_message==1){r.before('<div class="wpuf-success">'+t.message+"</div>");r.slideUp("fast",function(){r.remove()});e("html, body").animate({scrollTop:e(".wpuf-success").offset().top-100},"fast")}else window.location=t.redirect_to;else{alert(t.error);i.removeAttr("disabled")}i.removeClass("button-primary-disabled");r.find("span.wpuf-loading").remove()})}},validateForm:function(n){var r,i="",s=!1,o=[];t.removeErrors(n);t.removeErrorNotice(n);var u=n.find('[data-required="yes"]');u.each(function(n,r){var i=e(r).data("type");a="";switch(i){case"rich":var o=e(r).data("id");a=e.trim(tinyMCE.get(o).getContent());if(a===""){s=!0;t.markError(r)}break;case"textarea":case"text":a=e.trim(e(r).val());if(a===""){s=!0;t.markError(r)}break;case"select":a=e(r).val();if(!a||a==="-1"){s=!0;t.markError(r)}break;case"multiselect":a=e(r).val();if(a===null||a.length===0){s=!0;t.markError(r)}break;case"tax-checkbox":var u=e(r).children().find("input:checked").length;if(!u){s=!0;t.markError(r)}break;case"radio":var u=e(r).parent().find("input:checked").length;if(!u){s=!0;t.markError(r)}break;case"file":var u=e(r).next("ul").children().length;if(!u){s=!0;t.markError(r)}break;case"email":var a=e(r).val();if(a!==""&&!t.isValidEmail(a)){s=!0;t.markError(r)}break;case"url":var a=e(r).val();if(a!==""&&!t.isValidURL(a)){s=!0;t.markError(r)}}});if(s){t.addErrorNotice(n);return!1}var a=n.serialize(),f=[];e(".wpuf-rich-validation").each(function(t,n){r=e(n).data("id");val=e.trim(tinyMCE.get(r).getContent());f.push(r+"="+encodeURIComponent(val))});a=a+"&"+f.join("&");return a},addErrorNotice:function(t){e(t).find("li.wpuf-submit").append('<div class="wpuf-errors">'+wpuf_frontend.error_message+"</div>")},removeErrorNotice:function(t){e(t).find(".wpuf-errors").remove()},markError:function(t){e(t).closest("li").addClass("has-error");e(t).focus()},removeErrors:function(t){e(t).find(".has-error").removeClass("has-error")},isValidEmail:function(e){var t=new RegExp(/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i);return t.test(e)},isValidURL:function(e){var t=new RegExp("^(http://www.|https://www.|ftp://www.|www.|http://|https://){1}([0-9A-Za-z]+.)");return t.test(e)},insertImage:function(){var t="wpuf-insert-image",n="wpuf-insert-image-container";if(!e("#"+t).length)return;var r=new plupload.Uploader({runtimes:"html5,html4",browse_button:t,container:n,multipart:!0,multipart_params:{action:"wpuf_insert_image"},multiple_queues:!1,multi_selection:!1,urlstream_upload:!0,file_data_name:"wpuf_file",max_file_size:"2mb",url:wpuf_frontend_upload.plupload.url,flash_swf_url:wpuf_frontend_upload.flash_swf_url,filters:[{title:"Allowed Files",extensions:"jpg,jpeg,gif,png,bmp"}]});r.bind("Init",function(e,t){});r.bind("FilesAdded",function(t,r){var i=e("#"+n);e.each(r,function(e,t){i.append('<div class="upload-item" id="'+t.id+'"><div class="progress progress-striped active"><div class="bar"></div></div></div>')});t.refresh();t.start()});r.bind("QueueChanged",function(e){r.start()});r.bind("UploadProgress",function(t,n){var r=e("#"+n.id);e(".bar",r).css({width:n.percent+"%"});e(".percent",r).html(n.percent+"%")});r.bind("Error",function(e,t){alert("Error #"+error.code+": "+error.message)});r.bind("FileUploaded",function(t,n,r){e("#"+n.id).remove();if(r.response!=="error"){var i=!1;typeof tinyMCE!="undefined"&&(i=tinyMCE.execInstanceCommand("post_content","mceInsertContent",!1,r.response));var s=e("#post_content");s.val(s.val()+r.response)}else alert("Something went wrong")});r.init()},deleteAvatar:function(t){t.preventDefault();confirm(e(this).data("confirm"))&&e.post(wpuf_frontend.ajaxurl,{action:"wpuf_delete_avatar",_wpnonce:wpuf_frontend.nonce},function(){window.location.reload()})}};e(function(){t.init();t.insertImage();e("ul.wpuf-payment-gateways").on("click","input[type=radio]",function(t){e(".wpuf-payment-instruction").slideUp(250);e(this).parents("li").find(".wpuf-payment-instruction").slideDown(250)});e("ul.wpuf-payment-gateways li").first().find("input[type=radio]").click()})})(jQuery);
|
1 |
+
!function(a,b){a.fn.listautowidth=function(){return this.each(function(){var b=a(this).width(),c=b/a(this).children("li").length;a(this).children("li").each(function(){var b=a(this).outerWidth(!0)-a(this).width();a(this).width(c-b)})})},b.WP_User_Frontend={pass_val:"",retype_pass_val:"",init:function(){this.enableMultistep(this),a(".wpuf-form").on("click","img.wpuf-clone-field",this.cloneField),a(".wpuf-form").on("click","img.wpuf-remove-field",this.removeField),a(".wpuf-form").on("click","a.wpuf-delete-avatar",this.deleteAvatar),a(".wpuf-form").on("click","a#wpuf-post-draft",this.draftPost),a(".wpuf-form-add").on("submit",this.formSubmit),a("form#post").on("submit",this.adminPostSubmit),a(".wpuf-form").on("keyup","#pass1",this.check_pass_strength),this.ajaxCategory(),a(':submit[name="wpuf_cancel_subscription"]').click(function(){if(!confirm("Are you sure you want to cancel your current subscription ?"))return!1})},check_pass_strength:function(){var b,c=a("#pass1").val();if(a("#pass-strength-result").removeClass("short bad good strong"),!c)return void a("#pass-strength-result").html(" ");if("undefined"!=typeof wp.passwordStrength)switch(b=wp.passwordStrength.meter(c,wp.passwordStrength.userInputBlacklist(),c)){case 2:a("#pass-strength-result").addClass("bad").html(pwsL10n.bad);break;case 3:a("#pass-strength-result").addClass("good").html(pwsL10n.good);break;case 4:a("#pass-strength-result").addClass("strong").html(pwsL10n.strong);break;case 5:a("#pass-strength-result").addClass("short").html(pwsL10n.mismatch);break;default:a("#pass-strength-result").addClass("short").html(pwsL10n.short)}},enableMultistep:function(b){var c=this,d=0,e=a(':hidden[name="wpuf_multistep_type"]').val();if(null!=e){if(a("fieldset.wpuf-multistep-fieldset").find(".wpuf-multistep-prev-btn").first().remove(),a("fieldset.wpuf-multistep-fieldset").find(".wpuf-multistep-next-btn").last().remove(),a(".wpuf-form fieldset").removeClass("field-active").first().addClass("field-active"),"progressive"==e&&0!=a(".wpuf-form .wpuf-multistep-fieldset").length){a("fieldset.wpuf-multistep-fieldset legend").first();a(".wpuf-multistep-progressbar").html('<div class="wpuf-progress-percentage"></div>');var f=a(".wpuf-multistep-progressbar"),g=a(".wpuf-progress-percentage");a(".wpuf-multistep-progressbar").progressbar({change:function(){g.text(f.progressbar("value")+"%")}}),a(".wpuf-multistep-fieldset legend").hide()}else a(".wpuf-form").each(function(){var b=a(this),c=a(".wpuf-multistep-progressbar",b),d="";c.addClass("wizard-steps"),d+='<ul class="wpuf-step-wizard">',a(".wpuf-multistep-fieldset",this).each(function(){d+="<li>"+a.trim(a("legend",this).text())+"</li>",a("legend",this).hide()}),d+="</ul>",c.append(d),a(".wpuf-step-wizard li",c).first().addClass("active-step"),a(".wpuf-step-wizard",c).listautowidth()});this.change_fieldset(d,e),a("fieldset .wpuf-multistep-prev-btn, fieldset .wpuf-multistep-next-btn").click(function(f){if(a(this).hasClass("wpuf-multistep-next-btn")){var g=c.formStepCheck("",a(this).closest("fieldset"));0!=g&&b.change_fieldset(++d,e)}else a(this).hasClass("wpuf-multistep-prev-btn")&&b.change_fieldset(--d,e);return!1})}},change_fieldset:function(b,c){a("fieldset.wpuf-multistep-fieldset").removeClass("field-active").eq(b).addClass("field-active"),a(".wpuf-step-wizard li").each(function(){a(this).index()<=b?"step_by_step"==c?a(this).addClass("passed-wpuf-ms-bar"):a(".wpuf-ps-bar",this).addClass("passed-wpuf-ms-bar"):"step_by_step"==c?a(this).removeClass("passed-wpuf-ms-bar"):a(".wpuf-ps-bar",this).removeClass("passed-wpuf-ms-bar")}),a(".wpuf-step-wizard li").removeClass("wpuf-ms-bar-active active-step completed-step"),a(".passed-wpuf-ms-bar").addClass("completed-step").last().addClass("wpuf-ms-bar-active"),a(".wpuf-ms-bar-active").addClass("active-step");var d=a("fieldset.wpuf-multistep-fieldset").eq(b).find("legend").text();if(d=a.trim(d),"progressive"==c&&0!=a(".wpuf-form .wpuf-multistep-fieldset").length){var e=100*(b+1)/a("fieldset.wpuf-multistep-fieldset").length,e=Number(e.toFixed(2));a(".wpuf-multistep-progressbar").progressbar({value:e}),a(".wpuf-progress-percentage").text(d+" ("+e+"%)")}a(".wpuf-form").trigger("step-change-fieldset")},ajaxCategory:function(){var b=".cat-ajax",c=".category-wrap";a(c).on("change",b,function(){currentLevel=parseInt(a(this).parent().attr("level")),WP_User_Frontend.getChildCats(a(this),"lvl",currentLevel+1,c,"category")})},getChildCats:function(b,c,d,e,f){cat=a(b).val(),results_div=c+d,f="undefined"!=typeof f?f:"category",field_attr=a(b).siblings("span").data("taxonomy"),a.ajax({type:"post",url:wpuf_frontend.ajaxurl,data:{action:"wpuf_get_child_cat",catID:cat,nonce:wpuf_frontend.nonce,field_attr:field_attr},beforeSend:function(){a(b).parent().parent().next(".loading").addClass("wpuf-loading")},complete:function(){a(b).parent().parent().next(".loading").removeClass("wpuf-loading")},success:function(e){a(b).parent().nextAll().each(function(){a(this).remove()}),""!=e&&(a(b).parent().addClass("hasChild").parent().append('<div id="'+c+d+'" level="'+d+'"></div>'),b.parent().parent().find("#"+results_div).html(e).slideDown("fast"))}})},cloneField:function(b){b.preventDefault();var c=a(this).closest("tr"),d=c.clone();d.find("input").val(""),d.find(":checked").attr("checked",""),c.after(d)},removeField:function(){var b=a(this).closest("tr"),c=b.siblings().andSelf().length;c>1&&b.remove()},adminPostSubmit:function(b){b.preventDefault();var c=a(this),d=WP_User_Frontend.validateForm(c);if(d)return!0},draftPost:function(b){b.preventDefault();var c,d,e=a(this),f=a(this).closest("form"),g=f.serialize()+"&action=wpuf_draft_post",h=f.find('input[type="hidden"][name="post_id"]').val(),i=[];a(".wpuf-rich-validation").each(function(b,e){c=a(e).data("id"),d=a.trim(tinyMCE.get(c).getContent()),i.push(c+"="+encodeURIComponent(d))}),g=g+"&"+i.join("&"),e.after(' <span class="wpuf-loading"></span>'),a.post(wpuf_frontend.ajaxurl,g,function(b){if("undefined"==typeof h){var c='<input type="hidden" name="post_id" value="'+b.post_id+'">';c+='<input type="hidden" name="post_date" value="'+b.date+'">',c+='<input type="hidden" name="post_author" value="'+b.post_author+'">',c+='<input type="hidden" name="comment_status" value="'+b.comment_status+'">',f.append(c)}e.next("span.wpuf-loading").remove(),e.after('<span class="wpuf-draft-saved"> Post Saved</span>'),a(".wpuf-draft-saved").delay(2500).fadeOut("fast",function(){a(this).remove()})})},formStepCheck:function(a,b){var c=b;c.find("input[type=submit]");return form_data=WP_User_Frontend.validateForm(c),0==form_data&&WP_User_Frontend.addErrorNotice(self,"bottom"),form_data},formSubmit:function(c){c.preventDefault();var d=a(this),e=d.find("input[type=submit]");form_data=WP_User_Frontend.validateForm(d),form_data&&(d.find("li.wpuf-submit").append('<span class="wpuf-loading"></span>'),e.attr("disabled","disabled").addClass("button-primary-disabled"),a.post(wpuf_frontend.ajaxurl,form_data,function(c){if(c.success)a("body").trigger("wpuf:postform:success",c),1==c.show_message?(d.before('<div class="wpuf-success">'+c.message+"</div>"),d.slideUp("fast",function(){d.remove()}),a("html, body").animate({scrollTop:a(".wpuf-success").offset().top-100},"fast")):b.location=c.redirect_to;else{if("undefined"!=typeof c.type&&"login"===c.type)return void(confirm(c.error)?b.location=c.redirect_to:(e.removeAttr("disabled"),e.removeClass("button-primary-disabled"),d.find("span.wpuf-loading").remove()));alert(c.error),e.removeAttr("disabled")}e.removeClass("button-primary-disabled"),d.find("span.wpuf-loading").remove()}))},validateForm:function(b){var c=!1;error_type="",WP_User_Frontend.removeErrors(b),WP_User_Frontend.removeErrorNotice(b);var d=b.find('[data-required="yes"]:visible');if(d.each(function(b,d){var e=a(d).data("type");switch(h="",e){case"rich":var f=a(d).data("id");h=a.trim(tinyMCE.get(f).getContent()),""===h&&(c=!0,WP_User_Frontend.markError(d));break;case"textarea":case"text":if(a(d).hasClass("password")&&(""==WP_User_Frontend.pass_val?WP_User_Frontend.pass_val=a(d).val():WP_User_Frontend.retype_pass_val=a(d).val(),""!=WP_User_Frontend.pass_val&&""!=WP_User_Frontend.retype_pass_val&&WP_User_Frontend.pass_val!=WP_User_Frontend.retype_pass_val)){c=!0,error_type="mismatch",WP_User_Frontend.markError(d,error_type);break}h=a.trim(a(d).val()),""===h&&(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type));break;case"select":h=a(d).val(),h&&"-1"!==h||(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type));break;case"multiselect":h=a(d).val(),null!==h&&0!==h.length||(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type));break;case"tax-checkbox":var g=a(d).children().find("input:checked").length;g||(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type));break;case"radio":var g=a(d).find("input:checked").length;g||(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type));break;case"file":var g=a(d).find("ul").children().length;g||(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type));break;case"email":var h=a(d).val();""!==h?WP_User_Frontend.isValidEmail(h)||(c=!0,error_type="validation",WP_User_Frontend.markError(d,error_type)):""===h&&(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type));break;case"url":var h=a(d).val();""!==h&&(WP_User_Frontend.isValidURL(h)||(c=!0,error_type="validation",WP_User_Frontend.markError(d,error_type)))}}),c)return WP_User_Frontend.addErrorNotice(b,"end"),!1;var e=b.serialize(),f=[];return a(".wpuf-rich-validation",b).each(function(b,c){var c=a(c),d=c.data("id"),e=c.data("name"),g=a.trim(tinyMCE.get(d).getContent());f.push(e+"="+encodeURIComponent(g))}),e=e+"&"+f.join("&")},addErrorNotice:function(b,c){"bottom"==c?a(".wpuf-multistep-fieldset:visible").append('<div class="wpuf-errors">'+wpuf_frontend.error_message+"</div>"):a(b).find("li.wpuf-submit").append('<div class="wpuf-errors">'+wpuf_frontend.error_message+"</div>")},removeErrorNotice:function(b){a(b).find(".wpuf-errors").remove()},markError:function(b,c){var d="";if(a(b).closest("li").addClass("has-error"),c){switch(d=a(b).closest("li").data("label"),c){case"required":d=d+" "+error_str_obj[c];break;case"mismatch":d=d+" "+error_str_obj[c];break;case"validation":d=d+" "+error_str_obj[c]}a(b).siblings(".wpuf-error-msg").remove(),a(b).after('<div class="wpuf-error-msg">'+d+"</div>")}a(b).focus()},removeErrors:function(b){a(b).find(".has-error").removeClass("has-error"),a(".wpuf-error-msg").remove()},isValidEmail:function(a){var b=new RegExp(/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i);return b.test(a)},isValidURL:function(a){var b=new RegExp("^(http://www.|https://www.|ftp://www.|www.|http://|https://){1}([0-9A-Za-z]+.)");return b.test(a)},insertImage:function(b,c){var d="wpuf-insert-image-container";if(a("#"+b).length){var e=new plupload.Uploader({runtimes:"html5,html4",browse_button:b,container:d,multipart:!0,multipart_params:{action:"wpuf_insert_image",form_id:a("#"+b).data("form_id")},multiple_queues:!1,multi_selection:!1,urlstream_upload:!0,file_data_name:"wpuf_file",max_file_size:"2mb",url:wpuf_frontend_upload.plupload.url,flash_swf_url:wpuf_frontend_upload.flash_swf_url,filters:[{title:"Allowed Files",extensions:"jpg,jpeg,gif,png,bmp"}]});e.bind("Init",function(a,b){}),e.bind("FilesAdded",function(b,c){var e=a("#"+d);a.each(c,function(a,b){e.append('<div class="upload-item" id="'+b.id+'"><div class="progress progress-striped active"><div class="bar"></div></div></div>')}),b.refresh(),b.start()}),e.bind("QueueChanged",function(a){e.start()}),e.bind("UploadProgress",function(b,c){var d=a("#"+c.id);a(".bar",d).css({width:c.percent+"%"}),a(".percent",d).html(c.percent+"%")}),e.bind("Error",function(a,b){alert("Error #"+b.code+": "+b.message)}),e.bind("FileUploaded",function(b,d,e){if(a("#"+d.id).remove(),"error"!==e.response){if("undefined"!=typeof tinyMCE)if("function"!=typeof tinyMCE.execInstanceCommand){var f=tinyMCE.get("post_content_"+c);null!==f&&f.insertContent(e.response)}else tinyMCE.execInstanceCommand("post_content_"+c,"mceInsertContent",!1,e.response);var g=a("#post_content_"+c);g.val(g.val()+e.response)}else alert("Something went wrong")}),e.init()}},deleteAvatar:function(b){b.preventDefault(),confirm(a(this).data("confirm"))&&a.post(wpuf_frontend.ajaxurl,{action:"wpuf_delete_avatar",_wpnonce:wpuf_frontend.nonce},function(){a(b.target).parent().remove()})},editorLimit:{bind:function(b,c,d){"no"===d?(a("textarea#"+c).keydown(function(a){WP_User_Frontend.editorLimit.textareaLimit.call(this,a,b)}),a("textarea#"+c).on("paste",function(c){var d=a(this);setTimeout(function(){WP_User_Frontend.editorLimit.textareaLimit.call(d,c,b)},100)})):setTimeout(function(){tinyMCE.get(c).onKeyDown.add(function(a,c){WP_User_Frontend.editorLimit.tinymce.onKeyDown(a,c,b)}),tinyMCE.get(c).onPaste.add(function(a,c){setTimeout(function(){WP_User_Frontend.editorLimit.tinymce.onPaste(a,c,b)},100)})},1e3)},tinymce:{getStats:function(a){var b=a.getBody(),c=tinymce.trim(b.innerText||b.textContent);return{chars:c.length,words:c.split(/[\w\u2019\'-]+/).length}},onKeyDown:function(b,c,d){var e=WP_User_Frontend.editorLimit.tinymce.getStats(b).words-1;d?a(".mce-path-item.mce-last",b.container).html("Word Limit : "+e+"/"+d):"",d&&e>d&&(WP_User_Frontend.editorLimit.blockTyping(c),jQuery(".mce-path-item.mce-last",b.container).html(wpuf_frontend.word_limit))},onPaste:function(a,b,c){var d=a.getContent().split(" ").slice(0,c).join(" ");a.setContent(d),WP_User_Frontend.editorLimit.make_media_embed_code(d,a)}},textareaLimit:function(b,c){var d=a(this),e=d.val().split(" ");c&&e.length>c?(d.closest(".wpuf-fields").find("span.wpuf-wordlimit-message").html(wpuf_frontend.word_limit),WP_User_Frontend.editorLimit.blockTyping(b)):d.closest(".wpuf-fields").find("span.wpuf-wordlimit-message").html(""),"paste"===b.type&&d.val(e.slice(0,c).join(" "))},blockTyping:function(b){a.inArray(b.keyCode,[46,8,9,27,13,110,190,189])!==-1||65==b.keyCode&&b.ctrlKey===!0||b.keyCode>=35&&b.keyCode<=40||(b.preventDefault(),b.stopPropagation())},make_media_embed_code:function(b,c){a.post(ajaxurl,{action:"make_media_embed_code",content:b},function(a){c.setContent(c.getContent()+c.setContent(a))})}}},a(function(){if(WP_User_Frontend.init(),a("ul.wpuf-payment-gateways").on("click","input[type=radio]",function(b){a(".wpuf-payment-instruction").slideUp(250),a(this).parents("li").find(".wpuf-payment-instruction").slideDown(250)}),a("ul.wpuf-payment-gateways li").find("input[type=radio]").is(":checked")){var b=a("ul.wpuf-payment-gateways li").find("input[type=radio]:checked");b.parents("li").find(".wpuf-payment-instruction").slideDown(250)}else a("ul.wpuf-payment-gateways li").first().find("input[type=radio]").click()})}(jQuery,window);
|
class/frontend-form-post.php
CHANGED
@@ -78,6 +78,10 @@ class WPUF_Frontend_Form_Post extends WPUF_Render_Form {
|
|
78 |
|
79 |
$post_id = isset( $_GET['pid'] ) ? intval( $_GET['pid'] ) : 0;
|
80 |
|
|
|
|
|
|
|
|
|
81 |
//is editing enabled?
|
82 |
if ( wpuf_get_option( 'enable_post_edit', 'wpuf_dashboard', 'yes' ) != 'yes' ) {
|
83 |
return '<div class="wpuf-info">' . __( 'Post Editing is disabled', 'wpuf' ) . '</div>';
|
@@ -564,19 +568,19 @@ class WPUF_Frontend_Form_Post extends WPUF_Render_Form {
|
|
564 |
$form_vars = $this->get_input_fields( $form_id );
|
565 |
$form_settings = wpuf_get_form_settings( $form_id );
|
566 |
|
|
|
567 |
list( $post_vars, $taxonomy_vars, $meta_vars ) = $form_vars;
|
568 |
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
// print_r( $meta_vars );
|
573 |
|
574 |
$postarr = array(
|
575 |
'post_type' => $form_settings['post_type'],
|
576 |
'post_status' => 'draft',
|
577 |
'post_author' => get_current_user_id(),
|
578 |
'post_title' => isset( $_POST['post_title'] ) ? trim( $_POST['post_title'] ) : '',
|
579 |
-
'post_content' => isset( $_POST[
|
580 |
'post_excerpt' => isset( $_POST['post_excerpt'] ) ? trim( $_POST['post_excerpt'] ) : '',
|
581 |
);
|
582 |
|
@@ -599,6 +603,7 @@ class WPUF_Frontend_Form_Post extends WPUF_Render_Form {
|
|
599 |
$post_id = wp_insert_post( $postarr );
|
600 |
|
601 |
if ( $post_id ) {
|
|
|
602 |
self::update_post_meta( $meta_vars, $post_id );
|
603 |
|
604 |
// set the post form_id for later usage
|
@@ -729,8 +734,6 @@ class WPUF_Frontend_Form_Post extends WPUF_Render_Form {
|
|
729 |
$user = get_user_by( 'id', $user_id );
|
730 |
$post = get_post( $post_id );
|
731 |
|
732 |
-
// var_dump($post);
|
733 |
-
|
734 |
$post_field_search = array( '%post_title%', '%post_content%', '%post_excerpt%', '%tags%', '%category%',
|
735 |
'%author%', '%author_email%', '%author_bio%', '%sitename%', '%siteurl%', '%permalink%', '%editlink%' );
|
736 |
|
78 |
|
79 |
$post_id = isset( $_GET['pid'] ) ? intval( $_GET['pid'] ) : 0;
|
80 |
|
81 |
+
if ( !$post_id ) {
|
82 |
+
return '<div class="wpuf-info">' . __( 'Invalid post', 'wpuf' );
|
83 |
+
}
|
84 |
+
|
85 |
//is editing enabled?
|
86 |
if ( wpuf_get_option( 'enable_post_edit', 'wpuf_dashboard', 'yes' ) != 'yes' ) {
|
87 |
return '<div class="wpuf-info">' . __( 'Post Editing is disabled', 'wpuf' ) . '</div>';
|
568 |
$form_vars = $this->get_input_fields( $form_id );
|
569 |
$form_settings = wpuf_get_form_settings( $form_id );
|
570 |
|
571 |
+
$content_slug = 'post_content_'.$form_id;
|
572 |
list( $post_vars, $taxonomy_vars, $meta_vars ) = $form_vars;
|
573 |
|
574 |
+
$charging_enabled = wpuf_get_option( 'charge_posting', 'wpuf_payment' );
|
575 |
+
|
576 |
+
$user_wpuf_subscription_pack = get_user_meta( get_current_user_id(), '_wpuf_subscription_pack', true );
|
|
|
577 |
|
578 |
$postarr = array(
|
579 |
'post_type' => $form_settings['post_type'],
|
580 |
'post_status' => 'draft',
|
581 |
'post_author' => get_current_user_id(),
|
582 |
'post_title' => isset( $_POST['post_title'] ) ? trim( $_POST['post_title'] ) : '',
|
583 |
+
'post_content' => isset( $_POST[$content_slug] ) ? trim( $_POST[$content_slug] ) : '',
|
584 |
'post_excerpt' => isset( $_POST['post_excerpt'] ) ? trim( $_POST['post_excerpt'] ) : '',
|
585 |
);
|
586 |
|
603 |
$post_id = wp_insert_post( $postarr );
|
604 |
|
605 |
if ( $post_id ) {
|
606 |
+
|
607 |
self::update_post_meta( $meta_vars, $post_id );
|
608 |
|
609 |
// set the post form_id for later usage
|
734 |
$user = get_user_by( 'id', $user_id );
|
735 |
$post = get_post( $post_id );
|
736 |
|
|
|
|
|
737 |
$post_field_search = array( '%post_title%', '%post_content%', '%post_excerpt%', '%tags%', '%category%',
|
738 |
'%author%', '%author_email%', '%author_bio%', '%sitename%', '%siteurl%', '%permalink%', '%editlink%' );
|
739 |
|
class/payment.php
CHANGED
@@ -9,9 +9,10 @@
|
|
9 |
class WPUF_Payment {
|
10 |
|
11 |
function __construct() {
|
12 |
-
add_action( 'init', array($this, 'send_to_gateway') );
|
13 |
-
add_action( 'wpuf_payment_received', array($this, 'payment_notify_admin') );
|
14 |
-
add_filter( 'the_content', array($this, 'payment_page') );
|
|
|
15 |
}
|
16 |
|
17 |
public static function get_payment_gateways() {
|
@@ -246,7 +247,7 @@ class WPUF_Payment {
|
|
246 |
*/
|
247 |
function send_to_gateway() {
|
248 |
|
249 |
-
if ( isset( $_POST['
|
250 |
|
251 |
$post_id = isset( $_REQUEST['post_id'] ) ? intval( $_REQUEST['post_id'] ) : 0;
|
252 |
$pack_id = isset( $_REQUEST['pack_id'] ) ? intval( $_REQUEST['pack_id'] ) : 0;
|
@@ -269,7 +270,6 @@ class WPUF_Payment {
|
|
269 |
}
|
270 |
}
|
271 |
|
272 |
-
|
273 |
switch ($type) {
|
274 |
case 'post':
|
275 |
$post = get_post( $post_id );
|
@@ -370,9 +370,9 @@ class WPUF_Payment {
|
|
370 |
global $wpdb;
|
371 |
|
372 |
//check if it's already there
|
373 |
-
$sql = "SELECT transaction_id
|
374 |
FROM " . $wpdb->prefix . "wpuf_transaction
|
375 |
-
WHERE transaction_id =
|
376 |
|
377 |
$result = $wpdb->get_row( $sql );
|
378 |
|
@@ -411,4 +411,21 @@ class WPUF_Payment {
|
|
411 |
wp_mail( $receiver, $subject, $msg, $headers );
|
412 |
}
|
413 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
414 |
}
|
9 |
class WPUF_Payment {
|
10 |
|
11 |
function __construct() {
|
12 |
+
add_action( 'init', array( $this, 'send_to_gateway' ) );
|
13 |
+
add_action( 'wpuf_payment_received', array( $this, 'payment_notify_admin' ) );
|
14 |
+
add_filter( 'the_content', array( $this, 'payment_page' ) );
|
15 |
+
add_action( 'init', array( $this, 'handle_cancel_payment' ) );
|
16 |
}
|
17 |
|
18 |
public static function get_payment_gateways() {
|
247 |
*/
|
248 |
function send_to_gateway() {
|
249 |
|
250 |
+
if ( isset( $_POST['action'] ) && $_POST['action'] == 'wpuf_pay' && wp_verify_nonce( $_POST['_wpnonce'], 'wpuf_payment_gateway' ) ) {
|
251 |
|
252 |
$post_id = isset( $_REQUEST['post_id'] ) ? intval( $_REQUEST['post_id'] ) : 0;
|
253 |
$pack_id = isset( $_REQUEST['pack_id'] ) ? intval( $_REQUEST['pack_id'] ) : 0;
|
270 |
}
|
271 |
}
|
272 |
|
|
|
273 |
switch ($type) {
|
274 |
case 'post':
|
275 |
$post = get_post( $post_id );
|
370 |
global $wpdb;
|
371 |
|
372 |
//check if it's already there
|
373 |
+
$sql = $wpdb->prepare( "SELECT transaction_id
|
374 |
FROM " . $wpdb->prefix . "wpuf_transaction
|
375 |
+
WHERE transaction_id = %s LIMIT 1", $transaction_id );
|
376 |
|
377 |
$result = $wpdb->get_row( $sql );
|
378 |
|
411 |
wp_mail( $receiver, $subject, $msg, $headers );
|
412 |
}
|
413 |
|
414 |
+
/**
|
415 |
+
* Handle the cancel payment
|
416 |
+
*
|
417 |
+
* @return void
|
418 |
+
*
|
419 |
+
* @since 2.4.1
|
420 |
+
*/
|
421 |
+
public function handle_cancel_payment() {
|
422 |
+
if ( ! isset( $_POST['wpuf_payment_cancel_submit'] ) || $_POST['action'] != 'wpuf_cancel_pay' || ! wp_verify_nonce( $_POST['wpuf_payment_cancel'], '_wpnonce' ) ) {
|
423 |
+
return;
|
424 |
+
}
|
425 |
+
|
426 |
+
$gateway = sanitize_text_field( $_POST['gateway'] );
|
427 |
+
|
428 |
+
do_action( "wpuf_cancel_payment_{$gateway}", $_POST );
|
429 |
+
}
|
430 |
+
|
431 |
}
|
class/render-form.php
CHANGED
@@ -295,6 +295,18 @@ class WPUF_Render_Form {
|
|
295 |
*/
|
296 |
function render_form( $form_id, $post_id = NULL, $preview = false ) {
|
297 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
298 |
$form_vars = wpuf_get_form_fields( $form_id );
|
299 |
$form_settings = wpuf_get_form_settings( $form_id );
|
300 |
|
@@ -387,15 +399,11 @@ class WPUF_Render_Form {
|
|
387 |
$condition = json_encode( $cond_inputs );
|
388 |
}
|
389 |
|
390 |
-
|
391 |
?>
|
392 |
<script type="text/javascript">
|
393 |
-
|
394 |
wpuf_conditional_items.push(<?php echo $condition; ?>);
|
395 |
-
|
396 |
</script>
|
397 |
<?php
|
398 |
-
|
399 |
}
|
400 |
|
401 |
/**
|
@@ -621,10 +629,11 @@ class WPUF_Render_Form {
|
|
621 |
box-shadow: 1px 1px 2px rgba(0,0,0,0.1);
|
622 |
}
|
623 |
</style>
|
|
|
|
|
624 |
</head>
|
625 |
<body>
|
626 |
<div class="container">
|
627 |
-
|
628 |
<?php $this->render_form( $form_id, null, true ); ?>
|
629 |
</div>
|
630 |
</body>
|
@@ -686,7 +695,7 @@ class WPUF_Render_Form {
|
|
686 |
}
|
687 |
?>
|
688 |
<div class="wpuf-label">
|
689 |
-
<label for="
|
690 |
</div>
|
691 |
<?php
|
692 |
}
|
@@ -881,7 +890,7 @@ class WPUF_Render_Form {
|
|
881 |
'editor_class' => $req_class,
|
882 |
'textarea_name' => $attr['name']
|
883 |
);
|
884 |
-
|
885 |
$editor_settings = apply_filters( 'wpuf_textarea_editor_args' , $editor_settings );
|
886 |
wp_editor( $value, $textarea_id, $editor_settings );
|
887 |
|
295 |
*/
|
296 |
function render_form( $form_id, $post_id = NULL, $preview = false ) {
|
297 |
|
298 |
+
$form_status = get_post_status( $form_id );
|
299 |
+
|
300 |
+
if ( ! $form_status ) {
|
301 |
+
echo '<div class="wpuf-message">' . __( 'Your selected form is no longer available.', 'wpuf' ) . '</div>';
|
302 |
+
return;
|
303 |
+
}
|
304 |
+
|
305 |
+
if ( $form_status != 'publish' ) {
|
306 |
+
echo '<div class="wpuf-message">' . __( "Please make sure you've published your form.", 'wpuf' ) . '</div>';
|
307 |
+
return;
|
308 |
+
}
|
309 |
+
|
310 |
$form_vars = wpuf_get_form_fields( $form_id );
|
311 |
$form_settings = wpuf_get_form_settings( $form_id );
|
312 |
|
399 |
$condition = json_encode( $cond_inputs );
|
400 |
}
|
401 |
|
|
|
402 |
?>
|
403 |
<script type="text/javascript">
|
|
|
404 |
wpuf_conditional_items.push(<?php echo $condition; ?>);
|
|
|
405 |
</script>
|
406 |
<?php
|
|
|
407 |
}
|
408 |
|
409 |
/**
|
629 |
box-shadow: 1px 1px 2px rgba(0,0,0,0.1);
|
630 |
}
|
631 |
</style>
|
632 |
+
|
633 |
+
<script type="text/javascript" src="<?php echo includes_url( 'js/jquery/jquery.js' ); ?>"></script>
|
634 |
</head>
|
635 |
<body>
|
636 |
<div class="container">
|
|
|
637 |
<?php $this->render_form( $form_id, null, true ); ?>
|
638 |
</div>
|
639 |
</body>
|
695 |
}
|
696 |
?>
|
697 |
<div class="wpuf-label">
|
698 |
+
<label for="<?php echo isset( $attr['name'] ) ? $attr['name'] : 'cls'; ?>"><?php echo $attr['label'] . $this->required_mark( $attr ); ?></label>
|
699 |
</div>
|
700 |
<?php
|
701 |
}
|
890 |
'editor_class' => $req_class,
|
891 |
'textarea_name' => $attr['name']
|
892 |
);
|
893 |
+
|
894 |
$editor_settings = apply_filters( 'wpuf_textarea_editor_args' , $editor_settings );
|
895 |
wp_editor( $value, $textarea_id, $editor_settings );
|
896 |
|
class/subscription.php
CHANGED
@@ -22,6 +22,7 @@ class WPUF_Subscription {
|
|
22 |
add_action( 'wpuf_add_post_form_top', array($this, 'add_post_info'), 10, 2 );
|
23 |
|
24 |
add_action( 'wpuf_add_post_after_insert', array($this, 'monitor_new_post'), 10, 3 );
|
|
|
25 |
add_action( 'wpuf_payment_received', array($this, 'payment_received'), 10, 2 );
|
26 |
|
27 |
add_shortcode( 'wpuf_sub_info', array($this, 'subscription_info') );
|
@@ -29,7 +30,7 @@ class WPUF_Subscription {
|
|
29 |
|
30 |
add_action( 'add_meta_boxes_wpuf_subscription', array($this, 'add_meta_box_subscription_post') );
|
31 |
|
32 |
-
add_action( 'save_post', array( $this, 'save_form_meta' ),
|
33 |
add_filter( 'enter_title_here', array( $this, 'change_default_title' ) );
|
34 |
add_action( 'admin_enqueue_scripts', array( $this, 'subscription_script' ) );
|
35 |
|
@@ -50,20 +51,22 @@ class WPUF_Subscription {
|
|
50 |
*
|
51 |
* @return WPUF_Subscription
|
52 |
*/
|
53 |
-
public function user_subscription_cancel
|
54 |
|
55 |
if ( isset( $_POST['wpuf_cancel_subscription'] ) ) {
|
56 |
|
57 |
if ( ! wp_verify_nonce( $_REQUEST['_wpnonce'], 'wpuf-sub-cancel' ) ) {
|
58 |
-
wp_die( __( 'Nonce failure', '
|
59 |
}
|
60 |
|
61 |
$user_id = get_current_user_id();
|
62 |
$current_pack = self::get_user_pack( $user_id );
|
63 |
|
64 |
if ( $current_pack['recurring'] == 'yes' ) {
|
65 |
-
|
66 |
-
$
|
|
|
|
|
67 |
} else {
|
68 |
WPUF_Subscription::init()->update_user_subscription_meta( $user_id, 'Cancel' );
|
69 |
}
|
@@ -225,7 +228,6 @@ class WPUF_Subscription {
|
|
225 |
$meta['cycle_period'] = get_post_meta( $subscription_id, '_cycle_period', true );
|
226 |
$meta['billing_limit'] = get_post_meta( $subscription_id, '_billing_limit', true );
|
227 |
$meta['trial_status'] = get_post_meta( $subscription_id, '_trial_status', true );
|
228 |
-
$meta['trial_cost'] = get_post_meta( $subscription_id, '_trial_cost', true );
|
229 |
$meta['trial_duration'] = get_post_meta( $subscription_id, '_trial_duration', true );
|
230 |
$meta['trial_duration_type'] = get_post_meta( $subscription_id, '_trial_duration_type', true );
|
231 |
$meta['post_type_name'] = get_post_meta( $subscription_id, '_post_type_name', true );
|
@@ -288,12 +290,14 @@ class WPUF_Subscription {
|
|
288 |
* @return void
|
289 |
*/
|
290 |
function save_form_meta( $subscription_id, $post ) {
|
291 |
-
|
292 |
-
|
|
|
|
|
293 |
return;
|
294 |
}
|
295 |
|
296 |
-
if ( !wp_verify_nonce( $
|
297 |
return;
|
298 |
}
|
299 |
|
@@ -302,24 +306,23 @@ class WPUF_Subscription {
|
|
302 |
return;
|
303 |
}
|
304 |
|
305 |
-
update_post_meta( $subscription_id, '_billing_amount', $
|
306 |
-
update_post_meta( $subscription_id, '_expiration_number', $
|
307 |
-
update_post_meta( $subscription_id, '_expiration_period', $
|
308 |
-
update_post_meta( $subscription_id, '_recurring_pay', $
|
309 |
-
update_post_meta( $subscription_id, '_billing_cycle_number', $
|
310 |
-
update_post_meta( $subscription_id, '_cycle_period', $
|
311 |
-
update_post_meta( $subscription_id, '_billing_limit', $
|
312 |
-
update_post_meta( $subscription_id, '_trial_status', $
|
313 |
-
update_post_meta( $subscription_id, '
|
314 |
-
update_post_meta( $subscription_id, '
|
315 |
-
update_post_meta( $subscription_id, '
|
316 |
-
update_post_meta( $subscription_id, '
|
317 |
-
update_post_meta( $subscription_id, '
|
318 |
-
update_post_meta( $subscription_id, '
|
319 |
-
update_post_meta( $subscription_id, '
|
320 |
-
update_post_meta( $subscription_id, '
|
321 |
-
|
322 |
-
do_action( 'wpuf_update_subscription_pack', $subscription_id, $post );
|
323 |
}
|
324 |
|
325 |
/**
|
@@ -425,8 +428,6 @@ class WPUF_Subscription {
|
|
425 |
return $pack;
|
426 |
}
|
427 |
|
428 |
-
|
429 |
-
|
430 |
/**
|
431 |
* Set the new post status if charging is active
|
432 |
*
|
@@ -498,6 +499,38 @@ class WPUF_Subscription {
|
|
498 |
|
499 |
}
|
500 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
501 |
/**
|
502 |
* Redirect to payment page after new post
|
503 |
*
|
@@ -564,7 +597,7 @@ class WPUF_Subscription {
|
|
564 |
);
|
565 |
|
566 |
if ( $recurring ) {
|
567 |
-
$totla_date = date( 'd-m-Y', strtotime('+' . $
|
568 |
$user_meta['expire'] = '';
|
569 |
$user_meta['profile_id'] = $profile_id;
|
570 |
$user_meta['recurring'] = 'yes';
|
@@ -683,7 +716,7 @@ class WPUF_Subscription {
|
|
683 |
<div class="wpuf-text">
|
684 |
<div><strong><?php _e( 'Subcription Name: ','wpuf' ); ?></strong><?php echo $pack->post_title; ?></div>
|
685 |
<div>
|
686 |
-
<strong><?php _e( 'Package & billing details: '); ?></strong>
|
687 |
|
688 |
<div class="wpuf-pricing-wrap">
|
689 |
<div class="wpuf-sub-amount">
|
@@ -722,7 +755,7 @@ class WPUF_Subscription {
|
|
722 |
|
723 |
?>
|
724 |
<div class="wpuf-expire">
|
725 |
-
<strong><?php echo _e('Expire date:'); ?></strong> <?php echo wpuf_get_date( $expire ); ?>
|
726 |
</div>
|
727 |
<?php
|
728 |
}
|
@@ -773,16 +806,25 @@ class WPUF_Subscription {
|
|
773 |
printf( '<h1>%1$s</h1><p>%2$s</p>', __( 'Payment is complete', 'wpuf' ), __( 'Congratulations, your payment has been completed!', 'wpuf' ) );
|
774 |
}
|
775 |
|
776 |
-
$current_pack = self::get_user_pack( get_current_user_id());
|
777 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
778 |
?>
|
779 |
|
780 |
-
<?php
|
781 |
-
<?php
|
782 |
<?php _e( '<p><i>To cancel the pack, press the following cancel button</i></p>', 'wpuf' ); ?>
|
783 |
|
784 |
<form action="" method="post">
|
785 |
<?php wp_nonce_field( 'wpuf-sub-cancel' ); ?>
|
|
|
786 |
<input type="submit" name="wpuf_cancel_subscription" class="btn btn-sm btn-danger" value="<?php _e( 'Cancel', 'wpuf' ); ?>">
|
787 |
</form>
|
788 |
<?php
|
@@ -828,8 +870,7 @@ class WPUF_Subscription {
|
|
828 |
|
829 |
if ( $billing_amount && $pack->meta_value['recurring_pay'] == 'yes' && $pack->meta_value['trial_status'] == 'yes' ) {
|
830 |
|
831 |
-
$
|
832 |
-
$trial_des = __( sprintf( '%s for the first %s %s', $trial_cost, $pack->meta_value['trial_duration'], $pack->meta_value['trial_duration_type'] ), 'wpuf' );
|
833 |
|
834 |
} else {
|
835 |
$trial_des = '';
|
22 |
add_action( 'wpuf_add_post_form_top', array($this, 'add_post_info'), 10, 2 );
|
23 |
|
24 |
add_action( 'wpuf_add_post_after_insert', array($this, 'monitor_new_post'), 10, 3 );
|
25 |
+
add_action( 'wpuf_draft_post_after_insert', array($this, 'monitor_new_draft_post'), 10, 3 );
|
26 |
add_action( 'wpuf_payment_received', array($this, 'payment_received'), 10, 2 );
|
27 |
|
28 |
add_shortcode( 'wpuf_sub_info', array($this, 'subscription_info') );
|
30 |
|
31 |
add_action( 'add_meta_boxes_wpuf_subscription', array($this, 'add_meta_box_subscription_post') );
|
32 |
|
33 |
+
add_action( 'save_post', array( $this, 'save_form_meta' ), 10, 2 );
|
34 |
add_filter( 'enter_title_here', array( $this, 'change_default_title' ) );
|
35 |
add_action( 'admin_enqueue_scripts', array( $this, 'subscription_script' ) );
|
36 |
|
51 |
*
|
52 |
* @return WPUF_Subscription
|
53 |
*/
|
54 |
+
public function user_subscription_cancel() {
|
55 |
|
56 |
if ( isset( $_POST['wpuf_cancel_subscription'] ) ) {
|
57 |
|
58 |
if ( ! wp_verify_nonce( $_REQUEST['_wpnonce'], 'wpuf-sub-cancel' ) ) {
|
59 |
+
wp_die( __( 'Nonce failure', 'wpuf' ) );
|
60 |
}
|
61 |
|
62 |
$user_id = get_current_user_id();
|
63 |
$current_pack = self::get_user_pack( $user_id );
|
64 |
|
65 |
if ( $current_pack['recurring'] == 'yes' ) {
|
66 |
+
|
67 |
+
$gateway = sanitize_text_field( $_POST['gateway'] );
|
68 |
+
|
69 |
+
do_action( "wpuf_cancel_subscription_{$gateway}", $_POST );
|
70 |
} else {
|
71 |
WPUF_Subscription::init()->update_user_subscription_meta( $user_id, 'Cancel' );
|
72 |
}
|
228 |
$meta['cycle_period'] = get_post_meta( $subscription_id, '_cycle_period', true );
|
229 |
$meta['billing_limit'] = get_post_meta( $subscription_id, '_billing_limit', true );
|
230 |
$meta['trial_status'] = get_post_meta( $subscription_id, '_trial_status', true );
|
|
|
231 |
$meta['trial_duration'] = get_post_meta( $subscription_id, '_trial_duration', true );
|
232 |
$meta['trial_duration_type'] = get_post_meta( $subscription_id, '_trial_duration_type', true );
|
233 |
$meta['post_type_name'] = get_post_meta( $subscription_id, '_post_type_name', true );
|
290 |
* @return void
|
291 |
*/
|
292 |
function save_form_meta( $subscription_id, $post ) {
|
293 |
+
|
294 |
+
$post_data = $_POST;
|
295 |
+
|
296 |
+
if ( !isset( $post_data['wpuf_subscription'] ) ) {
|
297 |
return;
|
298 |
}
|
299 |
|
300 |
+
if ( !wp_verify_nonce( $post_data['wpuf_subscription'], 'wpuf_subscription_editor' ) ) {
|
301 |
return;
|
302 |
}
|
303 |
|
306 |
return;
|
307 |
}
|
308 |
|
309 |
+
update_post_meta( $subscription_id, '_billing_amount', $post_data['billing_amount'] );
|
310 |
+
update_post_meta( $subscription_id, '_expiration_number', $post_data['expiration_number'] );
|
311 |
+
update_post_meta( $subscription_id, '_expiration_period', $post_data['expiration_period'] );
|
312 |
+
update_post_meta( $subscription_id, '_recurring_pay', $post_data['recurring_pay'] );
|
313 |
+
update_post_meta( $subscription_id, '_billing_cycle_number', $post_data['billing_cycle_number'] );
|
314 |
+
update_post_meta( $subscription_id, '_cycle_period', $post_data['cycle_period'] );
|
315 |
+
update_post_meta( $subscription_id, '_billing_limit', $post_data['billing_limit'] );
|
316 |
+
update_post_meta( $subscription_id, '_trial_status', $post_data['trial_status'] );
|
317 |
+
update_post_meta( $subscription_id, '_trial_duration', $post_data['trial_duration'] );
|
318 |
+
update_post_meta( $subscription_id, '_trial_duration_type', $post_data['trial_duration_type'] );
|
319 |
+
update_post_meta( $subscription_id, '_post_type_name', $post_data['post_type_name'] );
|
320 |
+
update_post_meta( $subscription_id, '_enable_post_expiration', ( isset($post_data['post_expiration_settings']['enable_post_expiration']) ? $post_data['post_expiration_settings']['enable_post_expiration']:'' ) );
|
321 |
+
update_post_meta( $subscription_id, '_post_expiration_time', $post_data['post_expiration_settings']['expiration_time_value'] . ' ' . $post_data['post_expiration_settings']['expiration_time_type'] );
|
322 |
+
update_post_meta( $subscription_id, '_expired_post_status', ( isset($post_data['post_expiration_settings']['expired_post_status']) ? $post_data['post_expiration_settings']['expired_post_status']:'' ) );
|
323 |
+
update_post_meta( $subscription_id, '_enable_mail_after_expired', ( isset($post_data['post_expiration_settings']['enable_mail_after_expired']) ? $post_data['post_expiration_settings']['enable_mail_after_expired']:'' ) );
|
324 |
+
update_post_meta( $subscription_id, '_post_expiration_message', ( isset($post_data['post_expiration_settings']['post_expiration_message']) ? $post_data['post_expiration_settings']['post_expiration_message']:'' ) );
|
325 |
+
do_action( 'wpuf_update_subscription_pack', $subscription_id, $post_data );
|
|
|
326 |
}
|
327 |
|
328 |
/**
|
428 |
return $pack;
|
429 |
}
|
430 |
|
|
|
|
|
431 |
/**
|
432 |
* Set the new post status if charging is active
|
433 |
*
|
499 |
|
500 |
}
|
501 |
|
502 |
+
/**
|
503 |
+
* Checks the posting validity after a new draft post
|
504 |
+
*
|
505 |
+
* @global object $userdata
|
506 |
+
* @global object $wpdb
|
507 |
+
* @param int $post_id
|
508 |
+
*/
|
509 |
+
function monitor_new_draft_post( $post_id, $form_id, $form_settings ) {
|
510 |
+
// check form if subscription is disabled
|
511 |
+
if ( isset( $form_settings['subscription_disabled'] ) && $form_settings['subscription_disabled'] == 'yes' ) {
|
512 |
+
return;
|
513 |
+
}
|
514 |
+
global $wpdb, $userdata;
|
515 |
+
|
516 |
+
// bail out if charging is not enabled
|
517 |
+
if ( wpuf_get_option( 'charge_posting', 'wpuf_payment', 'no' ) != 'yes' ) {
|
518 |
+
return;
|
519 |
+
}
|
520 |
+
|
521 |
+
$userdata = get_userdata( get_current_user_id() );
|
522 |
+
|
523 |
+
if ( self::has_user_error( $form_settings ) ) {
|
524 |
+
//there is some error and it needs payment
|
525 |
+
//add a uniqid to track the post easily
|
526 |
+
$order_id = uniqid( rand( 10, 1000 ), false );
|
527 |
+
update_post_meta( $post_id, '_wpuf_order_id', $order_id, true );
|
528 |
+
|
529 |
+
wp_update_post( array( 'ID' => $post_id, 'status' => 'pending' ) );
|
530 |
+
}
|
531 |
+
|
532 |
+
}
|
533 |
+
|
534 |
/**
|
535 |
* Redirect to payment page after new post
|
536 |
*
|
597 |
);
|
598 |
|
599 |
if ( $recurring ) {
|
600 |
+
$totla_date = date( 'd-m-Y', strtotime('+' . $subscription->meta_value['billing_cycle_number'] . $subscription->meta_value['cycle_period'] . 's') );
|
601 |
$user_meta['expire'] = '';
|
602 |
$user_meta['profile_id'] = $profile_id;
|
603 |
$user_meta['recurring'] = 'yes';
|
716 |
<div class="wpuf-text">
|
717 |
<div><strong><?php _e( 'Subcription Name: ','wpuf' ); ?></strong><?php echo $pack->post_title; ?></div>
|
718 |
<div>
|
719 |
+
<strong><?php _e( 'Package & billing details: ', 'wpuf'); ?></strong>
|
720 |
|
721 |
<div class="wpuf-pricing-wrap">
|
722 |
<div class="wpuf-sub-amount">
|
755 |
|
756 |
?>
|
757 |
<div class="wpuf-expire">
|
758 |
+
<strong><?php echo _e( 'Expire date:', 'wpuf' ); ?></strong> <?php echo wpuf_get_date( $expire ); ?>
|
759 |
</div>
|
760 |
<?php
|
761 |
}
|
806 |
printf( '<h1>%1$s</h1><p>%2$s</p>', __( 'Payment is complete', 'wpuf' ), __( 'Congratulations, your payment has been completed!', 'wpuf' ) );
|
807 |
}
|
808 |
|
809 |
+
$current_pack = self::get_user_pack( get_current_user_id() );
|
810 |
+
|
811 |
+
if ( isset( $current_pack['pack_id'] ) ) {
|
812 |
+
|
813 |
+
global $wpdb;
|
814 |
+
|
815 |
+
$user_id = get_current_user_id();
|
816 |
+
$payment_gateway = $wpdb->get_var( "SELECT payment_type FROM {$wpdb->prefix}wpuf_transaction WHERE user_id = {$user_id} AND status = 'completed' ORDER BY created DESC" );
|
817 |
+
|
818 |
+
$payment_gateway = strtolower( $payment_gateway );
|
819 |
?>
|
820 |
|
821 |
+
<?php _e( '<p><i>You have a subscription pack activated. </i></p>', 'wpuf' ); ?>
|
822 |
+
<?php _e( '<p><i>Pack name : '.get_the_title( $current_pack['pack_id'] ).' </i></p>', 'wpuf' ); ?>
|
823 |
<?php _e( '<p><i>To cancel the pack, press the following cancel button</i></p>', 'wpuf' ); ?>
|
824 |
|
825 |
<form action="" method="post">
|
826 |
<?php wp_nonce_field( 'wpuf-sub-cancel' ); ?>
|
827 |
+
<input type="hidden" name="gateway" value="<?php echo $payment_gateway; ?>">
|
828 |
<input type="submit" name="wpuf_cancel_subscription" class="btn btn-sm btn-danger" value="<?php _e( 'Cancel', 'wpuf' ); ?>">
|
829 |
</form>
|
830 |
<?php
|
870 |
|
871 |
if ( $billing_amount && $pack->meta_value['recurring_pay'] == 'yes' && $pack->meta_value['trial_status'] == 'yes' ) {
|
872 |
|
873 |
+
$trial_des = __( sprintf( 'The first %s %s', $pack->meta_value['trial_duration'], $pack->meta_value['trial_duration_type'] ), 'wpuf' );
|
|
|
874 |
|
875 |
} else {
|
876 |
$trial_des = '';
|
includes/countries-formated.php
ADDED
@@ -0,0 +1,978 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
$countries = array(
|
4 |
+
array(
|
5 |
+
'name' => 'Afghanistan',
|
6 |
+
'code' => 'AF',
|
7 |
+
),
|
8 |
+
array(
|
9 |
+
'name' => 'Åland Islands',
|
10 |
+
'code' => 'AX',
|
11 |
+
),
|
12 |
+
array(
|
13 |
+
'name' => 'Albania',
|
14 |
+
'code' => 'AL',
|
15 |
+
),
|
16 |
+
array(
|
17 |
+
'name' => 'Algeria',
|
18 |
+
'code' => 'DZ',
|
19 |
+
),
|
20 |
+
array(
|
21 |
+
'name' => 'American Samoa',
|
22 |
+
'code' => 'AS',
|
23 |
+
),
|
24 |
+
array(
|
25 |
+
'name' => 'AndorrA',
|
26 |
+
'code' => 'AD',
|
27 |
+
),
|
28 |
+
array(
|
29 |
+
'name' => 'Angola',
|
30 |
+
'code' => 'AO',
|
31 |
+
),
|
32 |
+
array(
|
33 |
+
'name' => 'Anguilla',
|
34 |
+
'code' => 'AI',
|
35 |
+
),
|
36 |
+
array(
|
37 |
+
'name' => 'Antarctica',
|
38 |
+
'code' => 'AQ',
|
39 |
+
),
|
40 |
+
array(
|
41 |
+
'name' => 'Antigua and Barbuda',
|
42 |
+
'code' => 'AG',
|
43 |
+
),
|
44 |
+
array(
|
45 |
+
'name' => 'Argentina',
|
46 |
+
'code' => 'AR',
|
47 |
+
),
|
48 |
+
array(
|
49 |
+
'name' => 'Armenia',
|
50 |
+
'code' => 'AM',
|
51 |
+
),
|
52 |
+
array(
|
53 |
+
'name' => 'Aruba',
|
54 |
+
'code' => 'AW',
|
55 |
+
),
|
56 |
+
array(
|
57 |
+
'name' => 'Australia',
|
58 |
+
'code' => 'AU',
|
59 |
+
),
|
60 |
+
array(
|
61 |
+
'name' => 'Austria',
|
62 |
+
'code' => 'AT',
|
63 |
+
),
|
64 |
+
array(
|
65 |
+
'name' => 'Azerbaijan',
|
66 |
+
'code' => 'AZ',
|
67 |
+
),
|
68 |
+
array(
|
69 |
+
'name' => 'Bahamas',
|
70 |
+
'code' => 'BS',
|
71 |
+
),
|
72 |
+
array(
|
73 |
+
'name' => 'Bahrain',
|
74 |
+
'code' => 'BH',
|
75 |
+
),
|
76 |
+
array(
|
77 |
+
'name' => 'Bangladesh',
|
78 |
+
'code' => 'BD',
|
79 |
+
),
|
80 |
+
array(
|
81 |
+
'name' => 'Barbados',
|
82 |
+
'code' => 'BB',
|
83 |
+
),
|
84 |
+
array(
|
85 |
+
'name' => 'Belarus',
|
86 |
+
'code' => 'BY',
|
87 |
+
),
|
88 |
+
array(
|
89 |
+
'name' => 'Belgium',
|
90 |
+
'code' => 'BE',
|
91 |
+
),
|
92 |
+
array(
|
93 |
+
'name' => 'Belize',
|
94 |
+
'code' => 'BZ',
|
95 |
+
),
|
96 |
+
array(
|
97 |
+
'name' => 'Benin',
|
98 |
+
'code' => 'BJ',
|
99 |
+
),
|
100 |
+
array(
|
101 |
+
'name' => 'Bermuda',
|
102 |
+
'code' => 'BM',
|
103 |
+
),
|
104 |
+
array(
|
105 |
+
'name' => 'Bhutan',
|
106 |
+
'code' => 'BT',
|
107 |
+
),
|
108 |
+
array(
|
109 |
+
'name' => 'Bolivia',
|
110 |
+
'code' => 'BO',
|
111 |
+
),
|
112 |
+
array(
|
113 |
+
'name' => 'Bosnia and Herzegovina',
|
114 |
+
'code' => 'BA',
|
115 |
+
),
|
116 |
+
array(
|
117 |
+
'name' => 'Botswana',
|
118 |
+
'code' => 'BW',
|
119 |
+
),
|
120 |
+
array(
|
121 |
+
'name' => 'Bouvet Island',
|
122 |
+
'code' => 'BV',
|
123 |
+
),
|
124 |
+
array(
|
125 |
+
'name' => 'Brazil',
|
126 |
+
'code' => 'BR',
|
127 |
+
),
|
128 |
+
array(
|
129 |
+
'name' => 'British Indian Ocean Territory',
|
130 |
+
'code' => 'IO',
|
131 |
+
),
|
132 |
+
array(
|
133 |
+
'name' => 'Brunei Darussalam',
|
134 |
+
'code' => 'BN',
|
135 |
+
),
|
136 |
+
array(
|
137 |
+
'name' => 'Bulgaria',
|
138 |
+
'code' => 'BG',
|
139 |
+
),
|
140 |
+
array(
|
141 |
+
'name' => 'Burkina Faso',
|
142 |
+
'code' => 'BF',
|
143 |
+
),
|
144 |
+
array(
|
145 |
+
'name' => 'Burundi',
|
146 |
+
'code' => 'BI',
|
147 |
+
),
|
148 |
+
array(
|
149 |
+
'name' => 'Cambodia',
|
150 |
+
'code' => 'KH',
|
151 |
+
),
|
152 |
+
array(
|
153 |
+
'name' => 'Cameroon',
|
154 |
+
'code' => 'CM',
|
155 |
+
),
|
156 |
+
array(
|
157 |
+
'name' => 'Canada',
|
158 |
+
'code' => 'CA',
|
159 |
+
),
|
160 |
+
array(
|
161 |
+
'name' => 'Cape Verde',
|
162 |
+
'code' => 'CV',
|
163 |
+
),
|
164 |
+
array(
|
165 |
+
'name' => 'Cayman Islands',
|
166 |
+
'code' => 'KY',
|
167 |
+
),
|
168 |
+
array(
|
169 |
+
'name' => 'Central African Republic',
|
170 |
+
'code' => 'CF',
|
171 |
+
),
|
172 |
+
array(
|
173 |
+
'name' => 'Chad',
|
174 |
+
'code' => 'TD',
|
175 |
+
),
|
176 |
+
array(
|
177 |
+
'name' => 'Chile',
|
178 |
+
'code' => 'CL',
|
179 |
+
),
|
180 |
+
array(
|
181 |
+
'name' => 'China',
|
182 |
+
'code' => 'CN',
|
183 |
+
),
|
184 |
+
array(
|
185 |
+
'name' => 'Christmas Island',
|
186 |
+
'code' => 'CX',
|
187 |
+
),
|
188 |
+
array(
|
189 |
+
'name' => 'Cocos (Keeling) Islands',
|
190 |
+
'code' => 'CC',
|
191 |
+
),
|
192 |
+
array(
|
193 |
+
'name' => 'Colombia',
|
194 |
+
'code' => 'CO',
|
195 |
+
),
|
196 |
+
array(
|
197 |
+
'name' => 'Comoros',
|
198 |
+
'code' => 'KM',
|
199 |
+
),
|
200 |
+
array(
|
201 |
+
'name' => 'Congo',
|
202 |
+
'code' => 'CG',
|
203 |
+
),
|
204 |
+
array(
|
205 |
+
'name' => 'Congo, The Democratic Republic of the',
|
206 |
+
'code' => 'CD',
|
207 |
+
),
|
208 |
+
array(
|
209 |
+
'name' => 'Cook Islands',
|
210 |
+
'code' => 'CK',
|
211 |
+
),
|
212 |
+
array(
|
213 |
+
'name' => 'Costa Rica',
|
214 |
+
'code' => 'CR',
|
215 |
+
),
|
216 |
+
array(
|
217 |
+
'name' => 'Cote D"Ivoire',
|
218 |
+
'code' => 'CI',
|
219 |
+
),
|
220 |
+
array(
|
221 |
+
'name' => 'Croatia',
|
222 |
+
'code' => 'HR',
|
223 |
+
),
|
224 |
+
array(
|
225 |
+
'name' => 'Cuba',
|
226 |
+
'code' => 'CU',
|
227 |
+
),
|
228 |
+
array(
|
229 |
+
'name' => 'Cyprus',
|
230 |
+
'code' => 'CY',
|
231 |
+
),
|
232 |
+
array(
|
233 |
+
'name' => 'Czech Republic',
|
234 |
+
'code' => 'CZ',
|
235 |
+
),
|
236 |
+
array(
|
237 |
+
'name' => 'Denmark',
|
238 |
+
'code' => 'DK',
|
239 |
+
),
|
240 |
+
array(
|
241 |
+
'name' => 'Djibouti',
|
242 |
+
'code' => 'DJ',
|
243 |
+
),
|
244 |
+
array(
|
245 |
+
'name' => 'Dominica',
|
246 |
+
'code' => 'DM',
|
247 |
+
),
|
248 |
+
array(
|
249 |
+
'name' => 'Dominican Republic',
|
250 |
+
'code' => 'DO',
|
251 |
+
),
|
252 |
+
array(
|
253 |
+
'name' => 'Ecuador',
|
254 |
+
'code' => 'EC',
|
255 |
+
),
|
256 |
+
array(
|
257 |
+
'name' => 'Egypt',
|
258 |
+
'code' => 'EG',
|
259 |
+
),
|
260 |
+
array(
|
261 |
+
'name' => 'El Salvador',
|
262 |
+
'code' => 'SV',
|
263 |
+
),
|
264 |
+
array(
|
265 |
+
'name' => 'Equatorial Guinea',
|
266 |
+
'code' => 'GQ',
|
267 |
+
),
|
268 |
+
array(
|
269 |
+
'name' => 'Eritrea',
|
270 |
+
'code' => 'ER',
|
271 |
+
),
|
272 |
+
array(
|
273 |
+
'name' => 'Estonia',
|
274 |
+
'code' => 'EE',
|
275 |
+
),
|
276 |
+
array(
|
277 |
+
'name' => 'Ethiopia',
|
278 |
+
'code' => 'ET',
|
279 |
+
),
|
280 |
+
array(
|
281 |
+
'name' => 'Falkland Islands (Malvinas)',
|
282 |
+
'code' => 'FK',
|
283 |
+
),
|
284 |
+
array(
|
285 |
+
'name' => 'Faroe Islands',
|
286 |
+
'code' => 'FO',
|
287 |
+
),
|
288 |
+
array(
|
289 |
+
'name' => 'Fiji',
|
290 |
+
'code' => 'FJ',
|
291 |
+
),
|
292 |
+
array(
|
293 |
+
'name' => 'Finland',
|
294 |
+
'code' => 'FI',
|
295 |
+
),
|
296 |
+
array(
|
297 |
+
'name' => 'France',
|
298 |
+
'code' => 'FR',
|
299 |
+
),
|
300 |
+
array(
|
301 |
+
'name' => 'French Guiana',
|
302 |
+
'code' => 'GF',
|
303 |
+
),
|
304 |
+
array(
|
305 |
+
'name' => 'French Polynesia',
|
306 |
+
'code' => 'PF',
|
307 |
+
),
|
308 |
+
array(
|
309 |
+
'name' => 'French Southern Territories',
|
310 |
+
'code' => 'TF',
|
311 |
+
),
|
312 |
+
array(
|
313 |
+
'name' => 'Gabon',
|
314 |
+
'code' => 'GA',
|
315 |
+
),
|
316 |
+
array(
|
317 |
+
'name' => 'Gambia',
|
318 |
+
'code' => 'GM',
|
319 |
+
),
|
320 |
+
array(
|
321 |
+
'name' => 'Georgia',
|
322 |
+
'code' => 'GE',
|
323 |
+
),
|
324 |
+
array(
|
325 |
+
'name' => 'Germany',
|
326 |
+
'code' => 'DE',
|
327 |
+
),
|
328 |
+
array(
|
329 |
+
'name' => 'Ghana',
|
330 |
+
'code' => 'GH',
|
331 |
+
),
|
332 |
+
array(
|
333 |
+
'name' => 'Gibraltar',
|
334 |
+
'code' => 'GI',
|
335 |
+
),
|
336 |
+
array(
|
337 |
+
'name' => 'Greece',
|
338 |
+
'code' => 'GR',
|
339 |
+
),
|
340 |
+
array(
|
341 |
+
'name' => 'Greenland',
|
342 |
+
'code' => 'GL',
|
343 |
+
),
|
344 |
+
array(
|
345 |
+
'name' => 'Grenada',
|
346 |
+
'code' => 'GD',
|
347 |
+
),
|
348 |
+
array(
|
349 |
+
'name' => 'Guadeloupe',
|
350 |
+
'code' => 'GP',
|
351 |
+
),
|
352 |
+
array(
|
353 |
+
'name' => 'Guam',
|
354 |
+
'code' => 'GU',
|
355 |
+
),
|
356 |
+
array(
|
357 |
+
'name' => 'Guatemala',
|
358 |
+
'code' => 'GT',
|
359 |
+
),
|
360 |
+
array(
|
361 |
+
'name' => 'Guernsey',
|
362 |
+
'code' => 'GG',
|
363 |
+
),
|
364 |
+
array(
|
365 |
+
'name' => 'Guinea',
|
366 |
+
'code' => 'GN',
|
367 |
+
),
|
368 |
+
array(
|
369 |
+
'name' => 'Guinea-Bissau',
|
370 |
+
'code' => 'GW',
|
371 |
+
),
|
372 |
+
array(
|
373 |
+
'name' => 'Guyana',
|
374 |
+
'code' => 'GY',
|
375 |
+
),
|
376 |
+
array(
|
377 |
+
'name' => 'Haiti',
|
378 |
+
'code' => 'HT',
|
379 |
+
),
|
380 |
+
array(
|
381 |
+
'name' => 'Heard Island and Mcdonald Islands',
|
382 |
+
'code' => 'HM',
|
383 |
+
),
|
384 |
+
array(
|
385 |
+
'name' => 'Holy See (Vatican City State)',
|
386 |
+
'code' => 'VA',
|
387 |
+
),
|
388 |
+
array(
|
389 |
+
'name' => 'Honduras',
|
390 |
+
'code' => 'HN',
|
391 |
+
),
|
392 |
+
array(
|
393 |
+
'name' => 'Hong Kong',
|
394 |
+
'code' => 'HK',
|
395 |
+
),
|
396 |
+
array(
|
397 |
+
'name' => 'Hungary',
|
398 |
+
'code' => 'HU',
|
399 |
+
),
|
400 |
+
array(
|
401 |
+
'name' => 'Iceland',
|
402 |
+
'code' => 'IS',
|
403 |
+
),
|
404 |
+
array(
|
405 |
+
'name' => 'India',
|
406 |
+
'code' => 'IN',
|
407 |
+
),
|
408 |
+
array(
|
409 |
+
'name' => 'Indonesia',
|
410 |
+
'code' => 'ID',
|
411 |
+
),
|
412 |
+
array(
|
413 |
+
'name' => 'Iran, Islamic Republic Of',
|
414 |
+
'code' => 'IR',
|
415 |
+
),
|
416 |
+
array(
|
417 |
+
'name' => 'Iraq',
|
418 |
+
'code' => 'IQ',
|
419 |
+
),
|
420 |
+
array(
|
421 |
+
'name' => 'Ireland',
|
422 |
+
'code' => 'IE',
|
423 |
+
),
|
424 |
+
array(
|
425 |
+
'name' => 'Isle of Man',
|
426 |
+
'code' => 'IM',
|
427 |
+
),
|
428 |
+
array(
|
429 |
+
'name' => 'Israel',
|
430 |
+
'code' => 'IL',
|
431 |
+
),
|
432 |
+
array(
|
433 |
+
'name' => 'Italy',
|
434 |
+
'code' => 'IT',
|
435 |
+
),
|
436 |
+
array(
|
437 |
+
'name' => 'Jamaica',
|
438 |
+
'code' => 'JM',
|
439 |
+
),
|
440 |
+
array(
|
441 |
+
'name' => 'Japan',
|
442 |
+
'code' => 'JP',
|
443 |
+
),
|
444 |
+
array(
|
445 |
+
'name' => 'Jersey',
|
446 |
+
'code' => 'JE',
|
447 |
+
),
|
448 |
+
array(
|
449 |
+
'name' => 'Jordan',
|
450 |
+
'code' => 'JO',
|
451 |
+
),
|
452 |
+
array(
|
453 |
+
'name' => 'Kazakhstan',
|
454 |
+
'code' => 'KZ',
|
455 |
+
),
|
456 |
+
array(
|
457 |
+
'name' => 'Kenya',
|
458 |
+
'code' => 'KE',
|
459 |
+
),
|
460 |
+
array(
|
461 |
+
'name' => 'Kiribati',
|
462 |
+
'code' => 'KI',
|
463 |
+
),
|
464 |
+
array(
|
465 |
+
'name' => 'Korea, Democratic People"S Republic of',
|
466 |
+
'code' => 'KP',
|
467 |
+
),
|
468 |
+
array(
|
469 |
+
'name' => 'Korea, Republic of',
|
470 |
+
'code' => 'KR',
|
471 |
+
),
|
472 |
+
array(
|
473 |
+
'name' => 'Kuwait',
|
474 |
+
'code' => 'KW',
|
475 |
+
),
|
476 |
+
array(
|
477 |
+
'name' => 'Kyrgyzstan',
|
478 |
+
'code' => 'KG',
|
479 |
+
),
|
480 |
+
array(
|
481 |
+
'name' => 'Lao People"S Democratic Republic',
|
482 |
+
'code' => 'LA',
|
483 |
+
),
|
484 |
+
array(
|
485 |
+
'name' => 'Latvia',
|
486 |
+
'code' => 'LV',
|
487 |
+
),
|
488 |
+
array(
|
489 |
+
'name' => 'Lebanon',
|
490 |
+
'code' => 'LB',
|
491 |
+
),
|
492 |
+
array(
|
493 |
+
'name' => 'Lesotho',
|
494 |
+
'code' => 'LS',
|
495 |
+
),
|
496 |
+
array(
|
497 |
+
'name' => 'Liberia',
|
498 |
+
'code' => 'LR',
|
499 |
+
),
|
500 |
+
array(
|
501 |
+
'name' => 'Libyan Arab Jamahiriya',
|
502 |
+
'code' => 'LY',
|
503 |
+
),
|
504 |
+
array(
|
505 |
+
'name' => 'Liechtenstein',
|
506 |
+
'code' => 'LI',
|
507 |
+
),
|
508 |
+
array(
|
509 |
+
'name' => 'Lithuania',
|
510 |
+
'code' => 'LT',
|
511 |
+
),
|
512 |
+
array(
|
513 |
+
'name' => 'Luxembourg',
|
514 |
+
'code' => 'LU',
|
515 |
+
),
|
516 |
+
array(
|
517 |
+
'name' => 'Macao',
|
518 |
+
'code' => 'MO',
|
519 |
+
),
|
520 |
+
array(
|
521 |
+
'name' => 'Macedonia, The Former Yugoslav Republic of',
|
522 |
+
'code' => 'MK',
|
523 |
+
),
|
524 |
+
array(
|
525 |
+
'name' => 'Madagascar',
|
526 |
+
'code' => 'MG',
|
527 |
+
),
|
528 |
+
array(
|
529 |
+
'name' => 'Malawi',
|
530 |
+
'code' => 'MW',
|
531 |
+
),
|
532 |
+
array(
|
533 |
+
'name' => 'Malaysia',
|
534 |
+
'code' => 'MY',
|
535 |
+
),
|
536 |
+
array(
|
537 |
+
'name' => 'Maldives',
|
538 |
+
'code' => 'MV',
|
539 |
+
),
|
540 |
+
array(
|
541 |
+
'name' => 'Mali',
|
542 |
+
'code' => 'ML',
|
543 |
+
),
|
544 |
+
array(
|
545 |
+
'name' => 'Malta',
|
546 |
+
'code' => 'MT',
|
547 |
+
),
|
548 |
+
array(
|
549 |
+
'name' => 'Marshall Islands',
|
550 |
+
'code' => 'MH',
|
551 |
+
),
|
552 |
+
array(
|
553 |
+
'name' => 'Martinique',
|
554 |
+
'code' => 'MQ',
|
555 |
+
),
|
556 |
+
array(
|
557 |
+
'name' => 'Mauritania',
|
558 |
+
'code' => 'MR',
|
559 |
+
),
|
560 |
+
array(
|
561 |
+
'name' => 'Mauritius',
|
562 |
+
'code' => 'MU',
|
563 |
+
),
|
564 |
+
array(
|
565 |
+
'name' => 'Mayotte',
|
566 |
+
'code' => 'YT',
|
567 |
+
),
|
568 |
+
array(
|
569 |
+
'name' => 'Mexico',
|
570 |
+
'code' => 'MX',
|
571 |
+
),
|
572 |
+
array(
|
573 |
+
'name' => 'Micronesia, Federated States of',
|
574 |
+
'code' => 'FM',
|
575 |
+
),
|
576 |
+
array(
|
577 |
+
'name' => 'Moldova, Republic of',
|
578 |
+
'code' => 'MD',
|
579 |
+
),
|
580 |
+
array(
|
581 |
+
'name' => 'Monaco',
|
582 |
+
'code' => 'MC',
|
583 |
+
),
|
584 |
+
array(
|
585 |
+
'name' => 'Mongolia',
|
586 |
+
'code' => 'MN',
|
587 |
+
),
|
588 |
+
array(
|
589 |
+
'name' => 'Montserrat',
|
590 |
+
'code' => 'MS',
|
591 |
+
),
|
592 |
+
array(
|
593 |
+
'name' => 'Morocco',
|
594 |
+
'code' => 'MA',
|
595 |
+
),
|
596 |
+
array(
|
597 |
+
'name' => 'Mozambique',
|
598 |
+
'code' => 'MZ',
|
599 |
+
),
|
600 |
+
array(
|
601 |
+
'name' => 'Myanmar',
|
602 |
+
'code' => 'MM',
|
603 |
+
),
|
604 |
+
array(
|
605 |
+
'name' => 'Namibia',
|
606 |
+
'code' => 'NA',
|
607 |
+
),
|
608 |
+
array(
|
609 |
+
'name' => 'Nauru',
|
610 |
+
'code' => 'NR',
|
611 |
+
),
|
612 |
+
array(
|
613 |
+
'name' => 'Nepal',
|
614 |
+
'code' => 'NP',
|
615 |
+
),
|
616 |
+
array(
|
617 |
+
'name' => 'Netherlands',
|
618 |
+
'code' => 'NL',
|
619 |
+
),
|
620 |
+
array(
|
621 |
+
'name' => 'Netherlands Antilles',
|
622 |
+
'code' => 'AN',
|
623 |
+
),
|
624 |
+
array(
|
625 |
+
'name' => 'New Caledonia',
|
626 |
+
'code' => 'NC',
|
627 |
+
),
|
628 |
+
array(
|
629 |
+
'name' => 'New Zealand',
|
630 |
+
'code' => 'NZ',
|
631 |
+
),
|
632 |
+
array(
|
633 |
+
'name' => 'Nicaragua',
|
634 |
+
'code' => 'NI',
|
635 |
+
),
|
636 |
+
array(
|
637 |
+
'name' => 'Niger',
|
638 |
+
'code' => 'NE',
|
639 |
+
),
|
640 |
+
array(
|
641 |
+
'name' => 'Nigeria',
|
642 |
+
'code' => 'NG',
|
643 |
+
),
|
644 |
+
array(
|
645 |
+
'name' => 'Niue',
|
646 |
+
'code' => 'NU',
|
647 |
+
),
|
648 |
+
array(
|
649 |
+
'name' => 'Norfolk Island',
|
650 |
+
'code' => 'NF',
|
651 |
+
),
|
652 |
+
array(
|
653 |
+
'name' => 'Northern Mariana Islands',
|
654 |
+
'code' => 'MP',
|
655 |
+
),
|
656 |
+
array(
|
657 |
+
'name' => 'Norway',
|
658 |
+
'code' => 'NO',
|
659 |
+
),
|
660 |
+
array(
|
661 |
+
'name' => 'Oman',
|
662 |
+
'code' => 'OM',
|
663 |
+
),
|
664 |
+
array(
|
665 |
+
'name' => 'Pakistan',
|
666 |
+
'code' => 'PK',
|
667 |
+
),
|
668 |
+
array(
|
669 |
+
'name' => 'Palau',
|
670 |
+
'code' => 'PW',
|
671 |
+
),
|
672 |
+
array(
|
673 |
+
'name' => 'Palestinian Territory, Occupied',
|
674 |
+
'code' => 'PS',
|
675 |
+
),
|
676 |
+
array(
|
677 |
+
'name' => 'Panama',
|
678 |
+
'code' => 'PA',
|
679 |
+
),
|
680 |
+
array(
|
681 |
+
'name' => 'Papua New Guinea',
|
682 |
+
'code' => 'PG',
|
683 |
+
),
|
684 |
+
array(
|
685 |
+
'name' => 'Paraguay',
|
686 |
+
'code' => 'PY',
|
687 |
+
),
|
688 |
+
array(
|
689 |
+
'name' => 'Peru',
|
690 |
+
'code' => 'PE',
|
691 |
+
),
|
692 |
+
array(
|
693 |
+
'name' => 'Philippines',
|
694 |
+
'code' => 'PH',
|
695 |
+
),
|
696 |
+
array(
|
697 |
+
'name' => 'Pitcairn',
|
698 |
+
'code' => 'PN',
|
699 |
+
),
|
700 |
+
array(
|
701 |
+
'name' => 'Poland',
|
702 |
+
'code' => 'PL',
|
703 |
+
),
|
704 |
+
array(
|
705 |
+
'name' => 'Portugal',
|
706 |
+
'code' => 'PT',
|
707 |
+
),
|
708 |
+
array(
|
709 |
+
'name' => 'Puerto Rico',
|
710 |
+
'code' => 'PR',
|
711 |
+
),
|
712 |
+
array(
|
713 |
+
'name' => 'Qatar',
|
714 |
+
'code' => 'QA',
|
715 |
+
),
|
716 |
+
array(
|
717 |
+
'name' => 'Reunion',
|
718 |
+
'code' => 'RE',
|
719 |
+
),
|
720 |
+
array(
|
721 |
+
'name' => 'Romania',
|
722 |
+
'code' => 'RO',
|
723 |
+
),
|
724 |
+
array(
|
725 |
+
'name' => 'Russian Federation',
|
726 |
+
'code' => 'RU',
|
727 |
+
),
|
728 |
+
array(
|
729 |
+
'name' => 'RWANDA',
|
730 |
+
'code' => 'RW',
|
731 |
+
),
|
732 |
+
array(
|
733 |
+
'name' => 'Saint Helena',
|
734 |
+
'code' => 'SH',
|
735 |
+
),
|
736 |
+
array(
|
737 |
+
'name' => 'Saint Kitts and Nevis',
|
738 |
+
'code' => 'KN',
|
739 |
+
),
|
740 |
+
array(
|
741 |
+
'name' => 'Saint Lucia',
|
742 |
+
'code' => 'LC',
|
743 |
+
),
|
744 |
+
array(
|
745 |
+
'name' => 'Saint Pierre and Miquelon',
|
746 |
+
'code' => 'PM',
|
747 |
+
),
|
748 |
+
array(
|
749 |
+
'name' => 'Saint Vincent and the Grenadines',
|
750 |
+
'code' => 'VC',
|
751 |
+
),
|
752 |
+
array(
|
753 |
+
'name' => 'Samoa',
|
754 |
+
'code' => 'WS',
|
755 |
+
),
|
756 |
+
array(
|
757 |
+
'name' => 'San Marino',
|
758 |
+
'code' => 'SM',
|
759 |
+
),
|
760 |
+
array(
|
761 |
+
'name' => 'Sao Tome and Principe',
|
762 |
+
'code' => 'ST',
|
763 |
+
),
|
764 |
+
array(
|
765 |
+
'name' => 'Saudi Arabia',
|
766 |
+
'code' => 'SA',
|
767 |
+
),
|
768 |
+
array(
|
769 |
+
'name' => 'Senegal',
|
770 |
+
'code' => 'SN',
|
771 |
+
),
|
772 |
+
array(
|
773 |
+
'name' => 'Serbia and Montenegro',
|
774 |
+
'code' => 'CS',
|
775 |
+
),
|
776 |
+
array(
|
777 |
+
'name' => 'Seychelles',
|
778 |
+
'code' => 'SC',
|
779 |
+
),
|
780 |
+
array(
|
781 |
+
'name' => 'Sierra Leone',
|
782 |
+
'code' => 'SL',
|
783 |
+
),
|
784 |
+
array(
|
785 |
+
'name' => 'Singapore',
|
786 |
+
'code' => 'SG',
|
787 |
+
),
|
788 |
+
array(
|
789 |
+
'name' => 'Slovakia',
|
790 |
+
'code' => 'SK',
|
791 |
+
),
|
792 |
+
array(
|
793 |
+
'name' => 'Slovenia',
|
794 |
+
'code' => 'SI',
|
795 |
+
),
|
796 |
+
array(
|
797 |
+
'name' => 'Solomon Islands',
|
798 |
+
'code' => 'SB',
|
799 |
+
),
|
800 |
+
array(
|
801 |
+
'name' => 'Somalia',
|
802 |
+
'code' => 'SO',
|
803 |
+
),
|
804 |
+
array(
|
805 |
+
'name' => 'South Africa',
|
806 |
+
'code' => 'ZA',
|
807 |
+
),
|
808 |
+
array(
|
809 |
+
'name' => 'South Georgia and the South Sandwich Islands',
|
810 |
+
'code' => 'GS',
|
811 |
+
),
|
812 |
+
array(
|
813 |
+
'name' => 'Spain',
|
814 |
+
'code' => 'ES',
|
815 |
+
),
|
816 |
+
array(
|
817 |
+
'name' => 'Sri Lanka',
|
818 |
+
'code' => 'LK',
|
819 |
+
),
|
820 |
+
array(
|
821 |
+
'name' => 'Sudan',
|
822 |
+
'code' => 'SD',
|
823 |
+
),
|
824 |
+
array(
|
825 |
+
'name' => 'Suriname',
|
826 |
+
'code' => 'SR',
|
827 |
+
),
|
828 |
+
array(
|
829 |
+
'name' => 'Svalbard and Jan Mayen',
|
830 |
+
'code' => 'SJ',
|
831 |
+
),
|
832 |
+
array(
|
833 |
+
'name' => 'Swaziland',
|
834 |
+
'code' => 'SZ',
|
835 |
+
),
|
836 |
+
array(
|
837 |
+
'name' => 'Sweden',
|
838 |
+
'code' => 'SE',
|
839 |
+
),
|
840 |
+
array(
|
841 |
+
'name' => 'Switzerland',
|
842 |
+
'code' => 'CH',
|
843 |
+
),
|
844 |
+
array(
|
845 |
+
'name' => 'Syrian Arab Republic',
|
846 |
+
'code' => 'SY',
|
847 |
+
),
|
848 |
+
array(
|
849 |
+
'name' => 'Taiwan, Province of China',
|
850 |
+
'code' => 'TW',
|
851 |
+
),
|
852 |
+
array(
|
853 |
+
'name' => 'Tajikistan',
|
854 |
+
'code' => 'TJ',
|
855 |
+
),
|
856 |
+
array(
|
857 |
+
'name' => 'Tanzania, United Republic of',
|
858 |
+
'code' => 'TZ',
|
859 |
+
),
|
860 |
+
array(
|
861 |
+
'name' => 'Thailand',
|
862 |
+
'code' => 'TH',
|
863 |
+
),
|
864 |
+
array(
|
865 |
+
'name' => 'Timor-Leste',
|
866 |
+
'code' => 'TL',
|
867 |
+
),
|
868 |
+
array(
|
869 |
+
'name' => 'Togo',
|
870 |
+
'code' => 'TG',
|
871 |
+
),
|
872 |
+
array(
|
873 |
+
'name' => 'Tokelau',
|
874 |
+
'code' => 'TK',
|
875 |
+
),
|
876 |
+
array(
|
877 |
+
'name' => 'Tonga',
|
878 |
+
'code' => 'TO',
|
879 |
+
),
|
880 |
+
array(
|
881 |
+
'name' => 'Trinidad and Tobago',
|
882 |
+
'code' => 'TT',
|
883 |
+
),
|
884 |
+
array(
|
885 |
+
'name' => 'Tunisia',
|
886 |
+
'code' => 'TN',
|
887 |
+
),
|
888 |
+
array(
|
889 |
+
'name' => 'Turkey',
|
890 |
+
'code' => 'TR',
|
891 |
+
),
|
892 |
+
array(
|
893 |
+
'name' => 'Turkmenistan',
|
894 |
+
'code' => 'TM',
|
895 |
+
),
|
896 |
+
array(
|
897 |
+
'name' => 'Turks and Caicos Islands',
|
898 |
+
'code' => 'TC',
|
899 |
+
),
|
900 |
+
array(
|
901 |
+
'name' => 'Tuvalu',
|
902 |
+
'code' => 'TV',
|
903 |
+
),
|
904 |
+
array(
|
905 |
+
'name' => 'Uganda',
|
906 |
+
'code' => 'UG',
|
907 |
+
),
|
908 |
+
array(
|
909 |
+
'name' => 'Ukraine',
|
910 |
+
'code' => 'UA',
|
911 |
+
),
|
912 |
+
array(
|
913 |
+
'name' => 'United Arab Emirates',
|
914 |
+
'code' => 'AE',
|
915 |
+
),
|
916 |
+
array(
|
917 |
+
'name' => 'United Kingdom',
|
918 |
+
'code' => 'GB',
|
919 |
+
),
|
920 |
+
array(
|
921 |
+
'name' => 'United States',
|
922 |
+
'code' => 'US',
|
923 |
+
),
|
924 |
+
array(
|
925 |
+
'name' => 'United States Minor Outlying Islands',
|
926 |
+
'code' => 'UM',
|
927 |
+
),
|
928 |
+
array(
|
929 |
+
'name' => 'Uruguay',
|
930 |
+
'code' => 'UY',
|
931 |
+
),
|
932 |
+
array(
|
933 |
+
'name' => 'Uzbekistan',
|
934 |
+
'code' => 'UZ',
|
935 |
+
),
|
936 |
+
array(
|
937 |
+
'name' => 'Vanuatu',
|
938 |
+
'code' => 'VU',
|
939 |
+
),
|
940 |
+
array(
|
941 |
+
'name' => 'Venezuela',
|
942 |
+
'code' => 'VE',
|
943 |
+
),
|
944 |
+
array(
|
945 |
+
'name' => 'Viet Nam',
|
946 |
+
'code' => 'VN',
|
947 |
+
),
|
948 |
+
array(
|
949 |
+
'name' => 'Virgin Islands, British',
|
950 |
+
'code' => 'VG',
|
951 |
+
),
|
952 |
+
array(
|
953 |
+
'name' => 'Virgin Islands, U.S.',
|
954 |
+
'code' => 'VI',
|
955 |
+
),
|
956 |
+
array(
|
957 |
+
'name' => 'Wallis and Futuna',
|
958 |
+
'code' => 'WF',
|
959 |
+
),
|
960 |
+
array(
|
961 |
+
'name' => 'Western Sahara',
|
962 |
+
'code' => 'EH',
|
963 |
+
),
|
964 |
+
array(
|
965 |
+
'name' => 'Yemen',
|
966 |
+
'code' => 'YE',
|
967 |
+
),
|
968 |
+
array(
|
969 |
+
'name' => 'Zambia',
|
970 |
+
'code' => 'ZM',
|
971 |
+
),
|
972 |
+
array(
|
973 |
+
'name' => 'Zimbabwe',
|
974 |
+
'code' => 'ZW',
|
975 |
+
),
|
976 |
+
);
|
977 |
+
|
978 |
+
return $countries;
|
includes/free/edit-profile.php
CHANGED
@@ -89,30 +89,30 @@ class WPUF_Edit_Profile {
|
|
89 |
<?php do_action( 'profile_personal_options', $profileuser ); ?>
|
90 |
|
91 |
<fieldset>
|
92 |
-
<legend><?php _e( 'Name' ) ?></legend>
|
93 |
|
94 |
<table class="wpuf-table">
|
95 |
<tr>
|
96 |
-
<th><label for="user_login1"><?php _e( 'Username' ); ?></label></th>
|
97 |
-
<td><input type="text" name="user_login" id="user_login1" value="<?php echo esc_attr( $profileuser->user_login ); ?>" disabled="disabled" class="regular-text" /><br /><em><span class="description"><?php _e( 'Usernames cannot be changed.' ); ?></span></em></td>
|
98 |
</tr>
|
99 |
<tr>
|
100 |
-
<th><label for="first_name"><?php _e( 'First Name' ) ?></label></th>
|
101 |
<td><input type="text" name="first_name" id="first_name" value="<?php echo esc_attr( $profileuser->first_name ) ?>" class="regular-text" /></td>
|
102 |
</tr>
|
103 |
|
104 |
<tr>
|
105 |
-
<th><label for="last_name"><?php _e( 'Last Name' ) ?></label></th>
|
106 |
<td><input type="text" name="last_name" id="last_name" value="<?php echo esc_attr( $profileuser->last_name ) ?>" class="regular-text" /></td>
|
107 |
</tr>
|
108 |
|
109 |
<tr>
|
110 |
-
<th><label for="nickname"><?php _e( 'Nickname' ); ?> <span class="description"><?php _e( '(required)' ); ?></span></label></th>
|
111 |
<td><input type="text" name="nickname" id="nickname" value="<?php echo esc_attr( $profileuser->nickname ) ?>" class="regular-text" /></td>
|
112 |
</tr>
|
113 |
|
114 |
<tr>
|
115 |
-
<th><label for="display_name"><?php _e( 'Display to Public as' ) ?></label></th>
|
116 |
<td>
|
117 |
<select name="display_name" id="display_name">
|
118 |
<?php
|
@@ -144,16 +144,16 @@ class WPUF_Edit_Profile {
|
|
144 |
</fieldset>
|
145 |
|
146 |
<fieldset>
|
147 |
-
<legend><?php _e( 'Contact Info' ) ?></legend>
|
148 |
|
149 |
<table class="wpuf-table">
|
150 |
<tr>
|
151 |
-
<th><label for="email"><?php _e( 'E-mail' ); ?> <span class="description"><?php _e( '(required)' ); ?></span></label></th>
|
152 |
<td><input type="text" name="email" id="email" value="<?php echo esc_attr( $profileuser->user_email ) ?>" class="regular-text" /> </td>
|
153 |
</tr>
|
154 |
|
155 |
<tr>
|
156 |
-
<th><label for="url"><?php _e( 'Website' ) ?></label></th>
|
157 |
<td><input type="text" name="url" id="url" value="<?php echo esc_attr( $profileuser->user_url ) ?>" class="regular-text code" /></td>
|
158 |
</tr>
|
159 |
|
@@ -171,13 +171,13 @@ class WPUF_Edit_Profile {
|
|
171 |
</fieldset>
|
172 |
|
173 |
<fieldset>
|
174 |
-
<legend><?php _e( 'About Yourself' ); ?></legend>
|
175 |
|
176 |
<table class="wpuf-table">
|
177 |
<tr>
|
178 |
<th><label for="description"><?php _e( 'Biographical Info', 'wpuf' ); ?></label></th>
|
179 |
<td><textarea name="description" id="description" rows="5" cols="30"><?php echo esc_html( $profileuser->description ); ?></textarea><br />
|
180 |
-
<span class="description"><?php _e( 'Share a little biographical information to fill out your profile. This may be shown publicly.' ); ?></span></td>
|
181 |
</tr>
|
182 |
<tr id="password">
|
183 |
<th><label for="pass1"><?php _e( 'New Password', 'wpuf' ); ?></label></th>
|
@@ -195,7 +195,7 @@ class WPUF_Edit_Profile {
|
|
195 |
|
196 |
<th><label><?php _e( 'Password Strength', 'wpuf' ); ?></label></th>
|
197 |
<td>
|
198 |
-
<div id="pass-strength-result"><?php _e( 'Strength indicator' ); ?></div>
|
199 |
<script src="<?php echo site_url(); ?>/wp-includes/js/zxcvbn.min.js"></script>
|
200 |
<script src="<?php echo admin_url(); ?>/js/password-strength-meter.js"></script>
|
201 |
<script type="text/javascript">
|
89 |
<?php do_action( 'profile_personal_options', $profileuser ); ?>
|
90 |
|
91 |
<fieldset>
|
92 |
+
<legend><?php _e( 'Name', 'wpuf' ) ?></legend>
|
93 |
|
94 |
<table class="wpuf-table">
|
95 |
<tr>
|
96 |
+
<th><label for="user_login1"><?php _e( 'Username', 'wpuf' ); ?></label></th>
|
97 |
+
<td><input type="text" name="user_login" id="user_login1" value="<?php echo esc_attr( $profileuser->user_login ); ?>" disabled="disabled" class="regular-text" /><br /><em><span class="description"><?php _e( 'Usernames cannot be changed.', 'wpuf' ); ?></span></em></td>
|
98 |
</tr>
|
99 |
<tr>
|
100 |
+
<th><label for="first_name"><?php _e( 'First Name', 'wpuf' ) ?></label></th>
|
101 |
<td><input type="text" name="first_name" id="first_name" value="<?php echo esc_attr( $profileuser->first_name ) ?>" class="regular-text" /></td>
|
102 |
</tr>
|
103 |
|
104 |
<tr>
|
105 |
+
<th><label for="last_name"><?php _e( 'Last Name', 'wpuf' ) ?></label></th>
|
106 |
<td><input type="text" name="last_name" id="last_name" value="<?php echo esc_attr( $profileuser->last_name ) ?>" class="regular-text" /></td>
|
107 |
</tr>
|
108 |
|
109 |
<tr>
|
110 |
+
<th><label for="nickname"><?php _e( 'Nickname', 'wpuf' ); ?> <span class="description"><?php _e( '(required)', 'wpuf' ); ?></span></label></th>
|
111 |
<td><input type="text" name="nickname" id="nickname" value="<?php echo esc_attr( $profileuser->nickname ) ?>" class="regular-text" /></td>
|
112 |
</tr>
|
113 |
|
114 |
<tr>
|
115 |
+
<th><label for="display_name"><?php _e( 'Display to Public as', 'wpuf' ) ?></label></th>
|
116 |
<td>
|
117 |
<select name="display_name" id="display_name">
|
118 |
<?php
|
144 |
</fieldset>
|
145 |
|
146 |
<fieldset>
|
147 |
+
<legend><?php _e( 'Contact Info', 'wpuf' ) ?></legend>
|
148 |
|
149 |
<table class="wpuf-table">
|
150 |
<tr>
|
151 |
+
<th><label for="email"><?php _e( 'E-mail', 'wpuf' ); ?> <span class="description"><?php _e( '(required)', 'wpuf' ); ?></span></label></th>
|
152 |
<td><input type="text" name="email" id="email" value="<?php echo esc_attr( $profileuser->user_email ) ?>" class="regular-text" /> </td>
|
153 |
</tr>
|
154 |
|
155 |
<tr>
|
156 |
+
<th><label for="url"><?php _e( 'Website', 'wpuf' ) ?></label></th>
|
157 |
<td><input type="text" name="url" id="url" value="<?php echo esc_attr( $profileuser->user_url ) ?>" class="regular-text code" /></td>
|
158 |
</tr>
|
159 |
|
171 |
</fieldset>
|
172 |
|
173 |
<fieldset>
|
174 |
+
<legend><?php _e( 'About Yourself', 'wpuf' ); ?></legend>
|
175 |
|
176 |
<table class="wpuf-table">
|
177 |
<tr>
|
178 |
<th><label for="description"><?php _e( 'Biographical Info', 'wpuf' ); ?></label></th>
|
179 |
<td><textarea name="description" id="description" rows="5" cols="30"><?php echo esc_html( $profileuser->description ); ?></textarea><br />
|
180 |
+
<span class="description"><?php _e( 'Share a little biographical information to fill out your profile. This may be shown publicly.', 'wpuf' ); ?></span></td>
|
181 |
</tr>
|
182 |
<tr id="password">
|
183 |
<th><label for="pass1"><?php _e( 'New Password', 'wpuf' ); ?></label></th>
|
195 |
|
196 |
<th><label><?php _e( 'Password Strength', 'wpuf' ); ?></label></th>
|
197 |
<td>
|
198 |
+
<div id="pass-strength-result"><?php _e( 'Strength indicator', 'wpuf' ); ?></div>
|
199 |
<script src="<?php echo site_url(); ?>/wp-includes/js/zxcvbn.min.js"></script>
|
200 |
<script src="<?php echo admin_url(); ?>/js/password-strength-meter.js"></script>
|
201 |
<script type="text/javascript">
|
includes/free/edit-user.php
CHANGED
@@ -80,8 +80,9 @@ function wpuf_show_users() {
|
|
80 |
}
|
81 |
}
|
82 |
|
83 |
-
|
84 |
-
|
|
|
85 |
?>
|
86 |
|
87 |
<a class="wpuf-button" href="<?php the_permalink(); ?>?action=wpuf_add_user">Add New User</a>
|
@@ -201,22 +202,22 @@ function wpuf_register_new_user( $user_login, $user_email, $role ) {
|
|
201 |
|
202 |
// Check the username
|
203 |
if ( $sanitized_user_login == '' ) {
|
204 |
-
$errors->add( 'empty_username', __( '<strong>ERROR</strong>: Please enter a username
|
205 |
} elseif ( !validate_username( $user_login ) ) {
|
206 |
-
$errors->add( 'invalid_username', __( '<strong>ERROR</strong>: This username is invalid because it uses illegal characters. Please enter a valid username
|
207 |
$sanitized_user_login = '';
|
208 |
} elseif ( username_exists( $sanitized_user_login ) ) {
|
209 |
-
$errors->add( 'username_exists', __( '<strong>ERROR</strong>: This username is already registered, please choose another one
|
210 |
}
|
211 |
|
212 |
// Check the e-mail address
|
213 |
if ( $user_email == '' ) {
|
214 |
-
$errors->add( 'empty_email', __( '<strong>ERROR</strong>: Please type your e-mail address
|
215 |
} elseif ( !is_email( $user_email ) ) {
|
216 |
-
$errors->add( 'invalid_email', __( '<strong>ERROR</strong>: The email address isn’t correct
|
217 |
$user_email = '';
|
218 |
} elseif ( email_exists( $user_email ) ) {
|
219 |
-
$errors->add( 'email_exists', __( '<strong>ERROR</strong>: This email is already registered, please choose another one
|
220 |
}
|
221 |
|
222 |
do_action( 'register_post', $sanitized_user_login, $user_email, $errors );
|
@@ -239,7 +240,7 @@ function wpuf_register_new_user( $user_login, $user_email, $role ) {
|
|
239 |
$user_id = wp_insert_user( $userdata );
|
240 |
|
241 |
if ( !$user_id ) {
|
242 |
-
$errors->add( 'registerfail', sprintf( __( '<strong>ERROR</strong>: Couldn’t register you... please contact the <a href="mailto:%s">webmaster</a> !' ), get_option( 'admin_email' ) ) );
|
243 |
return $errors;
|
244 |
}
|
245 |
|
80 |
}
|
81 |
}
|
82 |
|
83 |
+
//$sql = "SELECT ID, display_name FROM $wpdb->users ORDER BY user_registered ASC";
|
84 |
+
//$users = $wpdb->get_results( $sql );
|
85 |
+
$users = get_users(apply_filters('wpuf_show_users', array()));
|
86 |
?>
|
87 |
|
88 |
<a class="wpuf-button" href="<?php the_permalink(); ?>?action=wpuf_add_user">Add New User</a>
|
202 |
|
203 |
// Check the username
|
204 |
if ( $sanitized_user_login == '' ) {
|
205 |
+
$errors->add( 'empty_username', __( '<strong>ERROR</strong>: Please enter a username', 'wpuf' ) );
|
206 |
} elseif ( !validate_username( $user_login ) ) {
|
207 |
+
$errors->add( 'invalid_username', __( '<strong>ERROR</strong>: This username is invalid because it uses illegal characters. Please enter a valid username', 'wpuf' ) );
|
208 |
$sanitized_user_login = '';
|
209 |
} elseif ( username_exists( $sanitized_user_login ) ) {
|
210 |
+
$errors->add( 'username_exists', __( '<strong>ERROR</strong>: This username is already registered, please choose another one', 'wpuf' ) );
|
211 |
}
|
212 |
|
213 |
// Check the e-mail address
|
214 |
if ( $user_email == '' ) {
|
215 |
+
$errors->add( 'empty_email', __( '<strong>ERROR</strong>: Please type your e-mail address', 'wpuf' ) );
|
216 |
} elseif ( !is_email( $user_email ) ) {
|
217 |
+
$errors->add( 'invalid_email', __( '<strong>ERROR</strong>: The email address isn’t correct', 'wpuf' ) );
|
218 |
$user_email = '';
|
219 |
} elseif ( email_exists( $user_email ) ) {
|
220 |
+
$errors->add( 'email_exists', __( '<strong>ERROR</strong>: This email is already registered, please choose another one', 'wpuf' ) );
|
221 |
}
|
222 |
|
223 |
do_action( 'register_post', $sanitized_user_login, $user_email, $errors );
|
240 |
$user_id = wp_insert_user( $userdata );
|
241 |
|
242 |
if ( !$user_id ) {
|
243 |
+
$errors->add( 'registerfail', sprintf( __( '<strong>ERROR</strong>: Couldn’t register you... please contact the <a href="mailto:%s">webmaster</a> !', 'wpuf' ), get_option( 'admin_email' ) ) );
|
244 |
return $errors;
|
245 |
}
|
246 |
|
languages/wpuf.pot
CHANGED
@@ -1,18 +1,18 @@
|
|
1 |
-
# Copyright (C)
|
2 |
# This file is distributed under the GPL2.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: WP User Frontend 2.4\n"
|
6 |
"Report-Msgid-Bugs-To: "
|
7 |
"https://wedevs.com/support/forum/plugin-support/wp-user-frontend-pro/\n"
|
8 |
-
"POT-Creation-Date:
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=utf-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"PO-Revision-Date:
|
13 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
14 |
"Language-Team: LANGUAGE <EMAIL@ADDRESS>\n"
|
15 |
-
"X-Generator: grunt-wp-i18n 0.4
|
16 |
|
17 |
#: admin/add-ons.php:2
|
18 |
msgid "WP User Frontend - Add-Ons"
|
@@ -49,8 +49,8 @@ msgid "Add New Form"
|
|
49 |
msgstr ""
|
50 |
|
51 |
#: admin/form.php:180 admin/form.php:218 admin/installer.php:74
|
52 |
-
#: admin/subscription.php:228 class/subscription.php:
|
53 |
-
#: includes/free/edit-user.php:
|
54 |
#: templates/dashboard.php:102
|
55 |
msgid "Edit"
|
56 |
msgstr ""
|
@@ -230,7 +230,7 @@ msgid "Name"
|
|
230 |
msgstr ""
|
231 |
|
232 |
#: admin/form.php:645 admin/form.php:1119 admin/transaction.php:107
|
233 |
-
#: includes/free/edit-user.php:
|
234 |
msgid "Email"
|
235 |
msgstr ""
|
236 |
|
@@ -246,7 +246,7 @@ msgstr ""
|
|
246 |
msgid "Submit"
|
247 |
msgstr ""
|
248 |
|
249 |
-
#: admin/form.php:656 class/render-form.php:
|
250 |
msgid "Save Draft"
|
251 |
msgstr ""
|
252 |
|
@@ -537,7 +537,7 @@ msgid "Profile Fields"
|
|
537 |
msgstr ""
|
538 |
|
539 |
#: admin/form.php:1186 admin/form.php:1600 includes/free/edit-profile.php:96
|
540 |
-
#: includes/free/edit-user.php:
|
541 |
#: templates/login-form.php:21
|
542 |
msgid "Username"
|
543 |
msgstr ""
|
@@ -648,9 +648,9 @@ msgstr ""
|
|
648 |
msgid "Login"
|
649 |
msgstr ""
|
650 |
|
651 |
-
#: admin/installer.php:82 admin/settings.php:62 class/subscription.php:
|
652 |
-
#: class/subscription.php:
|
653 |
-
#: class/subscription.php:
|
654 |
msgid "Subscription"
|
655 |
msgstr ""
|
656 |
|
@@ -694,11 +694,11 @@ msgstr ""
|
|
694 |
msgid "Sample Form"
|
695 |
msgstr ""
|
696 |
|
697 |
-
#: admin/posting.php:52 class/render-form.php:
|
698 |
msgid "Are you sure?"
|
699 |
msgstr ""
|
700 |
|
701 |
-
#: admin/posting.php:58 includes/pro/form.php:858 wpuf.php:
|
702 |
msgid "Allowed Files"
|
703 |
msgstr ""
|
704 |
|
@@ -1135,13 +1135,13 @@ msgstr ""
|
|
1135 |
msgid "Subscription pack draft updated."
|
1136 |
msgstr ""
|
1137 |
|
1138 |
-
#: admin/subscription.php:134 admin/subscription.php:
|
1139 |
-
#: class/subscription.php:
|
1140 |
-
#: class/subscription.php:
|
1141 |
msgid "Free"
|
1142 |
msgstr ""
|
1143 |
|
1144 |
-
#: admin/subscription.php:171 class/subscription.php:
|
1145 |
msgid "Pack Name"
|
1146 |
msgstr ""
|
1147 |
|
@@ -1177,7 +1177,7 @@ msgid "Post Count"
|
|
1177 |
msgstr ""
|
1178 |
|
1179 |
#: admin/subscription.php:211 admin/transaction.php:188
|
1180 |
-
#: includes/free/edit-user.php:
|
1181 |
msgid "Action"
|
1182 |
msgstr ""
|
1183 |
|
@@ -1185,8 +1185,8 @@ msgstr ""
|
|
1185 |
msgid "Are you sure to delete this pack?"
|
1186 |
msgstr ""
|
1187 |
|
1188 |
-
#: admin/subscription.php:232 class/render-form.php:
|
1189 |
-
#: includes/free/edit-user.php:
|
1190 |
msgid "Delete"
|
1191 |
msgstr ""
|
1192 |
|
@@ -1215,7 +1215,7 @@ msgstr ""
|
|
1215 |
msgid "Enable Post Expiration"
|
1216 |
msgstr ""
|
1217 |
|
1218 |
-
#: admin/subscription.php:341 admin/subscription.php:
|
1219 |
#: includes/free/form.php:64 includes/pro/form.php:62
|
1220 |
msgid "Post Expiration Time"
|
1221 |
msgstr ""
|
@@ -1245,7 +1245,7 @@ msgstr ""
|
|
1245 |
msgid "WPUF Subscription"
|
1246 |
msgstr ""
|
1247 |
|
1248 |
-
#: admin/subscription.php:471 class/subscription.php:
|
1249 |
msgid "Subscription Details"
|
1250 |
msgstr ""
|
1251 |
|
@@ -1253,7 +1253,7 @@ msgstr ""
|
|
1253 |
msgid "This user is using recurring subscription pack"
|
1254 |
msgstr ""
|
1255 |
|
1256 |
-
#: admin/subscription.php:480 class/subscription.php:
|
1257 |
msgid "Subcription Name: "
|
1258 |
msgstr ""
|
1259 |
|
@@ -1261,35 +1261,35 @@ msgstr ""
|
|
1261 |
msgid "Package billing details: "
|
1262 |
msgstr ""
|
1263 |
|
1264 |
-
#: admin/subscription.php:
|
1265 |
msgid "Remaining post: "
|
1266 |
msgstr ""
|
1267 |
|
1268 |
-
#: admin/subscription.php:
|
1269 |
msgid "Expire date:"
|
1270 |
msgstr ""
|
1271 |
|
1272 |
-
#: admin/subscription.php:
|
1273 |
msgid "Post Expiration Enabled"
|
1274 |
msgstr ""
|
1275 |
|
1276 |
-
#: admin/subscription.php:
|
1277 |
msgid "Assign Package"
|
1278 |
msgstr ""
|
1279 |
|
1280 |
-
#: admin/subscription.php:
|
1281 |
msgid "Show Package"
|
1282 |
msgstr ""
|
1283 |
|
1284 |
-
#: admin/subscription.php:
|
1285 |
msgid "Pack:"
|
1286 |
msgstr ""
|
1287 |
|
1288 |
-
#: admin/subscription.php:
|
1289 |
msgid "--Select--"
|
1290 |
msgstr ""
|
1291 |
|
1292 |
-
#: admin/subscription.php:
|
1293 |
msgid "Delete Package"
|
1294 |
msgstr ""
|
1295 |
|
@@ -1813,7 +1813,7 @@ msgstr ""
|
|
1813 |
msgid "Author Info"
|
1814 |
msgstr ""
|
1815 |
|
1816 |
-
#: class/frontend-dashboard.php:109 includes/free/edit-user.php:
|
1817 |
#: includes/pro/frontend-form-profile.php:330
|
1818 |
msgid "%s"
|
1819 |
msgstr ""
|
@@ -1826,31 +1826,31 @@ msgstr ""
|
|
1826 |
msgid "You are not logged in"
|
1827 |
msgstr ""
|
1828 |
|
1829 |
-
#: class/frontend-form-post.php:
|
1830 |
-
msgid "
|
1831 |
msgstr ""
|
1832 |
|
1833 |
-
#: class/frontend-form-post.php:
|
1834 |
-
msgid "
|
1835 |
msgstr ""
|
1836 |
|
1837 |
-
#: class/frontend-form-post.php:
|
1838 |
msgid "You are not allowed to edit"
|
1839 |
msgstr ""
|
1840 |
|
1841 |
-
#: class/frontend-form-post.php:
|
1842 |
msgid "I don't know how to edit this post, I don't have the form ID"
|
1843 |
msgstr ""
|
1844 |
|
1845 |
-
#: class/frontend-form-post.php:
|
1846 |
msgid "You can't edit a post while in pending mode."
|
1847 |
msgstr ""
|
1848 |
|
1849 |
-
#: class/frontend-form-post.php:
|
1850 |
msgid "Invalid email address."
|
1851 |
msgstr ""
|
1852 |
|
1853 |
-
#: class/frontend-form-post.php:
|
1854 |
msgid ""
|
1855 |
"You already have an account in our site. Please login to continue.\n"
|
1856 |
"\n"
|
@@ -1859,67 +1859,67 @@ msgid ""
|
|
1859 |
"Click 'Cancel' to stay at this page."
|
1860 |
msgstr ""
|
1861 |
|
1862 |
-
#: class/frontend-form-post.php:
|
1863 |
msgid "Something went wrong"
|
1864 |
msgstr ""
|
1865 |
|
1866 |
-
#: class/payment.php:
|
1867 |
msgid "PayPal"
|
1868 |
msgstr ""
|
1869 |
|
1870 |
-
#: class/payment.php:
|
1871 |
msgid "Bank Payment"
|
1872 |
msgstr ""
|
1873 |
|
1874 |
-
#: class/payment.php:
|
1875 |
msgid "Please select your payment page from admin panel"
|
1876 |
msgstr ""
|
1877 |
|
1878 |
-
#: class/payment.php:
|
1879 |
msgid "Your free package has been activated. Enjoy!"
|
1880 |
msgstr ""
|
1881 |
|
1882 |
-
#: class/payment.php:
|
1883 |
msgid "You already have activated a free package previously."
|
1884 |
msgstr ""
|
1885 |
|
1886 |
-
#: class/payment.php:
|
1887 |
msgid "Pricing & Plans"
|
1888 |
msgstr ""
|
1889 |
|
1890 |
-
#: class/payment.php:
|
1891 |
msgid "Change Pack"
|
1892 |
msgstr ""
|
1893 |
|
1894 |
-
#: class/payment.php:
|
1895 |
msgid "Selected Pack "
|
1896 |
msgstr ""
|
1897 |
|
1898 |
-
#: class/payment.php:
|
1899 |
msgid "Pack Price "
|
1900 |
msgstr ""
|
1901 |
|
1902 |
-
#: class/payment.php:
|
1903 |
msgid "Apply Coupon"
|
1904 |
msgstr ""
|
1905 |
|
1906 |
-
#: class/payment.php:
|
1907 |
msgid "Cancel"
|
1908 |
msgstr ""
|
1909 |
|
1910 |
-
#: class/payment.php:
|
1911 |
msgid "Have a discount code?"
|
1912 |
msgstr ""
|
1913 |
|
1914 |
-
#: class/payment.php:
|
1915 |
msgid "Choose Your Payment Method"
|
1916 |
msgstr ""
|
1917 |
|
1918 |
-
#: class/payment.php:
|
1919 |
msgid "Proceed"
|
1920 |
msgstr ""
|
1921 |
|
1922 |
-
#: class/payment.php:
|
1923 |
msgid "No Payment gateway found"
|
1924 |
msgstr ""
|
1925 |
|
@@ -1947,136 +1947,144 @@ msgstr ""
|
|
1947 |
msgid "reCAPTCHA validation failed"
|
1948 |
msgstr ""
|
1949 |
|
1950 |
-
#: class/render-form.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1951 |
msgid "Insert Photo"
|
1952 |
msgstr ""
|
1953 |
|
1954 |
-
#: class/render-form.php:
|
1955 |
#: includes/free/edit-profile.php:198
|
1956 |
msgid "Strength indicator"
|
1957 |
msgstr ""
|
1958 |
|
1959 |
-
#: class/render-form.php:
|
1960 |
msgid "Very weak"
|
1961 |
msgstr ""
|
1962 |
|
1963 |
-
#: class/render-form.php:
|
1964 |
msgid "Weak"
|
1965 |
msgstr ""
|
1966 |
|
1967 |
-
#: class/render-form.php:
|
1968 |
msgid "Medium"
|
1969 |
msgstr ""
|
1970 |
|
1971 |
-
#: class/render-form.php:
|
1972 |
msgid "Strong"
|
1973 |
msgstr ""
|
1974 |
|
1975 |
-
#: class/render-form.php:
|
1976 |
msgid "Mismatch"
|
1977 |
msgstr ""
|
1978 |
|
1979 |
-
#: class/render-form.php:
|
1980 |
msgid "-- Select --"
|
1981 |
msgstr ""
|
1982 |
|
1983 |
-
#: class/render-form.php:
|
1984 |
msgid "Select Image"
|
1985 |
msgstr ""
|
1986 |
|
1987 |
-
#: class/subscription.php:
|
1988 |
msgid "Nonce failure"
|
1989 |
msgstr ""
|
1990 |
|
1991 |
-
#: class/subscription.php:
|
1992 |
msgid "Add Subscription"
|
1993 |
msgstr ""
|
1994 |
|
1995 |
-
#: class/subscription.php:
|
1996 |
msgid "Add New Subscription"
|
1997 |
msgstr ""
|
1998 |
|
1999 |
-
#: class/subscription.php:
|
2000 |
msgid "Edit Subscription"
|
2001 |
msgstr ""
|
2002 |
|
2003 |
-
#: class/subscription.php:
|
2004 |
msgid "New Subscription"
|
2005 |
msgstr ""
|
2006 |
|
2007 |
-
#: class/subscription.php:
|
2008 |
msgid "View Subscription"
|
2009 |
msgstr ""
|
2010 |
|
2011 |
-
#: class/subscription.php:
|
2012 |
msgid "Search Subscription"
|
2013 |
msgstr ""
|
2014 |
|
2015 |
-
#: class/subscription.php:
|
2016 |
msgid "No Subscription Found"
|
2017 |
msgstr ""
|
2018 |
|
2019 |
-
#: class/subscription.php:
|
2020 |
msgid "No Subscription Found in Trash"
|
2021 |
msgstr ""
|
2022 |
|
2023 |
-
#: class/subscription.php:
|
2024 |
msgid "Parent Subscription"
|
2025 |
msgstr ""
|
2026 |
|
2027 |
-
#: class/subscription.php:
|
2028 |
msgid "Billing Details"
|
2029 |
msgstr ""
|
2030 |
|
2031 |
-
#: class/subscription.php:
|
2032 |
msgid "Package & billing details: "
|
2033 |
msgstr ""
|
2034 |
|
2035 |
-
#: class/subscription.php:
|
2036 |
msgid "Unlimited"
|
2037 |
msgstr ""
|
2038 |
|
2039 |
-
#: class/subscription.php:
|
2040 |
msgid "Please enable force pack and charge posting from admin panel"
|
2041 |
msgstr ""
|
2042 |
|
2043 |
-
#: class/subscription.php:
|
2044 |
msgid "Payment is complete"
|
2045 |
msgstr ""
|
2046 |
|
2047 |
-
#: class/subscription.php:
|
2048 |
msgid "Congratulations, your payment has been completed!"
|
2049 |
msgstr ""
|
2050 |
|
2051 |
-
#: class/subscription.php:
|
2052 |
msgid "<p><i>You have a subscription pack activated. </i></p>"
|
2053 |
msgstr ""
|
2054 |
|
2055 |
-
#: class/subscription.php:
|
2056 |
msgid "<p><i>To cancel the pack, press the following cancel button</i></p>"
|
2057 |
msgstr ""
|
2058 |
|
2059 |
-
#: class/subscription.php:
|
2060 |
msgid "Every"
|
2061 |
msgstr ""
|
2062 |
|
2063 |
-
#: class/subscription.php:
|
2064 |
msgid "One time payment"
|
2065 |
msgstr ""
|
2066 |
|
2067 |
-
#: class/subscription.php:
|
2068 |
msgid "Sign Up"
|
2069 |
msgstr ""
|
2070 |
|
2071 |
-
#: class/subscription.php:
|
2072 |
msgid "Buy Now"
|
2073 |
msgstr ""
|
2074 |
|
2075 |
-
#: class/subscription.php:
|
2076 |
msgid "This will cost you <strong>%s</strong> to add a new post. "
|
2077 |
msgstr ""
|
2078 |
|
2079 |
-
#: class/subscription.php:
|
2080 |
msgid "You must <a href=\"%s\">purchase a pack</a> before posting"
|
2081 |
msgstr ""
|
2082 |
|
@@ -2176,49 +2184,49 @@ msgstr ""
|
|
2176 |
msgid "User Deleted"
|
2177 |
msgstr ""
|
2178 |
|
2179 |
-
#: includes/free/edit-user.php:
|
2180 |
msgid "Add New User"
|
2181 |
msgstr ""
|
2182 |
|
2183 |
-
#: includes/free/edit-user.php:
|
2184 |
msgid "User Added"
|
2185 |
msgstr ""
|
2186 |
|
2187 |
-
#: includes/free/edit-user.php:
|
2188 |
msgid "Role"
|
2189 |
msgstr ""
|
2190 |
|
2191 |
-
#: includes/free/edit-user.php:
|
2192 |
-
msgid "<strong>ERROR</strong>: Please enter a username
|
2193 |
msgstr ""
|
2194 |
|
2195 |
-
#: includes/free/edit-user.php:
|
2196 |
msgid ""
|
2197 |
"<strong>ERROR</strong>: This username is invalid because it uses illegal "
|
2198 |
-
"characters. Please enter a valid username
|
2199 |
msgstr ""
|
2200 |
|
2201 |
-
#: includes/free/edit-user.php:
|
2202 |
msgid ""
|
2203 |
"<strong>ERROR</strong>: This username is already registered, please choose "
|
2204 |
-
"another one
|
2205 |
msgstr ""
|
2206 |
|
2207 |
-
#: includes/free/edit-user.php:
|
2208 |
-
msgid "<strong>ERROR</strong>: Please type your e-mail address
|
2209 |
msgstr ""
|
2210 |
|
2211 |
-
#: includes/free/edit-user.php:
|
2212 |
-
msgid "<strong>ERROR</strong>: The email address isn’t correct
|
2213 |
msgstr ""
|
2214 |
|
2215 |
-
#: includes/free/edit-user.php:
|
2216 |
msgid ""
|
2217 |
"<strong>ERROR</strong>: This email is already registered, please choose "
|
2218 |
-
"another one
|
2219 |
msgstr ""
|
2220 |
|
2221 |
-
#: includes/free/edit-user.php:
|
2222 |
msgid ""
|
2223 |
"<strong>ERROR</strong>: Couldn’t register you... please contact the "
|
2224 |
"<a href=\"mailto:%s\">webmaster</a> !"
|
@@ -3131,7 +3139,7 @@ msgstr ""
|
|
3131 |
msgid "Find Address"
|
3132 |
msgstr ""
|
3133 |
|
3134 |
-
#: includes/pro/render-form.php:
|
3135 |
msgid "Error: Really Simple Captcha plugin not found!"
|
3136 |
msgstr ""
|
3137 |
|
@@ -3160,26 +3168,18 @@ msgid "Enable trial period"
|
|
3160 |
msgstr ""
|
3161 |
|
3162 |
#: includes/pro/subscription.php:54
|
3163 |
-
msgid "Trial amount"
|
3164 |
-
msgstr ""
|
3165 |
-
|
3166 |
-
#: includes/pro/subscription.php:57
|
3167 |
-
msgid "Amount to bill for the trial period"
|
3168 |
-
msgstr ""
|
3169 |
-
|
3170 |
-
#: includes/pro/subscription.php:62
|
3171 |
msgid "Trial period"
|
3172 |
msgstr ""
|
3173 |
|
3174 |
-
#: includes/pro/subscription.php:
|
3175 |
msgid "Define the trial period"
|
3176 |
msgstr ""
|
3177 |
|
3178 |
-
#: includes/pro/subscription.php:
|
3179 |
msgid "Enable Post Number Rollback"
|
3180 |
msgstr ""
|
3181 |
|
3182 |
-
#: includes/pro/subscription.php:
|
3183 |
msgid "If enabled, number of posts will be restored if the post is deleted."
|
3184 |
msgstr ""
|
3185 |
|
@@ -3285,27 +3285,27 @@ msgstr ""
|
|
3285 |
msgid "Thanks for being with us."
|
3286 |
msgstr ""
|
3287 |
|
3288 |
-
#: lib/gateway/paypal.php:
|
3289 |
msgid "Subscription %s at %s"
|
3290 |
msgstr ""
|
3291 |
|
3292 |
-
#: lib/gateway/paypal.php:
|
3293 |
msgid "PayPal Email"
|
3294 |
msgstr ""
|
3295 |
|
3296 |
-
#: lib/gateway/paypal.php:
|
3297 |
msgid "PayPal Instruction"
|
3298 |
msgstr ""
|
3299 |
|
3300 |
-
#: lib/gateway/paypal.php:
|
3301 |
msgid "PayPal API username"
|
3302 |
msgstr ""
|
3303 |
|
3304 |
-
#: lib/gateway/paypal.php:
|
3305 |
msgid "PayPal API password"
|
3306 |
msgstr ""
|
3307 |
|
3308 |
-
#: lib/gateway/paypal.php:
|
3309 |
msgid "PayPal API signature"
|
3310 |
msgstr ""
|
3311 |
|
@@ -3445,23 +3445,23 @@ msgstr ""
|
|
3445 |
msgid "Your Post Has Been Expired"
|
3446 |
msgstr ""
|
3447 |
|
3448 |
-
#: wpuf.php:
|
3449 |
msgid "is required"
|
3450 |
msgstr ""
|
3451 |
|
3452 |
-
#: wpuf.php:
|
3453 |
msgid "does not match"
|
3454 |
msgstr ""
|
3455 |
|
3456 |
-
#: wpuf.php:
|
3457 |
msgid "is not valid"
|
3458 |
msgstr ""
|
3459 |
|
3460 |
-
#: wpuf.php:
|
3461 |
msgid "Please fix the errors to proceed"
|
3462 |
msgstr ""
|
3463 |
|
3464 |
-
#: wpuf.php:
|
3465 |
msgid "Word limit reached"
|
3466 |
msgstr ""
|
3467 |
|
1 |
+
# Copyright (C) 2017 Tareq Hasan
|
2 |
# This file is distributed under the GPL2.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: WP User Frontend 2.4.1\n"
|
6 |
"Report-Msgid-Bugs-To: "
|
7 |
"https://wedevs.com/support/forum/plugin-support/wp-user-frontend-pro/\n"
|
8 |
+
"POT-Creation-Date: 2017-01-12 04:34:46+00:00\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=utf-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"PO-Revision-Date: 2017-MO-DA HO:MI+ZONE\n"
|
13 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
14 |
"Language-Team: LANGUAGE <EMAIL@ADDRESS>\n"
|
15 |
+
"X-Generator: grunt-wp-i18n 0.5.4\n"
|
16 |
|
17 |
#: admin/add-ons.php:2
|
18 |
msgid "WP User Frontend - Add-Ons"
|
49 |
msgstr ""
|
50 |
|
51 |
#: admin/form.php:180 admin/form.php:218 admin/installer.php:74
|
52 |
+
#: admin/subscription.php:228 class/subscription.php:363
|
53 |
+
#: includes/free/edit-user.php:100 includes/pro/admin/coupon.php:183
|
54 |
#: templates/dashboard.php:102
|
55 |
msgid "Edit"
|
56 |
msgstr ""
|
230 |
msgstr ""
|
231 |
|
232 |
#: admin/form.php:645 admin/form.php:1119 admin/transaction.php:107
|
233 |
+
#: includes/free/edit-user.php:153
|
234 |
msgid "Email"
|
235 |
msgstr ""
|
236 |
|
246 |
msgid "Submit"
|
247 |
msgstr ""
|
248 |
|
249 |
+
#: admin/form.php:656 class/render-form.php:587
|
250 |
msgid "Save Draft"
|
251 |
msgstr ""
|
252 |
|
537 |
msgstr ""
|
538 |
|
539 |
#: admin/form.php:1186 admin/form.php:1600 includes/free/edit-profile.php:96
|
540 |
+
#: includes/free/edit-user.php:93 includes/free/edit-user.php:145
|
541 |
#: templates/login-form.php:21
|
542 |
msgid "Username"
|
543 |
msgstr ""
|
648 |
msgid "Login"
|
649 |
msgstr ""
|
650 |
|
651 |
+
#: admin/installer.php:82 admin/settings.php:62 class/subscription.php:338
|
652 |
+
#: class/subscription.php:358 class/subscription.php:359
|
653 |
+
#: class/subscription.php:360
|
654 |
msgid "Subscription"
|
655 |
msgstr ""
|
656 |
|
694 |
msgid "Sample Form"
|
695 |
msgstr ""
|
696 |
|
697 |
+
#: admin/posting.php:52 class/render-form.php:1419 wpuf.php:349
|
698 |
msgid "Are you sure?"
|
699 |
msgstr ""
|
700 |
|
701 |
+
#: admin/posting.php:58 includes/pro/form.php:858 wpuf.php:355
|
702 |
msgid "Allowed Files"
|
703 |
msgstr ""
|
704 |
|
1135 |
msgid "Subscription pack draft updated."
|
1136 |
msgstr ""
|
1137 |
|
1138 |
+
#: admin/subscription.php:134 admin/subscription.php:459
|
1139 |
+
#: class/subscription.php:704 class/subscription.php:883
|
1140 |
+
#: class/subscription.php:896
|
1141 |
msgid "Free"
|
1142 |
msgstr ""
|
1143 |
|
1144 |
+
#: admin/subscription.php:171 class/subscription.php:279
|
1145 |
msgid "Pack Name"
|
1146 |
msgstr ""
|
1147 |
|
1177 |
msgstr ""
|
1178 |
|
1179 |
#: admin/subscription.php:211 admin/transaction.php:188
|
1180 |
+
#: includes/free/edit-user.php:94
|
1181 |
msgid "Action"
|
1182 |
msgstr ""
|
1183 |
|
1185 |
msgid "Are you sure to delete this pack?"
|
1186 |
msgstr ""
|
1187 |
|
1188 |
+
#: admin/subscription.php:232 class/render-form.php:1419 class/upload.php:171
|
1189 |
+
#: includes/free/edit-user.php:101 templates/dashboard.php:112
|
1190 |
msgid "Delete"
|
1191 |
msgstr ""
|
1192 |
|
1215 |
msgid "Enable Post Expiration"
|
1216 |
msgstr ""
|
1217 |
|
1218 |
+
#: admin/subscription.php:341 admin/subscription.php:538
|
1219 |
#: includes/free/form.php:64 includes/pro/form.php:62
|
1220 |
msgid "Post Expiration Time"
|
1221 |
msgstr ""
|
1245 |
msgid "WPUF Subscription"
|
1246 |
msgstr ""
|
1247 |
|
1248 |
+
#: admin/subscription.php:471 class/subscription.php:715
|
1249 |
msgid "Subscription Details"
|
1250 |
msgstr ""
|
1251 |
|
1253 |
msgid "This user is using recurring subscription pack"
|
1254 |
msgstr ""
|
1255 |
|
1256 |
+
#: admin/subscription.php:480 class/subscription.php:717
|
1257 |
msgid "Subcription Name: "
|
1258 |
msgstr ""
|
1259 |
|
1261 |
msgid "Package billing details: "
|
1262 |
msgstr ""
|
1263 |
|
1264 |
+
#: admin/subscription.php:491 class/subscription.php:730
|
1265 |
msgid "Remaining post: "
|
1266 |
msgstr ""
|
1267 |
|
1268 |
+
#: admin/subscription.php:513 class/subscription.php:758
|
1269 |
msgid "Expire date:"
|
1270 |
msgstr ""
|
1271 |
|
1272 |
+
#: admin/subscription.php:527
|
1273 |
msgid "Post Expiration Enabled"
|
1274 |
msgstr ""
|
1275 |
|
1276 |
+
#: admin/subscription.php:565
|
1277 |
msgid "Assign Package"
|
1278 |
msgstr ""
|
1279 |
|
1280 |
+
#: admin/subscription.php:566
|
1281 |
msgid "Show Package"
|
1282 |
msgstr ""
|
1283 |
|
1284 |
+
#: admin/subscription.php:569 includes/free/edit-profile.php:279
|
1285 |
msgid "Pack:"
|
1286 |
msgstr ""
|
1287 |
|
1288 |
+
#: admin/subscription.php:572
|
1289 |
msgid "--Select--"
|
1290 |
msgstr ""
|
1291 |
|
1292 |
+
#: admin/subscription.php:580
|
1293 |
msgid "Delete Package"
|
1294 |
msgstr ""
|
1295 |
|
1813 |
msgid "Author Info"
|
1814 |
msgstr ""
|
1815 |
|
1816 |
+
#: class/frontend-dashboard.php:109 includes/free/edit-user.php:98
|
1817 |
#: includes/pro/frontend-form-profile.php:330
|
1818 |
msgid "%s"
|
1819 |
msgstr ""
|
1826 |
msgid "You are not logged in"
|
1827 |
msgstr ""
|
1828 |
|
1829 |
+
#: class/frontend-form-post.php:82 class/frontend-form-post.php:93
|
1830 |
+
msgid "Invalid post"
|
1831 |
msgstr ""
|
1832 |
|
1833 |
+
#: class/frontend-form-post.php:87
|
1834 |
+
msgid "Post Editing is disabled"
|
1835 |
msgstr ""
|
1836 |
|
1837 |
+
#: class/frontend-form-post.php:98
|
1838 |
msgid "You are not allowed to edit"
|
1839 |
msgstr ""
|
1840 |
|
1841 |
+
#: class/frontend-form-post.php:110
|
1842 |
msgid "I don't know how to edit this post, I don't have the form ID"
|
1843 |
msgstr ""
|
1844 |
|
1845 |
+
#: class/frontend-form-post.php:116
|
1846 |
msgid "You can't edit a post while in pending mode."
|
1847 |
msgstr ""
|
1848 |
|
1849 |
+
#: class/frontend-form-post.php:184
|
1850 |
msgid "Invalid email address."
|
1851 |
msgstr ""
|
1852 |
|
1853 |
+
#: class/frontend-form-post.php:193
|
1854 |
msgid ""
|
1855 |
"You already have an account in our site. Please login to continue.\n"
|
1856 |
"\n"
|
1859 |
"Click 'Cancel' to stay at this page."
|
1860 |
msgstr ""
|
1861 |
|
1862 |
+
#: class/frontend-form-post.php:546 includes/pro/frontend-form-profile.php:310
|
1863 |
msgid "Something went wrong"
|
1864 |
msgstr ""
|
1865 |
|
1866 |
+
#: class/payment.php:23 class/payment.php:24
|
1867 |
msgid "PayPal"
|
1868 |
msgstr ""
|
1869 |
|
1870 |
+
#: class/payment.php:28 class/payment.php:29
|
1871 |
msgid "Bank Payment"
|
1872 |
msgstr ""
|
1873 |
|
1874 |
+
#: class/payment.php:70
|
1875 |
msgid "Please select your payment page from admin panel"
|
1876 |
msgstr ""
|
1877 |
|
1878 |
+
#: class/payment.php:118
|
1879 |
msgid "Your free package has been activated. Enjoy!"
|
1880 |
msgstr ""
|
1881 |
|
1882 |
+
#: class/payment.php:120
|
1883 |
msgid "You already have activated a free package previously."
|
1884 |
msgstr ""
|
1885 |
|
1886 |
+
#: class/payment.php:144
|
1887 |
msgid "Pricing & Plans"
|
1888 |
msgstr ""
|
1889 |
|
1890 |
+
#: class/payment.php:146
|
1891 |
msgid "Change Pack"
|
1892 |
msgstr ""
|
1893 |
|
1894 |
+
#: class/payment.php:157 includes/pro/coupons.php:117
|
1895 |
msgid "Selected Pack "
|
1896 |
msgstr ""
|
1897 |
|
1898 |
+
#: class/payment.php:158 includes/pro/coupons.php:118
|
1899 |
msgid "Pack Price "
|
1900 |
msgstr ""
|
1901 |
|
1902 |
+
#: class/payment.php:170
|
1903 |
msgid "Apply Coupon"
|
1904 |
msgstr ""
|
1905 |
|
1906 |
+
#: class/payment.php:171 class/subscription.php:828
|
1907 |
msgid "Cancel"
|
1908 |
msgstr ""
|
1909 |
|
1910 |
+
#: class/payment.php:174
|
1911 |
msgid "Have a discount code?"
|
1912 |
msgstr ""
|
1913 |
|
1914 |
+
#: class/payment.php:185
|
1915 |
msgid "Choose Your Payment Method"
|
1916 |
msgstr ""
|
1917 |
|
1918 |
+
#: class/payment.php:222
|
1919 |
msgid "Proceed"
|
1920 |
msgstr ""
|
1921 |
|
1922 |
+
#: class/payment.php:226
|
1923 |
msgid "No Payment gateway found"
|
1924 |
msgstr ""
|
1925 |
|
1947 |
msgid "reCAPTCHA validation failed"
|
1948 |
msgstr ""
|
1949 |
|
1950 |
+
#: class/render-form.php:301
|
1951 |
+
msgid "Your selected form is no longer available."
|
1952 |
+
msgstr ""
|
1953 |
+
|
1954 |
+
#: class/render-form.php:306
|
1955 |
+
msgid "Please make sure you've published your form."
|
1956 |
+
msgstr ""
|
1957 |
+
|
1958 |
+
#: class/render-form.php:871
|
1959 |
msgid "Insert Photo"
|
1960 |
msgstr ""
|
1961 |
|
1962 |
+
#: class/render-form.php:1143 class/render-form.php:1148
|
1963 |
#: includes/free/edit-profile.php:198
|
1964 |
msgid "Strength indicator"
|
1965 |
msgstr ""
|
1966 |
|
1967 |
+
#: class/render-form.php:1149
|
1968 |
msgid "Very weak"
|
1969 |
msgstr ""
|
1970 |
|
1971 |
+
#: class/render-form.php:1150
|
1972 |
msgid "Weak"
|
1973 |
msgstr ""
|
1974 |
|
1975 |
+
#: class/render-form.php:1151
|
1976 |
msgid "Medium"
|
1977 |
msgstr ""
|
1978 |
|
1979 |
+
#: class/render-form.php:1152
|
1980 |
msgid "Strong"
|
1981 |
msgstr ""
|
1982 |
|
1983 |
+
#: class/render-form.php:1153
|
1984 |
msgid "Mismatch"
|
1985 |
msgstr ""
|
1986 |
|
1987 |
+
#: class/render-form.php:1175 class/render-form.php:1283
|
1988 |
msgid "-- Select --"
|
1989 |
msgstr ""
|
1990 |
|
1991 |
+
#: class/render-form.php:1407
|
1992 |
msgid "Select Image"
|
1993 |
msgstr ""
|
1994 |
|
1995 |
+
#: class/subscription.php:59
|
1996 |
msgid "Nonce failure"
|
1997 |
msgstr ""
|
1998 |
|
1999 |
+
#: class/subscription.php:361
|
2000 |
msgid "Add Subscription"
|
2001 |
msgstr ""
|
2002 |
|
2003 |
+
#: class/subscription.php:362
|
2004 |
msgid "Add New Subscription"
|
2005 |
msgstr ""
|
2006 |
|
2007 |
+
#: class/subscription.php:364
|
2008 |
msgid "Edit Subscription"
|
2009 |
msgstr ""
|
2010 |
|
2011 |
+
#: class/subscription.php:365
|
2012 |
msgid "New Subscription"
|
2013 |
msgstr ""
|
2014 |
|
2015 |
+
#: class/subscription.php:366 class/subscription.php:367
|
2016 |
msgid "View Subscription"
|
2017 |
msgstr ""
|
2018 |
|
2019 |
+
#: class/subscription.php:368
|
2020 |
msgid "Search Subscription"
|
2021 |
msgstr ""
|
2022 |
|
2023 |
+
#: class/subscription.php:369
|
2024 |
msgid "No Subscription Found"
|
2025 |
msgstr ""
|
2026 |
|
2027 |
+
#: class/subscription.php:370
|
2028 |
msgid "No Subscription Found in Trash"
|
2029 |
msgstr ""
|
2030 |
|
2031 |
+
#: class/subscription.php:371
|
2032 |
msgid "Parent Subscription"
|
2033 |
msgstr ""
|
2034 |
|
2035 |
+
#: class/subscription.php:400
|
2036 |
msgid "Billing Details"
|
2037 |
msgstr ""
|
2038 |
|
2039 |
+
#: class/subscription.php:719
|
2040 |
msgid "Package & billing details: "
|
2041 |
msgstr ""
|
2042 |
|
2043 |
+
#: class/subscription.php:743
|
2044 |
msgid "Unlimited"
|
2045 |
msgstr ""
|
2046 |
|
2047 |
+
#: class/subscription.php:796
|
2048 |
msgid "Please enable force pack and charge posting from admin panel"
|
2049 |
msgstr ""
|
2050 |
|
2051 |
+
#: class/subscription.php:806
|
2052 |
msgid "Payment is complete"
|
2053 |
msgstr ""
|
2054 |
|
2055 |
+
#: class/subscription.php:806
|
2056 |
msgid "Congratulations, your payment has been completed!"
|
2057 |
msgstr ""
|
2058 |
|
2059 |
+
#: class/subscription.php:821
|
2060 |
msgid "<p><i>You have a subscription pack activated. </i></p>"
|
2061 |
msgstr ""
|
2062 |
|
2063 |
+
#: class/subscription.php:823
|
2064 |
msgid "<p><i>To cancel the pack, press the following cancel button</i></p>"
|
2065 |
msgstr ""
|
2066 |
|
2067 |
+
#: class/subscription.php:864
|
2068 |
msgid "Every"
|
2069 |
msgstr ""
|
2070 |
|
2071 |
+
#: class/subscription.php:868
|
2072 |
msgid "One time payment"
|
2073 |
msgstr ""
|
2074 |
|
2075 |
+
#: class/subscription.php:880
|
2076 |
msgid "Sign Up"
|
2077 |
msgstr ""
|
2078 |
|
2079 |
+
#: class/subscription.php:885
|
2080 |
msgid "Buy Now"
|
2081 |
msgstr ""
|
2082 |
|
2083 |
+
#: class/subscription.php:941
|
2084 |
msgid "This will cost you <strong>%s</strong> to add a new post. "
|
2085 |
msgstr ""
|
2086 |
|
2087 |
+
#: class/subscription.php:960
|
2088 |
msgid "You must <a href=\"%s\">purchase a pack</a> before posting"
|
2089 |
msgstr ""
|
2090 |
|
2184 |
msgid "User Deleted"
|
2185 |
msgstr ""
|
2186 |
|
2187 |
+
#: includes/free/edit-user.php:120 includes/free/edit-user.php:178
|
2188 |
msgid "Add New User"
|
2189 |
msgstr ""
|
2190 |
|
2191 |
+
#: includes/free/edit-user.php:133
|
2192 |
msgid "User Added"
|
2193 |
msgstr ""
|
2194 |
|
2195 |
+
#: includes/free/edit-user.php:161
|
2196 |
msgid "Role"
|
2197 |
msgstr ""
|
2198 |
|
2199 |
+
#: includes/free/edit-user.php:205
|
2200 |
+
msgid "<strong>ERROR</strong>: Please enter a username"
|
2201 |
msgstr ""
|
2202 |
|
2203 |
+
#: includes/free/edit-user.php:207
|
2204 |
msgid ""
|
2205 |
"<strong>ERROR</strong>: This username is invalid because it uses illegal "
|
2206 |
+
"characters. Please enter a valid username"
|
2207 |
msgstr ""
|
2208 |
|
2209 |
+
#: includes/free/edit-user.php:210
|
2210 |
msgid ""
|
2211 |
"<strong>ERROR</strong>: This username is already registered, please choose "
|
2212 |
+
"another one"
|
2213 |
msgstr ""
|
2214 |
|
2215 |
+
#: includes/free/edit-user.php:215
|
2216 |
+
msgid "<strong>ERROR</strong>: Please type your e-mail address"
|
2217 |
msgstr ""
|
2218 |
|
2219 |
+
#: includes/free/edit-user.php:217
|
2220 |
+
msgid "<strong>ERROR</strong>: The email address isn’t correct"
|
2221 |
msgstr ""
|
2222 |
|
2223 |
+
#: includes/free/edit-user.php:220
|
2224 |
msgid ""
|
2225 |
"<strong>ERROR</strong>: This email is already registered, please choose "
|
2226 |
+
"another one"
|
2227 |
msgstr ""
|
2228 |
|
2229 |
+
#: includes/free/edit-user.php:243
|
2230 |
msgid ""
|
2231 |
"<strong>ERROR</strong>: Couldn’t register you... please contact the "
|
2232 |
"<a href=\"mailto:%s\">webmaster</a> !"
|
3139 |
msgid "Find Address"
|
3140 |
msgstr ""
|
3141 |
|
3142 |
+
#: includes/pro/render-form.php:700
|
3143 |
msgid "Error: Really Simple Captcha plugin not found!"
|
3144 |
msgstr ""
|
3145 |
|
3168 |
msgstr ""
|
3169 |
|
3170 |
#: includes/pro/subscription.php:54
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3171 |
msgid "Trial period"
|
3172 |
msgstr ""
|
3173 |
|
3174 |
+
#: includes/pro/subscription.php:62
|
3175 |
msgid "Define the trial period"
|
3176 |
msgstr ""
|
3177 |
|
3178 |
+
#: includes/pro/subscription.php:67
|
3179 |
msgid "Enable Post Number Rollback"
|
3180 |
msgstr ""
|
3181 |
|
3182 |
+
#: includes/pro/subscription.php:71
|
3183 |
msgid "If enabled, number of posts will be restored if the post is deleted."
|
3184 |
msgstr ""
|
3185 |
|
3285 |
msgid "Thanks for being with us."
|
3286 |
msgstr ""
|
3287 |
|
3288 |
+
#: lib/gateway/paypal.php:60
|
3289 |
msgid "Subscription %s at %s"
|
3290 |
msgstr ""
|
3291 |
|
3292 |
+
#: lib/gateway/paypal.php:91
|
3293 |
msgid "PayPal Email"
|
3294 |
msgstr ""
|
3295 |
|
3296 |
+
#: lib/gateway/paypal.php:96
|
3297 |
msgid "PayPal Instruction"
|
3298 |
msgstr ""
|
3299 |
|
3300 |
+
#: lib/gateway/paypal.php:103
|
3301 |
msgid "PayPal API username"
|
3302 |
msgstr ""
|
3303 |
|
3304 |
+
#: lib/gateway/paypal.php:107
|
3305 |
msgid "PayPal API password"
|
3306 |
msgstr ""
|
3307 |
|
3308 |
+
#: lib/gateway/paypal.php:111
|
3309 |
msgid "PayPal API signature"
|
3310 |
msgstr ""
|
3311 |
|
3445 |
msgid "Your Post Has Been Expired"
|
3446 |
msgstr ""
|
3447 |
|
3448 |
+
#: wpuf.php:279
|
3449 |
msgid "is required"
|
3450 |
msgstr ""
|
3451 |
|
3452 |
+
#: wpuf.php:280
|
3453 |
msgid "does not match"
|
3454 |
msgstr ""
|
3455 |
|
3456 |
+
#: wpuf.php:281
|
3457 |
msgid "is not valid"
|
3458 |
msgstr ""
|
3459 |
|
3460 |
+
#: wpuf.php:343
|
3461 |
msgid "Please fix the errors to proceed"
|
3462 |
msgstr ""
|
3463 |
|
3464 |
+
#: wpuf.php:345
|
3465 |
msgid "Word limit reached"
|
3466 |
msgstr ""
|
3467 |
|
lib/gateway/paypal.php
CHANGED
@@ -17,9 +17,11 @@ class WPUF_Paypal {
|
|
17 |
$this->gateway_cancel_url = 'https://api-3t.paypal.com/nvp';
|
18 |
$this->test_mode = false;
|
19 |
|
20 |
-
add_action( 'wpuf_gateway_paypal', array($this, 'prepare_to_send') );
|
21 |
-
add_action( 'wpuf_options_payment', array($this, 'payment_options') );
|
22 |
-
add_action( 'init', array($this, 'paypal_success') );
|
|
|
|
|
23 |
}
|
24 |
|
25 |
function subscription_cancel( $user_id ) {
|
@@ -55,7 +57,7 @@ class WPUF_Paypal {
|
|
55 |
'METHOD' => 'ManageRecurringPaymentsProfileStatus',
|
56 |
'PROFILEID' => $profile_id,
|
57 |
'ACTION' => ucfirst( $new_status ),
|
58 |
-
'NOTE' => sprintf( __( 'Subscription %s at %s', '
|
59 |
);
|
60 |
|
61 |
// Send back post vars to paypal
|
@@ -148,8 +150,6 @@ class WPUF_Paypal {
|
|
148 |
|
149 |
if ( $data['type'] == 'pack' && $data['custom']['recurring_pay'] == 'yes' ) {
|
150 |
|
151 |
-
$trial_cost = !empty( $data['custom']['trial_cost'] ) ? number_format( $data['custom']['trial_cost'] ) : '0';
|
152 |
-
|
153 |
if( $data['custom']['cycle_period'] == "day")
|
154 |
$period = "D";
|
155 |
elseif( $data['custom']['cycle_period'] == "week")
|
@@ -176,7 +176,7 @@ class WPUF_Paypal {
|
|
176 |
'p3' => !empty( $data['custom']['billing_cycle_number'] ) ? $data['custom']['billing_cycle_number']: '0',
|
177 |
't3' => $period,
|
178 |
'item_name' => $data['custom']['post_title'],
|
179 |
-
'custom' => json_encode( array( 'billing_amount' => $billing_amount, '
|
180 |
'no_shipping' => '1',
|
181 |
'shipping' => '0',
|
182 |
'no_note' => '1',
|
@@ -192,7 +192,6 @@ class WPUF_Paypal {
|
|
192 |
);
|
193 |
|
194 |
if ( $data['custom']['trial_status'] == 'yes' ) {
|
195 |
-
$paypal_args['a1'] = $trial_cost;
|
196 |
$paypal_args['p1'] = $data['custom']['trial_duration'];
|
197 |
$paypal_args['t1'] = $trial_period;
|
198 |
}
|
@@ -245,21 +244,14 @@ class WPUF_Paypal {
|
|
245 |
function paypal_success() {
|
246 |
$postdata = $_POST;
|
247 |
|
248 |
-
//
|
249 |
-
if ( isset( $_POST['wpuf_payment_cancel_submit'] ) && $_POST['action'] == 'wpuf_cancel_pay' && wp_verify_nonce( $_POST['wpuf_payment_cancel'], '_wpnonce' ) ) {
|
250 |
-
$user_id = isset( $_POST['user_id'] ) ? $_POST['user_id'] : '';
|
251 |
-
$this->recurring_change_status( $user_id, 'Cancel' );
|
252 |
-
return;
|
253 |
-
}
|
254 |
-
|
255 |
-
//when subscription expire
|
256 |
if ( isset( $postdata['txn_type'] ) && ( $postdata['txn_type'] == 'subscr_eot' ) ) {
|
257 |
$custom = json_decode( stripcslashes( $postdata['custom'] ) );
|
258 |
$this->subscription_cancel( $custom->user_id );
|
259 |
return;
|
260 |
}
|
261 |
|
262 |
-
//when subscription cancel
|
263 |
if ( isset( $postdata['txn_type'] ) && ( $postdata['txn_type'] == 'subscr_cancel' ) ) {
|
264 |
$custom = json_decode( stripcslashes( $postdata['custom'] ) );
|
265 |
$this->subscription_cancel( $custom->user_id );
|
@@ -284,7 +276,7 @@ class WPUF_Paypal {
|
|
284 |
// check if recurring payment
|
285 |
if ( isset( $postdata['txn_type'] ) && ( $postdata['txn_type'] == 'subscr_payment' ) && ( strtolower( $postdata['payment_status'] ) == 'completed' ) ) {
|
286 |
|
287 |
-
if ( $postdata['mc_gross'] == $custom->billing_amount
|
288 |
|
289 |
$insert_payment = true;
|
290 |
$post_id = 0;
|
@@ -396,6 +388,18 @@ class WPUF_Paypal {
|
|
396 |
}
|
397 |
}
|
398 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
399 |
/**
|
400 |
* Validate the IPN notification
|
401 |
*
|
17 |
$this->gateway_cancel_url = 'https://api-3t.paypal.com/nvp';
|
18 |
$this->test_mode = false;
|
19 |
|
20 |
+
add_action( 'wpuf_gateway_paypal', array( $this, 'prepare_to_send' ) );
|
21 |
+
add_action( 'wpuf_options_payment', array( $this, 'payment_options' ) );
|
22 |
+
add_action( 'init', array( $this, 'paypal_success' ) );
|
23 |
+
add_action( 'wpuf_cancel_payment_paypal', array( $this, 'handle_cancel_subscription' ) );
|
24 |
+
add_action( 'wpuf_cancel_subscription_paypal', array( $this, 'handle_cancel_subscription' ) );
|
25 |
}
|
26 |
|
27 |
function subscription_cancel( $user_id ) {
|
57 |
'METHOD' => 'ManageRecurringPaymentsProfileStatus',
|
58 |
'PROFILEID' => $profile_id,
|
59 |
'ACTION' => ucfirst( $new_status ),
|
60 |
+
'NOTE' => sprintf( __( 'Subscription %s at %s', 'wpuf' ), $new_status_string, get_bloginfo( 'name' ) ),
|
61 |
);
|
62 |
|
63 |
// Send back post vars to paypal
|
150 |
|
151 |
if ( $data['type'] == 'pack' && $data['custom']['recurring_pay'] == 'yes' ) {
|
152 |
|
|
|
|
|
153 |
if( $data['custom']['cycle_period'] == "day")
|
154 |
$period = "D";
|
155 |
elseif( $data['custom']['cycle_period'] == "week")
|
176 |
'p3' => !empty( $data['custom']['billing_cycle_number'] ) ? $data['custom']['billing_cycle_number']: '0',
|
177 |
't3' => $period,
|
178 |
'item_name' => $data['custom']['post_title'],
|
179 |
+
'custom' => json_encode( array( 'billing_amount' => $billing_amount, 'type' => $data['type'], 'user_id' => $user_id, 'coupon_id' => $coupon_id )),
|
180 |
'no_shipping' => '1',
|
181 |
'shipping' => '0',
|
182 |
'no_note' => '1',
|
192 |
);
|
193 |
|
194 |
if ( $data['custom']['trial_status'] == 'yes' ) {
|
|
|
195 |
$paypal_args['p1'] = $data['custom']['trial_duration'];
|
196 |
$paypal_args['t1'] = $trial_period;
|
197 |
}
|
244 |
function paypal_success() {
|
245 |
$postdata = $_POST;
|
246 |
|
247 |
+
// when subscription expire
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
248 |
if ( isset( $postdata['txn_type'] ) && ( $postdata['txn_type'] == 'subscr_eot' ) ) {
|
249 |
$custom = json_decode( stripcslashes( $postdata['custom'] ) );
|
250 |
$this->subscription_cancel( $custom->user_id );
|
251 |
return;
|
252 |
}
|
253 |
|
254 |
+
// when subscription cancel
|
255 |
if ( isset( $postdata['txn_type'] ) && ( $postdata['txn_type'] == 'subscr_cancel' ) ) {
|
256 |
$custom = json_decode( stripcslashes( $postdata['custom'] ) );
|
257 |
$this->subscription_cancel( $custom->user_id );
|
276 |
// check if recurring payment
|
277 |
if ( isset( $postdata['txn_type'] ) && ( $postdata['txn_type'] == 'subscr_payment' ) && ( strtolower( $postdata['payment_status'] ) == 'completed' ) ) {
|
278 |
|
279 |
+
if ( $postdata['mc_gross'] == $custom->billing_amount ) {
|
280 |
|
281 |
$insert_payment = true;
|
282 |
$post_id = 0;
|
388 |
}
|
389 |
}
|
390 |
|
391 |
+
/**
|
392 |
+
* Handle the cancel payment / subscription
|
393 |
+
*
|
394 |
+
* @return void
|
395 |
+
*
|
396 |
+
* @since 2.4.1
|
397 |
+
*/
|
398 |
+
public function handle_cancel_subscription( $data ) {
|
399 |
+
$user_id = isset( $data['user_id'] ) ? $data['user_id'] : '';
|
400 |
+
$this->recurring_change_status( $user_id, 'Cancel' );
|
401 |
+
}
|
402 |
+
|
403 |
/**
|
404 |
* Validate the IPN notification
|
405 |
*
|
readme.txt
CHANGED
@@ -1,16 +1,46 @@
|
|
1 |
=== WP User Frontend ===
|
2 |
-
Contributors: tareq1988, wedevs
|
3 |
Donate link: http://tareq.wedevs.com/donate/
|
4 |
Tags: frontend, post, edit, dashboard, restrict, content submission, guest post, guest, registration, profile, anonymous post, gravity, gravity forms, formidable, author, author profile, authors, comments, conditional fields, conditional logic, custom fields, file uploads, form builder, front-end login, front-end registration, profile builder, profiles, member, member directory, members, Membership
|
5 |
-
Requires at least:
|
6 |
-
Tested up to: 4.
|
7 |
Stable tag: trunk
|
|
|
8 |
|
9 |
-
The
|
10 |
|
11 |
== Description ==
|
12 |
|
13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
|
15 |
= Features: =
|
16 |
|
@@ -59,6 +89,11 @@ Try an <a href="http://demo.wedevs.com/wpuf/wp-admin/">online demo</a> of the Pr
|
|
59 |
* Italian translation by Gabriele Lamberti
|
60 |
* Persian translation by Abolfazl Esmailinejad
|
61 |
|
|
|
|
|
|
|
|
|
|
|
62 |
[Github Repository](https://github.com/tareq1988/WP-User-Frontend).
|
63 |
|
64 |
== Installation ==
|
@@ -79,7 +114,6 @@ After having installed the plugin:
|
|
79 |
= Video =
|
80 |
[youtube https://www.youtube.com/watch?v=pK3nLeR2fzc]
|
81 |
|
82 |
-
|
83 |
== Screenshots ==
|
84 |
|
85 |
1. Admin panel
|
@@ -127,6 +161,25 @@ redirected to the edit page with that post id. Then you'll see the edit post for
|
|
127 |
|
128 |
== Changelog ==
|
129 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
130 |
= v2.4 (26 October, 2016) =
|
131 |
|
132 |
* [fix] Plupload string translations
|
1 |
=== WP User Frontend ===
|
2 |
+
Contributors: tareq1988, wedevs, sohelamin
|
3 |
Donate link: http://tareq.wedevs.com/donate/
|
4 |
Tags: frontend, post, edit, dashboard, restrict, content submission, guest post, guest, registration, profile, anonymous post, gravity, gravity forms, formidable, author, author profile, authors, comments, conditional fields, conditional logic, custom fields, file uploads, form builder, front-end login, front-end registration, profile builder, profiles, member, member directory, members, Membership
|
5 |
+
Requires at least: 4.0
|
6 |
+
Tested up to: 4.7
|
7 |
Stable tag: trunk
|
8 |
+
License: GPLv2
|
9 |
|
10 |
+
The best frontend plugin for WordPress. Users can create, edit, delete, build profiles, post on subscription, use coupons etc.
|
11 |
|
12 |
== Description ==
|
13 |
|
14 |
+
The forms gives users the ability to create new posts, edit their profile all from the site frontend, so that the user does not need to enter the backend admin panel to do action.
|
15 |
+
|
16 |
+
= The best free plugin with most features =
|
17 |
+
|
18 |
+
WP User Frontend offers you the most features for free
|
19 |
+
than the other frontend post submission plugins out there.
|
20 |
+
|
21 |
+
= Use anywhere easily with shortcodes =
|
22 |
+
|
23 |
+
All of the forms get an unique shortcode which you can paste on any page and the form will generate without breaking the style of your theme.
|
24 |
+
|
25 |
+
= Submit and update anything from Frontend =
|
26 |
+
|
27 |
+
Users can upload files, fill out forms, even entry data with multiple choice menus. Also, since all the forms are created as a custom post, so our post management can allow users to update their posts from the frontend.
|
28 |
+
|
29 |
+
= Build customized forms with custom post types =
|
30 |
+
|
31 |
+
Taking the advantage of custom post types will allow you to work on any platform. WP User Frontend is WooCommerce supported, so you can also create products using our forms.
|
32 |
+
|
33 |
+
= Earn with subscription based posting =
|
34 |
+
|
35 |
+
Create subscription packs to take “Pay Per Post” payments. Submissions posted via these subscriptions have duration and posting limits.
|
36 |
+
|
37 |
+
= Get reminded with emails =
|
38 |
+
|
39 |
+
Trigger emails on multiple events like new submission, publish notification, subscription join/leave to stay notified about your forms performance.
|
40 |
+
|
41 |
+
= Build forms with one click (PRO feature) =
|
42 |
+
|
43 |
+
Quickly create registration forms, woocommerce product forms, guest posting forms, frontend posting forms etc with one click using our templates and assorted fields.
|
44 |
|
45 |
= Features: =
|
46 |
|
89 |
* Italian translation by Gabriele Lamberti
|
90 |
* Persian translation by Abolfazl Esmailinejad
|
91 |
|
92 |
+
= Checkout Our Other Products =
|
93 |
+
* [WP ERP](https://wperp.com/?utm_medium=referral&utm_source=wporg&utm_campaign=WPUF+Readme&utm_content=WP+ERP)
|
94 |
+
* [Dokan - Multivendor Plugin](https://wedevs.com/products/plugins/dokan/?utm_medium=referral&utm_source=wporg&utm_campaign=WP+ERP+Readme&utm_content=Dokan)
|
95 |
+
* [WP Project Manager](https://wedevs.com/products/plugins/wp-project-manager-pro/?utm_medium=referral&utm_source=wporg&utm_campaign=WP+ERP+Readme&utm_content=WP+Project+Manager)
|
96 |
+
|
97 |
[Github Repository](https://github.com/tareq1988/WP-User-Frontend).
|
98 |
|
99 |
== Installation ==
|
114 |
= Video =
|
115 |
[youtube https://www.youtube.com/watch?v=pK3nLeR2fzc]
|
116 |
|
|
|
117 |
== Screenshots ==
|
118 |
|
119 |
1. Admin panel
|
161 |
|
162 |
== Changelog ==
|
163 |
|
164 |
+
= v2.4.1 (12 January, 2017) =
|
165 |
+
|
166 |
+
* [new] Added a function `wpuf_get_countries()`
|
167 |
+
* [fix] Enable paynow url on dashboard if a new post is submitted as draft
|
168 |
+
* [fix] Invalid post id for editing
|
169 |
+
* [fix] Removed subscription trial cost
|
170 |
+
* [new] Showing messages when there is no form associated with an id or deleted or not published yet
|
171 |
+
* [new] Added dynamic action hooks `wpuf_cancel_payment_{gateway}`, `wpuf_cancel_subscription_{gateway}`
|
172 |
+
* [fix] User profile url on transaction's list
|
173 |
+
* [fix] Multistep form button & validations
|
174 |
+
* [fix] Replaced some raw query to builder
|
175 |
+
* [new] jQuery added on preview form
|
176 |
+
* [fix] Some undefined variables issue
|
177 |
+
* [fix] Replaced `$wpdb->escape()` to `$wpdb->prepare()` for depreciation
|
178 |
+
* [fix] Missing data when saving draft post
|
179 |
+
* [fix] Updated some textdomains
|
180 |
+
* [fix] `wpuf-ajax-tag-search` priv/nopriv ajax request
|
181 |
+
|
182 |
+
|
183 |
= v2.4 (26 October, 2016) =
|
184 |
|
185 |
* [fix] Plupload string translations
|
templates/login-form.php
CHANGED
@@ -30,11 +30,11 @@
|
|
30 |
|
31 |
<p class="forgetmenot">
|
32 |
<input name="rememberme" type="checkbox" id="wpuf-rememberme" value="forever" />
|
33 |
-
<label for="wpuf-rememberme"><?php esc_attr_e( 'Remember Me' ); ?></label>
|
34 |
</p>
|
35 |
|
36 |
<p class="submit">
|
37 |
-
<input type="submit" name="wp-submit" id="wp-submit" value="<?php esc_attr_e( 'Log In' ); ?>" />
|
38 |
<input type="hidden" name="redirect_to" value="<?php echo WPUF_Login::get_posted_value( 'redirect_to' ); ?>" />
|
39 |
<input type="hidden" name="wpuf_login" value="true" />
|
40 |
<input type="hidden" name="action" value="login" />
|
30 |
|
31 |
<p class="forgetmenot">
|
32 |
<input name="rememberme" type="checkbox" id="wpuf-rememberme" value="forever" />
|
33 |
+
<label for="wpuf-rememberme"><?php esc_attr_e( 'Remember Me', 'wpuf' ); ?></label>
|
34 |
</p>
|
35 |
|
36 |
<p class="submit">
|
37 |
+
<input type="submit" name="wp-submit" id="wp-submit" value="<?php esc_attr_e( 'Log In', 'wpuf' ); ?>" />
|
38 |
<input type="hidden" name="redirect_to" value="<?php echo WPUF_Login::get_posted_value( 'redirect_to' ); ?>" />
|
39 |
<input type="hidden" name="wpuf_login" value="true" />
|
40 |
<input type="hidden" name="action" value="login" />
|
templates/lost-pass-form.php
CHANGED
@@ -11,14 +11,14 @@ WPUF will always look in your theme's directory first, before using this default
|
|
11 |
|
12 |
<form name="lostpasswordform" id="lostpasswordform" action="" method="post">
|
13 |
<p>
|
14 |
-
<label for="wpuf-user_login"><?php _e( 'Username or E-mail:' ); ?></label>
|
15 |
<input type="text" name="user_login" id="wpuf-user_login" class="input" value="" size="20" />
|
16 |
</p>
|
17 |
|
18 |
<?php do_action( 'lostpassword_form' ); ?>
|
19 |
|
20 |
<p class="submit">
|
21 |
-
<input type="submit" name="wp-submit" id="wp-submit" value="<?php esc_attr_e( 'Get New Password' ); ?>" />
|
22 |
<input type="hidden" name="redirect_to" value="<?php echo WPUF_Login::get_posted_value( 'redirect_to' ); ?>" />
|
23 |
<input type="hidden" name="wpuf_reset_password" value="true" />
|
24 |
<input type="hidden" name="action" value="lostpassword" />
|
11 |
|
12 |
<form name="lostpasswordform" id="lostpasswordform" action="" method="post">
|
13 |
<p>
|
14 |
+
<label for="wpuf-user_login"><?php _e( 'Username or E-mail:', 'wpuf' ); ?></label>
|
15 |
<input type="text" name="user_login" id="wpuf-user_login" class="input" value="" size="20" />
|
16 |
</p>
|
17 |
|
18 |
<?php do_action( 'lostpassword_form' ); ?>
|
19 |
|
20 |
<p class="submit">
|
21 |
+
<input type="submit" name="wp-submit" id="wp-submit" value="<?php esc_attr_e( 'Get New Password', 'wpuf' ); ?>" />
|
22 |
<input type="hidden" name="redirect_to" value="<?php echo WPUF_Login::get_posted_value( 'redirect_to' ); ?>" />
|
23 |
<input type="hidden" name="wpuf_reset_password" value="true" />
|
24 |
<input type="hidden" name="action" value="lostpassword" />
|
templates/reset-pass-form.php
CHANGED
@@ -11,19 +11,19 @@ WPUF will always look in your theme's directory first, before using this default
|
|
11 |
|
12 |
<form name="resetpasswordform" id="resetpasswordform" action="" method="post">
|
13 |
<p>
|
14 |
-
<label for="wpuf-pass1"><?php _e( 'New password' ); ?></label>
|
15 |
<input autocomplete="off" name="pass1" id="wpuf-pass1" class="input" size="20" value="" type="password" autocomplete="off" />
|
16 |
</p>
|
17 |
|
18 |
<p>
|
19 |
-
<label for="wpuf-pass2"><?php _e( 'Confirm new password' ); ?></label>
|
20 |
<input autocomplete="off" name="pass2" id="wpuf-pass2" class="input" size="20" value="" type="password" autocomplete="off" />
|
21 |
</p>
|
22 |
|
23 |
<?php do_action( 'resetpassword_form' ); ?>
|
24 |
|
25 |
<p class="submit">
|
26 |
-
<input type="submit" name="wp-submit" id="wp-submit" value="<?php esc_attr_e( 'Reset Password' ); ?>" />
|
27 |
<input type="hidden" name="key" value="<?php echo WPUF_Login::get_posted_value( 'key' ); ?>" />
|
28 |
<input type="hidden" name="login" id="user_login" value="<?php echo WPUF_Login::get_posted_value( 'login' ); ?>" />
|
29 |
<input type="hidden" name="wpuf_reset_password" value="true" />
|
11 |
|
12 |
<form name="resetpasswordform" id="resetpasswordform" action="" method="post">
|
13 |
<p>
|
14 |
+
<label for="wpuf-pass1"><?php _e( 'New password', 'wpuf' ); ?></label>
|
15 |
<input autocomplete="off" name="pass1" id="wpuf-pass1" class="input" size="20" value="" type="password" autocomplete="off" />
|
16 |
</p>
|
17 |
|
18 |
<p>
|
19 |
+
<label for="wpuf-pass2"><?php _e( 'Confirm new password', 'wpuf' ); ?></label>
|
20 |
<input autocomplete="off" name="pass2" id="wpuf-pass2" class="input" size="20" value="" type="password" autocomplete="off" />
|
21 |
</p>
|
22 |
|
23 |
<?php do_action( 'resetpassword_form' ); ?>
|
24 |
|
25 |
<p class="submit">
|
26 |
+
<input type="submit" name="wp-submit" id="wp-submit" value="<?php esc_attr_e( 'Reset Password', 'wpuf' ); ?>" />
|
27 |
<input type="hidden" name="key" value="<?php echo WPUF_Login::get_posted_value( 'key' ); ?>" />
|
28 |
<input type="hidden" name="login" id="user_login" value="<?php echo WPUF_Login::get_posted_value( 'login' ); ?>" />
|
29 |
<input type="hidden" name="wpuf_reset_password" value="true" />
|
wpuf-functions.php
CHANGED
@@ -719,7 +719,7 @@ function wpuf_show_custom_fields( $content ) {
|
|
719 |
|
720 |
$address_html = '';
|
721 |
|
722 |
-
if ( isset ( $field_value[0] ) ) {
|
723 |
|
724 |
foreach ( $field_value[0] as $field_key => $value ) {
|
725 |
|
@@ -1018,6 +1018,7 @@ function wpufe_ajax_tag_search() {
|
|
1018 |
wp_die();
|
1019 |
}
|
1020 |
|
|
|
1021 |
add_action( 'wp_ajax_nopriv_wpuf-ajax-tag-search', 'wpufe_ajax_tag_search' );
|
1022 |
|
1023 |
/**
|
@@ -1253,3 +1254,22 @@ function wpuf_get_post_form_templates() {
|
|
1253 |
|
1254 |
return apply_filters( 'wpuf_get_post_form_templates', $integrations );
|
1255 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
719 |
|
720 |
$address_html = '';
|
721 |
|
722 |
+
if ( isset( $field_value[0] ) && is_array( $field_value[0] ) ) {
|
723 |
|
724 |
foreach ( $field_value[0] as $field_key => $value ) {
|
725 |
|
1018 |
wp_die();
|
1019 |
}
|
1020 |
|
1021 |
+
add_action( 'wp_ajax_wpuf-ajax-tag-search', 'wpufe_ajax_tag_search' );
|
1022 |
add_action( 'wp_ajax_nopriv_wpuf-ajax-tag-search', 'wpufe_ajax_tag_search' );
|
1023 |
|
1024 |
/**
|
1254 |
|
1255 |
return apply_filters( 'wpuf_get_post_form_templates', $integrations );
|
1256 |
}
|
1257 |
+
|
1258 |
+
/**
|
1259 |
+
* Get countries
|
1260 |
+
*
|
1261 |
+
* @since 2.4.1
|
1262 |
+
*
|
1263 |
+
* @param string $type (optional)
|
1264 |
+
*
|
1265 |
+
* @return array|string
|
1266 |
+
*/
|
1267 |
+
function wpuf_get_countries( $type = 'array' ) {
|
1268 |
+
$countries = include_once dirname( __FILE__ ) . '/includes/countries-formated.php';
|
1269 |
+
|
1270 |
+
if ( $type == 'json' ) {
|
1271 |
+
$countries = json_encode( $countries );
|
1272 |
+
}
|
1273 |
+
|
1274 |
+
return $countries;
|
1275 |
+
}
|
wpuf.php
CHANGED
@@ -4,13 +4,13 @@ Plugin Name: WP User Frontend
|
|
4 |
Plugin URI: https://wordpress.org/plugins/wp-user-frontend/
|
5 |
Description: Create, edit, delete, manages your post, pages or custom post types from frontend. Create registration forms, frontend profile and more...
|
6 |
Author: Tareq Hasan
|
7 |
-
Version: 2.4
|
8 |
Author URI: https://tareq.co
|
9 |
License: GPL2
|
10 |
TextDomain: wpuf
|
11 |
*/
|
12 |
|
13 |
-
define( 'WPUF_VERSION', '2.4' );
|
14 |
define( 'WPUF_FILE', __FILE__ );
|
15 |
define( 'WPUF_ROOT', dirname( __FILE__ ) );
|
16 |
define( 'WPUF_ROOT_URI', plugins_url( '', __FILE__ ) );
|
@@ -261,6 +261,8 @@ class WP_User_Frontend {
|
|
261 |
* @since 0.2
|
262 |
*/
|
263 |
function enqueue_scripts() {
|
|
|
|
|
264 |
global $post;
|
265 |
|
266 |
$scheme = is_ssl() ? 'https' : 'http';
|
@@ -280,7 +282,7 @@ class WP_User_Frontend {
|
|
280 |
}
|
281 |
</script>
|
282 |
<?php
|
283 |
-
wp_enqueue_script( 'wpuf-form', WPUF_ASSET_URI . '/js/frontend-form.js', array('jquery') );
|
284 |
wp_enqueue_script( 'wpuf-conditional-logic', WPUF_ASSET_URI . '/js/conditional-logic.js', array('jquery'), false, true );
|
285 |
}
|
286 |
|
@@ -350,7 +352,7 @@ class WP_User_Frontend {
|
|
350 |
'plupload' => array(
|
351 |
'url' => admin_url( 'admin-ajax.php' ) . '?nonce=' . wp_create_nonce( 'wpuf-upload-nonce' ),
|
352 |
'flash_swf_url' => includes_url( 'js/plupload/plupload.flash.swf' ),
|
353 |
-
'filters' => array(array('title' => __( 'Allowed Files' ), 'extensions' => '*')),
|
354 |
'multipart' => true,
|
355 |
'urlstream_upload' => true,
|
356 |
)
|
4 |
Plugin URI: https://wordpress.org/plugins/wp-user-frontend/
|
5 |
Description: Create, edit, delete, manages your post, pages or custom post types from frontend. Create registration forms, frontend profile and more...
|
6 |
Author: Tareq Hasan
|
7 |
+
Version: 2.4.1
|
8 |
Author URI: https://tareq.co
|
9 |
License: GPL2
|
10 |
TextDomain: wpuf
|
11 |
*/
|
12 |
|
13 |
+
define( 'WPUF_VERSION', '2.4.1' );
|
14 |
define( 'WPUF_FILE', __FILE__ );
|
15 |
define( 'WPUF_ROOT', dirname( __FILE__ ) );
|
16 |
define( 'WPUF_ROOT_URI', plugins_url( '', __FILE__ ) );
|
261 |
* @since 0.2
|
262 |
*/
|
263 |
function enqueue_scripts() {
|
264 |
+
$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
|
265 |
+
|
266 |
global $post;
|
267 |
|
268 |
$scheme = is_ssl() ? 'https' : 'http';
|
282 |
}
|
283 |
</script>
|
284 |
<?php
|
285 |
+
wp_enqueue_script( 'wpuf-form', WPUF_ASSET_URI . '/js/frontend-form' . $suffix . '.js', array('jquery') );
|
286 |
wp_enqueue_script( 'wpuf-conditional-logic', WPUF_ASSET_URI . '/js/conditional-logic.js', array('jquery'), false, true );
|
287 |
}
|
288 |
|
352 |
'plupload' => array(
|
353 |
'url' => admin_url( 'admin-ajax.php' ) . '?nonce=' . wp_create_nonce( 'wpuf-upload-nonce' ),
|
354 |
'flash_swf_url' => includes_url( 'js/plupload/plupload.flash.swf' ),
|
355 |
+
'filters' => array(array('title' => __( 'Allowed Files', 'wpuf' ), 'extensions' => '*')),
|
356 |
'multipart' => true,
|
357 |
'urlstream_upload' => true,
|
358 |
)
|