| Server IP : 144.76.79.100 / Your IP : 216.73.216.103 [ Web Server : Apache System : Linux ch05.wehostwebserver.com 5.14.0-611.5.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Nov 11 08:09:09 EST 2025 x86_64 User : razzlestore ( 1092) PHP Version : 8.2.29 Disable Function : NONE Domains : 343 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/razzlestore/public_html/wp-content/plugins/iks-menu/includes/images/ |
Upload File : |
<?php
/**
* Iks Menu
*
*
* @package Iks Menu
* @author IksStudio
* @license GPL-3.0
* @link https://iks-menu.com
* @copyright 2019 IksStudio
* @since 1.5.0
*/
namespace IksStudio\IKSM\images;
use IksStudio\IKSM_CORE\Plugin;
use IksStudio\IKSM_CORE\utils\Utils;
/**
* ImproverUtils class.
*/
class ImproverUtils {
public static function get_image_picker_label() {
return Utils::t( "Image", true );
}
public static function render_image( $url, $width, $class = "" ) {
$width = $width . "px";
$url = esc_url( $url ? $url : Utils::get_placeholder_image() );
$alt = self::get_image_picker_label();
return "<img src='$url' alt='$alt' style='width: $width; height: auto;' class='$class'/>";
}
public static function render_image_picker( $id, $thumbnail_id = null ) {
$image_url = false;
if ( $thumbnail_id ) {
$image_url = wp_get_attachment_thumb_url( $thumbnail_id );
}
$render_image = self::render_image( $image_url, 60 );
$value = esc_attr( $thumbnail_id );
return "
<div class='iksm-image-picker'>
<div style='float: left; margin-right: 10px;'>
{$render_image}
</div>
<div style='line-height: 60px;'>
<input
type='hidden'
id='{$id}'
name='{$id}'
value='{$value}'
/>
<button type='button' class='upload-image-button button'>" . Utils::t( 'Upload image', true ) . "</button>
<button type='button' class='remove-image-button button'>" . Utils::t( 'Remove image', true ) . "</button>
</div>
<div class='clear'></div>
</div>
";
}
}