'.__( 'ARPrice Lite', 'ARPricelite').'
'; } public function get_icon() { return 'arpricelite_element_icon'; } public function get_categories() { return [ 'general' ]; } public function get_script_depends() { return [ 'elementor-arpricelite-element-shortcode' ]; } protected function _register_controls() { global $arprice_class, $wpdb; $tables = $wpdb->get_results($wpdb->prepare("SELECT ID, table_name FROM " . $wpdb->prefix . "arplite_arprice WHERE status = '%s' and is_template != '%d'", array('published', '1'))); $price_tabel=array(); $price_tabel['Please select table']='Please select table'; if($tables){ foreach ($tables as $table) { $price_tabel['[ARPLite id='.$table->ID.']']=$table->table_name . ' (ID:'.$table->ID.')'; } } $this->start_controls_section( 'section_content', array( 'label' => __( 'ARPrice Lite Shortcode', 'ARPricelite'), ) ); $this->add_control( 'title', array( 'label' => __( 'Title:', 'ARPricelite'), 'type' => Controls_Manager::TEXT, 'label_block' => true, ) ); $this->add_control( 'arp_select', array( 'label' => __( 'Table:', 'ARPricelite'), 'type' => Controls_Manager::SELECT, 'default' => 'Please select table', 'options' => $price_tabel, 'label_block' => true, ) ); $this->end_controls_section(); } protected function render() { $settings = $this->get_settings_for_display(); echo '