BATOSAY Shell
Server IP : 170.10.162.208  /  Your IP : 216.73.216.38
Web Server : LiteSpeed
System : Linux altar19.supremepanel19.com 4.18.0-553.69.1.lve.el8.x86_64 #1 SMP Wed Aug 13 19:53:59 UTC 2025 x86_64
User : deltahospital ( 1806)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home1/deltahospital/www/wp-content/plugins/fancy-gallery/classes/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home1/deltahospital/www/wp-content/plugins/fancy-gallery/classes/thumbnails.php
<?php Namespace WordPress\Plugin\GalleryManager;

abstract class Thumbnails {

  static function getSizes($dimensions = False){
    $arr_registered_sizes = static::getRegisteredSizes();
    $arr_default_sizes = static::getDefaultSizes();
    $arr_sizes = Array_Merge($arr_registered_sizes, $arr_default_sizes);

    if ($dimensions){
      $arr_result = Array();
      foreach($arr_sizes as $size => $caption){
        $dimensions = static::getDimensions($size);
        $arr_result[$size] = (Object) Array(
          'name' => $size,
          'caption' => $caption,
          'width' => isSet($dimensions->width) ? $dimensions->width : Null,
          'height' => isSet($dimensions->height) ? $dimensions->height : Null,
          'crop' => isSet($dimensions->crop) ? $dimensions->crop : Null
        );
      }
      $arr_sizes = $arr_result;
    }

    return $arr_sizes;
  }

  static function getDefaultSizes(){
    /* This filter is documented in wp-admin/includes/media.php */
    $default_sizes = apply_Filters('image_size_names_choose', Array(
      'thumbnail' => __('Thumbnail'),
      'medium'    => __('Medium'),
      'large'     => __('Large'),
      'full'      => __('Full Size'),
    ));

    return $default_sizes;
  }

  static function getRegisteredSizes(){
    $arr_registered_sizes = get_Intermediate_Image_Sizes();
    setType($arr_registered_sizes, 'ARRAY');

    $arr_registered_sizes = Array_Flip($arr_registered_sizes);

    foreach ($arr_registered_sizes as $size => &$caption){
      $caption = $size;
      $caption = Str_Replace(Array('_', '-'), ' ', $caption);
      $caption = UCWords($caption);
      $caption = __($caption);
    }

    return $arr_registered_sizes;
  }

  static function getDimensions($size){
    global $_wp_additional_image_sizes;

    if (isSet($_wp_additional_image_sizes[$size]['width']) && isSet($_wp_additional_image_sizes[$size]['height'])){
      $size = (Object) Array(
        'width'  => $_wp_additional_image_sizes[$size]['width'],
        'height' => $_wp_additional_image_sizes[$size]['height'],
        'crop'   => (bool) $_wp_additional_image_sizes[$size]['crop']
      );
    }
    elseif (($width = get_Option("{$size}_size_w")) && ($height = get_Option("{$size}_size_h"))){
      $size = (Object) Array(
        'width' => $width,
        'height' => $height,
        'crop' => (bool) get_Option("{$size}_crop")
      );
    }
    else return (Object) Array();

    return $size;
  }

  static function getDropdown($attributes){
    $defaults = Array(
      'name' => '',
      'class' => '',
      'selected' => False,
      'class' => ''
    );

    $attributes = Array_Merge($defaults, $attributes);
    setType($attributes, 'OBJECT');

    $html = sprintf('<select name="%s" id="%s" class="%s">', $attributes->name, $attributes->id, $attributes->class);

    foreach (static::getSizes(True) as $size){
      $html .= sprintf('<option value="%s" %s>', $size->name, selected($attributes->selected, $size->name, False));
      $html .= $size->caption;
      !empty($size->width) && !empty($size->height) && $html .= sprintf(' (%u x %u px)', $size->width, $size->height);
      $html .= '</option>';
    }

    $html .= '</select>';

    return $html;
  }

}

Batosay - 2023
IDNSEO Team