test
This commit is contained in:
@@ -93,7 +93,29 @@ class Wiass_REST_Delivery_Process_API {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return rest_ensure_response($data);
|
global $wpdb;
|
||||||
|
|
||||||
|
|
||||||
|
$data = array();
|
||||||
|
$total = 0;
|
||||||
|
$queries =$wpdb->queries;
|
||||||
|
foreach ($queries as $query) {
|
||||||
|
$data[] = array(
|
||||||
|
$query[0],
|
||||||
|
$query[1]
|
||||||
|
);
|
||||||
|
|
||||||
|
$total += $query[1];
|
||||||
|
}
|
||||||
|
|
||||||
|
global $wp_timer;
|
||||||
|
|
||||||
|
|
||||||
|
return rest_ensure_response(array(
|
||||||
|
'data' => $queries,
|
||||||
|
'total' => $total * 1000,
|
||||||
|
'start' => (microtime() - $wp_timer) * 1000
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function get_customer_acceptance(WP_REST_Request $request){
|
public static function get_customer_acceptance(WP_REST_Request $request){
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/** Development */
|
/** Development */
|
||||||
define('SAVEQUERIES', false);
|
define('SAVEQUERIES', true);
|
||||||
define('WP_DEBUG', false);
|
define('WP_DEBUG', false);
|
||||||
define('WP_DEBUG_DISPLAY', false);
|
define('WP_DEBUG_DISPLAY', false);
|
||||||
define('WP_DEBUG_LOG', false);
|
define('WP_DEBUG_LOG', false);
|
||||||
|
|||||||
@@ -6,4 +6,8 @@
|
|||||||
*/
|
*/
|
||||||
require_once(__DIR__ . '/vendor/autoload.php');
|
require_once(__DIR__ . '/vendor/autoload.php');
|
||||||
require_once(__DIR__ . '/config/application.php');
|
require_once(__DIR__ . '/config/application.php');
|
||||||
|
|
||||||
|
global $wp_timer;
|
||||||
|
|
||||||
|
$wp_timer = microtime();
|
||||||
require_once(ABSPATH . 'wp-settings.php');
|
require_once(ABSPATH . 'wp-settings.php');
|
||||||
|
|||||||
Reference in New Issue
Block a user