Changeset 641429
- Timestamp:
- 12/19/2012 01:26:06 AM (12 years ago)
- Location:
- custom-field-suite/trunk
- Files:
-
- 1 deleted
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
custom-field-suite/trunk/cfs.php
r636566 r641429 2 2 /* 3 3 Plugin Name: Custom Field Suite 4 Plugin URI: http s://uproot.us/4 Plugin URI: http://uproot.us/ 5 5 Description: Visually add custom fields to your WordPress edit pages. 6 Version: 1. 7.96 Version: 1. 7 7 Author: Matt Gibbs 8 Author URI: http s://uproot.us/8 Author URI: http://uproot.us/ 9 9 License: GPL2 10 10 */ … … 33 33 function __construct() 34 34 { 35 $this->version = '1. 7.9';35 $this->version = '1.'; 36 36 $this->dir = (string) dirname(__FILE__); 37 37 $this->url = plugins_url('custom-field-suite'); … … 106 106 'supports' => array('title'), 107 107 )); 108 109 108 110 } 109 111 … … 203 205 return $this->api->get_field($field_name, $post_id, $options); 204 206 } 207 205 208 return $this->api->get_fields($post_id, $options); 206 209 } … … 218 221 function get_labels($field_name = false, $post_id = false) 219 222 { 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 } 221 240 } 222 241 … … 333 352 add_object_page(__('Field Groups', 'cfs'), __('Field Groups', 'cfs'), 'manage_options', 'edit.php?post_type=cfs', null, $this->url . '/images/logo-small.png'); 334 353 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')); 336 355 } 337 356 … … 503 522 echo json_encode($ajax->export($_POST)); 504 523 } 524 525 526 527 528 529 530 531 532 533 534 505 535 elseif (method_exists($ajax, $ajax_method)) 506 536 { -
custom-field-suite/trunk/core/admin/admin_footer.php
r636566 r641429 1 1 <style type="text/css"> 2 .tablenav {2 .tablenav { 3 3 display: none; 4 4 } … … 69 69 <div class="field"> 70 70 <p> 71 <a href="http s://uproot.us/" target="_blank"><?php _e('Homepage', 'cfs'); ?></a> | 72 <a href="http s://uproot.us/projects/cfs/documentation/" target="_blank"><?php _e('User Guide', 'cfs'); ?></a> | 73 <a href="http s://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> | 72 <a href="http://uproot.us/projects/cfs/documentation/" target="_blank"><?php _e('User Guide', 'cfs'); ?></a> | 73 <a href="http://uproot.us/projects/cfs/changelog/" target="_blank"><?php _e('Changelog', 'cfs'); ?></a> 74 74 </p> 75 75 </div> 76 76 <div class="field"> 77 77 <p> 78 <a class="button-primary" href="http s://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> 79 79 <a class="button" href="http://wordpress.org/extend/plugins/custom-field-suite/" target="_blank"><?php _e('Rate the plugin', 'cfs'); ?></a> 80 80 </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 1 19 <style type="text/css"> 2 20 #icon-edit { background: url(<?php echo $this->url; ?>/images/logo.png) no-repeat; } … … 6 24 <div id="icon-edit" class="icon32"><br></div> 7 25 <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 8 53 </div> -
custom-field-suite/trunk/core/admin/page_tools.php
r619694 r641429 55 55 }); 56 56 }); 57 58 59 60 61 62 63 64 65 66 67 68 57 69 }); 58 70 })(jQuery); … … 65 77 <a class="nav-tab" rel="import"><?php _e('Import', 'cfs'); ?></a> 66 78 <a class="nav-tab" rel="debug"><?php _e('Debug', 'cfs'); ?></a> 79 67 80 </h2> 68 81 … … 123 136 <div class="tab-content debug"> 124 137 <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 < 139 global $wp_version; 127 140 128 PHP <?php echo phpversion(); ?> 141 echo '<textarea style="width:600px; height:200px">'; 142 echo 'WordPress ' . $wp_version . "\n"; 143 echo 'PHP ' . phpversion() . "\n"; 144 echo $_SERVER['SERVER_SOFTWARE'] . "\n"; 145 echo $_SERVER['HTTP_USER_AGENT'] . "\n"; 146 echo "\n--- Active Plugins ---\n"; 129 147 130 <?php echo $_SERVER['SERVER_SOFTWARE']; ?>131 132 <?php echo $_SERVER['HTTP_USER_AGENT']; ?>133 134 135 -- Active Plugins --136 <?php137 148 $all_plugins = get_plugins(); 138 149 foreach ($all_plugins as $plugin_file => $plugin_data) { … … 141 152 } 142 153 } 154 155 143 156 ?> 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'); ?>" /> 145 165 </div> 146 166 </div> -
custom-field-suite/trunk/core/classes/ajax.php
r636566 r641429 189 189 /*-------------------------------------------------------------------------------------- 190 190 * 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 191 224 * AJAX/map_values 192 225 * -
custom-field-suite/trunk/core/classes/api.php
r636566 r641429 44 44 if (!isset($this->cache[$post_id][$options->format][$field_name])) 45 45 { 46 $fields = $this->get_fields($post_id );46 $fields = $this->get_fields($post_id); 47 47 48 48 return isset($fields[$field_name]) ? $fields[$field_name] : null; … … 208 208 if (false !== $value) 209 209 { 210 210 211 $data[] = $value; 211 212 } … … 269 270 /*-------------------------------------------------------------------------------------- 270 271 * 271 * get_ labels272 * 273 * @author Matt Gibbs 274 * @since 1. 3.3275 * 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) 279 280 { 280 281 global $post, $wpdb; … … 285 286 $group_ids = $this->get_matching_groups($post_id, true); 286 287 287 $ labels= array();288 $ = array(); 288 289 289 290 if (!empty($group_ids)) 290 291 { 291 292 $group_ids = implode(',', array_keys($group_ids)); 292 $results = $wpdb->get_results("SELECT name, labelFROM {$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"); 293 294 foreach ($results as $result) 294 295 { 295 if (empty($field_name)) 296 $result->options = unserialize($result->options); 297 298 if (empty($field_name) || $result->name == $field_name) 296 299 { 297 $ labels[$result->name] = $result->label;300 $; 298 301 } 299 elseif ($result->name == $field_name) 300 { 301 $labels = $result->label; 302 } 303 } 304 } 305 return $labels; 302 } 303 } 304 305 return $output; 306 306 } 307 307 -
custom-field-suite/trunk/core/fields/file.php
r636566 r641429 108 108 }); 109 109 110 111 112 110 113 $('#media-items').bind('DOMNodeInserted', function() { 111 114 var $this = $(this); -
custom-field-suite/trunk/readme.txt
r637313 r641429 1 1 === Custom Field Suite === 2 2 Contributors: logikal16, mgibbs189 3 Donate link: http s://uproot.us/donate/3 Donate link: http://uproot.us/donate/ 4 4 Tags: custom fields, fields, postmeta, cck, wysiwyg, relationship, upload 5 Requires at least: 3. 25 Requires at least: 3. 6 6 Tested up to: 3.5 7 7 Stable tag: trunk … … 15 15 16 16 = Features = 17 * Many field types: [text](http s://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/) 18 18 * Field validation 19 19 * Drag-and-drop field management … … 27 27 * CFS is stable. We test all changes before releasing a new version. 28 28 * CFS is fast and uses minimal server resources. 29 * CFS works well with [Gravity Forms](http s://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 s://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/). 31 31 * [CFS is on GitHub!](https://github.com/mgibbs189/custom-field-suite/) 32 32 … … 34 34 * http://uproot.us/ 35 35 * http://uproot.us/projects/cfs/documentation/ 36 * http s://uproot.us/forums/36 * http://uproot.us/forums/ 37 37 38 38 == Installation == … … 48 48 49 49 == Changelog == 50 51 52 53 54 55 56 57 58 59 60 50 61 51 62 = 1.7.9 = … … 85 96 * Added tooltips to field management page 86 97 87 [See the full changelog](http s://uproot.us/custom-field-suite/changelog/)98 [See the full changelog](http/changelog/)
Note: See TracChangeset
for help on using the changeset viewer.