<?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
Wayne Rooney
One of the most prestigious football stars of the last 20 years, Wayne Rooney, sports a full head of hair. However, many vigilant fans would remember that the English striker was balding at the crown just a few years ago. In fact, at one point, he barely had any threads left on his head, and his forehead spread to the center of his scalp.
Few football fans would have placed a bet on Rooney growing his hair back a few years ago. However, the once deadly striker proved to everyone that he still had some goals to score, with the most important ones going against his worst enemy: baldness. With the help of follicle stimulation and a possible hair transplant, Wayne managed to grow a more prominent mane than the one he was showing in his early 20s.
Matthew McConaughey
This Oscar-winning actor first experienced hair loss in his early 20s. For fear of losing crucial leading roles to other artists, Matthew McConaughey went to extra lengths to grow his hair back.
Some say that after trying several hair regrowth methods, McConaughey stuck to natural supplements for thinning hair. Regular doses prevented his hairline from receding any farther and helped him grow thicker and sturdier threads from stronger roots.
Viola Davis
Menopause is just one of the many factors that cause hair loss in women. Ageing, pregnancy, and stress can also lead to thinning threads and bald spots. The famous American actress Viola Davis battled most of these conditions to regain her natural black hair growing just as strong as it did in her youth.
]]>John Travolta
Most people remember John Travolta for his iconic roles in 70s musicals like Saturday Night Fever and Grease. His thick, flamboyant mane used to turn girls crazy at the very sight of it. Through the years, the famous New Jersey actor struggled with thinning hair and a receding hairline that forced him to wear wigs or shave his hair for specific roles.
Nowadays, even if he’s closing in on his 65th birthday, John Travolta still boasts a full head of hair. His fight with alopecia areata often seemed to be lost, but he returned stronger every time. The Pulp Fiction star never revealed his secret. Still, some speculate that a gradual, forced rejuvenation of the scalp follicles restored his youthful mane.
Tyra Banks
Alopecia areata, more commonly known as hair loss, affects women almost as much as it does men. It starts with symptoms like thinning hair, balding at the crown, and scalp rashes. Without proper treatment, you allow bald spots to emerge and slowly cover your head.
There are several causes of alopecia areata, and they include genetic factors, stress, malnutrition, and ageing. Tyra Banks is just one of the many celebrities that can tell us more about how it feels like losing your natural mane to stress. The famous entertainer battled hair loss for years before learning effective ways of reducing mental pressure and improving the health of her scalp follicles.
]]>Read on to find the best natural sources of collagen and how to include them in your diet!
Collagen is a chain of proteins that form in the connective tissues. It is present in many parts of the human body. Moreover, its role is to increase mineralization of the bones, tone muscles, and sustain joint health.
Collagen influences the texture of your skin, which promotes flexibility and firmness. Unfortunately, as you grow old, your body stops producing enough of this substance to maintain skin elasticity and thickness. In time, this condition leads to the appearance of wrinkles, fine lines, stretch marks, and sagginess.
Your best choice to increase the level of collagen in your body is to take this substance from natural sources. You can do so by adapting your diet to your skin’s needs. Here are some foods that can provide you with organic, unaltered collagen:
Soy
Naturally-processed soy goods are rich in precious enzymes. They boost cell regeneration and prevent skin cells from dying too quickly as you grow old.
Citrus fruits
Take your pick from oranges, kiwis, grapefruits, lemons, and many more to provide your body with pure collagen. These fruits have plenty of vitamin C, which is crucial for the well-being of your epidermis.
Flaxseed
Mix these small pulses in your breakfast meals or salads to provide your body with Omega-3, an essential healthy fat for collagen production.
Chocolate
What better reason to eat chocolate than to keep your youthful good looks? This renowned food supports skin health and diminishes the rapid depletion of collagen in your cells.

