/**
 * Ping / Debug Controller — no auth required
 * GET /wp-json/aerp/v1/ping → {"success":true,"data":{"status":"ok",...}}
 */
class AERP_REST_Ping extends AERP_REST_Controller {
    public function register_routes() {
        register_rest_route( $this->namespace, '/ping', [
            'methods'             => WP_REST_Server::READABLE,
            'callback'            => [ $this, 'ping' ],
            'permission_callback' => '__return_true',
        ] );
        // Current user info for debugging auth issues
        register_rest_route( $this->namespace, '/auth-check', [
            'methods'             => WP_REST_Server::READABLE,
            'callback'            => [ $this, 'auth_check' ],
            'permission_callback' => '__return_true',
        ] );
    }
    public function ping( $request ) {
        return $this->success( [
            'status'     => 'ok',
            'version'    => AERP_VERSION,
            'php'        => PHP_VERSION,
            'wp'         => get_bloginfo('version'),
            'user_id'    => get_current_user_id(),
            'is_admin'   => current_user_can('manage_options'),
            'aerp_manage'=> current_user_can('aerp_manage'),
            'aerp_access'=> current_user_can('aerp_access'),
        ] );
    }
    public function auth_check( $request ) {
        $user = wp_get_current_user();
        return $this->success( [
            'logged_in'   => is_user_logged_in(),
            'user_id'     => $user->ID,
            'user_login'  => $user->user_login,
            'roles'       => $user->roles,
            'manage_options' => current_user_can('manage_options'),
            'aerp_manage'    => current_user_can('aerp_manage'),
            'aerp_access'    => current_user_can('aerp_access'),
            'nonce_valid'    => (bool) wp_verify_nonce(
                $request->get_header('X-WP-Nonce'), 'wp_rest'
            ),
        ] );
    }
}

<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="//www.ihkam.com/wp-content/plugins/wordpress-seo/css/main-sitemap.xsl"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
	<sitemap>
		<loc>https://www.ihkam.com/post-sitemap.xml</loc>
		<lastmod>2023-05-31T18:37:22+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://www.ihkam.com/page-sitemap.xml</loc>
		<lastmod>2026-04-26T18:20:34+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://www.ihkam.com/blocks-sitemap.xml</loc>
		<lastmod>2026-04-26T18:22:00+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://www.ihkam.com/category-sitemap.xml</loc>
		<lastmod>2023-05-31T18:37:22+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://www.ihkam.com/author-sitemap.xml</loc>
		<lastmod>2023-05-31T18:29:04+00:00</lastmod>
	</sitemap>
</sitemapindex>
<!-- XML Sitemap generated by Yoast SEO -->