-
Notifications
You must be signed in to change notification settings - Fork 27
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
Operator added to the widget #27
base: master
Are you sure you want to change the base?
Conversation
The operator was added to the widget, now you can choose between add/in http://wordpress.org/support/topic/list-view-does-not-update-correctly
$this->selected_terms = explode( '+', $terms ); | ||
else | ||
$this->selected_terms = explode( ',', $terms ); | ||
|
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.
I'm not proud of these lines, since I think it can be written much better.
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.
So, what's stopping you? :)
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.
Sunny days and lot of work! :P, but I'll improve it :)
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.
Can't argue with sunny days. ☀️
Small fixes
The 'operator' field doesn't seem to have any effect in 'lists' mode. |
'IN' => __( 'Or', 'query-multiple-taxonomies' ) | ||
), | ||
'text' => false, | ||
'desc' => __( 'Operator:', 'query-multiple-taxonomies' ), |
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.
Operator:
seems vague; it should either be Operator between terms:
or Operator between taxonomies:
.
@scribu do you have any other comment about the code? |
Yes, I made a comment above:
|
oh sorry, didn't see that. Yes, you are right there, I'll try to improve that. |
I'm also wondering if it would be better to split the modes into separate widgets:
All 3 widget classes could inherit from a base class. |
Yes, that could work. I was trying to add something like that with jquery, but I'm having issues trying to get values. Can't find the issue. |
@@ -51,6 +52,17 @@ function add_script() { | |||
$(this).sortable(); | |||
$(this).disableSelection(); | |||
}); | |||
|
|||
$('#qmt_types').change(function(){ | |||
console.log($('#qmt_types').val()); |
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 shouldn't be part of the PR.
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.
Yes, I just uploaded this changes so you can check the code. But don't pay attention to that.
The operator was added to the widget, now you can choose between add/in
http://wordpress.org/support/topic/list-view-does-not-update-correctly