Skip to content

Commit 2fed9e4

Browse files
committed
Fix some minor issues discovered by the phpcs run
1 parent 02e23b8 commit 2fed9e4

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

includes/class-geo-data.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -859,7 +859,6 @@ public static function get_iconlist() {
859859
'fa-suitcase' => __( 'Suitcase', 'simple-location' ),
860860
'fa-suitcase-rolling' => __( 'Suitcase - Rolling', 'simple-location' ),
861861
'fa-walking' => __( 'Walking', 'simple-location' ),
862-
'fa-running' => __( 'Running', 'simple-location' ),
863862
'americanairlines' => __( 'American Airlines', 'simple-location' ),
864863
's7airlines' => __( 'S7 Airlines', 'simple-location' ),
865864
'unitedairlines' => __( 'United Airlines', 'simple-location' ),

includes/class-location-plugins.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ public static function micropub_set_location( $input, $args ) {
252252
if ( ! $term ) {
253253
$term = Location_Taxonomy::get_post_location( $venue );
254254
if ( $term ) {
255-
Location_Taxonomy::set_location( $args['ID'] , $term );
255+
Location_Taxonomy::set_location( $args['ID'], $term );
256256
}
257257
}
258258
}

includes/class-location-taxonomy.php

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)