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

Bump Minimum Version Requirements and Initialize Variables #108

Merged
merged 3 commits into from
Jan 19, 2018

Conversation

dshanske
Copy link
Member

This should address #105 and #97 in regards to the initialization of variables and ensuring that the WordPress features in the plugin align with the minimum version they were implemented in.

Copy link
Member

@snarfed snarfed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks! merging.

@@ -254,12 +254,12 @@ public static function user_url( $me ) {
*/
public static function post_handler( $user_id ) {
$status = 200;
$action = static::$input['action'];
$url = static::$input['url'];
$action = isset( static::$input['action'] ) ? static::$input['action'] : 'create';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we have so many of these, i wonder if we should start using something like the get() helper here: http://heap.ch/blog/2015/12/19/php-default-values/#convenience . not necessary for this PR, just an idea. thoughts?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a similar function I created in most of my plugins called ifset that looks pretty much the same.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, nice i'm all for adding it here and using it everywhere! (and i like get better than isset, since it returns a value and not a boolean...but that's a bikeshed. :P)

also, ooh, php 7 added an ?? operator for this! https://wiki.php.net/rfc/isset_ternary . nice to know.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WordPress will hopefully get there before I retire.

@snarfed snarfed merged commit 9ba1acf into indieweb:master Jan 19, 2018
@dshanske dshanske deleted the isset branch July 25, 2020 04:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants