Uname:Linux webm009.cluster131.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64

403WebShell
403Webshell
Server IP : 146.59.209.152  /  Your IP : 216.73.216.152
Web Server : Apache
System : Linux webm009.cluster131.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User : monpetu ( 144298)
PHP Version : 7.4.33
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/monpetu/www/ipprint/wp-content/plugins/surerank/inc/functions/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/monpetu/www/ipprint/wp-content/plugins/surerank/inc/functions/send-json.php
<?php
/**
 * Send JSON
 *
 * @package surerank
 * @since 0.0.1
 */

namespace SureRank\Inc\Functions;

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}

/**
 * Send JSON
 *
 * @since 1.0.0
 */
class Send_Json {

	/**
	 * Sends the success JSON response.
	 *
	 * @param array<string, mixed>|array<int, string> $data array of data to be send.
	 *
	 * @since 1.0.0
	 * @return void
	 */
	public static function success( $data = [] ) {
		$response = [ 'success' => true ];
		Send_Json::response( $response, $data );
	}

	/**
	 * Sends the error JSON response.
	 *
	 * @param array<string, mixed>|array<int, string> $data array of data to be send.
	 *
	 * @since 1.0.0
	 * @return void
	 */
	public static function error( $data = [] ) {
		$response = [ 'success' => false ];
		Send_Json::response( $response, $data );
	}

	/**
	 * Sends the JSON response.
	 * using WordPress function wp_send_json
	 *
	 * @param array<string, mixed>|array<int, string> $response required data.
	 * @param array<string, mixed>|array<int, string> $data     array of data to be send.
	 *
	 * @since 1.0.0
	 * @return void
	 */
	public static function response( $response, $data = [] ) {
		if ( ! empty( $data ) && is_array( $data ) ) {
			$response = array_merge( $response, $data );
		}

		wp_send_json( $response );
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit