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

Two similar filters // may be needs refactoring #26

Closed
rinatkhaziev opened this issue Apr 30, 2012 · 8 comments
Closed

Two similar filters // may be needs refactoring #26

rinatkhaziev opened this issue Apr 30, 2012 · 8 comments
Assignees
Milestone

Comments

@rinatkhaziev
Copy link
Contributor

So we have acm_list_table_columns and acm_provider_columns. All the difference between them is that acm_list_table_columns return all table columns (e.g. id, name, priority, conditionals) and acm_provider_columns returns only ad network specific ones. May be we could use one filter and just skip service columns.

@danielbachhuber
Copy link
Contributor

Yep, I saw this as I was doing the final review and was somewhat confused as to the purpose of the second.

@rinatkhaziev
Copy link
Contributor Author

How about this?

https://gist.github.com/ed088bc8bd5a8a68cdee

If you have more elegant ideas I would be thrilled to hear 'em :)

@danielbachhuber
Copy link
Contributor

Bumping to v0.2.2

@rinatkhaziev
Copy link
Contributor Author

This is related to #34

@ghost ghost assigned jeremyfelt May 25, 2012
@danielbachhuber
Copy link
Contributor

Bumping to v0.2.3

@jeremyfelt
Copy link
Contributor

Is it necessary to have anything other than acm_list_table_columns? acm_provider_columns was only used in the provider definitions before, and only one provider can be used at a time, so it seems that it kind of works itself out.

Unless I'm missing something completely, which is entirely possible. :)

@rinatkhaziev
Copy link
Contributor Author

Well, given the nature of ad providers and that one platform could have many flavors, we need the ability to filter ad_code_args and then reflect it in WP_List_table columns. It would be nice to have one filter taking care of it, this might need some love: https://github.com/Automattic/Ad-Code-Manager/blob/develop/common/lib/acm-wp-list-table.php#L26

Make sense?

@danielbachhuber
Copy link
Contributor

I think my vote is to keep two filters, but have the values for 'acm_list_table_columns' based on 'acm_provider_columns' unless you explicitly decide to change which columns show. 'acm_provider_columns' could be better named though.

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

No branches or pull requests

3 participants