@@ -219,7 +219,7 @@ public static function save_data( $term_id ) {
219219 update_term_meta ( $ term_id , $ type , sanitize_text_field ( $ _POST ['location-code ' ] ) );
220220 }
221221 return ;
222-
222+
223223 }
224224
225225 if ( array_key_exists ( $ type , $ _POST ) ) {
@@ -438,7 +438,14 @@ public static function taxonomy_select_meta_box( $post, $box ) {
438438 ?>
439439 <select name="<?php echo esc_attr ( "tax_input[ $ taxonomy][] " ); ?> " class="widefat">
440440 <option value="0"></option>
441- <?php foreach ( get_terms ( $ taxonomy , array ( 'hide_empty ' => false ) ) as $ term ) : ?>
441+ <?php
442+ foreach ( get_terms (
443+ array (
444+ 'taxonomy ' => $ taxonomy ,
445+ 'hide_empty ' => false ,
446+ )
447+ ) as $ term ) :
448+ ?>
442449 <option value="<?php echo esc_attr ( $ term ->slug ); ?> " <?php echo selected ( $ term ->term_id , count ( $ selected ) >= 1 ? $ selected [0 ] : '' ); ?> ><?php echo esc_html ( $ term ->name ); ?> </option>
443450 <?php endforeach ; ?>
444451 </select>
@@ -540,7 +547,7 @@ public static function get_locality( $addr ) {
540547 return false ;
541548 }
542549 if ( $ addr ['country-code ' ] === $ data ['country ' ]['code ' ] ) {
543- if ( $ data ['region ' ]['code ' ] === self :: region_return ( $ addr ) ) {
550+ if ( self :: region_return ( $ addr ) === $ data ['region ' ]['code ' ] ) {
544551 return $ term_id ;
545552 }
546553 }
@@ -849,7 +856,7 @@ public static function display_name( $term_id, $args = array() ) {
849856 $ term = get_term ( $ term ->parent , 'location ' );
850857 if ( 0 === $ term ->parent ) {
851858 $ country = get_term_meta ( $ term ->term_id , 'country ' , true );
852- if ( $ country !== get_option ( 'sloc_country ' ) ) {
859+ if ( get_option ( 'sloc_country ' ) !== $ country ) {
853860 $ flag = Geo_Provider::country_flag ( $ country );
854861 if ( $ args ['links ' ] ) {
855862 $ return [] = sprintf ( '<a href="%1$s">%2$s</a> ' , get_term_link ( $ term ->term_id , 'location ' ), $ flag . ' ' . $ term ->name );
@@ -885,7 +892,7 @@ public static function get_location_link( $term_id ) {
885892 $ term = get_term ( $ term ->parent , 'location ' );
886893 if ( 0 === $ term ->parent ) {
887894 $ country = get_term_meta ( $ term ->term_id , 'country ' , true );
888- if ( $ country !== get_option ( 'sloc_country ' ) ) {
895+ if ( get_option ( 'sloc_country ' ) !== $ country ) {
889896 $ flag = Geo_Provider::country_flag ( $ country );
890897 $ return [] = $ flag . ' ' . $ term ->name ;
891898 }
0 commit comments