HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux WebLive 5.15.0-79-generic #86-Ubuntu SMP Mon Jul 10 16:07:21 UTC 2023 x86_64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/html/wpemobiq/wp-content/plugins/zendesk/classes/zendesk-wordpress-utilities.php
<?php

/*
 * The Zendesk Utilities Class
 *
 * This has all miscellaneous helper methods. Normally to get urls or to manipulate strings.
 *
 */

class Zendesk_Wordpress_Utilities {
  /*
   * Helper: Zendesk Ticket URL
   *
   * Returns the URL to the Zendesk ticket given the ticket ID.
   *
   */
  public static function _ticket_url( $ticket_id ) {
    global $zendesk_support;

    return trailingslashit( $zendesk_support->zendesk_url ) . 'tickets/' . $ticket_id;
  }

  /*
   * Helper: Zendesk User URL
   *
   * Returns the URL to the Zendesk user profile given the user ID.
   *
   */
  public static function _user_url( $user_id ) {
    global $zendesk_support;

    return trailingslashit( $zendesk_support->zendesk_url ) . 'users/' . $user_id;
  }

  /*
   * Helper: Custom Excerpt
   *
   * Create an excerpt of any string given the string and the number
   * of words to truncate to, default is 50.
   *
   */
  public static function _excerpt( $string, $words = 50 ) {
    $blah   = explode( ' ', $string );
    $return = '';
    if ( count( $blah ) > $words ) {
      for ( $i = 0; $i < $words; $i ++ ) {
        $return .= $blah[ $i ] . ' ';
      }

      $return .= '...';

      return $return;
    } else {
      return $string;
    }
  }

  /*
   * Helper: File Size
   *
   * Used to display the sizes of the attachments in Zendesk comments.
   *
   */
  public static function _file_size( $bytes ) {
    $filesizename = array( " bytes", " kb", " mb", " gb", " tb", " pb", " eb", " zb", " yb" );

    return $bytes ? round( $bytes / pow( 1024, ( $i = floor( log( $bytes, 1024 ) ) ) ), 2 ) . $filesizename[ $i ] : '0 bytes';
  }

}