More than 40,000 Australians a year are using clear aligners. You might be surprised to hear that it’s the fastest growing dental category globally. How can it be that popular? You’ve never even seen anyone wearing them. Exactly! You’ve probably seen people with aligners, but just haven’t noticed them.
For a long time, braces were simply an embarrassing nightmare that you went through as a metal mouthed tween filled with insecurity. The thought of ever going through that again later in life, once you’d entered the workforce, seemed sadistic. Well the good news is you don’t have to.
Before clear aligners, the opportunity to fix your teeth ended in high school. New advancements in discreetness have opened up the market to millions of adults who also want to transform their smile
It’s the adult population that has really responded to the new technology. Clear aligners are virtually undetectable, allowing you to straighten your teeth safely, effectively and without going through traditional metal braces.
How Far has the Technology Come?
Here’s 3 things you should know about clear aligners:
**SmileStyler has over 250 Dentists partners around Australia
We are giving away FREE DENTAL CONSULTS to particular candidates who are interested in getting that million dollar smile. SmileStyler has over 250 Dental partners all over Australia, so there’s a good chance there is one near you.
]]>If you have any interest in improving your smile at all, you owe it to yourself to try the amazing SMILESTYLER.
You take absolutely no risk getting a dentist consultation!
If these facts alarm you, it’s time to take action. Even if you do not experience falls now, preventing them is one of the most important things you can do to maintain your independence as you get older. Why is this?
A fall often leads to a fear of falling, avoidance of daily activities, social isolation, lowered quality of life and can precipitate a move to residential aged care.
The good news is, there are simple ways to prevent most falls. Making A Stand have put together a simple online course that will help you and plan for the future.
Apart from the educational benefits there are further advantages of completing a course.
Keeping the brain active has been linked to reducing the risk of Alzheimer’s disease. So not only are you futureproofing yourself physically by undertaking this course, you are futureproofing yourself mentally.
With most courses falls prevention courses typically being held in a physical setting, there are many important reasons why this course is online
A team of experts at Make A Stand have put together this new course based on the latest research. The program covers many aspects of falls prevention over 7 lessons and teaches the seriousness and consequences of falls, how to identify and modify potential hazards and minimise overall risk of falls.
This course is completely online, so you can complete it at your own pace from the comfort of your own home.
Make A Stand want everybody to get a taste for the course, so are giving away the 1st Lesson for free.
]]>Hearing aid prices can range from $3000 to $8000 for a pair. To the average American household, this is equivalent of up to 2 months of income! Its not right that only the wealthy can restore their hearing, while the financially disadvantaged need to persist with inadequate hearing, leading to a dramatic decrease in the quality of life and increased health risks to diseases like Alzheimer’s.
Have you ever pondered how on earth a few components costing at most $100, assembled in China, suddenly turn into a $4000 hearing aid? Have you ever wondered why cellphones, computers and televisions have gotten cheaper over the years but hearing aids have got more expensive? Me too. That’s why we did some research, and what we found shocked us to our core…
Deborah Carlson, president of the American Academy of Audiology said that one of the primary reasons for the exorbitant prices is the cost of research and development. Manufacturers have spent substantial R&D resources making the devices smaller, more powerful and packed with myriads of new features: Bluetooth, wireless integration, remote controls, 20+ channels. It’s mostly because of this extensive research that hearing aids are so expensive. You’re contributing towards the decades of years spent over research, science and health studies, just to develop such a modern invention for our ears. The actual materials that make up hearing aids are only a small fraction of the cost.
But don’t listen to us, listen to Russ Apfel, an engineer who designed a technology now found in all hearing aids. He estimated that most hearing aids cost no more than $100 to make.
“The microphones, speakers and processing chips aren’t that expensive. Those devices in small volumes cost $10 to $15,”
For most of us, we don’t need all these bells and whistle’s. We just want to hear clearly again..luckily there’s one manufacturer that has realized this.
Research suggests that while the prices skyrocket, the improvements these top of the line devices make to your hearing are becoming increasingly marginal. Many argue that devices nowadays are over-engineered for the average user with mild or moderate hearing loss – It simply gives manufacturers an excuse to charge higher prices by introducing “newer and better” models
Think about it this way: if you need to get from A to B, a Rolls Royce would definitely make the ride more enjoyable than a Honda. But the Honda will get you from A to B just as well, in a safe and comfortable manner.
It seems that when it comes to hearing aids you don’t have the choice to opt for the Honda: you are forced to buy the Rolls Royce.
One Company Is Turning The Industry On It’s Head
Indeed, less expensive hearing aids are available online. At My Hearing Hero, prices are $149, a discount made possible by eliminating the middleman — the hearing aid dispenser.
Retailers/audiologists account for up to 70 percent of the final price of a hearing aid, because they factor in a bundle of additional expensive services. They have wages, rent and inventory costs to cover. My Hearing Hero has none of these, and as a result, can deliver top of the line hearing aids for significantly lower costs.
Can a $149 hearing aid really work?
It has to. My Hearing Hero is so confident, that they GUARANTEE IT OR YOUR MONEY BACK! YOU TAKE ABSOLUTELY NO RISK
There confidence isn’t misguided though. Hearing Hero was designed and created by a group of engineers who worked in the space and aircraft industries. They partnered with factories that are on the cutting edge of super-high-quality miniature electronics. If you’re flying a Boeing 787, an F35 fighter jet or orbiting the planet in a Space X capsule, you have to have good communications. Your headset has to cut the noise, be loud and clear, and MAKE EVERY WORD UNDERSTANDABLE.
And to show people how cost effective they can be, Hearing Hero is offering a 55% discount on their $149 hearing aid for a limited time.
Here’s 5 things you should know about Hearing Hero
]]>If you have any kind of hearing problem at all, you owe it to yourself to try the amazing HEARING HERO.
You will hear clearly and loudly. Guaranteed or your money back. You take absolutely no risk!
Don’t spend a fortune when you don’t have to. Get the best for the lowest price.
The Dental Disruptor with A-list celebrity fans, was one of the fastest growing brands of 2018. And for good reason ; They have turned an entire industry on its head. With the competition scrambling to catch-up.
Snow has pioneered a safely engineered LED technology and a photo-activated serum that is FDA approved and sage to use
A revolutionary breakthrough in teeth whitening technology is changing how the world takes care of their teeth – and is now the most popular at-home teeth whitening solution recommended by dentists and used by dozens of celebrities.
Here’s 7 reasons why you’re going to love Snow.
1. It’s Proven To Work – Without Sensitivity.
No hype, just facts: Snow is FDA approved, with over 100,000 satisfied customers. Your results, with no sensitivity – are absolutely guaranteed, with a 5 year Warranty. Yep. 5 years.

