';
foreach ($tabs as $tab => $name) {
$class = ($tab == $get) ? 'nav-tab-active' : '';
$html .= '' . $name . '';
} //$tabs as $tab => $name
$html .= '';
return $html;
}
public function aha_menu_tab($gets, $tabs, $page) {
$get = (isset($gets['tab']) ? sanitize_text_field($gets['tab']) : 'first');
$html = '
';
return $html;
}
public function aha_main_crul($api_key, $url) {
$data_args = array( 'body' => array('key' => $api_key , 'origin' => plugin_dir_url( __DIR__ ) ));
$response = wp_remote_post( $url,$data_args );
return wp_remote_retrieve_body( $response );
}
public function aha_get_categories_api() {
$response = wp_remote_post( 'https://www.ahathat.com/plugin-setup/categories');
return wp_remote_retrieve_body( $response );
}
public function aha_price() {
$response = wp_remote_post( 'https://www.ahathat.com/plugin-setup/price');
return wp_remote_retrieve_body( $response );
}
public function getTableData($table,$row,$id) {
global $wpdb;
$prefix = $wpdb->prefix;
$results = $wpdb->get_row( "SELECT * FROM ".$prefix."".$table." WHERE ".$row." = '".$id."'" );
return $results;
}
}
}