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

Add callback for list views #15

Open
tradesouthwest opened this issue Aug 29, 2020 · 0 comments
Open

Add callback for list views #15

tradesouthwest opened this issue Aug 29, 2020 · 0 comments

Comments

@tradesouthwest
Copy link

I am attempting to add a list tree-view of (woocommerce) categories from a terms list. The wp-osa looks promising and I have not spent much time sorting through it, although it looks pretty straightforward.

Not so much an issue as a feature request or a better way to implement feature

I am trying to add a custom callback for a settings_field which does not exists. Maybe adding a field that would hook into a function that is created inside the plugin-name-admin-display file and then have a method in the wp-osa class to callout a clean sanitized function.

Right now, as a bandaid, I created a settings type argument called list. Then set the $value parameter to equal the function in my --admin-display (HTML) file.

https://pastebin.com/faygQp6Y

`function callback_list( $args ) {

$value = catcheck_admin_listcats_callback();

$html = sprintf( '<h4>%1$s</h4>
				<div id="%2$s[%3$s]" name="%2$s[%3$s]">%4$s</div>', 
				$args['desc'], 
				$args['section'], 
				$args['id'], 				
				$value
				);
//$html .= $this->get_field_description( $args );

echo $html;

}`

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

1 participant