AnonSec Team
Server IP : 10.131.40.8  /  Your IP : 216.73.216.15
Web Server : Apache
System : Linux webd008.cluster131.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64
User : ludmqhh ( 137773)
PHP Version : 8.4.10
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /home/ludmqhh/www/provence-plomberie/../hotel-forum/wp-content/themes/hotello/inc/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/ludmqhh/www/provence-plomberie/../hotel-forum/wp-content/themes/hotello/inc/ajax.php
<?php

function hotello_ajax_get_image_by_id()
{
    if (empty($_GET['image_id'])) exit;
    $id = intval($_GET['image_id']);
    $image_size = (!empty($_GET['imageSize'])) ? sanitize_text_field($_GET['imageSize']) : '370x250';
	$full_image_url = wp_get_attachment_image_src($id, 'full')[0];
	$alt = get_post_meta($id, '_wp_attachment_image_alt', true);
    ob_start(); ?>
	<a href="<?php echo esc_url($full_image_url); ?>" title="<?php echo esc_attr($alt); ?>" class="stm-image stm_lightgallery__selector">
		<?php echo wp_kses_post(hotello_get_VC_img($id, $image_size)); ?>
	</a>
	<?php $image = ob_get_clean();
	
    wp_send_json($image);
}

add_action('wp_ajax_get_image_by_id', 'hotello_ajax_get_image_by_id');
add_action('wp_ajax_nopriv_get_image_by_id', 'hotello_ajax_get_image_by_id');


function hotello_update_custom_styles_admin()
{
    hotello_update_custom_styles();
}

add_action('wp_ajax_hotel_update_custom_styles_admin', 'hotello_update_custom_styles_admin');

AnonSec - 2021