クラス WP_Meta_Query::get_cast_for_type()
2014/12/25
WP_Meta_Query::get_cast_for_type()
定義ファイル :/blog/wp-includes/meta.php 3
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | public function get_cast_for_type( $type = '' ) { if ( empty( $type ) ) return 'CHAR'; $meta_type = strtoupper( $type ); if ( ! preg_match( '/^(?:BINARY|CHAR|DATE|DATETIME|SIGNED|UNSIGNED|TIME|NUMERIC(?:\(\d+(?:,\s?\d+)?\))?|DECIMAL(?:\(\d+(?:,\s?\d+)?\))?)$/', $meta_type ) ) return 'CHAR'; if ( 'NUMERIC' == $meta_type ) $meta_type = 'SIGNED'; return $meta_type; } |