Allow general/default styling for smart buttons

This commit is contained in:
Narek Zakarian 2022-12-05 18:12:15 +04:00
parent 2205b1bc1e
commit 3398e46329
No known key found for this signature in database
GPG key ID: 07AFD7E7A9C164A7

View file

@ -1149,6 +1149,11 @@ class SmartButton implements SmartButtonInterface {
'tagline' => true, 'tagline' => true,
); );
$enable_styling_per_location = $this->settings->has( 'smart_button_enable_styling_per_location' ) && $this->settings->get( 'smart_button_enable_styling_per_location' );
if ( ! $enable_styling_per_location ) {
$context = 'general';
}
$value = isset( $defaults[ $style ] ) ? $value = isset( $defaults[ $style ] ) ?
$defaults[ $style ] : ''; $defaults[ $style ] : '';
$value = $this->settings->has( 'button_' . $style ) ? $value = $this->settings->has( 'button_' . $style ) ?