<?php 
/**
 * Class ST_Proqyz_Admin_Page_Home
 */
defined( 'ABSPATH' ) || exit;


/**
  * Ielts_Lms_Menus Class.
  */
class ST_ProQyz_Admin_Page_Home {
    /**
    * Hook in tabs.
    */
    public function __construct() {
        $this->hooks();
        $this->includes();
    }

    /**
      * register hooks
      */
    public function hooks() { }

    /**
      * includes
      */
    public function includes() { }

    public static function fetch_tutorials() {
      if(!defined('ST_TUTORIALS_ENDPOINT')) {
        return ["error" => "Tutorials endpoint not defined"];
      }
  
      $response = wp_remote_get(ST_TUTORIALS_ENDPOINT);
      if (is_wp_error($response)) {
        return ["error" => "There was an error retrieving the data.", "code" => $response];
      }
  
      $body = wp_remote_retrieve_body($response);
      return json_decode($body, true);
    }

    public static function get_page_layout(){
        require_once ST_PROQYZ_ABSPATH . "/includes/templates/admin/home/home.php"; // checked
    }

}
