advokatb
New Member
Hi.
I have Controls_Manager :: SELECT, which "switches" block design presets.
It looks like:
The value is passed in $ params ['style']
and thus switching presets.
For example, for Style 1 we set the blue background, then switch to Style 2.
The background of the block remains blue. How to reset it to default when switching "presets"?
Thinking it can be done with Skin_Base but I can't find any examples that can help to implement this.
I have Controls_Manager :: SELECT, which "switches" block design presets.
It looks like:
Code:
'options' => [
'1' => __( 'Style 1', 'plugin' ),'2' => __( 'Style 2', 'plugin' ),'3' => __( 'Style 3', 'plugin' ),'6' => __( 'Style 6', 'plugin' ),],
The value is passed in $ params ['style']
include( plugin_dir_path( __FILE__ ) . '../templates/content-style-'.$params['style'].'.php' );
and thus switching presets.
For example, for Style 1 we set the blue background, then switch to Style 2.
The background of the block remains blue. How to reset it to default when switching "presets"?
Thinking it can be done with Skin_Base but I can't find any examples that can help to implement this.