Commit 164a082a authored by Kevin Stover's avatar Kevin Stover

Mt push origin develop m`erge branch 'paqu83-issue#2031' into develop

parents 71302762 1a71c82d
......@@ -79,7 +79,7 @@ class NF_Admin_CPT_Submission
'show_in_nav_menus' => true,
'can_export' => true,
'has_archive' => true,
'exclude_from_search' => false,
'exclude_from_search' => true,
'publicly_queryable' => true,
'capability_type' => 'nf_sub',
'capabilities' => array(
......
......@@ -387,6 +387,10 @@ return apply_filters( 'ninja_forms_field_settings', array(
'label' => __( 'DD-MM-YYYY', 'ninja-forms' ),
'value' => 'DD-MM-YYYY',
),
array(
'label' => __( 'DD.MM.YYYY', 'ninja-forms' ),
'value' => 'DD.MM.YYYY',
),
array(
'label' => __( 'MM/DD/YYYY', 'ninja-forms' ),
'value' => 'MM/DD/YYYY',
......@@ -395,6 +399,10 @@ return apply_filters( 'ninja_forms_field_settings', array(
'label' => __( 'MM-DD-YYYY', 'ninja-forms' ),
'value' => 'MM-DD-YYYY',
),
array(
'label' => __( 'MM.DD.YYYY', 'ninja-forms' ),
'value' => 'MM.DD.YYYY',
),
array(
'label' => __( 'YYYY-MM-DD', 'ninja-forms' ),
'value' => 'YYYY-MM-DD',
......@@ -403,6 +411,10 @@ return apply_filters( 'ninja_forms_field_settings', array(
'label' => __( 'YYYY/MM/DD', 'ninja-forms' ),
'value' => 'YYYY/MM/DD',
),
array(
'label' => __( 'YYYY.MM.DD', 'ninja-forms' ),
'value' => 'YYYY.MM.DD',
),
array(
'label' => __( 'Friday, November 18, 2019', 'ninja-forms' ),
'value' => 'dddd, MMMM D YYYY',
......
......@@ -144,6 +144,7 @@ final class NF_Display_Render
* TODO: Replace unique field key checks with a refactored model/factory.
*/
$field_key = $field[ 'settings' ][ 'key' ];
if( in_array( $field_key, $unique_field_keys ) || '' == $field_key ){
// Delete the field.
......
......@@ -40,11 +40,18 @@ class NF_Fields_Date extends NF_Fields_Textbox
$lookup = array(
'MM/DD/YYYY' => __( 'm/d/Y', 'ninja-forms' ),
'MM-DD-YYYY' => __( 'm-d-Y', 'ninja-forms' ),
'MM.DD.YYYY' => __( 'm.d.Y', 'ninja-forms' ),
'DD/MM/YYYY' => __( 'm/d/Y', 'ninja-forms' ),
'DD-MM-YYYY' => __( 'd-m-Y', 'ninja-forms' ),
'DD.MM.YYYY' => __( 'd.m.Y', 'ninja-forms' ),
'YYYY-MM-DD' => __( 'Y-m-d', 'ninja-forms' ),
'YYYY/MM/DD' => __( 'Y/m/d', 'ninja-forms' ),
'dddd, MMMM D YYYY' => __( 'l, F d Y', 'ninja-forms' )
'YYYY.MM.DD' => __( 'Y.m.d', 'ninja-forms' ),
'dddd, MMMM D YYYY' => __( 'l, F d Y', 'ninja-forms' ),
);
return ( isset( $lookup[ $format ] ) ) ? $lookup[ $format ] : $format;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment