*/ namespace RankMath\Search_Console; use RankMath\Helper; use RankMath\Admin\Admin_Helper; use RankMath\Traits\Hooker; use MyThemeShop\Helpers\Str; defined( 'ABSPATH' ) || exit; /** * Overview class. */ class Overview { use Hooker; /** * Hold search console api client. * * @var Client */ private $client; /** * Hold overview data. * * @var array */ public $data; /** * The Constructor. * * @param Client $client Clien object. */ public function __construct( $client ) { $this->client = $client; $this->action( 'admin_init', 'get_overview_data' ); } /** * Get overview data. */ public function get_overview_data() { $filters = Helper::search_console()->get_filters(); $this->data = DB::get_overview_data( $filters, 'date' ); Helper::add_json( 'overviewChartData', $this->data->rows ); Helper::add_json( 'overviewChartDataOld', $this->data->old_rows ); } /** * Display click data. */ public function display_clicks() { ?>