Skip to content
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

Fix deprecated statement, simplify code #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zackkatz
Copy link

Deprecated statement

See threads about deprecated code here:

https://wordpress.org/support/topic/deprecated-feature/
https://wordpress.org/support/topic/update-pluggin-deprecated-coce/

Deprecated: Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in […]/plugins/admin-bar-user-switching/functions/abus-core-functions.php on line 14

Simplify code

The code WordPress uses in WP_List_Table::pagination() is:

$current_url = set_url_scheme( 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );

I'd prefer to just use add_query_arg( array() ); but don't know the back-story of why the code currently is how it is.

### Deprecated statement

See threads about deprecated code here: 

https://wordpress.org/support/topic/deprecated-feature/
https://wordpress.org/support/topic/update-pluggin-deprecated-coce/

```
Deprecated: Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in […]/plugins/admin-bar-user-switching/functions/abus-core-functions.php on line 14
```

### Simplify code

The code WordPress uses in `WP_List_Table::pagination()` is:

```
$current_url = set_url_scheme( 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
```

I'd prefer to just use `add_query_arg( array() );` but don't know the back-story of why the code currently is how it is.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant