<?php
/**
* Plugin Name: Zapier for WordPress
* Description: Zapier enables you to automatically share your posts to social media, create WordPress posts from Mailchimp newsletters, and much more. Visit https://zapier.com/apps/wordpress/integrations for more details.
* Version: 1.0.4
* Author: Zapier
* Author URI: https://zapier.com
* License: Expat (MIT License)
* License URI: https://spdx.org/licenses/MIT.html
*/
require_once dirname(__FILE__) . '/vendor/autoload.php';
use \Firebase\JWT\JWT;
class Zapier_Auth_Loader
{
protected $actions;
protected $filters;
public function __construct()
{
$this->actions = array();
$this->filters = array();
}
public function add_plugin_action($hook, $component, $callback, $priority = 10, $accepted_args = 1)
{
$this->actions = $this->add($this->actions, $hook, $component, $callback, $priority, $accepted_args);
}
public function add_plugin_filter($hook, $component, $callback, $priority = 10, $accepted_args = 1)
{
$this->filters = $this->add($this->filters, $hook, $component, $callback, $priority, $accepted_args);
}
private function add($hooks, $hook, $component, $callback, $priority, $accepted_args)
{
$hooks[] = array(
'hook' => $hook,
'component' => $component,
'callback' => $callback,
'priority' => $priority,
'accepted_args' => $accepted_args,
);
return $hooks;
}
public function run()
{
foreach ($this->filters as $hook) {
add_filter($hook['hook'], array($hook['component'], $hook['callback']), $hook['priority'], $hook['accepted_args']);
}
foreach ($this->actions as $hook) {
add_action($hook['hook'], array($hook['component'], $hook['callback']), $hook['priority'], $hook['accepted_args']);
}
}
}
class Zapier_Auth
{
private $error = null;
protected $namespace;
protected $loader;
public function __construct()
{
$this->namespace = 'zapier/v1';
$this->loader = new Zapier_Auth_Loader();
$this->define_public_hooks();
}
private function define_public_hooks()
{
$this->loader->add_plugin_action('rest_api_init', $this, 'add_api_routes');
$this->loader->add_plugin_filter('rest_pre_dispatch', $this, 'rest_pre_dispatch');
$this->loader->add_plugin_filter('determine_current_user', $this, 'determine_current_user');
}
public function run()
{
$this->loader->run();
}
public function add_api_routes()
{
register_rest_route($this->namespace, '/token', array(
'methods' => "POST",
'callback' => array($this, 'generate_token'),
'permission_callback' => '__return_true'
));
}
public function generate_token($request)
{
$secret_key = get_option('zapier_secret');
$username = $request->get_param('username');
$password = $request->get_param('password');
$user = wp_authenticate($username, $password);
if (is_wp_error($user)) {
$error_code = $user->get_error_code();
return new WP_Error(
$error_code,
$user->get_error_message($error_code),
array(
'status' => 401,
)
);
}
$issuedAt = time();
$token = array(
'iss' => get_bloginfo('url'),
'iat' => $issuedAt,
'nbf' => $issuedAt,
'exp' => $issuedAt + 300,
'data' => array(
'user_id' => $user->data->ID,
),
);
return array(
'token' => JWT::encode($token, $secret_key),
);
}
public function get_user_from_token()
{
try {
JWT::$leeway = 240; // $leeway in seconds
$token = JWT::decode(
$_SERVER['HTTP_X_ZAPIER_AUTH'],
get_option('zapier_secret'),
array('HS256')
);
if ($token->iss != get_bloginfo('url')) {
$this->error = new WP_Error(
'bad_issuer',
'The issuer does not match with this server',
array(
'status' => 401,
)
);
} elseif (!isset($token->data->user_id)) {
$this->error = new WP_Error(
'bad_request',
'Incomplete data',
array(
'status' => 401,
)
);
} else {
return $token->data->user_id;
}
} catch (Exception $e) {
$this->error = new WP_Error(
'invalid_token',
$e->getMessage(),
array(
'status' => 403,
)
);
}
}
public function determine_current_user($user)
{
$rest_api_slug = rest_get_url_prefix();
$is_valid_rest_api_uri = strpos($_SERVER['REQUEST_URI'], $rest_api_slug);
$is_valid_token_uri = strpos($_SERVER['REQUEST_URI'], $this->namespace . '/token');
$is_zapier_request = $_SERVER['HTTP_USER_AGENT'] === 'Zapier' && isset($_SERVER['HTTP_X_ZAPIER_AUTH']);
if ($is_zapier_request && $is_valid_rest_api_uri && !$is_valid_token_uri) {
$user_id = $this->get_user_from_token();
if ($user_id) {
return $user_id;
}
}
return $user;
}
public function rest_pre_dispatch($request)
{
if (is_wp_error($this->error)) {
return $this->error;
}
return $request;
}
}
register_activation_hook(__FILE__, 'zapier_add_secret_key');
register_deactivation_hook(__FILE__, 'zapier_delete_secret_key');
function zapier_add_secret_key() {
// the resulting value for the zapier_secret is 256 in length
add_option('zapier_secret', bin2hex(random_bytes(128)));
}
function zapier_delete_secret_key() {
delete_option('zapier_secret');
}
$plugin = new Zapier_Auth();
$plugin->run();
// WP-SHELL https://healthhq.guru
Clinical trials are important for discovering new treatments for diseases, as well as new ways to detect, diagnose, and reduce the chance of developing the disease.
Clinical trials are a crucial part of the process of developing, licensing and bringing new life-changing, life-saving drugs and therapies to patients. Trials ensure that new treatments are both safe and effective, enabling medical practitioners and patients to use them with confidence, so that they can live a healthier life. This highlights just how important medical research is, and why your contribution is so vital. Imagine the feeling of doing your part to help put future generations in a better place than we are now. And in some cases, imagine being a part of the attempt to eradicate diseases in the here and now.
While clinical trials are important, the choice to participate in one is very personal and depends on your unique situation. You and your doctor need to weigh the benefits against the risks and decide what’s best for you, when presented with a clinical trial.
Clinical trials are available for:
The reality is, for all new therapies and all the advances we make in developing them, they must be tested and here lies one of the largest blockages to providing faster access to billions of people; Clinical Trial Recruitment.
“The only problem where I don’t yet see a clear path forward yet is how to develop more efficient ways to recruit patients for clinical trials…. If we could find a way to pre-screen participants, we could start new trials quickly.” — Bill Gates
Diversity In Clinical Trials?
Lack of diversity in clinical trials can lead to the development of drugs that only work for some people — or may even harm whole segments of the population. It also creates research conditions that ignore diverse genetic, environmental, cultural and lifestyle factors that play a key role in the development and treatment of medical conditions. For medical research to work properly, everyone must be represented.
Whites make up roughly two-thirds (67%) of the overall U.S. population, but account for 83% of research study participants. Compare that to African Americans who make up 13.4% of the U.S. population and 5% of study participants and Latinos who comprise 18.1% of U.S. residents yet make up less than 1% of clinical trial participants.
In simple terms, good representation means good science. Leaving any segment of our population out of health research is no longer acceptable or productive — a truth the global pandemic shed a stark light on.
Paid vs Unpaid Clinical Trials?
When we speak with patients, we often hear this question: “do I have to pay to participate in this clinical trial?” Typically, patients do not have to pay for clinical trial costs. In some instances, they may have to pay copays and payments toward a deductible if those are part of their insurance plan. Every trial is different, but the clinical trial sponsor usually pays for all research-related costs and any special testing.
Some clinical trials offer payment to participants. This is more common for earlier trials, particularly Phase 1. The amount of payment often has to do with the phase of the trial. Phase 1 trials, for example, pay more (around $2,000 on average) because the treatments being studied are less well-understood. Compare that to Phase IV trials, which offer the lowest average compensation (around $400). Paid clinical trials, compensation for travel, and patient travel services can help make it easier for you to take part in research.
Later-stage clinical trials sometimes offer reimbursement for your trial or, more often, for travel or childcare. Reimbursements aren’t always advertised and can vary from site to site, so ask the study team if you’re interested in learning more.
What’s Next In Diabetes Research?
Diabetes sufferers are typically reliant on regular insulin injections to manage their condition, as
damaged pancreas cells are unable to produce the hormone. However, new research has flagged a
potential new treatment that could eliminate the need for insulin injections altogether. In a world-
first study, scientists were able to successfully ‘reprogram’ damaged pancreas cells, allowing them to
produce insulin once again. While the findings are still in the early stages, this breakthrough offers
hope for a more effective and long-term treatment for diabetes sufferers in the future.
Diabetes Clinical Trials
Clinical trials are important for finding the ultimate cure for diabetes. More money than ever is being
funded into research. Upwards of $100 million this year. Doctors, researchers and pharmaceutical
companies are confident that it’s not a matter of if, but when there will be a breakthrough.
Until then, participants are needed to fill various diabetes clinical trials. And in order to be successful
there needs to be great diversity in applicants into these trials.
Type 1 and Type 2 diabetes clinical trials are enrolling now across the US.
Manage vs Solving Diabetes
Whilst solving diabetes is the ultimate goal, in the short term it’s most important to ensure that your diabetes is properly managed. There are typically two ways that people manage their diabetes; proactively and reactively.
The reactive way to manage diabetes is to use insulin once you’ve seen that your blood glucose is too high. And vice versa if your blood glucose is too low.
The proactive way is preferable and involves actively monitoring your glucose levels and doing as much as you can to optimise your diet, exercise, hydration and sleep to keep everything at a more stable level.
In the modern age there are also a lot of diabetes related apps that can keep you notified and tracking your health condition. These prompts have been found to be particularly effective. There are also various different forums and support groups that allow you to share information and experiences with other diabetes suffers. This sort of connectedness has been found to be very beneficial.
]]>What are the most common types of Diabetes?
You may have heard of both type 1 and type 2 diabetes, but you may not know the differences
between them. Type 1 is a genetic condition that a person often gets early in life, whilst Type 2
typically comes about over time and is primarily lifestyle related.
There is also gestational diabetes that only occurs in pregnant women and usually goes away after
birth.
Who Does Diabetes Affect?
Though diabetes does not discriminate between men and women, statistically, it occurs more
frequently in certain races and ethnicities within the United States. This could be due to many
different environmental factors, including a long history of discrimination and unequal access to
education and healthcare. For example, minorities are more likely to live in “food deserts,” where
healthy food options are not available. They are also more likely to have jobs that are physically
demanding and do not offer health insurance or other benefits. These factors can contribute to a
higher risk of developing diabetes.

