D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
homehopshortterm
/
www
/
wp-content
/
plugins
/
pixwell-core
/
elementor
/
Filename :
fw-feat-14.php
back
Copy
<?php namespace PixwellElementorElement\Widgets; use Elementor\Widget_Base; use Elementor\Controls_Manager; defined( 'ABSPATH' ) || exit; class Fw_Feat_14 extends Widget_Base { public function get_name() { return 'fw-feat-14'; } public function get_title() { return esc_html__( 'Pixwell - Deal Slider (Boxed)', 'pixwell-core' ); } public function get_icon() { return 'eicon-thumbnails-half'; } public function get_categories() { return [ 'pixwell-fw' ]; } protected function register_controls() { $this->start_controls_section( 'query_filters', [ 'label' => esc_html__( 'Query Settings', 'pixwell-core' ), 'tab' => Controls_Manager::TAB_CONTENT, ] ); $this->add_control( 'category', [ 'label' => esc_html__( 'Category Filter', 'pixwell-core' ), 'type' => Controls_Manager::SELECT, 'description' => esc_html__( 'Filter posts by a category.', 'pixwell-core' ), 'options' => \PixwellElementorControl\Options::cat_dropdown(), 'default' => '0', ] ); $this->add_control( 'categories', [ 'label' => esc_html__( 'Categories Filter', 'pixwell-core' ), 'type' => Controls_Manager::TEXT, 'ai' => [ 'active' => false ], 'description' => esc_html__( 'Filter posts by multiple category IDs, separated category IDs by commas (for example: 1,2,3).', 'pixwell-core' ), 'default' => '', ] ); $this->add_control( 'tags', [ 'label' => esc_html__( 'Tags Slug Filter', 'pixwell-core' ), 'type' => Controls_Manager::TEXT, 'ai' => [ 'active' => false ], 'description' => esc_html__( 'Filter posts by tags slug, separated by commas (for example: tagslug1,tagslug2,tagslug3).', 'pixwell-core' ), 'default' => '', ] ); $this->add_control( 'tag_not_in', [ 'label' => esc_html__( 'Exclude Tags Slug', 'pixwell-core' ), 'type' => Controls_Manager::TEXT, 'ai' => [ 'active' => false ], 'description' => esc_html__( 'Filter posts by tag slugs, separated by commas (for example: tagslug1,tagslug2,tagslug3).', 'pixwell-core' ), 'default' => '', ] ); $this->add_control( 'format', [ 'label' => esc_html__( 'Post Format', 'pixwell-core' ), 'type' => Controls_Manager::SELECT, 'description' => esc_html__( 'Filter posts by post format.', 'pixwell-core' ), 'options' => \PixwellElementorControl\Options::format_dropdown(), 'default' => '0', ] ); $this->add_control( 'author', [ 'label' => esc_html__( 'Author Filter', 'pixwell-core' ), 'type' => Controls_Manager::SELECT, 'description' => esc_html__( 'Filter posts by the author.', 'pixwell-core' ), 'options' => \PixwellElementorControl\Options::author_dropdown(), 'default' => '0', ] ); $this->add_control( 'post_not_in', [ 'label' => esc_html__( 'Exclude Post IDs', 'pixwell-core' ), 'type' => Controls_Manager::TEXT, 'ai' => [ 'active' => false ], 'description' => esc_html__( 'Exclude some post IDs from this block, separated by commas (for example: 1,2,3).', 'pixwell-core' ), 'default' => '', ] ); $this->add_control( 'post_in', [ 'label' => esc_html__( 'Post IDs Filter', 'pixwell-core' ), 'type' => Controls_Manager::TEXT, 'ai' => [ 'active' => false ], 'description' => esc_html__( 'Filter posts by post IDs. separated by commas (for example: 1,2,3).', 'pixwell-core' ), 'default' => '', ] ); $this->add_control( 'order', [ 'label' => esc_html__( 'Sort Order', 'pixwell-core' ), 'type' => Controls_Manager::SELECT, 'description' => esc_html__( 'Select sort order type for this block.', 'pixwell-core' ), 'options' => \PixwellElementorControl\Options::order_dropdown(), 'default' => 'date_post', ] ); $this->add_control( 'offset', [ 'label' => esc_html__( 'Post Offset', 'pixwell-core' ), 'type' => Controls_Manager::NUMBER, 'description' => esc_html__( 'Select number of posts to pass over. Leave blank or set 0 if you want to show at the beginning.', 'pixwell-core' ), 'default' => '', ] ); $this->add_control( 'posts_per_page', [ 'label' => esc_html__( 'Posts per Page', 'pixwell-core' ), 'type' => Controls_Manager::NUMBER, 'description' => esc_html__( 'Input number of posts per page. Maximum value is 6.', 'pixwell-core' ), 'default' => '4', ] ); $this->end_controls_section(); $this->start_controls_section( 'section_title', [ 'label' => esc_html__( 'Block Header', 'pixwell-core' ), 'tab' => Controls_Manager::TAB_CONTENT, ] ); $this->add_control( 'title', [ 'label' => esc_html__( 'Block Title', 'pixwell-core' ), 'type' => Controls_Manager::TEXT, 'ai' => [ 'active' => false ], 'description' => esc_html__( 'Input a block heading. Leave blank to disable the block header.', 'pixwell-core' ), 'default' => '', ] ); $this->add_control( 'viewmore_link', [ 'label' => esc_html__( 'View More URL', 'pixwell-core' ), 'type' => Controls_Manager::TEXT, 'ai' => [ 'active' => false ], 'description' => esc_html__( 'Input a custom destination link for the block header.', 'pixwell-core' ), 'default' => '', ] ); $this->add_control( 'viewmore_title', [ 'label' => esc_html__( 'View More Label', 'pixwell-core' ), 'type' => Controls_Manager::TEXT, 'ai' => [ 'active' => false ], 'description' => esc_html__( 'Input a block tagline.', 'pixwell-core' ), 'default' => '', ] ); $this->end_controls_section(); $this->start_controls_section( 'featured_image_section', [ 'label' => esc_html__( 'Featured Image', 'pixwell-core' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_responsive_control( 'display_ratio', [ 'label' => esc_html__( 'Custom Featured Ratio', 'pixwell-core' ), 'type' => Controls_Manager::NUMBER, 'description' => esc_html__( 'Input a custom ratio percent (height*100/width) for the featured image.', 'pixwell-core' ), 'selectors' => [ '{{WRAPPER}} .rb-iwrap' => 'padding-bottom: {{VALUE}}%', ], ] ); $this->end_controls_section(); $this->start_controls_section( 'entry_title_section', [ 'label' => esc_html__( 'Post Title', 'pixwell-core' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_control( 'h_tag', [ 'label' => esc_html__( 'Title HTML Tag', 'pixwell-core' ), 'type' => Controls_Manager::SELECT, 'description' => esc_html__( 'Select a HTML tag for the post title.', 'pixwell-core' ), 'options' => \PixwellElementorControl\Options::heading_html_dropdown(), 'default' => '0', ] ); $this->add_responsive_control( 'title_tag_size', [ 'label' => esc_html__( 'Title Font Size', 'pixwell-core' ), 'type' => Controls_Manager::NUMBER, 'description' => esc_html__( 'Input custom font size values (px) for the post title for displaying in this block.', 'pixwell-core' ), 'devices' => [ 'desktop', 'tablet', 'mobile' ], 'selectors' => [ '{{WRAPPER}} .entry-title' => 'font-size: {{VALUE}}px;' ], ] ); $this->add_group_control( \Elementor\Group_Control_Typography::get_type(), [ 'label' => esc_html__( 'Custom Post Title Font', 'pixwell-core' ), 'name' => 'title_font', 'selector' => '{{WRAPPER}} .entry-title', ] ); $this->end_controls_section(); $this->start_controls_section( 'block_design', [ 'label' => esc_html__( 'Bookmark', 'pixwell-core' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_control( 'bookmark', [ 'label' => esc_html__( 'Bookmark Icon', 'pixwell-core' ), 'type' => Controls_Manager::SELECT, 'description' => esc_html__( 'Enable or disable the bookmark icon. This setting is required to enable at least one entry meta functionality.', 'pixwell-core' ), 'options' => \PixwellElementorControl\Options::switch_dropdown(), 'default' => '0', ] ); $this->end_controls_section(); $this->start_controls_section( 'bg_ct_section', [ 'label' => esc_html__( 'Content Background', 'pixwell-core' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_control( 'bg_content', [ 'label' => esc_html__( 'Content Background', 'pixwell-core' ), 'type' => Controls_Manager::COLOR, 'description' => esc_html__( 'Select content background for this post, Default is #f2f2f2.', 'pixwell-core' ), 'selectors' => [ '{{WRAPPER}} .p-list-6' => 'background-color: {{VALUE}};' ], ] ); $this->end_controls_section(); $this->start_controls_section( 'color_section', [ 'label' => esc_html__( 'Text Color Scheme', 'pixwell-core' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_control( 'text_style', [ 'label' => esc_html__( 'Text Style', 'pixwell-core' ), 'type' => Controls_Manager::SELECT, 'description' => esc_html__( 'Select a text color scheme for the block.', 'pixwell-core' ), 'options' => \PixwellElementorControl\Options::textstyle_dropdown(), 'default' => '0', ] ); $this->end_controls_section(); } /** render */ protected function render() { if ( function_exists( 'pixwell_rbc_fw_feat_14' ) ) { $settings = $this->get_settings(); $settings['uuid'] = 'uid_' . $this->get_id(); echo \pixwell_rbc_fw_feat_14( $settings ); } } }