403Webshell
Server IP : 89.108.64.180  /  Your IP : 216.73.217.92
Web Server : Apache/2.4.41 (Ubuntu)
System : Linux 89-108-64-180.cloudvps.regruhosting.ru 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User : www-root ( 1010)
PHP Version : 8.0.30
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /var/www/www-root/data/www/imperial28.ru/wp-content/plugins/seoplugins/includes/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/www-root/data/www/imperial28.ru/wp-content/plugins/seoplugins/includes/tooltip.php
<?php
if(!defined('LINK_PREVIEW')) return;


$linkpreview_settings = linkpreview_get_settings();
if ($linkpreview_settings["linkpreview_tooltip_enable"] !== 'on') return;

$js = $linkpreview_settings["linkpreview_javascript"];
add_action('wp_head','linkpreview_js_'.$js);

/*
 * Search for links in post content
 */
function scan_linkpreview($content){
	if (!isset($content) || $content == '') return;
	$linkpreview_settings = linkpreview_get_settings();
	$linkPreview = new linkPreview();
	$content = mb_convert_encoding($content, 'HTML-ENTITIES', "UTF-8");
	$document = new DOMDocument();
	libxml_use_internal_errors(true);
	$document->loadHTML(utf8_decode($content));
	$links = $document->getElementsByTagName('a');
	$i = 1;
	foreach ($links as $link) {
		$link_href = $link->getAttribute('href');
		if (strlen($link_href) > $linkpreview_settings['linkpreview_max_url_size']) continue;
		if ($linkPreview->is_file($link_href)) continue;
		$class = $link->getAttribute('class');
		if ($linkPreview->is_class($class)) continue;
		$link->setAttribute('data-link', "$link_href");
		$link->removeAttribute('title');
		$link->setAttribute('data-button', "LinkPreview");
		$link->setAttribute('id', $i);
		$i++;
	}
	$html = $document->saveHTML();
	$html = html_entity_decode($html);
	return $html;
}
add_filter('the_content', 'scan_linkpreview');

/*
 * Tooltip content
 */
function linkpreview_callback() {
	$linkPreview = new linkPreview();
	$link = $_POST['link'];
	$data = $linkPreview->get_url_data($link);
	if ($data == false) $data->description = __('broken url','linkpreview');
	else include(LINKPREVIEW_TOOLTIP);
	wp_die();
}
add_action( 'wp_ajax_linkpreview', 'linkpreview_callback' );
add_action( 'wp_ajax_nopriv_linkpreview', 'linkpreview_callback' );

/*
 * jQuery UI Tooltip
 */
function linkpreview_js_jquery_ui_tooltip() {
	wp_enqueue_style('jquery-ui-tooltip', LINKPREVIEW_URL.'/css/jquery-ui.min.css' );
	wp_enqueue_style('jquery-ui-tooltip-theme', LINKPREVIEW_URL.'/css/jquery-ui.theme.min.css' );
	wp_enqueue_script("jquery");
	wp_enqueue_script("jquery-ui-core");
	wp_enqueue_script("jquery-ui-tooltip");
	?>
	<script type="text/javascript" >
	jQuery(function($) {
		jQuery( document ).tooltip({
			items: '[data-button="LinkPreview"]',
			tooltipClass : "lp-tooltip",
			content: function(callback) {
					var link_href=$(this).data('link')
					var data = {
							action 	: 'linkpreview',
							link	: link_href
							}
					jQuery.post('<?php echo admin_url('admin-ajax.php'); ?>',data, function(response) {
					callback(response);
				});
			}
		})
	});
	</script> 
	<?php
}

/*
 * Tooltipster
 */
function linkpreview_js_tooltipster() {
	$linkpreview_settings = linkpreview_get_settings();
	$theme = $linkpreview_settings['linkpreview_tooltipster_theme'];
	wp_enqueue_script('jquery');
	wp_enqueue_style('tooltipster', LINKPREVIEW_URL.'/js/tooltipster/css/tooltipster.css' );
	if ($theme != 'default') wp_enqueue_style('tooltipster-'.$theme, LINKPREVIEW_URL.'/js/tooltipster/css/themes/tooltipster-'.$theme.'.css' );
	wp_enqueue_script("tooltipster", LINKPREVIEW_URL."/js/tooltipster/js/jquery.tooltipster.min.js", false, "v3.3.0");
	?>
	<script type="text/javascript" >
	jQuery(document).ready(function($) {
		jQuery('[data-button="LinkPreview"]').tooltipster({
			contentAsHTML: true,
			content: '<img src="<?php echo LINKPREVIEW_URL.'/images/loading.gif'?>" class="lp-loading">',
			theme: 'tooltipster-<?php echo $theme;?>',
			position: 'bottom',
			maxWidth: 400,
			functionBefore: function(origin, continueTooltip) {
				continueTooltip();
				var link_href=$(this).data('link')
				if (origin.data('ajax') !== 'cached') {
					jQuery.ajax({
						type: 'POST',
						url: '<?php echo admin_url('admin-ajax.php'); ?>',
						data: {
							action 	: 'linkpreview',
							link	: link_href
						},
						success: function(data) {
							origin.tooltipster('content', data).data('ajax', 'cached');
						}
					});
				}
			}
		});
	});
	</script> 
	<?php
}

Youez - 2016 - github.com/yon3zu
LinuXploit