Changeset 606792
- Timestamp:
- 10/02/2012 01:52:43 AM (12 years ago)
- Location:
- custom-field-suite/trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
custom-field-suite/trunk/cfs.php
r604423 r606792 4 4 Plugin URI: https://uproot.us/ 5 5 Description: Dead simple custom field management. 6 Version: 1.7. 16 Version: 1.7. 7 7 Author: Matt Gibbs 8 8 Author URI: https://uproot.us/ … … 11 11 12 12 $cfs = new Cfs(); 13 $cfs->version = '1.7. 1';13 $cfs->version = '1.7.'; 14 14 15 15 class Cfs … … 437 437 elseif (wp_verify_nonce($_POST['cfs']['save'], 'cfs_save_input')) 438 438 { 439 439 440 $field_data = isset($_POST['cfs']['input']) ? $_POST['cfs']['input'] : array(); 440 441 $post_data = array('ID' => $_POST['ID']); 441 $options = array('format' => 'input' );442 $options = array('format' => 'input'); 442 443 $this->save($field_data, $post_data, $options); 443 444 } … … 850 851 { 851 852 $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 } 853 858 } 854 859 } -
custom-field-suite/trunk/core/actions/admin_footer.php
r601829 r606792 51 51 background: url(<?php echo $this->url; ?>/images/logo.png) no-repeat; 52 52 } 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 }135 53 </style> 136 54 … … 158 76 <div class="field"> 159 77 <p> 160 <a class="b tn btn-success" href="https://uproot.us/contributors/" target="_blank"><?php _e('Donate', 'cfs'); ?></a>161 <a class="b tn" 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> 162 80 </p> 163 81 </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 3 1 <?php 4 2 … … 7 5 8 6 $input_fields = $this->api->get_input_fields($group_id); 7 9 8 9 10 11 12 10 13 // Add any necessary head scripts 11 14 foreach ($input_fields as $key => $field) -
custom-field-suite/trunk/core/admin/page_tools.php
r601824 r606792 16 16 .tab-content { display: none; } 17 17 .tab-content.active { display: block; } 18 18 19 #icon-edit { background: url(<?php echo $this->url; ?>/images/logo.png) no-repeat; } 19 20 </style> … … 86 87 87 88 <div class="tab-content export active"> 89 88 90 <table> 89 91 <tr> 90 92 <td style="width:300px; vertical-align:top"> 91 <div>Which field groups would you like to export?</div>92 93 <div> 93 94 <select id="export-field-groups" style="width:300px; height:200px" multiple="multiple"> … … 103 104 <td style="width:300px; vertical-align:top"> 104 105 <div id="export-area" style="display:none"> 105 <div>Export code:</div>106 106 <div> 107 107 <textarea id="export-output" style="width:98%; height:200px"></textarea> … … 116 116 117 117 <div class="tab-content import"> 118 118 119 <table> 119 120 <tr> 120 121 <td style="width:300px; vertical-align:top"> 121 <div>Paste the code. Existing field groups will be skipped.</div>122 122 <div> 123 123 <textarea id="import-code" style="width:98%; height:200px"></textarea> … … 137 137 138 138 <div class="tab-content sync"> 139 139 140 <table> 140 141 <tr> 141 142 <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>143 143 <div> 144 144 <select id="sync-field-groups" style="width:300px; height:200px" multiple="multiple"> … … 149 149 </div> 150 150 <div> 151 <input type="button" id="button-sync" class="button" value=" Export" />151 <input type="button" id="button-sync" class="button" value="" /> 152 152 </div> 153 153 </td> … … 162 162 163 163 <div class="tab-content debug"> 164 164 165 <textarea style="width:600px; height:200px"> 165 166 WordPress <?php global $wp_version; echo $wp_version; ?> -
custom-field-suite/trunk/core/api.php
r604423 r606792 405 405 $defaults = array( 406 406 'format' => 'api', // "api" or "input" 407 407 408 ); 408 409 $options = (object) array_merge($defaults, $options); … … 432 433 } 433 434 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 } 436 446 437 447 if (!empty($group_ids)) 438 448 { 439 449 $parent_fields = array(); 440 $group_ids = implode(',', array_keys($group_ids));450 $group_ids = implode(',', ); 441 451 $results = $wpdb->get_results("SELECT id, type, parent_id, name FROM {$wpdb->prefix}cfs_fields WHERE post_id IN ($group_ids) ORDER BY weight"); 442 452 foreach ($results as $result) … … 458 468 if ('api' == $options->format) 459 469 { 460 // Remove the parent field data if using $cfs->save()461 470 $field_ids = array(); 462 471 … … 475 484 $wpdb->query($sql); 476 485 } 477 else 486 else 478 487 { 479 488 // If saving raw input, delete existing postdata … … 481 490 DELETE v, m 482 491 FROM {$wpdb->prefix}cfs_values v 492 483 493 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'"; 485 495 $wpdb->query($sql); 486 496 } -
custom-field-suite/trunk/core/fields/relationship.php
r599843 r606792 50 50 <input type="text" class="cfs_filter_input" autocomplete="off" /> 51 51 <div class="cfs_filter_help"> 52 <div class="cfs_ help_texthidden">52 <div class="cfs_ hidden"> 53 53 <ul> 54 54 <li style="font-size:15px; font-weight:bold">Sample queries</li> … … 135 135 $this.find('.cfs_filter_help').tipTip({ 136 136 maxWidth: '400px', 137 content: $this.find('.cfs_ help_text').html()137 content: $this.find('.cfs_').html() 138 138 }); 139 139 -
custom-field-suite/trunk/core/fields/wysiwyg.php
r599843 r606792 16 16 { 17 17 ?> 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> 19 26 <?php 20 27 } … … 62 69 }); 63 70 $('.cfs_wysiwyg').init_wysiwyg(); 71 72 73 74 75 76 64 77 }); 65 78 … … 72 85 var input_id = 'cfs_wysiwyg_' + wysiwyg_count; 73 86 $(this).find('.wysiwyg').attr('id', input_id); 87 88 89 74 90 75 91 // create wysiwyg -
custom-field-suite/trunk/css/input.css
r601824 r606792 85 85 86 86 .cfs_wysiwyg textarea { 87 height: 3 20px;88 } 89 90 .cfs_wysiwyg .wp _themeSkin .mceStatusbar a.mceResize{91 top: -2px !important;87 height: 30px; 88 } 89 90 .cfs_wysiwyg .wp { 91 ; 92 92 } 93 93 -
custom-field-suite/trunk/readme.txt
r604423 r606792 22 22 * CFS allows you to [add your own field types](http://uproot.us/custom-field-suite/docs/custom-field-type/). 23 23 * 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/) 25 25 26 26 = Field Types = … … 60 60 == Changelog == 61 61 62 63 64 65 66 62 67 = 1.7.1 = 63 68 * Placement rules clarification text … … 94 99 * Code cleanup 95 100 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 default102 * Added field group option to hide the content editor103 * Updated translation .POT file104 * Fixed minor Gravity Forms integration bug105 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" option112 * Improved: encapsulated jQuery UI CSS to prevent plugin conflicts113 114 101 [See the full changelog](https://uproot.us/custom-field-suite/changelog/)
Note: See TracChangeset
for help on using the changeset viewer.