Plugin Directory

Changeset 641429

Timestamp:
12/19/2012 01:26:06 AM (12 years ago)
Author:
logikal16
Message:

CFS 1.8.0

Location:
custom-field-suite/trunk
Files:
1 deleted
8 edited

Legend:

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

    r636566 r641429  
    22/*
    33Plugin Name: Custom Field Suite
    4 Plugin URI: https://uproot.us/
     4Plugin URI: http://uproot.us/
    55Description: Visually add custom fields to your WordPress edit pages.
    6 Version: 1.7.9
     6Version: 1.
    77Author: Matt Gibbs
    8 Author URI: https://uproot.us/
     8Author URI: http://uproot.us/
    99License: GPL2
    1010*/
     
    3333    function __construct()
    3434    {
    35         $this->version = '1.7.9';
     35        $this->version = '1.';
    3636        $this->dir = (string) dirname(__FILE__);
    3737        $this->url = plugins_url('custom-field-suite');
     
    106106            'supports' => array('title'),
    107107        ));
     108
     109
    108110    }
    109111
     
    203205            return $this->api->get_field($field_name, $post_id, $options);
    204206        }
     207
    205208        return $this->api->get_fields($post_id, $options);
    206209    }
     
    218221    function get_labels($field_name = false, $post_id = false)
    219222    {
    220         return $this->api->get_labels($field_name, $post_id);
     223        $field_info = $this->api->get_field_info($field_name, $post_id);
     224
     225        if (false !== $field_name)
     226        {
     227            return $field_info[$field_name]['label'];
     228        }
     229        else
     230        {
     231            $output = array();
     232
     233            foreach ($field_info as $name => $field_data)
     234            {
     235                $output[$name] = $field_data['label'];
     236            }
     237
     238            return $output;
     239        }
    221240    }
    222241
     
    333352        add_object_page(__('Field Groups', 'cfs'), __('Field Groups', 'cfs'), 'manage_options', 'edit.php?post_type=cfs', null, $this->url . '/images/logo-small.png');
    334353        add_submenu_page('edit.php?post_type=cfs', __('Tools', 'cfs'), __('Tools', 'cfs'), 'manage_options', 'cfs-tools', array($this, 'page_tools'));
    335         //add_submenu_page('edit.php?post_type=cfs', __('Add-ons', 'cfs'), __('Add-ons', 'cfs'), 'manage_options', 'cfs-addons', array($this, 'page_addons'));
     354        add_submenu_page('edit.php?post_type=cfs', __('Add-ons', 'cfs'), __('Add-ons', 'cfs'), 'manage_options', 'cfs-addons', array($this, 'page_addons'));
    336355    }
    337356
     
    503522                echo json_encode($ajax->export($_POST));
    504523            }
     524
     525
     526
     527
     528
     529
     530
     531
     532
     533
     534
    505535            elseif (method_exists($ajax, $ajax_method))
    506536            {
  • custom-field-suite/trunk/core/admin/admin_footer.php

    r636566 r641429  
    11<style type="text/css">
    2 .tablenav {
     2.tablenav {
    33    display: none;
    44}
     
    6969                <div class="field">
    7070                    <p>
    71                         <a href="https://uproot.us/" target="_blank"><?php _e('Homepage', 'cfs'); ?></a> &nbsp; | &nbsp;
    72                         <a href="https://uproot.us/projects/cfs/documentation/" target="_blank"><?php _e('User Guide', 'cfs'); ?></a> &nbsp; | &nbsp;
    73                         <a href="https://uproot.us/projects/cfs/changelog/" target="_blank"><?php _e('Changelog', 'cfs'); ?></a>
     71                        <a href="http://uproot.us/" target="_blank"><?php _e('Homepage', 'cfs'); ?></a> &nbsp; | &nbsp;
     72                        <a href="http://uproot.us/projects/cfs/documentation/" target="_blank"><?php _e('User Guide', 'cfs'); ?></a> &nbsp; | &nbsp;
     73                        <a href="http://uproot.us/projects/cfs/changelog/" target="_blank"><?php _e('Changelog', 'cfs'); ?></a>
    7474                    </p>
    7575                </div>
    7676                <div class="field">
    7777                    <p>
    78                         <a class="button-primary" href="https://uproot.us/donate/" target="_blank"><?php _e('Donate', 'cfs'); ?></a>
     78                        <a class="button-primary" href="http://uproot.us/donate/" target="_blank"><?php _e('Donate', 'cfs'); ?></a>
    7979                        <a class="button" href="http://wordpress.org/extend/plugins/custom-field-suite/" target="_blank"><?php _e('Rate the plugin', 'cfs'); ?></a>
    8080                    </p>
  • custom-field-suite/trunk/core/admin/page_addons.php

    r636566 r641429  
     1
     2
     3
     4
     5
     6
     7
     8
     9
     10
     11
     12
     13
     14
     15
     16
     17
     18
    119<style type="text/css">
    220#icon-edit { background: url(<?php echo $this->url; ?>/images/logo.png) no-repeat; }
     
    624    <div id="icon-edit" class="icon32"><br></div>
    725    <h2>Add-ons</h2>
     26
     27
     28
     29
     30
     31
     32
     33
     34
     35
     36
     37
     38
     39
     40
     41
     42
     43
     44
     45
     46
     47
     48
     49
     50
     51
     52
    853</div>
  • custom-field-suite/trunk/core/admin/page_tools.php

    r619694 r641429  
    5555            });
    5656        });
     57
     58
     59
     60
     61
     62
     63
     64
     65
     66
     67
     68
    5769    });
    5870})(jQuery);
     
    6577        <a class="nav-tab" rel="import"><?php _e('Import', 'cfs'); ?></a>
    6678        <a class="nav-tab" rel="debug"><?php _e('Debug', 'cfs'); ?></a>
     79
    6780    </h2>
    6881
     
    123136        <div class="tab-content debug">
    124137            <h2><?php _e('Your site uses the following software:', 'cfs'); ?></h2>
    125 <textarea style="width:600px; height:200px">
    126 WordPress <?php global $wp_version; echo $wp_version; ?>
     138<
     139global $wp_version;
    127140
    128 PHP <?php echo phpversion(); ?>
     141echo '<textarea style="width:600px; height:200px">';
     142echo 'WordPress ' . $wp_version . "\n";
     143echo 'PHP ' . phpversion() . "\n";
     144echo $_SERVER['SERVER_SOFTWARE'] . "\n";
     145echo $_SERVER['HTTP_USER_AGENT'] . "\n";
     146echo "\n--- Active Plugins ---\n";
    129147
    130 <?php echo $_SERVER['SERVER_SOFTWARE']; ?>
    131 
    132 <?php echo $_SERVER['HTTP_USER_AGENT']; ?>
    133 
    134 
    135 -- Active Plugins --
    136 <?php
    137148$all_plugins = get_plugins();
    138149foreach ($all_plugins as $plugin_file => $plugin_data) {
     
    141152    }
    142153}
     154
     155
    143156?>
    144 </textarea>
     157        </div>
     158
     159        <!-- Reset -->
     160
     161        <div class="tab-content reset">
     162            <h2><?php _e('Reset and deactivate.', 'cfs'); ?></h2>
     163            <p><?php _e('This will delete all CFS data and deactivate the plugin.'); ?></p>
     164            <input type="button" id="button-reset" class="button" value="<?php _e('Delete everything', 'cfs'); ?>" />
    145165        </div>
    146166    </div>
  • custom-field-suite/trunk/core/classes/ajax.php

    r636566 r641429  
    189189    /*--------------------------------------------------------------------------------------
    190190    *
     191
     192
     193
     194
     195
     196
     197
     198
     199
     200
     201
     202
     203
     204
     205
     206
     207
     208
     209
     210
     211
     212
     213
     214
     215
     216
     217
     218
     219
     220
     221
     222
     223
    191224    *    AJAX/map_values
    192225    *
  • custom-field-suite/trunk/core/classes/api.php

    r636566 r641429  
    4444        if (!isset($this->cache[$post_id][$options->format][$field_name]))
    4545        {
    46             $fields = $this->get_fields($post_id);
     46            $fields = $this->get_fields($post_id);
    4747
    4848            return isset($fields[$field_name]) ? $fields[$field_name] : null;
     
    208208        if (false !== $value)
    209209        {
     210
    210211            $data[] = $value;
    211212        }
     
    269270    /*--------------------------------------------------------------------------------------
    270271    *
    271     *    get_labels
    272     *
    273     *    @author Matt Gibbs
    274     *    @since 1.3.3
    275     *
    276     *-------------------------------------------------------------------------------------*/
    277 
    278     public function get_labels($field_name = false, $post_id = false)
     272    *    get_
     273    *
     274    *    @author Matt Gibbs
     275    *    @since 1.
     276    *
     277    *-------------------------------------------------------------------------------------*/
     278
     279    public function get_($field_name = false, $post_id = false)
    279280    {
    280281        global $post, $wpdb;
     
    285286        $group_ids = $this->get_matching_groups($post_id, true);
    286287
    287         $labels = array();
     288        $ = array();
    288289
    289290        if (!empty($group_ids))
    290291        {
    291292            $group_ids = implode(',', array_keys($group_ids));
    292             $results = $wpdb->get_results("SELECT name, label FROM {$wpdb->prefix}cfs_fields WHERE post_id IN ($group_ids) ORDER BY weight");
     293            $results = $wpdb->get_results("SELECT FROM {$wpdb->prefix}cfs_fields WHERE post_id IN ($group_ids) ORDER BY weight");
    293294            foreach ($results as $result)
    294295            {
    295                 if (empty($field_name))
     296                $result->options = unserialize($result->options);
     297
     298                if (empty($field_name) || $result->name == $field_name)
    296299                {
    297                     $labels[$result->name] = $result->label;
     300                    $;
    298301                }
    299                 elseif ($result->name == $field_name)
    300                 {
    301                     $labels = $result->label;
    302                 }
    303             }
    304         }
    305         return $labels;
     302            }
     303        }
     304
     305        return $output;
    306306    }
    307307
  • custom-field-suite/trunk/core/fields/file.php

    r636566 r641429  
    108108                });
    109109
     110
     111
     112
    110113                $('#media-items').bind('DOMNodeInserted', function() {
    111114                    var $this = $(this);
  • custom-field-suite/trunk/readme.txt

    r637313 r641429  
    11=== Custom Field Suite ===
    22Contributors: logikal16, mgibbs189
    3 Donate link: https://uproot.us/donate/
     3Donate link: http://uproot.us/donate/
    44Tags: custom fields, fields, postmeta, cck, wysiwyg, relationship, upload
    5 Requires at least: 3.2
     5Requires at least: 3.
    66Tested up to: 3.5
    77Stable tag: trunk
     
    1515
    1616= Features =
    17 * Many field types: [text](https://uproot.us/docs/text/), [textarea](https://uproot.us/docs/textarea/), [wysiwyg](https://uproot.us/docs/wysiwyg/), [date](https://uproot.us/docs/date/), [color](https://uproot.us/docs/color/), [select](https://uproot.us/docs/select/), [file upload](https://uproot.us/docs/file-upload/), [user](https://uproot.us/docs/user/), [relationship](https://uproot.us/docs/relationship/), and [loop](https://uproot.us/docs/loop/)
     17* Many field types: [text](http://uproot.us/docs/loop/)
    1818* Field validation
    1919* Drag-and-drop field management
     
    2727* CFS is stable. We test all changes before releasing a new version.
    2828* CFS is fast and uses minimal server resources.
    29 * CFS works well with [Gravity Forms](https://uproot.us/how-to-save-gravity-forms-data-into-custom-field-suite/) by saving Gravity Forms entries as post items.
    30 * CFS supports [adding your own field types](https://uproot.us/docs/creating-custom-field-types/).
     29* CFS works well with [Gravity Forms](http://uproot.us/how-to-save-gravity-forms-data-into-custom-field-suite/) by saving Gravity Forms entries as post items.
     30* CFS supports [adding your own field types](http://uproot.us/docs/creating-custom-field-types/).
    3131* [CFS is on GitHub!](https://github.com/mgibbs189/custom-field-suite/)
    3232
     
    3434* http://uproot.us/
    3535* http://uproot.us/projects/cfs/documentation/
    36 * https://uproot.us/forums/
     36* http://uproot.us/forums/
    3737
    3838== Installation ==
     
    4848
    4949== Changelog ==
     50
     51
     52
     53
     54
     55
     56
     57
     58
     59
     60
    5061
    5162= 1.7.9 =
     
    8596* Added tooltips to field management page
    8697
    87 [See the full changelog](https://uproot.us/custom-field-suite/changelog/)
     98[See the full changelog](http/changelog/)
Note: See TracChangeset for help on using the changeset viewer.