register_content_copy_right_controls(); } /** * Register Copyright General Controls. * * @since 1.2.0 * @access protected */ protected function register_content_copy_right_controls() { $this->start_controls_section( 'section_title', [ 'label' => __( 'Copyright', 'header-footer-elementor' ), ] ); $this->add_control( 'shortcode', [ 'label' => __( 'Copyright Text', 'header-footer-elementor' ), 'type' => Controls_Manager::TEXTAREA, 'dynamic' => [ 'active' => true, ], 'default' => __( 'Copyright © [hfe_current_year] [hfe_site_title] | Powered by [hfe_site_title]', 'header-footer-elementor' ), ] ); $this->add_control( 'link', [ 'label' => __( 'Link', 'header-footer-elementor' ), 'type' => Controls_Manager::URL, 'placeholder' => __( 'https://your-link.com', 'header-footer-elementor' ), ] ); $this->add_responsive_control( 'align', [ 'label' => __( 'Alignment', 'header-footer-elementor' ), 'type' => Controls_Manager::CHOOSE, 'options' => [ 'left' => [ 'title' => __( 'Left', 'header-footer-elementor' ), 'icon' => 'fa fa-align-left', ], 'center' => [ 'title' => __( 'Center', 'header-footer-elementor' ), 'icon' => 'fa fa-align-center', ], 'right' => [ 'title' => __( 'Right', 'header-footer-elementor' ), 'icon' => 'fa fa-align-right', ], ], 'selectors' => [ '{{WRAPPER}} .hfe-copyright-wrapper' => 'text-align: {{VALUE}};', ], 'frontend_available' => true, ] ); $this->add_control( 'title_color', [ 'label' => __( 'Text Color', 'header-footer-elementor' ), 'type' => Controls_Manager::COLOR, 'global' => [ 'default' => Global_Colors::COLOR_TEXT, ], 'selectors' => [ // Stronger selector to avoid section style from overwriting. '{{WRAPPER}} .hfe-copyright-wrapper a, {{WRAPPER}} .hfe-copyright-wrapper' => 'color: {{VALUE}};', ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'caption_typography', 'selector' => '{{WRAPPER}} .hfe-copyright-wrapper, {{WRAPPER}} .hfe-copyright-wrapper a', 'global' => [ 'default' => Global_Typography::TYPOGRAPHY_TEXT, ], ] ); } /** * Render Copyright output on the frontend. * * Written in PHP and used to generate the final HTML. * * @since 1.2.0 * @access protected */ protected function render() { $settings = $this->get_settings_for_display(); $link = isset( $settings['link']['url'] ) ? $settings['link']['url'] : ''; if ( ! empty( $link ) ) { $this->add_link_attributes( 'link', $settings['link'] ); } $copy_right_shortcode = do_shortcode( shortcode_unautop( $settings['shortcode'] ) ); ?> get_settings( 'shortcode' ) ); } /** * Render shortcode widget output in the editor. * * Written as a Backbone JavaScript template and used to generate the live preview. * * @since 1.3.0 * @access protected */ protected function content_template() {} }