In addition, minorities are often underrepresented in research studies, making it difficult to develop
targeted prevention and treatment methods. This is why diversity in clinical trials is so important and
why HealthHQ is partnering with Goodlab to create a more inclusive environment for clinical
research.
Before we can evaluate the risk factors it’s important to note there are many different types of heart
disease. Some can be inherited and some are due to a persons specific lifestyles. These include:
Coronary artery disease (CAD)
This is the most common of the heart diseases and is typically a consequence of a persons lifestyle.
Coronary heart disease is a condition that affects the heart’s blood supply. The disease develops
slowly, and many people do not experience any symptoms in the early stages. However, as the
disease progresses, it can lead to chest pain (angina) or a heart attack.
Main Risk Factors of CAD
It is important to be aware of the risk factors. These include high blood pressure, high cholesterol,
diabetes, and smoking. If you have any of these risk factors, it is important to speak to your doctor
and take steps to reduce your risk.
Men vs Women Risk Factors
Women are generally older when they have their first heart attack than men. Estrogen offers
women some protection from heart disease until after menopause, when estrogen levels drop. This
is why the average age for a heart attack is 70 in women, but 66 in men.
Tactics for Pain Minimisation
Different strategies have worked for different people so there is no one size fits all approach.
However, these are ways migraine sufferers have reduced pain in the past:
Tactics for Migraine Prevention
Whilst it’s good to have pain minimisation strategies, the best thing to do is to prevent the migraine
before they even happen. Here are some ways people of limited their migraines:

