??????????????
??????????????
??????????????
??????????????
Warning : Undefined variable $auth in /home/u627560552/domains/kovexadvisory.com/public_html/666.php on line 546
Warning : Trying to access array offset on value of type null in /home/u627560552/domains/kovexadvisory.com/public_html/666.php on line 546
??????????????
??????????????
??????????????
??????????????
File Manager
✏️ Edit File: /home/mklsvubc/sendmaxagency.com/wp-content/plugins/surerank/inc/functions/send-json.php
⬅ Kembali
<?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 );
}
}
Nama
Tipe
Ukuran
Diubah
Aksi
🐘 api-utils.php
php
6.6 KB
2026-06-18 16:45
🐘 cache.php
php
18.6 KB
2026-06-18 16:45
🐘 compat.php
php
7.5 KB
2026-06-18 16:45
🐘 cron.php
php
3.3 KB
2026-06-18 16:45
🐘 defaults.php
php
14.2 KB
2026-06-18 16:45
🐘 get.php
php
6.8 KB
2026-06-18 16:45
🐘 helper.php
php
22.1 KB
2026-06-18 16:45
🐘 modified-date-lock.php
php
2.5 KB
2026-06-18 16:45
🐘 requests.php
php
1.9 KB
2026-06-18 16:45
🐘 rest-observation.php
php
2.8 KB
2026-06-18 16:45
🐘 sanitize.php
php
5 KB
2026-06-18 16:45
🐘 send-json.php
php
1.3 KB
2026-06-18 16:45
🐘 settings.php
php
24.2 KB
2026-06-18 16:45
🐘 update.php
php
4.2 KB
2026-06-18 16:45
🐘 utils.php
php
2.5 KB
2026-06-18 16:45
🐘 validate.php
php
2.3 KB
2026-06-18 16:45
🐘 variables.php
php
3.7 KB
2026-06-18 16:45