esc_html__( 'A simple call to action widget.', 'business-way-lite' ), ), array(), false, plugin_dir_path( __FILE__ ) ); } /** * Get widget form. * * @since 1.0.0 * * @return array Widget form. */ function get_widget_form() { return array( 'title' => array( 'type' => 'text', 'label' => esc_html__( 'Title', 'business-way-lite' ), ), 'subtitle' => array( 'type' => 'text', 'label' => esc_html__( 'Subtitle', 'business-way-lite' ), ), 'primary_button_text' => array( 'type' => 'text', 'label' => esc_html__( 'Primary Button Text', 'business-way-lite' ), 'default' => esc_html__( 'Learn More', 'business-way-lite' ), ), 'primary_button_url' => array( 'type' => 'link', 'label' => esc_html__( 'Primary Button URL', 'business-way-lite' ), 'default' => '#', ), 'secondary_button_text' => array( 'type' => 'text', 'label' => esc_html__( 'Secondary Button Text', 'business-way-lite' ), ), 'secondary_button_url' => array( 'type' => 'link', 'label' => esc_html__( 'Secondary Button URL', 'business-way-lite' ), ), 'settings' => array( 'type' => 'section', 'label' => esc_html__( 'Settings', 'business-way-lite' ), 'hide' => false, 'fields' => array( 'cta_layout' => array( 'type' => 'radio', 'label' => esc_html__( 'Select Layout', 'business-way-lite' ), 'default' => 1, 'options' => array( 1 => esc_html__( 'Layout 1', 'business-way-lite' ), 2 => esc_html__( 'Layout 2', 'business-way-lite' ), 3 => esc_html__( 'Layout 3', 'business-way-lite' ), ), ), 'cta_title_color' => array( 'type' => 'color', 'label' => esc_html__( 'Title Color', 'business-way-lite' ), 'default' => '#FFF', ), 'cta_subtitle_color' => array( 'type' => 'color', 'label' => esc_html__( 'Subtitle Color', 'business-way-lite' ), 'default' => '#CCC', ), 'cta_background_color' => array( 'type' => 'color', 'label' => esc_html__( 'Background Color', 'business-way-lite' ), 'default' => '#00AEF0', 'description' => esc_html__( 'Applies to Layout 1 and Layout 2 only.', 'business-way-lite' ), ), ), ), ); } /** * Less variables. * * @since 1.0.0 * * @param array $instance Widget instance. * @return array Less variables. */ function get_less_variables( $instance ) { if ( empty( $instance ) ) { return array(); } return array( 'cta_title_color' => $instance['settings']['cta_title_color'], 'cta_subtitle_color' => $instance['settings']['cta_subtitle_color'], 'cta_background_color' => $instance['settings']['cta_background_color'], ); } } siteorigin_widget_register( 'business-way-cta', __FILE__, 'Business_Way_CTA_Widget' );