Changeset 910857
- Timestamp:
- 05/09/2014 05:12:15 AM (12 years ago)
- Location:
- anything-order/trunk
- Files:
-
- 4 edited
-
README.md (modified) (1 diff)
-
anything-order.php (modified) (1 diff)
-
modules/taxonomy/class.php (modified) (5 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
anything-order/trunk/README.md
r910168 r910857 44 44 ##Screenshots 45 45 46 46  47 47 Enable/Disable arrangement with drag and drop on "Screen Options" tab. 48 48 49 49  50 50 You can select multiple items. 51 51 52 52  53 53 Dragging multiple items. 54 54 -
anything-order/trunk/anything-order.php
r910168 r910857 8 8 Text Domain: anything-order 9 9 Domain Path: /languages/ 10 Version: 1.0. 110 Version: 1.0.2 11 11 License: GPL version 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 12 12 */ -
anything-order/trunk/modules/taxonomy/class.php
r909476 r910857 193 193 $field = 'name'; 194 194 $select_this = 't.name, t.term_id, tt.taxonomy'; 195 $values = $terms;195 $values = array_map( array( $this, 'add_quote' ), $terms ); 196 196 break; 197 197 … … 199 199 $field ='slug'; 200 200 $select_this = 't.slug, t.term_id, tt.taxonomy'; 201 $values = $terms;201 $values = array_map( array( $this, 'add_quote' ), $terms ); 202 202 break; 203 203 … … 232 232 } else if ( 'ids' == $fields || 'names' == $fields || 'slugs' == $fields ) { 233 233 $terms = $wpdb->get_results( $query ); 234 $_field = ( 'ids' == $fields ) ? 'term_id' : 'name'; 234 235 foreach ( $terms as $key => $term ) { 235 236 $terms[$key] = sanitize_term_field( $_field, $term->$field, $term->term_id, $term->taxonomy, 'raw' ); … … 237 238 238 239 } else if ( 'tt_ids' == $fields ) { 239 $terms = $wpdb->get_ col(240 $terms = $wpdb->get_results( 240 241 "SELECT tt.term_taxonomy_id, tt.taxonomy" 241 242 . " FROM $wpdb->term_taxonomy AS tt" … … 253 254 return $terms; 254 255 } 256 257 /** 258 * Surround the string with a single quote 259 * 260 * @since 1.0.2 261 * @access protected 262 * 263 * @see Anything_Order_Taxonomy::get_object_terms() 264 * 265 * @param string $str An string. 266 * @return string String surrounded with a single quote. 267 * 268 */ 269 protected function add_quote( $str ) { 270 return "'$str'"; 271 } 255 272 256 273 /** -
anything-order/trunk/readme.txt
r910168 r910857 4 4 Requires at least: 3.8 5 5 Tested up to: 3.9 6 Stable tag: 1.0. 16 Stable tag: 1.0.2 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 56 56 == Changelog == 57 57 58 = 1.0.2 = 59 * Fix - PHP error on wp_get_object_terms() with option 'fields' => 'names', 'slugs', 'tt_ids' 60 58 61 = 1.0.1 = 59 62 * Tweak - Remove screenshots from the plugin's release zip files.
Note: See TracChangeset
for help on using the changeset viewer.