2. Celebs Love Snow
Why would wealthy celebrities, like Floyd Mayweather and Gronk- who can afford pretty much anything they want- use Snow?
It’s simple, because they need to look their best all the time for work and social events – and those online photos will be there forever… Sound like a familiar scenario?
And because it’s so fast and easy to use Snow – just apply the wand to your teeth and plug into your phone -You can literally do it anywhere!

3. Because Our Teeth Say a Lot About Us
There’s nothing more radiant and prosperous than a beaming white smile. And there’s also nothing that spoils a great look more than stained, yellow teeth. With Snow, you’ll never have that worry.
4. Regular = Results
And because Snow is 5 x faster and more effective than strips, it’s super easy to maintain your new dazzling teeth, without the hassle of extortionate and time consuming dental visits. So worries over Red wine and Coffee are a thing of the past with Snow!
5. It won’t erode your gums
The old way of whitening (that many dentists still use), sends you home with bleaching gel to put in a tray, which ends up all over your gums as well as your teeth. Not good. Snow’s 5 patent, proprietary system uses a wand to apply whitening serum just to your teeth, so it goes only where it needs to go.

6. Everything You Need is Included
Snow comes with the Activating light, Tooth shade progress grader, and with 12 months’ worth of their propriety serum. You’ll be stunning people with your pearly whites for the next year.

7. Risk Free Purchase
With your results guaranteed, why not treat yourself to the smile you truly deserve and try Snow today!
Does this image look familiar? Facebook, Twitter, Instagram, and Google have produced amazing products that have benefited the world enormously. But these companies are also caught in a zero-sum race for our finite attention, which they need to make money. Constantly forced to outperform their competitors, they must use increasingly persuasive techniques to keep us glued. And glued we remain.
Mark Zuckerberg has said that Facebook is committed “to continue improving our tools to give you the power to share your experience” But what experience is that exactly? AI driven news feeds and content has ensured that we are more interested in what’s happening in the world, than what is happening right in front of you. It’s easier than ever to see what your cousin is doing travelling in Bali, than talk to your friend right in front of you.
But this extends to an even more worrying trend as historian Yuval Noah Harrari notes, “During the last century technology has been distancing us from our bodies. We have been losing our ability to pay attention to what we smell and taste. Instead we are absorbed by our smartphones.”
Does this apply to you? Maybe your head is buried so deep in this article you’re ignoring those around you. After all, you clicked on a Facebook link to get here. But before you freak out and close this, let me tell you about one small way you can chip away at this behavior. Because with every mainstream social trend, there comes a counter culture. And this one is devoted to physical communities, rather than online communities; a place where people can divert attention away from their phones, back to their senses and back to people.
One company leading the way is Social Table. Centered around good food, good wine and connecting strangers with similar interests or appetites. This form of social dining has been described as “a philosophy of using meals specifically as a means to connect with others: eat to socialize”

This isn’t about dating, although there is always that potential, this is about going out, having a social life and enjoying the almost lost arts of communication. For a brief evening people are enjoying the opportunity to live their own moments, rather than scrolling through everybody else’s.
…it was a real treat to sit at one table with a group of people who had a genuine and authentic interest in simply getting to know others. No agenda, just a desire to be social. Not an iPhone in sight, can you believe it?… Mike Galvin
With Social Table events consistently booking out across major cities in Australia it seems there is some hope for humanity yet. Apparently there is still demand to go out and have a great time without holding a phone in front of your face, taking a photo, posting it, and constantly refreshing for likes. And with events lined up such as singles nights, networking dinners, cooking classes, girls-only outings, whisky-appreciation events, LGBTI-friendly catch ups and even straightforward after-work drinks there is something for everyone.
Each event teams up with carefully selected restaurants and creates specially designed set menus. Stuff you can’t get off UberEats. These are some of the most talked about culinary experiences you can find in Sydney, Brisbane, Perth or Melbourne. And with over 150 events so far, Social Table is expanding rapidly, even holding events in New York and San Francisco.
“The headache, the hangover and the late arrival to my meeting was truly worth it!” – Tony
So, for like minded individuals we’ve teamed up with Social Table to offer:
Upcoming Events On Social Table + Newcomer Discount

Even before she received 5 offers on Shark Tank, Katherine Krug, the inventor of BetterBack was the first solo woman to raise over $1million on Kickstarter. Now she has sold over 65,000 across 105 different countries. But as with most stories, this success didn’t come without pain. In fact it was pain that led to BetterBack’s creation
Katherine was working around the clock in front of her laptop on a technology start up when she began to suffer from the long hours at her desk. The back pain was intense, she recalls: “It was hard for me to sit.” She was soon diagnosed with a condition that affects millions around the world. Sciatica
Back pain can be so debilitating and truly affects all areas of your life. The pain can be dull at times, and other times it’s completely immobilizing. The only consistent thing is that its ALWAYS there.
Like many, Katherine tried multiple doctors, therapists and chiropractors but unfortunately the only result was wasted time and money. In fact, in search for a solution, Katherine tried just about everything that was out there including cushions, chairs, a stand up desk. If you’ve ever had back pain you might understand the desperation.
That’s when she went on a mission to find true relief that would last. After multiple rounds of product development and user testing, BetterBack was born!
Every day, reviews stream in about how BetterBack is changing someone’s life. But how does it work exactly?
BetterBack allows you to effortlessly sit in perfect posture, easing back pain.
BetterBack is a portable harness used to secure your lower back while you sit.
The key to good posture is the pelvis. Traditional back supports only focus on your lumbar spine. BetterBack stabilizes your pelvis, restoring your spine’s natural curvature, and provides lumbar support
BetterBack makes every chair ergonomic
Wear BetterBack for as little as 15 minutes a day to retrain your posture muscles and achieve great posture when you stand or sit on your own.
If you don’t love BetterBack, send it back after 60 days and get your money back. It’s as easy as that! They are confident that once you give it a go, you’re going to wonder how you sat so many years without it
And so the question is, does it work? The answer is a resounding yes. With hundreds of positive reviews and 80% of reviewers giving it 5 stars it’s hard to argue with the masses. The feedback tends to follow a similar pattern. As soon as you strap yourself in you realize how good it feels on your lower back.
So…We’ve arranged for a special deal that can only be accessed from the below link. It’s time to get rid of that pain once and for good. What are you waiting for?
You might be thinking, Do we have time for mindfulness in the fast paced industry I work in? Studies have found that the busier you are, the more you need mindfulness. It’s often the moments where you remove yourself from gadgets and deadlines, that you can find peace of mind and clarity of thought.
If that’s not concrete enough, lets look at the numbers. Australian employees are absent for an average of 3.2 working days each year due to stress. This workplace stress costs the Australian economy approximately $14.2 billion. Learning to skillfully handle stress, regulate emotions (leading to emotional intelligence) and soothe the nervous system have now become some of the most sought after traits. And all of these are powerful effects of mindfulness training.
Business reporter for the New York Times, David Gelles shares similar conclusions about insurance giant Aetna:
Aetna developed, launched, and studied two mindfulness programs in 2010 — Viniyoga Stress Reduction and Mindfulness at Work. The goals of the programs were to help reduce stress and to improve reactions to stress. Here were the outcomes.
Most importantly these companies are finding that mindfulness creates an improvement in the business’s bottom line.
Tailoring Your Company Mindfulness Program
Today’s employers have more options than ever when it comes to corporate wellness programs. And while this means there’s no shortage of choice, it can also make it difficult to sort through the noise. You want programs that actually work for your culture and workforce. Leading wellness provider WorkWell achieves this by conducting a very in-depth and well crafted consult with the client before implementing any plan, which clearly distinguishes them from most other providers.
Before selecting a program, it’s important to know what you’re trying to accomplish. And the best way to do this is to spend some time setting clear, specific goals. WorkWell then structure a plan which will help you achieve these goals.
These goals can be both short-term and long-term. If your program is designed to improve employee satisfaction, you might measure your success by monitoring employee retention rates and absenteeism over time. WorkWell MINDFULNESS WORKSHOPS
is available as an in-house program of either 1 or 2 days and also in the form of a retreat offsite. It can also be customised to specific needs of your workplace as needed.
We also invite you to take a free complimentary consultation with one of our experts to help guide you to the best suited program. Get more information here.
Get Your Free Consult With WellWork Today
]]>