Skip to content

Instantly share code, notes, and snippets.

View alicolville's full-sized avatar

Ali Colville alicolville

View GitHub Profile
[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]
[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]
@alicolville
alicolville / [wlt-if] - logged in BMR prompt
Created September 5, 2017 09:42
Show BMR prompt to someone that is logged in
[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]
@alicolville
alicolville / [wlt-calories]
Created August 25, 2017 10:41
Example usuages of [wlt-calories]
[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"]
[wlt-new-users days="7"]
[wlt-new-users days="30"]
[wlt-new-users days="365"]
[wlt-new-users days="7" count-all-roles="true"]