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 filter to allow easier definition of widget background style options #1835

Open
benlk opened this issue Nov 14, 2019 · 0 comments
Open
Labels
category: feature add New/added features priority: normal Must be completed before release of this version of plugin. type: feature request

Comments

@benlk
Copy link
Collaborator

benlk commented Nov 14, 2019

https://github.com/INN/largo/blob/512da701664b329f2f92244bbe54880a6e146431/inc/widgets.php#L144-L146

The new version would look something like:

$options = array(
  	'default' => __( 'Default', 'largo' ),
  	...
);
/* docblock comment goes here */
$options = apply_filter( "largo_widget_background_options", $options );
foreach ( $options as $class => $value ) {
  	?>
  	<option <?php selected( $instance['widget_class'], $class ); ?> value="<?php echo esc_attr( $class ); ?>"><?php esc_html_e( $value ); ?></option>
  	<?php
}

This will make client work like INN/umbrella-citylimits#77 easier.

@benlk benlk added priority: normal Must be completed before release of this version of plugin. type: feature request category: feature add New/added features labels Nov 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: feature add New/added features priority: normal Must be completed before release of this version of plugin. type: feature request
Projects
None yet
Development

No branches or pull requests

1 participant