Created
October 10, 2022 15:43
-
-
Save koen12344/41c41a7e3bba9433d171e3d8a2b3be2e to your computer and use it in GitHub Desktop.
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 | |
function pgmb_add_custom_variable($variables, $parent_post_id){ | |
$variables['%custom_variable%'] = get_post_meta($parent_post_id, 'custom_variable', true); | |
return $variables; | |
} | |
add_filter('mbp_placeholder_variables', 'pgmb_add_custom_variable', 10, 2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment