This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[wlt-new-users days="7"] | |
[wlt-new-users days="30"] | |
[wlt-new-users days="365"] | |
[wlt-new-users days="7" count-all-roles="true"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[wt-macronutrients-table] | |
<!-- Maintain --> | |
[wt-macronutrients progress="maintain" type="total" nutrient="protein"] | |
[wt-macronutrients progress="maintain" type="total" nutrient="carbs"] | |
[wt-macronutrients progress="maintain" type="total" nutrient="fats"] | |
[wt-macronutrients progress="maintain" type="breakfast" nutrient="protein"] | |
[wt-macronutrients progress="maintain" type="breakfast" nutrient="carbs"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[wlt-calories progress="maintain" type="total"] | |
[wlt-calories progress="maintain" type="breakfast"] | |
[wlt-calories progress="maintain" type="lunch"] | |
[wlt-calories progress="maintain" type="dinner"] | |
[wlt-calories progress="maintain" type="snacks"] | |
[wlt-calories progress="lose" type="total"] | |
[wlt-calories progress="lose" type="breakfast"] | |
[wlt-calories progress="lose" type="lunch"] | |
[wlt-calories progress="lose" type="dinner"] | |
[wlt-calories progress="lose" type="snacks"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ------------------------------------------ | |
// Checking is logged in | |
// ------------------------------------------ | |
[wt-if field="is-logged-in"] | |
[wt-chart] | |
[else] | |
You must log in to see your chart. | |
[/wt-if] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Below is an example (not the best one) but an example none the less! | |
*/ | |
[wt-if field="is-logged-in"] | |
Great you're logged in... | |
[wt-if-1 field="height"] | |
... and you have added a height. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[wlt-if field="is-logged-in"] | |
You are logged in :) | |
[wlt-if-1 field="bmr" operator="not-exists"] | |
Please get your arse over to the settings page to enter the relevant data. | |
[/wlt-if-1] | |
[/wlt-if] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[wlt-if field="is-logged-in"] | |
[wlt-if-1 field="height, dob, activity_level, gender"] | |
<h2>Step 1 - tell us about you!</h2> | |
[wlt-user-settings allow-delete-data="false"] | |
[else-1] | |
[wlt-if-2 field="target"] | |
<h2>Step 2 - set yourself a target</h2> | |
It's great you're here to track your weight! Why not set yourself a target? This gives you something to aim for or helps you maintain your current weight. | |
[wlt-user-settings allow-delete-data="false"] | |
[else-2] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[wlt-if field="is-logged-in"] | |
[wlt-if-1 field="height, dob, activity_level, gender" operator="not-exists"] | |
<h2>Step 1 - tell us about you!</h2> | |
[wlt-user-settings allow-delete-data="false"] | |
[else-1] | |
[wlt-if-2 field="target" operator="not-exists"] | |
<h2>Step 2 - set yourself a target</h2> | |
Time to set yourself a target - this will give you something to aim for! | |
[wlt-form target="true"] | |
[else-2] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
If the user has not completed their BMR fields or target then automatically redirect them to your Wizard page. | |
1) Add this to your theme's functions.php file | |
2) Ensure your Wizard page has the slug "wizard" or modify line 14 to suit. | |
3) Change your redirect URL in line 21 | |
Disclaimer: Use this as at your own risk. It may require modification! | |
*/ | |
function yeken_force_to_wizard() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// If we're on the Wizard page or not on a page or not logged in, just exit. Otherwise we'll end up in a loop! | |
if ( false !== strpos($_SERVER['REQUEST_URI'], '/wizard/') || false === is_page() || false === is_user_logged_in() || true === is_home() ) { | |
return; | |
} |
OlderNewer