start_controls_section(
‘content_section’,
[
‘label’ => esc_html__( ‘Settings’, ‘angie-snippets’ ),
‘tab’ => \Elementor\Controls_Manager::TAB_CONTENT,
]
);
$this->add_control(
‘login_text’,
[
‘label’ => esc_html__( ‘Login Button Text’, ‘angie-snippets’ ),
‘type’ => \Elementor\Controls_Manager::TEXT,
‘default’ => esc_html__( ‘Sign In’, ‘angie-snippets’ ),
]
);
$this->end_controls_section();
$this->start_controls_section(
‘style_section’,
[
‘label’ => esc_html__( ‘Button & Menu Style’, ‘angie-snippets’ ),
‘tab’ => \Elementor\Controls_Manager::TAB_STYLE,
]
);
$this->add_control(
‘btn_color’,
[
‘label’ => esc_html__( ‘Button Text Color’, ‘angie-snippets’ ),
‘type’ => \Elementor\Controls_Manager::COLOR,
‘selectors’ => [
‘{{WRAPPER}} .lp-8beb6d74-btn’ => ‘color: {{VALUE}};’,
],
]
);
$this->add_control(
‘btn_bg’,
[
‘label’ => esc_html__( ‘Button Background’, ‘angie-snippets’ ),
‘type’ => \Elementor\Controls_Manager::COLOR,
‘selectors’ => [
‘{{WRAPPER}} .lp-8beb6d74-btn’ => ‘background-color: {{VALUE}};’,
],
]
);
$this->end_controls_section();
}
protected function render() {
$settings = $this->get_settings_for_display();
if ( is_user_logged_in() ) {
$current_user = wp_get_current_user();
$avatar_url = get_avatar_url( $current_user->ID, [ ‘size’ => 64 ] );
?>