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

Fixed wrong title and icon for login widget #385

Merged
merged 1 commit into from
Jan 31, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions lib/WP_Auth0_Lock10_Options.php
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,7 @@ public function get_lock_options() {
$extraOptions["auth"]["redirectUrl"] = $this->get_code_callback_url();
}

$options_obj = array_merge_recursive( $extraOptions, $options_obj );
$options_obj = array_merge_recursive( $options_obj , $extended_settings );
$options_obj = array_replace_recursive( $extraOptions, $options_obj, $extended_settings );
Copy link
Member

Choose a reason for hiding this comment

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

So what is the logic here for duplicate entries. extraOptions are over ridden by options_obj but this can then be over ridden by extended_settings?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@cocojoe - Correct.

Copy link
Member

Choose a reason for hiding this comment

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

the naming seems odd. However, it is the same order as the original so fair enough


if ( ! $this->show_as_modal() ) {
$options_obj['container'] = 'auth0-login-form';
Expand Down
3 changes: 1 addition & 2 deletions lib/WP_Auth0_Lock_Options.php
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,7 @@ public function get_lock_options() {
$extraOptions["callbackURL"] = $this->get_code_callback_url();
}

$options_obj = array_merge( $extraOptions, $options_obj );
$options_obj = array_merge( $options_obj , $extended_settings );
$options_obj = array_merge( $extraOptions, $options_obj, $extended_settings );
Copy link
Member

Choose a reason for hiding this comment

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

In the previous snippet you change merge to replace why does this one stay as merge?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@cocojoe - Array dimensions, recursive vs. not recursive. array_merge_recursive can create arrays out of strings, whereas array_replace_recursive overrides. array_merge also overrides but it only goes 1 level deep. Looks like the options arrays are built differently.


if ( ! $this->show_as_modal() ) {
$options_obj['container'] = 'auth0-login-form';
Expand Down