-
Notifications
You must be signed in to change notification settings - Fork 17
Fix PHP8.2 deprecations, shorthand array notation #122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| $this->redipress_add_queryable_method = $method; | ||
| $this->redipress_add_queryable = true; | ||
| $this->redipress_add_queryable_field_name = $field_name; | ||
| $this->redipress_add_queryable_field_weight = $weight; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Nomafin - changed this as there were a few usages for both redipress_add_queryable_weight (not defined in class) and redipress_add_queryable_field_weight (defined in class). I believe they should both be the same, right? If not, I will make changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, very probable they should be the same and this is just a mistake.
Liblastic
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor changes check the comments.
src/Field.php
Outdated
| * An internal function to be run with the add queryable functionality. | ||
| */ | ||
| private function redipress_add_queryable_internal() { | ||
| $field_name = $this->redipress_add_queryable_field_name; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm, seems like this is not used inside the function.
So this could be removed.
| $field_name = $this->redipress_add_queryable_field_name; |
src/Field.php
Outdated
| private function redipress_add_queryable_internal() { | ||
| $field_name = $this->redipress_add_queryable_field_name; | ||
| $weight = $this->redipress_add_queryable_weight; | ||
| $weight = $this->redipress_add_queryable_field_weight; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is also redundant, not used inside the function.
Not sure if this is legacy code.
| $weight = $this->redipress_add_queryable_field_weight; |
src/Field/Flexible/Layout.php
Outdated
| /** | ||
| * Layout active | ||
| * | ||
| * @var boolean |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is actually an integer with value 1 or 0.
| * @var boolean | |
| * @var int $active Values 1 or 0. |
|
|
||
| ?> | ||
| <div <?php acf_esc_attr_e( $div ); ?>> | ||
| <div <?php echo acf_esc_attrs( $div ); ?>> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to be clear that it is an ACF function.
| <div <?php echo acf_esc_attrs( $div ); ?>> | |
| <div <?php echo \acf_esc_attrs( $div ); ?>> |
| public function ajax_add_term() { | ||
| // vars | ||
| $args = wp_parse_args( $_POST, array( | ||
| $args = wp_parse_args( $_POST, [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| $args = wp_parse_args( $_POST, [ | |
| $args = \wp_parse_args( $_POST, [ |
|
|
||
| ?> | ||
| <div <?php acf_esc_attr_e( $div ); ?>> | ||
| <div <?php echo acf_esc_attrs( $div ); ?>> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| <div <?php echo acf_esc_attrs( $div ); ?>> | |
| <div <?php echo \acf_esc_attrs( $div ); ?>> |
Nomafin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok
No description provided.