Skip to content

Commit

Permalink
phpcs fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sc0ttkclark committed Mar 5, 2018
1 parent db5647f commit 20ff40d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 11 deletions.
24 changes: 15 additions & 9 deletions deprecated/classes/Pods.php
Expand Up @@ -391,11 +391,13 @@ public function publicForm( $fields = null, $label = 'Save Changes', $thankyou_u
$name = $field['name'];
}

if ( in_array( $name, array(
'created',
'modified',
'author',
) ) && isset( $this->obj->fields[ $name . '2' ] ) ) {
if ( in_array(
$name, array(
'created',
'modified',
'author',
)
) && isset( $this->obj->fields[ $name . '2' ] ) ) {
$name .= '2';
}

Expand Down Expand Up @@ -455,11 +457,13 @@ public function get_field( $name, $orderby = null ) {
pods_deprecated( 'Pods::get_field', '2.0', 'Pods::field' );
}

$value = $this->obj->field( array(
$value = $this->obj->field(
array(
'name' => $name,
'orderby' => $orderby,
'deprecated' => true,
) );
)
);

if ( is_array( $value ) && ! empty( $value ) ) {
if ( false === strpos( $name, '.' ) && ! isset( $value[0] ) ) {
Expand Down Expand Up @@ -643,10 +647,12 @@ public function getPagination( $label = 'Go to page:' ) {
pods_deprecated( 'Pods::getPagination', '2.0', 'Pods::pagination' );
}

echo $this->obj->pagination( array(
echo $this->obj->pagination(
array(
'type' => 'advanced',
'label' => $label,
) );
)
);
}

/**
Expand Down
6 changes: 4 additions & 2 deletions deprecated/list_filters.php
Expand Up @@ -5,10 +5,12 @@
$filters = explode( ',', $filters );
}
foreach ( $filters as $field_name ) {
$field = $this->api->load_column( array(
$field = $this->api->load_column(
array(
'name' => $field_name,
'pod' => $this->pod,
) );
)
);
if ( empty( $field ) ) {
continue;
}
Expand Down

0 comments on commit 20ff40d

Please sign in to comment.