WordPress.org

Plugin Directory

Changeset 613878


Ignore:
Timestamp:
10/18/12 00:29:16 (18 months ago)
Author:
sc0ttkclark
Message:

Pods 2.0.4.1

Location:
pods/trunk
Files:
26 edited

Legend:

Unmodified
Added
Removed
  • pods/trunk/classes/PodsAPI.php

    r612995 r613878  
    53905390            if ( in_array( $pod[ 'type' ], array( 'post_type', 'taxonomy' ) ) ) 
    53915391                pods_transient_clear( 'pods_wp_cpt_ct' ); 
     5392 
     5393            global $wp_rewrite; 
     5394 
     5395            $wp_rewrite->flush_rules(); 
    53925396        } 
    53935397 
    53945398        $wpdb->query( "DELETE FROM `{$wpdb->options}` WHERE `option_name` LIKE '_transient_pods%'" ); 
    53955399        $wpdb->query( "DELETE FROM `{$wpdb->options}` WHERE `option_name` LIKE '_transient_timeout_pods%'" ); 
    5396  
    5397         if ( null !== $pod && is_array( $pod ) && in_array( $pod[ 'type' ], array( 'taxonomy', 'post_type' ) ) ) { 
    5398             global $wp_rewrite; 
    5399             $wp_rewrite->flush_rules(); 
    5400         } 
    54015400 
    54025401        pods_cache_clear( true ); 
  • pods/trunk/classes/PodsInit.php

    r612995 r613878  
    612612        // Activate and Install 
    613613        // @todo: VIP constant check, display notice with a link for user to run install instead of auto install 
    614         register_activation_hook( __FILE__, array( $this, 'activate' ) ); 
     614        register_activation_hook( PODS_DIR . 'init.php', array( $this, 'activate' ) ); 
     615        register_deactivation_hook( PODS_DIR . 'init.php', array( $this, 'deactivate' ) ); 
    615616 
    616617        add_action( 'wpmu_new_blog', array( $this, 'new_blog' ), 10, 6 ); 
     
    623624     * 
    624625     */ 
    625     public function activate () { 
     626    public function activate() { 
    626627        global $wpdb; 
    627628        if ( function_exists( 'is_multisite' ) && is_multisite() && isset( $_GET[ 'networkwide' ] ) && 1 == $_GET[ 'networkwide' ] ) { 
     
    634635        else 
    635636            $this->setup(); 
     637    } 
     638 
     639    /** 
     640     * 
     641     */ 
     642    public function deactivate () { 
     643        pods_api()->cache_flush_pods(); 
     644 
     645        global $wp_rewrite; 
     646 
     647        $wp_rewrite->flush_rules(); 
    636648    } 
    637649 
     
    715727 
    716728        pods_api()->cache_flush_pods(); 
     729 
     730        global $wp_rewrite; 
     731 
     732        $wp_rewrite->flush_rules(); 
    717733 
    718734        // Restore DB table prefix (if switched) 
  • pods/trunk/classes/PodsMeta.php

    r612995 r613878  
    971971            <p class="comment-form-author comment-form-pods-meta-<?php echo $field[ 'name' ]; ?>  pods-field"> 
    972972                <?php 
    973                 echo PodsForm::label( 'pods_meta_' . $field[ 'name' ], $field[ 'label' ], $field[ 'help' ] ); 
    974                 echo PodsForm::field( 'pods_meta_' . $field[ 'name' ], $value, $field[ 'type' ], $field, $pod, $id ); 
    975                 echo PodsForm::comment( 'pods_meta_' . $field[ 'name' ], $field[ 'description' ], $field ); 
     973                    echo PodsForm::label( 'pods_meta_' . $field[ 'name' ], $field[ 'label' ], $field[ 'help' ] ); 
     974                    echo PodsForm::field( 'pods_meta_' . $field[ 'name' ], $value, $field[ 'type' ], $field, $pod, $id ); 
     975                    echo PodsForm::comment( 'pods_meta_' . $field[ 'name' ], $field[ 'description' ], $field ); 
    976976                ?> 
    977977            </p> 
     
    10211021            <p class="comment-form-author comment-form-pods-meta-<?php echo $field[ 'name' ]; ?> pods-field"> 
    10221022                <?php 
    1023                 echo PodsForm::label( 'pods_meta_' . $field[ 'name' ], $field[ 'label' ], $field[ 'help' ] ); 
    1024                 echo PodsForm::field( 'pods_meta_' . $field[ 'name' ], $value, $field[ 'type' ], $field, $pod, $id ); 
    1025                 echo PodsForm::comment( 'pods_meta_' . $field[ 'name' ], $field[ 'description' ], $field ); 
     1023                    echo PodsForm::label( 'pods_meta_' . $field[ 'name' ], $field[ 'label' ], $field[ 'help' ] ); 
     1024                    echo PodsForm::field( 'pods_meta_' . $field[ 'name' ], $value, $field[ 'type' ], $field, $pod, $id ); 
     1025                    echo PodsForm::comment( 'pods_meta_' . $field[ 'name' ], $field[ 'description' ], $field ); 
    10261026                ?> 
    10271027            </p> 
  • pods/trunk/classes/PodsUI.php

    r612995 r613878  
    764764 
    765765        $options->validate( 'label', array( 
    766             'add' => __( 'Add New', 'pods' ) . " {$this->item}", 
    767             'edit' => __( 'Edit', 'pods' ) . " {$this->item}", 
    768             'duplicate' => __( 'Duplicate', 'pods' ) . " {$this->item}", 
    769             'delete' => __( 'Delete this', 'pods' ) . " {$this->item}", 
    770             'view' => __( 'View', 'pods' ) . " {$this->item}", 
    771             'reorder' => __( 'Reorder', 'pods' ) . " {$this->items}" 
     766            'add' => __( 'Save New', 'pods' ) . " {$options->item}", 
     767            'edit' => __( 'Save', 'pods' ) . " {$options->item}", 
     768            'duplicate' => __( 'Save New', 'pods' ) . " {$options->item}", 
     769            'delete' => __( 'Delete this', 'pods' ) . " {$options->item}", 
     770            'view' => __( 'View', 'pods' ) . " {$options->item}", 
     771            'reorder' => __( 'Reorder', 'pods' ) . " {$options->items}" 
    772772        ), 'array_merge' ); 
    773773 
     
    12091209        if ( in_array( 'duplicate', $this->actions_disabled ) ) 
    12101210            $duplicate = false; 
     1211 
    12111212        if ( empty( $this->row ) ) 
    12121213            $this->get_row(); 
     1214 
    12131215        $this->do_hook( 'edit', $duplicate ); 
    12141216        if ( isset( $this->actions_custom[ 'edit' ] ) && is_callable( $this->actions_custom[ 'edit' ] ) ) 
     
    12191221        <h2> 
    12201222            <?php 
    1221             echo ( true === $duplicate ) ? $this->heading[ 'duplicate' ] : $this->heading[ 'edit' ] . ' ' . $this->item; 
     1223            echo ( $duplicate ? $this->heading[ 'duplicate' ] : $this->heading[ 'edit' ] ) . ' ' . $this->item; 
    12221224 
    12231225            if ( !in_array( 'add', $this->actions_disabled ) ) { 
     
    13091311        $singular_label = $this->item; 
    13101312        $plural_label = $this->items; 
    1311         $label = sprintf( __( 'Save %s', 'pods' ), $this->item ); 
    13121313 
    13131314        pods_view( PODS_DIR . 'ui/admin/form.php', compact( array_keys( get_defined_vars() ) ) ); 
     
    24902491        if ( false === $options || !is_array( $options ) || empty( $options ) ) 
    24912492            $options = array( 10, 25, 50, 100, 200 ); 
    2492         if ( !in_array( $this->limit, $options ) ) 
     2493        if ( !in_array( $this->limit, $options ) && -1 != $this->limit ) 
    24932494            $this->limit = $options[ 1 ]; 
    24942495        foreach ( $options as $option ) { 
  • pods/trunk/classes/fields/date.php

    r602158 r613878  
    6969                ) 
    7070            ), 
     71            'date_allow_empty' => array( 
     72                'label' => __( 'Allow empty value?', 'pods' ), 
     73                'default' => 1, 
     74                'type' => 'boolean' 
     75            ), 
    7176            'date_html5' => array( 
    7277                'label' => __( 'Enable HTML5 Input Field?', 'pods' ), 
     
    107112        $format = $this->format( $options ); 
    108113 
    109         if ( !empty( $value ) && '0000-00-00' != $value ) { 
     114        if ( !empty( $value ) && !in_array( $value, array( '0000-00-00', '0000-00-00 00:00:00', '00:00:00' ) ) ) { 
    110115            $date = $this->createFromFormat( 'Y-m-d', (string) $value ); 
    111116            $date_local = $this->createFromFormat( $format, (string) $value ); 
     
    118123                $value = date_i18n( $format, strtotime( (string) $value ) ); 
    119124        } 
    120         else 
     125        elseif ( 0 == pods_var( 'date_allow_empty', $options, 1 ) ) 
    121126            $value = date_i18n( $format ); 
    122127 
     
    164169        $format = $this->format( $options ); 
    165170 
    166         $value = $this->convert_date( $value, 'Y-m-d', $format ); 
     171        if ( !empty( $value ) && ( 0 == pods_var( 'date_allow_empty', $options, 1 ) || !in_array( $value, array( '0000-00-00', '0000-00-00 00:00:00', '00:00:00' ) ) ) ) 
     172            $value = $this->convert_date( $value, 'Y-m-d', $format ); 
     173        elseif ( 1 == pods_var( 'date_allow_empty', $options, 1 ) ) 
     174            $value = '0000-00-00'; 
     175        else 
     176            $value = date_i18n( 'Y-m-d' ); 
    167177 
    168178        return $value; 
     
    233243     */ 
    234244    public function convert_date ( $value, $new_format, $original_format = 'Y-m-d' ) { 
    235         if ( !empty( $value ) && '0000-00-00' != $value ) { 
     245        if ( !empty( $value ) && !in_array( $value, array( '0000-00-00', '0000-00-00 00:00:00', '00:00:00' ) ) ) { 
    236246            $date = $this->createFromFormat( $original_format, (string) $value ); 
    237247 
  • pods/trunk/classes/fields/datetime.php

    r602158 r613878  
    9595                ) 
    9696            ), 
     97            'datetime_allow_empty' => array( 
     98                'label' => __( 'Allow empty value?', 'pods' ), 
     99                'default' => 1, 
     100                'type' => 'boolean' 
     101            ), 
    97102            'datetime_html5' => array( 
    98103                'label' => __( 'Enable HTML5 Input Field?', 'pods' ), 
     
    133138        $format = $this->format( $options ); 
    134139 
    135         if ( !empty( $value ) && !in_array( $value, array( '0000-00-00 00:00:00', '0000-00-00', '00:00:00' ) ) ) { 
     140        if ( !empty( $value ) && !in_array( $value, array( '0000-00-00', '0000-00-00 00:00:00', '00:00:00' ) ) ) { 
    136141            $date = $this->createFromFormat( 'Y-m-d H:i:s', (string) $value ); 
    137142            $date_local = $this->createFromFormat( $format, (string) $value ); 
     
    144149                $value = date_i18n( $format, strtotime( (string) $value ) ); 
    145150        } 
    146         else 
     151        elseif ( 0 == pods_var( 'datetime_allow_empty', $options, 1 ) ) 
    147152            $value = date_i18n( $format ); 
    148153 
     
    190195        $format = $this->format( $options ); 
    191196 
    192         $value = $this->convert_date( $value, 'Y-m-d H:i:s', $format ); 
     197        if ( !empty( $value ) && ( 0 == pods_var( 'datetime_allow_empty', $options, 1 ) || !in_array( $value, array( '0000-00-00', '0000-00-00 00:00:00', '00:00:00' ) ) ) ) 
     198            $value = $this->convert_date( $value, 'Y-m-d H:i:s', $format ); 
     199        elseif ( 1 == pods_var( 'datetime_allow_empty', $options, 1 ) ) 
     200            $value = '0000-00-00 00:00:00'; 
     201        else 
     202            $value = date_i18n( 'Y-m-d H:i:s' ); 
    193203 
    194204        return $value; 
     
    277287     */ 
    278288    public function convert_date ( $value, $new_format, $original_format = 'Y-m-d H:i:s' ) { 
    279         if ( !empty( $value ) && '0000-00-00 00:00:00' != $value ) { 
     289        if ( !empty( $value ) && !in_array( $value, array( '0000-00-00', '0000-00-00 00:00:00', '00:00:00' ) ) ) { 
    280290            $date = $this->createFromFormat( $original_format, (string) $value ); 
    281291 
  • pods/trunk/classes/fields/pick.php

    r612995 r613878  
    423423 
    424424            if ( !is_array( $value ) && !empty( $value ) ) 
    425                 $simple = @json_decode( $value ); 
     425                $simple = @json_decode( $value, true ); 
     426 
    426427 
    427428            if ( is_array( $simple ) ) 
  • pods/trunk/classes/fields/time.php

    r602158 r613878  
    8080                ) 
    8181            ), 
     82            'time_allow_empty' => array( 
     83                'label' => __( 'Allow empty value?', 'pods' ), 
     84                'default' => 1, 
     85                'type' => 'boolean' 
     86            ), 
    8287            'time_html5' => array( 
    8388                'label' => __( 'Enable HTML5 Input Field?', 'pods' ), 
     
    119124        $format = $this->format( $options ); 
    120125 
    121         if ( !empty( $value ) && '00:00:00' != $value ) { 
     126        if ( !empty( $value ) && !in_array( $value, array( '0000-00-00', '0000-00-00 00:00:00', '00:00:00' ) ) ) { 
    122127            $date = $this->createFromFormat( 'H:i:s', (string) $value ); 
    123128            $date_local = $this->createFromFormat( $format, (string) $value ); 
     
    130135                $value = date_i18n( $format, strtotime( (string) $value ) ); 
    131136        } 
    132         else 
     137        elseif ( 0 == pods_var( 'time_allow_empty', $options, 1 ) ) 
    133138            $value = date_i18n( $format ); 
    134139 
     
    176181        $format = $this->format( $options ); 
    177182 
    178         $value = $this->convert_date( $value, 'H:i:s', $format ); 
     183        if ( !empty( $value ) && ( 0 == pods_var( 'time_allow_empty', $options, 1 ) || !in_array( $value, array( '0000-00-00', '0000-00-00 00:00:00', '00:00:00' ) ) ) ) 
     184            $value = $this->convert_date( $value, 'H:i:s', $format ); 
     185        elseif ( 1 == pods_var( 'time_allow_empty', $options, 1 ) ) 
     186            $value = '00:00:00'; 
     187        else 
     188            $value = date_i18n( 'H:i:s' ); 
    179189 
    180190        return $value; 
     
    248258     */ 
    249259    public function convert_date ( $value, $new_format, $original_format = 'H:i:s' ) { 
    250         if ( !empty( $value ) && '00:00:00' != $value ) { 
     260        if ( !empty( $value ) && !in_array( $value, array( '0000-00-00', '0000-00-00 00:00:00', '00:00:00' ) ) ) { 
    251261            $date = $this->createFromFormat( $original_format, (string) $value ); 
    252262 
  • pods/trunk/classes/widgets/PodsWidgetSingle.php

    r612995 r613878  
    2828        $args = array( 
    2929            'name' => trim( pods_var_raw( 'pod_type', $instance, '' ) ), 
    30             'template' => trim( pods_var_raw( 'template', $instance, '' ) ), 
    31             'slug' => trim( pods_var_raw( 'slug', $instance, '' ) ) 
     30            'slug' => trim( pods_var_raw( 'slug', $instance, '' ) ), 
     31            'template' => trim( pods_var_raw( 'template', $instance, '' ) ) 
    3232        ); 
    3333 
     
    4949        $instance[ 'title' ] = pods_var( 'title', $new_instance, '' ); 
    5050        $instance[ 'pod_type' ] = pods_var( 'pod_type', $new_instance, '' ); 
     51        $instance[ 'slug' ] = pods_var( 'slug', $new_instance, '' ); 
    5152        $instance[ 'template' ] = pods_var( 'template', $new_instance, '' ); 
    5253        $instance[ 'template_custom' ] = pods_var( 'template_custom', $new_instance, '' ); 
    53         $instance[ 'slug' ] = pods_var( 'slug', $new_instance, '' ); 
    5454 
    5555        return $instance; 
     
    6161    public function form ( $instance ) { 
    6262        $title = pods_var_raw( 'title', $instance, '' ); 
     63        $slug = pods_var_raw( 'slug', $instance, '' ); 
    6364        $pod_type = pods_var_raw( 'pod_type', $instance, '' ); 
    6465        $template = pods_var_raw( 'template', $instance, '' ); 
    6566        $template_custom = pods_var_raw( 'template_custom', $instance, '' ); 
    66         $slug = pods_var_raw( 'slug', $instance, '' ); 
    6767 
    6868        require PODS_DIR . 'ui/admin/widgets/single.php'; 
  • pods/trunk/components/Helpers.php

    r608119 r613878  
    7171            add_filter( 'update_post_metadata', array( $this, 'save_meta' ), 10, 4 ); 
    7272 
    73             add_action( 'pods_meta_save_pre__pods_helper', array( $this, 'fix_filters' ), 10, 5 ); 
     73            add_action( 'pods_meta_save_pre_post__pods_helper', array( $this, 'fix_filters' ), 10, 5 ); 
    7474            add_action( 'pods_meta_save_post__pods_helper', array( $this, 'clear_cache' ), 10, 5 ); 
    7575            add_action( 'delete_post', array( $this, 'clear_cache' ), 10, 1 ); 
  • pods/trunk/components/Migrate-CPTUI/Migrate-CPTUI.php

    r602158 r613878  
    6464        if ( isset( $params->post_type ) && !empty( $params->post_type ) ) { 
    6565            foreach ( $params->post_type as $post_type => $checked ) { 
    66                 $migrate_post_types[] = $post_type; 
     66                if ( true === (boolean) $checked ) 
     67                    $migrate_post_types[] = $post_type; 
    6768            } 
    6869        } 
     
    7273        if ( isset( $params->taxonomy ) && !empty( $params->taxonomy ) ) { 
    7374            foreach ( $params->taxonomy as $taxonomy => $checked ) { 
    74                 $migrate_taxonomies[] = $taxonomy; 
     75                if ( true === (boolean) $checked ) 
     76                    $migrate_taxonomies[] = $taxonomy; 
    7577            } 
    7678        } 
  • pods/trunk/components/Pages.php

    r612995 r613878  
    7676            add_filter( 'update_post_metadata', array( $this, 'save_meta' ), 10, 4 ); 
    7777 
    78             add_action( 'pods_meta_save_pre__pods_page', array( $this, 'fix_filters' ), 10, 5 ); 
     78            add_action( 'pods_meta_save_pre_post__pods_page', array( $this, 'fix_filters' ), 10, 5 ); 
    7979            add_action( 'pods_meta_save_post__pods_page', array( $this, 'clear_cache' ), 10, 5 ); 
    8080            add_action( 'delete_post', array( $this, 'clear_cache' ), 10, 1 ); 
  • pods/trunk/components/Roles/Roles.php

    r612995 r613878  
    243243 
    244244        foreach ( $params->capabilities as $capability => $x ) { 
    245             if ( true !== (boolean) $x ) 
     245            if ( empty( $capability ) || true !== (boolean) $x ) 
    246246                continue; 
    247247 
     
    250250 
    251251        foreach ( $params->custom_capabilities as $x => $capability ) { 
    252             if ( '--1' == $x ) 
     252            if ( empty( $capability ) || '--1' == $x ) 
    253253                continue; 
    254254 
     
    297297 
    298298        foreach ( $params->capabilities as $capability => $x ) { 
    299             if ( true !== (boolean) $x ) 
     299            if ( empty( $capability ) || true !== (boolean) $x ) 
    300300                continue; 
    301301 
     
    307307 
    308308        foreach ( $params->custom_capabilities as $x => $capability ) { 
    309             if ( '--1' == $x ) 
    310                 continue; 
    311  
    312             if ( !in_array( $capability, $new_capabilities ) ) 
     309            if ( empty( $capability ) ) 
     310                continue; 
     311 
     312            if ( in_array( $capability, $new_capabilities ) ) 
    313313                continue; 
    314314 
  • pods/trunk/components/Roles/ui/edit.php

    r612995 r613878  
    183183 
    184184            var new_id = $( 'ul#custom-capabilities li' ).length; 
    185             var html = $( 'ul#custom-capabilities li.pods-repeater' ).html().replace( '--1', new_id ); 
     185            var html = $( 'ul#custom-capabilities li.pods-repeater' ).html().replace( /\-\-1/g, new_id ); 
    186186 
    187187            $( 'ul#custom-capabilities' ).append( '<li id="capability-' + new_id + '">' + html + '</li>' ); 
  • pods/trunk/components/Templates.php

    r612995 r613878  
    8080            add_filter( 'update_post_metadata', array( $this, 'save_meta' ), 10, 4 ); 
    8181 
    82             add_action( 'pods_meta_save_pre__pods_template', array( $this, 'fix_filters' ), 10, 5 ); 
     82            add_action( 'pods_meta_save_pre_post__pods_template', array( $this, 'fix_filters' ), 10, 5 ); 
    8383            add_action( 'pods_meta_save_post__pods_template', array( $this, 'clear_cache' ), 10, 5 ); 
    8484            add_action( 'delete_post', array( $this, 'clear_cache' ), 10, 1 ); 
  • pods/trunk/functions.php

    r612995 r613878  
    141141 
    142142    // die with error 
    143     if ( !defined( 'DOING_AJAX' ) && !headers_sent() && is_admin() ) 
     143    if ( !defined( 'DOING_AJAX' ) && !headers_sent() && ( is_admin() || false !== strpos( $_SERVER[ 'REQUEST_URI' ], 'wp-comments-post.php' ) ) ) 
    144144        wp_die( $error ); 
    145145    else 
  • pods/trunk/init.php

    r612995 r613878  
    44Plugin URI: http://podsframework.org/ 
    55Description: Pods is a framework for creating, managing, and deploying customized content types and fields 
    6 Version: 2.0.4 
     6Version: 2.0.4.1 
    77Author: Pods Framework Team 
    88Author URI: http://podsframework.org/about/ 
     
    3333// Prevent conflicts with Pods 1.x 
    3434if ( !defined( 'PODS_VERSION' ) && !defined( 'PODS_DIR' ) && !function_exists( 'pods_ui_manage' ) ) { 
    35     define( 'PODS_VERSION', '2.0.4' ); 
     35    define( 'PODS_VERSION', '2.0.4.1' ); 
    3636 
    3737    if ( !defined( 'PODS_GITHUB_UPDATE' ) ) 
  • pods/trunk/readme.txt

    r612995 r613878  
    55Requires at least: 3.4 
    66Tested up to: 3.5 
    7 Stable tag: 2.0.4 
     7Stable tag: 2.0.4.1 
    88License: GPLv2 or later 
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html 
     
    100100== Changelog == 
    101101 
     102= 2.0.4.1 - October 17th, 2012 = 
     103* Updated: Pods UI duplicate method labels were confusing 
     104* Fixed: Simple Relationships were returning raw data for table-based Pods 
     105* Fixed: Specify specific content types to import in Migrate Custom Post Types UI component 
     106* Fixed: Add Custom Capabilities bug with first text box wouldn't save in Roles component 
     107* Fixed: Various Widget fixes to Widget UI 
     108* Fixed: XHTML balance tags option in Writing settings was adding a space in <?php tags for Pod Pages / Helpers / Templates 
     109* Fixed: Date / Time field now allows an empty value to be saved rather than setting the current date / time, this is an option that can be turned off 
     110* Fixed: WP Rewrites are properly flushed upon adding / editing / deleting Pods 
     111* Found a bug? Have a great feature idea? Get on GitHub and tell us about it and we'll get right on it: https://github.com/pods-framework/pods/issues/new 
     112* Our GitHub also has a full list of issues closed for this release and all previous 2.x releases, you can even browse our code and contribute notes and patches all from the web 
     113 
    102114= 2.0.4 - October 15th, 2012 = 
    103115* Big bug fix release, we've fixed tons of bugs and improved backwards compatibility even further - stability, stability, stability! 
    104 * Found a bug? Have a great feature idea? Get on GitHub and tell us about it and we'll get right on it: https://github.com/pods-framework/pods/issues/new 
    105 * Our GitHub also has a full list of issues closed for this release and all previous 2.x releases, you can even browse our code and contribute notes and patches all from the web 
    106116 
    107117= 2.0.3.1 - October 5th, 2012 = 
  • pods/trunk/ui/admin/setup-edit-field-fluid.php

    r608119 r613878  
    101101                        <div id="pods-additional-field-options-<?php echo $pods_i; ?>" class="pods-tab pods-additional-field-options"> 
    102102                            <?php 
    103                             foreach ( $field_settings[ 'field_types' ] as $field_type => $field_label ) { 
    104                                 ?> 
     103                                foreach ( $field_settings[ 'field_types' ] as $field_type => $field_label ) { 
     104                            ?> 
    105105                                <div class="pods-depends-on pods-depends-on-field-data-type pods-depends-on-field-data-type-<?php echo PodsForm::clean( $field_type, true ); ?>"> 
    106106                                    <?php 
     
    110110                                    ?> 
    111111                                </div> 
    112                                 <?php 
    113                             } 
     112                            <?php 
     113                                } 
    114114                            ?> 
    115115                        </div> 
    116116 
    117117                        <div id="pods-advanced-options-<?php echo $pods_i; ?>" class="pods-tab pods-advanced-options"> 
    118  
    119118                            <?php 
    120119                                foreach ( $field_settings[ 'advanced_fields' ] as $group => $fields ) { 
     
    127126                                } 
    128127                            ?> 
     128 
     129                            <?php if ( defined( 'PODS_DEVELOPER' ) && PODS_DEVELOPER ) { ?> 
     130                                <h4><?php _e( 'Conditional Logic', 'pods' ); ?></h4> 
     131                            <?php } ?> 
    129132                        </div> 
    130133                    </div> 
  • pods/trunk/ui/admin/widgets/field.php

    r612995 r613878  
    1313<ol class="pods_field_widget_form"> 
    1414    <li> 
    15         <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title', 'pods' ); ?></label> 
     15        <label for="<?php echo $this->get_field_id( 'title' ); ?>"> <?php _e( 'Title', 'pods' ); ?></label> 
    1616 
    17         <input class="widefat" type="text" name="<?php echo $this->get_field_name( 'title' ); ?>" value="<?php echo esc_attr( $title ); ?>" /> 
     17        <input type="text" class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" value="<?php echo esc_attr( $title ); ?>" /> 
    1818    </li> 
    1919 
  • pods/trunk/ui/admin/widgets/form.php

    r612995 r613878  
    1313<ol class="pods_form_widget_form"> 
    1414    <li> 
    15         <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title', 'pods' ); ?></label> 
     15        <label for="<?php echo $this->get_field_id( 'title' ); ?>"> <?php _e( 'Title', 'pods' ); ?></label> 
    1616 
    17         <input class="widefat" type="text" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" value="<?php echo esc_html( $title ); ?>"> 
     17        <input type="text" class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" value="<?php echo esc_attr( $title ); ?>" /> 
    1818    </li> 
     19 
    1920    <li> 
    2021        <?php 
  • pods/trunk/ui/admin/widgets/list.php

    r612995 r613878  
    1313<ol class="pods_list_widget_form"> 
    1414    <li> 
    15         <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title', 'pods' ); ?></label> 
     15        <label for="<?php echo $this->get_field_id( 'title' ); ?>"> <?php _e( 'Title', 'pods' ); ?></label> 
    1616 
    17         <input class="widefat" type="text" name="<?php echo $this->get_field_name( 'title' ); ?>" value="<?php echo esc_attr( $title ); ?>" /> 
     17        <input type="text" class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" value="<?php echo esc_attr( $title ); ?>" /> 
    1818    </li> 
    1919 
  • pods/trunk/ui/admin/widgets/single.php

    r612995 r613878  
    4040    </li> 
    4141 
     42    <li> 
     43        <label for="<?php echo $this->get_field_id( 'slug' ); ?>"> 
     44            <?php _e( 'Slug or ID', 'pods' ); ?> 
     45        </label> 
     46 
     47        <input class="widefat" type="text" id="<?php echo $this->get_field_id( 'slug' ); ?>" name="<?php echo $this->get_field_name( 'slug' ); ?>" value="<?php echo esc_attr( $slug ); ?>" /> 
     48    </li> 
     49 
    4250    <?php if ( class_exists( 'Pods_Templates' ) ) { ?> 
    4351        <li> 
  • pods/trunk/ui/fields/date.php

    r605009 r613878  
    3838$date_default = PodsForm::field_method( 'date', 'createFromFormat', 'Y-m-d', (string) $value ); 
    3939 
    40 if ( 'text' != $type ) { 
     40if ( 'text' != $type && ( 0 == pods_var( 'date_allow_empty', $options, 1 ) || !in_array( $value, array( '0000-00-00', '0000-00-00 00:00:00', '00:00:00' ) ) ) ) { 
    4141    $formatted_date = $value; 
    4242 
  • pods/trunk/ui/fields/datetime.php

    r605009 r613878  
    5959$date_default = PodsForm::field_method( 'datetime', 'createFromFormat', 'Y-m-d H:i:s', (string) $value ); 
    6060 
    61 if ( 'text' != $type ) { 
     61if ( 'text' != $type && ( 0 == pods_var( 'datetime_allow_empty', $options, 1 ) || !in_array( $value, array( '0000-00-00', '0000-00-00 00:00:00', '00:00:00' ) ) ) ) { 
    6262    $formatted_date = $value; 
    6363 
  • pods/trunk/ui/fields/time.php

    r605009 r613878  
    4949$date_default = PodsForm::field_method( 'time', 'createFromFormat', 'H:i:s', (string) $value ); 
    5050 
    51 if ( 'text' != $type ) { 
     51if ( 'text' != $type && ( 0 == pods_var( 'time_allow_empty', $options, 1 ) || !in_array( $value, array( '0000-00-00', '0000-00-00 00:00:00', '00:00:00' ) ) ) ) { 
    5252    $formatted_date = $value; 
    5353 
Note: See TracChangeset for help on using the changeset viewer.