芝麻web文件管理V1.00
编辑当前文件:/home/seolotod/critterchoice.com/wp-content/themes/rehub-theme/rehub-elementor/wpsm-news-ticker.php
start_controls_section( 'general_section', [ 'label' => esc_html__( 'General', 'rehub-theme' ), 'tab' => \Elementor\Controls_Manager::TAB_CONTENT, ]); $this->add_control( 'label', [ 'type' => \Elementor\Controls_Manager::TEXT, 'label' => esc_html__( 'Label', 'rehub-theme' ), 'description' => esc_html__('Label before news ticker', 'rehub-theme'), 'label_block' => true, 'default' => 'Latest News', ]); $this->add_control( 'catname', [ 'type' => \Elementor\Controls_Manager::TEXT, 'label' => esc_html__( 'Category name', 'rehub-theme' ), 'description' => esc_html__('Category name to show in ticker', 'rehub-theme'), ]); $this->add_control( 'catslug', [ 'type' => \Elementor\Controls_Manager::TEXT, 'label' => esc_html__( 'Category taxonomy', 'rehub-theme' ), 'description' => esc_html__('Category taxonomy name. Leave blank if you need Post category. For post tags - set as post_tag', 'rehub-theme'), 'default' => 'category', ]); $this->add_control( 'fetch', [ 'type' => \Elementor\Controls_Manager::TEXT, 'label' => esc_html__( 'Number of posts to show', 'rehub-theme' ), 'description' => esc_html__('Default is 5', 'rehub-theme'), 'default' => '5', ]); $this->end_controls_section(); } /* Widget output Rendering */ protected function render() { $settings = $this->get_settings_for_display(); echo wpsm_news_ticker_shortcode( $settings ); } } Plugin::instance()->widgets_manager->register( new WPSM_News_Ticker_Widget );