Add filters to enable more customization#188
Conversation
* Added `tgmpa_submenu_parent_slug` filter - modify what menu the sub-page is under, instead of requiring it under "Appearance". This allows the page to be added to a plugin's sub-menu.
* Added `tgmpa_table_columns` filter - modify table columns in table view
* Added `tgmpa_table_data_item` filter - modify plugin data that's ready for the table output
* Added `tgmpa_notice_rendered_action_links` filter - modify final action link output
I wanted to add a "Description" column that says why should an user install this plugin.
```
array(
'name' => 'WordPress SEO by Yoast',
'slug' => 'wordpress-seo',
'description' => 'This is a valuable SEO plugin.',
);
```
These filters allow much more flexibility in the setup.
|
Here's an example of how I'm doing adding a column. And here's what it looks like: |
|
I like the changes, but the biggest issue is changing Maybe it could be separated. Have the function name itself filtered, and then have the args themselves filtered as well. I'm pretty sure dynamic function names are cool in PHP 5.2 and greater, so I don't see why you couldn't do this as well. |
|
I was going to do What about a simple boolean check with |
* Removed `tgmpa_submenu_parent_slug` filter - now filtering all args * added `tgmpa_admin_menu_args` filter * added `tgmpa_admin_menu_use_add_theme_page` filter
|
I got rid of the |
|
@thomasgriffin have you had a chance to look at this? |
|
I'm down with this if you could just fix the spacing to match the rest of the class (for WPCS). |
Also merge in the `is_callable` commit.
|
I've updated the formatting to match. |
Add filters to enable more customization
|
Looks good - thanks! |
|
@zackkatz Just thought I'd let you know that I intend to deprecate the Let me know if you have any questions about this. |

tgmpa_submenu_parent_slugfilter - modify what menu the sub-page is under, instead of requiring it under "Appearance". This allows the page to be added to a plugin's sub-menu.tgmpa_table_columnsfilter - modify table columns in table viewtgmpa_table_data_itemfilter - modify plugin data that's ready for the table outputtgmpa_notice_rendered_action_linksfilter - modify final action link outputI wanted to add a "Description" column that says why should an user install this plugin.
These filters allow much more flexibility in the setup.