Plugin Directory

Changeset 2041471


Ignore:
Timestamp:
02/28/2019 12:15:33 PM (7 years ago)
Author:
rabbii
Message:

Deploy version 3.1.1

Location:
wp-user-frontend
Files:
11 edited
71 copied

Legend:

Unmodified
Added
Removed
  • wp-user-frontend/tags/3.1.1/includes/class-frontend-form-post.php

    r2022708 r2041471  
    22
    33class WPUF_Frontend_Form extends WPUF_Frontend_Render_Form{
    4 
    5 
    64
    75    private static $_instance;
     
    309307            if ( isset( $_POST[$_POST['wpuf_is_publish_time']] ) && !empty( $_POST[$_POST['wpuf_is_publish_time']] ) ) {
    310308                // $postarr['post_date'] = date( 'Y-m-d H:i:s', strtotime( str_replace( array( ':', '/' ), '-', $_POST[$_POST['wpuf_is_publish_time']] ) ) );
    311                 $date_time = explode(" ", $_POST[$_POST['wpuf_is_publish_time']] );
     309                $date_time = explode(" ", trim($_POST[$_POST['wpuf_is_publish_time']]) );
    312310                if ( !empty ( $date_time[0] ) ) {
    313311                    $timestamp = strtotime( str_replace( array( '/' ), '-', $date_time[0] ) );
     
    412410            update_post_meta( $post_id, self::$config_id, $form_id );
    413411            // if user has a subscription pack
    414             $this->wpuf_user_subscription_pack($this->form_settings);
     412            $this->wpuf_user_subscription_pack( $this->form_settings, $post_id );
    415413            // set the post form_id for later usage
    416414            update_post_meta( $post_id, self::$config_id, $form_id );
     
    616614            delete_post_meta( $post_id, $file_input['name'] );
    617615
     616            $image_ids = '';
     617
    618618            if ( count( $file_input['value'] ) > 1  ) {
    619619                $image_ids = maybe_serialize( $file_input['value'] );
    620             } else {
     620            }
     621
     622            if ( count( $file_input['value'] ) == 1 ) {
    621623                $image_ids = $file_input['value'][0];
    622624            }
    623625
    624             add_post_meta( $post_id, $file_input['name'], $image_ids );
     626            if ( !empty( $image_ids ) ) {
     627                add_post_meta( $post_id, $file_input['name'], $image_ids );
     628            }
    625629
    626630            //to track how many files are being uploaded
     
    788792    }
    789793
    790     function wpuf_user_subscription_pack($form_settings) {
     794    function wpuf_user_subscription_pack( $form_settings, $post_id=null ) {
    791795
    792796        // if user has a subscription pack
  • wp-user-frontend/tags/3.1.1/includes/class-frontend-render-form.php

    r2022708 r2041471  
    697697                            $meta_key_value[$value['name']] = $_POST[$value['name']];
    698698                        } elseif ( !empty( $acf_compatibility ) && $acf_compatibility == 'yes' ) {
    699                            $meta_key_value[$value['name']] = maybe_serialize( $_POST[$value['name']] );
     699                           $meta_key_value[$value['name']] = $_POST[$value['name']];
    700700                        } else {
    701701                            $meta_key_value[$value['name']] = implode( self::$separator, $_POST[$value['name']] );
  • wp-user-frontend/tags/3.1.1/includes/fields/class-field-checkbox.php

    r2022708 r2041471  
    2626        if ( isset($post_id) &&  $post_id != '0'  ) {
    2727            if ( $this->is_meta( $field_settings ) ) {
    28                 $selected = $this->get_meta( $post_id, $field_settings['name'], $type );
    29                 $selected = explode(" | ",$selected);
     28                if ( $value = $this->get_meta( $post_id, $field_settings['name'], $type, true ) ) {
     29                    if ( is_serialized( $value ) ) {
     30                        $selected = maybe_unserialize( $value );
     31                    } elseif ( is_array( $value ) ) {
     32                        $selected = $value;
     33                    } else {
     34                        $selected = explode( "|", $value );
     35                    }
     36                }
    3037            }
    3138        }else{
  • wp-user-frontend/tags/3.1.1/includes/fields/class-field-image.php

    r2022708 r2041471  
    5151
    5252        $this->field_print_label($field_settings, $form_id );
     53       
     54        // Check for the existance of 'button_label' and fallback to label if it is not found
     55        $label = array_key_exists( 'button_label', $field_settings ) ? $field_settings['button_label'] : $field_settings['label'];
    5356
    5457    ?>
     
    5760                <div id="wpuf-<?php echo $unique_id; ?>-upload-container">
    5861                    <div class="wpuf-attachment-upload-filelist" data-type="file" data-required="<?php echo $field_settings['required']; ?>">
    59                         <a id="wpuf-<?php echo $unique_id; ?>-pickfiles" data-form_id="<?php echo $form_id; ?>" class="button file-selector <?php echo ' wpuf_' . $field_settings['name'] . '_' . $form_id; ?>" href="#"><?php echo $field_settings['button_label']; ?></a>
     62                        <a id="wpuf-<?php echo $unique_id; ?>-pickfiles" data-form_id="<?php echo $form_id; ?>" class="button file-selector <?php echo ' wpuf_' . $field_settings['name'] . '_' . $form_id; ?>" href="#"><?php echo $label; ?></a>
    6063
    6164                        <ul class="wpuf-attachment-list thumbnails">
  • wp-user-frontend/tags/3.1.1/includes/fields/class-field-post-taxonomy.php

    r2022708 r2041471  
    5252
    5353        $this->exclude            = $this->field_settings['exclude'];
    54 
    55         if ( $this->exclude_type == 'child_of' ) {
     54        if ( $this->exclude_type == 'child_of' && !empty( $this->exclude ) ) {
    5655          $this->exclude = $this->exclude[0];
    5756        }
     
    102101                break;
    103102
    104         }
     103        } ?>
     104        <span class="wpuf-wordlimit-message wpuf-help"></span>
     105        <?php $this->help_text( $field_settings );
    105106
    106107    }
     
    117118        // $exclude            = $attr['exclude'];
    118119
    119         // if ( $this->exclude_type == 'child_of' ) {
    120         //   $this->exclude = $this->exclude[0];
    121         // }
    122 
     120        if ( $this->exclude_type == 'child_of' && !empty( $this->exclude ) ) {
     121          $this->exclude = $this->exclude[0];
     122        }
    123123        $tax_args  = array(
    124124            'show_option_none' => __( '-- Select --', 'wp-user-frontend' ),
     
    154154            'order'        => $attr['order'],
    155155            'name'         => $attr['name'],
    156             //'last_term_id' => isset( $attr['parent_cat'] ) ? $attr['parent_cat'] : '',
     156           // 'last_term_id' => isset( $attr['parent_cat'] ) ? $attr['parent_cat'] : '',
    157157            //'term_id'      => $selected
    158158        );
    159159        $attr = apply_filters( 'wpuf_taxonomy_checklist_args', $attr );
    160160        ?>
    161         <span data-taxonomy=<?php echo json_encode( $attr ); ?>></span>
     161        <span data-taxonomy=<?php  echo json_encode( $attr ); ?>></span>
    162162        <?php
    163163    }
     
    182182
    183183                $level = 0;
    184                 asort( $terms );
    185                 $last_term_id = end( $terms );
    186 
    187                 foreach( $terms as $term_id) {
     184                asort( $this->terms );
     185                $last_term_id = end( $this->terms );
     186                foreach( $this->terms as $term_id) {
    188187                    $class = ( $last_term_id != $term_id ) ? 'hasChild' : '';
    189188                    ?>
     
    192191                    </div>
    193192                <?php
    194                     $attr['parent_cat'] = $term_id;
     193                    $this->field_settings['parent_cat'] = $term_id;
    195194                    $level++;
    196195                }
    197196            }
    198 
    199197        ?>
    200198        </div>
  • wp-user-frontend/tags/3.1.1/languages/wp-user-frontend.pot

    r2022708 r2041471  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: WP User Frontend 3.1.0\n"
     5"Project-Id-Version: WP User Frontend 3.1.1\n"
    66"Report-Msgid-Bugs-To: https://wedevs.com/contact/\n"
    7 "POT-Creation-Date: 2019-01-31 11:48:06+00:00\n"
     7"POT-Creation-Date: 2019-02-28 11:59:31+00:00\n"
    88"MIME-Version: 1.0\n"
    99"Content-Type: text/plain; charset=utf-8\n"
     
    157157#: includes/fields/class-abstract-fields.php:358
    158158#: includes/fields/class-abstract-fields.php:426
    159 #: includes/fields/class-field-checkbox.php:81
     159#: includes/fields/class-field-checkbox.php:88
    160160#: includes/fields/class-field-radio.php:86 includes/free/form-element.php:477
    161161#: wpuf.php:706
     
    172172#: includes/fields/class-abstract-fields.php:359
    173173#: includes/fields/class-abstract-fields.php:427
    174 #: includes/fields/class-field-checkbox.php:82
     174#: includes/fields/class-field-checkbox.php:89
    175175#: includes/fields/class-field-radio.php:87 includes/free/form-element.php:478
    176176#: wpuf.php:707
     
    523523#: class/render-form.php:1680
    524524#: includes/fields/class-field-featured-image.php:103
    525 #: includes/fields/class-field-image.php:122
    526 #: includes/fields/class-field-image.php:143
     525#: includes/fields/class-field-image.php:125
     526#: includes/fields/class-field-image.php:146
    527527msgid "Select Image"
    528528msgstr ""
     
    577577
    578578#: admin/form-builder/class-wpuf-admin-form-builder.php:268
    579 #: includes/fields/class-field-checkbox.php:110
     579#: includes/fields/class-field-checkbox.php:117
    580580#: includes/fields/class-field-dropdown.php:101
    581581#: includes/fields/class-field-multidropdown.php:93
     
    29622962#: admin/template-post.php:93 admin/template.php:634
    29632963#: includes/fields/class-field-featured-image.php:97
    2964 #: includes/fields/class-field-image.php:107
     2964#: includes/fields/class-field-image.php:110
    29652965msgid "Enter maximum upload size limit in KB"
    29662966msgstr ""
     
    29682968#: admin/template-post.php:105 admin/template.php:646
    29692969#: includes/fields/class-field-featured-image.php:93
    2970 #: includes/fields/class-field-image.php:103
     2970#: includes/fields/class-field-image.php:106
    29712971msgid "Max. file size"
    29722972msgstr ""
     
    32783278msgstr ""
    32793279
    3280 #: admin/template.php:635 includes/fields/class-field-image.php:116
     3280#: admin/template.php:635 includes/fields/class-field-image.php:119
    32813281msgid "Number of images can be uploaded"
    32823282msgstr ""
    32833283
    3284 #: admin/template.php:651 includes/fields/class-field-image.php:112
     3284#: admin/template.php:651 includes/fields/class-field-image.php:115
    32853285msgid "Max. files"
    32863286msgstr ""
     
    34453445msgstr ""
    34463446
    3447 #: class/frontend-form-post.php:171 includes/class-frontend-form-post.php:41
     3447#: class/frontend-form-post.php:171 includes/class-frontend-form-post.php:39
    34483448msgid "You are not logged in"
    34493449msgstr ""
    34503450
    34513451#: class/frontend-form-post.php:179 class/frontend-form-post.php:208
    3452 #: includes/class-frontend-form-post.php:47
    3453 #: includes/class-frontend-form-post.php:76
     3452#: includes/class-frontend-form-post.php:45
     3453#: includes/class-frontend-form-post.php:74
    34543454msgid "Invalid post"
    34553455msgstr ""
    34563456
    3457 #: class/frontend-form-post.php:186 includes/class-frontend-form-post.php:54
     3457#: class/frontend-form-post.php:186 includes/class-frontend-form-post.php:52
    34583458msgid "Your edit access for this post has been locked by an administrator."
    34593459msgstr ""
    34603460
    3461 #: class/frontend-form-post.php:190 includes/class-frontend-form-post.php:58
     3461#: class/frontend-form-post.php:190 includes/class-frontend-form-post.php:56
    34623462msgid "Your allocated time for editing this post has been expired."
    34633463msgstr ""
    34643464
    3465 #: class/frontend-form-post.php:197 includes/class-frontend-form-post.php:65
     3465#: class/frontend-form-post.php:197 includes/class-frontend-form-post.php:63
    34663466msgid "Your post edit access has been locked by an administrator."
    34673467msgstr ""
    34683468
    3469 #: class/frontend-form-post.php:202 includes/class-frontend-form-post.php:70
     3469#: class/frontend-form-post.php:202 includes/class-frontend-form-post.php:68
    34703470msgid "Post Editing is disabled"
    34713471msgstr ""
    34723472
    3473 #: class/frontend-form-post.php:213 includes/class-frontend-form-post.php:81
     3473#: class/frontend-form-post.php:213 includes/class-frontend-form-post.php:79
    34743474msgid "You are not allowed to edit"
    34753475msgstr ""
    34763476
    3477 #: class/frontend-form-post.php:225 includes/class-frontend-form-post.php:92
     3477#: class/frontend-form-post.php:225 includes/class-frontend-form-post.php:90
    34783478msgid "I don't know how to edit this post, I don't have the form ID"
    34793479msgstr ""
    34803480
    3481 #: class/frontend-form-post.php:231 includes/class-frontend-form-post.php:104
     3481#: class/frontend-form-post.php:231 includes/class-frontend-form-post.php:102
    34823482msgid "You can't edit a post while in pending mode."
    34833483msgstr ""
     
    34883488msgstr ""
    34893489
    3490 #: class/frontend-form-post.php:335 includes/class-frontend-form-post.php:467
     3490#: class/frontend-form-post.php:335 includes/class-frontend-form-post.php:465
    34913491msgid "Invalid email address."
    34923492msgstr ""
    34933493
    3494 #: class/frontend-form-post.php:344 includes/class-frontend-form-post.php:477
     3494#: class/frontend-form-post.php:344 includes/class-frontend-form-post.php:475
    34953495msgid ""
    34963496"You already have an account in our site. Please login to continue.\n"
     
    35013501msgstr ""
    35023502
    3503 #: class/frontend-form-post.php:393 includes/class-frontend-form-post.php:533
     3503#: class/frontend-form-post.php:393 includes/class-frontend-form-post.php:531
    35043504msgid "You do not have sufficient permissions to access this form."
    35053505msgstr ""
    35063506
    35073507#: class/frontend-form-post.php:732 class/frontend-form-post.php:739
    3508 #: includes/class-frontend-form-post.php:889
    3509 #: includes/class-frontend-form-post.php:895
     3508#: includes/class-frontend-form-post.php:893
     3509#: includes/class-frontend-form-post.php:899
    35103510msgid ""
    35113511"Thank you for posting on our site. We have sent you an confirmation email. "
     
    35133513msgstr ""
    35143514
    3515 #: class/frontend-form-post.php:792 includes/class-frontend-form-post.php:451
     3515#: class/frontend-form-post.php:792 includes/class-frontend-form-post.php:449
    35163516msgid "Something went wrong"
    35173517msgstr ""
    35183518
    3519 #: class/frontend-form-post.php:1170 includes/class-frontend-form-post.php:783
     3519#: class/frontend-form-post.php:1170 includes/class-frontend-form-post.php:787
    35203520msgid "Email successfully verified. Please Login."
    35213521msgstr ""
     
    36283628#: includes/fields/class-field-dropdown.php:102
    36293629#: includes/fields/class-field-multidropdown.php:94
    3630 #: includes/fields/class-field-post-taxonomy.php:317
     3630#: includes/fields/class-field-post-taxonomy.php:315
    36313631msgid "- select -"
    36323632msgstr ""
     
    37253725msgstr ""
    37263726
    3727 #: class/render-form.php:1485 includes/fields/class-field-post-taxonomy.php:72
     3727#: class/render-form.php:1485 includes/fields/class-field-post-taxonomy.php:71
    37283728msgid "This field is no longer available."
    37293729msgstr ""
     
    47104710
    47114711#: includes/fields/class-abstract-fields.php:423
    4712 #: includes/fields/class-field-checkbox.php:78
     4712#: includes/fields/class-field-checkbox.php:85
    47134713#: includes/fields/class-field-radio.php:83
    47144714msgid "Show in inline list"
     
    47164716
    47174717#: includes/fields/class-abstract-fields.php:433
    4718 #: includes/fields/class-field-checkbox.php:88
     4718#: includes/fields/class-field-checkbox.php:95
    47194719#: includes/fields/class-field-radio.php:93
    47204720msgid "Show this option in an inline list"
     
    47424742
    47434743#: includes/fields/class-field-featured-image.php:101
    4744 #: includes/fields/class-field-image.php:120
     4744#: includes/fields/class-field-image.php:123
    47454745msgid "Button Label"
    47464746msgstr ""
    47474747
    47484748#: includes/fields/class-field-featured-image.php:106
    4749 #: includes/fields/class-field-image.php:125
     4749#: includes/fields/class-field-image.php:128
    47504750msgid "Enter a label for the Select button"
    47514751msgstr ""
     
    61616161msgstr ""
    61626162
    6163 #: wpuf.php:875
     6163#: wpuf.php:871
    61646164msgid "Error: Nonce verification failed"
    61656165msgstr ""
  • wp-user-frontend/tags/3.1.1/readme.txt

    r2022708 r2041471  
    44Tags: Forms, registration, profile-builder, login, membership
    55Requires at least: 4.0
    6 Tested up to: 5.0.3
     6Tested up to: 5.1
    77Requires PHP: 5.4
    8 Stable tag: 3.1.0
     8Stable tag: 3.1.1
    99License: GPLv2
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    253253
    254254== Changelog ==
     255
     256= v3.1.1 (28 February, 2019) =
     257
     258* **Fix:** Help text in the Category field were not displaying on the frontend.
     259* **Fix:** Category was not editable when editing the post from the frontend.
     260* **Fix:** Display the admin bar when user role exist.
     261* **Fix:** When the admin edits a post from the backend, it was creating duplicate post.
     262* **Fix:** After enabling post expiration in post form do not save post_expiration meta.
     263* **Fix:** Checkboxes were not linking/syncing with ACF field.
     264* **Fix:** Publish time input option in the Date/Time field, was not working.
    255265
    256266= v3.1.0 (31 January, 2019) =
  • wp-user-frontend/tags/3.1.1/wpuf.php

    r2022708 r2041471  
    55Description: Create, edit, delete, manages your post, pages or custom post types from frontend. Create registration forms, frontend profile and more...
    66Author: Tareq Hasan
    7 Version: 3.1.0
     7Version: 3.1.1
    88Author URI: https://tareq.co
    99License: GPL2 or later
     
    1313*/
    1414
    15 define( 'WPUF_VERSION', '3.1.0' );
     15define( 'WPUF_VERSION', '3.1.1' );
    1616define( 'WPUF_FILE', __FILE__ );
    1717define( 'WPUF_ROOT', dirname( __FILE__ ) );
     
    775775        $current_user = wp_get_current_user();
    776776
    777         if ( get_user_meta( $current_user->ID, 'show_admin_bar_front', true ) == "true" ) {
    778             return true;
    779         }
    780 
    781777        if ( !in_array( $current_user->roles[0], $roles ) ) {
    782778            return false;
  • wp-user-frontend/trunk/includes/class-frontend-form-post.php

    r2022708 r2041471  
    22
    33class WPUF_Frontend_Form extends WPUF_Frontend_Render_Form{
    4 
    5 
    64
    75    private static $_instance;
     
    309307            if ( isset( $_POST[$_POST['wpuf_is_publish_time']] ) && !empty( $_POST[$_POST['wpuf_is_publish_time']] ) ) {
    310308                // $postarr['post_date'] = date( 'Y-m-d H:i:s', strtotime( str_replace( array( ':', '/' ), '-', $_POST[$_POST['wpuf_is_publish_time']] ) ) );
    311                 $date_time = explode(" ", $_POST[$_POST['wpuf_is_publish_time']] );
     309                $date_time = explode(" ", trim($_POST[$_POST['wpuf_is_publish_time']]) );
    312310                if ( !empty ( $date_time[0] ) ) {
    313311                    $timestamp = strtotime( str_replace( array( '/' ), '-', $date_time[0] ) );
     
    412410            update_post_meta( $post_id, self::$config_id, $form_id );
    413411            // if user has a subscription pack
    414             $this->wpuf_user_subscription_pack($this->form_settings);
     412            $this->wpuf_user_subscription_pack( $this->form_settings, $post_id );
    415413            // set the post form_id for later usage
    416414            update_post_meta( $post_id, self::$config_id, $form_id );
     
    616614            delete_post_meta( $post_id, $file_input['name'] );
    617615
     616            $image_ids = '';
     617
    618618            if ( count( $file_input['value'] ) > 1  ) {
    619619                $image_ids = maybe_serialize( $file_input['value'] );
    620             } else {
     620            }
     621
     622            if ( count( $file_input['value'] ) == 1 ) {
    621623                $image_ids = $file_input['value'][0];
    622624            }
    623625
    624             add_post_meta( $post_id, $file_input['name'], $image_ids );
     626            if ( !empty( $image_ids ) ) {
     627                add_post_meta( $post_id, $file_input['name'], $image_ids );
     628            }
    625629
    626630            //to track how many files are being uploaded
     
    788792    }
    789793
    790     function wpuf_user_subscription_pack($form_settings) {
     794    function wpuf_user_subscription_pack( $form_settings, $post_id=null ) {
    791795
    792796        // if user has a subscription pack
  • wp-user-frontend/trunk/includes/class-frontend-render-form.php

    r2022708 r2041471  
    697697                            $meta_key_value[$value['name']] = $_POST[$value['name']];
    698698                        } elseif ( !empty( $acf_compatibility ) && $acf_compatibility == 'yes' ) {
    699                            $meta_key_value[$value['name']] = maybe_serialize( $_POST[$value['name']] );
     699                           $meta_key_value[$value['name']] = $_POST[$value['name']];
    700700                        } else {
    701701                            $meta_key_value[$value['name']] = implode( self::$separator, $_POST[$value['name']] );
  • wp-user-frontend/trunk/includes/fields/class-field-checkbox.php

    r2022708 r2041471  
    2626        if ( isset($post_id) &&  $post_id != '0'  ) {
    2727            if ( $this->is_meta( $field_settings ) ) {
    28                 $selected = $this->get_meta( $post_id, $field_settings['name'], $type );
    29                 $selected = explode(" | ",$selected);
     28                if ( $value = $this->get_meta( $post_id, $field_settings['name'], $type, true ) ) {
     29                    if ( is_serialized( $value ) ) {
     30                        $selected = maybe_unserialize( $value );
     31                    } elseif ( is_array( $value ) ) {
     32                        $selected = $value;
     33                    } else {
     34                        $selected = explode( "|", $value );
     35                    }
     36                }
    3037            }
    3138        }else{
  • wp-user-frontend/trunk/includes/fields/class-field-image.php

    r2022708 r2041471  
    5151
    5252        $this->field_print_label($field_settings, $form_id );
     53       
     54        // Check for the existance of 'button_label' and fallback to label if it is not found
     55        $label = array_key_exists( 'button_label', $field_settings ) ? $field_settings['button_label'] : $field_settings['label'];
    5356
    5457    ?>
     
    5760                <div id="wpuf-<?php echo $unique_id; ?>-upload-container">
    5861                    <div class="wpuf-attachment-upload-filelist" data-type="file" data-required="<?php echo $field_settings['required']; ?>">
    59                         <a id="wpuf-<?php echo $unique_id; ?>-pickfiles" data-form_id="<?php echo $form_id; ?>" class="button file-selector <?php echo ' wpuf_' . $field_settings['name'] . '_' . $form_id; ?>" href="#"><?php echo $field_settings['button_label']; ?></a>
     62                        <a id="wpuf-<?php echo $unique_id; ?>-pickfiles" data-form_id="<?php echo $form_id; ?>" class="button file-selector <?php echo ' wpuf_' . $field_settings['name'] . '_' . $form_id; ?>" href="#"><?php echo $label; ?></a>
    6063
    6164                        <ul class="wpuf-attachment-list thumbnails">
  • wp-user-frontend/trunk/includes/fields/class-field-post-taxonomy.php

    r2022708 r2041471  
    5252
    5353        $this->exclude            = $this->field_settings['exclude'];
    54 
    55         if ( $this->exclude_type == 'child_of' ) {
     54        if ( $this->exclude_type == 'child_of' && !empty( $this->exclude ) ) {
    5655          $this->exclude = $this->exclude[0];
    5756        }
     
    102101                break;
    103102
    104         }
     103        } ?>
     104        <span class="wpuf-wordlimit-message wpuf-help"></span>
     105        <?php $this->help_text( $field_settings );
    105106
    106107    }
     
    117118        // $exclude            = $attr['exclude'];
    118119
    119         // if ( $this->exclude_type == 'child_of' ) {
    120         //   $this->exclude = $this->exclude[0];
    121         // }
    122 
     120        if ( $this->exclude_type == 'child_of' && !empty( $this->exclude ) ) {
     121          $this->exclude = $this->exclude[0];
     122        }
    123123        $tax_args  = array(
    124124            'show_option_none' => __( '-- Select --', 'wp-user-frontend' ),
     
    154154            'order'        => $attr['order'],
    155155            'name'         => $attr['name'],
    156             //'last_term_id' => isset( $attr['parent_cat'] ) ? $attr['parent_cat'] : '',
     156           // 'last_term_id' => isset( $attr['parent_cat'] ) ? $attr['parent_cat'] : '',
    157157            //'term_id'      => $selected
    158158        );
    159159        $attr = apply_filters( 'wpuf_taxonomy_checklist_args', $attr );
    160160        ?>
    161         <span data-taxonomy=<?php echo json_encode( $attr ); ?>></span>
     161        <span data-taxonomy=<?php  echo json_encode( $attr ); ?>></span>
    162162        <?php
    163163    }
     
    182182
    183183                $level = 0;
    184                 asort( $terms );
    185                 $last_term_id = end( $terms );
    186 
    187                 foreach( $terms as $term_id) {
     184                asort( $this->terms );
     185                $last_term_id = end( $this->terms );
     186                foreach( $this->terms as $term_id) {
    188187                    $class = ( $last_term_id != $term_id ) ? 'hasChild' : '';
    189188                    ?>
     
    192191                    </div>
    193192                <?php
    194                     $attr['parent_cat'] = $term_id;
     193                    $this->field_settings['parent_cat'] = $term_id;
    195194                    $level++;
    196195                }
    197196            }
    198 
    199197        ?>
    200198        </div>
  • wp-user-frontend/trunk/languages/wp-user-frontend.pot

    r2022708 r2041471  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: WP User Frontend 3.1.0\n"
     5"Project-Id-Version: WP User Frontend 3.1.1\n"
    66"Report-Msgid-Bugs-To: https://wedevs.com/contact/\n"
    7 "POT-Creation-Date: 2019-01-31 11:48:06+00:00\n"
     7"POT-Creation-Date: 2019-02-28 11:59:31+00:00\n"
    88"MIME-Version: 1.0\n"
    99"Content-Type: text/plain; charset=utf-8\n"
     
    157157#: includes/fields/class-abstract-fields.php:358
    158158#: includes/fields/class-abstract-fields.php:426
    159 #: includes/fields/class-field-checkbox.php:81
     159#: includes/fields/class-field-checkbox.php:88
    160160#: includes/fields/class-field-radio.php:86 includes/free/form-element.php:477
    161161#: wpuf.php:706
     
    172172#: includes/fields/class-abstract-fields.php:359
    173173#: includes/fields/class-abstract-fields.php:427
    174 #: includes/fields/class-field-checkbox.php:82
     174#: includes/fields/class-field-checkbox.php:89
    175175#: includes/fields/class-field-radio.php:87 includes/free/form-element.php:478
    176176#: wpuf.php:707
     
    523523#: class/render-form.php:1680
    524524#: includes/fields/class-field-featured-image.php:103
    525 #: includes/fields/class-field-image.php:122
    526 #: includes/fields/class-field-image.php:143
     525#: includes/fields/class-field-image.php:125
     526#: includes/fields/class-field-image.php:146
    527527msgid "Select Image"
    528528msgstr ""
     
    577577
    578578#: admin/form-builder/class-wpuf-admin-form-builder.php:268
    579 #: includes/fields/class-field-checkbox.php:110
     579#: includes/fields/class-field-checkbox.php:117
    580580#: includes/fields/class-field-dropdown.php:101
    581581#: includes/fields/class-field-multidropdown.php:93
     
    29622962#: admin/template-post.php:93 admin/template.php:634
    29632963#: includes/fields/class-field-featured-image.php:97
    2964 #: includes/fields/class-field-image.php:107
     2964#: includes/fields/class-field-image.php:110
    29652965msgid "Enter maximum upload size limit in KB"
    29662966msgstr ""
     
    29682968#: admin/template-post.php:105 admin/template.php:646
    29692969#: includes/fields/class-field-featured-image.php:93
    2970 #: includes/fields/class-field-image.php:103
     2970#: includes/fields/class-field-image.php:106
    29712971msgid "Max. file size"
    29722972msgstr ""
     
    32783278msgstr ""
    32793279
    3280 #: admin/template.php:635 includes/fields/class-field-image.php:116
     3280#: admin/template.php:635 includes/fields/class-field-image.php:119
    32813281msgid "Number of images can be uploaded"
    32823282msgstr ""
    32833283
    3284 #: admin/template.php:651 includes/fields/class-field-image.php:112
     3284#: admin/template.php:651 includes/fields/class-field-image.php:115
    32853285msgid "Max. files"
    32863286msgstr ""
     
    34453445msgstr ""
    34463446
    3447 #: class/frontend-form-post.php:171 includes/class-frontend-form-post.php:41
     3447#: class/frontend-form-post.php:171 includes/class-frontend-form-post.php:39
    34483448msgid "You are not logged in"
    34493449msgstr ""
    34503450
    34513451#: class/frontend-form-post.php:179 class/frontend-form-post.php:208
    3452 #: includes/class-frontend-form-post.php:47
    3453 #: includes/class-frontend-form-post.php:76
     3452#: includes/class-frontend-form-post.php:45
     3453#: includes/class-frontend-form-post.php:74
    34543454msgid "Invalid post"
    34553455msgstr ""
    34563456
    3457 #: class/frontend-form-post.php:186 includes/class-frontend-form-post.php:54
     3457#: class/frontend-form-post.php:186 includes/class-frontend-form-post.php:52
    34583458msgid "Your edit access for this post has been locked by an administrator."
    34593459msgstr ""
    34603460
    3461 #: class/frontend-form-post.php:190 includes/class-frontend-form-post.php:58
     3461#: class/frontend-form-post.php:190 includes/class-frontend-form-post.php:56
    34623462msgid "Your allocated time for editing this post has been expired."
    34633463msgstr ""
    34643464
    3465 #: class/frontend-form-post.php:197 includes/class-frontend-form-post.php:65
     3465#: class/frontend-form-post.php:197 includes/class-frontend-form-post.php:63
    34663466msgid "Your post edit access has been locked by an administrator."
    34673467msgstr ""
    34683468
    3469 #: class/frontend-form-post.php:202 includes/class-frontend-form-post.php:70
     3469#: class/frontend-form-post.php:202 includes/class-frontend-form-post.php:68
    34703470msgid "Post Editing is disabled"
    34713471msgstr ""
    34723472
    3473 #: class/frontend-form-post.php:213 includes/class-frontend-form-post.php:81
     3473#: class/frontend-form-post.php:213 includes/class-frontend-form-post.php:79
    34743474msgid "You are not allowed to edit"
    34753475msgstr ""
    34763476
    3477 #: class/frontend-form-post.php:225 includes/class-frontend-form-post.php:92
     3477#: class/frontend-form-post.php:225 includes/class-frontend-form-post.php:90
    34783478msgid "I don't know how to edit this post, I don't have the form ID"
    34793479msgstr ""
    34803480
    3481 #: class/frontend-form-post.php:231 includes/class-frontend-form-post.php:104
     3481#: class/frontend-form-post.php:231 includes/class-frontend-form-post.php:102
    34823482msgid "You can't edit a post while in pending mode."
    34833483msgstr ""
     
    34883488msgstr ""
    34893489
    3490 #: class/frontend-form-post.php:335 includes/class-frontend-form-post.php:467
     3490#: class/frontend-form-post.php:335 includes/class-frontend-form-post.php:465
    34913491msgid "Invalid email address."
    34923492msgstr ""
    34933493
    3494 #: class/frontend-form-post.php:344 includes/class-frontend-form-post.php:477
     3494#: class/frontend-form-post.php:344 includes/class-frontend-form-post.php:475
    34953495msgid ""
    34963496"You already have an account in our site. Please login to continue.\n"
     
    35013501msgstr ""
    35023502
    3503 #: class/frontend-form-post.php:393 includes/class-frontend-form-post.php:533
     3503#: class/frontend-form-post.php:393 includes/class-frontend-form-post.php:531
    35043504msgid "You do not have sufficient permissions to access this form."
    35053505msgstr ""
    35063506
    35073507#: class/frontend-form-post.php:732 class/frontend-form-post.php:739
    3508 #: includes/class-frontend-form-post.php:889
    3509 #: includes/class-frontend-form-post.php:895
     3508#: includes/class-frontend-form-post.php:893
     3509#: includes/class-frontend-form-post.php:899
    35103510msgid ""
    35113511"Thank you for posting on our site. We have sent you an confirmation email. "
     
    35133513msgstr ""
    35143514
    3515 #: class/frontend-form-post.php:792 includes/class-frontend-form-post.php:451
     3515#: class/frontend-form-post.php:792 includes/class-frontend-form-post.php:449
    35163516msgid "Something went wrong"
    35173517msgstr ""
    35183518
    3519 #: class/frontend-form-post.php:1170 includes/class-frontend-form-post.php:783
     3519#: class/frontend-form-post.php:1170 includes/class-frontend-form-post.php:787
    35203520msgid "Email successfully verified. Please Login."
    35213521msgstr ""
     
    36283628#: includes/fields/class-field-dropdown.php:102
    36293629#: includes/fields/class-field-multidropdown.php:94
    3630 #: includes/fields/class-field-post-taxonomy.php:317
     3630#: includes/fields/class-field-post-taxonomy.php:315
    36313631msgid "- select -"
    36323632msgstr ""
     
    37253725msgstr ""
    37263726
    3727 #: class/render-form.php:1485 includes/fields/class-field-post-taxonomy.php:72
     3727#: class/render-form.php:1485 includes/fields/class-field-post-taxonomy.php:71
    37283728msgid "This field is no longer available."
    37293729msgstr ""
     
    47104710
    47114711#: includes/fields/class-abstract-fields.php:423
    4712 #: includes/fields/class-field-checkbox.php:78
     4712#: includes/fields/class-field-checkbox.php:85
    47134713#: includes/fields/class-field-radio.php:83
    47144714msgid "Show in inline list"
     
    47164716
    47174717#: includes/fields/class-abstract-fields.php:433
    4718 #: includes/fields/class-field-checkbox.php:88
     4718#: includes/fields/class-field-checkbox.php:95
    47194719#: includes/fields/class-field-radio.php:93
    47204720msgid "Show this option in an inline list"
     
    47424742
    47434743#: includes/fields/class-field-featured-image.php:101
    4744 #: includes/fields/class-field-image.php:120
     4744#: includes/fields/class-field-image.php:123
    47454745msgid "Button Label"
    47464746msgstr ""
    47474747
    47484748#: includes/fields/class-field-featured-image.php:106
    4749 #: includes/fields/class-field-image.php:125
     4749#: includes/fields/class-field-image.php:128
    47504750msgid "Enter a label for the Select button"
    47514751msgstr ""
     
    61616161msgstr ""
    61626162
    6163 #: wpuf.php:875
     6163#: wpuf.php:871
    61646164msgid "Error: Nonce verification failed"
    61656165msgstr ""
  • wp-user-frontend/trunk/readme.txt

    r2022708 r2041471  
    44Tags: Forms, registration, profile-builder, login, membership
    55Requires at least: 4.0
    6 Tested up to: 5.0.3
     6Tested up to: 5.1
    77Requires PHP: 5.4
    8 Stable tag: 3.1.0
     8Stable tag: 3.1.1
    99License: GPLv2
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    253253
    254254== Changelog ==
     255
     256= v3.1.1 (28 February, 2019) =
     257
     258* **Fix:** Help text in the Category field were not displaying on the frontend.
     259* **Fix:** Category was not editable when editing the post from the frontend.
     260* **Fix:** Display the admin bar when user role exist.
     261* **Fix:** When the admin edits a post from the backend, it was creating duplicate post.
     262* **Fix:** After enabling post expiration in post form do not save post_expiration meta.
     263* **Fix:** Checkboxes were not linking/syncing with ACF field.
     264* **Fix:** Publish time input option in the Date/Time field, was not working.
    255265
    256266= v3.1.0 (31 January, 2019) =
  • wp-user-frontend/trunk/wpuf.php

    r2022708 r2041471  
    55Description: Create, edit, delete, manages your post, pages or custom post types from frontend. Create registration forms, frontend profile and more...
    66Author: Tareq Hasan
    7 Version: 3.1.0
     7Version: 3.1.1
    88Author URI: https://tareq.co
    99License: GPL2 or later
     
    1313*/
    1414
    15 define( 'WPUF_VERSION', '3.1.0' );
     15define( 'WPUF_VERSION', '3.1.1' );
    1616define( 'WPUF_FILE', __FILE__ );
    1717define( 'WPUF_ROOT', dirname( __FILE__ ) );
     
    775775        $current_user = wp_get_current_user();
    776776
    777         if ( get_user_meta( $current_user->ID, 'show_admin_bar_front', true ) == "true" ) {
    778             return true;
    779         }
    780 
    781777        if ( !in_array( $current_user->roles[0], $roles ) ) {
    782778            return false;
Note: See TracChangeset for help on using the changeset viewer.