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
/** | |
* Rename some of the measurement fields | |
* | |
* @param $supported_measurements | |
* | |
* @return mixed | |
*/ | |
function yk_docfit_filter_measurements( $supported_measurements ) { | |
$supported_measurements[ 'navel' ][ 'title' ] = 'Bellybutton'; |
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
// ------------------------------------------ | |
// 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
[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
<?php | |
// Set the user that you wish to load to one passed via qs, if not, default to logged in user id | |
$user_id = ( false === isset( $_GET[ 'user-id' ] ) ) ? (int) $_GET[ 'user-id' ] : get_current_user_id(); | |
// Worth checking that the user we're trying to view exists | |
if ( false === get_userdata( $user_id ) ) { | |
// display error saying user doesn't exist | |
} |
OlderNewer