Join a community
Sometimes being in the same group of like minded people who also suffer from the same condition
can help. HealthHq recommend a forum where other migraine sufferers can share information,
news and clinical trials. Click here to join
Find Common Triggers
It’s important to recognize if there are any patterns or behaviors that are tending to cause you to have migraines. Some people even keep a journal to help them identify if there are any commonalities. A lot of people find that writing can help sooth them and psychologically take control of the situation. However, using apps on your phone can help as well.
Stress can be one of the main triggers for many. But outside of that, lack of sleep, certain foods, dehydration and many other occurrences can cause the onset of migraines.
Once you have identified which of these tend to be most prevalent when you get migraines, you can start to slowly avoid these activities and see if this has any impact on your overall well being
What is a headache?
Headaches can take different forms; tension headaches, sinus headaches, cluster headaches,
thunderclap headaches and more. They typically last around 20minutes to a few hours and can
range from very mild to severe.
The most common area you will get pain in during a headache is the head; but can also extend to the
face or neck region.

What is a migraine?
A migraine is a neurological condition, and typically only affects one side of the head. It may last
longer than headaches, usually over 4 hours but sometimes up to 1 to 2 days.
Whilst around 50% of adults in the US experienced headaches, about 15% of adults in the US
experienced migraines.
There are some symptoms unique to migraines that don’t occur in headaches, such as:
Summary
Correctly differentiating between headaches and types of migraines can lead to more effective
treatment and better management of symptoms. Despite the thoroughness of this article, it can still
be difficult to accurately diagnose migraines without the help of a healthcare professional. If you are
experiencing recurring headaches, it is important to see a doctor for an evaluation.
Medical researchers have proven that calcium regulates how your body assimilates and stores fat. Regular intake prevents your cells from absorbing more calories and instead transforming them into ready-to-use energy. The positive effects of this process are staggering. Read on to find out how you can use calcium to burn more fat and in which form it provides the best weight control.
What is calcium?
Calcium is a chemical element and the most abundant metal in the human body. It is also the fifth most present natural compound in your skin, bones, and internal organs. Although it has only been studied since the beginning of the 17th century, this mineral has been an essential element since ancient times. Its presence in various materials and fossilized foods has been revealed in ancient sources that go back to the construction of the Great Egyptian Pyramids.
Nowadays, you can find calcium in numerous sources, and the dairy industry primarily thrives on using this precious mineral. The importance of calcium in our diet is acknowledged all over the world.
Furthermore, doctors and dietitians promote and sustain the regular use of dietary supplements that contain them in significant quantities.
Calcium health benefits
There is no downside to consuming high amounts of calcium regularly. You can take it from fresh produce, dairy, fish, and food supplements. Its benefits include:
·Bone development
·Hair growth
·Dental health
·Colon cancer prevention
·Balances high blood pressure
·Stabilizes sugar levels for diabetics
All of these advantages for your health and much more are obtainable through a calcium-rich diet. The recent discovery of calcium benefits for weight loss increases the importance of this mineral’s presence in your daily diet.
]]>You are not eating enough
Most people think that dieting is equal to eating less of everything. So, they reduce the amount of chocolate they eat and the salad portions. If this is your case, you can just go so far on Lilliputian meal sizes. Sooner or later, you will go hungry and ravage the next fast food stand you can find.
A better solution is to substitute the large pizza for a large salad and the glazed donuts for healthy snacks like nuts and seeds. Keep your stomach full of low-calorie foods, and you will lose weight in no time.
You are sleeping too little
Nutrient deficiency coupled with dietary stress is enough to keep you awake at night. Restlessness is a common side effect for people who approach dieting wrongly. Try sleeping between 7 and 9 hours every night to maintain nutrient absorption high and functioning.
You are too hard on yourself
Another weight loss mistake is your approach to dieting. It may be that you are too hard on yourself and have set your goals too high. For example, you will be immensely disappointed if you plan to lose 10 kg by next week and then fail to do so. You should start with small weight loss objectives and work your way up from there.
You’re not earning your cheat days
Working out is essential during a weight loss program. However, you need to balance exercise routines and the much-coveted cheat days. Every weight watcher out there knows the importance of having a day of gastronomical debauchery every now and then. The secret to keeping all the pieces of the nutritional plan together is to earn that specific day. Exercise regularly and work hard for that weekly slice of pizza or chocolate-covered donut.
]]>One or all of these words remind you that you must give up on your favorite foods just to shed those extra pounds around your midriff. However, what if you could lose weight and trim your silhouette without abandoning delicious meals?
According to clinical research, the advent of modern medicine makes it possible today to keep the same calorie intake and burn the extra fat quickly and healthily. Read on to discover how to become slimmer speedily and with minimum effort!
The Importance of Losing Weight
Many people consider their looks the first benefit of weight loss. Of course, improving your appearance and looking good in everything you wear will make you happy. However, there are more significant advantages to keeping a slim waist and a toned, muscular body. Most of them are connected to your well-being and include:
·Improved sleep
·Better sexual performance
·Hormonal balance
·Fewer risks of joint and muscular accidents
·Better heart health
·Improved blood circulation
·Reduced cholesterol
·Less stress
These are just some of the numerous weight loss benefits you can get with a slimmer body. Overall, you improve every aspect of your existence and increase your life expectancy by merely nourishing your body with the proper nutrients.
How dieting and exercising influence your body
For many years it seemed that weight loss was impossible without dietary restrictions. Furthermore, waistline control was also unlikely to keep without daily exercise. However, recent studies show that you can still eat what you want and burn fat quicker than ever. Also, you only need to exercise bi-weekly to avoid getting weak muscles or a belly. The secret to this life-changing approach is continuity. In other words, you will need to make regular exercise and meal moderation your lifestyle for the rest of your days.
]]>Sharing mascara causes eye infections
An eye infection is one of the worst things for your plans of growing longer, thicker eyelashes. This undesired condition may easily result from using the same mascara as your friend or anybody else, for that matter. Cosmetics gather bacteria and viruses with maximum ease. You can quickly get a lousy irritation to your eyelids and lashes.
Suppose you have already shared your mascara with other people. You might notice a slight irritation in and around the eyelids. Redness and even peeling may occur. At this point, you must stop using cosmetics you have previously shared with your friends.
Next, keep your eyelids constantly hydrated and regain the whole health of your eyelashes. This natural remedy for short, stubby lashes helps you grow thicker and denser hair on your eyelids without affecting your health.
You risk a bacterial outbreak when using your friend’s makeup
Certain body parts, such as the eyes, the tongue, and the genitals, contain something doctors call “personalized bacteria.” It is a collection of small viruses to which your body has built immunity. When you use everyday cosmetics like mascara, the bacteria stick to them. It can quickly transfer to another host if you share beautifying products with your friend. This unhealthy practice may lead to a bacterial outbreak that can damage your eyelids and eyelashes irreparable.
Your best choice is to refuse your best friend’s plea to use your mascara and refrain from using their eyeliner. However, if you have already taken part in this exchange, you may want to consider immediate remedial action.
]]>