Plugin Directory

Changeset 606792

Timestamp:
10/02/2012 01:52:43 AM (12 years ago)
Author:
logikal16
Message:

CFS 1.7.2

Location:
custom-field-suite/trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • custom-field-suite/trunk/cfs.php

    r604423 r606792  
    44Plugin URI: https://uproot.us/
    55Description: Dead simple custom field management.
    6 Version: 1.7.1
     6Version: 1.7.
    77Author: Matt Gibbs
    88Author URI: https://uproot.us/
     
    1111
    1212$cfs = new Cfs();
    13 $cfs->version = '1.7.1';
     13$cfs->version = '1.7.';
    1414
    1515class Cfs
     
    437437        elseif (wp_verify_nonce($_POST['cfs']['save'], 'cfs_save_input'))
    438438        {
     439
    439440            $field_data = isset($_POST['cfs']['input']) ? $_POST['cfs']['input'] : array();
    440441            $post_data = array('ID' => $_POST['ID']);
    441             $options = array('format' => 'input');
     442            $options = array('format' => 'input');
    442443            $this->save($field_data, $post_data, $options);
    443444        }
     
    850851    {
    851852        $field_data = $this->get(false, $master_id, array('format' => 'raw'));
    852         $this->save($field_data, array('ID' => $duplicate_id));
     853
     854        if (!empty($field_data))
     855        {
     856            $this->save($field_data, array('ID' => $duplicate_id));
     857        }
    853858    }
    854859}
  • custom-field-suite/trunk/core/actions/admin_footer.php

    r601829 r606792  
    5151    background: url(<?php echo $this->url; ?>/images/logo.png) no-repeat;
    5252}
    53 
    54 .btn {
    55   display: inline-block;
    56   *display: inline;
    57   padding: 4px 14px;
    58   margin-bottom: 0;
    59   *margin-left: .3em;
    60   font-size: 14px;
    61   line-height: 20px;
    62   *line-height: 20px;
    63   color: #333333;
    64   text-align: center;
    65   text-decoration: none;
    66   text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
    67   vertical-align: middle;
    68   cursor: pointer;
    69   background-color: #f5f5f5;
    70   *background-color: #e6e6e6;
    71   background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6));
    72   background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6);
    73   background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
    74   background-image: linear-gradient(to bottom, #ffffff, #e6e6e6);
    75   background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
    76   background-repeat: repeat-x;
    77   border: 1px solid #bbbbbb;
    78   *border: 0;
    79   border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
    80   border-color: #e6e6e6 #e6e6e6 #bfbfbf;
    81   border-bottom-color: #a2a2a2;
    82   -webkit-border-radius: 4px;
    83      -moz-border-radius: 4px;
    84           border-radius: 4px;
    85   filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0);
    86   filter: progid:dximagetransform.microsoft.gradient(enabled=false);
    87   *zoom: 1;
    88   -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
    89      -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
    90           box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
    91 }
    92 
    93 .btn:hover {
    94   color: #333333;
    95   text-decoration: none;
    96   background-color: #e6e6e6;
    97   *background-color: #d9d9d9;
    98   /* Buttons in IE7 don't get borders, so darken on hover */
    99 
    100   background-position: 0 -15px;
    101   -webkit-transition: background-position 0.1s linear;
    102      -moz-transition: background-position 0.1s linear;
    103        -o-transition: background-position 0.1s linear;
    104           transition: background-position 0.1s linear;
    105 }
    106 
    107 .btn {
    108   border-color: #c5c5c5;
    109   border-color: rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.25);
    110 }
    111 
    112 .btn-success {
    113   color: #ffffff;
    114   text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
    115   background-color: #5bb75b;
    116   *background-color: #51a351;
    117   background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351));
    118   background-image: -webkit-linear-gradient(top, #62c462, #51a351);
    119   background-image: -o-linear-gradient(top, #62c462, #51a351);
    120   background-image: linear-gradient(to bottom, #62c462, #51a351);
    121   background-image: -moz-linear-gradient(top, #62c462, #51a351);
    122   background-repeat: repeat-x;
    123   border-color: #51a351 #51a351 #387038;
    124   border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
    125   filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff51a351', GradientType=0);
    126   filter: progid:dximagetransform.microsoft.gradient(enabled=false);
    127 }
    128 
    129 .btn-success:hover,
    130 .btn-success:active {
    131   color: #ffffff;
    132   background-color: #51a351;
    133   *background-color: #499249;
    134 }
    13553</style>
    13654
     
    15876                <div class="field">
    15977                    <p>
    160                         <a class="btn btn-success" href="https://uproot.us/contributors/" target="_blank"><?php _e('Donate', 'cfs'); ?></a>
    161                         <a class="btn" href="http://wordpress.org/extend/plugins/custom-field-suite/" target="_blank"><?php _e('Rate the plugin', 'cfs'); ?></a>
     78                        <a class="b" href="https://uproot.us/contributors/" target="_blank"><?php _e('Donate', 'cfs'); ?></a>
     79                        <a class="bn" href="http://wordpress.org/extend/plugins/custom-field-suite/" target="_blank"><?php _e('Rate the plugin', 'cfs'); ?></a>
    16280                    </p>
    16381                </div>
  • custom-field-suite/trunk/core/admin/meta_box_input.php

    r597272 r606792  
    1 <input type="hidden" name="cfs[save]" value="<?php echo wp_create_nonce('cfs_save_input'); ?>" />
    2 
    31<?php
    42
     
    75
    86$input_fields = $this->api->get_input_fields($group_id);
     7
    98
     9
     10
     11
     12
    1013// Add any necessary head scripts
    1114foreach ($input_fields as $key => $field)
  • custom-field-suite/trunk/core/admin/page_tools.php

    r601824 r606792  
    1616.tab-content { display: none; }
    1717.tab-content.active { display: block; }
     18
    1819#icon-edit { background: url(<?php echo $this->url; ?>/images/logo.png) no-repeat; }
    1920</style>
     
    8687
    8788        <div class="tab-content export active">
     89
    8890            <table>
    8991                <tr>
    9092                    <td style="width:300px; vertical-align:top">
    91                         <div>Which field groups would you like to export?</div>
    9293                        <div>
    9394                            <select id="export-field-groups" style="width:300px; height:200px" multiple="multiple">
     
    103104                    <td style="width:300px; vertical-align:top">
    104105                        <div id="export-area" style="display:none">
    105                             <div>Export code:</div>
    106106                            <div>
    107107                                <textarea id="export-output" style="width:98%; height:200px"></textarea>
     
    116116
    117117        <div class="tab-content import">
     118
    118119            <table>
    119120                <tr>
    120121                    <td style="width:300px; vertical-align:top">
    121                         <div>Paste the code. Existing field groups will be skipped.</div>
    122122                        <div>
    123123                            <textarea id="import-code" style="width:98%; height:200px"></textarea>
     
    137137
    138138        <div class="tab-content sync">
     139
    139140            <table>
    140141                <tr>
    141142                    <td style="width:300px; vertical-align:top">
    142                         <div>This tool will scan your existing custom fields, mapping any applicable values into Custom Field Suite.</div>
    143143                        <div>
    144144                            <select id="sync-field-groups" style="width:300px; height:200px" multiple="multiple">
     
    149149                        </div>
    150150                        <div>
    151                             <input type="button" id="button-sync" class="button" value="Export" />
     151                            <input type="button" id="button-sync" class="button" value="" />
    152152                        </div>
    153153                    </td>
     
    162162
    163163        <div class="tab-content debug">
     164
    164165<textarea style="width:600px; height:200px">
    165166WordPress <?php global $wp_version; echo $wp_version; ?>
  • custom-field-suite/trunk/core/api.php

    r604423 r606792  
    405405        $defaults = array(
    406406            'format' => 'api', // "api" or "input"
     407
    407408        );
    408409        $options = (object) array_merge($defaults, $options);
     
    432433        }
    433434
    434         // Get all field groups for this post
    435         $group_ids = $this->parent->get_matching_groups($post_id, true);
     435        // For input forms, get the group IDs from the HTTP POST
     436        // Otherwise, the field group might not match anymore (e.g. the taxonomy changed)
     437        if ('input' == $options->format)
     438        {
     439            $group_ids = $options->field_groups;
     440        }
     441        elseif ('api' == $options->format)
     442        {
     443            $group_ids = $this->parent->get_matching_groups($post_id, true);
     444            $group_ids = array_keys($group_ids);
     445        }
    436446
    437447        if (!empty($group_ids))
    438448        {
    439449            $parent_fields = array();
    440             $group_ids = implode(',', array_keys($group_ids));
     450            $group_ids = implode(',', );
    441451            $results = $wpdb->get_results("SELECT id, type, parent_id, name FROM {$wpdb->prefix}cfs_fields WHERE post_id IN ($group_ids) ORDER BY weight");
    442452            foreach ($results as $result)
     
    458468        if ('api' == $options->format)
    459469        {
    460             // Remove the parent field data if using $cfs->save()
    461470            $field_ids = array();
    462471
     
    475484            $wpdb->query($sql);
    476485        }
    477         else
     486        else
    478487        {
    479488            // If saving raw input, delete existing postdata
     
    481490            DELETE v, m
    482491            FROM {$wpdb->prefix}cfs_values v
     492
    483493            LEFT JOIN {$wpdb->postmeta} m ON m.meta_id = v.meta_id
    484             WHERE v.post_id = '$post_id'";
     494            WHERE v.post_id = '$post_id'";
    485495            $wpdb->query($sql);
    486496        }
  • custom-field-suite/trunk/core/fields/relationship.php

    r599843 r606792  
    5050            <input type="text" class="cfs_filter_input" autocomplete="off" />
    5151            <div class="cfs_filter_help">
    52                 <div class="cfs_help_text hidden">
     52                <div class="cfs_ hidden">
    5353                    <ul>
    5454                        <li style="font-size:15px; font-weight:bold">Sample queries</li>
     
    135135                    $this.find('.cfs_filter_help').tipTip({
    136136                        maxWidth: '400px',
    137                         content: $this.find('.cfs_help_text').html()
     137                        content: $this.find('.cfs_').html()
    138138                    });
    139139
  • custom-field-suite/trunk/core/fields/wysiwyg.php

    r599843 r606792  
    1616    {
    1717    ?>
    18         <textarea name="<?php echo $field->input_name; ?>" class="<?php echo $field->input_class; ?>" rows="4"><?php echo $field->value; ?></textarea>
     18        <div class="wp-editor-wrap">
     19            <div class="wp-media-buttons">
     20                <?php do_action('media_buttons'); ?>
     21            </div>
     22            <div class="wp-editor-container">
     23                <textarea name="<?php echo $field->input_name; ?>" class="wp-editor-area <?php echo $field->input_class; ?>" rows="4"><?php echo $field->value; ?></textarea>
     24            </div>
     25        </div>
    1926    <?php
    2027    }
     
    6269                });
    6370                $('.cfs_wysiwyg').init_wysiwyg();
     71
     72
     73
     74
     75
     76
    6477            });
    6578
     
    7285                    var input_id = 'cfs_wysiwyg_' + wysiwyg_count;
    7386                    $(this).find('.wysiwyg').attr('id', input_id);
     87
     88
     89
    7490
    7591                    // create wysiwyg
  • custom-field-suite/trunk/css/input.css

    r601824 r606792  
    8585
    8686.cfs_wysiwyg textarea {
    87     height: 320px;
    88 }
    89 
    90 .cfs_wysiwyg .wp_themeSkin .mceStatusbar a.mceResize {
    91     top: -2px !important;
     87    height: 30px;
     88}
     89
     90.cfs_wysiwyg .wp {
     91    ;
    9292}
    9393
  • custom-field-suite/trunk/readme.txt

    r604423 r606792  
    2222* CFS allows you to [add your own field types](http://uproot.us/custom-field-suite/docs/custom-field-type/).
    2323* CFS is 100% free.
    24 * [CFS is on GitHub!](https://github.com/logikal16/custom-field-suite/)
     24* [CFS is on GitHub](https://github.com/logikal16/custom-field-suite/)
    2525
    2626= Field Types =
     
    6060== Changelog ==
    6161
     62
     63
     64
     65
     66
    6267= 1.7.1 =
    6368* Placement rules clarification text
     
    9499* Code cleanup
    95100
    96 = 1.6.7 =
    97 * Fixed file upload button bug (props baysaa)
    98 
    99 = 1.6.6 =
    100 * Added Polish translation (props Bartosz Arendt)
    101 * Added loop option to expand rows by default
    102 * Added field group option to hide the content editor
    103 * Updated translation .POT file
    104 * Fixed minor Gravity Forms integration bug
    105 
    106 = 1.6.5 =
    107 * Bugfix: Handle arrays for field get_option (props Migual Peixe)
    108 * Added "cfs_matching_groups" hook to override which field groups are used (props Gator92)
    109 
    110 = 1.6.4 =
    111 * Added new wysiwyg "Formatting" option
    112 * Improved: encapsulated jQuery UI CSS to prevent plugin conflicts
    113 
    114101[See the full changelog](https://uproot.us/custom-field-suite/changelog/)
Note: See TracChangeset for help on using the changeset viewer.