__( 'Apple', 'aa_elementor' ), 'behance' => __( 'Behance', 'aa_elementor' ), 'bitbucket' => __( 'BitBucket', 'aa_elementor' ), 'codepen' => __( 'CodePen', 'aa_elementor' ), 'delicious' => __( 'Delicious', 'aa_elementor' ), 'deviantart' => __( 'DeviantArt', 'aa_elementor' ), 'digg' => __( 'Digg', 'aa_elementor' ), 'dribbble' => __( 'Dribbble', 'aa_elementor' ), 'email' => __( 'Email', 'aa_elementor' ), 'facebook' => __( 'Facebook', 'aa_elementor' ), 'flickr' => __( 'Flicker', 'aa_elementor' ), 'foursquare' => __( 'FourSquare', 'aa_elementor' ), 'github' => __( 'Github', 'aa_elementor' ), 'houzz' => __( 'Houzz', 'aa_elementor' ), 'instagram' => __( 'Instagram', 'aa_elementor' ), 'jsfiddle' => __( 'JS Fiddle', 'aa_elementor' ), 'linkedin' => __( 'LinkedIn', 'aa_elementor' ), 'medium' => __( 'Medium', 'aa_elementor' ), 'pinterest' => __( 'Pinterest', 'aa_elementor' ), 'product-hunt' => __( 'Product Hunt', 'aa_elementor' ), 'reddit' => __( 'Reddit', 'aa_elementor' ), 'slideshare' => __( 'Slide Share', 'aa_elementor' ), 'snapchat' => __( 'Snapchat', 'aa_elementor' ), 'soundcloud' => __( 'SoundCloud', 'aa_elementor' ), 'spotify' => __( 'Spotify', 'aa_elementor' ), 'stack-overflow' => __( 'StackOverflow', 'aa_elementor' ), 'tripadvisor' => __( 'TripAdvisor', 'aa_elementor' ), 'tumblr' => __( 'Tumblr', 'aa_elementor' ), 'twitch' => __( 'Twitch', 'aa_elementor' ), 'twitter' => __( 'Twitter', 'aa_elementor' ), 'vimeo' => __( 'Vimeo', 'aa_elementor' ), 'vk' => __( 'VK', 'aa_elementor' ), 'website' => __( 'Website', 'aa_elementor' ), 'whatsapp' => __( 'WhatsApp', 'aa_elementor' ), 'wordpress' => __( 'WordPress', 'aa_elementor' ), 'xing' => __( 'Xing', 'aa_elementor' ), 'yelp' => __( 'Yelp', 'aa_elementor' ), 'youtube' => __( 'YouTube', 'aa_elementor' ), ]; } protected function _register_controls() { $terms = get_terms( array( 'taxonomy' => 'category', 'hide_empty' => false, ) ); $cat_names = array(); foreach( $terms as $t ): $cat_names[$t->term_id] = $t->name; endforeach; $this->start_controls_section( '_section_title', [ 'label' => __( 'Post Section', 'aa_elementor' ), 'tab' => Controls_Manager::TAB_CONTENT, ] ); $this->add_control( 'style', [ 'label' => __( 'Visual Style', 'aa_elementor' ), 'type' => Controls_Manager::SELECT, 'default' => 'style1', 'options' => [ 'style1' => __( 'Style 1', 'aa_elementor' ), 'style2' => __( 'Style 2', 'aa_elementor' ), 'style3' => __( 'Style 3', 'aa_elementor' ), ], ] ); $this->add_control( 'cat_name', [ 'label' => __( 'From Category', 'aa_elementor' ), 'type' => Controls_Manager::SELECT, 'default' => 'uncategorized', 'options' => $cat_names, ] ); $this->add_control( 'posts_limit', [ 'label' => esc_html__( 'Posts Limit', 'aa_elementor' ), 'type' => Controls_Manager::NUMBER, 'default' => 5, ] ); $this->add_control( 'custom_order', [ 'label' => esc_html__( 'Custom order', 'aa_elementor' ), 'type' => Controls_Manager::SWITCHER, 'return_value' => 'yes', 'default' => 'no', ] ); $this->add_control( 'postorder', [ 'label' => esc_html__( 'Order', 'aa_elementor' ), 'type' => Controls_Manager::SELECT, 'default' => 'DESC', 'options' => [ 'DESC' => esc_html__('Descending','aa_elementor'), 'ASC' => esc_html__('Ascending','aa_elementor'), ], 'condition' => [ 'custom_order!' => 'yes', ] ] ); $this->add_control( 'orderby', [ 'label' => esc_html__( 'Orderby', 'aa_elementor' ), 'type' => Controls_Manager::SELECT, 'default' => 'none', 'options' => [ 'none' => esc_html__('None','aa_elementor'), 'ID' => esc_html__('ID','aa_elementor'), 'date' => esc_html__('Date','aa_elementor'), 'name' => esc_html__('Name','aa_elementor'), 'title' => esc_html__('Title','aa_elementor'), 'comment_count' => esc_html__('Comment count','aa_elementor'), 'rand' => esc_html__('Random','aa_elementor'), ], 'condition' => [ 'custom_order' => 'yes', ] ] ); $this->add_control( 'show_date', [ 'label' => esc_html__( 'Date', 'aa_elementor' ), 'type' => Controls_Manager::SWITCHER, 'default' => 'yes', ] ); $this->add_control( 'show_author', [ 'label' => esc_html__( 'Author', 'aa_elementor' ), 'type' => Controls_Manager::SWITCHER, 'default' => 'yes', ] ); $this->add_control( 'show_comments', [ 'label' => esc_html__( 'Comments', 'aa_elementor' ), 'type' => Controls_Manager::SWITCHER, 'default' => 'yes', ] ); $this->end_controls_section(); $this->start_controls_section( '_section_style_common', [ 'label' => __( 'Post Content', 'aa_elementor' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_responsive_control( 'content_padding', [ 'label' => __( 'Content Padding', 'aa_elementor' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em', '%' ], 'selectors' => [ '{{WRAPPER}} .advanced_addons_blog_list_post' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->end_controls_section(); $this->start_controls_section( '_section_style_title', [ 'label' => __( 'Post Title', 'aa_elementor' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'title_typography', 'label' => __( 'Typography', 'aa_elementor' ), 'selector' => '{{WRAPPER}} .blog_title', 'scheme' => Scheme_Typography::TYPOGRAPHY_4, ] ); $this->add_responsive_control( 'title_spacing', [ 'label' => __( 'Title Bottom Spacing', 'aa_elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px'], 'selectors' => [ '{{WRAPPER}} .blog_title' => 'margin-bottom: {{SIZE}}{{UNIT}} !important;', ], ] ); $this->add_control( 'text_color', [ 'label' => __( 'Title Color', 'aa_elementor' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .blog_title' => 'color: {{VALUE}} !important', ], ] ); $this->end_controls_section(); $this->start_controls_section( '_section_style_meta', [ 'label' => __( 'Post Date and Comments', 'aa_elementor' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'post_meta_typography', 'label' => __( 'Typography', 'aa_elementor' ), 'selector' => '{{WRAPPER}} .advanced_addons_blog_list_post.type-1 .blog_heaed .post-date, .advanced_addons_blog_list_post.type-1 .blog_heaed .post-like, .advanced_addons_blog_list_post.type-1 .blog_heaed .post-comments-number', 'scheme' => Scheme_Typography::TYPOGRAPHY_4, ] ); $this->add_responsive_control( 'meta_spacing', [ 'label' => __( 'Post Date and Comments Spacing', 'aa_elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px'], 'selectors' => [ '{{WRAPPER}} .advanced_addons_blog_list_post.type-1 .blog_heaed .post-date, .advanced_addons_blog_list_post.type-1 .blog_heaed .post-like, .advanced_addons_blog_list_post.type-1 .blog_heaed .post-comments-number' => 'margin-bottom: {{SIZE}}{{UNIT}} !important;', ], ] ); $this->add_control( 'meta_color', [ 'label' => __( 'Post Date and Comments Color', 'aa_elementor' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .advanced_addons_blog_list_post.type-1 .blog_heaed .post-date, .advanced_addons_blog_list_post.type-1 .blog_heaed .post-like, .advanced_addons_blog_list_post.type-1 .blog_heaed .post-comments-number' => 'color: {{VALUE}} !important', ], ] ); $this->add_control( 'meta_icon_color', [ 'label' => __( 'Post Date and Comments Icon Color', 'aa_elementor' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .advanced_addons_blog_list_post.type-1 .blog_heaed .post-date i, .advanced_addons_blog_list_post.type-1 .blog_heaed .post-like i, .advanced_addons_blog_list_post.type-1 .blog_heaed .post-comments-number i' => 'color: {{VALUE}} !important', ], ] ); $this->end_controls_section(); $this->start_controls_section( '_section_style_aut', [ 'label' => __( 'Author', 'aa_elementor' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_control( 'aut_color', [ 'label' => __( 'Author Color', 'aa_elementor' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .advanced_addons_blog_list_post.type-1 .aa-media .aa-content-2' => 'color: {{VALUE}} !important', ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'post_auth', 'label' => __( 'Typography', 'aa_elementor' ), 'selector' => '{{WRAPPER}} .advanced_addons_blog_list_post.type-1 .aa-media .aa-content-2', 'scheme' => Scheme_Typography::TYPOGRAPHY_4, ] ); $this->end_controls_section(); $this->start_controls_section( '_section_style_desc', [ 'label' => __( 'Post Description', 'aa_elementor' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'post_desc_typography', 'label' => __( 'Typography', 'aa_elementor' ), 'selector' => '{{WRAPPER}} .blog_body p', 'scheme' => Scheme_Typography::TYPOGRAPHY_4, ] ); $this->add_responsive_control( 'desc_spacing', [ 'label' => __( 'Description Bottom Spacing', 'aa_elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px'], 'selectors' => [ '{{WRAPPER}} .blog_body' => 'margin-bottom: {{SIZE}}{{UNIT}} !important;', ], ] ); $this->add_control( 'desc_color', [ 'label' => __( 'Description Text Color', 'aa_elementor' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .blog_body p' => 'color: {{VALUE}} !important', ], ] ); $this->end_controls_section(); $this->start_controls_section( '_section_style_button', [ 'label' => __( 'Button', 'aa_elementor' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'post_footer_typography', 'label' => __( 'Typography', 'aa_elementor' ), 'selector' => '{{WRAPPER}} .read_more', 'scheme' => Scheme_Typography::TYPOGRAPHY_4, ] ); $this->add_responsive_control( 'button_spacing', [ 'label' => __( 'Button Bottom Spacing', 'aa_elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px'], 'selectors' => [ '{{WRAPPER}} .read_more' => 'margin-bottom: {{SIZE}}{{UNIT}} !important;', ], ] ); $this->add_control( 'button_color', [ 'label' => __( 'Button Text Color', 'aa_elementor' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .read_more' => 'color: {{VALUE}} !important', ], ] ); $this->add_control( 'dot_color', [ 'label' => __( 'Dot Color', 'aa_elementor' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .read_more_dots span' => 'background: {{VALUE}} !important', ], ] ); $this->end_controls_section(); } protected function render() { require AAE_PATH . '/modules/post-list/template/view.php'; } }