parent = $widget; } public function register_style_controls() { $this->start_controls_section( 'general_style', [ 'label' => __( 'General', 'wts-eae' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_control( 'progress_color', [ 'label' => __( 'Progress Color', 'wts-eae' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .eae-pb-bar-inner' => 'background-color: {{VALUE}};', ], ] ); $this->add_control( 'progress_bg_color', [ 'label' => __( 'Background Color', 'wts-eae' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .eae-pb-bar' => 'background-color: {{VALUE}};', ], ] ); $this->end_controls_section(); $this->start_controls_section( 'pb_title_style', [ 'label' => __( 'Title', 'wts-eae' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_control( 'title_color', [ 'label' => __( 'Color', 'wts-eae' ), 'type' => Controls_Manager::COLOR, 'scheme' => [ 'type' => Scheme_Color::get_type(), 'value' => Scheme_Color::COLOR_2, ], 'selectors' => [ '{{WRAPPER}} .eae-pb-bar-skill' => 'color: {{VALUE}};', ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'title_typography', 'selector' => '{{WRAPPER}} .eae-pb-bar-skill', 'scheme' => Scheme_Typography::TYPOGRAPHY_2, ] ); $this->end_controls_section(); $this->start_controls_section( 'pb_value_style', [ 'label' => __( 'Percentage', 'wts-eae' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_control( 'value_color', [ 'label' => __( 'Color', 'wts-eae' ), 'type' => Controls_Manager::COLOR, 'scheme' => [ 'type' => Scheme_Color::get_type(), 'value' => Scheme_Color::COLOR_2, ], 'selectors' => [ '{{WRAPPER}} .eae-pb-bar-value' => 'color: {{VALUE}};', ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'value_typography', 'selector' => '{{WRAPPER}} .eae-pb-bar-value', 'scheme' => Scheme_Typography::TYPOGRAPHY_2, ] ); $this->end_controls_section(); } function common_render() { $settings = $this->parent->get_settings_for_display(); //echo '
';print_r( $settings );echo '
'; $this->parent->add_render_attribute( 'wrapper_class', 'class', 'eae-progress-bar-wrapper' ); $this->parent->add_render_attribute( 'wrapper_class', 'class', 'eae-progress-bar'); $this->parent->add_render_attribute( 'wrapper_class', 'class', 'eae-progress-bar-' . $settings['_skin'] ); $this->parent->add_render_attribute( 'wrapper_class', 'data-skin', $settings['_skin'] ); $this->parent->add_render_attribute( 'wrapper_class', 'data-skill', $settings['progress_title'] ); $this->parent->add_render_attribute( 'wrapper_class', 'data-value', $settings['progress_value']['size'] ); $this->parent->add_render_attribute( 'pb_val_class', 'class', 'eae-pb-bar-value' ); $this->parent->add_render_attribute( 'pb_val_class', 'class', 'eae-pb-bar-value-' . $settings['_skin'] ); $this->parent->add_render_attribute( 'pb_val_class', 'class', 'eae-pb-bar-value--aligned-value' ); //$this->parent->add_render_attribute( 'pb_val_class', 'class', 'js-animated' ); $this->parent->add_render_attribute( 'pb_bar_class', 'class', 'eae-pb-bar' ); $this->parent->add_render_attribute( 'pb_bar_class', 'class', 'eae-pb-bar-'. $settings['_skin'] ); $this->parent->add_render_attribute( 'pb_bar_inner_class', 'class', 'eae-pb-bar-inner' ); $this->parent->add_render_attribute( 'pb_bar_inner_class', 'class', 'eae-pb-bar-inner-'. $settings['_skin'] ); //$this->parent->add_render_attribute( 'pb_bar_inner_class', 'class', 'js-animated' ); $this->parent->add_render_attribute( 'pb_title_class', 'class', 'eae-pb-bar-skill' ); $this->parent->add_render_attribute( 'pb_title_class', 'class', 'eae-pb-bar-skill-'. $settings['_skin'] ); //$this->parent->add_render_attribute( 'pb_title_class', 'class', 'js-animated' ); ?>
parent->get_render_attribute_string( 'wrapper_class' ); ?>> parent->get_render_attribute_string( 'pb_val_class' ); ?>>
parent->get_render_attribute_string( 'pb_bar_class' ); ?>>
parent->get_render_attribute_string( 'pb_bar_inner_class' ); ?>>
parent->get_render_attribute_string( 'pb_title_class' ); ?>>